{"version":3,"sources":["../../../src/internal/operators/repeat.ts","../../../src/internal/operators/distinctUntilChanged.ts","../../../src/internal/operators/distinct.ts","../../../src/internal/observable/fromEventPattern.ts","../../../src/internal/operators/publishReplay.ts","../../../src/internal/operators/concatAll.ts","../../../src/internal/operators/endWith.ts","../../../src/internal/operators/reduce.ts","../../../src/internal/operators/takeUntil.ts","./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../../../src/internal/operators/sampleTime.ts","../../../src/internal/observable/zip.ts","./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../../src/internal/symbol/rxSubscriber.ts","../../../src/internal/observable/partition.ts","../../src/internal/BehaviorSubject.ts","./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../../src/internal/config.ts","../../../src/internal/operators/skipWhile.ts","../../../src/internal/operators/delay.ts","../../../src/internal/scheduler/AsyncAction.ts","../../../src/internal/operators/auditTime.ts","../../../src/internal/operators/ignoreElements.ts","../../../src/internal/util/ArgumentOutOfRangeError.ts","../../../src/internal/observable/bindNodeCallback.ts","../../../src/internal/operators/race.ts","../../../src/internal/operators/timeInterval.ts","../../../src/internal/scheduled/schedulePromise.ts","../../../src/internal/operators/mergeMap.ts","../../../src/internal/operators/mergeScan.ts","../../src/internal/InnerSubscriber.ts","../../../src/internal/scheduled/scheduleObservable.ts","../../../src/internal/observable/never.ts","../../../src/internal/operators/debounce.ts","../../../src/internal/util/isObservable.ts","../../../src/internal/scheduled/scheduled.ts","../../../src/internal/scheduler/asap.ts","../../src/internal/Subscriber.ts","../../../src/internal/scheduler/Action.ts","../../../src/internal/operators/combineAll.ts","../../../src/internal/util/canReportError.ts","./node_modules/@angular/core/fesm2015/core.js","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbAccordion.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbAlert.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbCarousel.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵd.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵe.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵf.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbDatepicker.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbDatepickerMonth.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbNavOutlet.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbPagination.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵm.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbProgressbar.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbRating.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbTabset.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbTimepicker.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbToast.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵr.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵs.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.NgbHighlight.html","./node_modules/@ng-bootstrap/ng-bootstrap/ng-bootstrap.d.ts.ɵv.html","../../../src/internal/operators/bufferCount.ts","../../../src/internal/operators/elementAt.ts","../../../src/internal/util/ObjectUnsubscribedError.ts","../../../src/internal/operators/partition.ts","../../../src/internal/operators/takeLast.ts","./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../../src/internal/util/isIterable.ts","../../../src/internal/util/subscribeToObservable.ts","./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../../../src/internal/observable/from.ts","../../../src/internal/operators/mapTo.ts","../../../src/internal/scheduler/async.ts","../../../src/internal/util/isArray.ts","./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../../src/internal/observable/ConnectableObservable.ts","../../../src/internal/observable/empty.ts","../../../src/internal/util/not.ts","../../../src/internal/operators/bufferToggle.ts","../../../src/internal/operators/expand.ts","../../../src/internal/operators/min.ts","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/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/util/key.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-keyboard-service.ts","ng://@ng-bootstrap/ng-bootstrap/datepicker/datepicker-month.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-config.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/nav/nav-config.ts","ng://@ng-bootstrap/ng-bootstrap/nav/nav.ts","ng://@ng-bootstrap/ng-bootstrap/nav/nav-outlet.ts","ng://@ng-bootstrap/ng-bootstrap/nav/nav.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-i18n.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/timepicker.ts","ng://@ng-bootstrap/ng-bootstrap/timepicker/timepicker.module.ts","ng://@ng-bootstrap/ng-bootstrap/toast/toast-config.ts","ng://@ng-bootstrap/ng-bootstrap/toast/toast.ts","ng://@ng-bootstrap/ng-bootstrap/toast/toast.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","ng://@ng-bootstrap/ng-bootstrap/ng-bootstrap.ts","../../../src/internal/operators/takeWhile.ts","../../../../../../packages/animations/src/animation_builder.ts","../../../../../../packages/animations/src/animation_metadata.ts","../../../../../../packages/animations/src/util.ts","../../../../../../packages/animations/src/players/animation_player.ts","../../../../../../packages/animations/src/players/animation_group_player.ts","../../../../../../packages/animations/src/private_export.ts","../../../../../../packages/animations/src/animations.ts","ng://ngx-gallery-9/lib/ngx-gallery-helper.service.ts","ng://ngx-gallery-9/lib/ngx-gallery-animation.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-image-size.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-layout.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-order.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-action.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-options.ts","ng://ngx-gallery-9/lib/ngx-gallery-ordered-image.model.ts","ng://ngx-gallery-9/lib/ngx-gallery-preview/ngx-gallery-preview.component.ts","ng://ngx-gallery-9/lib/ngx-gallery-image/ngx-gallery-image.component.ts","ng://ngx-gallery-9/lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component.ts","ng://ngx-gallery-9/lib/ngx-gallery.component.ts","ng://ngx-gallery-9/lib/ngx-gallery-action/ngx-gallery-action.component.ts","ng://ngx-gallery-9/lib/ngx-gallery-arrows/ngx-gallery-arrows.component.ts","ng://ngx-gallery-9/lib/ngx-gallery-bullets/ngx-gallery-bullets.component.ts","ng://ngx-gallery-9/lib/ngx-gallery.module.ts","ng://ngx-gallery-9/lib/ngx-gallery-image.model.ts","ng://ngx-gallery-9/public-api.ts","ng://ngx-gallery-9/ngx-gallery-9.ts","../../../src/internal/operators/every.ts","../../../src/internal/operators/zip.ts","../../../src/internal/operators/repeatWhen.ts","../../../src/internal/observable/concat.ts","../../src/internal/Observable.ts","../../../src/internal/scheduler/QueueScheduler.ts","../../../src/internal/observable/onErrorResumeNext.ts","../../../src/internal/operators/count.ts","../../../src/internal/util/isArrayLike.ts","../../../src/internal/operators/toArray.ts","../../../src/internal/scheduler/AsyncScheduler.ts","../../../src/internal/operators/take.ts","../../../src/internal/operators/catchError.ts","./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../../src/internal/operators/startWith.ts","./node_modules/@babel/runtime/helpers/esm/inherits.js","../../../src/internal/operators/zipAll.ts","../../../src/internal/operators/findIndex.ts","./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../../src/internal/operators/debounceTime.ts","../../../src/internal/operators/scan.ts","../../../src/internal/util/noop.ts","../../../src/internal/observable/of.ts","../../../src/internal/symbol/iterator.ts","../../../src/internal/scheduled/scheduleIterable.ts","../../../src/internal/operators/retryWhen.ts","./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../../src/internal/AsyncSubject.ts","../../../src/internal/util/hostReportError.ts","../../../src/internal/operators/last.ts","../../../src/internal/observable/range.ts","../../../src/internal/observable/defer.ts","../../../src/internal/operators/publish.ts","../../../src/internal/observable/race.ts","../../../src/internal/observable/SubscribeOnObservable.ts","./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../../../src/internal/operators/groupBy.ts","../../../src/internal/operators/bufferTime.ts","./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../../../src/internal/operators/distinctUntilKeyChanged.ts","../../../src/internal/operators/bufferWhen.ts","../../../src/internal/observable/timer.ts","../../../src/internal/scheduler/AsapAction.ts","../../../src/internal/util/isInteropObservable.ts","../../../src/internal/observable/using.ts","../../../src/internal/observable/bindCallback.ts","./node_modules/@babel/runtime/helpers/esm/construct.js","../../../src/internal/scheduler/AsapScheduler.ts","./node_modules/@babel/runtime/helpers/esm/get.js","../../../../../../packages/common/src/dom_adapter.ts","../../../../../../packages/common/src/dom_tokens.ts","../../../../../../packages/common/src/location/platform_location.ts","../../../../../../packages/common/src/private_export.ts","../../../../../../packages/common/src/location/util.ts","../../../../../../packages/common/src/location/location_strategy.ts","../../../../../../packages/common/src/location/hash_location_strategy.ts","../../../../../../packages/common/src/location/location.ts","../../../../../../packages/common/src/location/index.ts","../../../../../../packages/common/src/i18n/currencies.ts","../../../../../../packages/common/src/i18n/locale_data_api.ts","../../../../../../packages/common/src/i18n/format_date.ts","../../../../../../packages/common/src/i18n/format_number.ts","../../../../../../packages/common/src/i18n/localization.ts","../../../../../../packages/common/src/i18n/locale_data.ts","../../../../../../packages/common/src/cookie.ts","../../../../../../packages/common/src/directives/ng_class.ts","../../../../../../packages/common/src/directives/ng_component_outlet.ts","../../../../../../packages/common/src/directives/ng_for_of.ts","../../../../../../packages/common/src/directives/ng_if.ts","../../../../../../packages/common/src/directives/ng_switch.ts","../../../../../../packages/common/src/directives/ng_plural.ts","../../../../../../packages/common/src/directives/ng_style.ts","../../../../../../packages/common/src/directives/ng_template_outlet.ts","../../../../../../packages/common/src/directives/index.ts","../../../../../../packages/common/src/pipes/invalid_pipe_argument_error.ts","../../../../../../packages/common/src/pipes/async_pipe.ts","../../../../../../packages/common/src/pipes/case_conversion_pipes.ts","../../../../../../packages/common/src/pipes/date_pipe.ts","../../../../../../packages/common/src/pipes/i18n_plural_pipe.ts","../../../../../../packages/common/src/pipes/i18n_select_pipe.ts","../../../../../../packages/common/src/pipes/json_pipe.ts","../../../../../../packages/common/src/pipes/keyvalue_pipe.ts","../../../../../../packages/common/src/pipes/number_pipe.ts","../../../../../../packages/common/src/pipes/slice_pipe.ts","../../../../../../packages/common/src/pipes/index.ts","../../../../../../packages/common/src/common_module.ts","../../../../../../packages/common/src/platform_id.ts","../../../../../../packages/common/src/version.ts","../../../../../../packages/common/src/viewport_scroller.ts","../../../../../../packages/common/src/common.ts","../../../../../../packages/common/public_api.ts","../../../../../../packages/common/index.ts","../../../src/internal/util/subscribeTo.ts","../../../src/internal/util/identity.ts","../../../src/internal/operators/first.ts","./node_modules/@babel/runtime/helpers/esm/toArray.js","./node_modules/@babel/runtime/helpers/esm/typeof.js","../../../src/internal/operators/publishBehavior.ts","../../../src/internal/operators/windowTime.ts","../../../src/internal/operators/mergeMapTo.ts","../../../src/internal/operators/shareReplay.ts","../../../src/internal/observable/merge.ts","../../../src/internal/scheduler/AnimationFrameAction.ts","../../src/internal/Notification.ts","../../../src/internal/observable/generate.ts","../../../src/internal/util/toSubscriber.ts","../../../src/internal/operators/throwIfEmpty.ts","../../src/internal/Subject.ts","./node_modules/@babel/runtime/helpers/esm/superPropBase.js","../../../src/internal/util/isObject.ts","../../../src/internal/operators/exhaustMap.ts","../../src/internal/Scheduler.ts","../../../src/internal/util/TimeoutError.ts","../../../src/internal/operators/switchAll.ts","../../../src/internal/util/isNumeric.ts","./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../src/internal/SubjectSubscription.ts","../../../src/internal/scheduler/QueueAction.ts","../../../src/internal/util/subscribeToResult.ts","../../../src/internal/operators/pairwise.ts","../../../src/internal/operators/sequenceEqual.ts","./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../../src/internal/util/subscribeToPromise.ts","../../../src/internal/operators/switchMapTo.ts","../../../src/internal/operators/mergeAll.ts","../../../src/internal/operators/concatMap.ts","../../../src/internal/util/isPromise.ts","../../../src/internal/operators/sample.ts","../../../src/internal/util/Immediate.ts","../../../src/internal/operators/find.ts","../../../../../../packages/platform-browser/src/browser/generic_browser_adapter.ts","../../../../../../packages/platform-browser/src/browser/browser_adapter.ts","../../../../../../packages/platform-browser/src/browser/server-transition.ts","../../../../../../packages/platform-browser/src/browser/testability.ts","../../../../../../packages/platform-browser/src/dom/util.ts","../../../../../../packages/platform-browser/src/dom/debug/ng_probe.ts","../../../../../../packages/platform-browser/src/dom/events/event_manager.ts","../../../../../../packages/platform-browser/src/dom/shared_styles_host.ts","../../../../../../packages/platform-browser/src/dom/dom_renderer.ts","../../../../../../packages/platform-browser/src/dom/events/dom_events.ts","../../../../../../packages/platform-browser/src/dom/events/hammer_gestures.ts","../../../../../../packages/platform-browser/src/dom/events/key_events.ts","../../../../../../packages/platform-browser/src/security/dom_sanitization_service.ts","../../../../../../packages/platform-browser/src/browser.ts","../../../../../../packages/platform-browser/src/browser/meta.ts","../../../../../../packages/platform-browser/src/browser/title.ts","../../../../../../packages/platform-browser/src/browser/tools/browser.ts","../../../../../../packages/platform-browser/src/browser/tools/common_tools.ts","../../../../../../packages/platform-browser/src/browser/tools/tools.ts","../../../../../../packages/platform-browser/src/browser/transfer_state.ts","../../../../../../packages/platform-browser/src/dom/debug/by.ts","../../../../../../packages/platform-browser/src/private_export.ts","../../../../../../packages/platform-browser/src/version.ts","../../../../../../packages/platform-browser/src/platform-browser.ts","../../../../../../packages/platform-browser/public_api.ts","../../../../../../packages/platform-browser/index.ts","../../../src/internal/operators/delayWhen.ts","../../../src/internal/observable/forkJoin.ts","../../../src/internal/operators/single.ts","../../../src/internal/operators/materialize.ts","../../../src/internal/operators/switchMap.ts","../../../src/internal/scheduler/animationFrame.ts","../../../src/internal/operators/concat.ts","../../../../../../packages/animations/browser/src/render/shared.ts","../../../../../../packages/animations/browser/src/render/animation_driver.ts","../../../../../../packages/animations/browser/src/util.ts","../../../../../../packages/animations/browser/src/dsl/animation_transition_expr.ts","../../../../../../packages/animations/browser/src/dsl/animation_ast_builder.ts","../../../../../../packages/animations/browser/src/dsl/animation_timeline_instruction.ts","../../../../../../packages/animations/browser/src/dsl/element_instruction_map.ts","../../../../../../packages/animations/browser/src/dsl/animation_timeline_builder.ts","../../../../../../packages/animations/browser/src/dsl/animation.ts","../../../../../../packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.ts","../../../../../../packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts","../../../../../../packages/animations/browser/src/dsl/animation_transition_instruction.ts","../../../../../../packages/animations/browser/src/dsl/animation_transition_factory.ts","../../../../../../packages/animations/browser/src/dsl/animation_trigger.ts","../../../../../../packages/animations/browser/src/render/timeline_animation_engine.ts","../../../../../../packages/animations/browser/src/render/transition_animation_engine.ts","../../../../../../packages/animations/browser/src/render/animation_engine_next.ts","../../../../../../packages/animations/browser/src/render/special_cased_styles.ts","../../../../../../packages/animations/browser/src/render/css_keyframes/element_animation_style_handler.ts","../../../../../../packages/animations/browser/src/render/css_keyframes/css_keyframes_player.ts","../../../../../../packages/animations/browser/src/render/css_keyframes/direct_style_player.ts","../../../../../../packages/animations/browser/src/render/css_keyframes/css_keyframes_driver.ts","../../../../../../packages/animations/browser/src/render/web_animations/web_animations_player.ts","../../../../../../packages/animations/browser/src/render/web_animations/web_animations_driver.ts","../../../../../../packages/animations/browser/src/private_export.ts","../../../src/internal/operators/combineLatest.ts","./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../../src/internal/Observer.ts","../../../src/internal/operators/throttleTime.ts","../../../src/internal/observable/pairs.ts","../../../../../../packages/router/src/events.ts","../../../../../../packages/router/src/shared.ts","../../../../../../packages/router/src/utils/collection.ts","../../../../../../packages/router/src/url_tree.ts","../../../../../../packages/router/src/utils/tree.ts","../../../../../../packages/router/src/router_state.ts","../../../../../../packages/router/src/create_router_state.ts","../../../../../../packages/router/src/create_url_tree.ts","../../../../../../packages/router/src/operators/activate_routes.ts","../../../../../../packages/router/src/config.ts","../../../../../../packages/router/src/utils/type_guards.ts","../../../../../../packages/router/src/operators/prioritized_guard_value.ts","../../../../../../packages/router/src/apply_redirects.ts","../../../../../../packages/router/src/operators/apply_redirects.ts","../../../../../../packages/router/src/utils/preactivation.ts","../../../../../../packages/router/src/operators/check_guards.ts","../../../../../../packages/router/src/recognize.ts","../../../../../../packages/router/src/operators/recognize.ts","../../../../../../packages/router/src/operators/resolve_data.ts","../../../../../../packages/router/src/operators/switch_tap.ts","../../../../../../packages/router/src/route_reuse_strategy.ts","../../../../../../packages/router/src/components/empty_outlet.ts","../../../../../../packages/router/src/utils/config.ts","../../../../../../packages/router/src/router_config_loader.ts","../../../../../../packages/router/src/router_outlet_context.ts","../../../../../../packages/router/src/url_handling_strategy.ts","../../../../../../packages/router/src/router.ts","../../../../../../packages/router/src/directives/router_link.ts","../../../../../../packages/router/src/directives/router_link_active.ts","../../../../../../packages/router/src/directives/router_outlet.ts","../../../../../../packages/router/src/router_preloader.ts","../../../../../../packages/router/src/router_scroller.ts","../../../../../../packages/router/src/router_module.ts","../../../../../../packages/router/src/version.ts","../../../../../../packages/router/src/private_export.ts","../../../../../../packages/router/public_api.ts","../../../../../../packages/router/index.ts","../../../src/internal/scheduler/VirtualTimeScheduler.ts","../../../src/internal/observable/combineLatest.ts","../../../src/internal/scheduled/scheduleArray.ts","../../src/internal/ReplaySubject.ts","../../../src/internal/symbol/observable.ts","../../src/operators/index.ts","../../../src/internal/operators/skipLast.ts","../../../src/internal/operators/dematerialize.ts","../../../src/internal/observable/interval.ts","../../src/internal/OuterSubscriber.ts","../../../src/internal/operators/map.ts","../../../src/internal/operators/windowCount.ts","../../../src/internal/operators/isEmpty.ts","../../../src/internal/util/pipe.ts","./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../../../src/internal/operators/window.ts","../../../src/internal/util/isDate.ts","./node_modules/tslib/tslib.es6.js","../../../src/internal/util/isFunction.ts","../../../src/internal/operators/finalize.ts","../../../src/internal/util/subscribeToArray.ts","../../../src/internal/operators/multicast.ts","../../../../../../packages/platform-browser/animations/src/animation_builder.ts","../../../../../../packages/platform-browser/animations/src/animation_renderer.ts","../../../../../../packages/platform-browser/animations/src/providers.ts","../../../../../../packages/platform-browser/animations/src/module.ts","../../../../../../packages/platform-browser/animations/src/private_export.ts","../../../src/internal/operators/buffer.ts","../../../src/internal/operators/filter.ts","../../../src/internal/util/subscribeToIterable.ts","./node_modules/@angular/router/router.d.ts.ɵangular_packages_router_router_l.html","../../../src/internal/operators/windowWhen.ts","../../../src/internal/util/UnsubscriptionError.ts","../../../src/internal/operators/observeOn.ts","../../../src/internal/operators/concatMapTo.ts","../../../src/internal/operators/merge.ts","../src/index.ts","../../../src/internal/operators/publishLast.ts","../../../src/internal/scheduler/queue.ts","../../src/internal/Subscription.ts","../../../src/internal/operators/timestamp.ts","../../../src/internal/observable/iif.ts","./node_modules/@babel/runtime/helpers/esm/defineProperty.js","./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../../../packages/forms/src/directives/control_value_accessor.ts","../../../../../../packages/forms/src/directives/checkbox_value_accessor.ts","../../../../../../packages/forms/src/directives/default_value_accessor.ts","../../../../../../packages/forms/src/directives/abstract_control_directive.ts","../../../../../../packages/forms/src/directives/control_container.ts","../../../../../../packages/forms/src/directives/ng_control.ts","../../../../../../packages/forms/src/directives/ng_control_status.ts","../../../../../../packages/forms/src/validators.ts","../../../../../../packages/forms/src/directives/number_value_accessor.ts","../../../../../../packages/forms/src/directives/radio_control_value_accessor.ts","../../../../../../packages/forms/src/directives/range_value_accessor.ts","../../../../../../packages/forms/src/directives/error_examples.ts","../../../../../../packages/forms/src/directives/reactive_errors.ts","../../../../../../packages/forms/src/directives/select_control_value_accessor.ts","../../../../../../packages/forms/src/directives/select_multiple_control_value_accessor.ts","../../../../../../packages/forms/src/directives/shared.ts","../../../../../../packages/forms/src/model.ts","../../../../../../packages/forms/src/directives/ng_form.ts","../../../../../../packages/forms/src/directives/abstract_form_group_directive.ts","../../../../../../packages/forms/src/directives/template_driven_errors.ts","../../../../../../packages/forms/src/directives/ng_model_group.ts","../../../../../../packages/forms/src/directives/ng_model.ts","../../../../../../packages/forms/src/directives/ng_no_validate_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_control_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_group_directive.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_group_name.ts","../../../../../../packages/forms/src/directives/reactive_directives/form_control_name.ts","../../../../../../packages/forms/src/directives/validators.ts","../../../../../../packages/forms/src/directives.ts","../../../../../../packages/forms/src/form_builder.ts","../../../../../../packages/forms/src/version.ts","../../../../../../packages/forms/src/form_providers.ts","../../../../../../packages/forms/src/forms.ts","../../../../../../packages/forms/public_api.ts","../../../../../../packages/forms/index.ts","../../../src/internal/operators/windowToggle.ts","../../../src/internal/util/EmptyError.ts","../../../src/internal/operators/timeoutWith.ts","../../../src/internal/operators/timeout.ts","../../../src/internal/operators/subscribeOn.ts","../../../src/internal/operators/audit.ts","../../../src/internal/operators/onErrorResumeNext.ts","../../../src/internal/operators/retry.ts","../../../src/internal/operators/tap.ts","../../../src/internal/operators/skipUntil.ts","./node_modules/@babel/runtime/helpers/esm/createClass.js","../../../src/internal/operators/share.ts","../../../src/internal/operators/pluck.ts","../../../src/internal/operators/refCount.ts","../../../src/internal/operators/defaultIfEmpty.ts","../../../src/internal/observable/fromEvent.ts","../../../src/internal/observable/fromArray.ts","../../../src/internal/operators/max.ts","./node_modules/hammerjs/hammer.js","../../../src/internal/operators/throttle.ts","../../../src/internal/util/isScheduler.ts","../../../src/internal/observable/throwError.ts","../../../src/internal/operators/skip.ts","../../../src/internal/scheduler/AnimationFrameScheduler.ts","../../../src/internal/operators/withLatestFrom.ts","../../../src/internal/operators/exhaust.ts","../../src/internal/innerSubscribe.ts"],"names":["noSideEffects","fn","toString","ANNOTATIONS","PARAMETERS","PROP_METADATA","makeDecorator","name","props","parentClass","additionalProcessing","typeFn","metaCtor","makeMetadataCtor","DecoratorFactory","args","call","annotationInstance","TypeDecorator","cls","annotations","hasOwnProperty","Object","defineProperty","value","push","prototype","create","ngMetadataName","annotationCls","ctor","values","propName","makeParamDecorator","ParamDecoratorFactory","apply","ParamDecorator","annotation","unusedKey","index","parameters","length","makePropDecorator","PropDecoratorFactory","decoratorInstance","PropDecorator","target","constructor","meta","unshift","ɵ0","token","Inject","Optional","Self","SkipSelf","Host","ɵ1","attributeName","Attribute","InjectFlags","getClosureSafeProperty","objWithPropertyToExtract","key","Error","fillProperties","source","ɵɵdefineInjectable","opts","providedIn","factory","undefined","defineInjectable","ɵɵdefineInjector","options","providers","imports","getInjectableDef","type","getOwnDefinition","NG_PROV_DEF","NG_INJECTABLE_DEF","def","getInheritedInjectableDef","NG_PROV_DEF_FALLBACK","typeName","getTypeName","console","warn","match","getInjectorDef","NG_INJ_DEF","NG_INJECTOR_DEF","ɵprov","ɵinj","ɵprovFallback","ngInjectableDef","ngInjectorDef","stringify","Array","isArray","map","join","overriddenName","res","newLineIndex","indexOf","substring","concatStringsWithSpace","before","after","__forward_ref__","forwardRef","forwardRefFn","resolveForwardRef","isForwardRef","__globalThis","globalThis","__window","window","__self","self","WorkerGlobalScope","__global","global","_global","R3ResolvedDependencyType","R3FactoryTarget","ViewEncapsulation","getCompilerFacade","globalNg","ɵcompilerFacade","NG_COMP_DEF","ɵcmp","NG_DIR_DEF","ɵdir","NG_PIPE_DEF","ɵpipe","NG_MOD_DEF","ɵmod","NG_LOC_ID_DEF","ɵloc","NG_FACTORY_DEF","ɵfac","NG_ELEMENT_ID","__NG_ELEMENT_ID__","ngDevModeResetPerfCounters","locationString","location","newCounters","namedConstructors","firstCreatePass","tNode","tView","rendererCreateTextNode","rendererSetText","rendererCreateElement","rendererAddEventListener","rendererSetAttribute","rendererRemoveAttribute","rendererSetProperty","rendererSetClassName","rendererAddClass","rendererRemoveClass","rendererSetStyle","rendererRemoveStyle","rendererDestroy","rendererDestroyNode","rendererMoveNode","rendererRemoveNode","rendererAppendChild","rendererInsertBefore","rendererCreateComment","allowNgDevModeTrue","initNgDevMode","ngDevMode","InjectionToken","_desc","INJECTOR","_THROW_IF_NOT_FOUND","THROW_IF_NOT_FOUND","NG_TEMP_TOKEN_PATH","NG_TOKEN_PATH","NEW_LINE","NO_NEW_LINE","SOURCE","ɵ0$1","USE_VALUE","provide","String","useValue","_currentInjector","setCurrentInjector","injector","former","_injectImplementation","setInjectImplementation","impl","previous","injectInjectorOnly","flags","Default","injectRootLimpMode","get","ɵɵinject","ɵɵinvalidFactoryDep","msg","inject","notFoundValue","injectableDef","injectArgs","types","i","arg","j","NullInjector","error","catchInjectorError","e","injectorErrorName","tokenPath","message","formatError","text","obj","charAt","substr","context","parts","JSON","replace","angularCoreDiEnv","getFactoryOf","typeAny","NgModuleRef","NgModuleFactory","assertNumber","actual","throwError","assertNumberInRange","minInclusive","maxInclusive","assertLessThanOrEqual","assertGreaterThanOrEqual","assertString","assertEqual","expected","assertNotEqual","assertSame","assertNotSame","assertLessThan","assertGreaterThan","assertNotDefined","assertDefined","comparison","assertDomNode","node","Node","assertIndexInRange","arr","maxLen","addAllToArray","items","flatten","list","dst","item","slice","deepForEach","input","forEach","addToArray","splice","removeFromArray","pop","newArray","size","arraySplice","array","count","arrayInsert","end","previousEnd","arrayInsert2","value1","value2","arrayInsertSorted","arrayIndexOfSorted","arrayRemoveSorted","_arrayIndexOfSorted","keyValueArraySet","keyValueArray","keyValueArrayIndexOf","keyValueArrayGet","keyValueArrayDelete","shift","start","middle","current","ChangeDetectionStrategy","ChangeDetectorStatus","isDefaultChangeDetectionStrategy","changeDetectionStrategy","ViewEncapsulation$1","EMPTY_OBJ","EMPTY_ARRAY","freeze","_renderCompCount","ɵɵdefineComponent","componentDefinition","typePrototype","declaredInputs","providersResolver","decls","vars","template","consts","ngContentSelectors","hostBindings","hostVars","hostAttrs","contentQueries","inputs","outputs","exportAs","onPush","changeDetection","OnPush","directiveDefs","pipeDefs","selectors","viewQuery","features","data","encapsulation","Emulated","id","styles","_","setInput","schemas","directiveTypes","directives","feature","pipeTypes","pipes","invertObject","extractDirectiveDef","extractPipeDef","ɵɵsetComponentScope","getComponentDef","getDirectiveDef","getPipeDef","autoRegisterModuleById","ɵɵdefineNgModule","bootstrap","declarations","exports","transitiveCompileScopes","ɵɵsetNgModuleScope","scope","ngModuleDef","getNgModuleDef","secondary","newLookup","minifiedKey","publicName","declaredName","ɵɵdefineDirective","ɵɵdefinePipe","pipeDef","pure","onDestroy","ngOnDestroy","getFactoryDef","throwNotFound","hasFactoryDef","getNgLocaleIdDef","HOST","TVIEW","FLAGS","PARENT","NEXT","TRANSPLANTED_VIEWS_TO_REFRESH","T_HOST","CLEANUP","CONTEXT","INJECTOR$1","RENDERER_FACTORY","RENDERER","SANITIZER","CHILD_HEAD","CHILD_TAIL","DECLARATION_VIEW","DECLARATION_COMPONENT_VIEW","DECLARATION_LCONTAINER","PREORDER_HOOK_FLAGS","QUERIES","HEADER_OFFSET","unusedValueExportToPlacateAjd","TYPE","HAS_TRANSPLANTED_VIEWS","NATIVE","VIEW_REFS","MOVED_VIEWS","CONTAINER_HEADER_OFFSET","unusedValueExportToPlacateAjd$1","isLView","isLContainer","isContentQueryHost","isComponentHost","isDirectiveHost","isComponentDef","isRootView","assertTNodeForLView","lView","tView_","assertComponentType","assertNgModuleType","assertPreviousIsParent","isParent","assertHasParent","parent","assertDataNext","assertLContainer","assertLViewOrUndefined","assertLView","assertFirstCreatePass","errMessage","assertFirstUpdatePass","firstUpdatePass","assertDirectiveDef","SimpleChange","previousValue","currentValue","firstChange","ɵɵNgOnChangesFeature","NgOnChangesFeatureImpl","definition","ngOnChanges","ngOnChangesSetInput","rememberChangeHistoryAndInvokeOnChangesHook","ngInherit","simpleChangesStore","getSimpleChangesStore","instance","privateName","setSimpleChangesStore","previousChange","SIMPLE_CHANGES_STORE","store","SVG_NAMESPACE","MATH_ML_NAMESPACE","MONKEY_PATCH_KEY_NAME","DOCUMENT","setDocument","document","getDocument","RendererStyleFlags3","isProceduralRenderer","renderer","listen","ɵ0$2","hostElement","rendererType","domRendererFactory3","createRenderer","unusedValueExportToPlacateAjd$2","unwrapRNode","unwrapLView","unwrapLContainer","getNativeByIndex","getNativeByTNode","getNativeByTNodeOrNull","getTNode","load","view","getComponentLViewByIndex","nodeIndex","hostView","slotValue","readPatchedData","readPatchedLView","isCreationMode","viewAttachedToChangeDetector","viewAttachedToContainer","getConstant","resetPreOrderHookFlags","updateTransplantedViewCount","lContainer","amount","viewOrContainer","instructionState","lFrame","createLFrame","bindingsEnabled","checkNoChangesMode","getElementDepthCount","elementDepthCount","increaseElementDepthCount","decreaseElementDepthCount","getBindingsEnabled","ɵɵenableBindings","ɵɵdisableBindings","getLView","getTView","ɵɵrestoreView","viewToRestore","contextLView","getPreviousOrParentTNode","previousOrParentTNode","setPreviousOrParentTNode","getIsParent","setIsNotParent","setIsParent","getContextLView","getCheckNoChangesMode","setCheckNoChangesMode","mode","getBindingRoot","bindingRootIndex","bindingStartIndex","getBindingIndex","bindingIndex","setBindingIndex","nextBindingIndex","incrementBindingIndex","setBindingRootForHostBindings","currentDirectiveIndex","setCurrentDirectiveIndex","getCurrentDirectiveIndex","getCurrentDirectiveDef","tData","getCurrentQueryIndex","currentQueryIndex","setCurrentQueryIndex","enterDI","newView","newLFrame","allocLFrame","enterView","selectedIndex","currentNamespace","currentLFrame","childLFrame","child","leaveViewLight","oldLFrame","leaveDI","leaveView","nextContextImpl","level","walkUpViews","nestingLevel","currentView","getSelectedIndex","setSelectedIndex","getSelectedTNode","ɵɵnamespaceSVG","ɵɵnamespaceMathML","ɵɵnamespaceHTML","namespaceHTMLInternal","getNamespace","registerPreOrderHooks","directiveIndex","directiveDef","ngOnInit","ngDoCheck","wrappedOnChanges","preOrderHooks","preOrderCheckHooks","registerPostOrderHooks","directiveStart","directiveEnd","lifecycleHooks","ngAfterContentInit","ngAfterContentChecked","ngAfterViewInit","ngAfterViewChecked","contentHooks","contentCheckHooks","viewHooks","viewCheckHooks","destroyHooks","executeCheckHooks","hooks","callHooks","executeInitAndCheckHooks","initPhase","incrementInitPhaseFlags","currentNodeIndex","startIndex","nodeIndexLimit","lastNodeIndexFound","hook","isInitHook","callHook","directive","indexWithintInitPhase","TNODE","PARENT_INJECTOR","INJECTOR_BLOOM_PARENT_SIZE","NO_PARENT_INJECTOR","NodeInjectorFactory","isViewProvider","injectImplementation","resolving","canSeeViewProviders","injectImpl","isFactory","unusedValueExportToPlacateAjd$3","assertNodeType","assertNodeOfPossibleTypes","found","some","assertNodeNotOfTypes","setUpAttributes","native","attrs","isProc","namespaceURI","attrName","attrVal","setAttribute","setAttributeNS","isAnimationProp","setProperty","isNameOnlyAttributeMarker","marker","charCodeAt","mergeHostAttrs","src","srcMarker","mergeHostAttribute","key1","key2","markerInsertPosition","dstValue","hasParentInjector","parentLocation","getParentInjectorIndex","getParentInjectorViewOffset","getParentInjectorView","startView","viewOffset","parentView","renderStringify","stringifyForError","ɵ0$3","requestAnimationFrame","setTimeout","bind","defaultScheduler","ɵɵresolveWindow","element","ownerDocument","defaultView","ɵɵresolveDocument","ɵɵresolveBody","body","INTERPOLATION_DELIMITER","maybeUnwrapFn","Function","includeViewProviders","setIncludeViewProviders","v","oldValue","BLOOM_SIZE","BLOOM_MASK","nextNgElementId","bloomAdd","injectorIndex","bloomBit","mask","b7","b6","b5","getOrCreateNodeInjectorForNode","existingInjectorIndex","getInjectorIndex","insertBloom","blueprint","parentLoc","getParentInjectorLocation","parentIndex","parentLView","parentData","footer","hostTNode","diPublicInInjector","injectAttributeImpl","attrNameToInject","classes","attrsLength","getOrCreateInjectable","bloomHash","bloomHashBitOrFactory","NodeInjector","previousTView","hostTElementNode","shouldSearchParent","bloomHasToken","searchTokensOnInjector","NOT_FOUND","moduleInjector","previousInjectImplementation","currentTView","canAccessViewProviders","isHostSpecialCase","injectableIdx","locateDirectiveOrProvider","getNodeInjectable","nodeProviderIndexes","providerIndexes","tInjectables","injectablesStart","directivesStart","cptViewProvidersCount","startingIndex","endIndex","providerTokenOrDef","dirDef","previousIncludeViewProviders","tokenId","injectorView","isFirstHostTNode","_tNode","_lView","ɵɵgetFactoryOf","injectorDef","ɵɵgetInheritedFactory","ownConstructor","ownFactory","objectPrototype","getPrototypeOf","t","ERROR_TYPE","ERROR_DEBUG_CONTEXT","ERROR_ORIGINAL_ERROR","ERROR_LOGGER","wrappedError","originalError","getType","getDebugContext","getOriginalError","getErrorLogger","defaultErrorLogger","ErrorHandler","_console","_findOriginalError","_findContext","errorLogger","CUSTOM_ELEMENTS_SCHEMA","NO_ERRORS_SCHEMA","SafeValueImpl","changingThisBreaksApplicationSecurity","SafeHtmlImpl","SafeStyleImpl","SafeScriptImpl","SafeUrlImpl","SafeResourceUrlImpl","unwrapSafeValue","allowSanitizationBypassAndThrow","actualType","getSanitizationBypassType","bypassSanitizationTrustHtml","trustedHtml","bypassSanitizationTrustStyle","trustedStyle","bypassSanitizationTrustScript","trustedScript","bypassSanitizationTrustUrl","trustedUrl","bypassSanitizationTrustResourceUrl","trustedResourceUrl","_devMode","_runModeLocked","isDevMode","enableProdMode","getInertBodyHelper","defaultDoc","isDOMParserAvailable","DOMParserHelper","InertDocumentHelper","html","DOMParser","parseFromString","removeChild","firstChild","_a","inertDocument","implementation","createHTMLDocument","inertHtml","createElement","appendChild","inertBodyElement","templateEl","innerHTML","inertBody","documentMode","stripCustomNsAttrs","el","elAttrs","attributes","attrib","removeAttribute","childNode","nodeType","ELEMENT_NODE","nextSibling","SAFE_URL_PATTERN","SAFE_SRCSET_PATTERN","DATA_URL_PATTERN","_sanitizeUrl","url","sanitizeSrcset","srcset","split","trim","tagSet","tags","merge","sets","s","VOID_ELEMENTS","OPTIONAL_END_TAG_BLOCK_ELEMENTS","OPTIONAL_END_TAG_INLINE_ELEMENTS","OPTIONAL_END_TAG_ELEMENTS","BLOCK_ELEMENTS","INLINE_ELEMENTS","VALID_ELEMENTS","URI_ATTRS","SRCSET_ATTRS","HTML_ATTRS","ARIA_ATTRS","VALID_ATTRS","SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS","SanitizingHtmlSerializer","sanitizedSomething","buf","traverseContent","startElement","TEXT_NODE","chars","nodeValue","endElement","next","checkClobberedElement","parentNode","tagName","nodeName","toLowerCase","elAttr","lower","encodeEntities","nextNode","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","outerHTML","SURROGATE_PAIR_REGEXP","NON_ALPHANUMERIC_REGEXP","hi","low","inertBodyHelper","_sanitizeHtml","unsafeHtmlInput","unsafeHtml","getInertBodyElement","mXSSAttempts","parsedHtml","sanitizer","safeHtml","sanitizeChildren","getTemplateContent","isTemplateElement","content","SecurityContext","ɵɵsanitizeHtml","getSanitizer","sanitize","HTML","ɵɵsanitizeStyle","unsafeStyle","STYLE","ɵɵsanitizeUrl","unsafeUrl","URL","ɵɵsanitizeResourceUrl","unsafeResourceUrl","RESOURCE_URL","ɵɵsanitizeScript","unsafeScript","SCRIPT","getUrlSanitizer","tag","prop","ɵɵsanitizeUrlOrResourceUrl","validateAgainstEventProperties","startsWith","validateAgainstEventAttributes","createNamedArrayType","FunctionConstructor","normalizeDebugBindingName","camelCaseToDashCase","CAMEL_CASE_REGEXP","m","normalizeDebugBindingValue","getLContext","mpValue","component","isComponentInstance","findViaComponent","isDirectiveInstance","findViaDirective","getDirectivesAtNodeIndex","findViaNativeElement","existingCtx","createLContext","attachPatchData","rElement","parentContext","localRefs","getComponentViewByInstance","componentInstance","traverseNextElement","componentIndices","components","elementComponentIndex","componentView","rootComponentView","rootComponent","directiveInstance","directiveIndexStart","directiveIndexEnd","includeComponents","directiveStartIndex","directiveEndIndex","getComponentAtNodeIndex","discoverLocalRefs","localNames","result","localIndex","throwCyclicDependencyError","throwMultipleComponentError","throwMixedMultiProviderError","throwInvalidProviderError","ngModuleType","provider","ngModuleDetail","providerDetail","throwErrorIfNoChangesMode","creationMode","currValue","field","constructDetailsForInterpolation","rootIndex","expressionIndex","changedValue","prefix","chunks","newValue","slotIdx","getExpressionChangedErrorDetails","metadata","idx","matches","RegExp","TNodeTypeAsString","unusedValueExportToPlacateAjd$4","hasClassInput","hasStyleInput","unusedValueExportToPlacateAjd$5","classIndexOf","className","classToSearch","foundIndex","unusedValueToPlacateAjd","NG_TEMPLATE_SELECTOR","isCssClassMatching","cssClassToMatch","isProjectionMode","isInlineTemplate","hasTagAndTypeMatch","currentSelector","tagNameToCompare","isNodeMatchingSelector","selector","nodeAttrs","nameOnlyMarkerIdx","getNameOnlyMarkerIndex","skipToNextSelector","isPositive","selectorAttrValue","attrIndexInNode","findAttrIndexInNode","nodeAttrValue","compareAgainstClassName","bindingsMode","maybeAttrName","matchTemplateAttribute","isNodeMatchingSelectorList","getProjectAsAttrValue","ngProjectAsAttrIdx","nodeAttr","attr","isSelectorInSelectorList","selectorListLoop","currentSelectorInList","maybeWrapInNotSelector","isNegativeMode","chunk","stringifyCSSSelector","currentChunk","valueOrMarker","attrValue","stringifyCSSSelectorList","selectorList","extractAttrsAndClassesFromSelector","NO_CHANGE","__brand__","getLViewParent","getRootView","componentOrLView","getRootContext","viewOrComponent","rootView","getFirstLContainer","getNearestLContainer","getNextLContainer","container","ɵɵadvance","delta","selectIndexInternal","hooksInitPhaseCompleted","toTStylingRange","prev","getTStylingRangePrev","tStylingRange","getTStylingRangePrevDuplicate","setTStylingRangePrev","setTStylingRangePrevDuplicate","getTStylingRangeNext","setTStylingRangeNext","getTStylingRangeNextDuplicate","setTStylingRangeNextDuplicate","getTStylingRangeTail","attachDebugObject","debug","enumerable","attachDebugGetter","debugGetter","NG_DEV_MODE","LVIEW_COMPONENT_CACHE","LVIEW_EMBEDDED_CACHE","LVIEW_ROOT","cloneToLViewFromTViewBlueprint","debugTView","getLViewToClone","concat","Map","componentArray","nameSuffix","set","embeddedArray","lastIndexOf","TViewConstructor","queries","expandoStartIndex","expandoInstructions","staticViewQueries","staticContentQueries","cleanup","directiveRegistry","pipeRegistry","incompleteFirstPass","_decls","_vars","processTNodeChildren","TNode","directiveStylingLast","propertyBindings","mergedAttrs","initialInputs","tViews","projectionNext","projection","stylesWithoutHost","residualStyles","classesWithoutHost","residualClasses","classBindings","styleBindings","type_","toDebugStyleBinding","TNodeDebug","isClassBased","bindings","range","isTemplate","cursor","itemKey","itemRange","prevDuplicate","nextDuplicate","nextIndex","prevIndex","template_","TViewData","TVIEWDATA_EMPTY","cloneToTViewData","LViewBlueprint","MatchesArray","TViewComponents","TNodeLocalNames","TNodeInitialInputs","TNodeInitialData","LCleanup","TCleanup","attachLViewDebug","LViewDebug","attachLContainerDebug","LContainerDebug","toDebug","toHtml","includeChildren","textContent","COMMENT_NODE","_raw_lView","__raw__flags__","initPhaseState","firstViewPass","checkAlways","dirty","attached","destroyed","isRoot","indexWithinInitPhase","nodes","toDebugNodes","toLViewRange","childViews","childHead","l","debugNodes","tNodeCursor","buildDebugNode","rawValue","children","_raw_lContainer","readLViewValue","ɵ0$4","Promise","resolve","_CLEAN_PROMISE","setHostBindingsByExecutingExpandoInstructions","currentElementIndex","instruction","providerCount","hostCtx","refreshContentQueries","queryStartIdx","directiveDefIdx","refreshChildComponents","hostLView","refreshComponent","renderChildComponents","renderComponent","elementCreate","namespace","createElementNS","createLView","host","tHostNode","rendererFactory","getOrCreateTNode","adjustedIndex","createTNodeAtIndex","parentInSameView","tParentNode","createTNode","assignTViewNodeToLView","allocExpando","numSlotsToAlloc","renderView","executeViewQueryFn","templateFn","executeTemplate","refreshView","markTransplantedViewsForRefresh","refreshEmbeddedViews","renderComponentOrTemplate","normalExecutionPath","creationModeIsActive","begin","rf","prevSelectedIndex","executeContentQueries","createDirectivesInstances","instantiateAllDirectives","invokeDirectivesHostBindings","saveResolvedLocalsInData","viewData","localRefExtractor","getOrCreateTComponentView","createTView","viewIndex","constsOrFactory","initialViewLength","createViewBlueprint","fill","seal","createError","assertHostNodeExists","elementOrSelector","locateHostElement","preserveContent","ShadowDom","selectRootElement","querySelector","storeCleanupWithContext","cleanupFn","lCleanup","getLCleanup","getTViewCleanup","tParent","generatePropertyAliases","inputAliasMap","propStore","internalName","initializeInputAndOutputAliases","defs","tNodeAttrs","inputsFromAttrs","inputsStore","outputsStore","directiveInputs","generateInitialInputs","mapPropName","elementPropertyInternal","nativeOnly","inputData","dataValue","setInputsForProperty","markDirtyIfOnPush","setNgReflectProperties","validateProperty","logUnknownPropertyError","matchingSchemas","childComponentLView","setNgReflectProperty","debugValue","setValue","schema","instantiateRootComponent","rootTNode","generateExpandoInstructionBlock","baseResolveDirective","resolveDirectives","hasDirectives","findDirectiveDefMatches","exportsMap","totalDirectiveHostVars","initTNodeFlags","preOrderHooksFound","preOrderCheckHooksFound","saveNameToExportMap","lifeCycleHooks","addHostBindingsToExpandoInstructions","growHostVarsSpace","cacheMatchingLocalNames","expando","isComponent","addComponentLogic","setInputsFromAttrs","elementIndex","dirIndex","invokeHostBindingsInCreationMode","directiveCount","providerStartIndex","registry","markAsComponentHost","numberOfDirectives","directiveFactory","nodeInjectorFactory","addToViewTree","elementAttributeInternal","strValue","initialInputData","nativeElement","inputsToStore","LContainerArray","createLContainer","hostNative","embeddedLView","embeddedTView","movedViews","movedLView","insertionLContainer","componentHostIdx","refreshContainsDirtyView","componentTView","syncViewWithBlueprint","lViewOrLContainer","markViewDirty","scheduleTick","rootContext","nothingScheduled","clean","r","scheduler","tickRootContext","playerHandler","flushPlayers","detectChangesInternal","handleError","detectChangesInRootView","checkNoChangesInternal","checkNoChangesInRootView","viewQueryFn","storePropertyBindingMetadata","propertyName","propBindingIdxs","bindingMetadata","interpolationParts","CLEAN_PROMISE","loadComponentRenderer","currentDef","errorHandler","textBindingInternal","unusedValueToPlacateAjd$1","getLContainer","embeddedView","getContainerRenderParent","tViewNode","nativeParentNode","applyToElementOrContainer","action","lNodeToHandle","beforeNode","rNode","nativeAppendChild","nativeInsertBefore","nativeRemoveNode","destroyNode","applyContainer","createTextNode","createText","addRemoveViewFromContainer","insertMode","renderParent","applyView","renderDetachView","destroyViewTree","cleanUpView","firstView","getParentState","insertView","indexInContainer","containerLength","declarationLContainer","trackMovedView","lQueries","declarationContainer","insertedLContainer","insertedComponentLView","declaredComponentLView","detachMovedView","declarationViewIndex","detachView","removeIndex","viewToDetach","removedLView","destroyLView","executeOnDestroys","removeListeners","destroy","tCleanup","idxOrTargetGetter","listener","useCaptureOrSubIdx","removeEventListener","unsubscribe","toCall","getRenderParent","parentTNode","isIcuCase","Native","insertBefore","nativeAppendOrInsertBefore","nativeRemoveChild","isHostElement","nativeNextSibling","getNativeAnchorNode","getBeforeNodeForView","childEl","childTNode","anchorNode","getFirstNativeNode","tNodeType","elIcuContainerChild","rNodeOrLContainer","componentHost","firstProjectedTNode","viewIndexInContainer","nextViewIndex","firstTNodeOfView","nativeParent","applyNodes","isProjection","rawSlotValue","applyProjectionRecursive","viewRootTNode","applyProjection","tProjectionNode","componentLView","componentNode","nodeToProjectOrRNodes","nodeToProject","projectedComponentLView","anchor","applyStyling","isProcedural","removeClass","classList","remove","addClass","add","removeStyle","style","removeProperty","setStyle","writeDirectStyle","cssText","writeDirectClass","getParentInjectorTNode","startTNode","ViewRef","_cdRefInjectingView","_appRef","_viewContainerRef","detach","callback","vcRef","appRef","hostTView","collectNativeNodes","RootViewRef","_view","lNode","lViewInAContainer","lViewFirstChildTNode","nodesInSlot","injectElementRef","ElementRefToken","createElementRef","R3ElementRef","R3TemplateRef","injectTemplateRef","TemplateRefToken","createTemplateRef","_declarationView","_declarationTContainer","elementRef","declarationViewLQueries","createEmbeddedView","R3ViewContainerRef","injectViewContainerRef","ViewContainerRefToken","previousTNode","createContainerRef","_lContainer","_hostTNode","_hostView","templateRef","viewRef","insert","componentFactory","projectableNodes","ngModuleRef","contextInjector","parentInjector","ngModule","componentRef","allocateContainerIfNeeded","prevIdx","prevLContainer","prevVCRef","adjustedIdx","_adjustIndex","attachToViewContainerRef","newIndex","viewRefsArr","detachedView","wasDetached","commentNode","createComment","parentOfHostNative","injectChangeDetectorRef","isPipe","createViewRef","isComponentView","hostComponentView","getOrCreateRenderer2","injectRenderer2","nodeAtIndex","ChangeDetectorRef","SWITCH_CHANGE_DETECTOR_REF_FACTORY","SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__","SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__","ɵ0$5","Type","isType","ES5_DELEGATE_CTOR","ES2015_INHERITED_CLASS","ES2015_INHERITED_CLASS_WITH_CTOR","ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR","isDelegateCtor","typeStr","test","ReflectionCapabilities","reflect","_reflect","paramTypes","paramAnnotations","parentCtor","tsickleCtorParams","ctorParameters","ctorParam","convertTsickleDecoratorIntoMetadata","decorators","_zipTypesAndAnnotations","getOwnMetadata","getParentCtor","_ownParameters","typeOrFunc","ownAnnotations","_ownAnnotations","parentAnnotations","propMetadata","propDecorators","keys","parentPropMetadata","ownPropMetadata","_ownPropMetadata","lcProperty","functionBody","moduleUrl","members","runtime","enumIdentifier","decoratorInvocations","decoratorInvocation","decoratorType","annotationArgs","parentProto","getReflect","reflectDependencies","convertDependencies","deps","compiler","dep","reflectDependency","optional","resolved","Token","skipSelf","setTokenAndResolvedType","param","proto","Invalid","compileInjectable","srcMeta","ngFactoryDef","getInjectableMetadata","compileFactory","typeArgumentCount","injectFn","Injectable","configurable","ɵ0$6","USE_VALUE$1","isUseClassProvider","useClass","isUseValueProvider","isUseFactoryProvider","useFactory","isUseExistingProvider","useExisting","compilerMeta","userDeps","ɵ0$7","USE_VALUE$2","EMPTY_ARRAY$1","convertInjectableProviderToFactory","reflectionCapabilities","valueProvider","existingProvider","factoryProvider","classProvider","ɵ0$8","SWITCH_COMPILE_INJECTABLE","render2CompileInjectable","injectableType","SWITCH_COMPILE_INJECTABLE__POST_R3__","SWITCH_COMPILE_INJECTABLE__PRE_R3__","INJECTOR_SCOPE","NOT_YET","CIRCULAR","EMPTY_ARRAY$2","NULL_INJECTOR","getNullInjector","createInjector","defType","additionalProviders","createInjectorWithoutInjectorInstances","_resolveInjectorDefTypes","R3Injector","records","injectorDefTypes","Set","_destroyed","dedupStack","processProvider","processInjectorType","makeRecord","record","assertNotDestroyed","service","clear","previousInjector","couldBeInjectableType","injectableDefInScope","injectableDefOrInjectorDefFactory","hydrate","nextInjector","path","tokens","defOrWrappedDef","parents","defName","isDuplicate","importTypesWithProviders","imported","defProviders","injectorType","isTypeProvider","providerToRecord","multi","multiRecord","existing","hasOnDestroy","has","getUndecoratedInjectableFactory","paramLength","inheritedInjectableDef","isValueProvider","providerToFactory","unwrappedProvider","isFactoryProvider","isExistingProvider","classRef","hasDeps","isClassProvider","INJECTOR_IMPL__PRE_R3__","StaticInjector","INJECTOR_IMPL__POST_R3__","INJECTOR_IMPL","Injector","NULL","IDENT","ɵ0$9","EMPTY","CIRCULAR$1","MULTI_PROVIDER_FN","arguments","ɵ1$1","NO_NEW_LINE$1","_records","useNew","recursivelyProcessProviders","resolveProvider","lastInjector","tryResolveToken","computeDeps","staticError","multiProviderMixError","resolvedProvider","multiProvider","resolveToken","depRecords","depRecord","childRecord","providerDeps","findFirstClosedCycle","constructResolvingPath","reversed","reverse","tokenStrs","k","injectionError","constructResolvingMessage","errMsg","addKey","injectors","noProviderError","first","cyclicDependencyError","instantiationError","originalException","originalStack","invalidProviderError","noAnnotationError","params","signature","ii","parameter","outOfBoundsError","mixingMultiProvidersWithRegularProvidersError","provider1","provider2","ReflectiveKey","displayName","_globalKeyRegistry","numberOfKeys","KeyRegistry","_allKeys","newKey","Reflector","caps","hasLifecycleHook","getter","setter","method","importUri","resourceUri","resolveIdentifier","identifier","resolveEnum","reflector","ReflectiveDependency","visibility","_EMPTY_LIST","ResolvedReflectiveProvider_","resolvedFactories","resolvedFactory","ResolvedReflectiveFactory","dependencies","resolveReflectiveFactory","factoryFn","resolvedDeps","_dependenciesFor","aliasInstance","fromKey","constructDependencies","resolveReflectiveProvider","resolveReflectiveProviders","normalized","_normalizeProviders","resolvedProviderMap","mergeResolvedReflectiveProviders","from","normalizedProvidersMap","b","_extractToken","p","_createDependency","paramMetadata","UNDEFINED","ReflectiveInjector","ResolvedReflectiveProviders","fromResolvedProviders","ReflectiveInjector_","_providers","_parent","_constructionCounter","len","keyIds","objs","_getByKey","createChildFromResolved","inj","instantiateResolved","_instantiateProvider","_getMaxNumberOfObjects","_instantiate","_getByReflectiveDependency","stack","INJECTOR_KEY","_getByKeySelf","_getByKeyDefault","keyId","_new","_getObjByKeyId","_throwOrNull","inj_","_mapProviders","getProviderAtIndex","ANALYZE_FOR_ENTRY_COMPONENTS","Query","ɵ0$a","assign","isViewQuery","descendants","ContentChildren","ɵ1$2","ContentChild","ɵ2","ViewChildren","ɵ3","ViewChild","resolveComponentResources","resourceResolver","componentResolved","urlMap","cachedResourceResolve","promise","resp","then","unwrapResponse","componentResourceResolutionQueue","promises","templateUrl","styleUrls","styleOffset","styleUrl","fullyResolved","all","componentDefResolved","clearResolutionOfComponentResourcesQueue","componentDefPendingResolution","maybeQueueResolutionOfComponentResources","componentNeedsResolution","isComponentDefPendingResolution","old","restoreComponentResolutionQueue","queue","isComponentResourceResolutionQueueEmpty","response","delete","computeStaticStyling","writeToHost","styleValue","_symbolIterator","getSymbolIterator","Symbol","iterator","getOwnPropertyNames","devModeEqual","a","isListLikeIterableA","isListLikeIterable","isListLikeIterableB","areIterablesEqual","isAObject","isBObject","is","WrappedValue","wrapped","isWrapped","isJsObject","comparator","iterator1","iterator2","item1","item2","done","iterateListLike","o","updateBinding","getBinding","bindingUpdated","oldValueToCompare","details","bindingUpdated2","exp1","exp2","different","bindingUpdated3","exp3","bindingUpdated4","exp4","ɵɵattribute","interpolationV","isBindingUpdated","interpolation1","v0","suffix","interpolation2","i0","v1","interpolation3","i1","v2","interpolation4","i2","v3","interpolation5","i3","v4","interpolation6","i4","v5","interpolation7","i5","v6","interpolation8","i6","v7","ɵɵattributeInterpolate1","interpolatedValue","ɵɵattributeInterpolate2","ɵɵattributeInterpolate3","ɵɵattributeInterpolate4","ɵɵattributeInterpolate5","ɵɵattributeInterpolate6","ɵɵattributeInterpolate7","ɵɵattributeInterpolate8","ɵɵattributeInterpolateV","interpolated","interpolationInBetween","detectChanges","markDirty","tick","templateFirstCreatePass","attrsIndex","localRefsIndex","tViewConsts","embeddedTViewNode","ɵɵtemplate","comment","ɵɵreference","ɵɵdirectiveInject","ɵɵinjectAttribute","ɵɵinvalidFactory","ɵɵproperty","setDirectiveInputsWhichShadowsStyling","property","elementStartFirstCreatePass","logUnknownElementError","elementStart","ɵɵelementStart","ɵɵelementEnd","elementEnd","ɵɵelement","isUnknown","HTMLUnknownElement","customElements","elementContainerStartFirstCreatePass","ɵɵelementContainerStart","ɵɵelementContainerEnd","ɵɵelementContainer","ɵɵgetCurrentView","isPromise","isObservable","subscribe","ɵɵlistener","eventName","listenerFn","useCapture","eventTargetResolver","listenerInternal","ɵɵsyntheticHostListener","findExistingListener","tNodeIdx","cleanupEventName","listenerIdxInLCleanup","isTNodeDirectiveHost","processOutputs","lCleanupIndex","existingListener","lastListenerFn","__ngLastListenerFn__","__ngNextListenerFn__","wrapListener","addEventListener","propsLength","minifiedName","output","subscription","executeListenerWithErrorHandling","wrapWithPreventDefault","wrapListenerIn_markDirtyAndPreventDefault","nextListenerFn","preventDefault","returnValue","ɵɵnextContext","matchingProjectionSlotIndex","projectionSlots","wildcardNgContentIndex","ngProjectAsAttrVal","ɵɵprojectionDef","numProjectionSlots","projectionHeads","tails","componentChild","slotIndex","delayProjection","setDelayProjection","ɵɵprojection","selectorIndex","ɵɵpropertyInterpolate","ɵɵpropertyInterpolate1","ɵɵpropertyInterpolate2","ɵɵpropertyInterpolate3","ɵɵpropertyInterpolate4","ɵɵpropertyInterpolate5","ɵɵpropertyInterpolate6","ɵɵpropertyInterpolate7","ɵɵpropertyInterpolate8","ɵɵpropertyInterpolateV","EMPTY_OBJ$1","EMPTY_ARRAY$3","__unused_const_as_closure_does_not_like_standalone_comment_blocks__","insertTStylingBinding","tStylingKeyWithStatic","isHostBinding","isClassBinding","tBindings","tmplHead","tmplTail","isKeyDuplicateOfStatic","tStylingKey","staticKeyValueArray","hasTemplateBindings","previousNode","markDuplicates","markDuplicateOfResidualStyling","residual","isPrevDir","tStylingAtIndex","isMap","foundDuplicate","tStylingValueAtCursor","tStyleRangeAtCursor","isStylingMatch","tStylingKeyCursor","parserState","textEnd","keyEnd","valueEnd","getLastParsedKey","getLastParsedValue","parseClassName","resetParserState","parseClassNameNext","consumeWhitespace","consumeClassToken","parseStyle","parseStyleNext","consumeStyleKey","consumeSeparator","consumeStyleValue","ch","separator","malformedStyleError","fromCharCode","ch1","ch2","ch3","lastChIndex","consumeQuotedText","quoteCharCode","expecting","ɵɵstyleProp","checkStylingProperty","ɵɵclassProp","ɵɵstyleMap","checkStylingMap","styleKeyValueArraySet","styleStringParser","ɵɵclassMap","classStringParser","stylingFirstUpdatePass","updateStyling","normalizeSuffix","stringParser","hasStylingInputShadow","isInHostBindings","staticPrefix","endsWith","updateStylingMap","toStylingKeyValueArray","isHostBindings","wrapInStaticStylingKey","stylingKey","hostDirectiveDef","isFirstStylingInstructionInTemplate","collectStylingFromDirectives","collectStylingFromTAttrs","isFirstStylingInstructionInHostBinding","templateStylingKey","getTemplateHeadTStylingKey","setTemplateHeadTStylingKey","collectResidual","currentDirective","desiredMarker","currentMarker","styleKeyValueArray","unwrappedValue","oldKeyValueArray","newKeyValueArray","oldIndex","oldKey","setKey","tRange","higherPriorityValue","findStylingValue","isStylingValuePresent","isPrevDirection","rawKey","containsStatics","isStylingMap","valueAtLViewIndex","ɵɵtext","textNative","ɵɵtextInterpolate","ɵɵtextInterpolate1","ɵɵtextInterpolate2","ɵɵtextInterpolate3","ɵɵtextInterpolate4","ɵɵtextInterpolate5","ɵɵtextInterpolate6","ɵɵtextInterpolate7","ɵɵtextInterpolate8","ɵɵtextInterpolateV","ɵɵclassMapInterpolate1","ɵɵclassMapInterpolate2","ɵɵclassMapInterpolate3","ɵɵclassMapInterpolate4","ɵɵclassMapInterpolate5","ɵɵclassMapInterpolate6","ɵɵclassMapInterpolate7","ɵɵclassMapInterpolate8","ɵɵclassMapInterpolateV","ɵɵstyleMapInterpolate1","ɵɵstyleMapInterpolate2","ɵɵstyleMapInterpolate3","ɵɵstyleMapInterpolate4","ɵɵstyleMapInterpolate5","ɵɵstyleMapInterpolate6","ɵɵstyleMapInterpolate7","ɵɵstyleMapInterpolate8","ɵɵstyleMapInterpolateV","ɵɵstylePropInterpolate1","valueSuffix","ɵɵstylePropInterpolate2","ɵɵstylePropInterpolate3","ɵɵstylePropInterpolate4","ɵɵstylePropInterpolate5","ɵɵstylePropInterpolate6","ɵɵstylePropInterpolate7","ɵɵstylePropInterpolate8","ɵɵstylePropInterpolateV","ɵɵhostProperty","ɵɵsyntheticHostProperty","getComponent","assertDomElement","loadLContext","getContext","getOwningComponent","elementOrDir","getRootComponents","getInjector","getInjectionTokens","providerTokens","isDirectiveDefHack","getDirectives","throwOnNotFound","getLocalRefs","getHostElement","componentOrDirective","getRenderedText","loadLContextFromNode","getListeners","lContext","listeners","firstParam","secondParam","listenerElement","useCaptureOrIndx","sort","sortListeners","getDebugNode","debugNode","valueInLView","getComponentLView","nodeIndx","Element","applyChanges","GLOBAL_PUBLISH_EXPANDO_KEY","_published","publishDefaultGlobalUtils","publishGlobalUtil","COMPILED","w","ɵ0$b","NULL_INJECTOR$1","renderComponent$1","componentType","componentDef","componentTag","hostRenderer","hostRNode","rootFlags","createRootContext","rootTView","createRootComponentView","createRootComponent","hostFeatures","viewRenderer","rootLView","LifecycleHooksFeature","whenRendered","getSuperType","ɵɵInheritDefinitionFeature","superType","shouldInheritFields","inheritanceChain","superDef","writeableDef","maybeUnwrapEmpty","superHostBindings","inheritHostBindings","superViewQuery","superContentQueries","inheritViewQuery","inheritContentQueries","animation","defData","mergeHostAttrsAcrossInheritance","prevViewQuery","ctx","prevContentQueries","prevHostBindings","COPY_DIRECTIVE_FIELDS","COPY_COMPONENT_FIELDS","ɵɵCopyDefinitionFeature","defAny","viewProviders","resolveProvider$1","lInjectablesBlueprint","providerFactory","beginIndex","existingFactoryIndex","registerDestroyHooksIfSupported","existingProvidersFactoryIndex","existingViewProvidersFactoryIndex","doesProvidersFactoryExist","doesViewProvidersFactoryExist","multiFactory","multiViewProvidersFactoryResolver","multiProvidersFactoryResolver","indexInFactory","multiFactoryAdd","componentProviders","contextIndex","providerIsTypeProvider","existingCallbacksIndex","isComponentProvider","lData","multiResolve","factories","componentCount","multiProviders","f","ɵɵProvidersFeature","processProvidersFn","ComponentRef","ComponentFactory","noComponentFactoryError","ERROR_COMPONENT","getComponent$1","_NullComponentFactoryResolver","ComponentFactoryResolver","CodegenComponentFactoryResolver","_ngModule","_factories","resolveComponentFactory","ComponentFactoryBoundToModule","rootSelectorOrNode","noop","ElementRef","SWITCH_ELEMENT_REF_FACTORY","SWITCH_ELEMENT_REF_FACTORY__POST_R3__","SWITCH_ELEMENT_REF_FACTORY__PRE_R3__","Renderer2Interceptor","RendererFactory2","RendererStyleFlags2","Renderer2","SWITCH_RENDERER2_FACTORY","SWITCH_RENDERER2_FACTORY__POST_R3__","SWITCH_RENDERER2_FACTORY__PRE_R3__","Sanitizer","Version","full","major","minor","patch","VERSION","DefaultIterableDifferFactory","trackByFn","DefaultIterableDiffer","trackByIdentity","ɵ0$c","_linkedRecords","_unlinkedRecords","_previousItHead","_itHead","_itTail","_additionsHead","_additionsTail","_movesHead","_movesTail","_removalsHead","_removalsTail","_identityChangesHead","_identityChangesTail","_trackByFn","_next","nextIt","nextRemove","addRemoveOffset","moveOffsets","currentIndex","getPreviousIndex","adjPreviousIndex","_nextRemoved","previousIndex","localMovePreviousIndex","localCurrentIndex","offset","_nextPrevious","_nextAdded","_nextMoved","_nextIdentityChange","collection","check","_reset","mayBeDirty","itemTrackBy","trackById","_mismatch","_verifyReinsertion","_addIdentityChange","_truncate","isDirty","nextRecord","previousRecord","_prev","_remove","_moveAfter","_reinsertAfter","_addAfter","IterableChangeRecord_","reinsertRecord","_addToMoves","_addToRemovals","_unlink","prevRecord","_prevRemoved","_insertAfter","_DuplicateMap","put","toIndex","_prevDup","_nextDup","_DuplicateItemRecordList","_head","_tail","atOrAfterIndex","duplicates","recordList","moveOffset","DefaultKeyValueDifferFactory","DefaultKeyValueDiffer","_mapHead","_appendAfter","_previousMapHead","_changesHead","_changesTail","_nextChanged","_forEach","_maybeAddToChanges","_getOrCreateRecordForKey","_insertBeforeOrAppend","KeyValueChangeRecord_","_addToAdditions","_addToChanges","IterableDiffers","iterable","find","supports","getTypeNameForDebugging","copied","KeyValueDiffers","kv","keyValDiff","iterableDiff","defaultIterableDiffers","defaultKeyValueDiffers","TemplateRef","SWITCH_TEMPLATE_REF_FACTORY","SWITCH_TEMPLATE_REF_FACTORY__POST_R3__","SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__","ViewContainerRef","SWITCH_VIEW_CONTAINER_REF_FACTORY","SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__","SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__","expressionChangedAfterItHasBeenCheckedError","isFirstCheck","viewDebugError","viewWrappedDebugError","err","_addDebugContext","logError","isViewDebugError","viewDestroyedError","shiftInitState","priorInitState","newInitState","state","initState","initIndex","shouldCallLifecycleInitHook","NodeData","asTextData","asElementData","asProviderData","asPureExpressionData","asQueryList","DebugContext","Services","setCurrentNode","createRootView","createComponentView","createNgModuleRef","overrideProvider","overrideComponentView","clearOverrides","checkAndUpdateView","checkNoChangesView","destroyView","resolveDep","createDebugContext","handleEvent","updateDirectives","updateRenderer","dirtyParentQueries","NOOP","_tokenKeyCache","tokenKey","unwrapValue","nodeIdx","bindingIdx","unwrap","globalBindingIdx","oldValues","UNDEFINED_RENDERER_TYPE_ID","EMPTY_RENDERER_TYPE_ID","createRendererType2","_renderCompCount$1","resolveRendererType2","isFilled","None","checkBinding","checkAndUpdateBinding","checkBindingNoChanges","bindingName","markParentViewsForCheck","currView","viewContainerParent","markParentViewsForCheckProjectedViews","endView","dispatchEvent","event","nodeDef","root","declaredViewContainer","parentNodeDef","viewParentEl","renderNode","renderElement","renderText","elementEventFullName","isEmbeddedView","filterQueryId","queryId","splitMatchedQueriesDsl","matchedQueriesDsl","matchedQueries","matchedQueryIds","references","valueType","splitDepsDsl","sourceName","getParentRenderElement","renderHost","componentRendererType","DEFINITION_CACHE","WeakMap","resolveDefinition","rootRenderNodes","renderNodes","visitRootRenderNodes","lastRenderRootNode","visitSiblingRenderNodes","visitRenderNode","childCount","visitProjectedRenderNodes","ngContentIndex","compView","hostElDef","projectedNodes","execRenderNodeAction","ngContent","rn","bindingFlags","embeddedViews","viewContainer","_embeddedViews","NS_PREFIX_RE","splitNamespace","calcBindingFlags","interpolate","valueCount","constAndInterp","_toStringWithNull","inlineInterpolate","c0","a1","c1","a2","c2","a3","c3","a4","c4","a5","c5","a6","c6","a7","c7","a8","c8","a9","c9","EMPTY_ARRAY$4","EMPTY_MAP","UNDEFINED_VALUE","InjectorRefTokenKey","INJECTORRefTokenKey","NgModuleRefTokenKey","moduleProvideDef","depDefs","moduleDef","providersByKey","modules","initNgModule","_def","provDef","_createProviderInstance","resolveNgModuleDep","depDef","providerDef","providerInstance","targetsModule","moduleTransitivelyPresent","injectable","_createClass","_callFactory","depValues","callNgModuleLifecycle","lifecycles","attachEmbeddedView","elementData","attachProjectedView","prevView","renderAttachEmbeddedView","vcElementData","dvcElementData","projectedViews","_projectedViews","markNodeAsProjectedTemplate","viewDef","nodeFlags","childFlags","detachEmbeddedView","renderDetachView$1","detachProjectedView","moveEmbeddedView","oldViewIndex","newViewIndex","prevRenderNode","EMPTY_CONTEXT","createComponentFactory","viewDefFactory","ComponentFactory_","getComponentViewDefinitionFactory","_inputs","_outputs","componentNodeIndex","componentProvider","ComponentRef_","ViewRef_","inputsArr","templateName","outputsArr","_viewRef","_component","_elDef","changeDetectorRef","Injector_","createViewContainerData","elDef","elData","ViewContainerRef_","_data","ref","viewRef_","createChangeDetectorRef","fs","disposables","createTemplateData","TemplateRef_","_parentView","createInjector$1","allowPrivateServices","moduleType","bootstrapComponents","NgModuleRef_","_moduleType","_bootstrapComponents","_destroyListeners","injectFlags","Renderer2TokenKey","ElementRefTokenKey","ViewContainerRefTokenKey","TemplateRefTokenKey","ChangeDetectorRefTokenKey","InjectorRefTokenKey$1","INJECTORRefTokenKey$1","checkIndex","nonMinifiedName","ns","securityContext","outputDefs","outputIndex","directChildFlags","childMatchedQueries","query","createProviderInstance","_createProviderInstance$1","createPipeInstance","createClass","createDirectiveInstance","outputObservable","eventHandlerClosure","checkAndUpdateDirectiveInline","v8","v9","providerData","changed","changes","bindLen","updateProp","checkAndUpdateDirectiveDynamic","callFactory","NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR","searchView","findCompView","cdView","allProviders","publicProviders","binding","callLifecycleHooksChildrenFirst","callProviderLifecycles","callElementProvidersLifecycles","ComponentFactoryResolver$1","ComponentFactory$1","toRefArray","nonMinified","minified","getNamespace$1","elementName","SCHEDULER","createChainedInjector","rootViewInjector","isBoundToModule","tElementNode","nodesforSlot","ComponentRef$1","componentFactoryResolver","injectComponentFactoryResolver","_rootLView","destroyCbs","u","plural","n","Math","floor","abs","localeEn","LOCALE_DATA","registerLocaleData","localeId","extraData","LocaleDataIndex","LocaleId","ExtraData","findLocaleData","locale","normalizedLocale","normalizeLocale","getLocaleData","parentLocale","getLocaleCurrencyCode","CurrencyCode","getLocalePluralCase","PluralCase","ng","common","locales","unregisterAllLocaleData","pluralMapping","getPluralCase","parseInt","DEFAULT_LOCALE_ID","USD_CURRENCY_CODE","LOCALE_ID","setLocaleId","getLocaleId","ngI18nClosureMode","goog","getMsg","getParentFromI18nMutateOpCode","mergedCode","getRefFromI18nMutateOpCode","getInstructionFromI18nMutateOpCode","ELEMENT_MARKER","COMMENT_MARKER","unusedValueExportToPlacateAjd$6","i18nIndexStack","i18nIndexStackPointer","popI18nIndex","pushI18nIndex","changeMask","shiftsCounter","setMaskBit","bit","applyI18n","tI18n","updateOpCodes","tIcus","update","icus","bindingsStartIndex","applyUpdateOpCodes","applyCreateOpCodes","rootindex","createOpCodes","currentTNode","visitedNodes","opCode","textRNode","textNodeIndex","createDynamicNodeAtIndex","destinationNodeIndex","destinationTNode","appendI18nNode","elementNodeIndex","commentValue","commentNodeIndex","commentRNode","tagNameValue","elementRNode","caseCreated","checkBit","skipCodes","sanitizeFn","applyIcuSwitchCase","applyIcuUpdateCase","tIcuIndex","tIcu","currentCaseLViewIndex","activeCaseIndex","tICuIndex","applyIcuSwitchCaseRemove","caseIndex","getCaseIndex","removeCodes","removeOpCode","nodeOrIcuIndex","removeNode","i18nEndFirstPass","lastCreatedNode","markAsDetached","removedPhTNode","removedPhRNode","icuExpression","bindingValue","cases","resolvedCase","i18nUpdateOpCodesToString","opcodes","parser","OpCodeParser","lines","consumeOpCode","consumeString","sanitizationFn","consumeFunction","consumeNumber","hasMore","statements","statement","consumeNumberOrString","opCodeText","i18nMutateOpCodesToString","lastRef","consumeNumberStringOrMarker","line","codes","BINDING_REGEXP","ICU_REGEXP","NESTED_ICU","ICU_BLOCK_REGEXP","i18nVarsCount","parentIndexStack","MARKER","SUBTEMPLATE_REGEXP","PH_REGEXP","NGSP_UNICODE_REGEXP","replaceNgsp","i18nStartFirstPass","subTemplateIndex","parentIndexPointer","previousTNodeIndex","icuExpressions","isRootTemplateMessage","allocNodeIndex","templateTranslation","getTranslationForTemplate","msgParts","phIndex","isElement","extractParts","icuNodeIndex","getBindingMask","icuStart","toMaskBit","mainBinding","hasBinding","generateBindingUpdateOpCodes","i18nAttributesFirstPass","previousElement","previousElementIndex","str","destinationNode","textParts","textValue","valueArr","exec","min","removeInnerTemplateTranslation","inTemplate","tagMatched","search","createCodes","updateCodes","childIcus","nestedIcus","icuIndex","icuCase","parseIcuCase","max","parseICUBlock","pattern","icuType","pos","blocks","wrapper","opCodes","parseNodes","prevPos","braceStack","results","braces","lastIndex","block","currentNode","nestedIcusToCreate","lowerAttrName","nestedIcuIndex","newLocal","nestedIcu","nestedIcuNodeIndex","nestTIcuIndex","ROOT_TEMPLATE_ID","PP_MULTI_VALUE_PLACEHOLDERS_REGEXP","PP_PLACEHOLDERS_REGEXP","PP_ICU_VARS_REGEXP","PP_ICU_PLACEHOLDERS_REGEXP","PP_ICUS_REGEXP","PP_CLOSE_TEMPLATE_REGEXP","PP_TEMPLATE_ID_REGEXP","i18nPostprocess","replacements","templateIdsStack","phs","tmpl","placeholders","placeholder","templateId","isCloseTemplateTag","currentTemplateId","_type","_idx","ɵɵi18nStart","messageIndex","ɵɵi18nEnd","ɵɵi18n","ɵɵi18nAttributes","ɵɵi18nExp","ɵɵi18nApply","ɵɵi18nPostprocess","setClassMetadata","clazz","parentPrototype","parentConstructor","registerModuleFactory","assertSameOrNotExisting","incoming","registerNgModuleType","clearModulesForTest","getRegisteredNgModuleType","NgModuleRef$1","ngLocaleIdDef","_r3Injector","NgModuleFactory$1","ɵɵpureFunction0","slotOffset","pureFn","thisArg","ɵɵpureFunction1","exp","pureFunction1Internal","ɵɵpureFunction2","pureFunction2Internal","ɵɵpureFunction3","pureFunction3Internal","ɵɵpureFunction4","pureFunction4Internal","ɵɵpureFunction5","exp5","ɵɵpureFunction6","exp6","ɵɵpureFunction7","exp7","ɵɵpureFunction8","exp8","ɵɵpureFunctionV","exps","pureFunctionVInternal","getPureFunctionReturnValue","returnValueIndex","lastReturnValue","bindingRoot","ɵɵpipe","pipeName","getPipeDef$1","pipeFactory","pipeInstance","ɵɵpipeBind1","unwrapValue$1","isPure","transform","ɵɵpipeBind2","ɵɵpipeBind3","ɵɵpipeBind4","ɵɵpipeBindV","bindingToInvalidateIdx","EventEmitter_","isAsync","__isAsync","generatorOrNext","complete","schedulerFn","errorFn","completeFn","sink","Subscription","Subject","EventEmitter","symbolIterator","_results","QueryList","symbol","filter","init","reduce","resultsTree","last","emit","unusedValueExportToPlacateAjd$7","unusedValueExportToPlacateAjd$8","unusedValueToPlacateAjd$2","LQuery_","queryList","setDirty","LQueries_","tQueries","noOfInheritedQueries","viewLQueries","tQuery","getByIndex","parentLQuery","indexInDeclarationView","clone","dirtyQueriesWithMatches","getTQuery","TQueryMetadata_","predicate","isStatic","read","TQueries_","queriesForTemplateRef","childQueryIndex","tqueryClone","tquery","TQuery_","crossesNgTemplate","_appliesToNextNode","_declarationNodeIndex","isApplyingToNode","matchTNode","addMatch","declarationNodeIdx","matchTNodeWithReadOption","getIdxOfMatchingSelector","nodeMatchIdx","directiveOrProviderIdx","matchIdx","createResultByTNodeType","createResultForNode","matchingIdx","createSpecialToken","materializeViewResults","queryIndex","lQuery","tViewData","tQueryMatches","matchedNodeIdx","collectQueryResults","lViewResults","embeddedLViews","ɵɵqueryRefresh","reset","notifyOnChanges","ɵɵstaticViewQuery","descend","viewQueryInternal","ɵɵviewQuery","createTQuery","createLQuery","ɵɵcontentQuery","contentQueryInternal","ɵɵstaticContentQuery","saveContentQueryAndDirectiveIndex","ɵɵloadQuery","loadQueryInternal","track","tViewContentQueries","lastSavedDirectiveIndex","ɵɵtemplateRefExtractor","ɵɵinjectPipeChangeDetectorRef","ɵ0$d","angularCoreEnv","jitOptions","setJitOptions","defaultEncapsulation","preserveWhitespaces","getJitOptions","resetJitOptions","EMPTY_ARRAY$5","moduleQueue","enqueueModuleForDelayedScoping","flushingModuleQueue","flushModuleScopingQueueAsMuchAsPossible","every","isResolvedDeclaration","setScopeOnDeclaredComponents","declaration","compileNgModule","compileNgModuleDefs","allowDuplicateDeclarationsInRoot","expandModuleWithProviders","verifySemanticsOfNgModuleDef","compileInjector","importingModule","verifiedNgModule","errors","unwrapModuleWithProvidersImports","mod","verifySemanticsOfNgModuleImport","verifyDeclarationsHaveDefinitions","verifyDirectivesHaveSelector","combinedDeclarations","computeCombinedExports","verifyExportsAreDeclaredOrReExported","decl","verifyDeclarationIsUnique","verifyComponentEntryComponentsIsPartOfNgModule","getAnnotation","verifyCorrectBootstrapType","verifyComponentIsPartOfNgModule","entryComponents","kind","suppressErrors","existingModule","ownerNgModule","typeOrWithProviders","collect","__annotations__","readAnnotation","decorator","resetCompiledComponents","transitiveScopes","transitiveScopesFor","patchComponentDefWithScope","ngSelectorScope","compilation","dir","pipe","isNgModule","scopes","exported","importedType","importedScope","entry","declared","declaredWithDefs","exportedType","exportedScope","isModuleWithProviders","compilationDepth","compileComponent","ngComponentDef","addDirectiveFactoryDef","directiveMetadata","typeSourceSpan","createParseSourceSpan","animations","interpolation","usesInheritance","addDirectiveDefToUndecoratedParents","hasSelectorScope","compileDirective","ngDirectiveDef","getDirectiveMetadata","sourceMapUrl","facade","Directive","extendsDirectlyFromObject","extractQueriesMetadata","isContentQuery","lifecycle","usesOnChanges","extractExportAs","viewQueries","objPrototype","shouldAddAbstractDirective","convertToR3QueryPredicate","splitByComma","convertToR3QueryMetadata","ann","static","isQueryAnn","queriesMeta","isInputAnnotation","piece","LIFECYCLE_HOOKS","hookName","metadataName","compilePipe","ngPipeDef","getPipeMetadata","Pipe","ɵ0$e","ɵ1$3","SWITCH_COMPILE_DIRECTIVE","ɵ2$1","c","ɵ3$1","SWITCH_COMPILE_COMPONENT","Component","ɵ4","ɵ5","SWITCH_COMPILE_PIPE","ɵ6","bindingPropertyName","Input","ɵ7","Output","ɵ8","hostPropertyName","HostBinding","ɵ9","HostListener","SWITCH_COMPILE_COMPONENT__POST_R3__","SWITCH_COMPILE_DIRECTIVE__POST_R3__","SWITCH_COMPILE_PIPE__POST_R3__","SWITCH_COMPILE_COMPONENT__PRE_R3__","SWITCH_COMPILE_DIRECTIVE__PRE_R3__","SWITCH_COMPILE_PIPE__PRE_R3__","ɵ0$f","ɵ1$4","SWITCH_COMPILE_NGMODULE","NgModule","preR3NgModuleCompile","SWITCH_COMPILE_NGMODULE__POST_R3__","SWITCH_COMPILE_NGMODULE__PRE_R3__","APP_INITIALIZER","ApplicationInitStatus","appInits","initialized","donePromise","rej","reject","asyncInitPromises","initResult","catch","APP_ID","_appIdRandomProviderFactory","_randomChar","APP_ID_RANDOM_PROVIDER","random","PLATFORM_INITIALIZER","PLATFORM_ID","APP_BOOTSTRAP_LISTENER","PACKAGE_ROOT_URL","Console","log","LOCALE_ID$1","DEFAULT_CURRENCY_CODE","TRANSLATIONS","TRANSLATIONS_FORMAT","MissingTranslationStrategy","SWITCH_IVY_ENABLED__POST_R3__","SWITCH_IVY_ENABLED__PRE_R3__","ivyEnabled","ModuleWithComponentFactories","ngModuleFactory","componentFactories","_throwError","Compiler_compileModuleSync__PRE_R3__","Compiler_compileModuleSync__POST_R3__","Compiler_compileModuleSync","Compiler_compileModuleAsync__PRE_R3__","Compiler_compileModuleAsync__POST_R3__","Compiler_compileModuleAsync","Compiler_compileModuleAndAllComponentsSync__PRE_R3__","Compiler_compileModuleAndAllComponentsSync__POST_R3__","Compiler_compileModuleAndAllComponentsSync","Compiler_compileModuleAndAllComponentsAsync__PRE_R3__","Compiler_compileModuleAndAllComponentsAsync__POST_R3__","Compiler_compileModuleAndAllComponentsAsync","Compiler","compileModuleSync","compileModuleAsync","compileModuleAndAllComponentsSync","compileModuleAndAllComponentsAsync","COMPILER_OPTIONS","CompilerFactory","scheduleMicroTask","Zone","getNativeRequestAnimationFrame","nativeRequestAnimationFrame","nativeCancelAnimationFrame","unpatchedRequestAnimationFrame","__symbol__","unpatchedCancelAnimationFrame","NgZone","enableLongStackTrace","shouldCoalesceEventChangeDetection","hasPendingMacrotasks","hasPendingMicrotasks","isStable","onUnstable","onMicrotaskEmpty","onStable","onError","assertZonePatched","_nesting","_outer","_inner","fork","lastRequestAnimationFrameId","forkInnerZoneWithAngularBehavior","applyThis","applyArgs","run","zone","task","scheduleEventTask","EMPTY_PAYLOAD","noop$1","runTask","cancelTask","runGuarded","isInAngularZone","checkStable","runOutsideAngular","delayChangeDetectionForEvents","fakeTopEventTask","updateMicroTaskStatus","invoke","delayChangeDetectionForEventsDelegate","maybeDelayChangeDetection","properties","onInvokeTask","delegate","onEnter","invokeTask","onLeave","onInvoke","onHasTask","hasTaskState","hasTask","change","_hasPendingMicrotasks","microTask","macroTask","onHandleError","NoopNgZone","Testability","_ngZone","_pendingCount","_isZoneStable","_didWork","_callbacks","taskTrackingZone","_watchAngularEvents","assertNotInAngularZone","_runCallbacksIfReady","cb","clearTimeout","timeoutId","doneCb","pending","getPendingTasks","updateCb","macroTasks","creationLocation","timeout","addCallback","using","exactMatch","TestabilityRegistry","_applications","_testabilityGetter","addToWindow","testability","elem","findInAncestors","findTestabilityInTree","_NoopGetTestability","setTestabilityGetter","_platform","compileNgModuleFactory","compileNgModuleFactory__PRE_R3__","compilerFactory","createCompiler","compileNgModuleFactory__POST_R3__","moduleFactory","ngJitMode","compilerOptions","_lastDefined","compilerProviders","_mergeArrays","compilerInjector","resourceLoader","ResourceLoader","publishDefaultGlobalUtils__PRE_R3__","publishDefaultGlobalUtils__POST_R3__","publishDefaultGlobalUtils$1","isBoundToModule__PRE_R3__","cf","isBoundToModule__POST_R3__","ALLOW_MULTIPLE_PLATFORMS","NgProbeToken","createPlatform","PlatformRef","inits","createPlatformFactory","parentPlatformFactory","desc","extraProviders","platform","getPlatform","injectedProviders","assertPlatform","requiredToken","destroyPlatform","_injector","_modules","ngZoneOption","ngZone","ngZoneEventCoalescing","getNgZone","ngZoneInjector","moduleRef","exceptionHandler","_callAndReportToErrorHandler","initStatus","runInitializers","_moduleDoBootstrap","optionsReducer","bootstrapModuleFactory","ApplicationRef","ngDoBootstrap","module","_zone","_exceptionHandler","_componentFactoryResolver","_initStatus","_bootstrapListeners","_views","_runningTick","_enforceNoNewChanges","_stable","componentTypes","isCurrentlyStable","Observable","observer","stableSub","unstableSub","assertInAngularZone","merge$1","share","componentOrFactory","selectorOrNode","compRef","_unloadComponent","registerApplication","_loadComponent","checkNoChanges","attachToAppRef","detachFromAppRef","attachView","part","NgModuleFactoryLoader","getModuleFactory__PRE_R3__","noModuleError","getModuleFactory__POST_R3__","getModuleFactory","_SEPARATOR","FACTORY_CLASS_SUFFIX","SystemJsNgModuleLoaderConfig","DEFAULT_CONFIG","factoryPathPrefix","factoryPathSuffix","SystemJsNgModuleLoader","_compiler","config","_config","legacyOfflineMode","loadFactory","loadAndCompile","exportName","System","checkNotEmpty","factoryClassSuffix","modulePath","ViewRef$1","EmbeddedViewRef","DebugEventListener","DebugNode__PRE_R3__","nativeNode","_debugContext","DebugElement__PRE_R3__","addChild","childNodes","childIndex","newChildren","siblingIndex","refChild","newChild","refIndex","queryAll","_queryElementChildren","_queryNodeChildren","eventObj","asNativeElements","debugEls","DebugNode__POST_R3__","DebugElement__POST_R3__","_queryAllR3","invokedListeners","eventListeners","unwrappedListener","copyDomProperties","collectPropertyBindings","lowercaseTNodeAttrs","eAttrs","lowercaseName","baseVal","getDebugNode__POST_R3__","NodePrototype","descriptors","getOwnPropertyDescriptors","isPrimitiveValue","parentElement","elementsOnly","_queryNodeChildrenR3","_queryNativeNodeDescendants","rootNativeNode","_addQueryMatchR3","nodeOrContainer","_queryNodeChildrenInContainerR3","head","nextLView","nextTNode","childView","getDebugNode$1","bindingIndexes","metadataParts","_nativeNodeToDebugNode","getDebugNode__PRE_R3__","NG_DEBUG_PROPERTY","getDebugNodeR2__PRE_R3__","getDebugNodeR2__POST_R3__","_nativeNode","getDebugNodeR2","getAllDebugNodes","indexDebugNode","removeDebugNodeFromIndex","DebugNode","DebugElement","_CORE_PLATFORM_PROVIDERS","platformCore","_iterableDiffersFactory","_keyValueDiffersFactory","_localeFactory","getGlobalLocale","LOCALE","$localize","ɵ0$g","APPLICATION_MODULE_PROVIDERS","zoneSchedulerFactory","ApplicationModule","anchorDef","templateFactory","elementDef","namespaceAndName","fixedAttrs","bindingDefs","suffixOrSecurityContext","parentEl","listenToElementOutputs","handleEventClosure","renderEventHandlerClosure","listenTarget","listenerView","disposable","checkAndUpdateElementInline","checkAndUpdateElementValue","checkAndUpdateElementDynamic","setElementAttribute","setElementClass","setElementStyle","bindView","setElementProperty","renderValue","unit","queryDef","bindingType","filterId","createQuery","queryIds","nodeMatchedQueries","tplDef","checkAndUpdateQuery","newValues","calcQueryValues","notify","boundValue","getQueryValue","dvc","projectedView","queryValueType","ngContentDef","appendNgContent","purePipeDef","argCount","_pureExpressionDef","pureArrayDef","pureObjectDef","propToIndex","nbKeys","propertyNames","createPureExpression","checkAndUpdatePureExpressionInline","checkAndUpdatePureExpressionDynamic","textDef","staticText","checkAndUpdateTextInline","_addInterpolationPart","checkAndUpdateTextDynamic","valueStr","viewBindingCount","viewDisposableCount","viewNodeFlags","viewRootNodeFlags","viewMatchedQueries","currentParent","currentRenderParent","currentElementHasPublicProviders","currentElementHasPrivateProviders","validateNode","isPrivateService","isNgContainer","newParent","rootNodeFlags","bindingCount","outputCount","nodeCount","parentFlags","parentEnd","createView","initView","createViewNodes","compRenderer","hostDef","nodeData","compViewDef","execComponentViewsAction","ViewAction","CreateViewNodes","execQueriesAction","markProjectedViewsForCheck","execEmbeddedViewsAction","CheckNoChanges","CheckAndUpdate","callInit","checkAndUpdateNode","argStyle","checkAndUpdateNodeInline","checkAndUpdateNodeDynamic","checkNoChangesNode","checkNoChangesNodeInline","checkNoChangesNodeDynamic","checkNoChangesQuery","Destroy","destroyViewNodes","callViewAction","viewState","execProjectedViewsAction","CheckNoChangesProjectedViews","CheckAndUpdateProjectedViews","queryFlags","staticDynamicQueryFlag","checkType","initServicesIfNeeded","services","createDebugServices","createProdServices","createProdRootView","DebugContext_","prodCheckAndUpdateNode","prodCheckNoChangesNode","debugSetCurrentNode","debugCreateRootView","debugCreateEmbeddedView","debugCreateComponentView","debugCreateNgModuleRef","debugOverrideProvider","debugOverrideComponentView","debugClearOverrides","debugCheckAndUpdateView","debugCheckNoChangesView","debugDestroyView","debugHandleEvent","debugUpdateDirectives","debugUpdateRenderer","elInjector","createRootData","DebugRendererFactory2","defWithOverride","applyProviderOverridesToView","callWithDebugContext","DebugAction","viewDefOverrides","applyProviderOverridesToNgModule","providerOverrides","providerOverridesWithScope","override","comp","compFactory","hostViewDef","elementIndicesWithOverwrittenProviders","findElementIndicesWithOverwrittenProviders","applyProviderOverridesToElement","elIndicesWithOverwrittenProviders","lastElementDef","elIndex","calcHasOverrides","hasOverrides","hasDeprecatedOverrides","applyProviderOverrides","deprecatedBehavior","moduleSet","_currentAction","_currentView","_currentNodeIndex","nextDirectiveWithBinding","debugCheckDirectivesFn","debugCheckAndUpdateNode","debugCheckNoChangesNode","nextRenderNodeWithBinding","debugCheckRenderNodeFn","givenValues","bindingValues","elView","logViewDef","logNodeIndex","renderNodeIndex","getRenderNodeIndex","currRenderNodeIndex","nodeLogger","elOrCompView","childDef","collectReferences","findHostElement","refName","oldAction","oldView","oldNodeIndex","getCurrentDebugContext","renderData","DebugRenderer2","whenRenderingDone","debugContextFactory","debugCtx","debugEl","debugChildEl","debugRefEl","oldChild","fullName","createNgModuleFactory","defFactory","NgModuleFactory_","cloneNgModuleDefinition","_ngModuleDefFactory","nextId","NGB_DATEPICKER_VALUE_ACCESSOR","GREGORIAN_EPOCH","isGregorianLeapYear","fromGregorian","toGregorian","DomAdapter","parseCookieValue","setRootDomAdapter","getDOM","allowSanitizationBypassOrThrow","PLATFORM_BROWSER_ID","PRE_STYLE","AnimationGroupPlayer","ONE_SECOND","lastValue","applyRedirects","applyRedirectsFn","NoMatch","getOutlet","recognize","recognizeFn","EmptyOutletComponent","AnimationEngine","AnimationStyleNormalizer","supportsWebAnimations","WebAnimationsDriver","CssKeyframesDriver","WebAnimationsStyleNormalizer","DomRendererFactory2","NoopAnimationDriver","Examples","_buildValueString","_extractId","resolvedPromise","formControlBinding","formDirectiveProvider","NgNoValidate","NgSelectMultipleOption","InternalFormsSharedModule","VENDOR_PREFIXES","TEST_ELEMENT","TYPE_FUNCTION","round","now","Date","setTimeoutContext","bindFn","invokeArrayArg","each","deprecate","deprecationMessage","TypeError","nextKey","extend","dest","inherit","base","baseP","childP","_super","boundFn","boolOrFn","val","ifUndefined","val1","val2","addEventListeners","handler","splitStr","removeEventListeners","hasParent","inStr","inArray","findByKey","toArray","uniqueArray","sortUniqueArray","prefixed","camelProp","toUpperCase","_uniqueId","uniqueId","getWindowForElement","doc","parentWindow","MOBILE_REGEX","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","navigator","userAgent","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","COMPUTE_INTERVAL","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","PROPS_XY","PROPS_CLIENT_XY","manager","inputTarget","domHandler","ev","enable","evEl","evTarget","evWin","createInputInstance","inputClass","PointerEventInput","TouchInput","MouseInput","TouchMouseInput","inputHandler","eventType","pointersLen","pointers","changedPointersLen","changedPointers","isFirst","isFinal","session","computeInputData","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","center","getCenter","timeStamp","deltaTime","angle","getAngle","distance","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","x","overallVelocityY","y","scale","getScale","rotation","getRotation","maxPointers","computeIntervalInputData","srcEvent","offsetDelta","prevDelta","lastInterval","velocity","velocityX","velocityY","direction","clientX","clientY","p1","p2","sqrt","atan2","PI","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MOUSE_ELEMENT_EVENTS","MOUSE_WINDOW_EVENTS","pressed","MEhandler","button","which","pointerType","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","MSPointerEvent","PointerEvent","pointerEvents","PEhandler","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","SingleTouchInput","started","TEhandler","touches","normalizeSingleTouches","changedTouches","TOUCH_INPUT_MAP","TOUCH_TARGET_EVENTS","targetIds","MTEhandler","getTouches","allTouches","targetTouches","changedTargetTouches","touch","DEDUP_TIMEOUT","DEDUP_DISTANCE","mouse","primaryTouch","lastTouches","TMEhandler","inputEvent","isMouse","sourceCapabilities","firesTouchEvents","recordTouches","isSyntheticEvent","eventData","setLastTouch","lastTouch","lts","removeLastTouch","dx","dy","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","TOUCH_ACTION_AUTO","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_NONE","TOUCH_ACTION_PAN_X","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MAP","getTouchActionProps","TouchAction","compute","actions","touchAction","recognizers","recognizer","getTouchAction","cleanTouchActions","preventDefaults","prevented","hasNone","hasPanY","hasPanX","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","touchMap","cssSupports","CSS","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","Recognizer","defaults","simultaneous","requireFail","recognizeWith","otherRecognizer","getRecognizerByNameIfManager","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","stateStr","additionalEvent","tryEmit","canEmit","inputDataClone","process","directionStr","AttrRecognizer","attrTest","optionPointers","isRecognized","isValid","PanRecognizer","pX","pY","threshold","directionTest","hasMoved","PinchRecognizer","inOut","PressRecognizer","_timer","_input","time","validPointers","validMovement","validTime","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","taps","interval","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","Hammer","preset","Manager","domEvents","cssProps","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","handlers","oldCssProps","toggleCssProps","stop","force","stopped","curRecognizer","on","events","off","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","Tap","Pan","Swipe","Pinch","Rotate","Press","freeGlobal","define"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAEA;AA2DM,SAAU,MAAV,GAAsC;AAAA,MAAlB,KAAkB,uEAAF,CAAC,CAAC;AAC1C,SAAO,UAAC,MAAD,EAA0B;AAC/B,QAAI,KAAK,KAAK,CAAd,EAAiB;AACf,aAAO,+DAAK,EAAZ;AACD,KAFD,MAEO,IAAI,KAAK,GAAG,CAAZ,EAAe;AACpB,aAAO,MAAM,CAAC,IAAP,CAAY,IAAI,cAAJ,CAAmB,CAAC,CAApB,EAAuB,MAAvB,CAAZ,CAAP;AACD,KAFM,MAEA;AACL,aAAO,MAAM,CAAC,IAAP,CAAY,IAAI,cAAJ,CAAmB,KAAK,GAAG,CAA3B,EAA8B,MAA9B,CAAZ,CAAP;AACD;AACF,GARD;AASD;;IAEK,c;AACJ,0BAAoB,KAApB,EACoB,MADpB,EACyC;AAAA;;AADrB;AACA;AACnB;;;;yBACI,U,EAA2B,M,EAAW;AACzC,aAAO,MAAM,CAAC,SAAP,CAAiB,IAAI,gBAAJ,CAAqB,UAArB,EAAiC,KAAK,KAAtC,EAA6C,KAAK,MAAlD,CAAjB,CAAP;AACD;;;;;;IAQG,gB;;;;;AACJ,4BAAY,WAAZ,EACoB,KADpB,EAEoB,MAFpB,EAEyC;AAAA;;AAAA;;AACvC,8BAAM,WAAN;AAFkB;AACA;AAAqB;AAExC;;;;+BACO;AACN,UAAI,CAAC,KAAK,SAAV,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AAyB,MAAzB,EAAsC,eAAtC,EAAsE;AAC1E,MAAI,eAAe,CAAC,MAApB,EAA4B;AAC1B,WAAO,SAAP;AACD;;AACD,MAAI,MAAM,YAAY,sDAAtB,EAAkC;AAChC,WAAO,MAAM,CAAC,SAAP,CAAiB,eAAjB,CAAP;AACD;;AACD,SAAO,qEAAW,CAAC,MAAD,CAAX,CAAoB,eAApB,CAAP;AACD,C","file":"vendor.js","sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { empty } from '../observable/empty';\nexport function repeat(count = -1) {\n    return (source) => {\n        if (count === 0) {\n            return empty();\n        }\n        else if (count < 0) {\n            return source.lift(new RepeatOperator(-1, source));\n        }\n        else {\n            return source.lift(new RepeatOperator(count - 1, source));\n        }\n    };\n}\nclass RepeatOperator {\n    constructor(count, source) {\n        this.count = count;\n        this.source = source;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n    }\n}\nclass RepeatSubscriber extends Subscriber {\n    constructor(destination, count, source) {\n        super(destination);\n        this.count = count;\n        this.source = source;\n    }\n    complete() {\n        if (!this.isStopped) {\n            const { source, count } = this;\n            if (count === 0) {\n                return super.complete();\n            }\n            else if (count > -1) {\n                this.count = count - 1;\n            }\n            source.subscribe(this._unsubscribeAndRecycle());\n        }\n    }\n}\n//# sourceMappingURL=repeat.js.map","import { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n    return (source) => source.lift(new DistinctUntilChangedOperator(compare, keySelector));\n}\nclass DistinctUntilChangedOperator {\n    constructor(compare, keySelector) {\n        this.compare = compare;\n        this.keySelector = keySelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n    }\n}\nclass DistinctUntilChangedSubscriber extends Subscriber {\n    constructor(destination, compare, keySelector) {\n        super(destination);\n        this.keySelector = keySelector;\n        this.hasKey = false;\n        if (typeof compare === 'function') {\n            this.compare = compare;\n        }\n    }\n    compare(x, y) {\n        return x === y;\n    }\n    _next(value) {\n        let key;\n        try {\n            const { keySelector } = this;\n            key = keySelector ? keySelector(value) : value;\n        }\n        catch (err) {\n            return this.destination.error(err);\n        }\n        let result = false;\n        if (this.hasKey) {\n            try {\n                const { compare } = this;\n                result = compare(this.key, key);\n            }\n            catch (err) {\n                return this.destination.error(err);\n            }\n        }\n        else {\n            this.hasKey = true;\n        }\n        if (!result) {\n            this.key = key;\n            this.destination.next(value);\n        }\n    }\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function distinct(keySelector, flushes) {\n    return (source) => source.lift(new DistinctOperator(keySelector, flushes));\n}\nclass DistinctOperator {\n    constructor(keySelector, flushes) {\n        this.keySelector = keySelector;\n        this.flushes = flushes;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n    }\n}\nexport class DistinctSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, keySelector, flushes) {\n        super(destination);\n        this.keySelector = keySelector;\n        this.values = new Set();\n        if (flushes) {\n            this.add(innerSubscribe(flushes, new SimpleInnerSubscriber(this)));\n        }\n    }\n    notifyNext() {\n        this.values.clear();\n    }\n    notifyError(error) {\n        this._error(error);\n    }\n    _next(value) {\n        if (this.keySelector) {\n            this._useKeySelector(value);\n        }\n        else {\n            this._finalizeNext(value, value);\n        }\n    }\n    _useKeySelector(value) {\n        let key;\n        const { destination } = this;\n        try {\n            key = this.keySelector(value);\n        }\n        catch (err) {\n            destination.error(err);\n            return;\n        }\n        this._finalizeNext(key, value);\n    }\n    _finalizeNext(key, value) {\n        const { values } = this;\n        if (!values.has(key)) {\n            values.add(key);\n            this.destination.next(value);\n        }\n    }\n}\n//# sourceMappingURL=distinct.js.map","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n    if (resultSelector) {\n        return fromEventPattern(addHandler, removeHandler).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n    }\n    return new Observable(subscriber => {\n        const handler = (...e) => subscriber.next(e.length === 1 ? e[0] : e);\n        let retValue;\n        try {\n            retValue = addHandler(handler);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        if (!isFunction(removeHandler)) {\n            return undefined;\n        }\n        return () => removeHandler(handler, retValue);\n    });\n}\n//# sourceMappingURL=fromEventPattern.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {\n    if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {\n        scheduler = selectorOrScheduler;\n    }\n    const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;\n    const subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n    return (source) => multicast(() => subject, selector)(source);\n}\n//# sourceMappingURL=publishReplay.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n    return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concat } from '../observable/concat';\nimport { of } from '../observable/of';\nexport function endWith(...array) {\n    return (source) => concat(source, of(...array));\n}\n//# sourceMappingURL=endWith.js.map","import { scan } from './scan';\nimport { takeLast } from './takeLast';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { pipe } from '../util/pipe';\nexport function reduce(accumulator, seed) {\n    if (arguments.length >= 2) {\n        return function reduceOperatorFunctionWithSeed(source) {\n            return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);\n        };\n    }\n    return function reduceOperatorFunction(source) {\n        return pipe(scan((acc, value, index) => accumulator(acc, value, index + 1)), takeLast(1))(source);\n    };\n}\n//# sourceMappingURL=reduce.js.map","import { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';\nexport function takeUntil(notifier) {\n    return (source) => source.lift(new TakeUntilOperator(notifier));\n}\nclass TakeUntilOperator {\n    constructor(notifier) {\n        this.notifier = notifier;\n    }\n    call(subscriber, source) {\n        const takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n        const notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));\n        if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n            takeUntilSubscriber.add(notifierSubscription);\n            return source.subscribe(takeUntilSubscriber);\n        }\n        return takeUntilSubscriber;\n    }\n}\nclass TakeUntilSubscriber extends SimpleOuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.seenValue = false;\n    }\n    notifyNext() {\n        this.seenValue = true;\n        this.complete();\n    }\n    notifyComplete() {\n    }\n}\n//# sourceMappingURL=takeUntil.js.map","export default function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}","import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function sampleTime(period, scheduler = async) {\n    return (source) => source.lift(new SampleTimeOperator(period, scheduler));\n}\nclass SampleTimeOperator {\n    constructor(period, scheduler) {\n        this.period = period;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n    }\n}\nclass SampleTimeSubscriber extends Subscriber {\n    constructor(destination, period, scheduler) {\n        super(destination);\n        this.period = period;\n        this.scheduler = scheduler;\n        this.hasValue = false;\n        this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period }));\n    }\n    _next(value) {\n        this.lastValue = value;\n        this.hasValue = true;\n    }\n    notifyNext() {\n        if (this.hasValue) {\n            this.hasValue = false;\n            this.destination.next(this.lastValue);\n        }\n    }\n}\nfunction dispatchNotification(state) {\n    let { subscriber, period } = state;\n    subscriber.notifyNext();\n    this.schedule(state, period);\n}\n//# sourceMappingURL=sampleTime.js.map","import { fromArray } from './fromArray';\nimport { isArray } from '../util/isArray';\nimport { Subscriber } from '../Subscriber';\nimport { iterator as Symbol_iterator } from '../../internal/symbol/iterator';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function zip(...observables) {\n    const resultSelector = observables[observables.length - 1];\n    if (typeof resultSelector === 'function') {\n        observables.pop();\n    }\n    return fromArray(observables, undefined).lift(new ZipOperator(resultSelector));\n}\nexport class ZipOperator {\n    constructor(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));\n    }\n}\nexport class ZipSubscriber extends Subscriber {\n    constructor(destination, resultSelector, values = Object.create(null)) {\n        super(destination);\n        this.resultSelector = resultSelector;\n        this.iterators = [];\n        this.active = 0;\n        this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : undefined;\n    }\n    _next(value) {\n        const iterators = this.iterators;\n        if (isArray(value)) {\n            iterators.push(new StaticArrayIterator(value));\n        }\n        else if (typeof value[Symbol_iterator] === 'function') {\n            iterators.push(new StaticIterator(value[Symbol_iterator]()));\n        }\n        else {\n            iterators.push(new ZipBufferIterator(this.destination, this, value));\n        }\n    }\n    _complete() {\n        const iterators = this.iterators;\n        const len = iterators.length;\n        this.unsubscribe();\n        if (len === 0) {\n            this.destination.complete();\n            return;\n        }\n        this.active = len;\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            if (iterator.stillUnsubscribed) {\n                const destination = this.destination;\n                destination.add(iterator.subscribe());\n            }\n            else {\n                this.active--;\n            }\n        }\n    }\n    notifyInactive() {\n        this.active--;\n        if (this.active === 0) {\n            this.destination.complete();\n        }\n    }\n    checkIterators() {\n        const iterators = this.iterators;\n        const len = iterators.length;\n        const destination = this.destination;\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n                return;\n            }\n        }\n        let shouldComplete = false;\n        const args = [];\n        for (let i = 0; i < len; i++) {\n            let iterator = iterators[i];\n            let result = iterator.next();\n            if (iterator.hasCompleted()) {\n                shouldComplete = true;\n            }\n            if (result.done) {\n                destination.complete();\n                return;\n            }\n            args.push(result.value);\n        }\n        if (this.resultSelector) {\n            this._tryresultSelector(args);\n        }\n        else {\n            destination.next(args);\n        }\n        if (shouldComplete) {\n            destination.complete();\n        }\n    }\n    _tryresultSelector(args) {\n        let result;\n        try {\n            result = this.resultSelector.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\nclass StaticIterator {\n    constructor(iterator) {\n        this.iterator = iterator;\n        this.nextResult = iterator.next();\n    }\n    hasValue() {\n        return true;\n    }\n    next() {\n        const result = this.nextResult;\n        this.nextResult = this.iterator.next();\n        return result;\n    }\n    hasCompleted() {\n        const nextResult = this.nextResult;\n        return Boolean(nextResult && nextResult.done);\n    }\n}\nclass StaticArrayIterator {\n    constructor(array) {\n        this.array = array;\n        this.index = 0;\n        this.length = 0;\n        this.length = array.length;\n    }\n    [Symbol_iterator]() {\n        return this;\n    }\n    next(value) {\n        const i = this.index++;\n        const array = this.array;\n        return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n    }\n    hasValue() {\n        return this.array.length > this.index;\n    }\n    hasCompleted() {\n        return this.array.length === this.index;\n    }\n}\nclass ZipBufferIterator extends SimpleOuterSubscriber {\n    constructor(destination, parent, observable) {\n        super(destination);\n        this.parent = parent;\n        this.observable = observable;\n        this.stillUnsubscribed = true;\n        this.buffer = [];\n        this.isComplete = false;\n    }\n    [Symbol_iterator]() {\n        return this;\n    }\n    next() {\n        const buffer = this.buffer;\n        if (buffer.length === 0 && this.isComplete) {\n            return { value: null, done: true };\n        }\n        else {\n            return { value: buffer.shift(), done: false };\n        }\n    }\n    hasValue() {\n        return this.buffer.length > 0;\n    }\n    hasCompleted() {\n        return this.buffer.length === 0 && this.isComplete;\n    }\n    notifyComplete() {\n        if (this.buffer.length > 0) {\n            this.isComplete = true;\n            this.parent.notifyInactive();\n        }\n        else {\n            this.destination.complete();\n        }\n    }\n    notifyNext(innerValue) {\n        this.buffer.push(innerValue);\n        this.parent.checkIterators();\n    }\n    subscribe() {\n        return innerSubscribe(this.observable, new SimpleInnerSubscriber(this));\n    }\n}\n//# sourceMappingURL=zip.js.map","export default function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export const rxSubscriber = (() => typeof Symbol === 'function'\n    ? Symbol('rxSubscriber')\n    : '@@rxSubscriber_' + Math.random())();\nexport const $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map","import { not } from '../util/not';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { filter } from '../operators/filter';\nimport { Observable } from '../Observable';\nexport function partition(source, predicate, thisArg) {\n    return [\n        filter(predicate, thisArg)(new Observable(subscribeTo(source))),\n        filter(not(predicate, thisArg))(new Observable(subscribeTo(source)))\n    ];\n}\n//# sourceMappingURL=partition.js.map","import { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nexport class BehaviorSubject extends Subject {\n    constructor(_value) {\n        super();\n        this._value = _value;\n    }\n    get value() {\n        return this.getValue();\n    }\n    _subscribe(subscriber) {\n        const subscription = super._subscribe(subscriber);\n        if (subscription && !subscription.closed) {\n            subscriber.next(this._value);\n        }\n        return subscription;\n    }\n    getValue() {\n        if (this.hasError) {\n            throw this.thrownError;\n        }\n        else if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return this._value;\n        }\n    }\n    next(value) {\n        super.next(this._value = value);\n    }\n}\n//# sourceMappingURL=BehaviorSubject.js.map","export default function _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n\n  try {\n    Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}","let _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport const config = {\n    Promise: undefined,\n    set useDeprecatedSynchronousErrorHandling(value) {\n        if (value) {\n            const error = new Error();\n            console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n        }\n        else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n            console.log('RxJS: Back to a better error behavior. Thank you. <3');\n        }\n        _enable_super_gross_mode_that_will_cause_bad_things = value;\n    },\n    get useDeprecatedSynchronousErrorHandling() {\n        return _enable_super_gross_mode_that_will_cause_bad_things;\n    },\n};\n//# sourceMappingURL=config.js.map","import { Subscriber } from '../Subscriber';\nexport function skipWhile(predicate) {\n    return (source) => source.lift(new SkipWhileOperator(predicate));\n}\nclass SkipWhileOperator {\n    constructor(predicate) {\n        this.predicate = predicate;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n    }\n}\nclass SkipWhileSubscriber extends Subscriber {\n    constructor(destination, predicate) {\n        super(destination);\n        this.predicate = predicate;\n        this.skipping = true;\n        this.index = 0;\n    }\n    _next(value) {\n        const destination = this.destination;\n        if (this.skipping) {\n            this.tryCallPredicate(value);\n        }\n        if (!this.skipping) {\n            destination.next(value);\n        }\n    }\n    tryCallPredicate(value) {\n        try {\n            const result = this.predicate(value, this.index++);\n            this.skipping = Boolean(result);\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    }\n}\n//# sourceMappingURL=skipWhile.js.map","import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler = async) {\n    const absoluteDelay = isDate(delay);\n    const delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n    return (source) => source.lift(new DelayOperator(delayFor, scheduler));\n}\nclass DelayOperator {\n    constructor(delay, scheduler) {\n        this.delay = delay;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n    }\n}\nclass DelaySubscriber extends Subscriber {\n    constructor(destination, delay, scheduler) {\n        super(destination);\n        this.delay = delay;\n        this.scheduler = scheduler;\n        this.queue = [];\n        this.active = false;\n        this.errored = false;\n    }\n    static dispatch(state) {\n        const source = state.source;\n        const queue = source.queue;\n        const scheduler = state.scheduler;\n        const destination = state.destination;\n        while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n            queue.shift().notification.observe(destination);\n        }\n        if (queue.length > 0) {\n            const delay = Math.max(0, queue[0].time - scheduler.now());\n            this.schedule(state, delay);\n        }\n        else {\n            this.unsubscribe();\n            source.active = false;\n        }\n    }\n    _schedule(scheduler) {\n        this.active = true;\n        const destination = this.destination;\n        destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n            source: this, destination: this.destination, scheduler: scheduler\n        }));\n    }\n    scheduleNotification(notification) {\n        if (this.errored === true) {\n            return;\n        }\n        const scheduler = this.scheduler;\n        const message = new DelayMessage(scheduler.now() + this.delay, notification);\n        this.queue.push(message);\n        if (this.active === false) {\n            this._schedule(scheduler);\n        }\n    }\n    _next(value) {\n        this.scheduleNotification(Notification.createNext(value));\n    }\n    _error(err) {\n        this.errored = true;\n        this.queue = [];\n        this.destination.error(err);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.scheduleNotification(Notification.createComplete());\n        this.unsubscribe();\n    }\n}\nclass DelayMessage {\n    constructor(time, notification) {\n        this.time = time;\n        this.notification = notification;\n    }\n}\n//# sourceMappingURL=delay.js.map","import { Action } from './Action';\nexport class AsyncAction extends Action {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n        this.pending = false;\n    }\n    schedule(state, delay = 0) {\n        if (this.closed) {\n            return this;\n        }\n        this.state = state;\n        const id = this.id;\n        const scheduler = this.scheduler;\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, delay);\n        }\n        this.pending = true;\n        this.delay = delay;\n        this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n        return this;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        return setInterval(scheduler.flush.bind(scheduler, this), delay);\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && this.delay === delay && this.pending === false) {\n            return id;\n        }\n        clearInterval(id);\n        return undefined;\n    }\n    execute(state, delay) {\n        if (this.closed) {\n            return new Error('executing a cancelled action');\n        }\n        this.pending = false;\n        const error = this._execute(state, delay);\n        if (error) {\n            return error;\n        }\n        else if (this.pending === false && this.id != null) {\n            this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n        }\n    }\n    _execute(state, delay) {\n        let errored = false;\n        let errorValue = undefined;\n        try {\n            this.work(state);\n        }\n        catch (e) {\n            errored = true;\n            errorValue = !!e && e || new Error(e);\n        }\n        if (errored) {\n            this.unsubscribe();\n            return errorValue;\n        }\n    }\n    _unsubscribe() {\n        const id = this.id;\n        const scheduler = this.scheduler;\n        const actions = scheduler.actions;\n        const index = actions.indexOf(this);\n        this.work = null;\n        this.state = null;\n        this.pending = false;\n        this.scheduler = null;\n        if (index !== -1) {\n            actions.splice(index, 1);\n        }\n        if (id != null) {\n            this.id = this.recycleAsyncId(scheduler, id, null);\n        }\n        this.delay = null;\n    }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = async) {\n    return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","import { Subscriber } from '../Subscriber';\nexport function ignoreElements() {\n    return function ignoreElementsOperatorFunction(source) {\n        return source.lift(new IgnoreElementsOperator());\n    };\n}\nclass IgnoreElementsOperator {\n    call(subscriber, source) {\n        return source.subscribe(new IgnoreElementsSubscriber(subscriber));\n    }\n}\nclass IgnoreElementsSubscriber extends Subscriber {\n    _next(unused) {\n    }\n}\n//# sourceMappingURL=ignoreElements.js.map","const ArgumentOutOfRangeErrorImpl = (() => {\n    function ArgumentOutOfRangeErrorImpl() {\n        Error.call(this);\n        this.message = 'argument out of range';\n        this.name = 'ArgumentOutOfRangeError';\n        return this;\n    }\n    ArgumentOutOfRangeErrorImpl.prototype = Object.create(Error.prototype);\n    return ArgumentOutOfRangeErrorImpl;\n})();\nexport const ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map","import { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { canReportError } from '../util/canReportError';\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n    if (resultSelector) {\n        if (isScheduler(resultSelector)) {\n            scheduler = resultSelector;\n        }\n        else {\n            return (...args) => bindNodeCallback(callbackFunc, scheduler)(...args).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n        }\n    }\n    return function (...args) {\n        const params = {\n            subject: undefined,\n            args,\n            callbackFunc,\n            scheduler,\n            context: this,\n        };\n        return new Observable(subscriber => {\n            const { context } = params;\n            let { subject } = params;\n            if (!scheduler) {\n                if (!subject) {\n                    subject = params.subject = new AsyncSubject();\n                    const handler = (...innerArgs) => {\n                        const err = innerArgs.shift();\n                        if (err) {\n                            subject.error(err);\n                            return;\n                        }\n                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n                        subject.complete();\n                    };\n                    try {\n                        callbackFunc.apply(context, [...args, handler]);\n                    }\n                    catch (err) {\n                        if (canReportError(subject)) {\n                            subject.error(err);\n                        }\n                        else {\n                            console.warn(err);\n                        }\n                    }\n                }\n                return subject.subscribe(subscriber);\n            }\n            else {\n                return scheduler.schedule(dispatch, 0, { params, subscriber, context });\n            }\n        });\n    };\n}\nfunction dispatch(state) {\n    const { params, subscriber, context } = state;\n    const { callbackFunc, args, scheduler } = params;\n    let subject = params.subject;\n    if (!subject) {\n        subject = params.subject = new AsyncSubject();\n        const handler = (...innerArgs) => {\n            const err = innerArgs.shift();\n            if (err) {\n                this.add(scheduler.schedule(dispatchError, 0, { err, subject }));\n            }\n            else {\n                const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n                this.add(scheduler.schedule(dispatchNext, 0, { value, subject }));\n            }\n        };\n        try {\n            callbackFunc.apply(context, [...args, handler]);\n        }\n        catch (err) {\n            this.add(scheduler.schedule(dispatchError, 0, { err, subject }));\n        }\n    }\n    this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(arg) {\n    const { value, subject } = arg;\n    subject.next(value);\n    subject.complete();\n}\nfunction dispatchError(arg) {\n    const { err, subject } = arg;\n    subject.error(err);\n}\n//# sourceMappingURL=bindNodeCallback.js.map","import { isArray } from '../util/isArray';\nimport { race as raceStatic } from '../observable/race';\nexport function race(...observables) {\n    return function raceOperatorFunction(source) {\n        if (observables.length === 1 && isArray(observables[0])) {\n            observables = observables[0];\n        }\n        return source.lift.call(raceStatic(source, ...observables));\n    };\n}\n//# sourceMappingURL=race.js.map","import { async } from '../scheduler/async';\nimport { scan } from './scan';\nimport { defer } from '../observable/defer';\nimport { map } from './map';\nexport function timeInterval(scheduler = async) {\n    return (source) => defer(() => {\n        return source.pipe(scan(({ current }, value) => ({ value, current: scheduler.now(), last: current }), { current: scheduler.now(), value: undefined, last: undefined }), map(({ current, last, value }) => new TimeInterval(value, current - last)));\n    });\n}\nexport class TimeInterval {\n    constructor(value, interval) {\n        this.value = value;\n        this.interval = interval;\n    }\n}\n//# sourceMappingURL=timeInterval.js.map","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        sub.add(scheduler.schedule(() => input.then(value => {\n            sub.add(scheduler.schedule(() => {\n                subscriber.next(value);\n                sub.add(scheduler.schedule(() => subscriber.complete()));\n            }));\n        }, err => {\n            sub.add(scheduler.schedule(() => subscriber.error(err)));\n        })));\n        return sub;\n    });\n}\n//# sourceMappingURL=schedulePromise.js.map","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeMap(project, resultSelector, concurrent = Number.POSITIVE_INFINITY) {\n    if (typeof resultSelector === 'function') {\n        return (source) => source.pipe(mergeMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii))), concurrent));\n    }\n    else if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return (source) => source.lift(new MergeMapOperator(project, concurrent));\n}\nexport class MergeMapOperator {\n    constructor(project, concurrent = Number.POSITIVE_INFINITY) {\n        this.project = project;\n        this.concurrent = concurrent;\n    }\n    call(observer, source) {\n        return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n    }\n}\nexport class MergeMapSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project, concurrent = Number.POSITIVE_INFINITY) {\n        super(destination);\n        this.project = project;\n        this.concurrent = concurrent;\n        this.hasCompleted = false;\n        this.buffer = [];\n        this.active = 0;\n        this.index = 0;\n    }\n    _next(value) {\n        if (this.active < this.concurrent) {\n            this._tryNext(value);\n        }\n        else {\n            this.buffer.push(value);\n        }\n    }\n    _tryNext(value) {\n        let result;\n        const index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.active++;\n        this._innerSub(result);\n    }\n    _innerSub(ish) {\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        const innerSubscription = innerSubscribe(ish, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (this.active === 0 && this.buffer.length === 0) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    }\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n    notifyComplete() {\n        const buffer = this.buffer;\n        this.active--;\n        if (buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        else if (this.active === 0 && this.hasCompleted) {\n            this.destination.complete();\n        }\n    }\n}\nexport const flatMap = mergeMap;\n//# sourceMappingURL=mergeMap.js.map","import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function mergeScan(accumulator, seed, concurrent = Number.POSITIVE_INFINITY) {\n    return (source) => source.lift(new MergeScanOperator(accumulator, seed, concurrent));\n}\nexport class MergeScanOperator {\n    constructor(accumulator, seed, concurrent) {\n        this.accumulator = accumulator;\n        this.seed = seed;\n        this.concurrent = concurrent;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n    }\n}\nexport class MergeScanSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, accumulator, acc, concurrent) {\n        super(destination);\n        this.accumulator = accumulator;\n        this.acc = acc;\n        this.concurrent = concurrent;\n        this.hasValue = false;\n        this.hasCompleted = false;\n        this.buffer = [];\n        this.active = 0;\n        this.index = 0;\n    }\n    _next(value) {\n        if (this.active < this.concurrent) {\n            const index = this.index++;\n            const destination = this.destination;\n            let ish;\n            try {\n                const { accumulator } = this;\n                ish = accumulator(this.acc, value, index);\n            }\n            catch (e) {\n                return destination.error(e);\n            }\n            this.active++;\n            this._innerSub(ish);\n        }\n        else {\n            this.buffer.push(value);\n        }\n    }\n    _innerSub(ish) {\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        const innerSubscription = innerSubscribe(ish, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (this.active === 0 && this.buffer.length === 0) {\n            if (this.hasValue === false) {\n                this.destination.next(this.acc);\n            }\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    }\n    notifyNext(innerValue) {\n        const { destination } = this;\n        this.acc = innerValue;\n        this.hasValue = true;\n        destination.next(innerValue);\n    }\n    notifyComplete() {\n        const buffer = this.buffer;\n        this.active--;\n        if (buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        else if (this.active === 0 && this.hasCompleted) {\n            if (this.hasValue === false) {\n                this.destination.next(this.acc);\n            }\n            this.destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=mergeScan.js.map","import { Subscriber } from './Subscriber';\nexport class InnerSubscriber extends Subscriber {\n    constructor(parent, outerValue, outerIndex) {\n        super();\n        this.parent = parent;\n        this.outerValue = outerValue;\n        this.outerIndex = outerIndex;\n        this.index = 0;\n    }\n    _next(value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n    }\n    _error(error) {\n        this.parent.notifyError(error, this);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    }\n}\n//# sourceMappingURL=InnerSubscriber.js.map","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        sub.add(scheduler.schedule(() => {\n            const observable = input[Symbol_observable]();\n            sub.add(observable.subscribe({\n                next(value) { sub.add(scheduler.schedule(() => subscriber.next(value))); },\n                error(err) { sub.add(scheduler.schedule(() => subscriber.error(err))); },\n                complete() { sub.add(scheduler.schedule(() => subscriber.complete())); },\n            }));\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleObservable.js.map","import { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport const NEVER = new Observable(noop);\nexport function never() {\n    return NEVER;\n}\n//# sourceMappingURL=never.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function debounce(durationSelector) {\n    return (source) => source.lift(new DebounceOperator(durationSelector));\n}\nclass DebounceOperator {\n    constructor(durationSelector) {\n        this.durationSelector = durationSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n    }\n}\nclass DebounceSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, durationSelector) {\n        super(destination);\n        this.durationSelector = durationSelector;\n        this.hasValue = false;\n    }\n    _next(value) {\n        try {\n            const result = this.durationSelector.call(this, value);\n            if (result) {\n                this._tryNext(value, result);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    }\n    _complete() {\n        this.emitValue();\n        this.destination.complete();\n    }\n    _tryNext(value, duration) {\n        let subscription = this.durationSubscription;\n        this.value = value;\n        this.hasValue = true;\n        if (subscription) {\n            subscription.unsubscribe();\n            this.remove(subscription);\n        }\n        subscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n        if (subscription && !subscription.closed) {\n            this.add(this.durationSubscription = subscription);\n        }\n    }\n    notifyNext() {\n        this.emitValue();\n    }\n    notifyComplete() {\n        this.emitValue();\n    }\n    emitValue() {\n        if (this.hasValue) {\n            const value = this.value;\n            const subscription = this.durationSubscription;\n            if (subscription) {\n                this.durationSubscription = undefined;\n                subscription.unsubscribe();\n                this.remove(subscription);\n            }\n            this.value = undefined;\n            this.hasValue = false;\n            super._next(value);\n        }\n    }\n}\n//# sourceMappingURL=debounce.js.map","import { Observable } from '../Observable';\nexport function isObservable(obj) {\n    return !!obj && (obj instanceof Observable || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));\n}\n//# sourceMappingURL=isObservable.js.map","import { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n    if (input != null) {\n        if (isInteropObservable(input)) {\n            return scheduleObservable(input, scheduler);\n        }\n        else if (isPromise(input)) {\n            return schedulePromise(input, scheduler);\n        }\n        else if (isArrayLike(input)) {\n            return scheduleArray(input, scheduler);\n        }\n        else if (isIterable(input) || typeof input === 'string') {\n            return scheduleIterable(input, scheduler);\n        }\n    }\n    throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=scheduled.js.map","import { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\nexport const asapScheduler = new AsapScheduler(AsapAction);\nexport const asap = asapScheduler;\n//# sourceMappingURL=asap.js.map","import { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport class Subscriber extends Subscription {\n    constructor(destinationOrNext, error, complete) {\n        super();\n        this.syncErrorValue = null;\n        this.syncErrorThrown = false;\n        this.syncErrorThrowable = false;\n        this.isStopped = false;\n        switch (arguments.length) {\n            case 0:\n                this.destination = emptyObserver;\n                break;\n            case 1:\n                if (!destinationOrNext) {\n                    this.destination = emptyObserver;\n                    break;\n                }\n                if (typeof destinationOrNext === 'object') {\n                    if (destinationOrNext instanceof Subscriber) {\n                        this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n                        this.destination = destinationOrNext;\n                        destinationOrNext.add(this);\n                    }\n                    else {\n                        this.syncErrorThrowable = true;\n                        this.destination = new SafeSubscriber(this, destinationOrNext);\n                    }\n                    break;\n                }\n            default:\n                this.syncErrorThrowable = true;\n                this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);\n                break;\n        }\n    }\n    [rxSubscriberSymbol]() { return this; }\n    static create(next, error, complete) {\n        const subscriber = new Subscriber(next, error, complete);\n        subscriber.syncErrorThrowable = false;\n        return subscriber;\n    }\n    next(value) {\n        if (!this.isStopped) {\n            this._next(value);\n        }\n    }\n    error(err) {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._error(err);\n        }\n    }\n    complete() {\n        if (!this.isStopped) {\n            this.isStopped = true;\n            this._complete();\n        }\n    }\n    unsubscribe() {\n        if (this.closed) {\n            return;\n        }\n        this.isStopped = true;\n        super.unsubscribe();\n    }\n    _next(value) {\n        this.destination.next(value);\n    }\n    _error(err) {\n        this.destination.error(err);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.destination.complete();\n        this.unsubscribe();\n    }\n    _unsubscribeAndRecycle() {\n        const { _parentOrParents } = this;\n        this._parentOrParents = null;\n        this.unsubscribe();\n        this.closed = false;\n        this.isStopped = false;\n        this._parentOrParents = _parentOrParents;\n        return this;\n    }\n}\nexport class SafeSubscriber extends Subscriber {\n    constructor(_parentSubscriber, observerOrNext, error, complete) {\n        super();\n        this._parentSubscriber = _parentSubscriber;\n        let next;\n        let context = this;\n        if (isFunction(observerOrNext)) {\n            next = observerOrNext;\n        }\n        else if (observerOrNext) {\n            next = observerOrNext.next;\n            error = observerOrNext.error;\n            complete = observerOrNext.complete;\n            if (observerOrNext !== emptyObserver) {\n                context = Object.create(observerOrNext);\n                if (isFunction(context.unsubscribe)) {\n                    this.add(context.unsubscribe.bind(context));\n                }\n                context.unsubscribe = this.unsubscribe.bind(this);\n            }\n        }\n        this._context = context;\n        this._next = next;\n        this._error = error;\n        this._complete = complete;\n    }\n    next(value) {\n        if (!this.isStopped && this._next) {\n            const { _parentSubscriber } = this;\n            if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                this.__tryOrUnsub(this._next, value);\n            }\n            else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n                this.unsubscribe();\n            }\n        }\n    }\n    error(err) {\n        if (!this.isStopped) {\n            const { _parentSubscriber } = this;\n            const { useDeprecatedSynchronousErrorHandling } = config;\n            if (this._error) {\n                if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(this._error, err);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, this._error, err);\n                    this.unsubscribe();\n                }\n            }\n            else if (!_parentSubscriber.syncErrorThrowable) {\n                this.unsubscribe();\n                if (useDeprecatedSynchronousErrorHandling) {\n                    throw err;\n                }\n                hostReportError(err);\n            }\n            else {\n                if (useDeprecatedSynchronousErrorHandling) {\n                    _parentSubscriber.syncErrorValue = err;\n                    _parentSubscriber.syncErrorThrown = true;\n                }\n                else {\n                    hostReportError(err);\n                }\n                this.unsubscribe();\n            }\n        }\n    }\n    complete() {\n        if (!this.isStopped) {\n            const { _parentSubscriber } = this;\n            if (this._complete) {\n                const wrappedComplete = () => this._complete.call(this._context);\n                if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n                    this.__tryOrUnsub(wrappedComplete);\n                    this.unsubscribe();\n                }\n                else {\n                    this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n                    this.unsubscribe();\n                }\n            }\n            else {\n                this.unsubscribe();\n            }\n        }\n    }\n    __tryOrUnsub(fn, value) {\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            this.unsubscribe();\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                throw err;\n            }\n            else {\n                hostReportError(err);\n            }\n        }\n    }\n    __tryOrSetError(parent, fn, value) {\n        if (!config.useDeprecatedSynchronousErrorHandling) {\n            throw new Error('bad call');\n        }\n        try {\n            fn.call(this._context, value);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                parent.syncErrorValue = err;\n                parent.syncErrorThrown = true;\n                return true;\n            }\n            else {\n                hostReportError(err);\n                return true;\n            }\n        }\n        return false;\n    }\n    _unsubscribe() {\n        const { _parentSubscriber } = this;\n        this._context = null;\n        this._parentSubscriber = null;\n        _parentSubscriber.unsubscribe();\n    }\n}\n//# sourceMappingURL=Subscriber.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n    constructor(scheduler, work) {\n        super();\n    }\n    schedule(state, delay = 0) {\n        return this;\n    }\n}\n//# sourceMappingURL=Action.js.map","import { CombineLatestOperator } from '../observable/combineLatest';\nexport function combineAll(project) {\n    return (source) => source.lift(new CombineLatestOperator(project));\n}\n//# sourceMappingURL=combineAll.js.map","import { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n    while (observer) {\n        const { closed, destination, isStopped } = observer;\n        if (closed || isStopped) {\n            return false;\n        }\n        else if (destination && destination instanceof Subscriber) {\n            observer = destination;\n        }\n        else {\n            observer = null;\n        }\n    }\n    return true;\n}\n//# sourceMappingURL=canReportError.js.map","/**\n * @license Angular v10.1.1\n * (c) 2010-2020 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { Subject, Subscription, Observable, merge as merge$1 } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Convince closure compiler that the wrapped function has no side-effects.\n *\n * Closure compiler always assumes that `toString` has no side-effects. We use this quirk to\n * allow us to execute a function but have closure compiler mark the call as no-side-effects.\n * It is important that the return value for the `noSideEffects` function be assigned\n * to something which is retained otherwise the call to `noSideEffects` will be removed by closure\n * compiler.\n */\nfunction noSideEffects(fn) {\n    return { toString: fn }.toString();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ANNOTATIONS = '__annotations__';\nconst PARAMETERS = '__parameters__';\nconst PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, additionalProcessing, typeFn) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function DecoratorFactory(...args) {\n            if (this instanceof DecoratorFactory) {\n                metaCtor.call(this, ...args);\n                return this;\n            }\n            const annotationInstance = new DecoratorFactory(...args);\n            return function TypeDecorator(cls) {\n                if (typeFn)\n                    typeFn(cls, ...args);\n                // Use of Object.defineProperty is important since it creates non-enumerable property which\n                // prevents the property is copied during subclassing.\n                const annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n                    cls[ANNOTATIONS] :\n                    Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n                annotations.push(annotationInstance);\n                if (additionalProcessing)\n                    additionalProcessing(cls);\n                return cls;\n            };\n        }\n        if (parentClass) {\n            DecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        DecoratorFactory.prototype.ngMetadataName = name;\n        DecoratorFactory.annotationCls = DecoratorFactory;\n        return DecoratorFactory;\n    });\n}\nfunction makeMetadataCtor(props) {\n    return function ctor(...args) {\n        if (props) {\n            const values = props(...args);\n            for (const propName in values) {\n                this[propName] = values[propName];\n            }\n        }\n    };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function ParamDecoratorFactory(...args) {\n            if (this instanceof ParamDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const annotationInstance = new ParamDecoratorFactory(...args);\n            ParamDecorator.annotation = annotationInstance;\n            return ParamDecorator;\n            function ParamDecorator(cls, unusedKey, index) {\n                // Use of Object.defineProperty is important since it creates non-enumerable property which\n                // prevents the property is copied during subclassing.\n                const parameters = cls.hasOwnProperty(PARAMETERS) ?\n                    cls[PARAMETERS] :\n                    Object.defineProperty(cls, PARAMETERS, { value: [] })[PARAMETERS];\n                // there might be gaps if some in between parameters do not have annotations.\n                // we pad with nulls.\n                while (parameters.length <= index) {\n                    parameters.push(null);\n                }\n                (parameters[index] = parameters[index] || []).push(annotationInstance);\n                return cls;\n            }\n        }\n        if (parentClass) {\n            ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        ParamDecoratorFactory.prototype.ngMetadataName = name;\n        ParamDecoratorFactory.annotationCls = ParamDecoratorFactory;\n        return ParamDecoratorFactory;\n    });\n}\nfunction makePropDecorator(name, props, parentClass, additionalProcessing) {\n    return noSideEffects(() => {\n        const metaCtor = makeMetadataCtor(props);\n        function PropDecoratorFactory(...args) {\n            if (this instanceof PropDecoratorFactory) {\n                metaCtor.apply(this, args);\n                return this;\n            }\n            const decoratorInstance = new PropDecoratorFactory(...args);\n            function PropDecorator(target, name) {\n                const constructor = target.constructor;\n                // Use of Object.defineProperty is important because it creates a non-enumerable property\n                // which prevents the property from being copied during subclassing.\n                const meta = constructor.hasOwnProperty(PROP_METADATA) ?\n                    constructor[PROP_METADATA] :\n                    Object.defineProperty(constructor, PROP_METADATA, { value: {} })[PROP_METADATA];\n                meta[name] = meta.hasOwnProperty(name) && meta[name] || [];\n                meta[name].unshift(decoratorInstance);\n                if (additionalProcessing)\n                    additionalProcessing(target, name, ...args);\n            }\n            return PropDecorator;\n        }\n        if (parentClass) {\n            PropDecoratorFactory.prototype = Object.create(parentClass.prototype);\n        }\n        PropDecoratorFactory.prototype.ngMetadataName = name;\n        PropDecoratorFactory.annotationCls = PropDecoratorFactory;\n        return PropDecoratorFactory;\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0 = (token) => ({ token });\n/**\n * Inject decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Inject = makeParamDecorator('Inject', ɵ0);\n/**\n * Optional decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Self = makeParamDecorator('Self');\n/**\n * `SkipSelf` decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Host = makeParamDecorator('Host');\nconst ɵ1 = (attributeName) => ({ attributeName });\n/**\n * Attribute decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Attribute = makeParamDecorator('Attribute', ɵ1);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Injection flags for DI.\n *\n * @publicApi\n */\nvar InjectFlags;\n(function (InjectFlags) {\n    // TODO(alxhub): make this 'const' when ngc no longer writes exports of it into ngfactory files.\n    /** Check self and check parent injector if needed */\n    InjectFlags[InjectFlags[\"Default\"] = 0] = \"Default\";\n    /**\n     * Specifies that an injector should retrieve a dependency from any injector until reaching the\n     * host element of the current component. (Only used with Element Injector)\n     */\n    InjectFlags[InjectFlags[\"Host\"] = 1] = \"Host\";\n    /** Don't ascend to ancestors of the node requesting injection. */\n    InjectFlags[InjectFlags[\"Self\"] = 2] = \"Self\";\n    /** Skip the node that is requesting injection. */\n    InjectFlags[InjectFlags[\"SkipSelf\"] = 4] = \"SkipSelf\";\n    /** Inject `defaultValue` instead if token not found. */\n    InjectFlags[InjectFlags[\"Optional\"] = 8] = \"Optional\";\n})(InjectFlags || (InjectFlags = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getClosureSafeProperty(objWithPropertyToExtract) {\n    for (let key in objWithPropertyToExtract) {\n        if (objWithPropertyToExtract[key] === getClosureSafeProperty) {\n            return key;\n        }\n    }\n    throw Error('Could not find renamed property on target object.');\n}\n/**\n * Sets properties on a target object from a source object, but only if\n * the property doesn't already exist on the target object.\n * @param target The target to set properties on\n * @param source The source of the property keys and values to set\n */\nfunction fillProperties(target, source) {\n    for (const key in source) {\n        if (source.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n            target[key] = source[key];\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Construct an `InjectableDef` which defines how a token will be constructed by the DI system, and\n * in which injectors (if any) it will be available.\n *\n * This should be assigned to a static `ɵprov` field on a type, which will then be an\n * `InjectableType`.\n *\n * Options:\n * * `providedIn` determines which injectors will include the injectable, by either associating it\n *   with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be\n *   provided in the `'root'` injector, which will be the application-level injector in most apps.\n * * `factory` gives the zero argument function which will create an instance of the injectable.\n *   The factory can call `inject` to access the `Injector` and request injection of dependencies.\n *\n * @codeGenApi\n * @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.\n */\nfunction ɵɵdefineInjectable(opts) {\n    return {\n        token: opts.token,\n        providedIn: opts.providedIn || null,\n        factory: opts.factory,\n        value: undefined,\n    };\n}\n/**\n * @deprecated in v8, delete after v10. This API should be used only be generated code, and that\n * code should now use ɵɵdefineInjectable instead.\n * @publicApi\n */\nconst defineInjectable = ɵɵdefineInjectable;\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an\n * `InjectorType`.\n *\n * Options:\n *\n * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to\n *   create the type must be provided. If that factory function needs to inject arguments, it can\n *   use the `inject` function.\n * * `providers`: an optional array of providers to add to the injector. Each provider must\n *   either have a factory or point to a type which has a `ɵprov` static property (the\n *   type must be an `InjectableType`).\n * * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s\n *   whose providers will also be added to the injector. Locally provided types will override\n *   providers from imports.\n *\n * @codeGenApi\n */\nfunction ɵɵdefineInjector(options) {\n    return {\n        factory: options.factory,\n        providers: options.providers || [],\n        imports: options.imports || [],\n    };\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading\n * inherited value.\n *\n * @param type A type which may have its own (non-inherited) `ɵprov`.\n */\nfunction getInjectableDef(type) {\n    return getOwnDefinition(type, type[NG_PROV_DEF]) ||\n        getOwnDefinition(type, type[NG_INJECTABLE_DEF]);\n}\n/**\n * Return `def` only if it is defined directly on `type` and is not inherited from a base\n * class of `type`.\n *\n * The function `Object.hasOwnProperty` is not sufficient to distinguish this case because in older\n * browsers (e.g. IE10) static property inheritance is implemented by copying the properties.\n *\n * Instead, the definition's `token` is compared to the `type`, and if they don't match then the\n * property was not defined directly on the type itself, and was likely inherited. The definition\n * is only returned if the `type` matches the `def.token`.\n */\nfunction getOwnDefinition(type, def) {\n    return def && def.token === type ? def : null;\n}\n/**\n * Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.\n *\n * @param type A type which may have `ɵprov`, via inheritance.\n *\n * @deprecated Will be removed in a future version of Angular, where an error will occur in the\n *     scenario if we find the `ɵprov` on an ancestor only.\n */\nfunction getInheritedInjectableDef(type) {\n    // See `jit/injectable.ts#compileInjectable` for context on NG_PROV_DEF_FALLBACK.\n    const def = type &&\n        (type[NG_PROV_DEF] || type[NG_INJECTABLE_DEF] ||\n            (type[NG_PROV_DEF_FALLBACK] && type[NG_PROV_DEF_FALLBACK]()));\n    if (def) {\n        const typeName = getTypeName(type);\n        // TODO(FW-1307): Re-add ngDevMode when closure can handle it\n        // ngDevMode &&\n        console.warn(`DEPRECATED: DI is instantiating a token \"${typeName}\" that inherits its @Injectable decorator but does not provide one itself.\\n` +\n            `This will become an error in a future version of Angular. Please add @Injectable() to the \"${typeName}\" class.`);\n        return def;\n    }\n    else {\n        return null;\n    }\n}\n/** Gets the name of a type, accounting for some cross-browser differences. */\nfunction getTypeName(type) {\n    // `Function.prototype.name` behaves differently between IE and other browsers. In most browsers\n    // it'll always return the name of the function itself, no matter how many other functions it\n    // inherits from. On IE the function doesn't have its own `name` property, but it takes it from\n    // the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most\n    // browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around\n    // the issue by converting the function to a string and parsing its name out that way via a regex.\n    if (type.hasOwnProperty('name')) {\n        return type.name;\n    }\n    const match = ('' + type).match(/^function\\s*([^\\s(]+)/);\n    return match === null ? '' : match[1];\n}\n/**\n * Read the injector def type in a way which is immune to accidentally reading inherited value.\n *\n * @param type type which may have an injector def (`ɵinj`)\n */\nfunction getInjectorDef(type) {\n    return type && (type.hasOwnProperty(NG_INJ_DEF) || type.hasOwnProperty(NG_INJECTOR_DEF)) ?\n        type[NG_INJ_DEF] :\n        null;\n}\nconst NG_PROV_DEF = getClosureSafeProperty({ ɵprov: getClosureSafeProperty });\nconst NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });\n// On IE10 properties defined via `defineProperty` won't be inherited by child classes,\n// which will break inheriting the injectable definition from a grandparent through an\n// undecorated parent class. We work around it by defining a fallback method which will be\n// used to retrieve the definition. This should only be a problem in JIT mode, because in\n// AOT TypeScript seems to have a workaround for static properties. When inheriting from an\n// undecorated parent is no longer supported in v10, this can safely be removed.\nconst NG_PROV_DEF_FALLBACK = getClosureSafeProperty({ ɵprovFallback: getClosureSafeProperty });\n// We need to keep these around so we can read off old defs if new defs are unavailable\nconst NG_INJECTABLE_DEF = getClosureSafeProperty({ ngInjectableDef: getClosureSafeProperty });\nconst NG_INJECTOR_DEF = getClosureSafeProperty({ ngInjectorDef: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction stringify(token) {\n    if (typeof token === 'string') {\n        return token;\n    }\n    if (Array.isArray(token)) {\n        return '[' + token.map(stringify).join(', ') + ']';\n    }\n    if (token == null) {\n        return '' + token;\n    }\n    if (token.overriddenName) {\n        return `${token.overriddenName}`;\n    }\n    if (token.name) {\n        return `${token.name}`;\n    }\n    const res = token.toString();\n    if (res == null) {\n        return '' + res;\n    }\n    const newLineIndex = res.indexOf('\\n');\n    return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Concatenates two strings with separator, allocating new strings only when necessary.\n *\n * @param before before string.\n * @param separator separator string.\n * @param after after string.\n * @returns concatenated string.\n */\nfunction concatStringsWithSpace(before, after) {\n    return (before == null || before === '') ?\n        (after === null ? '' : after) :\n        ((after == null || after === '') ? before : before + ' ' + after);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafeProperty });\n/**\n * Allows to refer to references which are not yet defined.\n *\n * For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of\n * DI is declared, but not yet defined. It is also used when the `token` which we use when creating\n * a query is not yet defined.\n *\n * @usageNotes\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @publicApi\n */\nfunction forwardRef(forwardRefFn) {\n    forwardRefFn.__forward_ref__ = forwardRef;\n    forwardRefFn.toString = function () {\n        return stringify(this());\n    };\n    return forwardRefFn;\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n *\n * Acts as the identity function when given a non-forward-ref value.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * @see `forwardRef`\n * @publicApi\n */\nfunction resolveForwardRef(type) {\n    return isForwardRef(type) ? type() : type;\n}\n/** Checks whether a function is wrapped by a `forwardRef`. */\nfunction isForwardRef(fn) {\n    return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&\n        fn.__forward_ref__ === forwardRef;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst __globalThis = typeof globalThis !== 'undefined' && globalThis;\nconst __window = typeof window !== 'undefined' && window;\nconst __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n    self instanceof WorkerGlobalScope && self;\nconst __global = typeof global !== 'undefined' && global;\n// Always use __globalThis if available, which is the spec-defined global variable across all\n// environments, then fallback to __global first, because in Node tests both __global and\n// __window may be defined and _global should be __global in that case.\nconst _global = __globalThis || __global || __window || __self;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nvar R3ResolvedDependencyType;\n(function (R3ResolvedDependencyType) {\n    R3ResolvedDependencyType[R3ResolvedDependencyType[\"Token\"] = 0] = \"Token\";\n    R3ResolvedDependencyType[R3ResolvedDependencyType[\"Attribute\"] = 1] = \"Attribute\";\n    R3ResolvedDependencyType[R3ResolvedDependencyType[\"ChangeDetectorRef\"] = 2] = \"ChangeDetectorRef\";\n    R3ResolvedDependencyType[R3ResolvedDependencyType[\"Invalid\"] = 3] = \"Invalid\";\n})(R3ResolvedDependencyType || (R3ResolvedDependencyType = {}));\nvar R3FactoryTarget;\n(function (R3FactoryTarget) {\n    R3FactoryTarget[R3FactoryTarget[\"Directive\"] = 0] = \"Directive\";\n    R3FactoryTarget[R3FactoryTarget[\"Component\"] = 1] = \"Component\";\n    R3FactoryTarget[R3FactoryTarget[\"Injectable\"] = 2] = \"Injectable\";\n    R3FactoryTarget[R3FactoryTarget[\"Pipe\"] = 3] = \"Pipe\";\n    R3FactoryTarget[R3FactoryTarget[\"NgModule\"] = 4] = \"NgModule\";\n})(R3FactoryTarget || (R3FactoryTarget = {}));\nvar ViewEncapsulation;\n(function (ViewEncapsulation) {\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation || (ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getCompilerFacade() {\n    const globalNg = _global['ng'];\n    if (!globalNg || !globalNg.ɵcompilerFacade) {\n        throw new Error(`Angular JIT compilation failed: '@angular/compiler' not loaded!\\n` +\n            `  - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.\\n` +\n            `  - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?\\n` +\n            `  - Alternatively provide the compiler with 'import \"@angular/compiler\";' before bootstrapping.`);\n    }\n    return globalNg.ɵcompilerFacade;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_COMP_DEF = getClosureSafeProperty({ ɵcmp: getClosureSafeProperty });\nconst NG_DIR_DEF = getClosureSafeProperty({ ɵdir: getClosureSafeProperty });\nconst NG_PIPE_DEF = getClosureSafeProperty({ ɵpipe: getClosureSafeProperty });\nconst NG_MOD_DEF = getClosureSafeProperty({ ɵmod: getClosureSafeProperty });\nconst NG_LOC_ID_DEF = getClosureSafeProperty({ ɵloc: getClosureSafeProperty });\nconst NG_FACTORY_DEF = getClosureSafeProperty({ ɵfac: getClosureSafeProperty });\n/**\n * If a directive is diPublic, bloomAdd sets a property on the type with this constant as\n * the key and the directive's unique ID as the value. This allows us to map directives to their\n * bloom filter bit for DI.\n */\n// TODO(misko): This is wrong. The NG_ELEMENT_ID should never be minified.\nconst NG_ELEMENT_ID = getClosureSafeProperty({ __NG_ELEMENT_ID__: getClosureSafeProperty });\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngDevModeResetPerfCounters() {\n    const locationString = typeof location !== 'undefined' ? location.toString() : '';\n    const newCounters = {\n        namedConstructors: locationString.indexOf('ngDevMode=namedConstructors') != -1,\n        firstCreatePass: 0,\n        tNode: 0,\n        tView: 0,\n        rendererCreateTextNode: 0,\n        rendererSetText: 0,\n        rendererCreateElement: 0,\n        rendererAddEventListener: 0,\n        rendererSetAttribute: 0,\n        rendererRemoveAttribute: 0,\n        rendererSetProperty: 0,\n        rendererSetClassName: 0,\n        rendererAddClass: 0,\n        rendererRemoveClass: 0,\n        rendererSetStyle: 0,\n        rendererRemoveStyle: 0,\n        rendererDestroy: 0,\n        rendererDestroyNode: 0,\n        rendererMoveNode: 0,\n        rendererRemoveNode: 0,\n        rendererAppendChild: 0,\n        rendererInsertBefore: 0,\n        rendererCreateComment: 0,\n    };\n    // Make sure to refer to ngDevMode as ['ngDevMode'] for closure.\n    const allowNgDevModeTrue = locationString.indexOf('ngDevMode=false') === -1;\n    _global['ngDevMode'] = allowNgDevModeTrue && newCounters;\n    return newCounters;\n}\n/**\n * This function checks to see if the `ngDevMode` has been set. If yes,\n * then we honor it, otherwise we default to dev mode with additional checks.\n *\n * The idea is that unless we are doing production build where we explicitly\n * set `ngDevMode == false` we should be helping the developer by providing\n * as much early warning and errors as possible.\n *\n * `ɵɵdefineComponent` is guaranteed to have been called before any component template functions\n * (and thus Ivy instructions), so a single initialization there is sufficient to ensure ngDevMode\n * is defined for the entire instruction set.\n *\n * When checking `ngDevMode` on toplevel, always init it before referencing it\n * (e.g. `((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode())`), otherwise you can\n *  get a `ReferenceError` like in https://github.com/angular/angular/issues/31595.\n *\n * Details on possible values for `ngDevMode` can be found on its docstring.\n *\n * NOTE:\n * - changes to the `ngDevMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nfunction initNgDevMode() {\n    // The below checks are to ensure that calling `initNgDevMode` multiple times does not\n    // reset the counters.\n    // If the `ngDevMode` is not an object, then it means we have not created the perf counters\n    // yet.\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n        if (typeof ngDevMode !== 'object') {\n            ngDevModeResetPerfCounters();\n        }\n        return !!ngDevMode;\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates a token that can be used in a DI Provider.\n *\n * Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a\n * runtime representation) such as when injecting an interface, callable type, array or\n * parameterized type.\n *\n * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by\n * the `Injector`. This provides additional level of type safety.\n *\n * ```\n * interface MyInterface {...}\n * var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));\n * // myInterface is inferred to be MyInterface.\n * ```\n *\n * When creating an `InjectionToken`, you can optionally specify a factory function which returns\n * (possibly by creating) a default value of the parameterized type `T`. This sets up the\n * `InjectionToken` using this factory as a provider as if it was defined explicitly in the\n * application's root injector. If the factory function, which takes zero arguments, needs to inject\n * dependencies, it can do so using the `inject` function. See below for an example.\n *\n * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which\n * overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As\n * mentioned above, `'root'` is the default value for `providedIn`.\n *\n * @usageNotes\n * ### Basic Example\n *\n * ### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n * ### Tree-shakable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n *\n * @publicApi\n */\nclass InjectionToken {\n    constructor(_desc, options) {\n        this._desc = _desc;\n        /** @internal */\n        this.ngMetadataName = 'InjectionToken';\n        this.ɵprov = undefined;\n        if (typeof options == 'number') {\n            // This is a special hack to assign __NG_ELEMENT_ID__ to this instance.\n            // __NG_ELEMENT_ID__ is Used by Ivy to determine bloom filter id.\n            // We are using it to assign `-1` which is used to identify `Injector`.\n            this.__NG_ELEMENT_ID__ = options;\n        }\n        else if (options !== undefined) {\n            this.ɵprov = ɵɵdefineInjectable({\n                token: this,\n                providedIn: options.providedIn || 'root',\n                factory: options.factory,\n            });\n        }\n    }\n    toString() {\n        return `InjectionToken ${this._desc}`;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.\n *\n * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a\n * project.\n *\n * @publicApi\n */\nconst INJECTOR = new InjectionToken('INJECTOR', -1 // `-1` is used by Ivy DI system as special value to recognize it as `Injector`.\n);\nconst _THROW_IF_NOT_FOUND = {};\nconst THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\nconst NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nconst NG_TOKEN_PATH = 'ngTokenPath';\nconst NEW_LINE = /\\n/gm;\nconst NO_NEW_LINE = 'ɵ';\nconst SOURCE = '__source';\nconst ɵ0$1 = getClosureSafeProperty;\nconst USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0$1 });\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n    const former = _currentInjector;\n    _currentInjector = injector;\n    return former;\n}\n/**\n * Current implementation of inject.\n *\n * By default, it is `injectInjectorOnly`, which makes it `Injector`-only aware. It can be changed\n * to `directiveInject`, which brings in the `NodeInjector` system of ivy. It is designed this\n * way for two reasons:\n *  1. `Injector` should not depend on ivy logic.\n *  2. To maintain tree shake-ability we don't want to bring in unnecessary code.\n */\nlet _injectImplementation;\n/**\n * Sets the current inject implementation.\n */\nfunction setInjectImplementation(impl) {\n    const previous = _injectImplementation;\n    _injectImplementation = impl;\n    return previous;\n}\nfunction injectInjectorOnly(token, flags = InjectFlags.Default) {\n    if (_currentInjector === undefined) {\n        throw new Error(`inject() must be called from an injection context`);\n    }\n    else if (_currentInjector === null) {\n        return injectRootLimpMode(token, undefined, flags);\n    }\n    else {\n        return _currentInjector.get(token, flags & InjectFlags.Optional ? null : undefined, flags);\n    }\n}\nfunction ɵɵinject(token, flags = InjectFlags.Default) {\n    return (_injectImplementation || injectInjectorOnly)(resolveForwardRef(token), flags);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactoryDep(index) {\n    const msg = ngDevMode ?\n        `This constructor is not compatible with Angular Dependency Injection because its dependency at index ${index} of the parameter list is invalid.\nThis can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular decorator.\n\nPlease check that 1) the type for the parameter at index ${index} is correct and 2) the correct Angular decorators are defined for this class and its ancestors.` :\n        'invalid';\n    throw new Error(msg);\n}\n/**\n * Injects a token from the currently active injector.\n *\n * Must be used in the context of a factory function such as one defined for an\n * `InjectionToken`. Throws an error if not called from such a context.\n *\n * Within such a factory function, using this function to request injection of a dependency\n * is faster and more type-safe than providing an additional array of dependencies\n * (as has been common with `useFactory` providers).\n *\n * @param token The injection token for the dependency to be injected.\n * @param flags Optional flags that control how injection is executed.\n * The flags correspond to injection strategies that can be specified with\n * parameter decorators `@Host`, `@Self`, `@SkipSef`, and `@Optional`.\n * @returns True if injection is successful, null otherwise.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}\n *\n * @publicApi\n */\nconst inject = ɵɵinject;\n/**\n * Injects `root` tokens in limp mode.\n *\n * If no injector exists, we can still inject tree-shakable providers which have `providedIn` set to\n * `\"root\"`. This is known as the limp mode injection. In such case the value is stored in the\n * `InjectableDef`.\n */\nfunction injectRootLimpMode(token, notFoundValue, flags) {\n    const injectableDef = getInjectableDef(token);\n    if (injectableDef && injectableDef.providedIn == 'root') {\n        return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n            injectableDef.value;\n    }\n    if (flags & InjectFlags.Optional)\n        return null;\n    if (notFoundValue !== undefined)\n        return notFoundValue;\n    throw new Error(`Injector: NOT_FOUND [${stringify(token)}]`);\n}\nfunction injectArgs(types) {\n    const args = [];\n    for (let i = 0; i < types.length; i++) {\n        const arg = resolveForwardRef(types[i]);\n        if (Array.isArray(arg)) {\n            if (arg.length === 0) {\n                throw new Error('Arguments array must have arguments.');\n            }\n            let type = undefined;\n            let flags = InjectFlags.Default;\n            for (let j = 0; j < arg.length; j++) {\n                const meta = arg[j];\n                if (meta instanceof Optional || meta.ngMetadataName === 'Optional' || meta === Optional) {\n                    flags |= InjectFlags.Optional;\n                }\n                else if (meta instanceof SkipSelf || meta.ngMetadataName === 'SkipSelf' || meta === SkipSelf) {\n                    flags |= InjectFlags.SkipSelf;\n                }\n                else if (meta instanceof Self || meta.ngMetadataName === 'Self' || meta === Self) {\n                    flags |= InjectFlags.Self;\n                }\n                else if (meta instanceof Inject || meta === Inject) {\n                    type = meta.token;\n                }\n                else {\n                    type = meta;\n                }\n            }\n            args.push(ɵɵinject(type, flags));\n        }\n        else {\n            args.push(ɵɵinject(arg));\n        }\n    }\n    return args;\n}\nclass NullInjector {\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n        if (notFoundValue === THROW_IF_NOT_FOUND) {\n            // Intentionally left behind: With dev tools open the debugger will stop here. There is no\n            // reason why correctly written application should cause this exception.\n            // TODO(misko): uncomment the next line once `ngDevMode` works with closure.\n            // if (ngDevMode) debugger;\n            const error = new Error(`NullInjectorError: No provider for ${stringify(token)}!`);\n            error.name = 'NullInjectorError';\n            throw error;\n        }\n        return notFoundValue;\n    }\n}\nfunction catchInjectorError(e, token, injectorErrorName, source) {\n    const tokenPath = e[NG_TEMP_TOKEN_PATH];\n    if (token[SOURCE]) {\n        tokenPath.unshift(token[SOURCE]);\n    }\n    e.message = formatError('\\n' + e.message, tokenPath, injectorErrorName, source);\n    e[NG_TOKEN_PATH] = tokenPath;\n    e[NG_TEMP_TOKEN_PATH] = null;\n    throw e;\n}\nfunction formatError(text, obj, injectorErrorName, source = null) {\n    text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n    let context = stringify(obj);\n    if (Array.isArray(obj)) {\n        context = obj.map(stringify).join(' -> ');\n    }\n    else if (typeof obj === 'object') {\n        let parts = [];\n        for (let key in obj) {\n            if (obj.hasOwnProperty(key)) {\n                let value = obj[key];\n                parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n            }\n        }\n        context = `{${parts.join(', ')}}`;\n    }\n    return `${injectorErrorName}${source ? '(' + source + ')' : ''}[${context}]: ${text.replace(NEW_LINE, '\\n  ')}`;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreDiEnv = {\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵgetFactoryOf': getFactoryOf,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n};\nfunction getFactoryOf(type) {\n    const typeAny = type;\n    if (isForwardRef(type)) {\n        return (() => {\n            const factory = getFactoryOf(resolveForwardRef(typeAny));\n            return factory ? factory() : null;\n        });\n    }\n    const def = getInjectableDef(typeAny) || getInjectorDef(typeAny);\n    if (!def || def.factory === undefined) {\n        return null;\n    }\n    return def.factory;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an instance of an `NgModule` created by an `NgModuleFactory`.\n * Provides access to the `NgModule` instance and related objects.\n *\n * @publicApi\n */\nclass NgModuleRef {\n}\n/**\n * @publicApi\n */\nclass NgModuleFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNumber(actual, msg) {\n    if (!(typeof actual === 'number')) {\n        throwError(msg, typeof actual, 'number', '===');\n    }\n}\nfunction assertNumberInRange(actual, minInclusive, maxInclusive) {\n    assertNumber(actual, 'Expected a number');\n    assertLessThanOrEqual(actual, maxInclusive, 'Expected number to be less than or equal to');\n    assertGreaterThanOrEqual(actual, minInclusive, 'Expected number to be greater than or equal to');\n}\nfunction assertString(actual, msg) {\n    if (!(typeof actual === 'string')) {\n        throwError(msg, actual === null ? 'null' : typeof actual, 'string', '===');\n    }\n}\nfunction assertEqual(actual, expected, msg) {\n    if (!(actual == expected)) {\n        throwError(msg, actual, expected, '==');\n    }\n}\nfunction assertNotEqual(actual, expected, msg) {\n    if (!(actual != expected)) {\n        throwError(msg, actual, expected, '!=');\n    }\n}\nfunction assertSame(actual, expected, msg) {\n    if (!(actual === expected)) {\n        throwError(msg, actual, expected, '===');\n    }\n}\nfunction assertNotSame(actual, expected, msg) {\n    if (!(actual !== expected)) {\n        throwError(msg, actual, expected, '!==');\n    }\n}\nfunction assertLessThan(actual, expected, msg) {\n    if (!(actual < expected)) {\n        throwError(msg, actual, expected, '<');\n    }\n}\nfunction assertLessThanOrEqual(actual, expected, msg) {\n    if (!(actual <= expected)) {\n        throwError(msg, actual, expected, '<=');\n    }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n    if (!(actual > expected)) {\n        throwError(msg, actual, expected, '>');\n    }\n}\nfunction assertGreaterThanOrEqual(actual, expected, msg) {\n    if (!(actual >= expected)) {\n        throwError(msg, actual, expected, '>=');\n    }\n}\nfunction assertNotDefined(actual, msg) {\n    if (actual != null) {\n        throwError(msg, actual, null, '==');\n    }\n}\nfunction assertDefined(actual, msg) {\n    if (actual == null) {\n        throwError(msg, actual, null, '!=');\n    }\n}\nfunction throwError(msg, actual, expected, comparison) {\n    throw new Error(`ASSERTION ERROR: ${msg}` +\n        (comparison == null ? '' : ` [Expected=> ${expected} ${comparison} ${actual} <=Actual]`));\n}\nfunction assertDomNode(node) {\n    // If we're in a worker, `Node` will not be defined.\n    assertEqual((typeof Node !== 'undefined' && node instanceof Node) ||\n        (typeof node === 'object' && node != null &&\n            node.constructor.name === 'WebWorkerRenderNode'), true, `The provided value must be an instance of a DOM Node but got ${stringify(node)}`);\n}\nfunction assertIndexInRange(arr, index) {\n    const maxLen = arr ? arr.length : 0;\n    assertLessThan(index, maxLen, `Index expected to be less than ${maxLen} but got ${index}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Equivalent to ES6 spread, add each item to an array.\n *\n * @param items The items to add\n * @param arr The array to which you want to add the items\n */\nfunction addAllToArray(items, arr) {\n    for (let i = 0; i < items.length; i++) {\n        arr.push(items[i]);\n    }\n}\n/**\n * Flattens an array.\n */\nfunction flatten(list, dst) {\n    if (dst === undefined)\n        dst = list;\n    for (let i = 0; i < list.length; i++) {\n        let item = list[i];\n        if (Array.isArray(item)) {\n            // we need to inline it.\n            if (dst === list) {\n                // Our assumption that the list was already flat was wrong and\n                // we need to clone flat since we need to write to it.\n                dst = list.slice(0, i);\n            }\n            flatten(item, dst);\n        }\n        else if (dst !== list) {\n            dst.push(item);\n        }\n    }\n    return dst;\n}\nfunction deepForEach(input, fn) {\n    input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));\n}\nfunction addToArray(arr, index, value) {\n    // perf: array.push is faster than array.splice!\n    if (index >= arr.length) {\n        arr.push(value);\n    }\n    else {\n        arr.splice(index, 0, value);\n    }\n}\nfunction removeFromArray(arr, index) {\n    // perf: array.pop is faster than array.splice!\n    if (index >= arr.length - 1) {\n        return arr.pop();\n    }\n    else {\n        return arr.splice(index, 1)[0];\n    }\n}\nfunction newArray(size, value) {\n    const list = [];\n    for (let i = 0; i < size; i++) {\n        list.push(value);\n    }\n    return list;\n}\n/**\n * Remove item from array (Same as `Array.splice()` but faster.)\n *\n * `Array.splice()` is not as fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * https://jsperf.com/fast-array-splice (About 20x faster)\n *\n * @param array Array to splice\n * @param index Index of element in array to remove.\n * @param count Number of items to remove.\n */\nfunction arraySplice(array, index, count) {\n    const length = array.length - count;\n    while (index < length) {\n        array[index] = array[index + count];\n        index++;\n    }\n    while (count--) {\n        array.pop(); // shrink the array\n    }\n}\n/**\n * Same as `Array.splice(index, 0, value)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value Value to add to array.\n */\nfunction arrayInsert(array, index, value) {\n    ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n    let end = array.length;\n    while (end > index) {\n        const previousEnd = end - 1;\n        array[end] = array[previousEnd];\n        end = previousEnd;\n    }\n    array[index] = value;\n}\n/**\n * Same as `Array.splice2(index, 0, value1, value2)` but faster.\n *\n * `Array.splice()` is not fast because it has to allocate an array for the elements which were\n * removed. This causes memory pressure and slows down code when most of the time we don't\n * care about the deleted items array.\n *\n * @param array Array to splice.\n * @param index Index in array where the `value` should be added.\n * @param value1 Value to add to array.\n * @param value2 Value to add to array.\n */\nfunction arrayInsert2(array, index, value1, value2) {\n    ngDevMode && assertLessThanOrEqual(index, array.length, 'Can\\'t insert past array end.');\n    let end = array.length;\n    if (end == index) {\n        // inserting at the end.\n        array.push(value1, value2);\n    }\n    else if (end === 1) {\n        // corner case when we have less items in array than we have items to insert.\n        array.push(value2, array[0]);\n        array[0] = value1;\n    }\n    else {\n        end--;\n        array.push(array[end - 1], array[end]);\n        while (end > index) {\n            const previousEnd = end - 2;\n            array[end] = array[previousEnd];\n            end--;\n        }\n        array[index] = value1;\n        array[index + 1] = value2;\n    }\n}\n/**\n * Insert a `value` into an `array` so that the array remains sorted.\n *\n * NOTE:\n * - Duplicates are not allowed, and are ignored.\n * - This uses binary search algorithm for fast inserts.\n *\n * @param array A sorted array to insert into.\n * @param value The value to insert.\n * @returns index of the inserted value.\n */\nfunction arrayInsertSorted(array, value) {\n    let index = arrayIndexOfSorted(array, value);\n    if (index < 0) {\n        // if we did not find it insert it.\n        index = ~index;\n        arrayInsert(array, index, value);\n    }\n    return index;\n}\n/**\n * Remove `value` from a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to remove from.\n * @param value The value to remove.\n * @returns index of the removed value.\n *   - positive index if value found and removed.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     inserted)\n */\nfunction arrayRemoveSorted(array, value) {\n    const index = arrayIndexOfSorted(array, value);\n    if (index >= 0) {\n        arraySplice(array, index, 1);\n    }\n    return index;\n}\n/**\n * Get an index of an `value` in a sorted `array`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n *     located)\n */\nfunction arrayIndexOfSorted(array, value) {\n    return _arrayIndexOfSorted(array, value, 0);\n}\n/**\n * Set a `value` for a `key`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or create.\n * @param value The value to set for a `key`.\n * @returns index (always even) of where the value vas set.\n */\nfunction keyValueArraySet(keyValueArray, key, value) {\n    let index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it set it.\n        keyValueArray[index | 1] = value;\n    }\n    else {\n        index = ~index;\n        arrayInsert2(keyValueArray, index, key, value);\n    }\n    return index;\n}\n/**\n * Retrieve a `value` for a `key` (on `undefined` if not found.)\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @return The `value` stored at the `key` location or `undefined if not found.\n */\nfunction keyValueArrayGet(keyValueArray, key) {\n    const index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it retrieve it.\n        return keyValueArray[index | 1];\n    }\n    return undefined;\n}\n/**\n * Retrieve a `key` index value in the array or `-1` if not found.\n *\n * @param keyValueArray to search.\n * @param key The key to locate.\n * @returns index of where the key is (or should have been.)\n *   - positive (even) index if key found.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been inserted.)\n */\nfunction keyValueArrayIndexOf(keyValueArray, key) {\n    return _arrayIndexOfSorted(keyValueArray, key, 1);\n}\n/**\n * Delete a `key` (and `value`) from the `KeyValueArray`.\n *\n * @param keyValueArray to modify.\n * @param key The key to locate or delete (if exist).\n * @returns index of where the key was (or should have been.)\n *   - positive (even) index if key found and deleted.\n *   - negative index if key not found. (`~index` (even) to get the index where it should have\n *     been.)\n */\nfunction keyValueArrayDelete(keyValueArray, key) {\n    const index = keyValueArrayIndexOf(keyValueArray, key);\n    if (index >= 0) {\n        // if we found it remove it.\n        arraySplice(keyValueArray, index, 2);\n    }\n    return index;\n}\n/**\n * INTERNAL: Get an index of an `value` in a sorted `array` by grouping search by `shift`.\n *\n * NOTE:\n * - This uses binary search algorithm for fast removals.\n *\n * @param array A sorted array to binary search.\n * @param value The value to look for.\n * @param shift grouping shift.\n *   - `0` means look at every location\n *   - `1` means only look at every other (even) location (the odd locations are to be ignored as\n *         they are values.)\n * @returns index of the value.\n *   - positive index if value found.\n *   - negative index if value not found. (`~index` to get the value where it should have been\n * inserted)\n */\nfunction _arrayIndexOfSorted(array, value, shift) {\n    ngDevMode && assertEqual(Array.isArray(array), true, 'Expecting an array');\n    let start = 0;\n    let end = array.length >> shift;\n    while (end !== start) {\n        const middle = start + ((end - start) >> 1); // find the middle.\n        const current = array[middle << shift];\n        if (value === current) {\n            return (middle << shift);\n        }\n        else if (current > value) {\n            end = middle;\n        }\n        else {\n            start = middle + 1; // We already searched middle so make it non-inclusive by adding 1\n        }\n    }\n    return ~(end << shift);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The strategy that the default change detector uses to detect changes.\n * When set, takes effect the next time change detection is triggered.\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n    /**\n     * Use the `CheckOnce` strategy, meaning that automatic change detection is deactivated\n     * until reactivated by setting the strategy to `Default` (`CheckAlways`).\n     * Change detection can still be explicitly invoked.\n     * This strategy applies to all child directives and cannot be overridden.\n     */\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n    /**\n     * Use the default `CheckAlways` strategy, in which change detection is automatic until\n     * explicitly deactivated.\n     */\n    ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Defines the possible states of the default change detector.\n * @see `ChangeDetectorRef`\n */\nvar ChangeDetectorStatus;\n(function (ChangeDetectorStatus) {\n    /**\n     * A state in which, after calling `detectChanges()`, the change detector\n     * state becomes `Checked`, and must be explicitly invoked or reactivated.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n    /**\n     * A state in which change detection is skipped until the change detector mode\n     * becomes `CheckOnce`.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n    /**\n     * A state in which change detection continues automatically until explicitly\n     * deactivated.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n    /**\n     * A state in which a change detector sub tree is not a part of the main tree and\n     * should be skipped.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Detached\"] = 3] = \"Detached\";\n    /**\n     * Indicates that the change detector encountered an error checking a binding\n     * or calling a directive lifecycle method and is now in an inconsistent state. Change\n     * detectors in this state do not detect changes.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n    /**\n     * Indicates that the change detector has been destroyed.\n     */\n    ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\n/**\n * Reports whether a given strategy is currently the default for change detection.\n * @param changeDetectionStrategy The strategy to check.\n * @returns True if the given strategy is the current default, false otherwise.\n * @see `ChangeDetectorStatus`\n * @see `ChangeDetectorRef`\n */\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n    return changeDetectionStrategy == null ||\n        changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n * @usageNotes\n * ### Example\n *\n * {@example core/ts/metadata/encapsulation.ts region='longform'}\n *\n * @publicApi\n */\nvar ViewEncapsulation$1;\n(function (ViewEncapsulation) {\n    /**\n     * Emulate `Native` scoping of styles by adding an attribute containing surrogate id to the Host\n     * Element and pre-processing the style rules provided via {@link Component#styles styles} or\n     * {@link Component#styleUrls styleUrls}, and adding the new Host Element attribute to all\n     * selectors.\n     *\n     * This is the default option.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"Emulated\"] = 0] = \"Emulated\";\n    /**\n     * @deprecated v6.1.0 - use {ViewEncapsulation.ShadowDom} instead.\n     * Use the native encapsulation mechanism of the renderer.\n     *\n     * For the DOM this means using the deprecated [Shadow DOM\n     * v0](https://w3c.github.io/webcomponents/spec/shadow/) and\n     * creating a ShadowRoot for Component's Host Element.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"Native\"] = 1] = \"Native\";\n    /**\n     * Don't provide any template or style encapsulation.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"None\"] = 2] = \"None\";\n    /**\n     * Use Shadow DOM to encapsulate styles.\n     *\n     * For the DOM this means using modern [Shadow\n     * DOM](https://w3c.github.io/webcomponents/spec/shadow/) and\n     * creating a ShadowRoot for Component's Host Element.\n     */\n    ViewEncapsulation[ViewEncapsulation[\"ShadowDom\"] = 3] = \"ShadowDom\";\n})(ViewEncapsulation$1 || (ViewEncapsulation$1 = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ = {};\nconst EMPTY_ARRAY = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n    // These property accesses can be ignored because ngDevMode will be set to false\n    // when optimizing code and the whole if statement will be dropped.\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_OBJ);\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_ARRAY);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _renderCompCount = 0;\n/**\n * Create a component definition object.\n *\n *\n * # Example\n * ```\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵcmp = defineComponent({\n *     ...\n *   });\n * }\n * ```\n * @codeGenApi\n */\nfunction ɵɵdefineComponent(componentDefinition) {\n    return noSideEffects(() => {\n        // Initialize ngDevMode. This must be the first statement in ɵɵdefineComponent.\n        // See the `initNgDevMode` docstring for more information.\n        (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n        const type = componentDefinition.type;\n        const typePrototype = type.prototype;\n        const declaredInputs = {};\n        const def = {\n            type: type,\n            providersResolver: null,\n            decls: componentDefinition.decls,\n            vars: componentDefinition.vars,\n            factory: null,\n            template: componentDefinition.template || null,\n            consts: componentDefinition.consts || null,\n            ngContentSelectors: componentDefinition.ngContentSelectors,\n            hostBindings: componentDefinition.hostBindings || null,\n            hostVars: componentDefinition.hostVars || 0,\n            hostAttrs: componentDefinition.hostAttrs || null,\n            contentQueries: componentDefinition.contentQueries || null,\n            declaredInputs: declaredInputs,\n            inputs: null,\n            outputs: null,\n            exportAs: componentDefinition.exportAs || null,\n            onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n            directiveDefs: null,\n            pipeDefs: null,\n            selectors: componentDefinition.selectors || EMPTY_ARRAY,\n            viewQuery: componentDefinition.viewQuery || null,\n            features: componentDefinition.features || null,\n            data: componentDefinition.data || {},\n            // TODO(misko): convert ViewEncapsulation into const enum so that it can be used\n            // directly in the next line. Also `None` should be 0 not 2.\n            encapsulation: componentDefinition.encapsulation || ViewEncapsulation$1.Emulated,\n            id: 'c',\n            styles: componentDefinition.styles || EMPTY_ARRAY,\n            _: null,\n            setInput: null,\n            schemas: componentDefinition.schemas || null,\n            tView: null,\n        };\n        const directiveTypes = componentDefinition.directives;\n        const feature = componentDefinition.features;\n        const pipeTypes = componentDefinition.pipes;\n        def.id += _renderCompCount++;\n        def.inputs = invertObject(componentDefinition.inputs, declaredInputs),\n            def.outputs = invertObject(componentDefinition.outputs),\n            feature && feature.forEach((fn) => fn(def));\n        def.directiveDefs = directiveTypes ?\n            () => (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n                .map(extractDirectiveDef) :\n            null;\n        def.pipeDefs = pipeTypes ?\n            () => (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef) :\n            null;\n        return def;\n    });\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵsetComponentScope(type, directives, pipes) {\n    const def = type.ɵcmp;\n    def.directiveDefs = () => directives.map(extractDirectiveDef);\n    def.pipeDefs = () => pipes.map(extractPipeDef);\n}\nfunction extractDirectiveDef(type) {\n    const def = getComponentDef(type) || getDirectiveDef(type);\n    if (ngDevMode && !def) {\n        throw new Error(`'${type.name}' is neither 'ComponentType' or 'DirectiveType'.`);\n    }\n    return def;\n}\nfunction extractPipeDef(type) {\n    const def = getPipeDef(type);\n    if (ngDevMode && !def) {\n        throw new Error(`'${type.name}' is not a 'PipeType'.`);\n    }\n    return def;\n}\nconst autoRegisterModuleById = {};\n/**\n * @codeGenApi\n */\nfunction ɵɵdefineNgModule(def) {\n    const res = {\n        type: def.type,\n        bootstrap: def.bootstrap || EMPTY_ARRAY,\n        declarations: def.declarations || EMPTY_ARRAY,\n        imports: def.imports || EMPTY_ARRAY,\n        exports: def.exports || EMPTY_ARRAY,\n        transitiveCompileScopes: null,\n        schemas: def.schemas || null,\n        id: def.id || null,\n    };\n    if (def.id != null) {\n        noSideEffects(() => {\n            autoRegisterModuleById[def.id] = def.type;\n        });\n    }\n    return res;\n}\n/**\n * Adds the module metadata that is necessary to compute the module's transitive scope to an\n * existing module definition.\n *\n * Scope metadata of modules is not used in production builds, so calls to this function can be\n * marked pure to tree-shake it from the bundle, allowing for all referenced declarations\n * to become eligible for tree-shaking as well.\n *\n * @codeGenApi\n */\nfunction ɵɵsetNgModuleScope(type, scope) {\n    return noSideEffects(() => {\n        const ngModuleDef = getNgModuleDef(type, true);\n        ngModuleDef.declarations = scope.declarations || EMPTY_ARRAY;\n        ngModuleDef.imports = scope.imports || EMPTY_ARRAY;\n        ngModuleDef.exports = scope.exports || EMPTY_ARRAY;\n    });\n}\n/**\n * Inverts an inputs or outputs lookup such that the keys, which were the\n * minified keys, are part of the values, and the values are parsed so that\n * the publicName of the property is the new key\n *\n * e.g. for\n *\n * ```\n * class Comp {\n *   @Input()\n *   propName1: string;\n *\n *   @Input('publicName2')\n *   declaredPropName2: number;\n * }\n * ```\n *\n * will be serialized as\n *\n * ```\n * {\n *   propName1: 'propName1',\n *   declaredPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * which is than translated by the minifier as:\n *\n * ```\n * {\n *   minifiedPropName1: 'propName1',\n *   minifiedPropName2: ['publicName2', 'declaredPropName2'],\n * }\n * ```\n *\n * becomes: (public name => minifiedName)\n *\n * ```\n * {\n *  'propName1': 'minifiedPropName1',\n *  'publicName2': 'minifiedPropName2',\n * }\n * ```\n *\n * Optionally the function can take `secondary` which will result in: (public name => declared name)\n *\n * ```\n * {\n *  'propName1': 'propName1',\n *  'publicName2': 'declaredPropName2',\n * }\n * ```\n *\n\n */\nfunction invertObject(obj, secondary) {\n    if (obj == null)\n        return EMPTY_OBJ;\n    const newLookup = {};\n    for (const minifiedKey in obj) {\n        if (obj.hasOwnProperty(minifiedKey)) {\n            let publicName = obj[minifiedKey];\n            let declaredName = publicName;\n            if (Array.isArray(publicName)) {\n                declaredName = publicName[1];\n                publicName = publicName[0];\n            }\n            newLookup[publicName] = minifiedKey;\n            if (secondary) {\n                (secondary[publicName] = declaredName);\n            }\n        }\n    }\n    return newLookup;\n}\n/**\n * Create a directive definition object.\n *\n * # Example\n * ```ts\n * class MyDirective {\n *   // Generated by Angular Template Compiler\n *   // [Symbol] syntax will not be supported by TypeScript until v2.7\n *   static ɵdir = ɵɵdefineDirective({\n *     ...\n *   });\n * }\n * ```\n *\n * @codeGenApi\n */\nconst ɵɵdefineDirective = ɵɵdefineComponent;\n/**\n * Create a pipe definition object.\n *\n * # Example\n * ```\n * class MyPipe implements PipeTransform {\n *   // Generated by Angular Template Compiler\n *   static ɵpipe = definePipe({\n *     ...\n *   });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n *\n * @codeGenApi\n */\nfunction ɵɵdefinePipe(pipeDef) {\n    return {\n        type: pipeDef.type,\n        name: pipeDef.name,\n        factory: null,\n        pure: pipeDef.pure !== false,\n        onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n    };\n}\n/**\n * The following getter methods retrieve the definition form the type. Currently the retrieval\n * honors inheritance, but in the future we may change the rule to require that definitions are\n * explicit. This would require some sort of migration strategy.\n */\nfunction getComponentDef(type) {\n    return type[NG_COMP_DEF] || null;\n}\nfunction getDirectiveDef(type) {\n    return type[NG_DIR_DEF] || null;\n}\nfunction getPipeDef(type) {\n    return type[NG_PIPE_DEF] || null;\n}\nfunction getFactoryDef(type, throwNotFound) {\n    const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);\n    if (!hasFactoryDef && throwNotFound === true && ngDevMode) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵfac' property.`);\n    }\n    return hasFactoryDef ? type[NG_FACTORY_DEF] : null;\n}\nfunction getNgModuleDef(type, throwNotFound) {\n    const ngModuleDef = type[NG_MOD_DEF] || null;\n    if (!ngModuleDef && throwNotFound === true) {\n        throw new Error(`Type ${stringify(type)} does not have 'ɵmod' property.`);\n    }\n    return ngModuleDef;\n}\nfunction getNgLocaleIdDef(type) {\n    return type[NG_LOC_ID_DEF] || null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Below are constants for LView indices to help us look up LView members\n// without having to remember the specific indices.\n// Uglify will inline these when minifying so there shouldn't be a cost.\nconst HOST = 0;\nconst TVIEW = 1;\nconst FLAGS = 2;\nconst PARENT = 3;\nconst NEXT = 4;\nconst TRANSPLANTED_VIEWS_TO_REFRESH = 5;\nconst T_HOST = 6;\nconst CLEANUP = 7;\nconst CONTEXT = 8;\nconst INJECTOR$1 = 9;\nconst RENDERER_FACTORY = 10;\nconst RENDERER = 11;\nconst SANITIZER = 12;\nconst CHILD_HEAD = 13;\nconst CHILD_TAIL = 14;\nconst DECLARATION_VIEW = 15;\nconst DECLARATION_COMPONENT_VIEW = 16;\nconst DECLARATION_LCONTAINER = 17;\nconst PREORDER_HOOK_FLAGS = 18;\nconst QUERIES = 19;\n/** Size of LView's header. Necessary to adjust for it when setting slots.  */\nconst HEADER_OFFSET = 20;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Special location which allows easy identification of type. If we have an array which was\n * retrieved from the `LView` and that array has `true` at `TYPE` location, we know it is\n * `LContainer`.\n */\nconst TYPE = 1;\n/**\n * Below are constants for LContainer indices to help us look up LContainer members\n * without having to remember the specific indices.\n * Uglify will inline these when minifying so there shouldn't be a cost.\n */\n/**\n * Flag to signify that this `LContainer` may have transplanted views which need to be change\n * detected. (see: `LView[DECLARATION_COMPONENT_VIEW])`.\n *\n * This flag, once set, is never unset for the `LContainer`. This means that when unset we can skip\n * a lot of work in `refreshEmbeddedViews`. But when set we still need to verify\n * that the `MOVED_VIEWS` are transplanted and on-push.\n */\nconst HAS_TRANSPLANTED_VIEWS = 2;\n// PARENT, NEXT, TRANSPLANTED_VIEWS_TO_REFRESH are indices 3, 4, and 5\n// As we already have these constants in LView, we don't need to re-create them.\n// T_HOST is index 6\n// We already have this constants in LView, we don't need to re-create it.\nconst NATIVE = 7;\nconst VIEW_REFS = 8;\nconst MOVED_VIEWS = 9;\n/**\n * Size of LContainer's header. Represents the index after which all views in the\n * container will be inserted. We need to keep a record of current views so we know\n * which views are already in the DOM (and don't need to be re-added) and so we can\n * remove views from the DOM when they are no longer required.\n */\nconst CONTAINER_HEADER_OFFSET = 10;\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$1 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * True if `value` is `LView`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLView(value) {\n    return Array.isArray(value) && typeof value[TYPE] === 'object';\n}\n/**\n * True if `value` is `LContainer`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction isLContainer(value) {\n    return Array.isArray(value) && value[TYPE] === true;\n}\nfunction isContentQueryHost(tNode) {\n    return (tNode.flags & 8 /* hasContentQuery */) !== 0;\n}\nfunction isComponentHost(tNode) {\n    return (tNode.flags & 2 /* isComponentHost */) === 2 /* isComponentHost */;\n}\nfunction isDirectiveHost(tNode) {\n    return (tNode.flags & 1 /* isDirectiveHost */) === 1 /* isDirectiveHost */;\n}\nfunction isComponentDef(def) {\n    return def.template !== null;\n}\nfunction isRootView(target) {\n    return (target[FLAGS] & 512 /* IsRoot */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// [Assert functions do not constraint type when they are guarded by a truthy\n// expression.](https://github.com/microsoft/TypeScript/issues/37295)\nfunction assertTNodeForLView(tNode, lView) {\n    tNode.hasOwnProperty('tView_') &&\n        assertEqual(tNode.tView_, lView[TVIEW], 'This TNode does not belong to this LView.');\n}\nfunction assertComponentType(actual, msg = 'Type passed in is not ComponentType, it does not have \\'ɵcmp\\' property.') {\n    if (!getComponentDef(actual)) {\n        throwError(msg);\n    }\n}\nfunction assertNgModuleType(actual, msg = 'Type passed in is not NgModuleType, it does not have \\'ɵmod\\' property.') {\n    if (!getNgModuleDef(actual)) {\n        throwError(msg);\n    }\n}\nfunction assertPreviousIsParent(isParent) {\n    assertEqual(isParent, true, 'previousOrParentTNode should be a parent');\n}\nfunction assertHasParent(tNode) {\n    assertDefined(tNode, 'previousOrParentTNode should exist!');\n    assertDefined(tNode.parent, 'previousOrParentTNode should have a parent');\n}\nfunction assertDataNext(lView, index, arr) {\n    if (arr == null)\n        arr = lView;\n    assertEqual(arr.length, index, `index ${index} expected to be at the end of arr (length ${arr.length})`);\n}\nfunction assertLContainer(value) {\n    assertDefined(value, 'LContainer must be defined');\n    assertEqual(isLContainer(value), true, 'Expecting LContainer');\n}\nfunction assertLViewOrUndefined(value) {\n    value && assertEqual(isLView(value), true, 'Expecting LView or undefined or null');\n}\nfunction assertLView(value) {\n    assertDefined(value, 'LView must be defined');\n    assertEqual(isLView(value), true, 'Expecting LView');\n}\nfunction assertFirstCreatePass(tView, errMessage) {\n    assertEqual(tView.firstCreatePass, true, errMessage || 'Should only be called in first create pass.');\n}\nfunction assertFirstUpdatePass(tView, errMessage) {\n    assertEqual(tView.firstUpdatePass, true, errMessage || 'Should only be called in first update pass.');\n}\n/**\n * This is a basic sanity check that an object is probably a directive def. DirectiveDef is\n * an interface, so we can't do a direct instanceof check.\n */\nfunction assertDirectiveDef(obj) {\n    if (obj.type === undefined || obj.selectors == undefined || obj.inputs === undefined) {\n        throwError(`Expected a DirectiveDef/ComponentDef and this object does not seem to have the expected shape.`);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a basic change from a previous to a new value for a single\n * property on a directive instance. Passed as a value in a\n * {@link SimpleChanges} object to the `ngOnChanges` hook.\n *\n * @see `OnChanges`\n *\n * @publicApi\n */\nclass SimpleChange {\n    constructor(previousValue, currentValue, firstChange) {\n        this.previousValue = previousValue;\n        this.currentValue = currentValue;\n        this.firstChange = firstChange;\n    }\n    /**\n     * Check whether the new value is the first value assigned.\n     */\n    isFirstChange() {\n        return this.firstChange;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The NgOnChangesFeature decorates a component with support for the ngOnChanges\n * lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * If the component or directive uses inheritance, the NgOnChangesFeature MUST\n * be included as a feature AFTER {@link InheritDefinitionFeature}, otherwise\n * inherited properties will not be propagated to the ngOnChanges lifecycle\n * hook.\n *\n * Example usage:\n *\n * ```\n * static ɵcmp = defineComponent({\n *   ...\n *   inputs: {name: 'publicName'},\n *   features: [NgOnChangesFeature]\n * });\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵNgOnChangesFeature() {\n    return NgOnChangesFeatureImpl;\n}\nfunction NgOnChangesFeatureImpl(definition) {\n    if (definition.type.prototype.ngOnChanges) {\n        definition.setInput = ngOnChangesSetInput;\n    }\n    return rememberChangeHistoryAndInvokeOnChangesHook;\n}\n// This option ensures that the ngOnChanges lifecycle hook will be inherited\n// from superclasses (in InheritDefinitionFeature).\n/** @nocollapse */\n// tslint:disable-next-line:no-toplevel-property-access\nɵɵNgOnChangesFeature.ngInherit = true;\n/**\n * This is a synthetic lifecycle hook which gets inserted into `TView.preOrderHooks` to simulate\n * `ngOnChanges`.\n *\n * The hook reads the `NgSimpleChangesStore` data from the component instance and if changes are\n * found it invokes `ngOnChanges` on the component instance.\n *\n * @param this Component instance. Because this function gets inserted into `TView.preOrderHooks`,\n *     it is guaranteed to be called with component instance.\n */\nfunction rememberChangeHistoryAndInvokeOnChangesHook() {\n    const simpleChangesStore = getSimpleChangesStore(this);\n    const current = simpleChangesStore === null || simpleChangesStore === void 0 ? void 0 : simpleChangesStore.current;\n    if (current) {\n        const previous = simpleChangesStore.previous;\n        if (previous === EMPTY_OBJ) {\n            simpleChangesStore.previous = current;\n        }\n        else {\n            // New changes are copied to the previous store, so that we don't lose history for inputs\n            // which were not changed this time\n            for (let key in current) {\n                previous[key] = current[key];\n            }\n        }\n        simpleChangesStore.current = null;\n        this.ngOnChanges(current);\n    }\n}\nfunction ngOnChangesSetInput(instance, value, publicName, privateName) {\n    const simpleChangesStore = getSimpleChangesStore(instance) ||\n        setSimpleChangesStore(instance, { previous: EMPTY_OBJ, current: null });\n    const current = simpleChangesStore.current || (simpleChangesStore.current = {});\n    const previous = simpleChangesStore.previous;\n    const declaredName = this.declaredInputs[publicName];\n    const previousChange = previous[declaredName];\n    current[declaredName] = new SimpleChange(previousChange && previousChange.currentValue, value, previous === EMPTY_OBJ);\n    instance[privateName] = value;\n}\nconst SIMPLE_CHANGES_STORE = '__ngSimpleChanges__';\nfunction getSimpleChangesStore(instance) {\n    return instance[SIMPLE_CHANGES_STORE] || null;\n}\nfunction setSimpleChangesStore(instance, store) {\n    return instance[SIMPLE_CHANGES_STORE] = store;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nconst MATH_ML_NAMESPACE = 'http://www.w3.org/1998/MathML/';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This property will be monkey-patched on elements, components and directives\n */\nconst MONKEY_PATCH_KEY_NAME = '__ngContext__';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Most of the use of `document` in Angular is from within the DI system so it is possible to simply\n * inject the `DOCUMENT` token and are done.\n *\n * Ivy is special because it does not rely upon the DI and must get hold of the document some other\n * way.\n *\n * The solution is to define `getDocument()` and `setDocument()` top-level functions for ivy.\n * Wherever ivy needs the global document, it calls `getDocument()` instead.\n *\n * When running ivy outside of a browser environment, it is necessary to call `setDocument()` to\n * tell ivy what the global `document` is.\n *\n * Angular does this for us in each of the standard platforms (`Browser`, `Server`, and `WebWorker`)\n * by calling `setDocument()` when providing the `DOCUMENT` token.\n */\nlet DOCUMENT = undefined;\n/**\n * Tell ivy what the `document` is for this platform.\n *\n * It is only necessary to call this if the current platform is not a browser.\n *\n * @param document The object representing the global `document` in this environment.\n */\nfunction setDocument(document) {\n    DOCUMENT = document;\n}\n/**\n * Access the object that represents the `document` for this platform.\n *\n * Ivy calls this whenever it needs to access the `document` object.\n * For example to create the renderer or to do sanitization.\n */\nfunction getDocument() {\n    if (DOCUMENT !== undefined) {\n        return DOCUMENT;\n    }\n    else if (typeof document !== 'undefined') {\n        return document;\n    }\n    // No \"document\" can be found. This should only happen if we are running ivy outside Angular and\n    // the current platform is not a browser. Since this is not a supported scenario at the moment\n    // this should not happen in Angular apps.\n    // Once we support running ivy outside of Angular we will need to publish `setDocument()` as a\n    // public API. Meanwhile we just return `undefined` and let the application fail.\n    return undefined;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n(function (RendererStyleFlags3) {\n    RendererStyleFlags3[RendererStyleFlags3[\"Important\"] = 1] = \"Important\";\n    RendererStyleFlags3[RendererStyleFlags3[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags3 || (RendererStyleFlags3 = {}));\n/** Returns whether the `renderer` is a `ProceduralRenderer3` */\nfunction isProceduralRenderer(renderer) {\n    return !!(renderer.listen);\n}\nconst ɵ0$2 = (hostElement, rendererType) => {\n    return getDocument();\n};\nconst domRendererFactory3 = {\n    createRenderer: ɵ0$2\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$2 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * For efficiency reasons we often put several different data types (`RNode`, `LView`, `LContainer`)\n * in same location in `LView`. This is because we don't want to pre-allocate space for it\n * because the storage is sparse. This file contains utilities for dealing with such data types.\n *\n * How do we know what is stored at a given location in `LView`.\n * - `Array.isArray(value) === false` => `RNode` (The normal storage value)\n * - `Array.isArray(value) === true` => then the `value[0]` represents the wrapped value.\n *   - `typeof value[TYPE] === 'object'` => `LView`\n *      - This happens when we have a component at a given location\n *   - `typeof value[TYPE] === true` => `LContainer`\n *      - This happens when we have `LContainer` binding at a given location.\n *\n *\n * NOTE: it is assumed that `Array.isArray` and `typeof` operations are very efficient.\n */\n/**\n * Returns `RNode`.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapRNode(value) {\n    while (Array.isArray(value)) {\n        value = value[HOST];\n    }\n    return value;\n}\n/**\n * Returns `LView` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLView(value) {\n    while (Array.isArray(value)) {\n        // This check is same as `isLView()` but we don't call at as we don't want to call\n        // `Array.isArray()` twice and give JITer more work for inlining.\n        if (typeof value[TYPE] === 'object')\n            return value;\n        value = value[HOST];\n    }\n    return null;\n}\n/**\n * Returns `LContainer` or `null` if not found.\n * @param value wrapped value of `RNode`, `LView`, `LContainer`\n */\nfunction unwrapLContainer(value) {\n    while (Array.isArray(value)) {\n        // This check is same as `isLContainer()` but we don't call at as we don't want to call\n        // `Array.isArray()` twice and give JITer more work for inlining.\n        if (value[TYPE] === true)\n            return value;\n        value = value[HOST];\n    }\n    return null;\n}\n/**\n * Retrieves an element value from the provided `viewData`, by unwrapping\n * from any containers, component views, or style contexts.\n */\nfunction getNativeByIndex(index, lView) {\n    return unwrapRNode(lView[index + HEADER_OFFSET]);\n}\n/**\n * Retrieve an `RNode` for a given `TNode` and `LView`.\n *\n * This function guarantees in dev mode to retrieve a non-null `RNode`.\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNode(tNode, lView) {\n    ngDevMode && assertTNodeForLView(tNode, lView);\n    ngDevMode && assertIndexInRange(lView, tNode.index);\n    const node = unwrapRNode(lView[tNode.index]);\n    ngDevMode && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n    return node;\n}\n/**\n * Retrieve an `RNode` or `null` for a given `TNode` and `LView`.\n *\n * Some `TNode`s don't have associated `RNode`s. For example `Projection`\n *\n * @param tNode\n * @param lView\n */\nfunction getNativeByTNodeOrNull(tNode, lView) {\n    const index = tNode.index;\n    if (index !== -1) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        const node = unwrapRNode(lView[index]);\n        ngDevMode && node !== null && !isProceduralRenderer(lView[RENDERER]) && assertDomNode(node);\n        return node;\n    }\n    return null;\n}\nfunction getTNode(tView, index) {\n    ngDevMode && assertGreaterThan(index, -1, 'wrong index for TNode');\n    ngDevMode && assertLessThan(index, tView.data.length, 'wrong index for TNode');\n    return tView.data[index + HEADER_OFFSET];\n}\n/** Retrieves a value from any `LView` or `TData`. */\nfunction load(view, index) {\n    ngDevMode && assertIndexInRange(view, index + HEADER_OFFSET);\n    return view[index + HEADER_OFFSET];\n}\nfunction getComponentLViewByIndex(nodeIndex, hostView) {\n    // Could be an LView or an LContainer. If LContainer, unwrap to find LView.\n    ngDevMode && assertIndexInRange(hostView, nodeIndex);\n    const slotValue = hostView[nodeIndex];\n    const lView = isLView(slotValue) ? slotValue : slotValue[HOST];\n    return lView;\n}\n/**\n * Returns the monkey-patch value data present on the target (which could be\n * a component, directive or a DOM node).\n */\nfunction readPatchedData(target) {\n    ngDevMode && assertDefined(target, 'Target expected');\n    return target[MONKEY_PATCH_KEY_NAME] || null;\n}\nfunction readPatchedLView(target) {\n    const value = readPatchedData(target);\n    if (value) {\n        return Array.isArray(value) ? value : value.lView;\n    }\n    return null;\n}\n/** Checks whether a given view is in creation mode */\nfunction isCreationMode(view) {\n    return (view[FLAGS] & 4 /* CreationMode */) === 4 /* CreationMode */;\n}\n/**\n * Returns a boolean for whether the view is attached to the change detection tree.\n *\n * Note: This determines whether a view should be checked, not whether it's inserted\n * into a container. For that, you'll want `viewAttachedToContainer` below.\n */\nfunction viewAttachedToChangeDetector(view) {\n    return (view[FLAGS] & 128 /* Attached */) === 128 /* Attached */;\n}\n/** Returns a boolean for whether the view is attached to a container. */\nfunction viewAttachedToContainer(view) {\n    return isLContainer(view[PARENT]);\n}\n/** Returns a constant from `TConstants` instance. */\nfunction getConstant(consts, index) {\n    return consts === null || index == null ? null : consts[index];\n}\n/**\n * Resets the pre-order hook flags of the view.\n * @param lView the LView on which the flags are reset\n */\nfunction resetPreOrderHookFlags(lView) {\n    lView[PREORDER_HOOK_FLAGS] = 0;\n}\n/**\n * Updates the `TRANSPLANTED_VIEWS_TO_REFRESH` counter on the `LContainer` as well as the parents\n * whose\n *  1. counter goes from 0 to 1, indicating that there is a new child that has a view to refresh\n *  or\n *  2. counter goes from 1 to 0, indicating there are no more descendant views to refresh\n */\nfunction updateTransplantedViewCount(lContainer, amount) {\n    lContainer[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n    let viewOrContainer = lContainer;\n    let parent = lContainer[PARENT];\n    while (parent !== null &&\n        ((amount === 1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 1) ||\n            (amount === -1 && viewOrContainer[TRANSPLANTED_VIEWS_TO_REFRESH] === 0))) {\n        parent[TRANSPLANTED_VIEWS_TO_REFRESH] += amount;\n        viewOrContainer = parent;\n        parent = parent[PARENT];\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst instructionState = {\n    lFrame: createLFrame(null),\n    bindingsEnabled: true,\n    checkNoChangesMode: false,\n};\nfunction getElementDepthCount() {\n    return instructionState.lFrame.elementDepthCount;\n}\nfunction increaseElementDepthCount() {\n    instructionState.lFrame.elementDepthCount++;\n}\nfunction decreaseElementDepthCount() {\n    instructionState.lFrame.elementDepthCount--;\n}\nfunction getBindingsEnabled() {\n    return instructionState.bindingsEnabled;\n}\n/**\n * Enables directive matching on elements.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵenableBindings() {\n    instructionState.bindingsEnabled = true;\n}\n/**\n * Disables directive matching on element.\n *\n *  * Example:\n * ```\n * <my-comp my-directive>\n *   Should match component / directive.\n * </my-comp>\n * <div ngNonBindable>\n *   <!-- ɵɵdisableBindings() -->\n *   <my-comp my-directive>\n *     Should not match component / directive because we are in ngNonBindable.\n *   </my-comp>\n *   <!-- ɵɵenableBindings() -->\n * </div>\n * ```\n *\n * @codeGenApi\n */\nfunction ɵɵdisableBindings() {\n    instructionState.bindingsEnabled = false;\n}\n/**\n * Return the current `LView`.\n */\nfunction getLView() {\n    return instructionState.lFrame.lView;\n}\n/**\n * Return the current `TView`.\n */\nfunction getTView() {\n    return instructionState.lFrame.tView;\n}\n/**\n * Restores `contextViewData` to the given OpaqueViewState instance.\n *\n * Used in conjunction with the getCurrentView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @param viewToRestore The OpaqueViewState instance to restore.\n *\n * @codeGenApi\n */\nfunction ɵɵrestoreView(viewToRestore) {\n    instructionState.lFrame.contextLView = viewToRestore;\n}\nfunction getPreviousOrParentTNode() {\n    return instructionState.lFrame.previousOrParentTNode;\n}\nfunction setPreviousOrParentTNode(tNode, isParent) {\n    instructionState.lFrame.previousOrParentTNode = tNode;\n    instructionState.lFrame.isParent = isParent;\n}\nfunction getIsParent() {\n    return instructionState.lFrame.isParent;\n}\nfunction setIsNotParent() {\n    instructionState.lFrame.isParent = false;\n}\nfunction setIsParent() {\n    instructionState.lFrame.isParent = true;\n}\nfunction getContextLView() {\n    return instructionState.lFrame.contextLView;\n}\nfunction getCheckNoChangesMode() {\n    // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.\n    return instructionState.checkNoChangesMode;\n}\nfunction setCheckNoChangesMode(mode) {\n    instructionState.checkNoChangesMode = mode;\n}\n// top level variables should not be exported for performance reasons (PERF_NOTES.md)\nfunction getBindingRoot() {\n    const lFrame = instructionState.lFrame;\n    let index = lFrame.bindingRootIndex;\n    if (index === -1) {\n        index = lFrame.bindingRootIndex = lFrame.tView.bindingStartIndex;\n    }\n    return index;\n}\nfunction getBindingIndex() {\n    return instructionState.lFrame.bindingIndex;\n}\nfunction setBindingIndex(value) {\n    return instructionState.lFrame.bindingIndex = value;\n}\nfunction nextBindingIndex() {\n    return instructionState.lFrame.bindingIndex++;\n}\nfunction incrementBindingIndex(count) {\n    const lFrame = instructionState.lFrame;\n    const index = lFrame.bindingIndex;\n    lFrame.bindingIndex = lFrame.bindingIndex + count;\n    return index;\n}\n/**\n * Set a new binding root index so that host template functions can execute.\n *\n * Bindings inside the host template are 0 index. But because we don't know ahead of time\n * how many host bindings we have we can't pre-compute them. For this reason they are all\n * 0 index and we just shift the root so that they match next available location in the LView.\n *\n * @param bindingRootIndex Root index for `hostBindings`\n * @param currentDirectiveIndex `TData[currentDirectiveIndex]` will point to the current directive\n *        whose `hostBindings` are being processed.\n */\nfunction setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex) {\n    const lFrame = instructionState.lFrame;\n    lFrame.bindingIndex = lFrame.bindingRootIndex = bindingRootIndex;\n    setCurrentDirectiveIndex(currentDirectiveIndex);\n}\n/**\n * When host binding is executing this points to the directive index.\n * `TView.data[getCurrentDirectiveIndex()]` is `DirectiveDef`\n * `LView[getCurrentDirectiveIndex()]` is directive instance.\n */\nfunction getCurrentDirectiveIndex() {\n    return instructionState.lFrame.currentDirectiveIndex;\n}\n/**\n * Sets an index of a directive whose `hostBindings` are being processed.\n *\n * @param currentDirectiveIndex `TData` index where current directive instance can be found.\n */\nfunction setCurrentDirectiveIndex(currentDirectiveIndex) {\n    instructionState.lFrame.currentDirectiveIndex = currentDirectiveIndex;\n}\n/**\n * Retrieve the current `DirectiveDef` which is active when `hostBindings` instruction is being\n * executed.\n *\n * @param tData Current `TData` where the `DirectiveDef` will be looked up at.\n */\nfunction getCurrentDirectiveDef(tData) {\n    const currentDirectiveIndex = instructionState.lFrame.currentDirectiveIndex;\n    return currentDirectiveIndex === -1 ? null : tData[currentDirectiveIndex];\n}\nfunction getCurrentQueryIndex() {\n    return instructionState.lFrame.currentQueryIndex;\n}\nfunction setCurrentQueryIndex(value) {\n    instructionState.lFrame.currentQueryIndex = value;\n}\n/**\n * This is a light weight version of the `enterView` which is needed by the DI system.\n * @param newView\n * @param tNode\n */\nfunction enterDI(newView, tNode) {\n    ngDevMode && assertLViewOrUndefined(newView);\n    const newLFrame = allocLFrame();\n    instructionState.lFrame = newLFrame;\n    newLFrame.previousOrParentTNode = tNode;\n    newLFrame.lView = newView;\n}\n/**\n * Swap the current lView with a new lView.\n *\n * For performance reasons we store the lView in the top level of the module.\n * This way we minimize the number of properties to read. Whenever a new view\n * is entered we have to store the lView for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New lView to become active\n * @param tNode Element to which the View is a child of\n * @returns the previously active lView;\n */\nfunction enterView(newView, tNode) {\n    ngDevMode && assertLViewOrUndefined(newView);\n    const newLFrame = allocLFrame();\n    if (ngDevMode) {\n        assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');\n        assertEqual(newLFrame.lView, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.tView, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.selectedIndex, 0, 'Expected clean LFrame');\n        assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');\n        assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');\n        assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');\n    }\n    const tView = newView[TVIEW];\n    instructionState.lFrame = newLFrame;\n    newLFrame.previousOrParentTNode = tNode;\n    newLFrame.lView = newView;\n    newLFrame.tView = tView;\n    newLFrame.contextLView = newView;\n    newLFrame.bindingIndex = tView.bindingStartIndex;\n}\n/**\n * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.\n */\nfunction allocLFrame() {\n    const currentLFrame = instructionState.lFrame;\n    const childLFrame = currentLFrame === null ? null : currentLFrame.child;\n    const newLFrame = childLFrame === null ? createLFrame(currentLFrame) : childLFrame;\n    return newLFrame;\n}\nfunction createLFrame(parent) {\n    const lFrame = {\n        previousOrParentTNode: null,\n        isParent: true,\n        lView: null,\n        tView: null,\n        selectedIndex: 0,\n        contextLView: null,\n        elementDepthCount: 0,\n        currentNamespace: null,\n        currentDirectiveIndex: -1,\n        bindingRootIndex: -1,\n        bindingIndex: -1,\n        currentQueryIndex: 0,\n        parent: parent,\n        child: null,\n    };\n    parent !== null && (parent.child = lFrame); // link the new LFrame for reuse.\n    return lFrame;\n}\n/**\n * A lightweight version of leave which is used with DI.\n *\n * This function only resets `previousOrParentTNode` and `LView` as those are the only properties\n * used with DI (`enterDI()`).\n *\n * NOTE: This function is reexported as `leaveDI`. However `leaveDI` has return type of `void` where\n * as `leaveViewLight` has `LFrame`. This is so that `leaveViewLight` can be used in `leaveView`.\n */\nfunction leaveViewLight() {\n    const oldLFrame = instructionState.lFrame;\n    instructionState.lFrame = oldLFrame.parent;\n    oldLFrame.previousOrParentTNode = null;\n    oldLFrame.lView = null;\n    return oldLFrame;\n}\n/**\n * This is a lightweight version of the `leaveView` which is needed by the DI system.\n *\n * NOTE: this function is an alias so that we can change the type of the function to have `void`\n * return type.\n */\nconst leaveDI = leaveViewLight;\n/**\n * Leave the current `LView`\n *\n * This pops the `LFrame` with the associated `LView` from the stack.\n *\n * IMPORTANT: We must zero out the `LFrame` values here otherwise they will be retained. This is\n * because for performance reasons we don't release `LFrame` but rather keep it for next use.\n */\nfunction leaveView() {\n    const oldLFrame = leaveViewLight();\n    oldLFrame.isParent = true;\n    oldLFrame.tView = null;\n    oldLFrame.selectedIndex = 0;\n    oldLFrame.contextLView = null;\n    oldLFrame.elementDepthCount = 0;\n    oldLFrame.currentDirectiveIndex = -1;\n    oldLFrame.currentNamespace = null;\n    oldLFrame.bindingRootIndex = -1;\n    oldLFrame.bindingIndex = -1;\n    oldLFrame.currentQueryIndex = 0;\n}\nfunction nextContextImpl(level) {\n    const contextLView = instructionState.lFrame.contextLView =\n        walkUpViews(level, instructionState.lFrame.contextLView);\n    return contextLView[CONTEXT];\n}\nfunction walkUpViews(nestingLevel, currentView) {\n    while (nestingLevel > 0) {\n        ngDevMode &&\n            assertDefined(currentView[DECLARATION_VIEW], 'Declaration view should be defined if nesting level is greater than 0.');\n        currentView = currentView[DECLARATION_VIEW];\n        nestingLevel--;\n    }\n    return currentView;\n}\n/**\n * Gets the currently selected element index.\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n */\nfunction getSelectedIndex() {\n    return instructionState.lFrame.selectedIndex;\n}\n/**\n * Sets the most recent index passed to {@link select}\n *\n * Used with {@link property} instruction (and more in the future) to identify the index in the\n * current `LView` to act on.\n *\n * (Note that if an \"exit function\" was set earlier (via `setElementExitFn()`) then that will be\n * run if and when the provided `index` value is different from the current selected index value.)\n */\nfunction setSelectedIndex(index) {\n    instructionState.lFrame.selectedIndex = index;\n}\n/**\n * Gets the `tNode` that represents currently selected element.\n */\nfunction getSelectedTNode() {\n    const lFrame = instructionState.lFrame;\n    return getTNode(lFrame.tView, lFrame.selectedIndex);\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/2000/svg'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceSVG() {\n    instructionState.lFrame.currentNamespace = SVG_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `'http://www.w3.org/1998/MathML/'` in global state.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceMathML() {\n    instructionState.lFrame.currentNamespace = MATH_ML_NAMESPACE;\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n *\n * @codeGenApi\n */\nfunction ɵɵnamespaceHTML() {\n    namespaceHTMLInternal();\n}\n/**\n * Sets the namespace used to create elements to `null`, which forces element creation to use\n * `createElement` rather than `createElementNS`.\n */\nfunction namespaceHTMLInternal() {\n    instructionState.lFrame.currentNamespace = null;\n}\nfunction getNamespace() {\n    return instructionState.lFrame.currentNamespace;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds all directive lifecycle hooks from the given `DirectiveDef` to the given `TView`.\n *\n * Must be run *only* on the first template pass.\n *\n * Sets up the pre-order hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * @param directiveIndex The index of the directive in LView\n * @param directiveDef The definition containing the hooks to setup in tView\n * @param tView The current TView\n */\nfunction registerPreOrderHooks(directiveIndex, directiveDef, tView) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const { ngOnChanges, ngOnInit, ngDoCheck } = directiveDef.type.prototype;\n    if (ngOnChanges) {\n        const wrappedOnChanges = NgOnChangesFeatureImpl(directiveDef);\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, wrappedOnChanges);\n        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n            .push(directiveIndex, wrappedOnChanges);\n    }\n    if (ngOnInit) {\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(0 - directiveIndex, ngOnInit);\n    }\n    if (ngDoCheck) {\n        (tView.preOrderHooks || (tView.preOrderHooks = [])).push(directiveIndex, ngDoCheck);\n        (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = [])).push(directiveIndex, ngDoCheck);\n    }\n}\n/**\n *\n * Loops through the directives on the provided `tNode` and queues hooks to be\n * run that are not initialization hooks.\n *\n * Should be executed during `elementEnd()` and similar to\n * preserve hook execution order. Content, view, and destroy hooks for projected\n * components and directives must be called *before* their hosts.\n *\n * Sets up the content, view, and destroy hooks on the provided `tView`,\n * see {@link HookData} for details about the data structure.\n *\n * NOTE: This does not set up `onChanges`, `onInit` or `doCheck`, those are set up\n * separately at `elementStart`.\n *\n * @param tView The current TView\n * @param tNode The TNode whose directives are to be searched for hooks to queue\n */\nfunction registerPostOrderHooks(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    // It's necessary to loop through the directives at elementEnd() (rather than processing in\n    // directiveCreate) so we can preserve the current hook order. Content, view, and destroy\n    // hooks for projected components and directives must be called *before* their hosts.\n    for (let i = tNode.directiveStart, end = tNode.directiveEnd; i < end; i++) {\n        const directiveDef = tView.data[i];\n        const lifecycleHooks = directiveDef.type.prototype;\n        const { ngAfterContentInit, ngAfterContentChecked, ngAfterViewInit, ngAfterViewChecked, ngOnDestroy } = lifecycleHooks;\n        if (ngAfterContentInit) {\n            (tView.contentHooks || (tView.contentHooks = [])).push(-i, ngAfterContentInit);\n        }\n        if (ngAfterContentChecked) {\n            (tView.contentHooks || (tView.contentHooks = [])).push(i, ngAfterContentChecked);\n            (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, ngAfterContentChecked);\n        }\n        if (ngAfterViewInit) {\n            (tView.viewHooks || (tView.viewHooks = [])).push(-i, ngAfterViewInit);\n        }\n        if (ngAfterViewChecked) {\n            (tView.viewHooks || (tView.viewHooks = [])).push(i, ngAfterViewChecked);\n            (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, ngAfterViewChecked);\n        }\n        if (ngOnDestroy != null) {\n            (tView.destroyHooks || (tView.destroyHooks = [])).push(i, ngOnDestroy);\n        }\n    }\n}\n/**\n * Executing hooks requires complex logic as we need to deal with 2 constraints.\n *\n * 1. Init hooks (ngOnInit, ngAfterContentInit, ngAfterViewInit) must all be executed once and only\n * once, across many change detection cycles. This must be true even if some hooks throw, or if\n * some recursively trigger a change detection cycle.\n * To solve that, it is required to track the state of the execution of these init hooks.\n * This is done by storing and maintaining flags in the view: the {@link InitPhaseState},\n * and the index within that phase. They can be seen as a cursor in the following structure:\n * [[onInit1, onInit2], [afterContentInit1], [afterViewInit1, afterViewInit2, afterViewInit3]]\n * They are are stored as flags in LView[FLAGS].\n *\n * 2. Pre-order hooks can be executed in batches, because of the select instruction.\n * To be able to pause and resume their execution, we also need some state about the hook's array\n * that is being processed:\n * - the index of the next hook to be executed\n * - the number of init hooks already found in the processed part of the  array\n * They are are stored as flags in LView[PREORDER_HOOK_FLAGS].\n */\n/**\n * Executes pre-order check hooks ( OnChanges, DoChanges) given a view where all the init hooks were\n * executed once. This is a light version of executeInitAndCheckPreOrderHooks where we can skip read\n * / write of the init-hooks related flags.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeCheckHooks(lView, hooks, nodeIndex) {\n    callHooks(lView, hooks, 3 /* InitPhaseCompleted */, nodeIndex);\n}\n/**\n * Executes post-order init and check hooks (one of AfterContentInit, AfterContentChecked,\n * AfterViewInit, AfterViewChecked) given a view where there are pending init hooks to be executed.\n * @param lView The LView where hooks are defined\n * @param hooks Hooks to be run\n * @param initPhase A phase for which hooks should be run\n * @param nodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction executeInitAndCheckHooks(lView, hooks, initPhase, nodeIndex) {\n    ngDevMode &&\n        assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init pre-order hooks should not be called more than once');\n    if ((lView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n        callHooks(lView, hooks, initPhase, nodeIndex);\n    }\n}\nfunction incrementInitPhaseFlags(lView, initPhase) {\n    ngDevMode &&\n        assertNotEqual(initPhase, 3 /* InitPhaseCompleted */, 'Init hooks phase should not be incremented after all init hooks have been run.');\n    let flags = lView[FLAGS];\n    if ((flags & 3 /* InitPhaseStateMask */) === initPhase) {\n        flags &= 2047 /* IndexWithinInitPhaseReset */;\n        flags += 1 /* InitPhaseStateIncrementer */;\n        lView[FLAGS] = flags;\n    }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * the first LView pass\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n * @param initPhaseState the current state of the init phase\n * @param currentNodeIndex 3 cases depending on the value:\n * - undefined: all hooks from the array should be executed (post-order case)\n * - null: execute hooks only from the saved index until the end of the array (pre-order case, when\n * flushing the remaining hooks)\n * - number: execute hooks only from the saved index until that node index exclusive (pre-order\n * case, when executing select(number))\n */\nfunction callHooks(currentView, arr, initPhase, currentNodeIndex) {\n    ngDevMode &&\n        assertEqual(getCheckNoChangesMode(), false, 'Hooks should never be run in the check no changes mode.');\n    const startIndex = currentNodeIndex !== undefined ?\n        (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :\n        0;\n    const nodeIndexLimit = currentNodeIndex != null ? currentNodeIndex : -1;\n    let lastNodeIndexFound = 0;\n    for (let i = startIndex; i < arr.length; i++) {\n        const hook = arr[i + 1];\n        if (typeof hook === 'number') {\n            lastNodeIndexFound = arr[i];\n            if (currentNodeIndex != null && lastNodeIndexFound >= currentNodeIndex) {\n                break;\n            }\n        }\n        else {\n            const isInitHook = arr[i] < 0;\n            if (isInitHook)\n                currentView[PREORDER_HOOK_FLAGS] += 65536 /* NumberOfInitHooksCalledIncrementer */;\n            if (lastNodeIndexFound < nodeIndexLimit || nodeIndexLimit == -1) {\n                callHook(currentView, initPhase, arr, i);\n                currentView[PREORDER_HOOK_FLAGS] =\n                    (currentView[PREORDER_HOOK_FLAGS] & 4294901760 /* NumberOfInitHooksCalledMask */) + i +\n                        2;\n            }\n            i++;\n        }\n    }\n}\n/**\n * Execute one hook against the current `LView`.\n *\n * @param currentView The current view\n * @param initPhaseState the current state of the init phase\n * @param arr The array in which the hooks are found\n * @param i The current index within the hook data array\n */\nfunction callHook(currentView, initPhase, arr, i) {\n    const isInitHook = arr[i] < 0;\n    const hook = arr[i + 1];\n    const directiveIndex = isInitHook ? -arr[i] : arr[i];\n    const directive = currentView[directiveIndex];\n    if (isInitHook) {\n        const indexWithintInitPhase = currentView[FLAGS] >> 11 /* IndexWithinInitPhaseShift */;\n        // The init phase state must be always checked here as it may have been recursively\n        // updated\n        if (indexWithintInitPhase <\n            (currentView[PREORDER_HOOK_FLAGS] >> 16 /* NumberOfInitHooksCalledShift */) &&\n            (currentView[FLAGS] & 3 /* InitPhaseStateMask */) === initPhase) {\n            currentView[FLAGS] += 2048 /* IndexWithinInitPhaseIncrementer */;\n            hook.call(directive);\n        }\n    }\n    else {\n        hook.call(directive);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst TNODE = 8;\nconst PARENT_INJECTOR = 8;\nconst INJECTOR_BLOOM_PARENT_SIZE = 9;\nconst NO_PARENT_INJECTOR = -1;\n/**\n * Each injector is saved in 9 contiguous slots in `LView` and 9 contiguous slots in\n * `TView.data`. This allows us to store information about the current node's tokens (which\n * can be shared in `TView`) as well as the tokens of its ancestor nodes (which cannot be\n * shared, so they live in `LView`).\n *\n * Each of these slots (aside from the last slot) contains a bloom filter. This bloom filter\n * determines whether a directive is available on the associated node or not. This prevents us\n * from searching the directives array at this level unless it's probable the directive is in it.\n *\n * See: https://en.wikipedia.org/wiki/Bloom_filter for more about bloom filters.\n *\n * Because all injectors have been flattened into `LView` and `TViewData`, they cannot typed\n * using interfaces as they were previously. The start index of each `LInjector` and `TInjector`\n * will differ based on where it is flattened into the main array, so it's not possible to know\n * the indices ahead of time and save their types here. The interfaces are still included here\n * for documentation purposes.\n *\n * export interface LInjector extends Array<any> {\n *\n *    // Cumulative bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Cumulative bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Cumulative bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Cumulative bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Cumulative bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Cumulative bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Cumulative bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Cumulative bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // We need to store a reference to the injector's parent so DI can keep looking up\n *    // the injector tree until it finds the dependency it's looking for.\n *    [PARENT_INJECTOR]: number;\n * }\n *\n * export interface TInjector extends Array<any> {\n *\n *    // Shared node bloom for directive IDs 0-31  (IDs are % BLOOM_SIZE)\n *    [0]: number;\n *\n *    // Shared node bloom for directive IDs 32-63\n *    [1]: number;\n *\n *    // Shared node bloom for directive IDs 64-95\n *    [2]: number;\n *\n *    // Shared node bloom for directive IDs 96-127\n *    [3]: number;\n *\n *    // Shared node bloom for directive IDs 128-159\n *    [4]: number;\n *\n *    // Shared node bloom for directive IDs 160 - 191\n *    [5]: number;\n *\n *    // Shared node bloom for directive IDs 192 - 223\n *    [6]: number;\n *\n *    // Shared node bloom for directive IDs 224 - 255\n *    [7]: number;\n *\n *    // Necessary to find directive indices for a particular node.\n *    [TNODE]: TElementNode|TElementContainerNode|TContainerNode;\n *  }\n */\n/**\n * Factory for creating instances of injectors in the NodeInjector.\n *\n * This factory is complicated by the fact that it can resolve `multi` factories as well.\n *\n * NOTE: Some of the fields are optional which means that this class has two hidden classes.\n * - One without `multi` support (most common)\n * - One with `multi` values, (rare).\n *\n * Since VMs can cache up to 4 inline hidden classes this is OK.\n *\n * - Single factory: Only `resolving` and `factory` is defined.\n * - `providers` factory: `componentProviders` is a number and `index = -1`.\n * - `viewProviders` factory: `componentProviders` is a number and `index` points to `providers`.\n */\nclass NodeInjectorFactory {\n    constructor(\n    /**\n     * Factory to invoke in order to create a new instance.\n     */\n    factory, \n    /**\n     * Set to `true` if the token is declared in `viewProviders` (or if it is component).\n     */\n    isViewProvider, injectImplementation) {\n        this.factory = factory;\n        /**\n         * Marker set to true during factory invocation to see if we get into recursive loop.\n         * Recursive loop causes an error to be displayed.\n         */\n        this.resolving = false;\n        this.canSeeViewProviders = isViewProvider;\n        this.injectImpl = injectImplementation;\n    }\n}\nfunction isFactory(obj) {\n    return obj instanceof NodeInjectorFactory;\n}\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$3 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction assertNodeType(tNode, type) {\n    assertDefined(tNode, 'should be called with a TNode');\n    assertEqual(tNode.type, type, `should be a ${typeName(type)}`);\n}\nfunction assertNodeOfPossibleTypes(tNode, types, message) {\n    assertDefined(tNode, 'should be called with a TNode');\n    const found = types.some(type => tNode.type === type);\n    assertEqual(found, true, message !== null && message !== void 0 ? message : `Should be one of ${types.map(typeName).join(', ')} but got ${typeName(tNode.type)}`);\n}\nfunction assertNodeNotOfTypes(tNode, types, message) {\n    assertDefined(tNode, 'should be called with a TNode');\n    const found = types.some(type => tNode.type === type);\n    assertEqual(found, false, message !== null && message !== void 0 ? message : `Should not be one of ${types.map(typeName).join(', ')} but got ${typeName(tNode.type)}`);\n}\nfunction typeName(type) {\n    if (type == 1 /* Projection */)\n        return 'Projection';\n    if (type == 0 /* Container */)\n        return 'Container';\n    if (type == 5 /* IcuContainer */)\n        return 'IcuContainer';\n    if (type == 2 /* View */)\n        return 'View';\n    if (type == 3 /* Element */)\n        return 'Element';\n    if (type == 4 /* ElementContainer */)\n        return 'ElementContainer';\n    return '<unknown>';\n}\n\n/**\n * Assigns all attribute values to the provided element via the inferred renderer.\n *\n * This function accepts two forms of attribute entries:\n *\n * default: (key, value):\n *  attrs = [key1, value1, key2, value2]\n *\n * namespaced: (NAMESPACE_MARKER, uri, name, value)\n *  attrs = [NAMESPACE_MARKER, uri, name, value, NAMESPACE_MARKER, uri, name, value]\n *\n * The `attrs` array can contain a mix of both the default and namespaced entries.\n * The \"default\" values are set without a marker, but if the function comes across\n * a marker value then it will attempt to set a namespaced value. If the marker is\n * not of a namespaced value then the function will quit and return the index value\n * where it stopped during the iteration of the attrs array.\n *\n * See [AttributeMarker] to understand what the namespace marker value is.\n *\n * Note that this instruction does not support assigning style and class values to\n * an element. See `elementStart` and `elementHostAttrs` to learn how styling values\n * are applied to an element.\n * @param renderer The renderer to be used\n * @param native The element that the attributes will be assigned to\n * @param attrs The attribute array of values that will be assigned to the element\n * @returns the index value that was last accessed in the attributes array\n */\nfunction setUpAttributes(renderer, native, attrs) {\n    const isProc = isProceduralRenderer(renderer);\n    let i = 0;\n    while (i < attrs.length) {\n        const value = attrs[i];\n        if (typeof value === 'number') {\n            // only namespaces are supported. Other value types (such as style/class\n            // entries) are not supported in this function.\n            if (value !== 0 /* NamespaceURI */) {\n                break;\n            }\n            // we just landed on the marker value ... therefore\n            // we should skip to the next entry\n            i++;\n            const namespaceURI = attrs[i++];\n            const attrName = attrs[i++];\n            const attrVal = attrs[i++];\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            isProc ?\n                renderer.setAttribute(native, attrName, attrVal, namespaceURI) :\n                native.setAttributeNS(namespaceURI, attrName, attrVal);\n        }\n        else {\n            // attrName is string;\n            const attrName = value;\n            const attrVal = attrs[++i];\n            // Standard attributes\n            ngDevMode && ngDevMode.rendererSetAttribute++;\n            if (isAnimationProp(attrName)) {\n                if (isProc) {\n                    renderer.setProperty(native, attrName, attrVal);\n                }\n            }\n            else {\n                isProc ?\n                    renderer.setAttribute(native, attrName, attrVal) :\n                    native.setAttribute(attrName, attrVal);\n            }\n            i++;\n        }\n    }\n    // another piece of code may iterate over the same attributes array. Therefore\n    // it may be helpful to return the exact spot where the attributes array exited\n    // whether by running into an unsupported marker or if all the static values were\n    // iterated over.\n    return i;\n}\n/**\n * Test whether the given value is a marker that indicates that the following\n * attribute values in a `TAttributes` array are only the names of attributes,\n * and not name-value pairs.\n * @param marker The attribute marker to test.\n * @returns true if the marker is a \"name-only\" marker (e.g. `Bindings`, `Template` or `I18n`).\n */\nfunction isNameOnlyAttributeMarker(marker) {\n    return marker === 3 /* Bindings */ || marker === 4 /* Template */ ||\n        marker === 6 /* I18n */;\n}\nfunction isAnimationProp(name) {\n    // Perf note: accessing charCodeAt to check for the first character of a string is faster as\n    // compared to accessing a character at index 0 (ex. name[0]). The main reason for this is that\n    // charCodeAt doesn't allocate memory to return a substring.\n    return name.charCodeAt(0) === 64 /* AT_SIGN */;\n}\n/**\n * Merges `src` `TAttributes` into `dst` `TAttributes` removing any duplicates in the process.\n *\n * This merge function keeps the order of attrs same.\n *\n * @param dst Location of where the merged `TAttributes` should end up.\n * @param src `TAttributes` which should be appended to `dst`\n */\nfunction mergeHostAttrs(dst, src) {\n    if (src === null || src.length === 0) {\n        // do nothing\n    }\n    else if (dst === null || dst.length === 0) {\n        // We have source, but dst is empty, just make a copy.\n        dst = src.slice();\n    }\n    else {\n        let srcMarker = -1 /* ImplicitAttributes */;\n        for (let i = 0; i < src.length; i++) {\n            const item = src[i];\n            if (typeof item === 'number') {\n                srcMarker = item;\n            }\n            else {\n                if (srcMarker === 0 /* NamespaceURI */) {\n                    // Case where we need to consume `key1`, `key2`, `value` items.\n                }\n                else if (srcMarker === -1 /* ImplicitAttributes */ ||\n                    srcMarker === 2 /* Styles */) {\n                    // Case where we have to consume `key1` and `value` only.\n                    mergeHostAttribute(dst, srcMarker, item, null, src[++i]);\n                }\n                else {\n                    // Case where we have to consume `key1` only.\n                    mergeHostAttribute(dst, srcMarker, item, null, null);\n                }\n            }\n        }\n    }\n    return dst;\n}\n/**\n * Append `key`/`value` to existing `TAttributes` taking region marker and duplicates into account.\n *\n * @param dst `TAttributes` to append to.\n * @param marker Region where the `key`/`value` should be added.\n * @param key1 Key to add to `TAttributes`\n * @param key2 Key to add to `TAttributes` (in case of `AttributeMarker.NamespaceURI`)\n * @param value Value to add or to overwrite to `TAttributes` Only used if `marker` is not Class.\n */\nfunction mergeHostAttribute(dst, marker, key1, key2, value) {\n    let i = 0;\n    // Assume that new markers will be inserted at the end.\n    let markerInsertPosition = dst.length;\n    // scan until correct type.\n    if (marker === -1 /* ImplicitAttributes */) {\n        markerInsertPosition = -1;\n    }\n    else {\n        while (i < dst.length) {\n            const dstValue = dst[i++];\n            if (typeof dstValue === 'number') {\n                if (dstValue === marker) {\n                    markerInsertPosition = -1;\n                    break;\n                }\n                else if (dstValue > marker) {\n                    // We need to save this as we want the markers to be inserted in specific order.\n                    markerInsertPosition = i - 1;\n                    break;\n                }\n            }\n        }\n    }\n    // search until you find place of insertion\n    while (i < dst.length) {\n        const item = dst[i];\n        if (typeof item === 'number') {\n            // since `i` started as the index after the marker, we did not find it if we are at the next\n            // marker\n            break;\n        }\n        else if (item === key1) {\n            // We already have same token\n            if (key2 === null) {\n                if (value !== null) {\n                    dst[i + 1] = value;\n                }\n                return;\n            }\n            else if (key2 === dst[i + 1]) {\n                dst[i + 2] = value;\n                return;\n            }\n        }\n        // Increment counter.\n        i++;\n        if (key2 !== null)\n            i++;\n        if (value !== null)\n            i++;\n    }\n    // insert at location.\n    if (markerInsertPosition !== -1) {\n        dst.splice(markerInsertPosition, 0, marker);\n        i = markerInsertPosition + 1;\n    }\n    dst.splice(i++, 0, key1);\n    if (key2 !== null) {\n        dst.splice(i++, 0, key2);\n    }\n    if (value !== null) {\n        dst.splice(i++, 0, value);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/// Parent Injector Utils ///////////////////////////////////////////////////////////////\nfunction hasParentInjector(parentLocation) {\n    return parentLocation !== NO_PARENT_INJECTOR;\n}\nfunction getParentInjectorIndex(parentLocation) {\n    return parentLocation & 32767 /* InjectorIndexMask */;\n}\nfunction getParentInjectorViewOffset(parentLocation) {\n    return parentLocation >> 16 /* ViewOffsetShift */;\n}\n/**\n * Unwraps a parent injector location number to find the view offset from the current injector,\n * then walks up the declaration view tree until the view is found that contains the parent\n * injector.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @returns The LView instance that contains the parent injector\n */\nfunction getParentInjectorView(location, startView) {\n    let viewOffset = getParentInjectorViewOffset(location);\n    let parentView = startView;\n    // For most cases, the parent injector can be found on the host node (e.g. for component\n    // or container), but we must keep the loop here to support the rarer case of deeply nested\n    // <ng-template> tags or inline views, where the parent injector might live many views\n    // above the child injector.\n    while (viewOffset > 0) {\n        parentView = parentView[DECLARATION_VIEW];\n        viewOffset--;\n    }\n    return parentView;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used for stringify render output in Ivy.\n * Important! This function is very performance-sensitive and we should\n * be extra careful not to introduce megamorphic reads in it.\n */\nfunction renderStringify(value) {\n    if (typeof value === 'string')\n        return value;\n    if (value == null)\n        return '';\n    return '' + value;\n}\n/**\n * Used to stringify a value so that it can be displayed in an error message.\n * Important! This function contains a megamorphic read and should only be\n * used for error messages.\n */\nfunction stringifyForError(value) {\n    if (typeof value === 'function')\n        return value.name || value.toString();\n    if (typeof value === 'object' && value != null && typeof value.type === 'function') {\n        return value.type.name || value.type.toString();\n    }\n    return renderStringify(value);\n}\nconst ɵ0$3 = () => (typeof requestAnimationFrame !== 'undefined' &&\n    requestAnimationFrame || // browser only\n    setTimeout // everything else\n)\n    .bind(_global);\nconst defaultScheduler = (ɵ0$3)();\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveWindow(element) {\n    return { name: 'window', target: element.ownerDocument.defaultView };\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveDocument(element) {\n    return { name: 'document', target: element.ownerDocument };\n}\n/**\n *\n * @codeGenApi\n */\nfunction ɵɵresolveBody(element) {\n    return { name: 'body', target: element.ownerDocument.body };\n}\n/**\n * The special delimiter we use to separate property names, prefixes, and suffixes\n * in property binding metadata. See storeBindingMetadata().\n *\n * We intentionally use the Unicode \"REPLACEMENT CHARACTER\" (U+FFFD) as a delimiter\n * because it is a very uncommon character that is unlikely to be part of a user's\n * property names or interpolation strings. If it is in fact used in a property\n * binding, DebugElement.properties will not return the correct value for that\n * binding. However, there should be no runtime effect for real applications.\n *\n * This character is typically rendered as a question mark inside of a diamond.\n * See https://en.wikipedia.org/wiki/Specials_(Unicode_block)\n *\n */\nconst INTERPOLATION_DELIMITER = `�`;\n/**\n * Unwrap a value which might be behind a closure (for forward declaration reasons).\n */\nfunction maybeUnwrapFn(value) {\n    if (value instanceof Function) {\n        return value();\n    }\n    else {\n        return value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines if the call to `inject` should include `viewProviders` in its resolution.\n *\n * This is set to true when we try to instantiate a component. This value is reset in\n * `getNodeInjectable` to a value which matches the declaration location of the token about to be\n * instantiated. This is done so that if we are injecting a token which was declared outside of\n * `viewProviders` we don't accidentally pull `viewProviders` in.\n *\n * Example:\n *\n * ```\n * @Injectable()\n * class MyService {\n *   constructor(public value: String) {}\n * }\n *\n * @Component({\n *   providers: [\n *     MyService,\n *     {provide: String, value: 'providers' }\n *   ]\n *   viewProviders: [\n *     {provide: String, value: 'viewProviders'}\n *   ]\n * })\n * class MyComponent {\n *   constructor(myService: MyService, value: String) {\n *     // We expect that Component can see into `viewProviders`.\n *     expect(value).toEqual('viewProviders');\n *     // `MyService` was not declared in `viewProviders` hence it can't see it.\n *     expect(myService.value).toEqual('providers');\n *   }\n * }\n *\n * ```\n */\nlet includeViewProviders = true;\nfunction setIncludeViewProviders(v) {\n    const oldValue = includeViewProviders;\n    includeViewProviders = v;\n    return oldValue;\n}\n/**\n * The number of slots in each bloom filter (used by DI). The larger this number, the fewer\n * directives that will share slots, and thus, the fewer false positives when checking for\n * the existence of a directive.\n */\nconst BLOOM_SIZE = 256;\nconst BLOOM_MASK = BLOOM_SIZE - 1;\n/** Counter used to generate unique IDs for directives. */\nlet nextNgElementId = 0;\n/**\n * Registers this directive as present in its node's injector by flipping the directive's\n * corresponding bit in the injector's bloom filter.\n *\n * @param injectorIndex The index of the node injector where this token should be registered\n * @param tView The TView for the injector's bloom filters\n * @param type The directive token to register\n */\nfunction bloomAdd(injectorIndex, tView, type) {\n    ngDevMode && assertEqual(tView.firstCreatePass, true, 'expected firstCreatePass to be true');\n    let id;\n    if (typeof type === 'string') {\n        id = type.charCodeAt(0) || 0;\n    }\n    else if (type.hasOwnProperty(NG_ELEMENT_ID)) {\n        id = type[NG_ELEMENT_ID];\n    }\n    // Set a unique ID on the directive type, so if something tries to inject the directive,\n    // we can easily retrieve the ID and hash it into the bloom bit that should be checked.\n    if (id == null) {\n        id = type[NG_ELEMENT_ID] = nextNgElementId++;\n    }\n    // We only have BLOOM_SIZE (256) slots in our bloom filter (8 buckets * 32 bits each),\n    // so all unique IDs must be modulo-ed into a number from 0 - 255 to fit into the filter.\n    const bloomBit = id & BLOOM_MASK;\n    // Create a mask that targets the specific bit associated with the directive.\n    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n    // to bit positions 0 - 31 in a 32 bit integer.\n    const mask = 1 << bloomBit;\n    // Use the raw bloomBit number to determine which bloom filter bucket we should check\n    // e.g: bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc\n    const b7 = bloomBit & 0x80;\n    const b6 = bloomBit & 0x40;\n    const b5 = bloomBit & 0x20;\n    const tData = tView.data;\n    if (b7) {\n        b6 ? (b5 ? (tData[injectorIndex + 7] |= mask) : (tData[injectorIndex + 6] |= mask)) :\n            (b5 ? (tData[injectorIndex + 5] |= mask) : (tData[injectorIndex + 4] |= mask));\n    }\n    else {\n        b6 ? (b5 ? (tData[injectorIndex + 3] |= mask) : (tData[injectorIndex + 2] |= mask)) :\n            (b5 ? (tData[injectorIndex + 1] |= mask) : (tData[injectorIndex] |= mask));\n    }\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param tNode for which an injector should be retrieved / created.\n * @param hostView View where the node is stored\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(tNode, hostView) {\n    const existingInjectorIndex = getInjectorIndex(tNode, hostView);\n    if (existingInjectorIndex !== -1) {\n        return existingInjectorIndex;\n    }\n    const tView = hostView[TVIEW];\n    if (tView.firstCreatePass) {\n        tNode.injectorIndex = hostView.length;\n        insertBloom(tView.data, tNode); // foundation for node bloom\n        insertBloom(hostView, null); // foundation for cumulative bloom\n        insertBloom(tView.blueprint, null);\n    }\n    const parentLoc = getParentInjectorLocation(tNode, hostView);\n    const injectorIndex = tNode.injectorIndex;\n    // If a parent injector can't be found, its location is set to -1.\n    // In that case, we don't need to set up a cumulative bloom\n    if (hasParentInjector(parentLoc)) {\n        const parentIndex = getParentInjectorIndex(parentLoc);\n        const parentLView = getParentInjectorView(parentLoc, hostView);\n        const parentData = parentLView[TVIEW].data;\n        // Creates a cumulative bloom filter that merges the parent's bloom filter\n        // and its own cumulative bloom (which contains tokens for all ancestors)\n        for (let i = 0; i < 8; i++) {\n            hostView[injectorIndex + i] = parentLView[parentIndex + i] | parentData[parentIndex + i];\n        }\n    }\n    hostView[injectorIndex + PARENT_INJECTOR] = parentLoc;\n    return injectorIndex;\n}\nfunction insertBloom(arr, footer) {\n    arr.push(0, 0, 0, 0, 0, 0, 0, 0, footer);\n}\nfunction getInjectorIndex(tNode, hostView) {\n    if (tNode.injectorIndex === -1 ||\n        // If the injector index is the same as its parent's injector index, then the index has been\n        // copied down from the parent node. No injector has been created yet on this node.\n        (tNode.parent && tNode.parent.injectorIndex === tNode.injectorIndex) ||\n        // After the first template pass, the injector index might exist but the parent values\n        // might not have been calculated yet for this instance\n        hostView[tNode.injectorIndex + PARENT_INJECTOR] == null) {\n        return -1;\n    }\n    else {\n        return tNode.injectorIndex;\n    }\n}\n/**\n * Finds the index of the parent injector, with a view offset if applicable. Used to set the\n * parent injector initially.\n *\n * Returns a combination of number of `ViewData` we have to go up and index in that `Viewdata`\n */\nfunction getParentInjectorLocation(tNode, view) {\n    if (tNode.parent && tNode.parent.injectorIndex !== -1) {\n        return tNode.parent.injectorIndex; // ViewOffset is 0\n    }\n    // For most cases, the parent injector index can be found on the host node (e.g. for component\n    // or container), so this loop will be skipped, but we must keep the loop here to support\n    // the rarer case of deeply nested <ng-template> tags or inline views.\n    let hostTNode = view[T_HOST];\n    let viewOffset = 1;\n    while (hostTNode && hostTNode.injectorIndex === -1) {\n        view = view[DECLARATION_VIEW];\n        hostTNode = view ? view[T_HOST] : null;\n        viewOffset++;\n    }\n    return hostTNode ?\n        hostTNode.injectorIndex | (viewOffset << 16 /* ViewOffsetShift */) :\n        -1;\n}\n/**\n * Makes a type or an injection token public to the DI system by adding it to an\n * injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param token The type or the injection token to be made public\n */\nfunction diPublicInInjector(injectorIndex, tView, token) {\n    bloomAdd(injectorIndex, tView, token);\n}\n/**\n * Inject static attribute value into directive constructor.\n *\n * This method is used with `factory` functions which are generated as part of\n * `defineDirective` or `defineComponent`. The method retrieves the static value\n * of an attribute. (Dynamic attributes are not supported since they are not resolved\n *  at the time of injection and can change over time.)\n *\n * # Example\n * Given:\n * ```\n * @Component(...)\n * class MyComponent {\n *   constructor(@Attribute('title') title: string) { ... }\n * }\n * ```\n * When instantiated with\n * ```\n * <my-component title=\"Hello\"></my-component>\n * ```\n *\n * Then factory method generated is:\n * ```\n * MyComponent.ɵcmp = defineComponent({\n *   factory: () => new MyComponent(injectAttribute('title'))\n *   ...\n * })\n * ```\n *\n * @publicApi\n */\nfunction injectAttributeImpl(tNode, attrNameToInject) {\n    ngDevMode &&\n        assertNodeOfPossibleTypes(tNode, [0 /* Container */, 3 /* Element */, 4 /* ElementContainer */]);\n    ngDevMode && assertDefined(tNode, 'expecting tNode');\n    if (attrNameToInject === 'class') {\n        return tNode.classes;\n    }\n    if (attrNameToInject === 'style') {\n        return tNode.styles;\n    }\n    const attrs = tNode.attrs;\n    if (attrs) {\n        const attrsLength = attrs.length;\n        let i = 0;\n        while (i < attrsLength) {\n            const value = attrs[i];\n            // If we hit a `Bindings` or `Template` marker then we are done.\n            if (isNameOnlyAttributeMarker(value))\n                break;\n            // Skip namespaced attributes\n            if (value === 0 /* NamespaceURI */) {\n                // we skip the next two values\n                // as namespaced attributes looks like\n                // [..., AttributeMarker.NamespaceURI, 'http://someuri.com/test', 'test:exist',\n                // 'existValue', ...]\n                i = i + 2;\n            }\n            else if (typeof value === 'number') {\n                // Skip to the first value of the marked attribute.\n                i++;\n                while (i < attrsLength && typeof attrs[i] === 'string') {\n                    i++;\n                }\n            }\n            else if (value === attrNameToInject) {\n                return attrs[i + 1];\n            }\n            else {\n                i = i + 2;\n            }\n        }\n    }\n    return null;\n}\n/**\n * Returns the value associated to the given token from the NodeInjectors => ModuleInjector.\n *\n * Look for the injector providing the token by walking up the node injector tree and then\n * the module injector tree.\n *\n * This function patches `token` with `__NG_ELEMENT_ID__` which contains the id for the bloom\n * filter. Negative values are reserved for special objects.\n *   - `-1` is reserved for injecting `Injector` (implemented by `NodeInjector`)\n *\n * @param tNode The Node where the search for the injector should start\n * @param lView The `LView` that contains the `tNode`\n * @param token The token to look for\n * @param flags Injection flags\n * @param notFoundValue The value to return when the injection flags is `InjectFlags.Optional`\n * @returns the value from the injector, `null` when not found, or `notFoundValue` if provided\n */\nfunction getOrCreateInjectable(tNode, lView, token, flags = InjectFlags.Default, notFoundValue) {\n    if (tNode !== null) {\n        const bloomHash = bloomHashBitOrFactory(token);\n        // If the ID stored here is a function, this is a special object like ElementRef or TemplateRef\n        // so just call the factory function to create it.\n        if (typeof bloomHash === 'function') {\n            enterDI(lView, tNode);\n            try {\n                const value = bloomHash();\n                if (value == null && !(flags & InjectFlags.Optional)) {\n                    throw new Error(`No provider for ${stringifyForError(token)}!`);\n                }\n                else {\n                    return value;\n                }\n            }\n            finally {\n                leaveDI();\n            }\n        }\n        else if (typeof bloomHash == 'number') {\n            if (bloomHash === -1) {\n                // `-1` is a special value used to identify `Injector` types.\n                return new NodeInjector(tNode, lView);\n            }\n            // If the token has a bloom hash, then it is a token which could be in NodeInjector.\n            // A reference to the previous injector TView that was found while climbing the element\n            // injector tree. This is used to know if viewProviders can be accessed on the current\n            // injector.\n            let previousTView = null;\n            let injectorIndex = getInjectorIndex(tNode, lView);\n            let parentLocation = NO_PARENT_INJECTOR;\n            let hostTElementNode = flags & InjectFlags.Host ? lView[DECLARATION_COMPONENT_VIEW][T_HOST] : null;\n            // If we should skip this injector, or if there is no injector on this node, start by\n            // searching\n            // the parent injector.\n            if (injectorIndex === -1 || flags & InjectFlags.SkipSelf) {\n                parentLocation = injectorIndex === -1 ? getParentInjectorLocation(tNode, lView) :\n                    lView[injectorIndex + PARENT_INJECTOR];\n                if (!shouldSearchParent(flags, false)) {\n                    injectorIndex = -1;\n                }\n                else {\n                    previousTView = lView[TVIEW];\n                    injectorIndex = getParentInjectorIndex(parentLocation);\n                    lView = getParentInjectorView(parentLocation, lView);\n                }\n            }\n            // Traverse up the injector tree until we find a potential match or until we know there\n            // *isn't* a match.\n            while (injectorIndex !== -1) {\n                parentLocation = lView[injectorIndex + PARENT_INJECTOR];\n                // Check the current injector. If it matches, see if it contains token.\n                const tView = lView[TVIEW];\n                if (bloomHasToken(bloomHash, injectorIndex, tView.data)) {\n                    // At this point, we have an injector which *may* contain the token, so we step through\n                    // the providers and directives associated with the injector's corresponding node to get\n                    // the instance.\n                    const instance = searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode);\n                    if (instance !== NOT_FOUND) {\n                        return instance;\n                    }\n                }\n                if (shouldSearchParent(flags, lView[TVIEW].data[injectorIndex + TNODE] === hostTElementNode) &&\n                    bloomHasToken(bloomHash, injectorIndex, lView)) {\n                    // The def wasn't found anywhere on this node, so it was a false positive.\n                    // Traverse up the tree and continue searching.\n                    previousTView = tView;\n                    injectorIndex = getParentInjectorIndex(parentLocation);\n                    lView = getParentInjectorView(parentLocation, lView);\n                }\n                else {\n                    // If we should not search parent OR If the ancestor bloom filter value does not have the\n                    // bit corresponding to the directive we can give up on traversing up to find the specific\n                    // injector.\n                    injectorIndex = -1;\n                }\n            }\n        }\n    }\n    if (flags & InjectFlags.Optional && notFoundValue === undefined) {\n        // This must be set or the NullInjector will throw for optional deps\n        notFoundValue = null;\n    }\n    if ((flags & (InjectFlags.Self | InjectFlags.Host)) === 0) {\n        const moduleInjector = lView[INJECTOR$1];\n        // switch to `injectInjectorOnly` implementation for module injector, since module injector\n        // should not have access to Component/Directive DI scope (that may happen through\n        // `directiveInject` implementation)\n        const previousInjectImplementation = setInjectImplementation(undefined);\n        try {\n            if (moduleInjector) {\n                return moduleInjector.get(token, notFoundValue, flags & InjectFlags.Optional);\n            }\n            else {\n                return injectRootLimpMode(token, notFoundValue, flags & InjectFlags.Optional);\n            }\n        }\n        finally {\n            setInjectImplementation(previousInjectImplementation);\n        }\n    }\n    if (flags & InjectFlags.Optional) {\n        return notFoundValue;\n    }\n    else {\n        throw new Error(`NodeInjector: NOT_FOUND [${stringifyForError(token)}]`);\n    }\n}\nconst NOT_FOUND = {};\nfunction searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {\n    const currentTView = lView[TVIEW];\n    const tNode = currentTView.data[injectorIndex + TNODE];\n    // First, we need to determine if view providers can be accessed by the starting element.\n    // There are two possibities\n    const canAccessViewProviders = previousTView == null ?\n        // 1) This is the first invocation `previousTView == null` which means that we are at the\n        // `TNode` of where injector is starting to look. In such a case the only time we are allowed\n        // to look into the ViewProviders is if:\n        // - we are on a component\n        // - AND the injector set `includeViewProviders` to true (implying that the token can see\n        // ViewProviders because it is the Component or a Service which itself was declared in\n        // ViewProviders)\n        (isComponentHost(tNode) && includeViewProviders) :\n        // 2) `previousTView != null` which means that we are now walking across the parent nodes.\n        // In such a case we are only allowed to look into the ViewProviders if:\n        // - We just crossed from child View to Parent View `previousTView != currentTView`\n        // - AND the parent TNode is an Element.\n        // This means that we just came from the Component's View and therefore are allowed to see\n        // into the ViewProviders.\n        (previousTView != currentTView && (tNode.type === 3 /* Element */));\n    // This special case happens when there is a @host on the inject and when we are searching\n    // on the host element node.\n    const isHostSpecialCase = (flags & InjectFlags.Host) && hostTElementNode === tNode;\n    const injectableIdx = locateDirectiveOrProvider(tNode, currentTView, token, canAccessViewProviders, isHostSpecialCase);\n    if (injectableIdx !== null) {\n        return getNodeInjectable(lView, currentTView, injectableIdx, tNode);\n    }\n    else {\n        return NOT_FOUND;\n    }\n}\n/**\n * Searches for the given token among the node's directives and providers.\n *\n * @param tNode TNode on which directives are present.\n * @param tView The tView we are currently processing\n * @param token Provider token or type of a directive to look for.\n * @param canAccessViewProviders Whether view providers should be considered.\n * @param isHostSpecialCase Whether the host special case applies.\n * @returns Index of a found directive or provider, or null when none found.\n */\nfunction locateDirectiveOrProvider(tNode, tView, token, canAccessViewProviders, isHostSpecialCase) {\n    const nodeProviderIndexes = tNode.providerIndexes;\n    const tInjectables = tView.data;\n    const injectablesStart = nodeProviderIndexes & 1048575 /* ProvidersStartIndexMask */;\n    const directivesStart = tNode.directiveStart;\n    const directiveEnd = tNode.directiveEnd;\n    const cptViewProvidersCount = nodeProviderIndexes >> 20 /* CptViewProvidersCountShift */;\n    const startingIndex = canAccessViewProviders ? injectablesStart : injectablesStart + cptViewProvidersCount;\n    // When the host special case applies, only the viewProviders and the component are visible\n    const endIndex = isHostSpecialCase ? injectablesStart + cptViewProvidersCount : directiveEnd;\n    for (let i = startingIndex; i < endIndex; i++) {\n        const providerTokenOrDef = tInjectables[i];\n        if (i < directivesStart && token === providerTokenOrDef ||\n            i >= directivesStart && providerTokenOrDef.type === token) {\n            return i;\n        }\n    }\n    if (isHostSpecialCase) {\n        const dirDef = tInjectables[directivesStart];\n        if (dirDef && isComponentDef(dirDef) && dirDef.type === token) {\n            return directivesStart;\n        }\n    }\n    return null;\n}\n/**\n * Retrieve or instantiate the injectable from the `LView` at particular `index`.\n *\n * This function checks to see if the value has already been instantiated and if so returns the\n * cached `injectable`. Otherwise if it detects that the value is still a factory it\n * instantiates the `injectable` and caches the value.\n */\nfunction getNodeInjectable(lView, tView, index, tNode) {\n    let value = lView[index];\n    const tData = tView.data;\n    if (isFactory(value)) {\n        const factory = value;\n        if (factory.resolving) {\n            throw new Error(`Circular dep for ${stringifyForError(tData[index])}`);\n        }\n        const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);\n        factory.resolving = true;\n        let previousInjectImplementation;\n        if (factory.injectImpl) {\n            previousInjectImplementation = setInjectImplementation(factory.injectImpl);\n        }\n        enterDI(lView, tNode);\n        try {\n            value = lView[index] = factory.factory(undefined, tData, lView, tNode);\n            // This code path is hit for both directives and providers.\n            // For perf reasons, we want to avoid searching for hooks on providers.\n            // It does no harm to try (the hooks just won't exist), but the extra\n            // checks are unnecessary and this is a hot path. So we check to see\n            // if the index of the dependency is in the directive range for this\n            // tNode. If it's not, we know it's a provider and skip hook registration.\n            if (tView.firstCreatePass && index >= tNode.directiveStart) {\n                ngDevMode && assertDirectiveDef(tData[index]);\n                registerPreOrderHooks(index, tData[index], tView);\n            }\n        }\n        finally {\n            if (factory.injectImpl)\n                setInjectImplementation(previousInjectImplementation);\n            setIncludeViewProviders(previousIncludeViewProviders);\n            factory.resolving = false;\n            leaveDI();\n        }\n    }\n    return value;\n}\n/**\n * Returns the bit in an injector's bloom filter that should be used to determine whether or not\n * the directive might be provided by the injector.\n *\n * When a directive is public, it is added to the bloom filter and given a unique ID that can be\n * retrieved on the Type. When the directive isn't public or the token is not a directive `null`\n * is returned as the node injector can not possibly provide that token.\n *\n * @param token the injection token\n * @returns the matching bit to check in the bloom filter or `null` if the token is not known.\n *   When the returned value is negative then it represents special values such as `Injector`.\n */\nfunction bloomHashBitOrFactory(token) {\n    ngDevMode && assertDefined(token, 'token must be defined');\n    if (typeof token === 'string') {\n        return token.charCodeAt(0) || 0;\n    }\n    const tokenId = \n    // First check with `hasOwnProperty` so we don't get an inherited ID.\n    token.hasOwnProperty(NG_ELEMENT_ID) ? token[NG_ELEMENT_ID] : undefined;\n    // Negative token IDs are used for special objects such as `Injector`\n    return (typeof tokenId === 'number' && tokenId > 0) ? tokenId & BLOOM_MASK : tokenId;\n}\nfunction bloomHasToken(bloomHash, injectorIndex, injectorView) {\n    // Create a mask that targets the specific bit associated with the directive we're looking for.\n    // JS bit operations are 32 bits, so this will be a number between 2^0 and 2^31, corresponding\n    // to bit positions 0 - 31 in a 32 bit integer.\n    const mask = 1 << bloomHash;\n    const b7 = bloomHash & 0x80;\n    const b6 = bloomHash & 0x40;\n    const b5 = bloomHash & 0x20;\n    // Our bloom filter size is 256 bits, which is eight 32-bit bloom filter buckets:\n    // bf0 = [0 - 31], bf1 = [32 - 63], bf2 = [64 - 95], bf3 = [96 - 127], etc.\n    // Get the bloom filter value from the appropriate bucket based on the directive's bloomBit.\n    let value;\n    if (b7) {\n        value = b6 ? (b5 ? injectorView[injectorIndex + 7] : injectorView[injectorIndex + 6]) :\n            (b5 ? injectorView[injectorIndex + 5] : injectorView[injectorIndex + 4]);\n    }\n    else {\n        value = b6 ? (b5 ? injectorView[injectorIndex + 3] : injectorView[injectorIndex + 2]) :\n            (b5 ? injectorView[injectorIndex + 1] : injectorView[injectorIndex]);\n    }\n    // If the bloom filter value has the bit corresponding to the directive's bloomBit flipped on,\n    // this injector is a potential match.\n    return !!(value & mask);\n}\n/** Returns true if flags prevent parent injector from being searched for tokens */\nfunction shouldSearchParent(flags, isFirstHostTNode) {\n    return !(flags & InjectFlags.Self) && !(flags & InjectFlags.Host && isFirstHostTNode);\n}\nclass NodeInjector {\n    constructor(_tNode, _lView) {\n        this._tNode = _tNode;\n        this._lView = _lView;\n    }\n    get(token, notFoundValue) {\n        return getOrCreateInjectable(this._tNode, this._lView, token, undefined, notFoundValue);\n    }\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetFactoryOf(type) {\n    const typeAny = type;\n    if (isForwardRef(type)) {\n        return (() => {\n            const factory = ɵɵgetFactoryOf(resolveForwardRef(typeAny));\n            return factory ? factory() : null;\n        });\n    }\n    let factory = getFactoryDef(typeAny);\n    if (factory === null) {\n        const injectorDef = getInjectorDef(typeAny);\n        factory = injectorDef && injectorDef.factory;\n    }\n    return factory || null;\n}\n/**\n * @codeGenApi\n */\nfunction ɵɵgetInheritedFactory(type) {\n    return noSideEffects(() => {\n        const ownConstructor = type.prototype.constructor;\n        const ownFactory = ownConstructor[NG_FACTORY_DEF] || ɵɵgetFactoryOf(ownConstructor);\n        const objectPrototype = Object.prototype;\n        let parent = Object.getPrototypeOf(type.prototype).constructor;\n        // Go up the prototype until we hit `Object`.\n        while (parent && parent !== objectPrototype) {\n            const factory = parent[NG_FACTORY_DEF] || ɵɵgetFactoryOf(parent);\n            // If we hit something that has a factory and the factory isn't the same as the type,\n            // we've found the inherited factory. Note the check that the factory isn't the type's\n            // own factory is redundant in most cases, but if the user has custom decorators on the\n            // class, this lookup will start one level down in the prototype chain, causing us to\n            // find the own factory first and potentially triggering an infinite loop downstream.\n            if (factory && factory !== ownFactory) {\n                return factory;\n            }\n            parent = Object.getPrototypeOf(parent);\n        }\n        // There is no factory defined. Either this was improper usage of inheritance\n        // (no Angular decorator on the superclass) or there is no constructor at all\n        // in the inheritance chain. Since the two cases cannot be distinguished, the\n        // latter has to be assumed.\n        return t => new t();\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ERROR_TYPE = 'ngType';\nconst ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nconst ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nconst ERROR_LOGGER = 'ngErrorLogger';\nfunction wrappedError(message, originalError) {\n    const msg = `${message} caused by: ${originalError instanceof Error ? originalError.message : originalError}`;\n    const error = Error(msg);\n    error[ERROR_ORIGINAL_ERROR] = originalError;\n    return error;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getType(error) {\n    return error[ERROR_TYPE];\n}\nfunction getDebugContext(error) {\n    return error[ERROR_DEBUG_CONTEXT];\n}\nfunction getOriginalError(error) {\n    return error[ERROR_ORIGINAL_ERROR];\n}\nfunction getErrorLogger(error) {\n    return error[ERROR_LOGGER] || defaultErrorLogger;\n}\nfunction defaultErrorLogger(console, ...values) {\n    console.error(...values);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides a hook for centralized exception handling.\n *\n * The default implementation of `ErrorHandler` prints error messages to the `console`. To\n * intercept error handling, write a custom exception handler that replaces this default as\n * appropriate for your app.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * class MyErrorHandler implements ErrorHandler {\n *   handleError(error) {\n *     // do something with the exception\n *   }\n * }\n *\n * @NgModule({\n *   providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]\n * })\n * class MyModule {}\n * ```\n *\n * @publicApi\n */\nclass ErrorHandler {\n    constructor() {\n        /**\n         * @internal\n         */\n        this._console = console;\n    }\n    handleError(error) {\n        const originalError = this._findOriginalError(error);\n        const context = this._findContext(error);\n        // Note: Browser consoles show the place from where console.error was called.\n        // We can use this to give users additional information about the error.\n        const errorLogger = getErrorLogger(error);\n        errorLogger(this._console, `ERROR`, error);\n        if (originalError) {\n            errorLogger(this._console, `ORIGINAL ERROR`, originalError);\n        }\n        if (context) {\n            errorLogger(this._console, 'ERROR CONTEXT', context);\n        }\n    }\n    /** @internal */\n    _findContext(error) {\n        if (error) {\n            return getDebugContext(error) ? getDebugContext(error) :\n                this._findContext(getOriginalError(error));\n        }\n        return null;\n    }\n    /** @internal */\n    _findOriginalError(error) {\n        let e = getOriginalError(error);\n        while (e && getOriginalError(e)) {\n            e = getOriginalError(e);\n        }\n        return e;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Defines a schema that allows an NgModule to contain the following:\n * - Non-Angular elements named with dash case (`-`).\n * - Element properties named with dash case (`-`).\n * Dash case is the naming convention for custom elements.\n *\n * @publicApi\n */\nconst CUSTOM_ELEMENTS_SCHEMA = {\n    name: 'custom-elements'\n};\n/**\n * Defines a schema that allows any property on any element.\n *\n * @publicApi\n */\nconst NO_ERRORS_SCHEMA = {\n    name: 'no-errors-schema'\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass SafeValueImpl {\n    constructor(changingThisBreaksApplicationSecurity) {\n        this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n    }\n    toString() {\n        return `SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity}` +\n            ` (see http://g.co/ng/security#xss)`;\n    }\n}\nclass SafeHtmlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"HTML\" /* Html */;\n    }\n}\nclass SafeStyleImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Style\" /* Style */;\n    }\n}\nclass SafeScriptImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"Script\" /* Script */;\n    }\n}\nclass SafeUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"URL\" /* Url */;\n    }\n}\nclass SafeResourceUrlImpl extends SafeValueImpl {\n    getTypeName() {\n        return \"ResourceURL\" /* ResourceUrl */;\n    }\n}\nfunction unwrapSafeValue(value) {\n    return value instanceof SafeValueImpl ? value.changingThisBreaksApplicationSecurity :\n        value;\n}\nfunction allowSanitizationBypassAndThrow(value, type) {\n    const actualType = getSanitizationBypassType(value);\n    if (actualType != null && actualType !== type) {\n        // Allow ResourceURLs in URL contexts, they are strictly more trusted.\n        if (actualType === \"ResourceURL\" /* ResourceUrl */ && type === \"URL\" /* Url */)\n            return true;\n        throw new Error(`Required a safe ${type}, got a ${actualType} (see http://g.co/ng/security#xss)`);\n    }\n    return actualType === type;\n}\nfunction getSanitizationBypassType(value) {\n    return value instanceof SafeValueImpl && value.getTypeName() || null;\n}\n/**\n * Mark `html` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link htmlSanitizer} to be trusted implicitly.\n *\n * @param trustedHtml `html` string which needs to be implicitly trusted.\n * @returns a `html` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n    return new SafeHtmlImpl(trustedHtml);\n}\n/**\n * Mark `style` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link styleSanitizer} to be trusted implicitly.\n *\n * @param trustedStyle `style` string which needs to be implicitly trusted.\n * @returns a `style` hich has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n    return new SafeStyleImpl(trustedStyle);\n}\n/**\n * Mark `script` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link scriptSanitizer} to be trusted implicitly.\n *\n * @param trustedScript `script` string which needs to be implicitly trusted.\n * @returns a `script` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n    return new SafeScriptImpl(trustedScript);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link urlSanitizer} to be trusted implicitly.\n *\n * @param trustedUrl `url` string which needs to be implicitly trusted.\n * @returns a `url`  which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n    return new SafeUrlImpl(trustedUrl);\n}\n/**\n * Mark `url` string as trusted.\n *\n * This function wraps the trusted string in `String` and brands it in a way which makes it\n * recognizable to {@link resourceUrlSanitizer} to be trusted implicitly.\n *\n * @param trustedResourceUrl `url` string which needs to be implicitly trusted.\n * @returns a `url` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n    return new SafeResourceUrlImpl(trustedResourceUrl);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file is used to control if the default rendering pipeline should be `ViewEngine` or `Ivy`.\n *\n * For more information on how to run and debug tests with either Ivy or View Engine (legacy),\n * please see [BAZEL.md](./docs/BAZEL.md).\n */\nlet _devMode = true;\nlet _runModeLocked = false;\n/**\n * Returns whether Angular is in development mode. After called once,\n * the value is locked and won't change any more.\n *\n * By default, this is true, unless a user calls `enableProdMode` before calling this.\n *\n * @publicApi\n */\nfunction isDevMode() {\n    _runModeLocked = true;\n    return _devMode;\n}\n/**\n * Disable Angular's development mode, which turns off assertions and other\n * checks within the framework.\n *\n * One important assertion this disables verifies that a change detection pass\n * does not result in additional changes to any bindings (also known as\n * unidirectional data flow).\n *\n * @publicApi\n */\nfunction enableProdMode() {\n    if (_runModeLocked) {\n        throw new Error('Cannot enable prod mode after platform setup.');\n    }\n    _devMode = false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This helper is used to get hold of an inert tree of DOM elements containing dirty HTML\n * that needs sanitizing.\n * Depending upon browser support we use one of two strategies for doing this.\n * Default: DOMParser strategy\n * Fallback: InertDocument strategy\n */\nfunction getInertBodyHelper(defaultDoc) {\n    return isDOMParserAvailable() ? new DOMParserHelper() : new InertDocumentHelper(defaultDoc);\n}\n/**\n * Uses DOMParser to create and fill an inert body element.\n * This is the default strategy used in browsers that support it.\n */\nclass DOMParserHelper {\n    getInertBodyElement(html) {\n        // We add these extra elements to ensure that the rest of the content is parsed as expected\n        // e.g. leading whitespace is maintained and tags like `<meta>` do not get hoisted to the\n        // `<head>` tag. Note that the `<body>` tag is closed implicitly to prevent unclosed tags\n        // in `html` from consuming the otherwise explicit `</body>` tag.\n        html = '<body><remove></remove>' + html;\n        try {\n            const body = new window.DOMParser().parseFromString(html, 'text/html').body;\n            body.removeChild(body.firstChild);\n            return body;\n        }\n        catch (_a) {\n            return null;\n        }\n    }\n}\n/**\n * Use an HTML5 `template` element, if supported, or an inert body element created via\n * `createHtmlDocument` to create and fill an inert DOM element.\n * This is the fallback strategy if the browser does not support DOMParser.\n */\nclass InertDocumentHelper {\n    constructor(defaultDoc) {\n        this.defaultDoc = defaultDoc;\n        this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n        if (this.inertDocument.body == null) {\n            // usually there should be only one body element in the document, but IE doesn't have any, so\n            // we need to create one.\n            const inertHtml = this.inertDocument.createElement('html');\n            this.inertDocument.appendChild(inertHtml);\n            const inertBodyElement = this.inertDocument.createElement('body');\n            inertHtml.appendChild(inertBodyElement);\n        }\n    }\n    getInertBodyElement(html) {\n        // Prefer using <template> element if supported.\n        const templateEl = this.inertDocument.createElement('template');\n        if ('content' in templateEl) {\n            templateEl.innerHTML = html;\n            return templateEl;\n        }\n        // Note that previously we used to do something like `this.inertDocument.body.innerHTML = html`\n        // and we returned the inert `body` node. This was changed, because IE seems to treat setting\n        // `innerHTML` on an inserted element differently, compared to one that hasn't been inserted\n        // yet. In particular, IE appears to split some of the text into multiple text nodes rather\n        // than keeping them in a single one which ends up messing with Ivy's i18n parsing further\n        // down the line. This has been worked around by creating a new inert `body` and using it as\n        // the root node in which we insert the HTML.\n        const inertBody = this.inertDocument.createElement('body');\n        inertBody.innerHTML = html;\n        // Support: IE 9-11 only\n        // strip custom-namespaced attributes on IE<=11\n        if (this.defaultDoc.documentMode) {\n            this.stripCustomNsAttrs(inertBody);\n        }\n        return inertBody;\n    }\n    /**\n     * When IE9-11 comes across an unknown namespaced attribute e.g. 'xlink:foo' it adds 'xmlns:ns1'\n     * attribute to declare ns1 namespace and prefixes the attribute with 'ns1' (e.g.\n     * 'ns1:xlink:foo').\n     *\n     * This is undesirable since we don't want to allow any of these custom attributes. This method\n     * strips them all.\n     */\n    stripCustomNsAttrs(el) {\n        const elAttrs = el.attributes;\n        // loop backwards so that we can support removals.\n        for (let i = elAttrs.length - 1; 0 < i; i--) {\n            const attrib = elAttrs.item(i);\n            const attrName = attrib.name;\n            if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n                el.removeAttribute(attrName);\n            }\n        }\n        let childNode = el.firstChild;\n        while (childNode) {\n            if (childNode.nodeType === Node.ELEMENT_NODE)\n                this.stripCustomNsAttrs(childNode);\n            childNode = childNode.nextSibling;\n        }\n    }\n}\n/**\n * We need to determine whether the DOMParser exists in the global context and\n * supports parsing HTML; HTML parsing support is not as wide as other formats, see\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMParser#Browser_compatibility.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n    try {\n        return !!new window.DOMParser().parseFromString('', 'text/html');\n    }\n    catch (_a) {\n        return false;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * This regular expression matches a subset of URLs that will not cause script\n * execution if used in URL context within a HTML document. Specifically, this\n * regular expression matches if (comment from here on and regex copied from\n * Soy's EscapingConventions):\n * (1) Either an allowed protocol (http, https, mailto or ftp).\n * (2) or no protocol.  A protocol must be followed by a colon. The below\n *     allows that by allowing colons only after one of the characters [/?#].\n *     A colon after a hash (#) must be in the fragment.\n *     Otherwise, a colon after a (?) must be in a query.\n *     Otherwise, a colon after a single solidus (/) must be in a path.\n *     Otherwise, a colon after a double solidus (//) must be in the authority\n *     (before port).\n *\n * The pattern disallows &, used in HTML entity declarations before\n * one of the characters in [/?#]. This disallows HTML entities used in the\n * protocol name, which should never happen, e.g. \"h&#116;tp\" for \"http\".\n * It also disallows HTML entities in the first path part of a relative path,\n * e.g. \"foo&lt;bar/baz\".  Our existing escaping functions should not produce\n * that. More importantly, it disallows masking of a colon,\n * e.g. \"javascript&#58;...\".\n *\n * This regular expression was taken from the Closure sanitization library.\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi;\n/* A pattern that matches safe srcset values */\nconst SAFE_SRCSET_PATTERN = /^(?:(?:https?|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\\/]+=*$/i;\nfunction _sanitizeUrl(url) {\n    url = String(url);\n    if (url.match(SAFE_URL_PATTERN) || url.match(DATA_URL_PATTERN))\n        return url;\n    if (isDevMode()) {\n        console.warn(`WARNING: sanitizing unsafe URL value ${url} (see http://g.co/ng/security#xss)`);\n    }\n    return 'unsafe:' + url;\n}\nfunction sanitizeSrcset(srcset) {\n    srcset = String(srcset);\n    return srcset.split(',').map((srcset) => _sanitizeUrl(srcset.trim())).join(', ');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction tagSet(tags) {\n    const res = {};\n    for (const t of tags.split(','))\n        res[t] = true;\n    return res;\n}\nfunction merge(...sets) {\n    const res = {};\n    for (const s of sets) {\n        for (const v in s) {\n            if (s.hasOwnProperty(v))\n                res[v] = true;\n        }\n    }\n    return res;\n}\n// Good source of info about elements and attributes\n// http://dev.w3.org/html5/spec/Overview.html#semantics\n// http://simon.html5.org/html-elements\n// Safe Void Elements - HTML5\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\nconst VOID_ELEMENTS = tagSet('area,br,col,hr,img,wbr');\n// Elements that you can, intentionally, leave open (and which close themselves)\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\nconst OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nconst OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nconst OPTIONAL_END_TAG_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nconst BLOCK_ELEMENTS = merge(OPTIONAL_END_TAG_BLOCK_ELEMENTS, tagSet('address,article,' +\n    'aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +\n    'h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul'));\n// Inline Elements - HTML5\nconst INLINE_ELEMENTS = merge(OPTIONAL_END_TAG_INLINE_ELEMENTS, tagSet('a,abbr,acronym,audio,b,' +\n    'bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,' +\n    'samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video'));\nconst VALID_ELEMENTS = merge(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nconst URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nconst SRCSET_ATTRS = tagSet('srcset');\nconst HTML_ATTRS = tagSet('abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,' +\n    'compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,' +\n    'ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,' +\n    'scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,' +\n    'valign,value,vspace,width');\n// Accessibility attributes as per WAI-ARIA 1.1 (W3C Working Draft 14 December 2018)\nconst ARIA_ATTRS = tagSet('aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,' +\n    'aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,' +\n    'aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,' +\n    'aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,' +\n    'aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,' +\n    'aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,' +\n    'aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext');\n// NB: This currently consciously doesn't support SVG. SVG sanitization has had several security\n// issues in the past, so it seems safer to leave it out if possible. If support for binding SVG via\n// innerHTML is required, SVG attributes should be added here.\n// NB: Sanitization does not allow <form> elements or other active elements (<button> etc). Those\n// can be sanitized, but they increase security surface area without a legitimate use case, so they\n// are left out here.\nconst VALID_ATTRS = merge(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS, ARIA_ATTRS);\n// Elements whose content should not be traversed/preserved, if the elements themselves are invalid.\n//\n// Typically, `<invalid>Some content</invalid>` would traverse (and in this case preserve)\n// `Some content`, but strip `invalid-element` opening/closing tags. For some elements, though, we\n// don't want to preserve the content, if the elements themselves are going to be removed.\nconst SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS = tagSet('script,style,template');\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nclass SanitizingHtmlSerializer {\n    constructor() {\n        // Explicitly track if something was stripped, to avoid accidentally warning of sanitization just\n        // because characters were re-encoded.\n        this.sanitizedSomething = false;\n        this.buf = [];\n    }\n    sanitizeChildren(el) {\n        // This cannot use a TreeWalker, as it has to run on Angular's various DOM adapters.\n        // However this code never accesses properties off of `document` before deleting its contents\n        // again, so it shouldn't be vulnerable to DOM clobbering.\n        let current = el.firstChild;\n        let traverseContent = true;\n        while (current) {\n            if (current.nodeType === Node.ELEMENT_NODE) {\n                traverseContent = this.startElement(current);\n            }\n            else if (current.nodeType === Node.TEXT_NODE) {\n                this.chars(current.nodeValue);\n            }\n            else {\n                // Strip non-element, non-text nodes.\n                this.sanitizedSomething = true;\n            }\n            if (traverseContent && current.firstChild) {\n                current = current.firstChild;\n                continue;\n            }\n            while (current) {\n                // Leaving the element. Walk up and to the right, closing tags as we go.\n                if (current.nodeType === Node.ELEMENT_NODE) {\n                    this.endElement(current);\n                }\n                let next = this.checkClobberedElement(current, current.nextSibling);\n                if (next) {\n                    current = next;\n                    break;\n                }\n                current = this.checkClobberedElement(current, current.parentNode);\n            }\n        }\n        return this.buf.join('');\n    }\n    /**\n     * Sanitizes an opening element tag (if valid) and returns whether the element's contents should\n     * be traversed. Element content must always be traversed (even if the element itself is not\n     * valid/safe), unless the element is one of `SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS`.\n     *\n     * @param element The element to sanitize.\n     * @return True if the element's contents should be traversed.\n     */\n    startElement(element) {\n        const tagName = element.nodeName.toLowerCase();\n        if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n            this.sanitizedSomething = true;\n            return !SKIP_TRAVERSING_CONTENT_IF_INVALID_ELEMENTS.hasOwnProperty(tagName);\n        }\n        this.buf.push('<');\n        this.buf.push(tagName);\n        const elAttrs = element.attributes;\n        for (let i = 0; i < elAttrs.length; i++) {\n            const elAttr = elAttrs.item(i);\n            const attrName = elAttr.name;\n            const lower = attrName.toLowerCase();\n            if (!VALID_ATTRS.hasOwnProperty(lower)) {\n                this.sanitizedSomething = true;\n                continue;\n            }\n            let value = elAttr.value;\n            // TODO(martinprobst): Special case image URIs for data:image/...\n            if (URI_ATTRS[lower])\n                value = _sanitizeUrl(value);\n            if (SRCSET_ATTRS[lower])\n                value = sanitizeSrcset(value);\n            this.buf.push(' ', attrName, '=\"', encodeEntities(value), '\"');\n        }\n        this.buf.push('>');\n        return true;\n    }\n    endElement(current) {\n        const tagName = current.nodeName.toLowerCase();\n        if (VALID_ELEMENTS.hasOwnProperty(tagName) && !VOID_ELEMENTS.hasOwnProperty(tagName)) {\n            this.buf.push('</');\n            this.buf.push(tagName);\n            this.buf.push('>');\n        }\n    }\n    chars(chars) {\n        this.buf.push(encodeEntities(chars));\n    }\n    checkClobberedElement(node, nextNode) {\n        if (nextNode &&\n            (node.compareDocumentPosition(nextNode) &\n                Node.DOCUMENT_POSITION_CONTAINED_BY) === Node.DOCUMENT_POSITION_CONTAINED_BY) {\n            throw new Error(`Failed to sanitize html because the element is clobbered: ${node.outerHTML}`);\n        }\n        return nextNode;\n    }\n}\n// Regular Expressions for parsing tags and attributes\nconst SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nconst NON_ALPHANUMERIC_REGEXP = /([^\\#-~ |!])/g;\n/**\n * Escapes all potentially dangerous characters, so that the\n * resulting string can be safely inserted into attribute or\n * element text.\n * @param value\n */\nfunction encodeEntities(value) {\n    return value.replace(/&/g, '&amp;')\n        .replace(SURROGATE_PAIR_REGEXP, function (match) {\n        const hi = match.charCodeAt(0);\n        const low = match.charCodeAt(1);\n        return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n    })\n        .replace(NON_ALPHANUMERIC_REGEXP, function (match) {\n        return '&#' + match.charCodeAt(0) + ';';\n    })\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;');\n}\nlet inertBodyHelper;\n/**\n * Sanitizes the given unsafe, untrusted HTML fragment, and returns HTML text that is safe to add to\n * the DOM in a browser environment.\n */\nfunction _sanitizeHtml(defaultDoc, unsafeHtmlInput) {\n    let inertBodyElement = null;\n    try {\n        inertBodyHelper = inertBodyHelper || getInertBodyHelper(defaultDoc);\n        // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n        let unsafeHtml = unsafeHtmlInput ? String(unsafeHtmlInput) : '';\n        inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n        // mXSS protection. Repeatedly parse the document to make sure it stabilizes, so that a browser\n        // trying to auto-correct incorrect HTML cannot cause formerly inert HTML to become dangerous.\n        let mXSSAttempts = 5;\n        let parsedHtml = unsafeHtml;\n        do {\n            if (mXSSAttempts === 0) {\n                throw new Error('Failed to sanitize html because the input is unstable');\n            }\n            mXSSAttempts--;\n            unsafeHtml = parsedHtml;\n            parsedHtml = inertBodyElement.innerHTML;\n            inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n        } while (unsafeHtml !== parsedHtml);\n        const sanitizer = new SanitizingHtmlSerializer();\n        const safeHtml = sanitizer.sanitizeChildren(getTemplateContent(inertBodyElement) || inertBodyElement);\n        if (isDevMode() && sanitizer.sanitizedSomething) {\n            console.warn('WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss');\n        }\n        return safeHtml;\n    }\n    finally {\n        // In case anything goes wrong, clear out inertElement to reset the entire DOM structure.\n        if (inertBodyElement) {\n            const parent = getTemplateContent(inertBodyElement) || inertBodyElement;\n            while (parent.firstChild) {\n                parent.removeChild(parent.firstChild);\n            }\n        }\n    }\n}\nfunction getTemplateContent(el) {\n    return 'content' in el /** Microsoft/TypeScript#21517 */ && isTemplateElement(el) ?\n        el.content :\n        null;\n}\nfunction isTemplateElement(el) {\n    return el.nodeType === Node.ELEMENT_NODE && el.nodeName === 'TEMPLATE';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizer for more details on security in Angular applications.\n *\n * @publicApi\n */\nvar SecurityContext;\n(function (SecurityContext) {\n    SecurityContext[SecurityContext[\"NONE\"] = 0] = \"NONE\";\n    SecurityContext[SecurityContext[\"HTML\"] = 1] = \"HTML\";\n    SecurityContext[SecurityContext[\"STYLE\"] = 2] = \"STYLE\";\n    SecurityContext[SecurityContext[\"SCRIPT\"] = 3] = \"SCRIPT\";\n    SecurityContext[SecurityContext[\"URL\"] = 4] = \"URL\";\n    SecurityContext[SecurityContext[\"RESOURCE_URL\"] = 5] = \"RESOURCE_URL\";\n})(SecurityContext || (SecurityContext = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An `html` sanitizer which converts untrusted `html` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `html` and locates potentially dangerous content (such as urls and\n * javascript) and removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustHtml}.\n *\n * @param unsafeHtml untrusted `html`, typically from the user.\n * @returns `html` string which is safe to display to user, because all of the dangerous javascript\n * and urls have been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeHtml(unsafeHtml) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.HTML, unsafeHtml) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeHtml, \"HTML\" /* Html */)) {\n        return unwrapSafeValue(unsafeHtml);\n    }\n    return _sanitizeHtml(getDocument(), renderStringify(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeStyle(unsafeStyle) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.STYLE, unsafeStyle) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeStyle, \"Style\" /* Style */)) {\n        return unwrapSafeValue(unsafeStyle);\n    }\n    return renderStringify(unsafeStyle);\n}\n/**\n * A `url` sanitizer which converts untrusted `url` **string** into trusted string by removing\n * dangerous\n * content.\n *\n * This method parses the `url` and locates potentially dangerous content (such as javascript) and\n * removes it.\n *\n * It is possible to mark a string as trusted by calling {@link bypassSanitizationTrustUrl}.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * all of the dangerous javascript has been removed.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrl(unsafeUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.URL, unsafeUrl) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeUrl, \"URL\" /* Url */)) {\n        return unwrapSafeValue(unsafeUrl);\n    }\n    return _sanitizeUrl(renderStringify(unsafeUrl));\n}\n/**\n * A `url` sanitizer which only lets trusted `url`s through.\n *\n * This passes only `url`s marked trusted by calling {@link bypassSanitizationTrustResourceUrl}.\n *\n * @param unsafeResourceUrl untrusted `url`, typically from the user.\n * @returns `url` string which is safe to bind to the `src` properties such as `<img src>`, because\n * only trusted `url`s have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeResourceUrl(unsafeResourceUrl) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.RESOURCE_URL, unsafeResourceUrl) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeResourceUrl, \"ResourceURL\" /* ResourceUrl */)) {\n        return unwrapSafeValue(unsafeResourceUrl);\n    }\n    throw new Error('unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n}\n/**\n * A `script` sanitizer which only lets trusted javascript through.\n *\n * This passes only `script`s marked trusted by calling {@link\n * bypassSanitizationTrustScript}.\n *\n * @param unsafeScript untrusted `script`, typically from the user.\n * @returns `url` string which is safe to bind to the `<script>` element such as `<img src>`,\n * because only trusted `scripts` have been allowed to pass.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeScript(unsafeScript) {\n    const sanitizer = getSanitizer();\n    if (sanitizer) {\n        return sanitizer.sanitize(SecurityContext.SCRIPT, unsafeScript) || '';\n    }\n    if (allowSanitizationBypassAndThrow(unsafeScript, \"Script\" /* Script */)) {\n        return unwrapSafeValue(unsafeScript);\n    }\n    throw new Error('unsafe value used in a script context');\n}\n/**\n * Detects which sanitizer to use for URL property, based on tag name and prop name.\n *\n * The rules are based on the RESOURCE_URL context config from\n * `packages/compiler/src/schema/dom_security_schema.ts`.\n * If tag and prop names don't match Resource URL schema, use URL sanitizer.\n */\nfunction getUrlSanitizer(tag, prop) {\n    if ((prop === 'src' &&\n        (tag === 'embed' || tag === 'frame' || tag === 'iframe' || tag === 'media' ||\n            tag === 'script')) ||\n        (prop === 'href' && (tag === 'base' || tag === 'link'))) {\n        return ɵɵsanitizeResourceUrl;\n    }\n    return ɵɵsanitizeUrl;\n}\n/**\n * Sanitizes URL, selecting sanitizer function based on tag and property names.\n *\n * This function is used in case we can't define security context at compile time, when only prop\n * name is available. This happens when we generate host bindings for Directives/Components. The\n * host element is unknown at compile time, so we defer calculation of specific sanitizer to\n * runtime.\n *\n * @param unsafeUrl untrusted `url`, typically from the user.\n * @param tag target element tag name.\n * @param prop name of the property that contains the value.\n * @returns `url` string which is safe to bind.\n *\n * @codeGenApi\n */\nfunction ɵɵsanitizeUrlOrResourceUrl(unsafeUrl, tag, prop) {\n    return getUrlSanitizer(tag, prop)(unsafeUrl);\n}\nfunction validateAgainstEventProperties(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const msg = `Binding to event property '${name}' is disallowed for security reasons, ` +\n            `please use (${name.slice(2)})=...` +\n            `\\nIf '${name}' is a directive input, make sure the directive is imported by the` +\n            ` current module.`;\n        throw new Error(msg);\n    }\n}\nfunction validateAgainstEventAttributes(name) {\n    if (name.toLowerCase().startsWith('on')) {\n        const msg = `Binding to event attribute '${name}' is disallowed for security reasons, ` +\n            `please use (${name.slice(2)})=...`;\n        throw new Error(msg);\n    }\n}\nfunction getSanitizer() {\n    const lView = getLView();\n    return lView && lView[SANITIZER];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * THIS FILE CONTAINS CODE WHICH SHOULD BE TREE SHAKEN AND NEVER CALLED FROM PRODUCTION CODE!!!\n */\n/**\n * Creates an `Array` construction with a given name. This is useful when\n * looking for memory consumption to see what time of array it is.\n *\n *\n * @param name Name to give to the constructor\n * @returns A subclass of `Array` if possible. This can only be done in\n *          environments which support `class` construct.\n */\nfunction createNamedArrayType(name) {\n    // This should never be called in prod mode, so let's verify that is the case.\n    if (ngDevMode) {\n        try {\n            // We need to do it this way so that TypeScript does not down-level the below code.\n            const FunctionConstructor = createNamedArrayType.constructor;\n            return (new FunctionConstructor('Array', `return class ${name} extends Array{}`))(Array);\n        }\n        catch (e) {\n            // If it does not work just give up and fall back to regular Array.\n            return Array;\n        }\n    }\n    else {\n        throw new Error('Looks like we are in \\'prod mode\\', but we are creating a named Array type, which is wrong! Check your code');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction normalizeDebugBindingName(name) {\n    // Attribute names with `$` (eg `x-y$`) are valid per spec, but unsupported by some browsers\n    name = camelCaseToDashCase(name.replace(/[$@]/g, '_'));\n    return `ng-reflect-${name}`;\n}\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n    return input.replace(CAMEL_CASE_REGEXP, (...m) => '-' + m[1].toLowerCase());\n}\nfunction normalizeDebugBindingValue(value) {\n    try {\n        // Limit the size of the value as otherwise the DOM just gets polluted.\n        return value != null ? value.toString().slice(0, 30) : value;\n    }\n    catch (e) {\n        return '[ERROR] Exception while trying to serialize the value';\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns the matching `LContext` data for a given DOM node, directive or component instance.\n *\n * This function will examine the provided DOM element, component, or directive instance\\'s\n * monkey-patched property to derive the `LContext` data. Once called then the monkey-patched\n * value will be that of the newly created `LContext`.\n *\n * If the monkey-patched value is the `LView` instance then the context value for that\n * target will be created and the monkey-patch reference will be updated. Therefore when this\n * function is called it may mutate the provided element\\'s, component\\'s or any of the associated\n * directive\\'s monkey-patch values.\n *\n * If the monkey-patch value is not detected then the code will walk up the DOM until an element\n * is found which contains a monkey-patch reference. When that occurs then the provided element\n * will be updated with a new context (which is then returned). If the monkey-patch value is not\n * detected for a component/directive instance then it will throw an error (all components and\n * directives should be automatically monkey-patched by ivy).\n *\n * @param target Component, Directive or DOM Node.\n */\nfunction getLContext(target) {\n    let mpValue = readPatchedData(target);\n    if (mpValue) {\n        // only when it's an array is it considered an LView instance\n        // ... otherwise it's an already constructed LContext instance\n        if (Array.isArray(mpValue)) {\n            const lView = mpValue;\n            let nodeIndex;\n            let component = undefined;\n            let directives = undefined;\n            if (isComponentInstance(target)) {\n                nodeIndex = findViaComponent(lView, target);\n                if (nodeIndex == -1) {\n                    throw new Error('The provided component was not found in the application');\n                }\n                component = target;\n            }\n            else if (isDirectiveInstance(target)) {\n                nodeIndex = findViaDirective(lView, target);\n                if (nodeIndex == -1) {\n                    throw new Error('The provided directive was not found in the application');\n                }\n                directives = getDirectivesAtNodeIndex(nodeIndex, lView, false);\n            }\n            else {\n                nodeIndex = findViaNativeElement(lView, target);\n                if (nodeIndex == -1) {\n                    return null;\n                }\n            }\n            // the goal is not to fill the entire context full of data because the lookups\n            // are expensive. Instead, only the target data (the element, component, container, ICU\n            // expression or directive details) are filled into the context. If called multiple times\n            // with different target values then the missing target data will be filled in.\n            const native = unwrapRNode(lView[nodeIndex]);\n            const existingCtx = readPatchedData(native);\n            const context = (existingCtx && !Array.isArray(existingCtx)) ?\n                existingCtx :\n                createLContext(lView, nodeIndex, native);\n            // only when the component has been discovered then update the monkey-patch\n            if (component && context.component === undefined) {\n                context.component = component;\n                attachPatchData(context.component, context);\n            }\n            // only when the directives have been discovered then update the monkey-patch\n            if (directives && context.directives === undefined) {\n                context.directives = directives;\n                for (let i = 0; i < directives.length; i++) {\n                    attachPatchData(directives[i], context);\n                }\n            }\n            attachPatchData(context.native, context);\n            mpValue = context;\n        }\n    }\n    else {\n        const rElement = target;\n        ngDevMode && assertDomNode(rElement);\n        // if the context is not found then we need to traverse upwards up the DOM\n        // to find the nearest element that has already been monkey patched with data\n        let parent = rElement;\n        while (parent = parent.parentNode) {\n            const parentContext = readPatchedData(parent);\n            if (parentContext) {\n                let lView;\n                if (Array.isArray(parentContext)) {\n                    lView = parentContext;\n                }\n                else {\n                    lView = parentContext.lView;\n                }\n                // the edge of the app was also reached here through another means\n                // (maybe because the DOM was changed manually).\n                if (!lView) {\n                    return null;\n                }\n                const index = findViaNativeElement(lView, rElement);\n                if (index >= 0) {\n                    const native = unwrapRNode(lView[index]);\n                    const context = createLContext(lView, index, native);\n                    attachPatchData(native, context);\n                    mpValue = context;\n                    break;\n                }\n            }\n        }\n    }\n    return mpValue || null;\n}\n/**\n * Creates an empty instance of a `LContext` context\n */\nfunction createLContext(lView, nodeIndex, native) {\n    return {\n        lView,\n        nodeIndex,\n        native,\n        component: undefined,\n        directives: undefined,\n        localRefs: undefined,\n    };\n}\n/**\n * Takes a component instance and returns the view for that component.\n *\n * @param componentInstance\n * @returns The component's view\n */\nfunction getComponentViewByInstance(componentInstance) {\n    let lView = readPatchedData(componentInstance);\n    let view;\n    if (Array.isArray(lView)) {\n        const nodeIndex = findViaComponent(lView, componentInstance);\n        view = getComponentLViewByIndex(nodeIndex, lView);\n        const context = createLContext(lView, nodeIndex, view[HOST]);\n        context.component = componentInstance;\n        attachPatchData(componentInstance, context);\n        attachPatchData(context.native, context);\n    }\n    else {\n        const context = lView;\n        view = getComponentLViewByIndex(context.nodeIndex, context.lView);\n    }\n    return view;\n}\n/**\n * Assigns the given data to the given target (which could be a component,\n * directive or DOM node instance) using monkey-patching.\n */\nfunction attachPatchData(target, data) {\n    target[MONKEY_PATCH_KEY_NAME] = data;\n}\nfunction isComponentInstance(instance) {\n    return instance && instance.constructor && instance.constructor.ɵcmp;\n}\nfunction isDirectiveInstance(instance) {\n    return instance && instance.constructor && instance.constructor.ɵdir;\n}\n/**\n * Locates the element within the given LView and returns the matching index\n */\nfunction findViaNativeElement(lView, target) {\n    let tNode = lView[TVIEW].firstChild;\n    while (tNode) {\n        const native = getNativeByTNodeOrNull(tNode, lView);\n        if (native === target) {\n            return tNode.index;\n        }\n        tNode = traverseNextElement(tNode);\n    }\n    return -1;\n}\n/**\n * Locates the next tNode (child, sibling or parent).\n */\nfunction traverseNextElement(tNode) {\n    if (tNode.child) {\n        return tNode.child;\n    }\n    else if (tNode.next) {\n        return tNode.next;\n    }\n    else {\n        // Let's take the following template: <div><span>text</span></div><component/>\n        // After checking the text node, we need to find the next parent that has a \"next\" TNode,\n        // in this case the parent `div`, so that we can find the component.\n        while (tNode.parent && !tNode.parent.next) {\n            tNode = tNode.parent;\n        }\n        return tNode.parent && tNode.parent.next;\n    }\n}\n/**\n * Locates the component within the given LView and returns the matching index\n */\nfunction findViaComponent(lView, componentInstance) {\n    const componentIndices = lView[TVIEW].components;\n    if (componentIndices) {\n        for (let i = 0; i < componentIndices.length; i++) {\n            const elementComponentIndex = componentIndices[i];\n            const componentView = getComponentLViewByIndex(elementComponentIndex, lView);\n            if (componentView[CONTEXT] === componentInstance) {\n                return elementComponentIndex;\n            }\n        }\n    }\n    else {\n        const rootComponentView = getComponentLViewByIndex(HEADER_OFFSET, lView);\n        const rootComponent = rootComponentView[CONTEXT];\n        if (rootComponent === componentInstance) {\n            // we are dealing with the root element here therefore we know that the\n            // element is the very first element after the HEADER data in the lView\n            return HEADER_OFFSET;\n        }\n    }\n    return -1;\n}\n/**\n * Locates the directive within the given LView and returns the matching index\n */\nfunction findViaDirective(lView, directiveInstance) {\n    // if a directive is monkey patched then it will (by default)\n    // have a reference to the LView of the current view. The\n    // element bound to the directive being search lives somewhere\n    // in the view data. We loop through the nodes and check their\n    // list of directives for the instance.\n    let tNode = lView[TVIEW].firstChild;\n    while (tNode) {\n        const directiveIndexStart = tNode.directiveStart;\n        const directiveIndexEnd = tNode.directiveEnd;\n        for (let i = directiveIndexStart; i < directiveIndexEnd; i++) {\n            if (lView[i] === directiveInstance) {\n                return tNode.index;\n            }\n        }\n        tNode = traverseNextElement(tNode);\n    }\n    return -1;\n}\n/**\n * Returns a list of directives extracted from the given view based on the\n * provided list of directive index values.\n *\n * @param nodeIndex The node index\n * @param lView The target view data\n * @param includeComponents Whether or not to include components in returned directives\n */\nfunction getDirectivesAtNodeIndex(nodeIndex, lView, includeComponents) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    let directiveStartIndex = tNode.directiveStart;\n    if (directiveStartIndex == 0)\n        return EMPTY_ARRAY;\n    const directiveEndIndex = tNode.directiveEnd;\n    if (!includeComponents && tNode.flags & 2 /* isComponentHost */)\n        directiveStartIndex++;\n    return lView.slice(directiveStartIndex, directiveEndIndex);\n}\nfunction getComponentAtNodeIndex(nodeIndex, lView) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    let directiveStartIndex = tNode.directiveStart;\n    return tNode.flags & 2 /* isComponentHost */ ? lView[directiveStartIndex] : null;\n}\n/**\n * Returns a map of local references (local reference name => element or directive instance) that\n * exist on a given element.\n */\nfunction discoverLocalRefs(lView, nodeIndex) {\n    const tNode = lView[TVIEW].data[nodeIndex];\n    if (tNode && tNode.localNames) {\n        const result = {};\n        let localIndex = tNode.index + 1;\n        for (let i = 0; i < tNode.localNames.length; i += 2) {\n            result[tNode.localNames[i]] = lView[localIndex];\n            localIndex++;\n        }\n        return result;\n    }\n    return null;\n}\n\n/** Called when directives inject each other (creating a circular dependency) */\nfunction throwCyclicDependencyError(token) {\n    throw new Error(`Cannot instantiate cyclic dependency! ${token}`);\n}\n/** Called when there are multiple component selectors that match a given node */\nfunction throwMultipleComponentError(tNode) {\n    throw new Error(`Multiple components match node with tagname ${tNode.tagName}`);\n}\nfunction throwMixedMultiProviderError() {\n    throw new Error(`Cannot mix multi providers and regular providers`);\n}\nfunction throwInvalidProviderError(ngModuleType, providers, provider) {\n    let ngModuleDetail = '';\n    if (ngModuleType && providers) {\n        const providerDetail = providers.map(v => v == provider ? '?' + provider + '?' : '...');\n        ngModuleDetail =\n            ` - only instances of Provider and Type are allowed, got: [${providerDetail.join(', ')}]`;\n    }\n    throw new Error(`Invalid provider for the NgModule '${stringify(ngModuleType)}'` + ngModuleDetail);\n}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, oldValue, currValue, propName) {\n    const field = propName ? ` for '${propName}'` : '';\n    let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value${field}: '${oldValue}'. Current value: '${currValue}'.`;\n    if (creationMode) {\n        msg +=\n            ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n                ` Has it been created in a change detection hook?`;\n    }\n    // TODO: include debug context, see `viewDebugError` function in\n    // `packages/core/src/view/errors.ts` for reference.\n    throw new Error(msg);\n}\nfunction constructDetailsForInterpolation(lView, rootIndex, expressionIndex, meta, changedValue) {\n    const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);\n    let oldValue = prefix, newValue = prefix;\n    for (let i = 0; i < chunks.length; i++) {\n        const slotIdx = rootIndex + i;\n        oldValue += `${lView[slotIdx]}${chunks[i]}`;\n        newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;\n    }\n    return { propName, oldValue, newValue };\n}\n/**\n * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:\n * - property name (for property bindings or interpolations)\n * - old and new values, enriched using information from metadata\n *\n * More information on the metadata storage format can be found in `storePropertyBindingMetadata`\n * function description.\n */\nfunction getExpressionChangedErrorDetails(lView, bindingIndex, oldValue, newValue) {\n    const tData = lView[TVIEW].data;\n    const metadata = tData[bindingIndex];\n    if (typeof metadata === 'string') {\n        // metadata for property interpolation\n        if (metadata.indexOf(INTERPOLATION_DELIMITER) > -1) {\n            return constructDetailsForInterpolation(lView, bindingIndex, bindingIndex, metadata, newValue);\n        }\n        // metadata for property binding\n        return { propName: metadata, oldValue, newValue };\n    }\n    // metadata is not available for this expression, check if this expression is a part of the\n    // property interpolation by going from the current binding index left and look for a string that\n    // contains INTERPOLATION_DELIMITER, the layout in tView.data for this case will look like this:\n    // [..., 'id�Prefix � and � suffix', null, null, null, ...]\n    if (metadata === null) {\n        let idx = bindingIndex - 1;\n        while (typeof tData[idx] !== 'string' && tData[idx + 1] === null) {\n            idx--;\n        }\n        const meta = tData[idx];\n        if (typeof meta === 'string') {\n            const matches = meta.match(new RegExp(INTERPOLATION_DELIMITER, 'g'));\n            // first interpolation delimiter separates property name from interpolation parts (in case of\n            // property interpolations), so we subtract one from total number of found delimiters\n            if (matches && (matches.length - 1) > bindingIndex - idx) {\n                return constructDetailsForInterpolation(lView, idx, bindingIndex, meta, newValue);\n            }\n        }\n    }\n    return { propName: undefined, oldValue, newValue };\n}\n\n/**\n * Converts `TNodeType` into human readable text.\n * Make sure this matches with `TNodeType`\n */\nconst TNodeTypeAsString = [\n    'Container',\n    'Projection',\n    'View',\n    'Element',\n    'ElementContainer',\n    'IcuContainer' // 5\n];\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$4 = 1;\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `class` binding.\n *\n * ```\n * <div my-dir [class]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasClassInput(tNode) {\n    return (tNode.flags & 16 /* hasClassInput */) !== 0;\n}\n/**\n * Returns `true` if the `TNode` has a directive which has `@Input()` for `style` binding.\n *\n * ```\n * <div my-dir [style]=\"exp\"></div>\n * ```\n * and\n * ```\n * @Directive({\n * })\n * class MyDirective {\n *   @Input()\n *   class: string;\n * }\n * ```\n *\n * In the above case it is necessary to write the reconciled styling information into the\n * directive's input.\n *\n * @param tNode\n */\nfunction hasStyleInput(tNode) {\n    return (tNode.flags & 32 /* hasStyleInput */) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$5 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Returns an index of `classToSearch` in `className` taking token boundaries into account.\n *\n * `classIndexOf('AB A', 'A', 0)` will be 3 (not 0 since `AB!==A`)\n *\n * @param className A string containing classes (whitespace separated)\n * @param classToSearch A class name to locate\n * @param startingIndex Starting location of search\n * @returns an index of the located class (or -1 if not found)\n */\nfunction classIndexOf(className, classToSearch, startingIndex) {\n    ngDevMode && assertNotEqual(classToSearch, '', 'can not look for \"\" string.');\n    let end = className.length;\n    while (true) {\n        const foundIndex = className.indexOf(classToSearch, startingIndex);\n        if (foundIndex === -1)\n            return foundIndex;\n        if (foundIndex === 0 || className.charCodeAt(foundIndex - 1) <= 32 /* SPACE */) {\n            // Ensure that it has leading whitespace\n            const length = classToSearch.length;\n            if (foundIndex + length === end ||\n                className.charCodeAt(foundIndex + length) <= 32 /* SPACE */) {\n                // Ensure that it has trailing whitespace\n                return foundIndex;\n            }\n        }\n        // False positive, keep searching from where we left off.\n        startingIndex = foundIndex + 1;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd = unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5;\nconst NG_TEMPLATE_SELECTOR = 'ng-template';\n/**\n * Search the `TAttributes` to see if it contains `cssClassToMatch` (case insensitive)\n *\n * @param attrs `TAttributes` to search through.\n * @param cssClassToMatch class to match (lowercase)\n * @param isProjectionMode Whether or not class matching should look into the attribute `class` in\n *    addition to the `AttributeMarker.Classes`.\n */\nfunction isCssClassMatching(attrs, cssClassToMatch, isProjectionMode) {\n    // TODO(misko): The fact that this function needs to know about `isProjectionMode` seems suspect.\n    // It is strange to me that sometimes the class information comes in form of `class` attribute\n    // and sometimes in form of `AttributeMarker.Classes`. Some investigation is needed to determine\n    // if that is the right behavior.\n    ngDevMode &&\n        assertEqual(cssClassToMatch, cssClassToMatch.toLowerCase(), 'Class name expected to be lowercase.');\n    let i = 0;\n    while (i < attrs.length) {\n        let item = attrs[i++];\n        if (isProjectionMode && item === 'class') {\n            item = attrs[i];\n            if (classIndexOf(item.toLowerCase(), cssClassToMatch, 0) !== -1) {\n                return true;\n            }\n        }\n        else if (item === 1 /* Classes */) {\n            // We found the classes section. Start searching for the class.\n            while (i < attrs.length && typeof (item = attrs[i++]) == 'string') {\n                // while we have strings\n                if (item.toLowerCase() === cssClassToMatch)\n                    return true;\n            }\n            return false;\n        }\n    }\n    return false;\n}\n/**\n * Checks whether the `tNode` represents an inline template (e.g. `*ngFor`).\n *\n * @param tNode current TNode\n */\nfunction isInlineTemplate(tNode) {\n    return tNode.type === 0 /* Container */ && tNode.tagName !== NG_TEMPLATE_SELECTOR;\n}\n/**\n * Function that checks whether a given tNode matches tag-based selector and has a valid type.\n *\n * Matching can be performed in 2 modes: projection mode (when we project nodes) and regular\n * directive matching mode:\n * - in the \"directive matching\" mode we do _not_ take TContainer's tagName into account if it is\n * different from NG_TEMPLATE_SELECTOR (value different from NG_TEMPLATE_SELECTOR indicates that a\n * tag name was extracted from * syntax so we would match the same directive twice);\n * - in the \"projection\" mode, we use a tag name potentially extracted from the * syntax processing\n * (applicable to TNodeType.Container only).\n */\nfunction hasTagAndTypeMatch(tNode, currentSelector, isProjectionMode) {\n    const tagNameToCompare = tNode.type === 0 /* Container */ && !isProjectionMode ?\n        NG_TEMPLATE_SELECTOR :\n        tNode.tagName;\n    return currentSelector === tagNameToCompare;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data of the node to match\n * @param selector The selector to try matching against the node.\n * @param isProjectionMode if `true` we are matching for content projection, otherwise we are doing\n * directive matching.\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector, isProjectionMode) {\n    ngDevMode && assertDefined(selector[0], 'Selector should have a tag name');\n    let mode = 4 /* ELEMENT */;\n    const nodeAttrs = tNode.attrs || [];\n    // Find the index of first attribute that has no value, only a name.\n    const nameOnlyMarkerIdx = getNameOnlyMarkerIndex(nodeAttrs);\n    // When processing \":not\" selectors, we skip to the next \":not\" if the\n    // current one doesn't match\n    let skipToNextSelector = false;\n    for (let i = 0; i < selector.length; i++) {\n        const current = selector[i];\n        if (typeof current === 'number') {\n            // If we finish processing a :not selector and it hasn't failed, return false\n            if (!skipToNextSelector && !isPositive(mode) && !isPositive(current)) {\n                return false;\n            }\n            // If we are skipping to the next :not() and this mode flag is positive,\n            // it's a part of the current :not() selector, and we should keep skipping\n            if (skipToNextSelector && isPositive(current))\n                continue;\n            skipToNextSelector = false;\n            mode = current | (mode & 1 /* NOT */);\n            continue;\n        }\n        if (skipToNextSelector)\n            continue;\n        if (mode & 4 /* ELEMENT */) {\n            mode = 2 /* ATTRIBUTE */ | mode & 1 /* NOT */;\n            if (current !== '' && !hasTagAndTypeMatch(tNode, current, isProjectionMode) ||\n                current === '' && selector.length === 1) {\n                if (isPositive(mode))\n                    return false;\n                skipToNextSelector = true;\n            }\n        }\n        else {\n            const selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n            // special case for matching against classes when a tNode has been instantiated with\n            // class and style values as separate attribute values (e.g. ['title', CLASS, 'foo'])\n            if ((mode & 8 /* CLASS */) && tNode.attrs !== null) {\n                if (!isCssClassMatching(tNode.attrs, selectorAttrValue, isProjectionMode)) {\n                    if (isPositive(mode))\n                        return false;\n                    skipToNextSelector = true;\n                }\n                continue;\n            }\n            const attrName = (mode & 8 /* CLASS */) ? 'class' : current;\n            const attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs, isInlineTemplate(tNode), isProjectionMode);\n            if (attrIndexInNode === -1) {\n                if (isPositive(mode))\n                    return false;\n                skipToNextSelector = true;\n                continue;\n            }\n            if (selectorAttrValue !== '') {\n                let nodeAttrValue;\n                if (attrIndexInNode > nameOnlyMarkerIdx) {\n                    nodeAttrValue = '';\n                }\n                else {\n                    ngDevMode &&\n                        assertNotEqual(nodeAttrs[attrIndexInNode], 0 /* NamespaceURI */, 'We do not match directives on namespaced attributes');\n                    // we lowercase the attribute value to be able to match\n                    // selectors without case-sensitivity\n                    // (selectors are already in lowercase when generated)\n                    nodeAttrValue = nodeAttrs[attrIndexInNode + 1].toLowerCase();\n                }\n                const compareAgainstClassName = mode & 8 /* CLASS */ ? nodeAttrValue : null;\n                if (compareAgainstClassName &&\n                    classIndexOf(compareAgainstClassName, selectorAttrValue, 0) !== -1 ||\n                    mode & 2 /* ATTRIBUTE */ && selectorAttrValue !== nodeAttrValue) {\n                    if (isPositive(mode))\n                        return false;\n                    skipToNextSelector = true;\n                }\n            }\n        }\n    }\n    return isPositive(mode) || skipToNextSelector;\n}\nfunction isPositive(mode) {\n    return (mode & 1 /* NOT */) === 0;\n}\n/**\n * Examines the attribute's definition array for a node to find the index of the\n * attribute that matches the given `name`.\n *\n * NOTE: This will not match namespaced attributes.\n *\n * Attribute matching depends upon `isInlineTemplate` and `isProjectionMode`.\n * The following table summarizes which types of attributes we attempt to match:\n *\n * ===========================================================================================================\n * Modes                   | Normal Attributes | Bindings Attributes | Template Attributes | I18n\n * Attributes\n * ===========================================================================================================\n * Inline + Projection     | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Inline + Directive      | NO                | NO                  | YES                 | NO\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Projection | YES               | YES                 | NO                  | YES\n * -----------------------------------------------------------------------------------------------------------\n * Non-inline + Directive  | YES               | YES                 | NO                  | YES\n * ===========================================================================================================\n *\n * @param name the name of the attribute to find\n * @param attrs the attribute array to examine\n * @param isInlineTemplate true if the node being matched is an inline template (e.g. `*ngFor`)\n * rather than a manually expanded template node (e.g `<ng-template>`).\n * @param isProjectionMode true if we are matching against content projection otherwise we are\n * matching against directives.\n */\nfunction findAttrIndexInNode(name, attrs, isInlineTemplate, isProjectionMode) {\n    if (attrs === null)\n        return -1;\n    let i = 0;\n    if (isProjectionMode || !isInlineTemplate) {\n        let bindingsMode = false;\n        while (i < attrs.length) {\n            const maybeAttrName = attrs[i];\n            if (maybeAttrName === name) {\n                return i;\n            }\n            else if (maybeAttrName === 3 /* Bindings */ || maybeAttrName === 6 /* I18n */) {\n                bindingsMode = true;\n            }\n            else if (maybeAttrName === 1 /* Classes */ || maybeAttrName === 2 /* Styles */) {\n                let value = attrs[++i];\n                // We should skip classes here because we have a separate mechanism for\n                // matching classes in projection mode.\n                while (typeof value === 'string') {\n                    value = attrs[++i];\n                }\n                continue;\n            }\n            else if (maybeAttrName === 4 /* Template */) {\n                // We do not care about Template attributes in this scenario.\n                break;\n            }\n            else if (maybeAttrName === 0 /* NamespaceURI */) {\n                // Skip the whole namespaced attribute and value. This is by design.\n                i += 4;\n                continue;\n            }\n            // In binding mode there are only names, rather than name-value pairs.\n            i += bindingsMode ? 1 : 2;\n        }\n        // We did not match the attribute\n        return -1;\n    }\n    else {\n        return matchTemplateAttribute(attrs, name);\n    }\n}\nfunction isNodeMatchingSelectorList(tNode, selector, isProjectionMode = false) {\n    for (let i = 0; i < selector.length; i++) {\n        if (isNodeMatchingSelector(tNode, selector[i], isProjectionMode)) {\n            return true;\n        }\n    }\n    return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n    const nodeAttrs = tNode.attrs;\n    if (nodeAttrs != null) {\n        const ngProjectAsAttrIdx = nodeAttrs.indexOf(5 /* ProjectAs */);\n        // only check for ngProjectAs in attribute names, don't accidentally match attribute's value\n        // (attribute names are stored at even indexes)\n        if ((ngProjectAsAttrIdx & 1) === 0) {\n            return nodeAttrs[ngProjectAsAttrIdx + 1];\n        }\n    }\n    return null;\n}\nfunction getNameOnlyMarkerIndex(nodeAttrs) {\n    for (let i = 0; i < nodeAttrs.length; i++) {\n        const nodeAttr = nodeAttrs[i];\n        if (isNameOnlyAttributeMarker(nodeAttr)) {\n            return i;\n        }\n    }\n    return nodeAttrs.length;\n}\nfunction matchTemplateAttribute(attrs, name) {\n    let i = attrs.indexOf(4 /* Template */);\n    if (i > -1) {\n        i++;\n        while (i < attrs.length) {\n            const attr = attrs[i];\n            // Return in case we checked all template attrs and are switching to the next section in the\n            // attrs array (that starts with a number that represents an attribute marker).\n            if (typeof attr === 'number')\n                return -1;\n            if (attr === name)\n                return i;\n            i++;\n        }\n    }\n    return -1;\n}\n/**\n * Checks whether a selector is inside a CssSelectorList\n * @param selector Selector to be checked.\n * @param list List in which to look for the selector.\n */\nfunction isSelectorInSelectorList(selector, list) {\n    selectorListLoop: for (let i = 0; i < list.length; i++) {\n        const currentSelectorInList = list[i];\n        if (selector.length !== currentSelectorInList.length) {\n            continue;\n        }\n        for (let j = 0; j < selector.length; j++) {\n            if (selector[j] !== currentSelectorInList[j]) {\n                continue selectorListLoop;\n            }\n        }\n        return true;\n    }\n    return false;\n}\nfunction maybeWrapInNotSelector(isNegativeMode, chunk) {\n    return isNegativeMode ? ':not(' + chunk.trim() + ')' : chunk;\n}\nfunction stringifyCSSSelector(selector) {\n    let result = selector[0];\n    let i = 1;\n    let mode = 2 /* ATTRIBUTE */;\n    let currentChunk = '';\n    let isNegativeMode = false;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode & 2 /* ATTRIBUTE */) {\n                const attrValue = selector[++i];\n                currentChunk +=\n                    '[' + valueOrMarker + (attrValue.length > 0 ? '=\"' + attrValue + '\"' : '') + ']';\n            }\n            else if (mode & 8 /* CLASS */) {\n                currentChunk += '.' + valueOrMarker;\n            }\n            else if (mode & 4 /* ELEMENT */) {\n                currentChunk += ' ' + valueOrMarker;\n            }\n        }\n        else {\n            //\n            // Append current chunk to the final result in case we come across SelectorFlag, which\n            // indicates that the previous section of a selector is over. We need to accumulate content\n            // between flags to make sure we wrap the chunk later in :not() selector if needed, e.g.\n            // ```\n            //  ['', Flags.CLASS, '.classA', Flags.CLASS | Flags.NOT, '.classB', '.classC']\n            // ```\n            // should be transformed to `.classA :not(.classB .classC)`.\n            //\n            // Note: for negative selector part, we accumulate content between flags until we find the\n            // next negative flag. This is needed to support a case where `:not()` rule contains more than\n            // one chunk, e.g. the following selector:\n            // ```\n            //  ['', Flags.ELEMENT | Flags.NOT, 'p', Flags.CLASS, 'foo', Flags.CLASS | Flags.NOT, 'bar']\n            // ```\n            // should be stringified to `:not(p.foo) :not(.bar)`\n            //\n            if (currentChunk !== '' && !isPositive(valueOrMarker)) {\n                result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n                currentChunk = '';\n            }\n            mode = valueOrMarker;\n            // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n            // mode is maintained for remaining chunks of a selector.\n            isNegativeMode = isNegativeMode || !isPositive(mode);\n        }\n        i++;\n    }\n    if (currentChunk !== '') {\n        result += maybeWrapInNotSelector(isNegativeMode, currentChunk);\n    }\n    return result;\n}\n/**\n * Generates string representation of CSS selector in parsed form.\n *\n * ComponentDef and DirectiveDef are generated with the selector in parsed form to avoid doing\n * additional parsing at runtime (for example, for directive matching). However in some cases (for\n * example, while bootstrapping a component), a string version of the selector is required to query\n * for the host element on the page. This function takes the parsed form of a selector and returns\n * its string representation.\n *\n * @param selectorList selector in parsed form\n * @returns string representation of a given selector\n */\nfunction stringifyCSSSelectorList(selectorList) {\n    return selectorList.map(stringifyCSSSelector).join(',');\n}\n/**\n * Extracts attributes and classes information from a given CSS selector.\n *\n * This function is used while creating a component dynamically. In this case, the host element\n * (that is created dynamically) should contain attributes and classes specified in component's CSS\n * selector.\n *\n * @param selector CSS selector in parsed form (in a form of array)\n * @returns object with `attrs` and `classes` fields that contain extracted information\n */\nfunction extractAttrsAndClassesFromSelector(selector) {\n    const attrs = [];\n    const classes = [];\n    let i = 1;\n    let mode = 2 /* ATTRIBUTE */;\n    while (i < selector.length) {\n        let valueOrMarker = selector[i];\n        if (typeof valueOrMarker === 'string') {\n            if (mode === 2 /* ATTRIBUTE */) {\n                if (valueOrMarker !== '') {\n                    attrs.push(valueOrMarker, selector[++i]);\n                }\n            }\n            else if (mode === 8 /* CLASS */) {\n                classes.push(valueOrMarker);\n            }\n        }\n        else {\n            // According to CssSelector spec, once we come across `SelectorFlags.NOT` flag, the negative\n            // mode is maintained for remaining chunks of a selector. Since attributes and classes are\n            // extracted only for \"positive\" part of the selector, we can stop here.\n            if (!isPositive(mode))\n                break;\n            mode = valueOrMarker;\n        }\n        i++;\n    }\n    return { attrs, classes };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** A special value which designates that a value has not changed. */\nconst NO_CHANGE = (typeof ngDevMode === 'undefined' || ngDevMode) ? { __brand__: 'NO_CHANGE' } : {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Gets the parent LView of the passed LView, if the PARENT is an LContainer, will get the parent of\n * that LContainer, which is an LView\n * @param lView the lView whose parent to get\n */\nfunction getLViewParent(lView) {\n    ngDevMode && assertLView(lView);\n    const parent = lView[PARENT];\n    return isLContainer(parent) ? parent[PARENT] : parent;\n}\n/**\n * Retrieve the root view from any component or `LView` by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param componentOrLView any component or `LView`\n */\nfunction getRootView(componentOrLView) {\n    ngDevMode && assertDefined(componentOrLView, 'component');\n    let lView = isLView(componentOrLView) ? componentOrLView : readPatchedLView(componentOrLView);\n    while (lView && !(lView[FLAGS] & 512 /* IsRoot */)) {\n        lView = getLViewParent(lView);\n    }\n    ngDevMode && assertLView(lView);\n    return lView;\n}\n/**\n * Returns the `RootContext` instance that is associated with\n * the application where the target is situated. It does this by walking the parent views until it\n * gets to the root view, then getting the context off of that.\n *\n * @param viewOrComponent the `LView` or component to get the root context for.\n */\nfunction getRootContext(viewOrComponent) {\n    const rootView = getRootView(viewOrComponent);\n    ngDevMode &&\n        assertDefined(rootView[CONTEXT], 'RootView has no context. Perhaps it is disconnected?');\n    return rootView[CONTEXT];\n}\n/**\n * Gets the first `LContainer` in the LView or `null` if none exists.\n */\nfunction getFirstLContainer(lView) {\n    return getNearestLContainer(lView[CHILD_HEAD]);\n}\n/**\n * Gets the next `LContainer` that is a sibling of the given container.\n */\nfunction getNextLContainer(container) {\n    return getNearestLContainer(container[NEXT]);\n}\nfunction getNearestLContainer(viewOrContainer) {\n    while (viewOrContainer !== null && !isLContainer(viewOrContainer)) {\n        viewOrContainer = viewOrContainer[NEXT];\n    }\n    return viewOrContainer;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Advances to an element for later binding instructions.\n *\n * Used in conjunction with instructions like {@link property} to act on elements with specified\n * indices, for example those created with {@link element} or {@link elementStart}.\n *\n * ```ts\n * (rf: RenderFlags, ctx: any) => {\n *   if (rf & 1) {\n *     text(0, 'Hello');\n *     text(1, 'Goodbye')\n *     element(2, 'div');\n *   }\n *   if (rf & 2) {\n *     advance(2); // Advance twice to the <div>.\n *     property('title', 'test');\n *   }\n *  }\n * ```\n * @param delta Number of elements to advance forwards by.\n *\n * @codeGenApi\n */\nfunction ɵɵadvance(delta) {\n    ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');\n    selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, getCheckNoChangesMode());\n}\nfunction selectIndexInternal(tView, lView, index, checkNoChangesMode) {\n    ngDevMode && assertGreaterThan(index, -1, 'Invalid index');\n    ngDevMode && assertIndexInRange(lView, index + HEADER_OFFSET);\n    // Flush the initial hooks for elements in the view that have been added up to this point.\n    // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n    if (!checkNoChangesMode) {\n        const hooksInitPhaseCompleted = (lView[FLAGS] & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n        if (hooksInitPhaseCompleted) {\n            const preOrderCheckHooks = tView.preOrderCheckHooks;\n            if (preOrderCheckHooks !== null) {\n                executeCheckHooks(lView, preOrderCheckHooks, index);\n            }\n        }\n        else {\n            const preOrderHooks = tView.preOrderHooks;\n            if (preOrderHooks !== null) {\n                executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, index);\n            }\n        }\n    }\n    // We must set the selected index *after* running the hooks, because hooks may have side-effects\n    // that cause other template functions to run, thus updating the selected index, which is global\n    // state. If we run `setSelectedIndex` *before* we run the hooks, in some cases the selected index\n    // will be altered by the time we leave the `ɵɵadvance` instruction.\n    setSelectedIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction toTStylingRange(prev, next) {\n    ngDevMode && assertNumberInRange(prev, 0, 32767 /* UNSIGNED_MASK */);\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n    return (prev << 17 /* PREV_SHIFT */ | next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangePrev(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange >> 17 /* PREV_SHIFT */) & 32767 /* UNSIGNED_MASK */;\n}\nfunction getTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 2 /* PREV_DUPLICATE */) ==\n        2 /* PREV_DUPLICATE */;\n}\nfunction setTStylingRangePrev(tStylingRange, previous) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(previous, 0, 32767 /* UNSIGNED_MASK */);\n    return ((tStylingRange & ~4294836224 /* PREV_MASK */) |\n        (previous << 17 /* PREV_SHIFT */));\n}\nfunction setTStylingRangePrevDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 2 /* PREV_DUPLICATE */);\n}\nfunction getTStylingRangeNext(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 131068 /* NEXT_MASK */) >> 2 /* NEXT_SHIFT */;\n}\nfunction setTStylingRangeNext(tStylingRange, next) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    ngDevMode && assertNumberInRange(next, 0, 32767 /* UNSIGNED_MASK */);\n    return ((tStylingRange & ~131068 /* NEXT_MASK */) | //\n        next << 2 /* NEXT_SHIFT */);\n}\nfunction getTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange & 1 /* NEXT_DUPLICATE */) ===\n        1 /* NEXT_DUPLICATE */;\n}\nfunction setTStylingRangeNextDuplicate(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    return (tStylingRange | 1 /* NEXT_DUPLICATE */);\n}\nfunction getTStylingRangeTail(tStylingRange) {\n    ngDevMode && assertNumber(tStylingRange, 'expected number');\n    const next = getTStylingRangeNext(tStylingRange);\n    return next === 0 ? getTStylingRangePrev(tStylingRange) : next;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Patch a `debug` property on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debug Value to patch\n */\nfunction attachDebugObject(obj, debug) {\n    if (ngDevMode) {\n        Object.defineProperty(obj, 'debug', { value: debug, enumerable: false });\n    }\n    else {\n        throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n    }\n}\n/**\n * Patch a `debug` property getter on top of the existing object.\n *\n * NOTE: always call this method with `ngDevMode && attachDebugObject(...)`\n *\n * @param obj Object to patch\n * @param debugGetter Getter returning a value to patch\n */\nfunction attachDebugGetter(obj, debugGetter) {\n    if (ngDevMode) {\n        Object.defineProperty(obj, 'debug', { get: debugGetter, enumerable: false });\n    }\n    else {\n        throw new Error('This method should be guarded with `ngDevMode` so that it can be tree shaken in production!');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NG_DEV_MODE = ((typeof ngDevMode === 'undefined' || !!ngDevMode) && initNgDevMode());\n/*\n * This file contains conditionally attached classes which provide human readable (debug) level\n * information for `LView`, `LContainer` and other internal data structures. These data structures\n * are stored internally as array which makes it very difficult during debugging to reason about the\n * current state of the system.\n *\n * Patching the array with extra property does change the array's hidden class' but it does not\n * change the cost of access, therefore this patching should not have significant if any impact in\n * `ngDevMode` mode. (see: https://jsperf.com/array-vs-monkey-patch-array)\n *\n * So instead of seeing:\n * ```\n * Array(30) [Object, 659, null, …]\n * ```\n *\n * You get to see:\n * ```\n * LViewDebug {\n *   views: [...],\n *   flags: {attached: true, ...}\n *   nodes: [\n *     {html: '<div id=\"123\">', ..., nodes: [\n *       {html: '<span>', ..., nodes: null}\n *     ]}\n *   ]\n * }\n * ```\n */\nlet LVIEW_COMPONENT_CACHE;\nlet LVIEW_EMBEDDED_CACHE;\nlet LVIEW_ROOT;\n/**\n * This function clones a blueprint and creates LView.\n *\n * Simple slice will keep the same type, and we need it to be LView\n */\nfunction cloneToLViewFromTViewBlueprint(tView) {\n    const debugTView = tView;\n    const lView = getLViewToClone(debugTView.type, tView.template && tView.template.name);\n    return lView.concat(tView.blueprint);\n}\nfunction getLViewToClone(type, name) {\n    switch (type) {\n        case 0 /* Root */:\n            if (LVIEW_ROOT === undefined)\n                LVIEW_ROOT = new (createNamedArrayType('LRootView'))();\n            return LVIEW_ROOT;\n        case 1 /* Component */:\n            if (LVIEW_COMPONENT_CACHE === undefined)\n                LVIEW_COMPONENT_CACHE = new Map();\n            let componentArray = LVIEW_COMPONENT_CACHE.get(name);\n            if (componentArray === undefined) {\n                componentArray = new (createNamedArrayType('LComponentView' + nameSuffix(name)))();\n                LVIEW_COMPONENT_CACHE.set(name, componentArray);\n            }\n            return componentArray;\n        case 2 /* Embedded */:\n            if (LVIEW_EMBEDDED_CACHE === undefined)\n                LVIEW_EMBEDDED_CACHE = new Map();\n            let embeddedArray = LVIEW_EMBEDDED_CACHE.get(name);\n            if (embeddedArray === undefined) {\n                embeddedArray = new (createNamedArrayType('LEmbeddedView' + nameSuffix(name)))();\n                LVIEW_EMBEDDED_CACHE.set(name, embeddedArray);\n            }\n            return embeddedArray;\n    }\n    throw new Error('unreachable code');\n}\nfunction nameSuffix(text) {\n    if (text == null)\n        return '';\n    const index = text.lastIndexOf('_Template');\n    return '_' + (index === -1 ? text : text.substr(0, index));\n}\n/**\n * This class is a debug version of Object literal so that we can have constructor name show up\n * in\n * debug tools in ngDevMode.\n */\nconst TViewConstructor = class TView {\n    constructor(type, //\n    id, //\n    blueprint, //\n    template, //\n    queries, //\n    viewQuery, //\n    node, //\n    data, //\n    bindingStartIndex, //\n    expandoStartIndex, //\n    expandoInstructions, //\n    firstCreatePass, //\n    firstUpdatePass, //\n    staticViewQueries, //\n    staticContentQueries, //\n    preOrderHooks, //\n    preOrderCheckHooks, //\n    contentHooks, //\n    contentCheckHooks, //\n    viewHooks, //\n    viewCheckHooks, //\n    destroyHooks, //\n    cleanup, //\n    contentQueries, //\n    components, //\n    directiveRegistry, //\n    pipeRegistry, //\n    firstChild, //\n    schemas, //\n    consts, //\n    incompleteFirstPass, //\n    _decls, //\n    _vars) {\n        this.type = type;\n        this.id = id;\n        this.blueprint = blueprint;\n        this.template = template;\n        this.queries = queries;\n        this.viewQuery = viewQuery;\n        this.node = node;\n        this.data = data;\n        this.bindingStartIndex = bindingStartIndex;\n        this.expandoStartIndex = expandoStartIndex;\n        this.expandoInstructions = expandoInstructions;\n        this.firstCreatePass = firstCreatePass;\n        this.firstUpdatePass = firstUpdatePass;\n        this.staticViewQueries = staticViewQueries;\n        this.staticContentQueries = staticContentQueries;\n        this.preOrderHooks = preOrderHooks;\n        this.preOrderCheckHooks = preOrderCheckHooks;\n        this.contentHooks = contentHooks;\n        this.contentCheckHooks = contentCheckHooks;\n        this.viewHooks = viewHooks;\n        this.viewCheckHooks = viewCheckHooks;\n        this.destroyHooks = destroyHooks;\n        this.cleanup = cleanup;\n        this.contentQueries = contentQueries;\n        this.components = components;\n        this.directiveRegistry = directiveRegistry;\n        this.pipeRegistry = pipeRegistry;\n        this.firstChild = firstChild;\n        this.schemas = schemas;\n        this.consts = consts;\n        this.incompleteFirstPass = incompleteFirstPass;\n        this._decls = _decls;\n        this._vars = _vars;\n    }\n    get template_() {\n        const buf = [];\n        processTNodeChildren(this.firstChild, buf);\n        return buf.join('');\n    }\n};\nclass TNode {\n    constructor(tView_, //\n    type, //\n    index, //\n    injectorIndex, //\n    directiveStart, //\n    directiveEnd, //\n    directiveStylingLast, //\n    propertyBindings, //\n    flags, //\n    providerIndexes, //\n    tagName, //\n    attrs, //\n    mergedAttrs, //\n    localNames, //\n    initialInputs, //\n    inputs, //\n    outputs, //\n    tViews, //\n    next, //\n    projectionNext, //\n    child, //\n    parent, //\n    projection, //\n    styles, //\n    stylesWithoutHost, //\n    residualStyles, //\n    classes, //\n    classesWithoutHost, //\n    residualClasses, //\n    classBindings, //\n    styleBindings) {\n        this.tView_ = tView_;\n        this.type = type;\n        this.index = index;\n        this.injectorIndex = injectorIndex;\n        this.directiveStart = directiveStart;\n        this.directiveEnd = directiveEnd;\n        this.directiveStylingLast = directiveStylingLast;\n        this.propertyBindings = propertyBindings;\n        this.flags = flags;\n        this.providerIndexes = providerIndexes;\n        this.tagName = tagName;\n        this.attrs = attrs;\n        this.mergedAttrs = mergedAttrs;\n        this.localNames = localNames;\n        this.initialInputs = initialInputs;\n        this.inputs = inputs;\n        this.outputs = outputs;\n        this.tViews = tViews;\n        this.next = next;\n        this.projectionNext = projectionNext;\n        this.child = child;\n        this.parent = parent;\n        this.projection = projection;\n        this.styles = styles;\n        this.stylesWithoutHost = stylesWithoutHost;\n        this.residualStyles = residualStyles;\n        this.classes = classes;\n        this.classesWithoutHost = classesWithoutHost;\n        this.residualClasses = residualClasses;\n        this.classBindings = classBindings;\n        this.styleBindings = styleBindings;\n    }\n    get type_() {\n        switch (this.type) {\n            case 0 /* Container */:\n                return 'TNodeType.Container';\n            case 3 /* Element */:\n                return 'TNodeType.Element';\n            case 4 /* ElementContainer */:\n                return 'TNodeType.ElementContainer';\n            case 5 /* IcuContainer */:\n                return 'TNodeType.IcuContainer';\n            case 1 /* Projection */:\n                return 'TNodeType.Projection';\n            case 2 /* View */:\n                return 'TNodeType.View';\n            default:\n                return 'TNodeType.???';\n        }\n    }\n    get flags_() {\n        const flags = [];\n        if (this.flags & 16 /* hasClassInput */)\n            flags.push('TNodeFlags.hasClassInput');\n        if (this.flags & 8 /* hasContentQuery */)\n            flags.push('TNodeFlags.hasContentQuery');\n        if (this.flags & 32 /* hasStyleInput */)\n            flags.push('TNodeFlags.hasStyleInput');\n        if (this.flags & 128 /* hasHostBindings */)\n            flags.push('TNodeFlags.hasHostBindings');\n        if (this.flags & 2 /* isComponentHost */)\n            flags.push('TNodeFlags.isComponentHost');\n        if (this.flags & 1 /* isDirectiveHost */)\n            flags.push('TNodeFlags.isDirectiveHost');\n        if (this.flags & 64 /* isDetached */)\n            flags.push('TNodeFlags.isDetached');\n        if (this.flags & 4 /* isProjected */)\n            flags.push('TNodeFlags.isProjected');\n        return flags.join('|');\n    }\n    get template_() {\n        const buf = [];\n        buf.push('<', this.tagName || this.type_);\n        if (this.attrs) {\n            for (let i = 0; i < this.attrs.length;) {\n                const attrName = this.attrs[i++];\n                if (typeof attrName == 'number') {\n                    break;\n                }\n                const attrValue = this.attrs[i++];\n                buf.push(' ', attrName, '=\"', attrValue, '\"');\n            }\n        }\n        buf.push('>');\n        processTNodeChildren(this.child, buf);\n        buf.push('</', this.tagName || this.type_, '>');\n        return buf.join('');\n    }\n    get styleBindings_() {\n        return toDebugStyleBinding(this, false);\n    }\n    get classBindings_() {\n        return toDebugStyleBinding(this, true);\n    }\n}\nconst TNodeDebug = TNode;\nfunction toDebugStyleBinding(tNode, isClassBased) {\n    const tData = tNode.tView_.data;\n    const bindings = [];\n    const range = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    const prev = getTStylingRangePrev(range);\n    const next = getTStylingRangeNext(range);\n    let isTemplate = next !== 0;\n    let cursor = isTemplate ? next : prev;\n    while (cursor !== 0) {\n        const itemKey = tData[cursor];\n        const itemRange = tData[cursor + 1];\n        bindings.unshift({\n            key: itemKey,\n            index: cursor,\n            isTemplate: isTemplate,\n            prevDuplicate: getTStylingRangePrevDuplicate(itemRange),\n            nextDuplicate: getTStylingRangeNextDuplicate(itemRange),\n            nextIndex: getTStylingRangeNext(itemRange),\n            prevIndex: getTStylingRangePrev(itemRange),\n        });\n        if (cursor === prev)\n            isTemplate = false;\n        cursor = getTStylingRangePrev(itemRange);\n    }\n    bindings.push((isClassBased ? tNode.residualClasses : tNode.residualStyles) || null);\n    return bindings;\n}\nfunction processTNodeChildren(tNode, buf) {\n    while (tNode) {\n        buf.push(tNode.template_);\n        tNode = tNode.next;\n    }\n}\nconst TViewData = NG_DEV_MODE && createNamedArrayType('TViewData') || null;\nlet TVIEWDATA_EMPTY; // can't initialize here or it will not be tree shaken, because\n// `LView` constructor could have side-effects.\n/**\n * This function clones a blueprint and creates TData.\n *\n * Simple slice will keep the same type, and we need it to be TData\n */\nfunction cloneToTViewData(list) {\n    if (TVIEWDATA_EMPTY === undefined)\n        TVIEWDATA_EMPTY = new TViewData();\n    return TVIEWDATA_EMPTY.concat(list);\n}\nconst LViewBlueprint = NG_DEV_MODE && createNamedArrayType('LViewBlueprint') || null;\nconst MatchesArray = NG_DEV_MODE && createNamedArrayType('MatchesArray') || null;\nconst TViewComponents = NG_DEV_MODE && createNamedArrayType('TViewComponents') || null;\nconst TNodeLocalNames = NG_DEV_MODE && createNamedArrayType('TNodeLocalNames') || null;\nconst TNodeInitialInputs = NG_DEV_MODE && createNamedArrayType('TNodeInitialInputs') || null;\nconst TNodeInitialData = NG_DEV_MODE && createNamedArrayType('TNodeInitialData') || null;\nconst LCleanup = NG_DEV_MODE && createNamedArrayType('LCleanup') || null;\nconst TCleanup = NG_DEV_MODE && createNamedArrayType('TCleanup') || null;\nfunction attachLViewDebug(lView) {\n    attachDebugObject(lView, new LViewDebug(lView));\n}\nfunction attachLContainerDebug(lContainer) {\n    attachDebugObject(lContainer, new LContainerDebug(lContainer));\n}\nfunction toDebug(obj) {\n    if (obj) {\n        const debug = obj.debug;\n        assertDefined(debug, 'Object does not have a debug representation.');\n        return debug;\n    }\n    else {\n        return obj;\n    }\n}\n/**\n * Use this method to unwrap a native element in `LView` and convert it into HTML for easier\n * reading.\n *\n * @param value possibly wrapped native DOM node.\n * @param includeChildren If `true` then the serialized HTML form will include child elements\n * (same\n * as `outerHTML`). If `false` then the serialized HTML form will only contain the element\n * itself\n * (will not serialize child elements).\n */\nfunction toHtml(value, includeChildren = false) {\n    const node = unwrapRNode(value);\n    if (node) {\n        switch (node.nodeType) {\n            case Node.TEXT_NODE:\n                return node.textContent;\n            case Node.COMMENT_NODE:\n                return `<!--${node.textContent}-->`;\n            case Node.ELEMENT_NODE:\n                const outerHTML = node.outerHTML;\n                if (includeChildren) {\n                    return outerHTML;\n                }\n                else {\n                    const innerHTML = '>' + node.innerHTML + '<';\n                    return (outerHTML.split(innerHTML)[0]) + '>';\n                }\n        }\n    }\n    return null;\n}\nclass LViewDebug {\n    constructor(_raw_lView) {\n        this._raw_lView = _raw_lView;\n    }\n    /**\n     * Flags associated with the `LView` unpacked into a more readable state.\n     */\n    get flags() {\n        const flags = this._raw_lView[FLAGS];\n        return {\n            __raw__flags__: flags,\n            initPhaseState: flags & 3 /* InitPhaseStateMask */,\n            creationMode: !!(flags & 4 /* CreationMode */),\n            firstViewPass: !!(flags & 8 /* FirstLViewPass */),\n            checkAlways: !!(flags & 16 /* CheckAlways */),\n            dirty: !!(flags & 64 /* Dirty */),\n            attached: !!(flags & 128 /* Attached */),\n            destroyed: !!(flags & 256 /* Destroyed */),\n            isRoot: !!(flags & 512 /* IsRoot */),\n            indexWithinInitPhase: flags >> 11 /* IndexWithinInitPhaseShift */,\n        };\n    }\n    get parent() {\n        return toDebug(this._raw_lView[PARENT]);\n    }\n    get hostHTML() {\n        return toHtml(this._raw_lView[HOST], true);\n    }\n    get html() {\n        return (this.nodes || []).map(node => toHtml(node.native, true)).join('');\n    }\n    get context() {\n        return this._raw_lView[CONTEXT];\n    }\n    /**\n     * The tree of nodes associated with the current `LView`. The nodes have been normalized into\n     * a tree structure with relevant details pulled out for readability.\n     */\n    get nodes() {\n        const lView = this._raw_lView;\n        const tNode = lView[TVIEW].firstChild;\n        return toDebugNodes(tNode, lView);\n    }\n    get tView() {\n        return this._raw_lView[TVIEW];\n    }\n    get cleanup() {\n        return this._raw_lView[CLEANUP];\n    }\n    get injector() {\n        return this._raw_lView[INJECTOR$1];\n    }\n    get rendererFactory() {\n        return this._raw_lView[RENDERER_FACTORY];\n    }\n    get renderer() {\n        return this._raw_lView[RENDERER];\n    }\n    get sanitizer() {\n        return this._raw_lView[SANITIZER];\n    }\n    get childHead() {\n        return toDebug(this._raw_lView[CHILD_HEAD]);\n    }\n    get next() {\n        return toDebug(this._raw_lView[NEXT]);\n    }\n    get childTail() {\n        return toDebug(this._raw_lView[CHILD_TAIL]);\n    }\n    get declarationView() {\n        return toDebug(this._raw_lView[DECLARATION_VIEW]);\n    }\n    get queries() {\n        return this._raw_lView[QUERIES];\n    }\n    get tHost() {\n        return this._raw_lView[T_HOST];\n    }\n    get decls() {\n        const tView = this.tView;\n        const start = HEADER_OFFSET;\n        return toLViewRange(this.tView, this._raw_lView, start, start + tView._decls);\n    }\n    get vars() {\n        const tView = this.tView;\n        const start = HEADER_OFFSET + tView._decls;\n        return toLViewRange(this.tView, this._raw_lView, start, start + tView._vars);\n    }\n    get i18n() {\n        const tView = this.tView;\n        const start = HEADER_OFFSET + tView._decls + tView._vars;\n        return toLViewRange(this.tView, this._raw_lView, start, this.tView.expandoStartIndex);\n    }\n    get expando() {\n        const tView = this.tView;\n        return toLViewRange(this.tView, this._raw_lView, this.tView.expandoStartIndex, this._raw_lView.length);\n    }\n    /**\n     * Normalized view of child views (and containers) attached at this location.\n     */\n    get childViews() {\n        const childViews = [];\n        let child = this.childHead;\n        while (child) {\n            childViews.push(child);\n            child = child.next;\n        }\n        return childViews;\n    }\n}\nfunction toLViewRange(tView, lView, start, end) {\n    let content = [];\n    for (let index = start; index < end; index++) {\n        content.push({ index: index, t: tView.data[index], l: lView[index] });\n    }\n    return { start: start, end: end, length: end - start, content: content };\n}\n/**\n * Turns a flat list of nodes into a tree by walking the associated `TNode` tree.\n *\n * @param tNode\n * @param lView\n */\nfunction toDebugNodes(tNode, lView) {\n    if (tNode) {\n        const debugNodes = [];\n        let tNodeCursor = tNode;\n        while (tNodeCursor) {\n            debugNodes.push(buildDebugNode(tNodeCursor, lView, tNodeCursor.index));\n            tNodeCursor = tNodeCursor.next;\n        }\n        return debugNodes;\n    }\n    else {\n        return [];\n    }\n}\nfunction buildDebugNode(tNode, lView, nodeIndex) {\n    const rawValue = lView[nodeIndex];\n    const native = unwrapRNode(rawValue);\n    return {\n        html: toHtml(native),\n        type: TNodeTypeAsString[tNode.type],\n        native: native,\n        children: toDebugNodes(tNode.child, lView),\n    };\n}\nclass LContainerDebug {\n    constructor(_raw_lContainer) {\n        this._raw_lContainer = _raw_lContainer;\n    }\n    get hasTransplantedViews() {\n        return this._raw_lContainer[HAS_TRANSPLANTED_VIEWS];\n    }\n    get views() {\n        return this._raw_lContainer.slice(CONTAINER_HEADER_OFFSET)\n            .map(toDebug);\n    }\n    get parent() {\n        return toDebug(this._raw_lContainer[PARENT]);\n    }\n    get movedViews() {\n        return this._raw_lContainer[MOVED_VIEWS];\n    }\n    get host() {\n        return this._raw_lContainer[HOST];\n    }\n    get native() {\n        return this._raw_lContainer[NATIVE];\n    }\n    get next() {\n        return toDebug(this._raw_lContainer[NEXT]);\n    }\n}\n/**\n * Return an `LView` value if found.\n *\n * @param value `LView` if any\n */\nfunction readLViewValue(value) {\n    while (Array.isArray(value)) {\n        // This check is not quite right, as it does not take into account `StylingContext`\n        // This is why it is in debug, not in util.ts\n        if (value.length >= HEADER_OFFSET - 1)\n            return value;\n        value = value[HOST];\n    }\n    return null;\n}\n\nconst ɵ0$4 = () => Promise.resolve(null);\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nconst _CLEAN_PROMISE = (ɵ0$4)();\n/**\n * Process the `TView.expandoInstructions`. (Execute the `hostBindings`.)\n *\n * @param tView `TView` containing the `expandoInstructions`\n * @param lView `LView` associated with the `TView`\n */\nfunction setHostBindingsByExecutingExpandoInstructions(tView, lView) {\n    ngDevMode && assertSame(tView, lView[TVIEW], '`LView` is not associated with the `TView`!');\n    try {\n        const expandoInstructions = tView.expandoInstructions;\n        if (expandoInstructions !== null) {\n            let bindingRootIndex = tView.expandoStartIndex;\n            let currentDirectiveIndex = -1;\n            let currentElementIndex = -1;\n            // TODO(misko): PERF It is possible to get here with `TView.expandoInstructions` containing no\n            // functions to execute. This is wasteful as there is no work to be done, but we still need\n            // to iterate over the instructions.\n            // In example of this is in this test: `host_binding_spec.ts`\n            // `fit('should not cause problems if detectChanges is called when a property updates', ...`\n            // In the above test we get here with expando [0, 0, 1] which requires a lot of processing but\n            // there is no function to execute.\n            for (let i = 0; i < expandoInstructions.length; i++) {\n                const instruction = expandoInstructions[i];\n                if (typeof instruction === 'number') {\n                    if (instruction <= 0) {\n                        // Negative numbers mean that we are starting new EXPANDO block and need to update\n                        // the current element and directive index.\n                        // Important: In JS `-x` and `0-x` is not the same! If `x===0` then `-x` will produce\n                        // `-0` which requires non standard math arithmetic and it can prevent VM optimizations.\n                        // `0-0` will always produce `0` and will not cause a potential deoptimization in VM.\n                        // TODO(misko): PERF This should be refactored to use `~instruction` as that does not\n                        // suffer from `-0` and it is faster/more compact.\n                        currentElementIndex = 0 - instruction;\n                        setSelectedIndex(currentElementIndex);\n                        // Injector block and providers are taken into account.\n                        const providerCount = expandoInstructions[++i];\n                        bindingRootIndex += INJECTOR_BLOOM_PARENT_SIZE + providerCount;\n                        currentDirectiveIndex = bindingRootIndex;\n                    }\n                    else {\n                        // This is either the injector size (so the binding root can skip over directives\n                        // and get to the first set of host bindings on this node) or the host var count\n                        // (to get to the next set of host bindings on this node).\n                        bindingRootIndex += instruction;\n                    }\n                }\n                else {\n                    // If it's not a number, it's a host binding function that needs to be executed.\n                    if (instruction !== null) {\n                        ngDevMode &&\n                            assertLessThan(currentDirectiveIndex, 1048576 /* CptViewProvidersCountShifter */, 'Reached the max number of host bindings');\n                        setBindingRootForHostBindings(bindingRootIndex, currentDirectiveIndex);\n                        const hostCtx = lView[currentDirectiveIndex];\n                        instruction(2 /* Update */, hostCtx);\n                    }\n                    // TODO(misko): PERF Relying on incrementing the `currentDirectiveIndex` here is\n                    // sub-optimal. The implications are that if we have a lot of directives but none of them\n                    // have host bindings we nevertheless need to iterate over the expando instructions to\n                    // update the counter. It would be much better if we could encode the\n                    // `currentDirectiveIndex` into the `expandoInstruction` array so that we only need to\n                    // iterate over those directives which actually have `hostBindings`.\n                    currentDirectiveIndex++;\n                }\n            }\n        }\n    }\n    finally {\n        setSelectedIndex(-1);\n    }\n}\n/** Refreshes all content queries declared by directives in a given view */\nfunction refreshContentQueries(tView, lView) {\n    const contentQueries = tView.contentQueries;\n    if (contentQueries !== null) {\n        for (let i = 0; i < contentQueries.length; i += 2) {\n            const queryStartIdx = contentQueries[i];\n            const directiveDefIdx = contentQueries[i + 1];\n            if (directiveDefIdx !== -1) {\n                const directiveDef = tView.data[directiveDefIdx];\n                ngDevMode &&\n                    assertDefined(directiveDef.contentQueries, 'contentQueries function should be defined');\n                setCurrentQueryIndex(queryStartIdx);\n                directiveDef.contentQueries(2 /* Update */, lView[directiveDefIdx], directiveDefIdx);\n            }\n        }\n    }\n}\n/** Refreshes child components in the current view (update mode). */\nfunction refreshChildComponents(hostLView, components) {\n    for (let i = 0; i < components.length; i++) {\n        refreshComponent(hostLView, components[i]);\n    }\n}\n/** Renders child components in the current view (creation mode). */\nfunction renderChildComponents(hostLView, components) {\n    for (let i = 0; i < components.length; i++) {\n        renderComponent(hostLView, components[i]);\n    }\n}\n/**\n * Creates a native element from a tag name, using a renderer.\n * @param name the tag name\n * @param renderer A renderer to use\n * @returns the element created\n */\nfunction elementCreate(name, renderer, namespace) {\n    if (isProceduralRenderer(renderer)) {\n        return renderer.createElement(name, namespace);\n    }\n    else {\n        return namespace === null ? renderer.createElement(name) :\n            renderer.createElementNS(namespace, name);\n    }\n}\nfunction createLView(parentLView, tView, context, flags, host, tHostNode, rendererFactory, renderer, sanitizer, injector) {\n    const lView = ngDevMode ? cloneToLViewFromTViewBlueprint(tView) : tView.blueprint.slice();\n    lView[HOST] = host;\n    lView[FLAGS] = flags | 4 /* CreationMode */ | 128 /* Attached */ | 8 /* FirstLViewPass */;\n    resetPreOrderHookFlags(lView);\n    lView[PARENT] = lView[DECLARATION_VIEW] = parentLView;\n    lView[CONTEXT] = context;\n    lView[RENDERER_FACTORY] = (rendererFactory || parentLView && parentLView[RENDERER_FACTORY]);\n    ngDevMode && assertDefined(lView[RENDERER_FACTORY], 'RendererFactory is required');\n    lView[RENDERER] = (renderer || parentLView && parentLView[RENDERER]);\n    ngDevMode && assertDefined(lView[RENDERER], 'Renderer is required');\n    lView[SANITIZER] = sanitizer || parentLView && parentLView[SANITIZER] || null;\n    lView[INJECTOR$1] = injector || parentLView && parentLView[INJECTOR$1] || null;\n    lView[T_HOST] = tHostNode;\n    ngDevMode &&\n        assertEqual(tView.type == 2 /* Embedded */ ? parentLView !== null : true, true, 'Embedded views must have parentLView');\n    lView[DECLARATION_COMPONENT_VIEW] =\n        tView.type == 2 /* Embedded */ ? parentLView[DECLARATION_COMPONENT_VIEW] : lView;\n    ngDevMode && attachLViewDebug(lView);\n    return lView;\n}\nfunction getOrCreateTNode(tView, tHostNode, index, type, name, attrs) {\n    // Keep this function short, so that the VM will inline it.\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = tView.data[adjustedIndex] ||\n        createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs);\n    setPreviousOrParentTNode(tNode, true);\n    return tNode;\n}\nfunction createTNodeAtIndex(tView, tHostNode, adjustedIndex, type, name, attrs) {\n    const previousOrParentTNode = getPreviousOrParentTNode();\n    const isParent = getIsParent();\n    const parent = isParent ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n    // Parents cannot cross component boundaries because components will be used in multiple places,\n    // so it's only set if the view is the same.\n    const parentInSameView = parent && parent !== tHostNode;\n    const tParentNode = parentInSameView ? parent : null;\n    const tNode = tView.data[adjustedIndex] =\n        createTNode(tView, tParentNode, type, adjustedIndex, name, attrs);\n    // Assign a pointer to the first child node of a given view. The first node is not always the one\n    // at index 0, in case of i18n, index 0 can be the instruction `i18nStart` and the first node has\n    // the index 1 or more, so we can't just check node index.\n    if (tView.firstChild === null) {\n        tView.firstChild = tNode;\n    }\n    if (previousOrParentTNode) {\n        if (isParent && previousOrParentTNode.child == null &&\n            (tNode.parent !== null || previousOrParentTNode.type === 2 /* View */)) {\n            // We are in the same view, which means we are adding content node to the parent view.\n            previousOrParentTNode.child = tNode;\n        }\n        else if (!isParent) {\n            previousOrParentTNode.next = tNode;\n        }\n    }\n    return tNode;\n}\nfunction assignTViewNodeToLView(tView, tParentNode, index, lView) {\n    // View nodes are not stored in data because they can be added / removed at runtime (which\n    // would cause indices to change). Their TNodes are instead stored in tView.node.\n    let tNode = tView.node;\n    if (tNode == null) {\n        ngDevMode && tParentNode &&\n            assertNodeOfPossibleTypes(tParentNode, [3 /* Element */, 0 /* Container */]);\n        tView.node = tNode = createTNode(tView, tParentNode, //\n        2 /* View */, index, null, null);\n    }\n    lView[T_HOST] = tNode;\n}\n/**\n * When elements are created dynamically after a view blueprint is created (e.g. through\n * i18nApply() or ComponentFactory.create), we need to adjust the blueprint for future\n * template passes.\n *\n * @param tView `TView` associated with `LView`\n * @param view The `LView` containing the blueprint to adjust\n * @param numSlotsToAlloc The number of slots to alloc in the LView, should be >0\n */\nfunction allocExpando(tView, lView, numSlotsToAlloc) {\n    ngDevMode &&\n        assertGreaterThan(numSlotsToAlloc, 0, 'The number of slots to alloc should be greater than 0');\n    if (numSlotsToAlloc > 0) {\n        if (tView.firstCreatePass) {\n            for (let i = 0; i < numSlotsToAlloc; i++) {\n                tView.blueprint.push(null);\n                tView.data.push(null);\n                lView.push(null);\n            }\n            // We should only increment the expando start index if there aren't already directives\n            // and injectors saved in the \"expando\" section\n            if (!tView.expandoInstructions) {\n                tView.expandoStartIndex += numSlotsToAlloc;\n            }\n            else {\n                // Since we're adding the dynamic nodes into the expando section, we need to let the host\n                // bindings know that they should skip x slots\n                tView.expandoInstructions.push(numSlotsToAlloc);\n            }\n        }\n    }\n}\n//////////////////////////\n//// Render\n//////////////////////////\n/**\n * Processes a view in the creation mode. This includes a number of steps in a specific order:\n * - creating view query functions (if any);\n * - executing a template function in the creation mode;\n * - updating static queries (if any);\n * - creating child components defined in a given view.\n */\nfunction renderView(tView, lView, context) {\n    ngDevMode && assertEqual(isCreationMode(lView), true, 'Should be run in creation mode');\n    enterView(lView, lView[T_HOST]);\n    try {\n        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(1 /* Create */, viewQuery, context);\n        }\n        // Execute a template associated with this view, if it exists. A template function might not be\n        // defined for the root component views.\n        const templateFn = tView.template;\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 1 /* Create */, context);\n        }\n        // This needs to be set before children are processed to support recursive components.\n        // This must be set to false immediately after the first creation run because in an\n        // ngFor loop, all the views will be created together before update mode runs and turns\n        // off firstCreatePass. If we don't set it here, instances will perform directive\n        // matching, etc again and again.\n        if (tView.firstCreatePass) {\n            tView.firstCreatePass = false;\n        }\n        // We resolve content queries specifically marked as `static` in creation mode. Dynamic\n        // content queries are resolved during change detection (i.e. update mode), after embedded\n        // views are refreshed (see block above).\n        if (tView.staticContentQueries) {\n            refreshContentQueries(tView, lView);\n        }\n        // We must materialize query results before child components are processed\n        // in case a child component has projected a container. The LContainer needs\n        // to exist so the embedded views are properly attached by the container.\n        if (tView.staticViewQueries) {\n            executeViewQueryFn(2 /* Update */, tView.viewQuery, context);\n        }\n        // Render child component views.\n        const components = tView.components;\n        if (components !== null) {\n            renderChildComponents(lView, components);\n        }\n    }\n    catch (error) {\n        // If we didn't manage to get past the first template pass due to\n        // an error, mark the view as corrupted so we can try to recover.\n        if (tView.firstCreatePass) {\n            tView.incompleteFirstPass = true;\n        }\n        throw error;\n    }\n    finally {\n        lView[FLAGS] &= ~4 /* CreationMode */;\n        leaveView();\n    }\n}\n/**\n * Processes a view in update mode. This includes a number of steps in a specific order:\n * - executing a template function in update mode;\n * - executing hooks;\n * - refreshing queries;\n * - setting host bindings;\n * - refreshing child (embedded and component) views.\n */\nfunction refreshView(tView, lView, templateFn, context) {\n    ngDevMode && assertEqual(isCreationMode(lView), false, 'Should be run in update mode');\n    const flags = lView[FLAGS];\n    if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)\n        return;\n    enterView(lView, lView[T_HOST]);\n    const checkNoChangesMode = getCheckNoChangesMode();\n    try {\n        resetPreOrderHookFlags(lView);\n        setBindingIndex(tView.bindingStartIndex);\n        if (templateFn !== null) {\n            executeTemplate(tView, lView, templateFn, 2 /* Update */, context);\n        }\n        const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;\n        // execute pre-order hooks (OnInit, OnChanges, DoCheck)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!checkNoChangesMode) {\n            if (hooksInitPhaseCompleted) {\n                const preOrderCheckHooks = tView.preOrderCheckHooks;\n                if (preOrderCheckHooks !== null) {\n                    executeCheckHooks(lView, preOrderCheckHooks, null);\n                }\n            }\n            else {\n                const preOrderHooks = tView.preOrderHooks;\n                if (preOrderHooks !== null) {\n                    executeInitAndCheckHooks(lView, preOrderHooks, 0 /* OnInitHooksToBeRun */, null);\n                }\n                incrementInitPhaseFlags(lView, 0 /* OnInitHooksToBeRun */);\n            }\n        }\n        // First mark transplanted views that are declared in this lView as needing a refresh at their\n        // insertion points. This is needed to avoid the situation where the template is defined in this\n        // `LView` but its declaration appears after the insertion component.\n        markTransplantedViewsForRefresh(lView);\n        refreshEmbeddedViews(lView);\n        // Content query results must be refreshed before content hooks are called.\n        if (tView.contentQueries !== null) {\n            refreshContentQueries(tView, lView);\n        }\n        // execute content hooks (AfterContentInit, AfterContentChecked)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!checkNoChangesMode) {\n            if (hooksInitPhaseCompleted) {\n                const contentCheckHooks = tView.contentCheckHooks;\n                if (contentCheckHooks !== null) {\n                    executeCheckHooks(lView, contentCheckHooks);\n                }\n            }\n            else {\n                const contentHooks = tView.contentHooks;\n                if (contentHooks !== null) {\n                    executeInitAndCheckHooks(lView, contentHooks, 1 /* AfterContentInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 1 /* AfterContentInitHooksToBeRun */);\n            }\n        }\n        setHostBindingsByExecutingExpandoInstructions(tView, lView);\n        // Refresh child component views.\n        const components = tView.components;\n        if (components !== null) {\n            refreshChildComponents(lView, components);\n        }\n        // View queries must execute after refreshing child components because a template in this view\n        // could be inserted in a child component. If the view query executes before child component\n        // refresh, the template might not yet be inserted.\n        const viewQuery = tView.viewQuery;\n        if (viewQuery !== null) {\n            executeViewQueryFn(2 /* Update */, viewQuery, context);\n        }\n        // execute view hooks (AfterViewInit, AfterViewChecked)\n        // PERF WARNING: do NOT extract this to a separate function without running benchmarks\n        if (!checkNoChangesMode) {\n            if (hooksInitPhaseCompleted) {\n                const viewCheckHooks = tView.viewCheckHooks;\n                if (viewCheckHooks !== null) {\n                    executeCheckHooks(lView, viewCheckHooks);\n                }\n            }\n            else {\n                const viewHooks = tView.viewHooks;\n                if (viewHooks !== null) {\n                    executeInitAndCheckHooks(lView, viewHooks, 2 /* AfterViewInitHooksToBeRun */);\n                }\n                incrementInitPhaseFlags(lView, 2 /* AfterViewInitHooksToBeRun */);\n            }\n        }\n        if (tView.firstUpdatePass === true) {\n            // We need to make sure that we only flip the flag on successful `refreshView` only\n            // Don't do this in `finally` block.\n            // If we did this in `finally` block then an exception could block the execution of styling\n            // instructions which in turn would be unable to insert themselves into the styling linked\n            // list. The result of this would be that if the exception would not be throw on subsequent CD\n            // the styling would be unable to process it data and reflect to the DOM.\n            tView.firstUpdatePass = false;\n        }\n        // Do not reset the dirty state when running in check no changes mode. We don't want components\n        // to behave differently depending on whether check no changes is enabled or not. For example:\n        // Marking an OnPush component as dirty from within the `ngAfterViewInit` hook in order to\n        // refresh a `NgClass` binding should work. If we would reset the dirty state in the check\n        // no changes cycle, the component would be not be dirty for the next update pass. This would\n        // be different in production mode where the component dirty state is not reset.\n        if (!checkNoChangesMode) {\n            lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);\n        }\n        if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n            lView[FLAGS] &= ~1024 /* RefreshTransplantedView */;\n            updateTransplantedViewCount(lView[PARENT], -1);\n        }\n    }\n    finally {\n        leaveView();\n    }\n}\nfunction renderComponentOrTemplate(tView, lView, templateFn, context) {\n    const rendererFactory = lView[RENDERER_FACTORY];\n    const normalExecutionPath = !getCheckNoChangesMode();\n    const creationModeIsActive = isCreationMode(lView);\n    try {\n        if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {\n            rendererFactory.begin();\n        }\n        if (creationModeIsActive) {\n            renderView(tView, lView, context);\n        }\n        refreshView(tView, lView, templateFn, context);\n    }\n    finally {\n        if (normalExecutionPath && !creationModeIsActive && rendererFactory.end) {\n            rendererFactory.end();\n        }\n    }\n}\nfunction executeTemplate(tView, lView, templateFn, rf, context) {\n    const prevSelectedIndex = getSelectedIndex();\n    try {\n        setSelectedIndex(-1);\n        if (rf & 2 /* Update */ && lView.length > HEADER_OFFSET) {\n            // When we're updating, inherently select 0 so we don't\n            // have to generate that instruction for most update blocks.\n            selectIndexInternal(tView, lView, 0, getCheckNoChangesMode());\n        }\n        templateFn(rf, context);\n    }\n    finally {\n        setSelectedIndex(prevSelectedIndex);\n    }\n}\n//////////////////////////\n//// Element\n//////////////////////////\nfunction executeContentQueries(tView, tNode, lView) {\n    if (isContentQueryHost(tNode)) {\n        const start = tNode.directiveStart;\n        const end = tNode.directiveEnd;\n        for (let directiveIndex = start; directiveIndex < end; directiveIndex++) {\n            const def = tView.data[directiveIndex];\n            if (def.contentQueries) {\n                def.contentQueries(1 /* Create */, lView[directiveIndex], directiveIndex);\n            }\n        }\n    }\n}\n/**\n * Creates directive instances.\n */\nfunction createDirectivesInstances(tView, lView, tNode) {\n    if (!getBindingsEnabled())\n        return;\n    instantiateAllDirectives(tView, lView, tNode, getNativeByTNode(tNode, lView));\n    if ((tNode.flags & 128 /* hasHostBindings */) === 128 /* hasHostBindings */) {\n        invokeDirectivesHostBindings(tView, lView, tNode);\n    }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to LView in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData(viewData, tNode, localRefExtractor = getNativeByTNode) {\n    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        let localIndex = tNode.index + 1;\n        for (let i = 0; i < localNames.length; i += 2) {\n            const index = localNames[i + 1];\n            const value = index === -1 ?\n                localRefExtractor(tNode, viewData) :\n                viewData[index];\n            viewData[localIndex++] = value;\n        }\n    }\n}\n/**\n * Gets TView from a template function or creates a new TView\n * if it doesn't already exist.\n *\n * @param def ComponentDef\n * @returns TView\n */\nfunction getOrCreateTComponentView(def) {\n    const tView = def.tView;\n    // Create a TView if there isn't one, or recreate it if the first create pass didn't\n    // complete successfuly since we can't know for sure whether it's in a usable shape.\n    if (tView === null || tView.incompleteFirstPass) {\n        return def.tView = createTView(1 /* Component */, -1, def.template, def.decls, def.vars, def.directiveDefs, def.pipeDefs, def.viewQuery, def.schemas, def.consts);\n    }\n    return tView;\n}\n/**\n * Creates a TView instance\n *\n * @param viewIndex The viewBlockId for inline views, or -1 if it's a component/dynamic\n * @param templateFn Template function\n * @param decls The number of nodes, local refs, and pipes in this template\n * @param directives Registry of directives for this view\n * @param pipes Registry of pipes for this view\n * @param viewQuery View queries for this view\n * @param schemas Schemas for this view\n * @param consts Constants for this view\n */\nfunction createTView(type, viewIndex, templateFn, decls, vars, directives, pipes, viewQuery, schemas, constsOrFactory) {\n    ngDevMode && ngDevMode.tView++;\n    const bindingStartIndex = HEADER_OFFSET + decls;\n    // This length does not yet contain host bindings from child directives because at this point,\n    // we don't know which directives are active on this template. As soon as a directive is matched\n    // that has a host binding, we will update the blueprint with that def's hostVars count.\n    const initialViewLength = bindingStartIndex + vars;\n    const blueprint = createViewBlueprint(bindingStartIndex, initialViewLength);\n    const consts = typeof constsOrFactory === 'function' ? constsOrFactory() : constsOrFactory;\n    const tView = blueprint[TVIEW] = ngDevMode ?\n        new TViewConstructor(type, viewIndex, // id: number,\n        blueprint, // blueprint: LView,\n        templateFn, // template: ComponentTemplate<{}>|null,\n        null, // queries: TQueries|null\n        viewQuery, // viewQuery: ViewQueriesFunction<{}>|null,\n        null, // node: TViewNode|TElementNode|null,\n        cloneToTViewData(blueprint).fill(null, bindingStartIndex), // data: TData,\n        bindingStartIndex, // bindingStartIndex: number,\n        initialViewLength, // expandoStartIndex: number,\n        null, // expandoInstructions: ExpandoInstructions|null,\n        true, // firstCreatePass: boolean,\n        true, // firstUpdatePass: boolean,\n        false, // staticViewQueries: boolean,\n        false, // staticContentQueries: boolean,\n        null, // preOrderHooks: HookData|null,\n        null, // preOrderCheckHooks: HookData|null,\n        null, // contentHooks: HookData|null,\n        null, // contentCheckHooks: HookData|null,\n        null, // viewHooks: HookData|null,\n        null, // viewCheckHooks: HookData|null,\n        null, // destroyHooks: DestroyHookData|null,\n        null, // cleanup: any[]|null,\n        null, // contentQueries: number[]|null,\n        null, // components: number[]|null,\n        typeof directives === 'function' ?\n            directives() :\n            directives, // directiveRegistry: DirectiveDefList|null,\n        typeof pipes === 'function' ? pipes() : pipes, // pipeRegistry: PipeDefList|null,\n        null, // firstChild: TNode|null,\n        schemas, // schemas: SchemaMetadata[]|null,\n        consts, // consts: TConstants|null\n        false, // incompleteFirstPass: boolean\n        decls, // ngDevMode only: decls\n        vars) :\n        {\n            type: type,\n            id: viewIndex,\n            blueprint: blueprint,\n            template: templateFn,\n            queries: null,\n            viewQuery: viewQuery,\n            node: null,\n            data: blueprint.slice().fill(null, bindingStartIndex),\n            bindingStartIndex: bindingStartIndex,\n            expandoStartIndex: initialViewLength,\n            expandoInstructions: null,\n            firstCreatePass: true,\n            firstUpdatePass: true,\n            staticViewQueries: false,\n            staticContentQueries: false,\n            preOrderHooks: null,\n            preOrderCheckHooks: null,\n            contentHooks: null,\n            contentCheckHooks: null,\n            viewHooks: null,\n            viewCheckHooks: null,\n            destroyHooks: null,\n            cleanup: null,\n            contentQueries: null,\n            components: null,\n            directiveRegistry: typeof directives === 'function' ? directives() : directives,\n            pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n            firstChild: null,\n            schemas: schemas,\n            consts: consts,\n            incompleteFirstPass: false\n        };\n    if (ngDevMode) {\n        // For performance reasons it is important that the tView retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tView);\n    }\n    return tView;\n}\nfunction createViewBlueprint(bindingStartIndex, initialViewLength) {\n    const blueprint = ngDevMode ? new LViewBlueprint() : [];\n    for (let i = 0; i < initialViewLength; i++) {\n        blueprint.push(i < bindingStartIndex ? null : NO_CHANGE);\n    }\n    return blueprint;\n}\nfunction createError(text, token) {\n    return new Error(`Renderer: ${text} [${stringifyForError(token)}]`);\n}\nfunction assertHostNodeExists(rElement, elementOrSelector) {\n    if (!rElement) {\n        if (typeof elementOrSelector === 'string') {\n            throw createError('Host node with selector not found:', elementOrSelector);\n        }\n        else {\n            throw createError('Host node is required:', elementOrSelector);\n        }\n    }\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param rendererFactory Factory function to create renderer instance.\n * @param elementOrSelector Render element or CSS selector to locate the element.\n * @param encapsulation View Encapsulation defined for component that requests host element.\n */\nfunction locateHostElement(renderer, elementOrSelector, encapsulation) {\n    if (isProceduralRenderer(renderer)) {\n        // When using native Shadow DOM, do not clear host element to allow native slot projection\n        const preserveContent = encapsulation === ViewEncapsulation$1.ShadowDom;\n        return renderer.selectRootElement(elementOrSelector, preserveContent);\n    }\n    let rElement = typeof elementOrSelector === 'string' ?\n        renderer.querySelector(elementOrSelector) :\n        elementOrSelector;\n    ngDevMode && assertHostNodeExists(rElement, elementOrSelector);\n    // Always clear host element's content when Renderer3 is in use. For procedural renderer case we\n    // make it depend on whether ShadowDom encapsulation is used (in which case the content should be\n    // preserved to allow native slot projection). ShadowDom encapsulation requires procedural\n    // renderer, and procedural renderer case is handled above.\n    rElement.textContent = '';\n    return rElement;\n}\n/**\n * Saves context for this cleanup function in LView.cleanupInstances.\n *\n * On the first template pass, saves in TView:\n * - Cleanup function\n * - Index of context we just saved in LView.cleanupInstances\n */\nfunction storeCleanupWithContext(tView, lView, context, cleanupFn) {\n    const lCleanup = getLCleanup(lView);\n    lCleanup.push(context);\n    if (tView.firstCreatePass) {\n        getTViewCleanup(tView).push(cleanupFn, lCleanup.length - 1);\n    }\n}\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tView `TView` to which this `TNode` belongs (used only in `ngDevMode`)\n * @param type The type of the node\n * @param adjustedIndex The index of the TNode in TView.data, adjusted for HEADER_OFFSET\n * @param tagName The tag name of the node\n * @param attrs The attributes defined on this node\n * @param tViews Any TViews attached to this node\n * @returns the TNode object\n */\nfunction createTNode(tView, tParent, type, adjustedIndex, tagName, attrs) {\n    ngDevMode && ngDevMode.tNode++;\n    let injectorIndex = tParent ? tParent.injectorIndex : -1;\n    const tNode = ngDevMode ?\n        new TNodeDebug(tView, // tView_: TView\n        type, // type: TNodeType\n        adjustedIndex, // index: number\n        injectorIndex, // injectorIndex: number\n        -1, // directiveStart: number\n        -1, // directiveEnd: number\n        -1, // directiveStylingLast: number\n        null, // propertyBindings: number[]|null\n        0, // flags: TNodeFlags\n        0, // providerIndexes: TNodeProviderIndexes\n        tagName, // tagName: string|null\n        attrs, // attrs: (string|AttributeMarker|(string|SelectorFlags)[])[]|null\n        null, // mergedAttrs\n        null, // localNames: (string|number)[]|null\n        undefined, // initialInputs: (string[]|null)[]|null|undefined\n        null, // inputs: PropertyAliases|null\n        null, // outputs: PropertyAliases|null\n        null, // tViews: ITView|ITView[]|null\n        null, // next: ITNode|null\n        null, // projectionNext: ITNode|null\n        null, // child: ITNode|null\n        tParent, // parent: TElementNode|TContainerNode|null\n        null, // projection: number|(ITNode|RNode[])[]|null\n        null, // styles: string|null\n        null, // stylesWithoutHost: string|null\n        undefined, // residualStyles: string|null\n        null, // classes: string|null\n        null, // classesWithoutHost: string|null\n        undefined, // residualClasses: string|null\n        0, // classBindings: TStylingRange;\n        0) :\n        {\n            type: type,\n            index: adjustedIndex,\n            injectorIndex: injectorIndex,\n            directiveStart: -1,\n            directiveEnd: -1,\n            directiveStylingLast: -1,\n            propertyBindings: null,\n            flags: 0,\n            providerIndexes: 0,\n            tagName: tagName,\n            attrs: attrs,\n            mergedAttrs: null,\n            localNames: null,\n            initialInputs: undefined,\n            inputs: null,\n            outputs: null,\n            tViews: null,\n            next: null,\n            projectionNext: null,\n            child: null,\n            parent: tParent,\n            projection: null,\n            styles: null,\n            stylesWithoutHost: null,\n            residualStyles: undefined,\n            classes: null,\n            classesWithoutHost: null,\n            residualClasses: undefined,\n            classBindings: 0,\n            styleBindings: 0,\n        };\n    if (ngDevMode) {\n        // For performance reasons it is important that the tNode retains the same shape during runtime.\n        // (To make sure that all of the code is monomorphic.) For this reason we seal the object to\n        // prevent class transitions.\n        Object.seal(tNode);\n    }\n    return tNode;\n}\nfunction generatePropertyAliases(inputAliasMap, directiveDefIdx, propStore) {\n    for (let publicName in inputAliasMap) {\n        if (inputAliasMap.hasOwnProperty(publicName)) {\n            propStore = propStore === null ? {} : propStore;\n            const internalName = inputAliasMap[publicName];\n            if (propStore.hasOwnProperty(publicName)) {\n                propStore[publicName].push(directiveDefIdx, internalName);\n            }\n            else {\n                (propStore[publicName] = [directiveDefIdx, internalName]);\n            }\n        }\n    }\n    return propStore;\n}\n/**\n * Initializes data structures required to work with directive outputs and outputs.\n * Initialization is done for all directives matched on a given TNode.\n */\nfunction initializeInputAndOutputAliases(tView, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const defs = tView.data;\n    const tNodeAttrs = tNode.attrs;\n    const inputsFromAttrs = ngDevMode ? new TNodeInitialInputs() : [];\n    let inputsStore = null;\n    let outputsStore = null;\n    for (let i = start; i < end; i++) {\n        const directiveDef = defs[i];\n        const directiveInputs = directiveDef.inputs;\n        // Do not use unbound attributes as inputs to structural directives, since structural\n        // directive inputs can only be set using microsyntax (e.g. `<div *dir=\"exp\">`).\n        // TODO(FW-1930): microsyntax expressions may also contain unbound/static attributes, which\n        // should be set for inline templates.\n        const initialInputs = (tNodeAttrs !== null && !isInlineTemplate(tNode)) ?\n            generateInitialInputs(directiveInputs, tNodeAttrs) :\n            null;\n        inputsFromAttrs.push(initialInputs);\n        inputsStore = generatePropertyAliases(directiveInputs, i, inputsStore);\n        outputsStore = generatePropertyAliases(directiveDef.outputs, i, outputsStore);\n    }\n    if (inputsStore !== null) {\n        if (inputsStore.hasOwnProperty('class')) {\n            tNode.flags |= 16 /* hasClassInput */;\n        }\n        if (inputsStore.hasOwnProperty('style')) {\n            tNode.flags |= 32 /* hasStyleInput */;\n        }\n    }\n    tNode.initialInputs = inputsFromAttrs;\n    tNode.inputs = inputsStore;\n    tNode.outputs = outputsStore;\n}\n/**\n * Mapping between attributes names that don't correspond to their element property names.\n *\n * Performance note: this function is written as a series of if checks (instead of, say, a property\n * object lookup) for performance reasons - the series of `if` checks seems to be the fastest way of\n * mapping property names. Do NOT change without benchmarking.\n *\n * Note: this mapping has to be kept in sync with the equally named mapping in the template\n * type-checking machinery of ngtsc.\n */\nfunction mapPropName(name) {\n    if (name === 'class')\n        return 'className';\n    if (name === 'for')\n        return 'htmlFor';\n    if (name === 'formaction')\n        return 'formAction';\n    if (name === 'innerHtml')\n        return 'innerHTML';\n    if (name === 'readonly')\n        return 'readOnly';\n    if (name === 'tabindex')\n        return 'tabIndex';\n    return name;\n}\nfunction elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, nativeOnly) {\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    const element = getNativeByTNode(tNode, lView);\n    let inputData = tNode.inputs;\n    let dataValue;\n    if (!nativeOnly && inputData != null && (dataValue = inputData[propName])) {\n        setInputsForProperty(tView, lView, dataValue, propName, value);\n        if (isComponentHost(tNode))\n            markDirtyIfOnPush(lView, tNode.index);\n        if (ngDevMode) {\n            setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n        }\n    }\n    else if (tNode.type === 3 /* Element */) {\n        propName = mapPropName(propName);\n        if (ngDevMode) {\n            validateAgainstEventProperties(propName);\n            if (!validateProperty(tView, element, propName, tNode)) {\n                // Return here since we only log warnings for unknown properties.\n                logUnknownPropertyError(propName, tNode);\n                return;\n            }\n            ngDevMode.rendererSetProperty++;\n        }\n        // It is assumed that the sanitizer is only added when the compiler determines that the\n        // property is risky, so sanitization can be done without further checks.\n        value = sanitizer != null ? sanitizer(value, tNode.tagName || '', propName) : value;\n        if (isProceduralRenderer(renderer)) {\n            renderer.setProperty(element, propName, value);\n        }\n        else if (!isAnimationProp(propName)) {\n            element.setProperty ? element.setProperty(propName, value) :\n                element[propName] = value;\n        }\n    }\n    else if (tNode.type === 0 /* Container */ || tNode.type === 4 /* ElementContainer */) {\n        // If the node is a container and the property didn't\n        // match any of the inputs or schemas we should throw.\n        if (ngDevMode && !matchingSchemas(tView, tNode.tagName)) {\n            logUnknownPropertyError(propName, tNode);\n        }\n    }\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(lView, viewIndex) {\n    ngDevMode && assertLView(lView);\n    const childComponentLView = getComponentLViewByIndex(viewIndex, lView);\n    if (!(childComponentLView[FLAGS] & 16 /* CheckAlways */)) {\n        childComponentLView[FLAGS] |= 64 /* Dirty */;\n    }\n}\nfunction setNgReflectProperty(lView, element, type, attrName, value) {\n    const renderer = lView[RENDERER];\n    attrName = normalizeDebugBindingName(attrName);\n    const debugValue = normalizeDebugBindingValue(value);\n    if (type === 3 /* Element */) {\n        if (value == null) {\n            isProceduralRenderer(renderer) ? renderer.removeAttribute(element, attrName) :\n                element.removeAttribute(attrName);\n        }\n        else {\n            isProceduralRenderer(renderer) ?\n                renderer.setAttribute(element, attrName, debugValue) :\n                element.setAttribute(attrName, debugValue);\n        }\n    }\n    else {\n        const textContent = `bindings=${JSON.stringify({ [attrName]: debugValue }, null, 2)}`;\n        if (isProceduralRenderer(renderer)) {\n            renderer.setValue(element, textContent);\n        }\n        else {\n            element.textContent = textContent;\n        }\n    }\n}\nfunction setNgReflectProperties(lView, element, type, dataValue, value) {\n    if (type === 3 /* Element */ || type === 0 /* Container */) {\n        /**\n         * dataValue is an array containing runtime input or output names for the directives:\n         * i+0: directive instance index\n         * i+1: privateName\n         *\n         * e.g. [0, 'change', 'change-minified']\n         * we want to set the reflected property with the privateName: dataValue[i+1]\n         */\n        for (let i = 0; i < dataValue.length; i += 2) {\n            setNgReflectProperty(lView, element, type, dataValue[i + 1], value);\n        }\n    }\n}\nfunction validateProperty(tView, element, propName, tNode) {\n    // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n    // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n    // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n    // execute the check below.\n    if (tView.schemas === null)\n        return true;\n    // The property is considered valid if the element matches the schema, it exists on the element\n    // or it is synthetic, and we are in a browser context (web worker nodes should be skipped).\n    if (matchingSchemas(tView, tNode.tagName) || propName in element || isAnimationProp(propName)) {\n        return true;\n    }\n    // Note: `typeof Node` returns 'function' in most browsers, but on IE it is 'object' so we\n    // need to account for both here, while being careful for `typeof null` also returning 'object'.\n    return typeof Node === 'undefined' || Node === null || !(element instanceof Node);\n}\nfunction matchingSchemas(tView, tagName) {\n    const schemas = tView.schemas;\n    if (schemas !== null) {\n        for (let i = 0; i < schemas.length; i++) {\n            const schema = schemas[i];\n            if (schema === NO_ERRORS_SCHEMA ||\n                schema === CUSTOM_ELEMENTS_SCHEMA && tagName && tagName.indexOf('-') > -1) {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n/**\n * Logs an error that a property is not supported on an element.\n * @param propName Name of the invalid property.\n * @param tNode Node on which we encountered the property.\n */\nfunction logUnknownPropertyError(propName, tNode) {\n    console.error(`Can't bind to '${propName}' since it isn't a known property of '${tNode.tagName}'.`);\n}\n/**\n * Instantiate a root component.\n */\nfunction instantiateRootComponent(tView, lView, def) {\n    const rootTNode = getPreviousOrParentTNode();\n    if (tView.firstCreatePass) {\n        if (def.providersResolver)\n            def.providersResolver(def);\n        generateExpandoInstructionBlock(tView, rootTNode, 1);\n        baseResolveDirective(tView, lView, def);\n    }\n    const directive = getNodeInjectable(lView, tView, lView.length - 1, rootTNode);\n    attachPatchData(directive, lView);\n    const native = getNativeByTNode(rootTNode, lView);\n    if (native) {\n        attachPatchData(native, lView);\n    }\n    return directive;\n}\n/**\n * Resolve the matched directives on a node.\n */\nfunction resolveDirectives(tView, lView, tNode, localRefs) {\n    // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in\n    // tsickle.\n    ngDevMode && assertFirstCreatePass(tView);\n    let hasDirectives = false;\n    if (getBindingsEnabled()) {\n        const directiveDefs = findDirectiveDefMatches(tView, lView, tNode);\n        const exportsMap = localRefs === null ? null : { '': -1 };\n        if (directiveDefs !== null) {\n            let totalDirectiveHostVars = 0;\n            hasDirectives = true;\n            initTNodeFlags(tNode, tView.data.length, directiveDefs.length);\n            // When the same token is provided by several directives on the same node, some rules apply in\n            // the viewEngine:\n            // - viewProviders have priority over providers\n            // - the last directive in NgModule.declarations has priority over the previous one\n            // So to match these rules, the order in which providers are added in the arrays is very\n            // important.\n            for (let i = 0; i < directiveDefs.length; i++) {\n                const def = directiveDefs[i];\n                if (def.providersResolver)\n                    def.providersResolver(def);\n            }\n            generateExpandoInstructionBlock(tView, tNode, directiveDefs.length);\n            let preOrderHooksFound = false;\n            let preOrderCheckHooksFound = false;\n            for (let i = 0; i < directiveDefs.length; i++) {\n                const def = directiveDefs[i];\n                // Merge the attrs in the order of matches. This assumes that the first directive is the\n                // component itself, so that the component has the least priority.\n                tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, def.hostAttrs);\n                baseResolveDirective(tView, lView, def);\n                saveNameToExportMap(tView.data.length - 1, def, exportsMap);\n                if (def.contentQueries !== null)\n                    tNode.flags |= 8 /* hasContentQuery */;\n                if (def.hostBindings !== null || def.hostAttrs !== null || def.hostVars !== 0)\n                    tNode.flags |= 128 /* hasHostBindings */;\n                const lifeCycleHooks = def.type.prototype;\n                // Only push a node index into the preOrderHooks array if this is the first\n                // pre-order hook found on this node.\n                if (!preOrderHooksFound &&\n                    (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngOnInit || lifeCycleHooks.ngDoCheck)) {\n                    // We will push the actual hook function into this array later during dir instantiation.\n                    // We cannot do it now because we must ensure hooks are registered in the same\n                    // order that directives are created (i.e. injection order).\n                    (tView.preOrderHooks || (tView.preOrderHooks = [])).push(tNode.index - HEADER_OFFSET);\n                    preOrderHooksFound = true;\n                }\n                if (!preOrderCheckHooksFound && (lifeCycleHooks.ngOnChanges || lifeCycleHooks.ngDoCheck)) {\n                    (tView.preOrderCheckHooks || (tView.preOrderCheckHooks = []))\n                        .push(tNode.index - HEADER_OFFSET);\n                    preOrderCheckHooksFound = true;\n                }\n                addHostBindingsToExpandoInstructions(tView, def);\n                totalDirectiveHostVars += def.hostVars;\n            }\n            initializeInputAndOutputAliases(tView, tNode);\n            growHostVarsSpace(tView, lView, totalDirectiveHostVars);\n        }\n        if (exportsMap)\n            cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n    }\n    // Merge the template attrs last so that they have the highest priority.\n    tNode.mergedAttrs = mergeHostAttrs(tNode.mergedAttrs, tNode.attrs);\n    return hasDirectives;\n}\n/**\n * Add `hostBindings` to the `TView.expandoInstructions`.\n *\n * @param tView `TView` to which the `hostBindings` should be added.\n * @param def `ComponentDef`/`DirectiveDef`, which contains the `hostVars`/`hostBindings` to add.\n */\nfunction addHostBindingsToExpandoInstructions(tView, def) {\n    ngDevMode && assertFirstCreatePass(tView);\n    const expando = tView.expandoInstructions;\n    // TODO(misko): PERF we are adding `hostBindings` even if there is nothing to add! This is\n    // suboptimal for performance. `def.hostBindings` may be null,\n    // but we still need to push null to the array as a placeholder\n    // to ensure the directive counter is incremented (so host\n    // binding functions always line up with the corrective directive).\n    // This is suboptimal for performance. See `currentDirectiveIndex`\n    //  comment in `setHostBindingsByExecutingExpandoInstructions` for more\n    // details.  expando.push(def.hostBindings);\n    expando.push(def.hostBindings);\n    const hostVars = def.hostVars;\n    if (hostVars !== 0) {\n        expando.push(def.hostVars);\n    }\n}\n/**\n * Grow the `LView`, blueprint and `TView.data` to accommodate the `hostBindings`.\n *\n * To support locality we don't know ahead of time how many `hostVars` of the containing directives\n * we need to allocate. For this reason we allow growing these data structures as we discover more\n * directives to accommodate them.\n *\n * @param tView `TView` which needs to be grown.\n * @param lView `LView` which needs to be grown.\n * @param count Size by which we need to grow the data structures.\n */\nfunction growHostVarsSpace(tView, lView, count) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && assertSame(tView, lView[TVIEW], '`LView` must be associated with `TView`!');\n    for (let i = 0; i < count; i++) {\n        lView.push(NO_CHANGE);\n        tView.blueprint.push(NO_CHANGE);\n        tView.data.push(null);\n    }\n}\n/**\n * Instantiate all the directives that were previously resolved on the current node.\n */\nfunction instantiateAllDirectives(tView, lView, tNode, native) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    if (!tView.firstCreatePass) {\n        getOrCreateNodeInjectorForNode(tNode, lView);\n    }\n    attachPatchData(native, lView);\n    const initialInputs = tNode.initialInputs;\n    for (let i = start; i < end; i++) {\n        const def = tView.data[i];\n        const isComponent = isComponentDef(def);\n        if (isComponent) {\n            ngDevMode && assertNodeOfPossibleTypes(tNode, [3 /* Element */]);\n            addComponentLogic(lView, tNode, def);\n        }\n        const directive = getNodeInjectable(lView, tView, i, tNode);\n        attachPatchData(directive, lView);\n        if (initialInputs !== null) {\n            setInputsFromAttrs(lView, i - start, directive, def, tNode, initialInputs);\n        }\n        if (isComponent) {\n            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            componentView[CONTEXT] = directive;\n        }\n    }\n}\nfunction invokeDirectivesHostBindings(tView, lView, tNode) {\n    const start = tNode.directiveStart;\n    const end = tNode.directiveEnd;\n    const expando = tView.expandoInstructions;\n    const firstCreatePass = tView.firstCreatePass;\n    const elementIndex = tNode.index - HEADER_OFFSET;\n    const currentDirectiveIndex = getCurrentDirectiveIndex();\n    try {\n        setSelectedIndex(elementIndex);\n        for (let dirIndex = start; dirIndex < end; dirIndex++) {\n            const def = tView.data[dirIndex];\n            const directive = lView[dirIndex];\n            setCurrentDirectiveIndex(dirIndex);\n            if (def.hostBindings !== null || def.hostVars !== 0 || def.hostAttrs !== null) {\n                invokeHostBindingsInCreationMode(def, directive);\n            }\n            else if (firstCreatePass) {\n                expando.push(null);\n            }\n        }\n    }\n    finally {\n        setSelectedIndex(-1);\n        setCurrentDirectiveIndex(currentDirectiveIndex);\n    }\n}\n/**\n * Invoke the host bindings in creation mode.\n *\n * @param def `DirectiveDef` which may contain the `hostBindings` function.\n * @param directive Instance of directive.\n */\nfunction invokeHostBindingsInCreationMode(def, directive) {\n    if (def.hostBindings !== null) {\n        def.hostBindings(1 /* Create */, directive);\n    }\n}\n/**\n * Generates a new block in TView.expandoInstructions for this node.\n *\n * Each expando block starts with the element index (turned negative so we can distinguish\n * it from the hostVar count) and the directive count. See more in VIEW_DATA.md.\n */\nfunction generateExpandoInstructionBlock(tView, tNode, directiveCount) {\n    ngDevMode &&\n        assertEqual(tView.firstCreatePass, true, 'Expando block should only be generated on first create pass.');\n    // Important: In JS `-x` and `0-x` is not the same! If `x===0` then `-x` will produce `-0` which\n    // requires non standard math arithmetic and it can prevent VM optimizations.\n    // `0-0` will always produce `0` and will not cause a potential deoptimization in VM.\n    const elementIndex = HEADER_OFFSET - tNode.index;\n    const providerStartIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n    const providerCount = tView.data.length - providerStartIndex;\n    (tView.expandoInstructions || (tView.expandoInstructions = []))\n        .push(elementIndex, providerCount, directiveCount);\n}\n/**\n * Matches the current node against all available selectors.\n * If a component is matched (at most one), it is returned in first position in the array.\n */\nfunction findDirectiveDefMatches(tView, viewData, tNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode &&\n        assertNodeOfPossibleTypes(tNode, [3 /* Element */, 4 /* ElementContainer */, 0 /* Container */]);\n    const registry = tView.directiveRegistry;\n    let matches = null;\n    if (registry) {\n        for (let i = 0; i < registry.length; i++) {\n            const def = registry[i];\n            if (isNodeMatchingSelectorList(tNode, def.selectors, /* isProjectionMode */ false)) {\n                matches || (matches = ngDevMode ? new MatchesArray() : []);\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, viewData), tView, def.type);\n                if (isComponentDef(def)) {\n                    if (ngDevMode) {\n                        assertNodeOfPossibleTypes(tNode, [3 /* Element */], `\"${tNode.tagName}\" tags cannot be used as component hosts. ` +\n                            `Please use a different tag to activate the ${stringify(def.type)} component.`);\n                        if (tNode.flags & 2 /* isComponentHost */)\n                            throwMultipleComponentError(tNode);\n                    }\n                    markAsComponentHost(tView, tNode);\n                    // The component is always stored first with directives after.\n                    matches.unshift(def);\n                }\n                else {\n                    matches.push(def);\n                }\n            }\n        }\n    }\n    return matches;\n}\n/**\n * Marks a given TNode as a component's host. This consists of:\n * - setting appropriate TNode flags;\n * - storing index of component's host element so it will be queued for view refresh during CD.\n */\nfunction markAsComponentHost(tView, hostTNode) {\n    ngDevMode && assertFirstCreatePass(tView);\n    hostTNode.flags |= 2 /* isComponentHost */;\n    (tView.components || (tView.components = ngDevMode ? new TViewComponents() : []))\n        .push(hostTNode.index);\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n    if (localRefs) {\n        const localNames = tNode.localNames = ngDevMode ? new TNodeLocalNames() : [];\n        // Local names must be stored in tNode in the same order that localRefs are defined\n        // in the template to ensure the data is loaded in the same slots as their refs\n        // in the template (for template queries).\n        for (let i = 0; i < localRefs.length; i += 2) {\n            const index = exportsMap[localRefs[i + 1]];\n            if (index == null)\n                throw new Error(`Export of name '${localRefs[i + 1]}' not found!`);\n            localNames.push(localRefs[i], index);\n        }\n    }\n}\n/**\n * Builds up an export map as directives are created, so local refs can be quickly mapped\n * to their directive instances.\n */\nfunction saveNameToExportMap(index, def, exportsMap) {\n    if (exportsMap) {\n        if (def.exportAs) {\n            for (let i = 0; i < def.exportAs.length; i++) {\n                exportsMap[def.exportAs[i]] = index;\n            }\n        }\n        if (isComponentDef(def))\n            exportsMap[''] = index;\n    }\n}\n/**\n * Initializes the flags on the current node, setting all indices to the initial index,\n * the directive count to 0, and adding the isComponent flag.\n * @param index the initial index\n */\nfunction initTNodeFlags(tNode, index, numberOfDirectives) {\n    ngDevMode &&\n        assertNotEqual(numberOfDirectives, tNode.directiveEnd - tNode.directiveStart, 'Reached the max number of directives');\n    tNode.flags |= 1 /* isDirectiveHost */;\n    // When the first directive is created on a node, save the index\n    tNode.directiveStart = index;\n    tNode.directiveEnd = index + numberOfDirectives;\n    tNode.providerIndexes = index;\n}\nfunction baseResolveDirective(tView, viewData, def) {\n    tView.data.push(def);\n    const directiveFactory = def.factory || (def.factory = getFactoryDef(def.type, true));\n    const nodeInjectorFactory = new NodeInjectorFactory(directiveFactory, isComponentDef(def), null);\n    tView.blueprint.push(nodeInjectorFactory);\n    viewData.push(nodeInjectorFactory);\n}\nfunction addComponentLogic(lView, hostTNode, def) {\n    const native = getNativeByTNode(hostTNode, lView);\n    const tView = getOrCreateTComponentView(def);\n    // Only component views should be added to the view tree directly. Embedded views are\n    // accessed through their containers because they may be removed / re-added later.\n    const rendererFactory = lView[RENDERER_FACTORY];\n    const componentView = addToViewTree(lView, createLView(lView, tView, null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, native, hostTNode, rendererFactory, rendererFactory.createRenderer(native, def)));\n    // Component view will always be created before any injected LContainers,\n    // so this is a regular element, wrap it with the component view\n    lView[hostTNode.index] = componentView;\n}\nfunction elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace) {\n    if (ngDevMode) {\n        assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n        validateAgainstEventAttributes(name);\n        assertNodeNotOfTypes(tNode, [0 /* Container */, 4 /* ElementContainer */], `Attempted to set attribute \\`${name}\\` on a container node. ` +\n            `Host bindings are not valid on ng-container or ng-template.`);\n    }\n    const element = getNativeByTNode(tNode, lView);\n    const renderer = lView[RENDERER];\n    if (value == null) {\n        ngDevMode && ngDevMode.rendererRemoveAttribute++;\n        isProceduralRenderer(renderer) ? renderer.removeAttribute(element, name, namespace) :\n            element.removeAttribute(name);\n    }\n    else {\n        ngDevMode && ngDevMode.rendererSetAttribute++;\n        const strValue = sanitizer == null ? renderStringify(value) : sanitizer(value, tNode.tagName || '', name);\n        if (isProceduralRenderer(renderer)) {\n            renderer.setAttribute(element, name, strValue, namespace);\n        }\n        else {\n            namespace ? element.setAttributeNS(namespace, name, strValue) :\n                element.setAttribute(name, strValue);\n        }\n    }\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\n * @param lView Current LView that is being processed.\n * @param directiveIndex Index of the directive in directives array\n * @param instance Instance of the directive on which to set the initial inputs\n * @param def The directive def that contains the list of inputs\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(lView, directiveIndex, instance, def, tNode, initialInputData) {\n    const initialInputs = initialInputData[directiveIndex];\n    if (initialInputs !== null) {\n        const setInput = def.setInput;\n        for (let i = 0; i < initialInputs.length;) {\n            const publicName = initialInputs[i++];\n            const privateName = initialInputs[i++];\n            const value = initialInputs[i++];\n            if (setInput !== null) {\n                def.setInput(instance, value, publicName, privateName);\n            }\n            else {\n                instance[privateName] = value;\n            }\n            if (ngDevMode) {\n                const nativeElement = getNativeByTNode(tNode, lView);\n                setNgReflectProperty(lView, nativeElement, tNode.type, privateName, value);\n            }\n        }\n    }\n}\n/**\n * Generates initialInputData for a node and stores it in the template's static storage\n * so subsequent template invocations don't have to recalculate it.\n *\n * initialInputData is an array containing values that need to be set as input properties\n * for directives on this node, but only once on creation. We need this array to support\n * the case where you set an @Input property of a directive using attribute-like syntax.\n * e.g. if you have a `name` @Input, you can set it once like this:\n *\n * <my-component name=\"Bess\"></my-component>\n *\n * @param inputs The list of inputs from the directive def\n * @param attrs The static attrs on this node\n */\nfunction generateInitialInputs(inputs, attrs) {\n    let inputsToStore = null;\n    let i = 0;\n    while (i < attrs.length) {\n        const attrName = attrs[i];\n        if (attrName === 0 /* NamespaceURI */) {\n            // We do not allow inputs on namespaced attributes.\n            i += 4;\n            continue;\n        }\n        else if (attrName === 5 /* ProjectAs */) {\n            // Skip over the `ngProjectAs` value.\n            i += 2;\n            continue;\n        }\n        // If we hit any other attribute markers, we're done anyway. None of those are valid inputs.\n        if (typeof attrName === 'number')\n            break;\n        if (inputs.hasOwnProperty(attrName)) {\n            if (inputsToStore === null)\n                inputsToStore = [];\n            inputsToStore.push(attrName, inputs[attrName], attrs[i + 1]);\n        }\n        i += 2;\n    }\n    return inputsToStore;\n}\n//////////////////////////\n//// ViewContainer & View\n//////////////////////////\n// Not sure why I need to do `any` here but TS complains later.\nconst LContainerArray = ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) &&\n    createNamedArrayType('LContainer');\n/**\n * Creates a LContainer, either from a container instruction, or for a ViewContainerRef.\n *\n * @param hostNative The host element for the LContainer\n * @param hostTNode The host TNode for the LContainer\n * @param currentView The parent view of the LContainer\n * @param native The native comment element\n * @param isForViewContainerRef Optional a flag indicating the ViewContainerRef case\n * @returns LContainer\n */\nfunction createLContainer(hostNative, currentView, native, tNode) {\n    ngDevMode && assertLView(currentView);\n    ngDevMode && !isProceduralRenderer(currentView[RENDERER]) && assertDomNode(native);\n    // https://jsperf.com/array-literal-vs-new-array-really\n    const lContainer = new (ngDevMode ? LContainerArray : Array)(hostNative, // host native\n    true, // Boolean `true` in this position signifies that this is an `LContainer`\n    false, // has transplanted views\n    currentView, // parent\n    null, // next\n    0, // transplanted views to refresh count\n    tNode, // t_host\n    native, // native,\n    null, // view refs\n    null);\n    ngDevMode &&\n        assertEqual(lContainer.length, CONTAINER_HEADER_OFFSET, 'Should allocate correct number of slots for LContainer header.');\n    ngDevMode && attachLContainerDebug(lContainer);\n    return lContainer;\n}\n/**\n * Goes over embedded views (ones created through ViewContainerRef APIs) and refreshes\n * them by executing an associated template function.\n */\nfunction refreshEmbeddedViews(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n            const embeddedLView = lContainer[i];\n            const embeddedTView = embeddedLView[TVIEW];\n            ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n            if (viewAttachedToChangeDetector(embeddedLView)) {\n                refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n            }\n        }\n    }\n}\n/**\n * Mark transplanted views as needing to be refreshed at their insertion points.\n *\n * @param lView The `LView` that may have transplanted views.\n */\nfunction markTransplantedViewsForRefresh(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        if (!lContainer[HAS_TRANSPLANTED_VIEWS])\n            continue;\n        const movedViews = lContainer[MOVED_VIEWS];\n        ngDevMode && assertDefined(movedViews, 'Transplanted View flags set but missing MOVED_VIEWS');\n        for (let i = 0; i < movedViews.length; i++) {\n            const movedLView = movedViews[i];\n            const insertionLContainer = movedLView[PARENT];\n            ngDevMode && assertLContainer(insertionLContainer);\n            // We don't want to increment the counter if the moved LView was already marked for\n            // refresh.\n            if ((movedLView[FLAGS] & 1024 /* RefreshTransplantedView */) === 0) {\n                updateTransplantedViewCount(insertionLContainer, 1);\n            }\n            // Note, it is possible that the `movedViews` is tracking views that are transplanted *and*\n            // those that aren't (declaration component === insertion component). In the latter case,\n            // it's fine to add the flag, as we will clear it immediately in\n            // `refreshEmbeddedViews` for the view currently being refreshed.\n            movedLView[FLAGS] |= 1024 /* RefreshTransplantedView */;\n        }\n    }\n}\n/////////////\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param componentHostIdx  Element index in LView[] (adjusted for HEADER_OFFSET)\n */\nfunction refreshComponent(hostLView, componentHostIdx) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), false, 'Should be run in update mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n    if (viewAttachedToChangeDetector(componentView)) {\n        const tView = componentView[TVIEW];\n        if (componentView[FLAGS] & (16 /* CheckAlways */ | 64 /* Dirty */)) {\n            refreshView(tView, componentView, tView.template, componentView[CONTEXT]);\n        }\n        else if (componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n            // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n            refreshContainsDirtyView(componentView);\n        }\n    }\n}\n/**\n * Refreshes all transplanted views marked with `LViewFlags.RefreshTransplantedView` that are\n * children or descendants of the given lView.\n *\n * @param lView The lView which contains descendant transplanted views that need to be refreshed.\n */\nfunction refreshContainsDirtyView(lView) {\n    for (let lContainer = getFirstLContainer(lView); lContainer !== null; lContainer = getNextLContainer(lContainer)) {\n        for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n            const embeddedLView = lContainer[i];\n            if (embeddedLView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n                const embeddedTView = embeddedLView[TVIEW];\n                ngDevMode && assertDefined(embeddedTView, 'TView must be allocated');\n                refreshView(embeddedTView, embeddedLView, embeddedTView.template, embeddedLView[CONTEXT]);\n            }\n            else if (embeddedLView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n                refreshContainsDirtyView(embeddedLView);\n            }\n        }\n    }\n    const tView = lView[TVIEW];\n    // Refresh child component views.\n    const components = tView.components;\n    if (components !== null) {\n        for (let i = 0; i < components.length; i++) {\n            const componentView = getComponentLViewByIndex(components[i], lView);\n            // Only attached components that are CheckAlways or OnPush and dirty should be refreshed\n            if (viewAttachedToChangeDetector(componentView) &&\n                componentView[TRANSPLANTED_VIEWS_TO_REFRESH] > 0) {\n                refreshContainsDirtyView(componentView);\n            }\n        }\n    }\n}\nfunction renderComponent(hostLView, componentHostIdx) {\n    ngDevMode && assertEqual(isCreationMode(hostLView), true, 'Should be run in creation mode');\n    const componentView = getComponentLViewByIndex(componentHostIdx, hostLView);\n    const componentTView = componentView[TVIEW];\n    syncViewWithBlueprint(componentTView, componentView);\n    renderView(componentTView, componentView, componentView[CONTEXT]);\n}\n/**\n * Syncs an LView instance with its blueprint if they have gotten out of sync.\n *\n * Typically, blueprints and their view instances should always be in sync, so the loop here\n * will be skipped. However, consider this case of two components side-by-side:\n *\n * App template:\n * ```\n * <comp></comp>\n * <comp></comp>\n * ```\n *\n * The following will happen:\n * 1. App template begins processing.\n * 2. First <comp> is matched as a component and its LView is created.\n * 3. Second <comp> is matched as a component and its LView is created.\n * 4. App template completes processing, so it's time to check child templates.\n * 5. First <comp> template is checked. It has a directive, so its def is pushed to blueprint.\n * 6. Second <comp> template is checked. Its blueprint has been updated by the first\n * <comp> template, but its LView was created before this update, so it is out of sync.\n *\n * Note that embedded views inside ngFor loops will never be out of sync because these views\n * are processed as soon as they are created.\n *\n * @param tView The `TView` that contains the blueprint for syncing\n * @param lView The view to sync\n */\nfunction syncViewWithBlueprint(tView, lView) {\n    for (let i = lView.length; i < tView.blueprint.length; i++) {\n        lView.push(tView.blueprint[i]);\n    }\n}\n/**\n * Adds LView or LContainer to the end of the current view tree.\n *\n * This structure will be used to traverse through nested views to remove listeners\n * and call onDestroy callbacks.\n *\n * @param lView The view where LView or LContainer should be added\n * @param adjustedHostIndex Index of the view's host node in LView[], adjusted for header\n * @param lViewOrLContainer The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(lView, lViewOrLContainer) {\n    // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer\n    // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out\n    // of order, the change detection will run out of order, as the act of retrieving the the\n    // LContainer from the RNode is what adds it to the queue.\n    if (lView[CHILD_HEAD]) {\n        lView[CHILD_TAIL][NEXT] = lViewOrLContainer;\n    }\n    else {\n        lView[CHILD_HEAD] = lViewOrLContainer;\n    }\n    lView[CHILD_TAIL] = lViewOrLContainer;\n    return lViewOrLContainer;\n}\n///////////////////////////////\n//// Change detection\n///////////////////////////////\n/**\n * Marks current view and all ancestors dirty.\n *\n * Returns the root view because it is found as a byproduct of marking the view tree\n * dirty, and can be used by methods that consume markViewDirty() to easily schedule\n * change detection. Otherwise, such methods would need to traverse up the view tree\n * an additional time to get the root view and schedule a tick on it.\n *\n * @param lView The starting LView to mark dirty\n * @returns the root LView\n */\nfunction markViewDirty(lView) {\n    while (lView) {\n        lView[FLAGS] |= 64 /* Dirty */;\n        const parent = getLViewParent(lView);\n        // Stop traversing up as soon as you find a root view that wasn't attached to any container\n        if (isRootView(lView) && !parent) {\n            return lView;\n        }\n        // continue otherwise\n        lView = parent;\n    }\n    return null;\n}\n/**\n * Used to schedule change detection on the whole application.\n *\n * Unlike `tick`, `scheduleTick` coalesces multiple calls into one change detection run.\n * It is usually called indirectly by calling `markDirty` when the view needs to be\n * re-rendered.\n *\n * Typically `scheduleTick` uses `requestAnimationFrame` to coalesce multiple\n * `scheduleTick` requests. The scheduling function can be overridden in\n * `renderComponent`'s `scheduler` option.\n */\nfunction scheduleTick(rootContext, flags) {\n    const nothingScheduled = rootContext.flags === 0 /* Empty */;\n    rootContext.flags |= flags;\n    if (nothingScheduled && rootContext.clean == _CLEAN_PROMISE) {\n        let res;\n        rootContext.clean = new Promise((r) => res = r);\n        rootContext.scheduler(() => {\n            if (rootContext.flags & 1 /* DetectChanges */) {\n                rootContext.flags &= ~1 /* DetectChanges */;\n                tickRootContext(rootContext);\n            }\n            if (rootContext.flags & 2 /* FlushPlayers */) {\n                rootContext.flags &= ~2 /* FlushPlayers */;\n                const playerHandler = rootContext.playerHandler;\n                if (playerHandler) {\n                    playerHandler.flushPlayers();\n                }\n            }\n            rootContext.clean = _CLEAN_PROMISE;\n            res(null);\n        });\n    }\n}\nfunction tickRootContext(rootContext) {\n    for (let i = 0; i < rootContext.components.length; i++) {\n        const rootComponent = rootContext.components[i];\n        const lView = readPatchedLView(rootComponent);\n        const tView = lView[TVIEW];\n        renderComponentOrTemplate(tView, lView, tView.template, rootComponent);\n    }\n}\nfunction detectChangesInternal(tView, lView, context) {\n    const rendererFactory = lView[RENDERER_FACTORY];\n    if (rendererFactory.begin)\n        rendererFactory.begin();\n    try {\n        refreshView(tView, lView, tView.template, context);\n    }\n    catch (error) {\n        handleError(lView, error);\n        throw error;\n    }\n    finally {\n        if (rendererFactory.end)\n            rendererFactory.end();\n    }\n}\n/**\n * Synchronously perform change detection on a root view and its components.\n *\n * @param lView The view which the change detection should be performed on.\n */\nfunction detectChangesInRootView(lView) {\n    tickRootContext(lView[CONTEXT]);\n}\nfunction checkNoChangesInternal(tView, view, context) {\n    setCheckNoChangesMode(true);\n    try {\n        detectChangesInternal(tView, view, context);\n    }\n    finally {\n        setCheckNoChangesMode(false);\n    }\n}\n/**\n * Checks the change detector on a root view and its components, and throws if any changes are\n * detected.\n *\n * This is used in development mode to verify that running change detection doesn't\n * introduce other changes.\n *\n * @param lView The view which the change detection should be checked on.\n */\nfunction checkNoChangesInRootView(lView) {\n    setCheckNoChangesMode(true);\n    try {\n        detectChangesInRootView(lView);\n    }\n    finally {\n        setCheckNoChangesMode(false);\n    }\n}\nfunction executeViewQueryFn(flags, viewQueryFn, component) {\n    ngDevMode && assertDefined(viewQueryFn, 'View queries function to execute must be defined.');\n    setCurrentQueryIndex(0);\n    viewQueryFn(flags, component);\n}\n///////////////////////////////\n//// Bindings & interpolations\n///////////////////////////////\n/**\n * Stores meta-data for a property binding to be used by TestBed's `DebugElement.properties`.\n *\n * In order to support TestBed's `DebugElement.properties` we need to save, for each binding:\n * - a bound property name;\n * - a static parts of interpolated strings;\n *\n * A given property metadata is saved at the binding's index in the `TView.data` (in other words, a\n * property binding metadata will be stored in `TView.data` at the same index as a bound value in\n * `LView`). Metadata are represented as `INTERPOLATION_DELIMITER`-delimited string with the\n * following format:\n * - `propertyName` for bound properties;\n * - `propertyName�prefix�interpolation_static_part1�..interpolation_static_partN�suffix` for\n * interpolated properties.\n *\n * @param tData `TData` where meta-data will be saved;\n * @param tNode `TNode` that is a target of the binding;\n * @param propertyName bound property name;\n * @param bindingIndex binding index in `LView`\n * @param interpolationParts static interpolation parts (for property interpolations)\n */\nfunction storePropertyBindingMetadata(tData, tNode, propertyName, bindingIndex, ...interpolationParts) {\n    // Binding meta-data are stored only the first time a given property instruction is processed.\n    // Since we don't have a concept of the \"first update pass\" we need to check for presence of the\n    // binding meta-data to decide if one should be stored (or if was stored already).\n    if (tData[bindingIndex] === null) {\n        if (tNode.inputs == null || !tNode.inputs[propertyName]) {\n            const propBindingIdxs = tNode.propertyBindings || (tNode.propertyBindings = []);\n            propBindingIdxs.push(bindingIndex);\n            let bindingMetadata = propertyName;\n            if (interpolationParts.length > 0) {\n                bindingMetadata +=\n                    INTERPOLATION_DELIMITER + interpolationParts.join(INTERPOLATION_DELIMITER);\n            }\n            tData[bindingIndex] = bindingMetadata;\n        }\n    }\n}\nconst CLEAN_PROMISE = _CLEAN_PROMISE;\nfunction getLCleanup(view) {\n    // top level variables should not be exported for performance reasons (PERF_NOTES.md)\n    return view[CLEANUP] || (view[CLEANUP] = ngDevMode ? new LCleanup() : []);\n}\nfunction getTViewCleanup(tView) {\n    return tView.cleanup || (tView.cleanup = ngDevMode ? new TCleanup() : []);\n}\n/**\n * There are cases where the sub component's renderer needs to be included\n * instead of the current renderer (see the componentSyntheticHost* instructions).\n */\nfunction loadComponentRenderer(currentDef, tNode, lView) {\n    // TODO(FW-2043): the `currentDef` is null when host bindings are invoked while creating root\n    // component (see packages/core/src/render3/component.ts). This is not consistent with the process\n    // of creating inner components, when current directive index is available in the state. In order\n    // to avoid relying on current def being `null` (thus special-casing root component creation), the\n    // process of creating root component should be unified with the process of creating inner\n    // components.\n    if (currentDef === null || isComponentDef(currentDef)) {\n        lView = unwrapLView(lView[tNode.index]);\n    }\n    return lView[RENDERER];\n}\n/** Handles an error thrown in an LView. */\nfunction handleError(lView, error) {\n    const injector = lView[INJECTOR$1];\n    const errorHandler = injector ? injector.get(ErrorHandler, null) : null;\n    errorHandler && errorHandler.handleError(error);\n}\n/**\n * Set the inputs of directives at the current node to corresponding value.\n *\n * @param tView The current TView\n * @param lView the `LView` which contains the directives.\n * @param inputs mapping between the public \"input\" name and privately-known,\n *        possibly minified, property names to write to.\n * @param value Value to set.\n */\nfunction setInputsForProperty(tView, lView, inputs, publicName, value) {\n    for (let i = 0; i < inputs.length;) {\n        const index = inputs[i++];\n        const privateName = inputs[i++];\n        const instance = lView[index];\n        ngDevMode && assertIndexInRange(lView, index);\n        const def = tView.data[index];\n        if (def.setInput !== null) {\n            def.setInput(instance, value, publicName, privateName);\n        }\n        else {\n            instance[privateName] = value;\n        }\n    }\n}\n/**\n * Updates a text binding at a given index in a given LView.\n */\nfunction textBindingInternal(lView, index, value) {\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'value should not be NO_CHANGE');\n    ngDevMode && assertIndexInRange(lView, index + HEADER_OFFSET);\n    const element = getNativeByIndex(index, lView);\n    ngDevMode && assertDefined(element, 'native element should exist');\n    ngDevMode && ngDevMode.rendererSetText++;\n    const renderer = lView[RENDERER];\n    isProceduralRenderer(renderer) ? renderer.setValue(element, value) : element.textContent = value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd$1 = unusedValueExportToPlacateAjd$1 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$5 + unusedValueExportToPlacateAjd$2 + unusedValueExportToPlacateAjd;\nfunction getLContainer(tNode, embeddedView) {\n    ngDevMode && assertLView(embeddedView);\n    const container = embeddedView[PARENT];\n    if (tNode.index === -1) {\n        // This is a dynamically created view inside a dynamic container.\n        // The parent isn't an LContainer if the embedded view hasn't been attached yet.\n        return isLContainer(container) ? container : null;\n    }\n    else {\n        ngDevMode && assertLContainer(container);\n        // This is a inline view node (e.g. embeddedViewStart)\n        return container;\n    }\n}\n/**\n * Retrieves render parent for a given view.\n * Might be null if a view is not yet attached to any container.\n */\nfunction getContainerRenderParent(tViewNode, view) {\n    const container = getLContainer(tViewNode, view);\n    return container ? nativeParentNode(view[RENDERER], container[NATIVE]) : null;\n}\n/**\n * NOTE: for performance reasons, the possible actions are inlined within the function instead of\n * being passed as an argument.\n */\nfunction applyToElementOrContainer(action, renderer, parent, lNodeToHandle, beforeNode) {\n    // If this slot was allocated for a text node dynamically created by i18n, the text node itself\n    // won't be created until i18nApply() in the update block, so this node should be skipped.\n    // For more info, see \"ICU expressions should work inside an ngTemplateOutlet inside an ngFor\"\n    // in `i18n_spec.ts`.\n    if (lNodeToHandle != null) {\n        let lContainer;\n        let isComponent = false;\n        // We are expecting an RNode, but in the case of a component or LContainer the `RNode` is\n        // wrapped in an array which needs to be unwrapped. We need to know if it is a component and if\n        // it has LContainer so that we can process all of those cases appropriately.\n        if (isLContainer(lNodeToHandle)) {\n            lContainer = lNodeToHandle;\n        }\n        else if (isLView(lNodeToHandle)) {\n            isComponent = true;\n            ngDevMode && assertDefined(lNodeToHandle[HOST], 'HOST must be defined for a component LView');\n            lNodeToHandle = lNodeToHandle[HOST];\n        }\n        const rNode = unwrapRNode(lNodeToHandle);\n        ngDevMode && !isProceduralRenderer(renderer) && assertDomNode(rNode);\n        if (action === 0 /* Create */ && parent !== null) {\n            if (beforeNode == null) {\n                nativeAppendChild(renderer, parent, rNode);\n            }\n            else {\n                nativeInsertBefore(renderer, parent, rNode, beforeNode || null);\n            }\n        }\n        else if (action === 1 /* Insert */ && parent !== null) {\n            nativeInsertBefore(renderer, parent, rNode, beforeNode || null);\n        }\n        else if (action === 2 /* Detach */) {\n            nativeRemoveNode(renderer, rNode, isComponent);\n        }\n        else if (action === 3 /* Destroy */) {\n            ngDevMode && ngDevMode.rendererDestroyNode++;\n            renderer.destroyNode(rNode);\n        }\n        if (lContainer != null) {\n            applyContainer(renderer, action, lContainer, parent, beforeNode);\n        }\n    }\n}\nfunction createTextNode(value, renderer) {\n    ngDevMode && ngDevMode.rendererCreateTextNode++;\n    ngDevMode && ngDevMode.rendererSetText++;\n    return isProceduralRenderer(renderer) ? renderer.createText(value) :\n        renderer.createTextNode(value);\n}\nfunction addRemoveViewFromContainer(tView, lView, insertMode, beforeNode) {\n    const renderParent = getContainerRenderParent(tView.node, lView);\n    ngDevMode && assertNodeType(tView.node, 2 /* View */);\n    if (renderParent) {\n        const renderer = lView[RENDERER];\n        const action = insertMode ? 1 /* Insert */ : 2 /* Detach */;\n        applyView(tView, lView, renderer, action, renderParent, beforeNode);\n    }\n}\n/**\n * Detach a `LView` from the DOM by detaching its nodes.\n *\n * @param tView The `TView' of the `LView` to be detached\n * @param lView the `LView` to be detached.\n */\nfunction renderDetachView(tView, lView) {\n    applyView(tView, lView, lView[RENDERER], 2 /* Detach */, null, null);\n}\n/**\n * Traverses down and up the tree of views and containers to remove listeners and\n * call onDestroy callbacks.\n *\n * Notes:\n *  - Because it's used for onDestroy calls, it needs to be bottom-up.\n *  - Must process containers instead of their views to avoid splicing\n *  when views are destroyed and re-added.\n *  - Using a while loop because it's faster than recursion\n *  - Destroy only called on movement to sibling or movement to parent (laterally or up)\n *\n *  @param rootView The view to destroy\n */\nfunction destroyViewTree(rootView) {\n    // If the view has no children, we can clean it up and return early.\n    let lViewOrLContainer = rootView[CHILD_HEAD];\n    if (!lViewOrLContainer) {\n        return cleanUpView(rootView[TVIEW], rootView);\n    }\n    while (lViewOrLContainer) {\n        let next = null;\n        if (isLView(lViewOrLContainer)) {\n            // If LView, traverse down to child.\n            next = lViewOrLContainer[CHILD_HEAD];\n        }\n        else {\n            ngDevMode && assertLContainer(lViewOrLContainer);\n            // If container, traverse down to its first LView.\n            const firstView = lViewOrLContainer[CONTAINER_HEADER_OFFSET];\n            if (firstView)\n                next = firstView;\n        }\n        if (!next) {\n            // Only clean up view when moving to the side or up, as destroy hooks\n            // should be called in order from the bottom up.\n            while (lViewOrLContainer && !lViewOrLContainer[NEXT] && lViewOrLContainer !== rootView) {\n                isLView(lViewOrLContainer) && cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n                lViewOrLContainer = getParentState(lViewOrLContainer, rootView);\n            }\n            if (lViewOrLContainer === null)\n                lViewOrLContainer = rootView;\n            isLView(lViewOrLContainer) && cleanUpView(lViewOrLContainer[TVIEW], lViewOrLContainer);\n            next = lViewOrLContainer && lViewOrLContainer[NEXT];\n        }\n        lViewOrLContainer = next;\n    }\n}\n/**\n * Inserts a view into a container.\n *\n * This adds the view to the container's array of active views in the correct\n * position. It also adds the view's elements to the DOM if the container isn't a\n * root node of another view (in that case, the view's elements will be added when\n * the container's parent view is added later).\n *\n * @param tView The `TView' of the `LView` to insert\n * @param lView The view to insert\n * @param lContainer The container into which the view should be inserted\n * @param index Which index in the container to insert the child view into\n */\nfunction insertView(tView, lView, lContainer, index) {\n    ngDevMode && assertLView(lView);\n    ngDevMode && assertLContainer(lContainer);\n    const indexInContainer = CONTAINER_HEADER_OFFSET + index;\n    const containerLength = lContainer.length;\n    if (index > 0) {\n        // This is a new view, we need to add it to the children.\n        lContainer[indexInContainer - 1][NEXT] = lView;\n    }\n    if (index < containerLength - CONTAINER_HEADER_OFFSET) {\n        lView[NEXT] = lContainer[indexInContainer];\n        addToArray(lContainer, CONTAINER_HEADER_OFFSET + index, lView);\n    }\n    else {\n        lContainer.push(lView);\n        lView[NEXT] = null;\n    }\n    lView[PARENT] = lContainer;\n    // track views where declaration and insertion points are different\n    const declarationLContainer = lView[DECLARATION_LCONTAINER];\n    if (declarationLContainer !== null && lContainer !== declarationLContainer) {\n        trackMovedView(declarationLContainer, lView);\n    }\n    // notify query that a new view has been added\n    const lQueries = lView[QUERIES];\n    if (lQueries !== null) {\n        lQueries.insertView(tView);\n    }\n    // Sets the attached flag\n    lView[FLAGS] |= 128 /* Attached */;\n}\n/**\n * Track views created from the declaration container (TemplateRef) and inserted into a\n * different LContainer.\n */\nfunction trackMovedView(declarationContainer, lView) {\n    ngDevMode && assertDefined(lView, 'LView required');\n    ngDevMode && assertLContainer(declarationContainer);\n    const movedViews = declarationContainer[MOVED_VIEWS];\n    const insertedLContainer = lView[PARENT];\n    ngDevMode && assertLContainer(insertedLContainer);\n    const insertedComponentLView = insertedLContainer[PARENT][DECLARATION_COMPONENT_VIEW];\n    ngDevMode && assertDefined(insertedComponentLView, 'Missing insertedComponentLView');\n    const declaredComponentLView = lView[DECLARATION_COMPONENT_VIEW];\n    ngDevMode && assertDefined(declaredComponentLView, 'Missing declaredComponentLView');\n    if (declaredComponentLView !== insertedComponentLView) {\n        // At this point the declaration-component is not same as insertion-component; this means that\n        // this is a transplanted view. Mark the declared lView as having transplanted views so that\n        // those views can participate in CD.\n        declarationContainer[HAS_TRANSPLANTED_VIEWS] = true;\n    }\n    if (movedViews === null) {\n        declarationContainer[MOVED_VIEWS] = [lView];\n    }\n    else {\n        movedViews.push(lView);\n    }\n}\nfunction detachMovedView(declarationContainer, lView) {\n    ngDevMode && assertLContainer(declarationContainer);\n    ngDevMode &&\n        assertDefined(declarationContainer[MOVED_VIEWS], 'A projected view should belong to a non-empty projected views collection');\n    const movedViews = declarationContainer[MOVED_VIEWS];\n    const declarationViewIndex = movedViews.indexOf(lView);\n    const insertionLContainer = lView[PARENT];\n    ngDevMode && assertLContainer(insertionLContainer);\n    // If the view was marked for refresh but then detached before it was checked (where the flag\n    // would be cleared and the counter decremented), we need to decrement the view counter here\n    // instead.\n    if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {\n        updateTransplantedViewCount(insertionLContainer, -1);\n    }\n    movedViews.splice(declarationViewIndex, 1);\n}\n/**\n * Detaches a view from a container.\n *\n * This method removes the view from the container's array of active views. It also\n * removes the view's elements from the DOM.\n *\n * @param lContainer The container from which to detach a view\n * @param removeIndex The index of the view to detach\n * @returns Detached LView instance.\n */\nfunction detachView(lContainer, removeIndex) {\n    if (lContainer.length <= CONTAINER_HEADER_OFFSET)\n        return;\n    const indexInContainer = CONTAINER_HEADER_OFFSET + removeIndex;\n    const viewToDetach = lContainer[indexInContainer];\n    if (viewToDetach) {\n        const declarationLContainer = viewToDetach[DECLARATION_LCONTAINER];\n        if (declarationLContainer !== null && declarationLContainer !== lContainer) {\n            detachMovedView(declarationLContainer, viewToDetach);\n        }\n        if (removeIndex > 0) {\n            lContainer[indexInContainer - 1][NEXT] = viewToDetach[NEXT];\n        }\n        const removedLView = removeFromArray(lContainer, CONTAINER_HEADER_OFFSET + removeIndex);\n        addRemoveViewFromContainer(viewToDetach[TVIEW], viewToDetach, false, null);\n        // notify query that a view has been removed\n        const lQueries = removedLView[QUERIES];\n        if (lQueries !== null) {\n            lQueries.detachView(removedLView[TVIEW]);\n        }\n        viewToDetach[PARENT] = null;\n        viewToDetach[NEXT] = null;\n        // Unsets the attached flag\n        viewToDetach[FLAGS] &= ~128 /* Attached */;\n    }\n    return viewToDetach;\n}\n/**\n * A standalone function which destroys an LView,\n * conducting clean up (e.g. removing listeners, calling onDestroys).\n *\n * @param tView The `TView' of the `LView` to be destroyed\n * @param lView The view to be destroyed.\n */\nfunction destroyLView(tView, lView) {\n    if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n        const renderer = lView[RENDERER];\n        if (isProceduralRenderer(renderer) && renderer.destroyNode) {\n            applyView(tView, lView, renderer, 3 /* Destroy */, null, null);\n        }\n        destroyViewTree(lView);\n    }\n}\n/**\n * Determines which LViewOrLContainer to jump to when traversing back up the\n * tree in destroyViewTree.\n *\n * Normally, the view's parent LView should be checked, but in the case of\n * embedded views, the container (which is the view node's parent, but not the\n * LView's parent) needs to be checked for a possible next property.\n *\n * @param lViewOrLContainer The LViewOrLContainer for which we need a parent state\n * @param rootView The rootView, so we don't propagate too far up the view tree\n * @returns The correct parent LViewOrLContainer\n */\nfunction getParentState(lViewOrLContainer, rootView) {\n    let tNode;\n    if (isLView(lViewOrLContainer) && (tNode = lViewOrLContainer[T_HOST]) &&\n        tNode.type === 2 /* View */) {\n        // if it's an embedded view, the state needs to go up to the container, in case the\n        // container has a next\n        return getLContainer(tNode, lViewOrLContainer);\n    }\n    else {\n        // otherwise, use parent view for containers or component views\n        return lViewOrLContainer[PARENT] === rootView ? null : lViewOrLContainer[PARENT];\n    }\n}\n/**\n * Calls onDestroys hooks for all directives and pipes in a given view and then removes all\n * listeners. Listeners are removed as the last step so events delivered in the onDestroys hooks\n * can be propagated to @Output listeners.\n *\n * @param tView `TView` for the `LView` to clean up.\n * @param lView The LView to clean up\n */\nfunction cleanUpView(tView, lView) {\n    if (!(lView[FLAGS] & 256 /* Destroyed */)) {\n        // Usually the Attached flag is removed when the view is detached from its parent, however\n        // if it's a root view, the flag won't be unset hence why we're also removing on destroy.\n        lView[FLAGS] &= ~128 /* Attached */;\n        // Mark the LView as destroyed *before* executing the onDestroy hooks. An onDestroy hook\n        // runs arbitrary user code, which could include its own `viewRef.destroy()` (or similar). If\n        // We don't flag the view as destroyed before the hooks, this could lead to an infinite loop.\n        // This also aligns with the ViewEngine behavior. It also means that the onDestroy hook is\n        // really more of an \"afterDestroy\" hook if you think about it.\n        lView[FLAGS] |= 256 /* Destroyed */;\n        executeOnDestroys(tView, lView);\n        removeListeners(tView, lView);\n        const hostTNode = lView[T_HOST];\n        // For component views only, the local renderer is destroyed as clean up time.\n        if (hostTNode && hostTNode.type === 3 /* Element */ &&\n            isProceduralRenderer(lView[RENDERER])) {\n            ngDevMode && ngDevMode.rendererDestroy++;\n            lView[RENDERER].destroy();\n        }\n        const declarationContainer = lView[DECLARATION_LCONTAINER];\n        // we are dealing with an embedded view that is still inserted into a container\n        if (declarationContainer !== null && isLContainer(lView[PARENT])) {\n            // and this is a projected view\n            if (declarationContainer !== lView[PARENT]) {\n                detachMovedView(declarationContainer, lView);\n            }\n            // For embedded views still attached to a container: remove query result from this view.\n            const lQueries = lView[QUERIES];\n            if (lQueries !== null) {\n                lQueries.detachView(tView);\n            }\n        }\n    }\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(tView, lView) {\n    const tCleanup = tView.cleanup;\n    if (tCleanup !== null) {\n        const lCleanup = lView[CLEANUP];\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            if (typeof tCleanup[i] === 'string') {\n                // This is a native DOM listener\n                const idxOrTargetGetter = tCleanup[i + 1];\n                const target = typeof idxOrTargetGetter === 'function' ?\n                    idxOrTargetGetter(lView) :\n                    unwrapRNode(lView[idxOrTargetGetter]);\n                const listener = lCleanup[tCleanup[i + 2]];\n                const useCaptureOrSubIdx = tCleanup[i + 3];\n                if (typeof useCaptureOrSubIdx === 'boolean') {\n                    // native DOM listener registered with Renderer3\n                    target.removeEventListener(tCleanup[i], listener, useCaptureOrSubIdx);\n                }\n                else {\n                    if (useCaptureOrSubIdx >= 0) {\n                        // unregister\n                        lCleanup[useCaptureOrSubIdx]();\n                    }\n                    else {\n                        // Subscription\n                        lCleanup[-useCaptureOrSubIdx].unsubscribe();\n                    }\n                }\n                i += 2;\n            }\n            else {\n                // This is a cleanup function that is grouped with the index of its context\n                const context = lCleanup[tCleanup[i + 1]];\n                tCleanup[i].call(context);\n            }\n        }\n        lView[CLEANUP] = null;\n    }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(tView, lView) {\n    let destroyHooks;\n    if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n        for (let i = 0; i < destroyHooks.length; i += 2) {\n            const context = lView[destroyHooks[i]];\n            // Only call the destroy hook if the context has been requested.\n            if (!(context instanceof NodeInjectorFactory)) {\n                const toCall = destroyHooks[i + 1];\n                if (Array.isArray(toCall)) {\n                    for (let j = 0; j < toCall.length; j += 2) {\n                        toCall[j + 1].call(context[toCall[j]]);\n                    }\n                }\n                else {\n                    toCall.call(context);\n                }\n            }\n        }\n    }\n}\n/**\n * Returns a native element if a node can be inserted into the given parent.\n *\n * There are two reasons why we may not be able to insert a element immediately.\n * - Projection: When creating a child content element of a component, we have to skip the\n *   insertion because the content of a component will be projected.\n *   `<component><content>delayed due to projection</content></component>`\n * - Parent container is disconnected: This can happen when we are inserting a view into\n *   parent container, which itself is disconnected. For example the parent container is part\n *   of a View which has not be inserted or is made for projection but has not been inserted\n *   into destination.\n */\nfunction getRenderParent(tView, tNode, currentView) {\n    // Skip over element and ICU containers as those are represented by a comment node and\n    // can't be used as a render parent.\n    let parentTNode = tNode.parent;\n    while (parentTNode != null &&\n        (parentTNode.type === 4 /* ElementContainer */ ||\n            parentTNode.type === 5 /* IcuContainer */)) {\n        tNode = parentTNode;\n        parentTNode = tNode.parent;\n    }\n    // If the parent tNode is null, then we are inserting across views: either into an embedded view\n    // or a component view.\n    if (parentTNode == null) {\n        const hostTNode = currentView[T_HOST];\n        if (hostTNode.type === 2 /* View */) {\n            // We are inserting a root element of an embedded view We might delay insertion of children\n            // for a given view if it is disconnected. This might happen for 2 main reasons:\n            // - view is not inserted into any container(view was created but not inserted yet)\n            // - view is inserted into a container but the container itself is not inserted into the DOM\n            // (container might be part of projection or child of a view that is not inserted yet).\n            // In other words we can insert children of a given view if this view was inserted into a\n            // container and the container itself has its render parent determined.\n            return getContainerRenderParent(hostTNode, currentView);\n        }\n        else {\n            // We are inserting a root element of the component view into the component host element and\n            // it should always be eager.\n            ngDevMode && assertNodeOfPossibleTypes(hostTNode, [3 /* Element */]);\n            return currentView[HOST];\n        }\n    }\n    else {\n        const isIcuCase = tNode && tNode.type === 5 /* IcuContainer */;\n        // If the parent of this node is an ICU container, then it is represented by comment node and we\n        // need to use it as an anchor. If it is projected then it's direct parent node is the renderer.\n        if (isIcuCase && tNode.flags & 4 /* isProjected */) {\n            return getNativeByTNode(tNode, currentView).parentNode;\n        }\n        ngDevMode && assertNodeType(parentTNode, 3 /* Element */);\n        if (parentTNode.flags & 2 /* isComponentHost */) {\n            const tData = tView.data;\n            const tNode = tData[parentTNode.index];\n            const encapsulation = tData[tNode.directiveStart].encapsulation;\n            // We've got a parent which is an element in the current view. We just need to verify if the\n            // parent element is not a component. Component's content nodes are not inserted immediately\n            // because they will be projected, and so doing insert at this point would be wasteful.\n            // Since the projection would then move it to its final destination. Note that we can't\n            // make this assumption when using the Shadow DOM, because the native projection placeholders\n            // (<content> or <slot>) have to be in place as elements are being inserted.\n            if (encapsulation !== ViewEncapsulation$1.ShadowDom &&\n                encapsulation !== ViewEncapsulation$1.Native) {\n                return null;\n            }\n        }\n        return getNativeByTNode(parentTNode, currentView);\n    }\n}\n/**\n * Inserts a native node before another native node for a given parent using {@link Renderer3}.\n * This is a utility function that can be used when native nodes were determined - it abstracts an\n * actual renderer being used.\n */\nfunction nativeInsertBefore(renderer, parent, child, beforeNode) {\n    ngDevMode && ngDevMode.rendererInsertBefore++;\n    if (isProceduralRenderer(renderer)) {\n        renderer.insertBefore(parent, child, beforeNode);\n    }\n    else {\n        parent.insertBefore(child, beforeNode, true);\n    }\n}\nfunction nativeAppendChild(renderer, parent, child) {\n    ngDevMode && ngDevMode.rendererAppendChild++;\n    ngDevMode && assertDefined(parent, 'parent node must be defined');\n    if (isProceduralRenderer(renderer)) {\n        renderer.appendChild(parent, child);\n    }\n    else {\n        parent.appendChild(child);\n    }\n}\nfunction nativeAppendOrInsertBefore(renderer, parent, child, beforeNode) {\n    if (beforeNode !== null) {\n        nativeInsertBefore(renderer, parent, child, beforeNode);\n    }\n    else {\n        nativeAppendChild(renderer, parent, child);\n    }\n}\n/** Removes a node from the DOM given its native parent. */\nfunction nativeRemoveChild(renderer, parent, child, isHostElement) {\n    if (isProceduralRenderer(renderer)) {\n        renderer.removeChild(parent, child, isHostElement);\n    }\n    else {\n        parent.removeChild(child);\n    }\n}\n/**\n * Returns a native parent of a given native node.\n */\nfunction nativeParentNode(renderer, node) {\n    return (isProceduralRenderer(renderer) ? renderer.parentNode(node) : node.parentNode);\n}\n/**\n * Returns a native sibling of a given native node.\n */\nfunction nativeNextSibling(renderer, node) {\n    return isProceduralRenderer(renderer) ? renderer.nextSibling(node) : node.nextSibling;\n}\n/**\n * Finds a native \"anchor\" node for cases where we can't append a native child directly\n * (`appendChild`) and need to use a reference (anchor) node for the `insertBefore` operation.\n * @param parentTNode\n * @param lView\n */\nfunction getNativeAnchorNode(parentTNode, lView) {\n    if (parentTNode.type === 2 /* View */) {\n        const lContainer = getLContainer(parentTNode, lView);\n        if (lContainer === null)\n            return null;\n        const index = lContainer.indexOf(lView, CONTAINER_HEADER_OFFSET) - CONTAINER_HEADER_OFFSET;\n        return getBeforeNodeForView(index, lContainer);\n    }\n    else if (parentTNode.type === 4 /* ElementContainer */ ||\n        parentTNode.type === 5 /* IcuContainer */) {\n        return getNativeByTNode(parentTNode, lView);\n    }\n    return null;\n}\n/**\n * Appends the `child` native node (or a collection of nodes) to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}.\n *\n * @param tView The `TView' to be appended\n * @param lView The current LView\n * @param childEl The native child (or children) that should be appended\n * @param childTNode The TNode of the child element\n * @returns Whether or not the child was appended\n */\nfunction appendChild(tView, lView, childEl, childTNode) {\n    const renderParent = getRenderParent(tView, childTNode, lView);\n    if (renderParent != null) {\n        const renderer = lView[RENDERER];\n        const parentTNode = childTNode.parent || lView[T_HOST];\n        const anchorNode = getNativeAnchorNode(parentTNode, lView);\n        if (Array.isArray(childEl)) {\n            for (let i = 0; i < childEl.length; i++) {\n                nativeAppendOrInsertBefore(renderer, renderParent, childEl[i], anchorNode);\n            }\n        }\n        else {\n            nativeAppendOrInsertBefore(renderer, renderParent, childEl, anchorNode);\n        }\n    }\n}\n/**\n * Returns the first native node for a given LView, starting from the provided TNode.\n *\n * Native nodes are returned in the order in which those appear in the native tree (DOM).\n */\nfunction getFirstNativeNode(lView, tNode) {\n    if (tNode !== null) {\n        ngDevMode && assertNodeOfPossibleTypes(tNode, [\n            3 /* Element */, 0 /* Container */, 4 /* ElementContainer */, 5 /* IcuContainer */,\n            1 /* Projection */\n        ]);\n        const tNodeType = tNode.type;\n        if (tNodeType === 3 /* Element */) {\n            return getNativeByTNode(tNode, lView);\n        }\n        else if (tNodeType === 0 /* Container */) {\n            return getBeforeNodeForView(-1, lView[tNode.index]);\n        }\n        else if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n            const elIcuContainerChild = tNode.child;\n            if (elIcuContainerChild !== null) {\n                return getFirstNativeNode(lView, elIcuContainerChild);\n            }\n            else {\n                const rNodeOrLContainer = lView[tNode.index];\n                if (isLContainer(rNodeOrLContainer)) {\n                    return getBeforeNodeForView(-1, rNodeOrLContainer);\n                }\n                else {\n                    return unwrapRNode(rNodeOrLContainer);\n                }\n            }\n        }\n        else {\n            const componentView = lView[DECLARATION_COMPONENT_VIEW];\n            const componentHost = componentView[T_HOST];\n            const parentView = getLViewParent(componentView);\n            const firstProjectedTNode = componentHost.projection[tNode.projection];\n            if (firstProjectedTNode != null) {\n                return getFirstNativeNode(parentView, firstProjectedTNode);\n            }\n            else {\n                return getFirstNativeNode(lView, tNode.next);\n            }\n        }\n    }\n    return null;\n}\nfunction getBeforeNodeForView(viewIndexInContainer, lContainer) {\n    const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;\n    if (nextViewIndex < lContainer.length) {\n        const lView = lContainer[nextViewIndex];\n        const firstTNodeOfView = lView[TVIEW].firstChild;\n        if (firstTNodeOfView !== null) {\n            return getFirstNativeNode(lView, firstTNodeOfView);\n        }\n    }\n    return lContainer[NATIVE];\n}\n/**\n * Removes a native node itself using a given renderer. To remove the node we are looking up its\n * parent from the native tree as not all platforms / browsers support the equivalent of\n * node.remove().\n *\n * @param renderer A renderer to be used\n * @param rNode The native node that should be removed\n * @param isHostElement A flag indicating if a node to be removed is a host of a component.\n */\nfunction nativeRemoveNode(renderer, rNode, isHostElement) {\n    const nativeParent = nativeParentNode(renderer, rNode);\n    if (nativeParent) {\n        nativeRemoveChild(renderer, nativeParent, rNode, isHostElement);\n    }\n}\n/**\n * Performs the operation of `action` on the node. Typically this involves inserting or removing\n * nodes on the LView or projection boundary.\n */\nfunction applyNodes(renderer, action, tNode, lView, renderParent, beforeNode, isProjection) {\n    while (tNode != null) {\n        ngDevMode && assertTNodeForLView(tNode, lView);\n        ngDevMode && assertNodeOfPossibleTypes(tNode, [\n            0 /* Container */, 3 /* Element */, 4 /* ElementContainer */, 1 /* Projection */,\n            5 /* IcuContainer */\n        ]);\n        const rawSlotValue = lView[tNode.index];\n        const tNodeType = tNode.type;\n        if (isProjection) {\n            if (action === 0 /* Create */) {\n                rawSlotValue && attachPatchData(unwrapRNode(rawSlotValue), lView);\n                tNode.flags |= 4 /* isProjected */;\n            }\n        }\n        if ((tNode.flags & 64 /* isDetached */) !== 64 /* isDetached */) {\n            if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n                applyNodes(renderer, action, tNode.child, lView, renderParent, beforeNode, false);\n                applyToElementOrContainer(action, renderer, renderParent, rawSlotValue, beforeNode);\n            }\n            else if (tNodeType === 1 /* Projection */) {\n                applyProjectionRecursive(renderer, action, lView, tNode, renderParent, beforeNode);\n            }\n            else {\n                ngDevMode && assertNodeOfPossibleTypes(tNode, [3 /* Element */, 0 /* Container */]);\n                applyToElementOrContainer(action, renderer, renderParent, rawSlotValue, beforeNode);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n}\n/**\n * `applyView` performs operation on the view as specified in `action` (insert, detach, destroy)\n *\n * Inserting a view without projection or containers at top level is simple. Just iterate over the\n * root nodes of the View, and for each node perform the `action`.\n *\n * Things get more complicated with containers and projections. That is because coming across:\n * - Container: implies that we have to insert/remove/destroy the views of that container as well\n *              which in turn can have their own Containers at the View roots.\n * - Projection: implies that we have to insert/remove/destroy the nodes of the projection. The\n *               complication is that the nodes we are projecting can themselves have Containers\n *               or other Projections.\n *\n * As you can see this is a very recursive problem. Yes recursion is not most efficient but the\n * code is complicated enough that trying to implemented with recursion becomes unmaintainable.\n *\n * @param tView The `TView' which needs to be inserted, detached, destroyed\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyView(tView, lView, renderer, action, renderParent, beforeNode) {\n    ngDevMode && assertNodeType(tView.node, 2 /* View */);\n    const viewRootTNode = tView.node.child;\n    applyNodes(renderer, action, viewRootTNode, lView, renderParent, beforeNode, false);\n}\n/**\n * `applyProjection` performs operation on the projection.\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param tView The `TView` of `LView` which needs to be inserted, detached, destroyed\n * @param lView The `LView` which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n */\nfunction applyProjection(tView, lView, tProjectionNode) {\n    const renderer = lView[RENDERER];\n    const renderParent = getRenderParent(tView, tProjectionNode, lView);\n    const parentTNode = tProjectionNode.parent || lView[T_HOST];\n    let beforeNode = getNativeAnchorNode(parentTNode, lView);\n    applyProjectionRecursive(renderer, 0 /* Create */, lView, tProjectionNode, renderParent, beforeNode);\n}\n/**\n * `applyProjectionRecursive` performs operation on the projection specified by `action` (insert,\n * detach, destroy)\n *\n * Inserting a projection requires us to locate the projected nodes from the parent component. The\n * complication is that those nodes themselves could be re-projected from their parent component.\n *\n * @param renderer Render to use\n * @param action action to perform (insert, detach, destroy)\n * @param lView The LView which needs to be inserted, detached, destroyed.\n * @param tProjectionNode node to project\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyProjectionRecursive(renderer, action, lView, tProjectionNode, renderParent, beforeNode) {\n    const componentLView = lView[DECLARATION_COMPONENT_VIEW];\n    const componentNode = componentLView[T_HOST];\n    ngDevMode &&\n        assertEqual(typeof tProjectionNode.projection, 'number', 'expecting projection index');\n    const nodeToProjectOrRNodes = componentNode.projection[tProjectionNode.projection];\n    if (Array.isArray(nodeToProjectOrRNodes)) {\n        // This should not exist, it is a bit of a hack. When we bootstrap a top level node and we\n        // need to support passing projectable nodes, so we cheat and put them in the TNode\n        // of the Host TView. (Yes we put instance info at the T Level). We can get away with it\n        // because we know that that TView is not shared and therefore it will not be a problem.\n        // This should be refactored and cleaned up.\n        for (let i = 0; i < nodeToProjectOrRNodes.length; i++) {\n            const rNode = nodeToProjectOrRNodes[i];\n            applyToElementOrContainer(action, renderer, renderParent, rNode, beforeNode);\n        }\n    }\n    else {\n        let nodeToProject = nodeToProjectOrRNodes;\n        const projectedComponentLView = componentLView[PARENT];\n        applyNodes(renderer, action, nodeToProject, projectedComponentLView, renderParent, beforeNode, true);\n    }\n}\n/**\n * `applyContainer` performs an operation on the container and its views as specified by\n * `action` (insert, detach, destroy)\n *\n * Inserting a Container is complicated by the fact that the container may have Views which\n * themselves have containers or projections.\n *\n * @param renderer Renderer to use\n * @param action action to perform (insert, detach, destroy)\n * @param lContainer The LContainer which needs to be inserted, detached, destroyed.\n * @param renderParent parent DOM element for insertion/removal.\n * @param beforeNode Before which node the insertions should happen.\n */\nfunction applyContainer(renderer, action, lContainer, renderParent, beforeNode) {\n    ngDevMode && assertLContainer(lContainer);\n    const anchor = lContainer[NATIVE]; // LContainer has its own before node.\n    const native = unwrapRNode(lContainer);\n    // An LContainer can be created dynamically on any node by injecting ViewContainerRef.\n    // Asking for a ViewContainerRef on an element will result in a creation of a separate anchor node\n    // (comment in the DOM) that will be different from the LContainer's host node. In this particular\n    // case we need to execute action on 2 nodes:\n    // - container's host node (this is done in the executeActionOnElementOrContainer)\n    // - container's host node (this is done here)\n    if (anchor !== native) {\n        // This is very strange to me (Misko). I would expect that the native is same as anchor. I don't\n        // see a reason why they should be different, but they are.\n        //\n        // If they are we need to process the second anchor as well.\n        applyToElementOrContainer(action, renderer, renderParent, anchor, beforeNode);\n    }\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const lView = lContainer[i];\n        applyView(lView[TVIEW], lView, renderer, action, renderParent, anchor);\n    }\n}\n/**\n * Writes class/style to element.\n *\n * @param renderer Renderer to use.\n * @param isClassBased `true` if it should be written to `class` (`false` to write to `style`)\n * @param rNode The Node to write to.\n * @param prop Property to write to. This would be the class/style name.\n * @param value Value to write. If `null`/`undefined`/`false` this is considered a remove (set/add\n *        otherwise).\n */\nfunction applyStyling(renderer, isClassBased, rNode, prop, value) {\n    const isProcedural = isProceduralRenderer(renderer);\n    if (isClassBased) {\n        // We actually want JS true/false here because any truthy value should add the class\n        if (!value) {\n            ngDevMode && ngDevMode.rendererRemoveClass++;\n            if (isProcedural) {\n                renderer.removeClass(rNode, prop);\n            }\n            else {\n                rNode.classList.remove(prop);\n            }\n        }\n        else {\n            ngDevMode && ngDevMode.rendererAddClass++;\n            if (isProcedural) {\n                renderer.addClass(rNode, prop);\n            }\n            else {\n                ngDevMode && assertDefined(rNode.classList, 'HTMLElement expected');\n                rNode.classList.add(prop);\n            }\n        }\n    }\n    else {\n        // TODO(misko): Can't import RendererStyleFlags2.DashCase as it causes imports to be resolved in\n        // different order which causes failures. Using direct constant as workaround for now.\n        const flags = prop.indexOf('-') == -1 ? undefined : 2 /* RendererStyleFlags2.DashCase */;\n        if (value == null /** || value === undefined */) {\n            ngDevMode && ngDevMode.rendererRemoveStyle++;\n            if (isProcedural) {\n                renderer.removeStyle(rNode, prop, flags);\n            }\n            else {\n                rNode.style.removeProperty(prop);\n            }\n        }\n        else {\n            ngDevMode && ngDevMode.rendererSetStyle++;\n            if (isProcedural) {\n                renderer.setStyle(rNode, prop, value, flags);\n            }\n            else {\n                ngDevMode && assertDefined(rNode.style, 'HTMLElement expected');\n                rNode.style.setProperty(prop, value);\n            }\n        }\n    }\n}\n/**\n * Write `cssText` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectStyle(renderer, element, newValue) {\n    ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n    if (isProceduralRenderer(renderer)) {\n        renderer.setAttribute(element, 'style', newValue);\n    }\n    else {\n        element.style.cssText = newValue;\n    }\n    ngDevMode && ngDevMode.rendererSetStyle++;\n}\n/**\n * Write `className` to `RElement`.\n *\n * This function does direct write without any reconciliation. Used for writing initial values, so\n * that static styling values do not pull in the style parser.\n *\n * @param renderer Renderer to use\n * @param element The element which needs to be updated.\n * @param newValue The new class list to write.\n */\nfunction writeDirectClass(renderer, element, newValue) {\n    ngDevMode && assertString(newValue, '\\'newValue\\' should be a string');\n    if (isProceduralRenderer(renderer)) {\n        if (newValue === '') {\n            // There are tests in `google3` which expect `element.getAttribute('class')` to be `null`.\n            renderer.removeAttribute(element, 'class');\n        }\n        else {\n            renderer.setAttribute(element, 'class', newValue);\n        }\n    }\n    else {\n        element.className = newValue;\n    }\n    ngDevMode && ngDevMode.rendererSetClassName++;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * If `startTNode.parent` exists and has an injector, returns TNode for that injector.\n * Otherwise, unwraps a parent injector location number to find the view offset from the current\n * injector, then walks up the declaration view tree until the TNode of the parent injector is\n * found.\n *\n * @param location The location of the parent injector, which contains the view offset\n * @param startView The LView instance from which to start walking up the view tree\n * @param startTNode The TNode instance of the starting element\n * @returns The TNode of the parent injector\n */\nfunction getParentInjectorTNode(location, startView, startTNode) {\n    // If there is an injector on the parent TNode, retrieve the TNode for that injector.\n    if (startTNode.parent && startTNode.parent.injectorIndex !== -1) {\n        // view offset is 0\n        const injectorIndex = startTNode.parent.injectorIndex;\n        let tNode = startTNode.parent;\n        // If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent\n        // injector.\n        while (tNode.parent != null && injectorIndex == tNode.parent.injectorIndex) {\n            tNode = tNode.parent;\n        }\n        return tNode;\n    }\n    let viewOffset = getParentInjectorViewOffset(location);\n    // view offset is 1\n    let parentView = startView;\n    let parentTNode = startView[T_HOST];\n    // view offset is superior to 1\n    while (viewOffset > 1) {\n        parentView = parentView[DECLARATION_VIEW];\n        parentTNode = parentView[T_HOST];\n        viewOffset--;\n    }\n    return parentTNode;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ViewRef {\n    constructor(\n    /**\n     * This represents `LView` associated with the component when ViewRef is a ChangeDetectorRef.\n     *\n     * When ViewRef is created for a dynamic component, this also represents the `LView` for the\n     * component.\n     *\n     * For a \"regular\" ViewRef created for an embedded view, this is the `LView` for the embedded\n     * view.\n     *\n     * @internal\n     */\n    _lView, \n    /**\n     * This represents the `LView` associated with the point where `ChangeDetectorRef` was\n     * requested.\n     *\n     * This may be different from `_lView` if the `_cdRefInjectingView` is an embedded view.\n     */\n    _cdRefInjectingView) {\n        this._lView = _lView;\n        this._cdRefInjectingView = _cdRefInjectingView;\n        this._appRef = null;\n        this._viewContainerRef = null;\n    }\n    get rootNodes() {\n        const lView = this._lView;\n        if (lView[HOST] == null) {\n            const hostTView = lView[T_HOST];\n            return collectNativeNodes(lView[TVIEW], lView, hostTView.child, []);\n        }\n        return [];\n    }\n    get context() {\n        return this._lView[CONTEXT];\n    }\n    get destroyed() {\n        return (this._lView[FLAGS] & 256 /* Destroyed */) === 256 /* Destroyed */;\n    }\n    destroy() {\n        if (this._appRef) {\n            this._appRef.detachView(this);\n        }\n        else if (this._viewContainerRef) {\n            const index = this._viewContainerRef.indexOf(this);\n            if (index > -1) {\n                this._viewContainerRef.detach(index);\n            }\n            this._viewContainerRef = null;\n        }\n        destroyLView(this._lView[TVIEW], this._lView);\n    }\n    onDestroy(callback) {\n        storeCleanupWithContext(this._lView[TVIEW], this._lView, null, callback);\n    }\n    /**\n     * Marks a view and all of its ancestors dirty.\n     *\n     * It also triggers change detection by calling `scheduleTick` internally, which coalesces\n     * multiple `markForCheck` calls to into one change detection run.\n     *\n     * This can be used to ensure an {@link ChangeDetectionStrategy#OnPush OnPush} component is\n     * checked when it needs to be re-rendered but the two normal triggers haven't marked it\n     * dirty (i.e. inputs haven't changed and events haven't fired in the view).\n     *\n     * <!-- TODO: Add a link to a chapter on OnPush components -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Component({\n     *   selector: 'my-app',\n     *   template: `Number of ticks: {{numberOfTicks}}`\n     *   changeDetection: ChangeDetectionStrategy.OnPush,\n     * })\n     * class AppComponent {\n     *   numberOfTicks = 0;\n     *\n     *   constructor(private ref: ChangeDetectorRef) {\n     *     setInterval(() => {\n     *       this.numberOfTicks++;\n     *       // the following is required, otherwise the view will not be updated\n     *       this.ref.markForCheck();\n     *     }, 1000);\n     *   }\n     * }\n     * ```\n     */\n    markForCheck() {\n        markViewDirty(this._cdRefInjectingView || this._lView);\n    }\n    /**\n     * Detaches the view from the change detection tree.\n     *\n     * Detached views will not be checked during change detection runs until they are\n     * re-attached, even if they are dirty. `detach` can be used in combination with\n     * {@link ChangeDetectorRef#detectChanges detectChanges} to implement local change\n     * detection checks.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example defines a component with a large list of readonly data.\n     * Imagine the data changes constantly, many times per second. For performance reasons,\n     * we want to check and update the list every five seconds. We can do that by detaching\n     * the component's change detector and doing a local check every five seconds.\n     *\n     * ```typescript\n     * class DataProvider {\n     *   // in a real application the returned data will be different every time\n     *   get data() {\n     *     return [1,2,3,4,5];\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'giant-list',\n     *   template: `\n     *     <li *ngFor=\"let d of dataProvider.data\">Data {{d}}</li>\n     *   `,\n     * })\n     * class GiantList {\n     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {\n     *     ref.detach();\n     *     setInterval(() => {\n     *       this.ref.detectChanges();\n     *     }, 5000);\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'app',\n     *   providers: [DataProvider],\n     *   template: `\n     *     <giant-list><giant-list>\n     *   `,\n     * })\n     * class App {\n     * }\n     * ```\n     */\n    detach() {\n        this._lView[FLAGS] &= ~128 /* Attached */;\n    }\n    /**\n     * Re-attaches a view to the change detection tree.\n     *\n     * This can be used to re-attach views that were previously detached from the tree\n     * using {@link ChangeDetectorRef#detach detach}. Views are attached to the tree by default.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example creates a component displaying `live` data. The component will detach\n     * its change detector from the main change detector tree when the component's live property\n     * is set to false.\n     *\n     * ```typescript\n     * class DataProvider {\n     *   data = 1;\n     *\n     *   constructor() {\n     *     setInterval(() => {\n     *       this.data = this.data * 2;\n     *     }, 500);\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'live-data',\n     *   inputs: ['live'],\n     *   template: 'Data: {{dataProvider.data}}'\n     * })\n     * class LiveData {\n     *   constructor(private ref: ChangeDetectorRef, private dataProvider: DataProvider) {}\n     *\n     *   set live(value) {\n     *     if (value) {\n     *       this.ref.reattach();\n     *     } else {\n     *       this.ref.detach();\n     *     }\n     *   }\n     * }\n     *\n     * @Component({\n     *   selector: 'my-app',\n     *   providers: [DataProvider],\n     *   template: `\n     *     Live Update: <input type=\"checkbox\" [(ngModel)]=\"live\">\n     *     <live-data [live]=\"live\"><live-data>\n     *   `,\n     * })\n     * class AppComponent {\n     *   live = true;\n     * }\n     * ```\n     */\n    reattach() {\n        this._lView[FLAGS] |= 128 /* Attached */;\n    }\n    /**\n     * Checks the view and its children.\n     *\n     * This can also be used in combination with {@link ChangeDetectorRef#detach detach} to implement\n     * local change detection checks.\n     *\n     * <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->\n     * <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example defines a component with a large list of readonly data.\n     * Imagine, the data changes constantly, many times per second. For performance reasons,\n     * we want to check and update the list every five seconds.\n     *\n     * We can do that by detaching the component's change detector and doing a local change detection\n     * check every five seconds.\n     *\n     * See {@link ChangeDetectorRef#detach detach} for more information.\n     */\n    detectChanges() {\n        detectChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n    /**\n     * Checks the change detector and its children, and throws if any changes are detected.\n     *\n     * This is used in development mode to verify that running change detection doesn't\n     * introduce other changes.\n     */\n    checkNoChanges() {\n        checkNoChangesInternal(this._lView[TVIEW], this._lView, this.context);\n    }\n    attachToViewContainerRef(vcRef) {\n        if (this._appRef) {\n            throw new Error('This view is already attached directly to the ApplicationRef!');\n        }\n        this._viewContainerRef = vcRef;\n    }\n    detachFromAppRef() {\n        this._appRef = null;\n        renderDetachView(this._lView[TVIEW], this._lView);\n    }\n    attachToAppRef(appRef) {\n        if (this._viewContainerRef) {\n            throw new Error('This view is already attached to a ViewContainer!');\n        }\n        this._appRef = appRef;\n    }\n}\n/** @internal */\nclass RootViewRef extends ViewRef {\n    constructor(_view) {\n        super(_view);\n        this._view = _view;\n    }\n    detectChanges() {\n        detectChangesInRootView(this._view);\n    }\n    checkNoChanges() {\n        checkNoChangesInRootView(this._view);\n    }\n    get context() {\n        return null;\n    }\n}\nfunction collectNativeNodes(tView, lView, tNode, result, isProjection = false) {\n    while (tNode !== null) {\n        ngDevMode && assertNodeOfPossibleTypes(tNode, [\n            3 /* Element */, 0 /* Container */, 1 /* Projection */, 4 /* ElementContainer */,\n            5 /* IcuContainer */\n        ]);\n        const lNode = lView[tNode.index];\n        if (lNode !== null) {\n            result.push(unwrapRNode(lNode));\n        }\n        // A given lNode can represent either a native node or a LContainer (when it is a host of a\n        // ViewContainerRef). When we find a LContainer we need to descend into it to collect root nodes\n        // from the views in this container.\n        if (isLContainer(lNode)) {\n            for (let i = CONTAINER_HEADER_OFFSET; i < lNode.length; i++) {\n                const lViewInAContainer = lNode[i];\n                const lViewFirstChildTNode = lViewInAContainer[TVIEW].firstChild;\n                if (lViewFirstChildTNode !== null) {\n                    collectNativeNodes(lViewInAContainer[TVIEW], lViewInAContainer, lViewFirstChildTNode, result);\n                }\n            }\n        }\n        const tNodeType = tNode.type;\n        if (tNodeType === 4 /* ElementContainer */ || tNodeType === 5 /* IcuContainer */) {\n            collectNativeNodes(tView, lView, tNode.child, result);\n        }\n        else if (tNodeType === 1 /* Projection */) {\n            const componentView = lView[DECLARATION_COMPONENT_VIEW];\n            const componentHost = componentView[T_HOST];\n            const slotIdx = tNode.projection;\n            ngDevMode &&\n                assertDefined(componentHost.projection, 'Components with projection nodes (<ng-content>) must have projection slots defined.');\n            const nodesInSlot = componentHost.projection[slotIdx];\n            if (Array.isArray(nodesInSlot)) {\n                result.push(...nodesInSlot);\n            }\n            else {\n                const parentView = getLViewParent(componentView);\n                ngDevMode &&\n                    assertDefined(parentView, 'Component views should always have a parent view (component\\'s host view)');\n                collectNativeNodes(parentView[TVIEW], parentView, nodesInSlot, result, true);\n            }\n        }\n        tNode = isProjection ? tNode.projectionNext : tNode.next;\n    }\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Creates an ElementRef from the most recent node.\n *\n * @returns The ElementRef instance to use\n */\nfunction injectElementRef(ElementRefToken) {\n    return createElementRef(ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\nlet R3ElementRef;\n/**\n * Creates an ElementRef given a node.\n *\n * @param ElementRefToken The ElementRef type\n * @param tNode The node for which you'd like an ElementRef\n * @param view The view to which the node belongs\n * @returns The ElementRef instance to use\n */\nfunction createElementRef(ElementRefToken, tNode, view) {\n    if (!R3ElementRef) {\n        R3ElementRef = class ElementRef extends ElementRefToken {\n        };\n    }\n    return new R3ElementRef(getNativeByTNode(tNode, view));\n}\nlet R3TemplateRef;\n/**\n * Creates a TemplateRef given a node.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef(TemplateRefToken, ElementRefToken) {\n    return createTemplateRef(TemplateRefToken, ElementRefToken, getPreviousOrParentTNode(), getLView());\n}\n/**\n * Creates a TemplateRef and stores it on the injector.\n *\n * @param TemplateRefToken The TemplateRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node on which a TemplateRef is requested\n * @param hostView The view to which the node belongs\n * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type\n */\nfunction createTemplateRef(TemplateRefToken, ElementRefToken, hostTNode, hostView) {\n    if (!R3TemplateRef) {\n        R3TemplateRef = class TemplateRef extends TemplateRefToken {\n            constructor(_declarationView, _declarationTContainer, elementRef) {\n                super();\n                this._declarationView = _declarationView;\n                this._declarationTContainer = _declarationTContainer;\n                this.elementRef = elementRef;\n            }\n            createEmbeddedView(context) {\n                const embeddedTView = this._declarationTContainer.tViews;\n                const embeddedLView = createLView(this._declarationView, embeddedTView, context, 16 /* CheckAlways */, null, embeddedTView.node);\n                const declarationLContainer = this._declarationView[this._declarationTContainer.index];\n                ngDevMode && assertLContainer(declarationLContainer);\n                embeddedLView[DECLARATION_LCONTAINER] = declarationLContainer;\n                const declarationViewLQueries = this._declarationView[QUERIES];\n                if (declarationViewLQueries !== null) {\n                    embeddedLView[QUERIES] = declarationViewLQueries.createEmbeddedView(embeddedTView);\n                }\n                renderView(embeddedTView, embeddedLView, context);\n                return new ViewRef(embeddedLView);\n            }\n        };\n    }\n    if (hostTNode.type === 0 /* Container */) {\n        ngDevMode && assertDefined(hostTNode.tViews, 'TView must be allocated');\n        return new R3TemplateRef(hostView, hostTNode, createElementRef(ElementRefToken, hostTNode, hostView));\n    }\n    else {\n        return null;\n    }\n}\nlet R3ViewContainerRef;\n/**\n * Creates a ViewContainerRef and stores it on the injector. Or, if the ViewContainerRef\n * already exists, retrieves the existing ViewContainerRef.\n *\n * @returns The ViewContainerRef instance to use\n */\nfunction injectViewContainerRef(ViewContainerRefToken, ElementRefToken) {\n    const previousTNode = getPreviousOrParentTNode();\n    return createContainerRef(ViewContainerRefToken, ElementRefToken, previousTNode, getLView());\n}\n/**\n * Creates a ViewContainerRef and stores it on the injector.\n *\n * @param ViewContainerRefToken The ViewContainerRef type\n * @param ElementRefToken The ElementRef type\n * @param hostTNode The node that is requesting a ViewContainerRef\n * @param hostView The view to which the node belongs\n * @returns The ViewContainerRef instance to use\n */\nfunction createContainerRef(ViewContainerRefToken, ElementRefToken, hostTNode, hostView) {\n    if (!R3ViewContainerRef) {\n        R3ViewContainerRef = class ViewContainerRef extends ViewContainerRefToken {\n            constructor(_lContainer, _hostTNode, _hostView) {\n                super();\n                this._lContainer = _lContainer;\n                this._hostTNode = _hostTNode;\n                this._hostView = _hostView;\n            }\n            get element() {\n                return createElementRef(ElementRefToken, this._hostTNode, this._hostView);\n            }\n            get injector() {\n                return new NodeInjector(this._hostTNode, this._hostView);\n            }\n            /** @deprecated No replacement */\n            get parentInjector() {\n                const parentLocation = getParentInjectorLocation(this._hostTNode, this._hostView);\n                const parentView = getParentInjectorView(parentLocation, this._hostView);\n                const parentTNode = getParentInjectorTNode(parentLocation, this._hostView, this._hostTNode);\n                return !hasParentInjector(parentLocation) || parentTNode == null ?\n                    new NodeInjector(null, this._hostView) :\n                    new NodeInjector(parentTNode, parentView);\n            }\n            clear() {\n                while (this.length > 0) {\n                    this.remove(this.length - 1);\n                }\n            }\n            get(index) {\n                return this._lContainer[VIEW_REFS] !== null && this._lContainer[VIEW_REFS][index] || null;\n            }\n            get length() {\n                return this._lContainer.length - CONTAINER_HEADER_OFFSET;\n            }\n            createEmbeddedView(templateRef, context, index) {\n                const viewRef = templateRef.createEmbeddedView(context || {});\n                this.insert(viewRef, index);\n                return viewRef;\n            }\n            createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n                const contextInjector = injector || this.parentInjector;\n                if (!ngModuleRef && componentFactory.ngModule == null && contextInjector) {\n                    // DO NOT REFACTOR. The code here used to have a `value || undefined` expression\n                    // which seems to cause internal google apps to fail. This is documented in the\n                    // following internal bug issue: go/b/142967802\n                    const result = contextInjector.get(NgModuleRef, null);\n                    if (result) {\n                        ngModuleRef = result;\n                    }\n                }\n                const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n                this.insert(componentRef.hostView, index);\n                return componentRef;\n            }\n            insert(viewRef, index) {\n                const lView = viewRef._lView;\n                const tView = lView[TVIEW];\n                if (viewRef.destroyed) {\n                    throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n                }\n                this.allocateContainerIfNeeded();\n                if (viewAttachedToContainer(lView)) {\n                    // If view is already attached, detach it first so we clean up references appropriately.\n                    const prevIdx = this.indexOf(viewRef);\n                    // A view might be attached either to this or a different container. The `prevIdx` for\n                    // those cases will be:\n                    // equal to -1 for views attached to this ViewContainerRef\n                    // >= 0 for views attached to a different ViewContainerRef\n                    if (prevIdx !== -1) {\n                        this.detach(prevIdx);\n                    }\n                    else {\n                        const prevLContainer = lView[PARENT];\n                        ngDevMode &&\n                            assertEqual(isLContainer(prevLContainer), true, 'An attached view should have its PARENT point to a container.');\n                        // We need to re-create a R3ViewContainerRef instance since those are not stored on\n                        // LView (nor anywhere else).\n                        const prevVCRef = new R3ViewContainerRef(prevLContainer, prevLContainer[T_HOST], prevLContainer[PARENT]);\n                        prevVCRef.detach(prevVCRef.indexOf(viewRef));\n                    }\n                }\n                const adjustedIdx = this._adjustIndex(index);\n                insertView(tView, lView, this._lContainer, adjustedIdx);\n                const beforeNode = getBeforeNodeForView(adjustedIdx, this._lContainer);\n                addRemoveViewFromContainer(tView, lView, true, beforeNode);\n                viewRef.attachToViewContainerRef(this);\n                addToArray(this._lContainer[VIEW_REFS], adjustedIdx, viewRef);\n                return viewRef;\n            }\n            move(viewRef, newIndex) {\n                if (viewRef.destroyed) {\n                    throw new Error('Cannot move a destroyed View in a ViewContainer!');\n                }\n                return this.insert(viewRef, newIndex);\n            }\n            indexOf(viewRef) {\n                const viewRefsArr = this._lContainer[VIEW_REFS];\n                return viewRefsArr !== null ? viewRefsArr.indexOf(viewRef) : -1;\n            }\n            remove(index) {\n                this.allocateContainerIfNeeded();\n                const adjustedIdx = this._adjustIndex(index, -1);\n                const detachedView = detachView(this._lContainer, adjustedIdx);\n                if (detachedView) {\n                    // Before destroying the view, remove it from the container's array of `ViewRef`s.\n                    // This ensures the view container length is updated before calling\n                    // `destroyLView`, which could recursively call view container methods that\n                    // rely on an accurate container length.\n                    // (e.g. a method on this view container being called by a child directive's OnDestroy\n                    // lifecycle hook)\n                    removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx);\n                    destroyLView(detachedView[TVIEW], detachedView);\n                }\n            }\n            detach(index) {\n                this.allocateContainerIfNeeded();\n                const adjustedIdx = this._adjustIndex(index, -1);\n                const view = detachView(this._lContainer, adjustedIdx);\n                const wasDetached = view && removeFromArray(this._lContainer[VIEW_REFS], adjustedIdx) != null;\n                return wasDetached ? new ViewRef(view) : null;\n            }\n            _adjustIndex(index, shift = 0) {\n                if (index == null) {\n                    return this.length + shift;\n                }\n                if (ngDevMode) {\n                    assertGreaterThan(index, -1, `ViewRef index must be positive, got ${index}`);\n                    // +1 because it's legal to insert at the end.\n                    assertLessThan(index, this.length + 1 + shift, 'index');\n                }\n                return index;\n            }\n            allocateContainerIfNeeded() {\n                if (this._lContainer[VIEW_REFS] === null) {\n                    this._lContainer[VIEW_REFS] = [];\n                }\n            }\n        };\n    }\n    ngDevMode &&\n        assertNodeOfPossibleTypes(hostTNode, [0 /* Container */, 3 /* Element */, 4 /* ElementContainer */]);\n    let lContainer;\n    const slotValue = hostView[hostTNode.index];\n    if (isLContainer(slotValue)) {\n        // If the host is a container, we don't need to create a new LContainer\n        lContainer = slotValue;\n    }\n    else {\n        let commentNode;\n        // If the host is an element container, the native host element is guaranteed to be a\n        // comment and we can reuse that comment as anchor element for the new LContainer.\n        // The comment node in question is already part of the DOM structure so we don't need to append\n        // it again.\n        if (hostTNode.type === 4 /* ElementContainer */) {\n            commentNode = unwrapRNode(slotValue);\n        }\n        else {\n            ngDevMode && ngDevMode.rendererCreateComment++;\n            commentNode = hostView[RENDERER].createComment(ngDevMode ? 'container' : '');\n            // A `ViewContainerRef` can be injected by the root (topmost / bootstrapped) component. In\n            // this case we can't use TView / TNode data structures to insert container's marker node\n            // (both a parent of a comment node and the comment node itself are not part of any view). In\n            // this specific case we use low-level DOM manipulation to insert container's marker (comment)\n            // node.\n            if (isRootView(hostView)) {\n                const renderer = hostView[RENDERER];\n                const hostNative = getNativeByTNode(hostTNode, hostView);\n                const parentOfHostNative = nativeParentNode(renderer, hostNative);\n                nativeInsertBefore(renderer, parentOfHostNative, commentNode, nativeNextSibling(renderer, hostNative));\n            }\n            else {\n                appendChild(hostView[TVIEW], hostView, commentNode, hostTNode);\n            }\n        }\n        hostView[hostTNode.index] = lContainer =\n            createLContainer(slotValue, hostView, commentNode, hostTNode);\n        addToViewTree(hostView, lContainer);\n    }\n    return new R3ViewContainerRef(lContainer, hostTNode, hostView);\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef(isPipe = false) {\n    return createViewRef(getPreviousOrParentTNode(), getLView(), isPipe);\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n *\n * @param tNode The node that is requesting a ChangeDetectorRef\n * @param lView The view to which the node belongs\n * @param isPipe Whether the view is being injected into a pipe.\n * @returns The ChangeDetectorRef to use\n */\nfunction createViewRef(tNode, lView, isPipe) {\n    // `isComponentView` will be true for Component and Directives (but not for Pipes).\n    // See https://github.com/angular/angular/pull/33072 for proper fix\n    const isComponentView = !isPipe && isComponentHost(tNode);\n    if (isComponentView) {\n        // The LView represents the location where the component is declared.\n        // Instead we want the LView for the component View and so we need to look it up.\n        const componentView = getComponentLViewByIndex(tNode.index, lView); // look down\n        return new ViewRef(componentView, componentView);\n    }\n    else if (tNode.type === 3 /* Element */ || tNode.type === 0 /* Container */ ||\n        tNode.type === 4 /* ElementContainer */ || tNode.type === 5 /* IcuContainer */) {\n        // The LView represents the location where the injection is requested from.\n        // We need to locate the containing LView (in case where the `lView` is an embedded view)\n        const hostComponentView = lView[DECLARATION_COMPONENT_VIEW]; // look up\n        return new ViewRef(hostComponentView, lView);\n    }\n    return null;\n}\n/** Returns a Renderer2 (or throws when application was bootstrapped with Renderer3) */\nfunction getOrCreateRenderer2(view) {\n    const renderer = view[RENDERER];\n    if (isProceduralRenderer(renderer)) {\n        return renderer;\n    }\n    else {\n        throw new Error('Cannot inject Renderer2 when the application uses Renderer3!');\n    }\n}\n/** Injects a Renderer2 for the current component. */\nfunction injectRenderer2() {\n    // We need the Renderer to be based on the component that it's being injected into, however since\n    // DI happens before we've entered its view, `getLView` will return the parent view instead.\n    const lView = getLView();\n    const tNode = getPreviousOrParentTNode();\n    const nodeAtIndex = getComponentLViewByIndex(tNode.index, lView);\n    return getOrCreateRenderer2(isLView(nodeAtIndex) ? nodeAtIndex : lView);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Base class that provides change detection functionality.\n * A change-detection tree collects all views that are to be checked for changes.\n * Use the methods to add and remove views from the tree, initiate change-detection,\n * and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.\n *\n * @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)\n * @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)\n *\n * @usageNotes\n *\n * The following examples demonstrate how to modify default change-detection behavior\n * to perform explicit detection when needed.\n *\n * ### Use `markForCheck()` with `CheckOnce` strategy\n *\n * The following example sets the `OnPush` change-detection strategy for a component\n * (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check\n * after an interval. See [live demo](http://plnkr.co/edit/GC512b?p=preview).\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\"\n * region=\"mark-for-check\"></code-example>\n *\n * ### Detach change detector to limit how often check occurs\n *\n * The following example defines a component with a large list of read-only data\n * that is expected to change constantly, many times per second.\n * To improve performance, we want to check and update the list\n * less often than the changes actually occur. To do that, we detach\n * the component's change detector and perform an explicit local check every five seconds.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"detach\"></code-example>\n *\n *\n * ### Reattaching a detached component\n *\n * The following example creates a component displaying live data.\n * The component detaches its change detector from the main change detector tree\n * when the `live` property is set to false, and reattaches it when the property\n * becomes true.\n *\n * <code-example path=\"core/ts/change_detect/change-detection.ts\" region=\"reattach\"></code-example>\n *\n * @publicApi\n */\nclass ChangeDetectorRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nChangeDetectorRef.__NG_ELEMENT_ID__ = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ = injectChangeDetectorRef;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__ = (...args) => { };\nconst ɵ0$5 = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\nconst SWITCH_CHANGE_DETECTOR_REF_FACTORY = SWITCH_CHANGE_DETECTOR_REF_FACTORY__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description\n *\n * Represents a type that a Component or other object is instances of.\n *\n * An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by\n * the `MyCustomComponent` constructor function.\n *\n * @publicApi\n */\nconst Type = Function;\nfunction isType(v) {\n    return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/*\n * #########################\n * Attention: These Regular expressions have to hold even if the code is minified!\n * ##########################\n */\n/**\n * Regular expression that detects pass-through constructors for ES5 output. This Regex\n * intends to capture the common delegation pattern emitted by TypeScript and Babel. Also\n * it intends to capture the pattern where existing constructors have been downleveled from\n * ES2015 to ES5 using TypeScript w/ downlevel iteration. e.g.\n *\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, arguments) || this;\n * ```\n *\n * ```\n *   function MyClass() {\n *     var _this = _super.apply(this, __spread(arguments)) || this;\n * ```\n *\n * More details can be found in: https://github.com/angular/angular/issues/38453.\n */\nconst ES5_DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*(arguments|[^()]+\\(arguments\\))\\)/;\n/** Regular expression that detects ES2015 classes which extend from other classes. */\nconst ES2015_INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes and\n * have an explicit constructor defined.\n */\nconst ES2015_INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(/;\n/**\n * Regular expression that detects ES2015 classes which extend from other classes\n * and inherit a constructor.\n */\nconst ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[^{]+{[\\s\\S]*constructor\\s*\\(\\)\\s*{\\s*super\\(\\.\\.\\.arguments\\)/;\n/**\n * Determine whether a stringified type is a class which delegates its constructor\n * to its parent.\n *\n * This is not trivial since compiled code can actually contain a constructor function\n * even if the original source code did not. For instance, when the child class contains\n * an initialized instance property.\n */\nfunction isDelegateCtor(typeStr) {\n    return ES5_DELEGATE_CTOR.test(typeStr) ||\n        ES2015_INHERITED_CLASS_WITH_DELEGATE_CTOR.test(typeStr) ||\n        (ES2015_INHERITED_CLASS.test(typeStr) && !ES2015_INHERITED_CLASS_WITH_CTOR.test(typeStr));\n}\nclass ReflectionCapabilities {\n    constructor(reflect) {\n        this._reflect = reflect || _global['Reflect'];\n    }\n    isReflectionEnabled() {\n        return true;\n    }\n    factory(t) {\n        return (...args) => new t(...args);\n    }\n    /** @internal */\n    _zipTypesAndAnnotations(paramTypes, paramAnnotations) {\n        let result;\n        if (typeof paramTypes === 'undefined') {\n            result = newArray(paramAnnotations.length);\n        }\n        else {\n            result = newArray(paramTypes.length);\n        }\n        for (let i = 0; i < result.length; i++) {\n            // TS outputs Object for parameters without types, while Traceur omits\n            // the annotations. For now we preserve the Traceur behavior to aid\n            // migration, but this can be revisited.\n            if (typeof paramTypes === 'undefined') {\n                result[i] = [];\n            }\n            else if (paramTypes[i] && paramTypes[i] != Object) {\n                result[i] = [paramTypes[i]];\n            }\n            else {\n                result[i] = [];\n            }\n            if (paramAnnotations && paramAnnotations[i] != null) {\n                result[i] = result[i].concat(paramAnnotations[i]);\n            }\n        }\n        return result;\n    }\n    _ownParameters(type, parentCtor) {\n        const typeStr = type.toString();\n        // If we have no decorators, we only have function.length as metadata.\n        // In that case, to detect whether a child class declared an own constructor or not,\n        // we need to look inside of that constructor to check whether it is\n        // just calling the parent.\n        // This also helps to work around for https://github.com/Microsoft/TypeScript/issues/12439\n        // that sets 'design:paramtypes' to []\n        // if a class inherits from another class but has no ctor declared itself.\n        if (isDelegateCtor(typeStr)) {\n            return null;\n        }\n        // Prefer the direct API.\n        if (type.parameters && type.parameters !== parentCtor.parameters) {\n            return type.parameters;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        const tsickleCtorParams = type.ctorParameters;\n        if (tsickleCtorParams && tsickleCtorParams !== parentCtor.ctorParameters) {\n            // Newer tsickle uses a function closure\n            // Retain the non-function case for compatibility with older tsickle\n            const ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n            const paramTypes = ctorParameters.map((ctorParam) => ctorParam && ctorParam.type);\n            const paramAnnotations = ctorParameters.map((ctorParam) => ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators));\n            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n        }\n        // API for metadata created by invoking the decorators.\n        const paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n        const paramTypes = this._reflect && this._reflect.getOwnMetadata &&\n            this._reflect.getOwnMetadata('design:paramtypes', type);\n        if (paramTypes || paramAnnotations) {\n            return this._zipTypesAndAnnotations(paramTypes, paramAnnotations);\n        }\n        // If a class has no decorators, at least create metadata\n        // based on function.length.\n        // Note: We know that this is a real constructor as we checked\n        // the content of the constructor above.\n        return newArray(type.length);\n    }\n    parameters(type) {\n        // Note: only report metadata if we have at least one class decorator\n        // to stay in sync with the static reflector.\n        if (!isType(type)) {\n            return [];\n        }\n        const parentCtor = getParentCtor(type);\n        let parameters = this._ownParameters(type, parentCtor);\n        if (!parameters && parentCtor !== Object) {\n            parameters = this.parameters(parentCtor);\n        }\n        return parameters || [];\n    }\n    _ownAnnotations(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n            let annotations = typeOrFunc.annotations;\n            if (typeof annotations === 'function' && annotations.annotations) {\n                annotations = annotations.annotations;\n            }\n            return annotations;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        if (typeOrFunc.decorators && typeOrFunc.decorators !== parentCtor.decorators) {\n            return convertTsickleDecoratorIntoMetadata(typeOrFunc.decorators);\n        }\n        // API for metadata created by invoking the decorators.\n        if (typeOrFunc.hasOwnProperty(ANNOTATIONS)) {\n            return typeOrFunc[ANNOTATIONS];\n        }\n        return null;\n    }\n    annotations(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return [];\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n        const parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n        return parentAnnotations.concat(ownAnnotations);\n    }\n    _ownPropMetadata(typeOrFunc, parentCtor) {\n        // Prefer the direct API.\n        if (typeOrFunc.propMetadata &&\n            typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n            let propMetadata = typeOrFunc.propMetadata;\n            if (typeof propMetadata === 'function' && propMetadata.propMetadata) {\n                propMetadata = propMetadata.propMetadata;\n            }\n            return propMetadata;\n        }\n        // API of tsickle for lowering decorators to properties on the class.\n        if (typeOrFunc.propDecorators &&\n            typeOrFunc.propDecorators !== parentCtor.propDecorators) {\n            const propDecorators = typeOrFunc.propDecorators;\n            const propMetadata = {};\n            Object.keys(propDecorators).forEach(prop => {\n                propMetadata[prop] = convertTsickleDecoratorIntoMetadata(propDecorators[prop]);\n            });\n            return propMetadata;\n        }\n        // API for metadata created by invoking the decorators.\n        if (typeOrFunc.hasOwnProperty(PROP_METADATA)) {\n            return typeOrFunc[PROP_METADATA];\n        }\n        return null;\n    }\n    propMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        const parentCtor = getParentCtor(typeOrFunc);\n        const propMetadata = {};\n        if (parentCtor !== Object) {\n            const parentPropMetadata = this.propMetadata(parentCtor);\n            Object.keys(parentPropMetadata).forEach((propName) => {\n                propMetadata[propName] = parentPropMetadata[propName];\n            });\n        }\n        const ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n        if (ownPropMetadata) {\n            Object.keys(ownPropMetadata).forEach((propName) => {\n                const decorators = [];\n                if (propMetadata.hasOwnProperty(propName)) {\n                    decorators.push(...propMetadata[propName]);\n                }\n                decorators.push(...ownPropMetadata[propName]);\n                propMetadata[propName] = decorators;\n            });\n        }\n        return propMetadata;\n    }\n    ownPropMetadata(typeOrFunc) {\n        if (!isType(typeOrFunc)) {\n            return {};\n        }\n        return this._ownPropMetadata(typeOrFunc, getParentCtor(typeOrFunc)) || {};\n    }\n    hasLifecycleHook(type, lcProperty) {\n        return type instanceof Type && lcProperty in type.prototype;\n    }\n    guards(type) {\n        return {};\n    }\n    getter(name) {\n        return new Function('o', 'return o.' + name + ';');\n    }\n    setter(name) {\n        return new Function('o', 'v', 'return o.' + name + ' = v;');\n    }\n    method(name) {\n        const functionBody = `if (!o.${name}) throw new Error('\"${name}\" is undefined');\n        return o.${name}.apply(o, args);`;\n        return new Function('o', 'args', functionBody);\n    }\n    // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n    importUri(type) {\n        // StaticSymbol\n        if (typeof type === 'object' && type['filePath']) {\n            return type['filePath'];\n        }\n        // Runtime type\n        return `./${stringify(type)}`;\n    }\n    resourceUri(type) {\n        return `./${stringify(type)}`;\n    }\n    resolveIdentifier(name, moduleUrl, members, runtime) {\n        return runtime;\n    }\n    resolveEnum(enumIdentifier, name) {\n        return enumIdentifier[name];\n    }\n}\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n    if (!decoratorInvocations) {\n        return [];\n    }\n    return decoratorInvocations.map(decoratorInvocation => {\n        const decoratorType = decoratorInvocation.type;\n        const annotationCls = decoratorType.annotationCls;\n        const annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n        return new annotationCls(...annotationArgs);\n    });\n}\nfunction getParentCtor(ctor) {\n    const parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n    const parentCtor = parentProto ? parentProto.constructor : null;\n    // Note: We always use `Object` as the null value\n    // to simplify checking later on.\n    return parentCtor || Object;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _reflect = null;\nfunction getReflect() {\n    return (_reflect = _reflect || new ReflectionCapabilities());\n}\nfunction reflectDependencies(type) {\n    return convertDependencies(getReflect().parameters(type));\n}\nfunction convertDependencies(deps) {\n    const compiler = getCompilerFacade();\n    return deps.map(dep => reflectDependency(compiler, dep));\n}\nfunction reflectDependency(compiler, dep) {\n    const meta = {\n        token: null,\n        host: false,\n        optional: false,\n        resolved: compiler.R3ResolvedDependencyType.Token,\n        self: false,\n        skipSelf: false,\n    };\n    function setTokenAndResolvedType(token) {\n        meta.resolved = compiler.R3ResolvedDependencyType.Token;\n        meta.token = token;\n    }\n    if (Array.isArray(dep) && dep.length > 0) {\n        for (let j = 0; j < dep.length; j++) {\n            const param = dep[j];\n            if (param === undefined) {\n                // param may be undefined if type of dep is not set by ngtsc\n                continue;\n            }\n            const proto = Object.getPrototypeOf(param);\n            if (param instanceof Optional || proto.ngMetadataName === 'Optional') {\n                meta.optional = true;\n            }\n            else if (param instanceof SkipSelf || proto.ngMetadataName === 'SkipSelf') {\n                meta.skipSelf = true;\n            }\n            else if (param instanceof Self || proto.ngMetadataName === 'Self') {\n                meta.self = true;\n            }\n            else if (param instanceof Host || proto.ngMetadataName === 'Host') {\n                meta.host = true;\n            }\n            else if (param instanceof Inject) {\n                meta.token = param.token;\n            }\n            else if (param instanceof Attribute) {\n                if (param.attributeName === undefined) {\n                    throw new Error(`Attribute name must be defined.`);\n                }\n                meta.token = param.attributeName;\n                meta.resolved = compiler.R3ResolvedDependencyType.Attribute;\n            }\n            else if (param === ChangeDetectorRef) {\n                meta.token = param;\n                meta.resolved = compiler.R3ResolvedDependencyType.ChangeDetectorRef;\n            }\n            else {\n                setTokenAndResolvedType(param);\n            }\n        }\n    }\n    else if (dep === undefined || (Array.isArray(dep) && dep.length === 0)) {\n        meta.token = undefined;\n        meta.resolved = R3ResolvedDependencyType.Invalid;\n    }\n    else {\n        setTokenAndResolvedType(dep);\n    }\n    return meta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compile an Angular injectable according to its `Injectable` metadata, and patch the resulting\n * injectable def (`ɵprov`) onto the injectable type.\n */\nfunction compileInjectable(type, srcMeta) {\n    let ngInjectableDef = null;\n    let ngFactoryDef = null;\n    // if NG_PROV_DEF is already defined on this class then don't overwrite it\n    if (!type.hasOwnProperty(NG_PROV_DEF)) {\n        Object.defineProperty(type, NG_PROV_DEF, {\n            get: () => {\n                if (ngInjectableDef === null) {\n                    ngInjectableDef = getCompilerFacade().compileInjectable(angularCoreDiEnv, `ng:///${type.name}/ɵprov.js`, getInjectableMetadata(type, srcMeta));\n                }\n                return ngInjectableDef;\n            },\n        });\n        // On IE10 properties defined via `defineProperty` won't be inherited by child classes,\n        // which will break inheriting the injectable definition from a grandparent through an\n        // undecorated parent class. We work around it by defining a method which should be used\n        // as a fallback. This should only be a problem in JIT mode, because in AOT TypeScript\n        // seems to have a workaround for static properties. When inheriting from an undecorated\n        // parent is no longer supported (v11 or later), this can safely be removed.\n        if (!type.hasOwnProperty(NG_PROV_DEF_FALLBACK)) {\n            type[NG_PROV_DEF_FALLBACK] = () => type[NG_PROV_DEF];\n        }\n    }\n    // if NG_FACTORY_DEF is already defined on this class then don't overwrite it\n    if (!type.hasOwnProperty(NG_FACTORY_DEF)) {\n        Object.defineProperty(type, NG_FACTORY_DEF, {\n            get: () => {\n                if (ngFactoryDef === null) {\n                    const metadata = getInjectableMetadata(type, srcMeta);\n                    const compiler = getCompilerFacade();\n                    ngFactoryDef = compiler.compileFactory(angularCoreDiEnv, `ng:///${type.name}/ɵfac.js`, {\n                        name: metadata.name,\n                        type: metadata.type,\n                        typeArgumentCount: metadata.typeArgumentCount,\n                        deps: reflectDependencies(type),\n                        injectFn: 'inject',\n                        target: compiler.R3FactoryTarget.Injectable\n                    });\n                }\n                return ngFactoryDef;\n            },\n            // Leave this configurable so that the factories from directives or pipes can take precedence.\n            configurable: true\n        });\n    }\n}\nconst ɵ0$6 = getClosureSafeProperty;\nconst USE_VALUE$1 = getClosureSafeProperty({ provide: String, useValue: ɵ0$6 });\nfunction isUseClassProvider(meta) {\n    return meta.useClass !== undefined;\n}\nfunction isUseValueProvider(meta) {\n    return USE_VALUE$1 in meta;\n}\nfunction isUseFactoryProvider(meta) {\n    return meta.useFactory !== undefined;\n}\nfunction isUseExistingProvider(meta) {\n    return meta.useExisting !== undefined;\n}\nfunction getInjectableMetadata(type, srcMeta) {\n    // Allow the compilation of a class with a `@Injectable()` decorator without parameters\n    const meta = srcMeta || { providedIn: null };\n    const compilerMeta = {\n        name: type.name,\n        type: type,\n        typeArgumentCount: 0,\n        providedIn: meta.providedIn,\n        userDeps: undefined,\n    };\n    if ((isUseClassProvider(meta) || isUseFactoryProvider(meta)) && meta.deps !== undefined) {\n        compilerMeta.userDeps = convertDependencies(meta.deps);\n    }\n    if (isUseClassProvider(meta)) {\n        // The user explicitly specified useClass, and may or may not have provided deps.\n        compilerMeta.useClass = resolveForwardRef(meta.useClass);\n    }\n    else if (isUseValueProvider(meta)) {\n        // The user explicitly specified useValue.\n        compilerMeta.useValue = resolveForwardRef(meta.useValue);\n    }\n    else if (isUseFactoryProvider(meta)) {\n        // The user explicitly specified useFactory.\n        compilerMeta.useFactory = meta.useFactory;\n    }\n    else if (isUseExistingProvider(meta)) {\n        // The user explicitly specified useExisting.\n        compilerMeta.useExisting = resolveForwardRef(meta.useExisting);\n    }\n    return compilerMeta;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$7 = getClosureSafeProperty;\nconst USE_VALUE$2 = getClosureSafeProperty({ provide: String, useValue: ɵ0$7 });\nconst EMPTY_ARRAY$1 = [];\nfunction convertInjectableProviderToFactory(type, provider) {\n    if (!provider) {\n        const reflectionCapabilities = new ReflectionCapabilities();\n        const deps = reflectionCapabilities.parameters(type);\n        // TODO - convert to flags.\n        return () => new type(...injectArgs(deps));\n    }\n    if (USE_VALUE$2 in provider) {\n        const valueProvider = provider;\n        return () => valueProvider.useValue;\n    }\n    else if (provider.useExisting) {\n        const existingProvider = provider;\n        return () => ɵɵinject(resolveForwardRef(existingProvider.useExisting));\n    }\n    else if (provider.useFactory) {\n        const factoryProvider = provider;\n        return () => factoryProvider.useFactory(...injectArgs(factoryProvider.deps || EMPTY_ARRAY$1));\n    }\n    else if (provider.useClass) {\n        const classProvider = provider;\n        let deps = provider.deps;\n        if (!deps) {\n            const reflectionCapabilities = new ReflectionCapabilities();\n            deps = reflectionCapabilities.parameters(type);\n        }\n        return () => new (resolveForwardRef(classProvider.useClass))(...injectArgs(deps));\n    }\n    else {\n        let deps = provider.deps;\n        if (!deps) {\n            const reflectionCapabilities = new ReflectionCapabilities();\n            deps = reflectionCapabilities.parameters(type);\n        }\n        return () => new type(...injectArgs(deps));\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$8 = (type, meta) => SWITCH_COMPILE_INJECTABLE(type, meta);\n/**\n * Injectable decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Injectable = makeDecorator('Injectable', undefined, undefined, undefined, ɵ0$8);\n/**\n * Supports @Injectable() in JIT mode for Render2.\n */\nfunction render2CompileInjectable(injectableType, options) {\n    if (options && options.providedIn !== undefined && !getInjectableDef(injectableType)) {\n        injectableType.ɵprov = ɵɵdefineInjectable({\n            token: injectableType,\n            providedIn: options.providedIn,\n            factory: convertInjectableProviderToFactory(injectableType, options),\n        });\n    }\n}\nconst SWITCH_COMPILE_INJECTABLE__POST_R3__ = compileInjectable;\nconst SWITCH_COMPILE_INJECTABLE__PRE_R3__ = render2CompileInjectable;\nconst SWITCH_COMPILE_INJECTABLE = SWITCH_COMPILE_INJECTABLE__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An internal token whose presence in an injector indicates that the injector should treat itself\n * as a root scoped injector when processing requests for unknown tokens which may indicate\n * they are provided in the root scope.\n */\nconst INJECTOR_SCOPE = new InjectionToken('Set Injector scope.');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marker which indicates that a value has not yet been created from the factory function.\n */\nconst NOT_YET = {};\n/**\n * Marker which indicates that the factory function for a token is in the process of being called.\n *\n * If the injector is asked to inject a token with its value set to CIRCULAR, that indicates\n * injection of a dependency has recursively attempted to inject the original token, and there is\n * a circular dependency among the providers.\n */\nconst CIRCULAR = {};\nconst EMPTY_ARRAY$2 = [];\n/**\n * A lazily initialized NullInjector.\n */\nlet NULL_INJECTOR = undefined;\nfunction getNullInjector() {\n    if (NULL_INJECTOR === undefined) {\n        NULL_INJECTOR = new NullInjector();\n    }\n    return NULL_INJECTOR;\n}\n/**\n * Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.\n *\n * @publicApi\n */\nfunction createInjector(defType, parent = null, additionalProviders = null, name) {\n    const injector = createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);\n    injector._resolveInjectorDefTypes();\n    return injector;\n}\n/**\n * Creates a new injector without eagerly resolving its injector types. Can be used in places\n * where resolving the injector types immediately can lead to an infinite loop. The injector types\n * should be resolved at a later point by calling `_resolveInjectorDefTypes`.\n */\nfunction createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) {\n    return new R3Injector(defType, additionalProviders, parent || getNullInjector(), name);\n}\nclass R3Injector {\n    constructor(def, additionalProviders, parent, source = null) {\n        this.parent = parent;\n        /**\n         * Map of tokens to records which contain the instances of those tokens.\n         * - `null` value implies that we don't have the record. Used by tree-shakable injectors\n         * to prevent further searches.\n         */\n        this.records = new Map();\n        /**\n         * The transitive set of `InjectorType`s which define this injector.\n         */\n        this.injectorDefTypes = new Set();\n        /**\n         * Set of values instantiated by this injector which contain `ngOnDestroy` lifecycle hooks.\n         */\n        this.onDestroy = new Set();\n        this._destroyed = false;\n        const dedupStack = [];\n        // Start off by creating Records for every provider declared in every InjectorType\n        // included transitively in additional providers then do the same for `def`. This order is\n        // important because `def` may include providers that override ones in additionalProviders.\n        additionalProviders &&\n            deepForEach(additionalProviders, provider => this.processProvider(provider, def, additionalProviders));\n        deepForEach([def], injectorDef => this.processInjectorType(injectorDef, [], dedupStack));\n        // Make sure the INJECTOR token provides this injector.\n        this.records.set(INJECTOR, makeRecord(undefined, this));\n        // Detect whether this injector has the APP_ROOT_SCOPE token and thus should provide\n        // any injectable scoped to APP_ROOT_SCOPE.\n        const record = this.records.get(INJECTOR_SCOPE);\n        this.scope = record != null ? record.value : null;\n        // Source name, used for debugging\n        this.source = source || (typeof def === 'object' ? null : stringify(def));\n    }\n    /**\n     * Flag indicating that this injector was previously destroyed.\n     */\n    get destroyed() {\n        return this._destroyed;\n    }\n    /**\n     * Destroy the injector and release references to every instance or provider associated with it.\n     *\n     * Also calls the `OnDestroy` lifecycle hooks of every instance that was created for which a\n     * hook was found.\n     */\n    destroy() {\n        this.assertNotDestroyed();\n        // Set destroyed = true first, in case lifecycle hooks re-enter destroy().\n        this._destroyed = true;\n        try {\n            // Call all the lifecycle hooks.\n            this.onDestroy.forEach(service => service.ngOnDestroy());\n        }\n        finally {\n            // Release all references.\n            this.records.clear();\n            this.onDestroy.clear();\n            this.injectorDefTypes.clear();\n        }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND, flags = InjectFlags.Default) {\n        this.assertNotDestroyed();\n        // Set the injection context.\n        const previousInjector = setCurrentInjector(this);\n        try {\n            // Check for the SkipSelf flag.\n            if (!(flags & InjectFlags.SkipSelf)) {\n                // SkipSelf isn't set, check if the record belongs to this injector.\n                let record = this.records.get(token);\n                if (record === undefined) {\n                    // No record, but maybe the token is scoped to this injector. Look for an injectable\n                    // def with a scope matching this injector.\n                    const def = couldBeInjectableType(token) && getInjectableDef(token);\n                    if (def && this.injectableDefInScope(def)) {\n                        // Found an injectable def and it's scoped to this injector. Pretend as if it was here\n                        // all along.\n                        record = makeRecord(injectableDefOrInjectorDefFactory(token), NOT_YET);\n                    }\n                    else {\n                        record = null;\n                    }\n                    this.records.set(token, record);\n                }\n                // If a record was found, get the instance for it and return it.\n                if (record != null /* NOT null || undefined */) {\n                    return this.hydrate(token, record);\n                }\n            }\n            // Select the next injector based on the Self flag - if self is set, the next injector is\n            // the NullInjector, otherwise it's the parent.\n            const nextInjector = !(flags & InjectFlags.Self) ? this.parent : getNullInjector();\n            // Set the notFoundValue based on the Optional flag - if optional is set and notFoundValue\n            // is undefined, the value is null, otherwise it's the notFoundValue.\n            notFoundValue = (flags & InjectFlags.Optional) && notFoundValue === THROW_IF_NOT_FOUND ?\n                null :\n                notFoundValue;\n            return nextInjector.get(token, notFoundValue);\n        }\n        catch (e) {\n            if (e.name === 'NullInjectorError') {\n                const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n                path.unshift(stringify(token));\n                if (previousInjector) {\n                    // We still have a parent injector, keep throwing\n                    throw e;\n                }\n                else {\n                    // Format & throw the final error message when we don't have any previous injector\n                    return catchInjectorError(e, token, 'R3InjectorError', this.source);\n                }\n            }\n            else {\n                throw e;\n            }\n        }\n        finally {\n            // Lastly, clean up the state by restoring the previous injector.\n            setCurrentInjector(previousInjector);\n        }\n    }\n    /** @internal */\n    _resolveInjectorDefTypes() {\n        this.injectorDefTypes.forEach(defType => this.get(defType));\n    }\n    toString() {\n        const tokens = [], records = this.records;\n        records.forEach((v, token) => tokens.push(stringify(token)));\n        return `R3Injector[${tokens.join(', ')}]`;\n    }\n    assertNotDestroyed() {\n        if (this._destroyed) {\n            throw new Error('Injector has already been destroyed.');\n        }\n    }\n    /**\n     * Add an `InjectorType` or `InjectorTypeWithProviders` and all of its transitive providers\n     * to this injector.\n     *\n     * If an `InjectorTypeWithProviders` that declares providers besides the type is specified,\n     * the function will return \"true\" to indicate that the providers of the type definition need\n     * to be processed. This allows us to process providers of injector types after all imports of\n     * an injector definition are processed. (following View Engine semantics: see FW-1349)\n     */\n    processInjectorType(defOrWrappedDef, parents, dedupStack) {\n        defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n        if (!defOrWrappedDef)\n            return false;\n        // Either the defOrWrappedDef is an InjectorType (with injector def) or an\n        // InjectorDefTypeWithProviders (aka ModuleWithProviders). Detecting either is a megamorphic\n        // read, so care is taken to only do the read once.\n        // First attempt to read the injector def (`ɵinj`).\n        let def = getInjectorDef(defOrWrappedDef);\n        // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n        const ngModule = (def == null) && defOrWrappedDef.ngModule || undefined;\n        // Determine the InjectorType. In the case where `defOrWrappedDef` is an `InjectorType`,\n        // then this is easy. In the case of an InjectorDefTypeWithProviders, then the definition type\n        // is the `ngModule`.\n        const defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n        // Check for circular dependencies.\n        if (ngDevMode && parents.indexOf(defType) !== -1) {\n            const defName = stringify(defType);\n            throw new Error(`Circular dependency in DI detected for type ${defName}. Dependency path: ${parents.map(defType => stringify(defType)).join(' > ')} > ${defName}.`);\n        }\n        // Check for multiple imports of the same module\n        const isDuplicate = dedupStack.indexOf(defType) !== -1;\n        // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n        // `InjectorDef` is on its `ngModule`.\n        if (ngModule !== undefined) {\n            def = getInjectorDef(ngModule);\n        }\n        // If no definition was found, it might be from exports. Remove it.\n        if (def == null) {\n            return false;\n        }\n        // Add providers in the same way that @NgModule resolution did:\n        // First, include providers from any imports.\n        if (def.imports != null && !isDuplicate) {\n            // Before processing defType's imports, add it to the set of parents. This way, if it ends\n            // up deeply importing itself, this can be detected.\n            ngDevMode && parents.push(defType);\n            // Add it to the set of dedups. This way we can detect multiple imports of the same module\n            dedupStack.push(defType);\n            let importTypesWithProviders;\n            try {\n                deepForEach(def.imports, imported => {\n                    if (this.processInjectorType(imported, parents, dedupStack)) {\n                        if (importTypesWithProviders === undefined)\n                            importTypesWithProviders = [];\n                        // If the processed import is an injector type with providers, we store it in the\n                        // list of import types with providers, so that we can process those afterwards.\n                        importTypesWithProviders.push(imported);\n                    }\n                });\n            }\n            finally {\n                // Remove it from the parents set when finished.\n                ngDevMode && parents.pop();\n            }\n            // Imports which are declared with providers (TypeWithProviders) need to be processed\n            // after all imported modules are processed. This is similar to how View Engine\n            // processes/merges module imports in the metadata resolver. See: FW-1349.\n            if (importTypesWithProviders !== undefined) {\n                for (let i = 0; i < importTypesWithProviders.length; i++) {\n                    const { ngModule, providers } = importTypesWithProviders[i];\n                    deepForEach(providers, provider => this.processProvider(provider, ngModule, providers || EMPTY_ARRAY$2));\n                }\n            }\n        }\n        // Track the InjectorType and add a provider for it. It's important that this is done after the\n        // def's imports.\n        this.injectorDefTypes.add(defType);\n        this.records.set(defType, makeRecord(def.factory, NOT_YET));\n        // Next, include providers listed on the definition itself.\n        const defProviders = def.providers;\n        if (defProviders != null && !isDuplicate) {\n            const injectorType = defOrWrappedDef;\n            deepForEach(defProviders, provider => this.processProvider(provider, injectorType, defProviders));\n        }\n        return (ngModule !== undefined &&\n            defOrWrappedDef.providers !== undefined);\n    }\n    /**\n     * Process a `SingleProvider` and add it.\n     */\n    processProvider(provider, ngModuleType, providers) {\n        // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n        // property.\n        provider = resolveForwardRef(provider);\n        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider && provider.provide);\n        // Construct a `Record` for the provider.\n        const record = providerToRecord(provider, ngModuleType, providers);\n        if (!isTypeProvider(provider) && provider.multi === true) {\n            // If the provider indicates that it's a multi-provider, process it specially.\n            // First check whether it's been defined already.\n            let multiRecord = this.records.get(token);\n            if (multiRecord) {\n                // It has. Throw a nice error if\n                if (ngDevMode && multiRecord.multi === undefined) {\n                    throwMixedMultiProviderError();\n                }\n            }\n            else {\n                multiRecord = makeRecord(undefined, NOT_YET, true);\n                multiRecord.factory = () => injectArgs(multiRecord.multi);\n                this.records.set(token, multiRecord);\n            }\n            token = provider;\n            multiRecord.multi.push(provider);\n        }\n        else {\n            const existing = this.records.get(token);\n            if (ngDevMode && existing && existing.multi !== undefined) {\n                throwMixedMultiProviderError();\n            }\n        }\n        this.records.set(token, record);\n    }\n    hydrate(token, record) {\n        if (ngDevMode && record.value === CIRCULAR) {\n            throwCyclicDependencyError(stringify(token));\n        }\n        else if (record.value === NOT_YET) {\n            record.value = CIRCULAR;\n            record.value = record.factory();\n        }\n        if (typeof record.value === 'object' && record.value && hasOnDestroy(record.value)) {\n            this.onDestroy.add(record.value);\n        }\n        return record.value;\n    }\n    injectableDefInScope(def) {\n        if (!def.providedIn) {\n            return false;\n        }\n        else if (typeof def.providedIn === 'string') {\n            return def.providedIn === 'any' || (def.providedIn === this.scope);\n        }\n        else {\n            return this.injectorDefTypes.has(def.providedIn);\n        }\n    }\n}\nfunction injectableDefOrInjectorDefFactory(token) {\n    // Most tokens will have an injectable def directly on them, which specifies a factory directly.\n    const injectableDef = getInjectableDef(token);\n    const factory = injectableDef !== null ? injectableDef.factory : getFactoryDef(token);\n    if (factory !== null) {\n        return factory;\n    }\n    // If the token is an NgModule, it's also injectable but the factory is on its injector def\n    // (`ɵinj`)\n    const injectorDef = getInjectorDef(token);\n    if (injectorDef !== null) {\n        return injectorDef.factory;\n    }\n    // InjectionTokens should have an injectable def (ɵprov) and thus should be handled above.\n    // If it's missing that, it's an error.\n    if (token instanceof InjectionToken) {\n        throw new Error(`Token ${stringify(token)} is missing a ɵprov definition.`);\n    }\n    // Undecorated types can sometimes be created if they have no constructor arguments.\n    if (token instanceof Function) {\n        return getUndecoratedInjectableFactory(token);\n    }\n    // There was no way to resolve a factory for this token.\n    throw new Error('unreachable');\n}\nfunction getUndecoratedInjectableFactory(token) {\n    // If the token has parameters then it has dependencies that we cannot resolve implicitly.\n    const paramLength = token.length;\n    if (paramLength > 0) {\n        const args = newArray(paramLength, '?');\n        throw new Error(`Can't resolve all parameters for ${stringify(token)}: (${args.join(', ')}).`);\n    }\n    // The constructor function appears to have no parameters.\n    // This might be because it inherits from a super-class. In which case, use an injectable\n    // def from an ancestor if there is one.\n    // Otherwise this really is a simple class with no dependencies, so return a factory that\n    // just instantiates the zero-arg constructor.\n    const inheritedInjectableDef = getInheritedInjectableDef(token);\n    if (inheritedInjectableDef !== null) {\n        return () => inheritedInjectableDef.factory(token);\n    }\n    else {\n        return () => new token();\n    }\n}\nfunction providerToRecord(provider, ngModuleType, providers) {\n    if (isValueProvider(provider)) {\n        return makeRecord(undefined, provider.useValue);\n    }\n    else {\n        const factory = providerToFactory(provider, ngModuleType, providers);\n        return makeRecord(factory, NOT_YET);\n    }\n}\n/**\n * Converts a `SingleProvider` into a factory function.\n *\n * @param provider provider to convert to factory\n */\nfunction providerToFactory(provider, ngModuleType, providers) {\n    let factory = undefined;\n    if (isTypeProvider(provider)) {\n        const unwrappedProvider = resolveForwardRef(provider);\n        return getFactoryDef(unwrappedProvider) || injectableDefOrInjectorDefFactory(unwrappedProvider);\n    }\n    else {\n        if (isValueProvider(provider)) {\n            factory = () => resolveForwardRef(provider.useValue);\n        }\n        else if (isFactoryProvider(provider)) {\n            factory = () => provider.useFactory(...injectArgs(provider.deps || []));\n        }\n        else if (isExistingProvider(provider)) {\n            factory = () => ɵɵinject(resolveForwardRef(provider.useExisting));\n        }\n        else {\n            const classRef = resolveForwardRef(provider &&\n                (provider.useClass || provider.provide));\n            if (ngDevMode && !classRef) {\n                throwInvalidProviderError(ngModuleType, providers, provider);\n            }\n            if (hasDeps(provider)) {\n                factory = () => new (classRef)(...injectArgs(provider.deps));\n            }\n            else {\n                return getFactoryDef(classRef) || injectableDefOrInjectorDefFactory(classRef);\n            }\n        }\n    }\n    return factory;\n}\nfunction makeRecord(factory, value, multi = false) {\n    return {\n        factory: factory,\n        value: value,\n        multi: multi ? [] : undefined,\n    };\n}\nfunction isValueProvider(value) {\n    return value !== null && typeof value == 'object' && USE_VALUE in value;\n}\nfunction isExistingProvider(value) {\n    return !!(value && value.useExisting);\n}\nfunction isFactoryProvider(value) {\n    return !!(value && value.useFactory);\n}\nfunction isTypeProvider(value) {\n    return typeof value === 'function';\n}\nfunction isClassProvider(value) {\n    return !!value.useClass;\n}\nfunction hasDeps(value) {\n    return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n    return value !== null && typeof value === 'object' &&\n        typeof value.ngOnDestroy === 'function';\n}\nfunction couldBeInjectableType(value) {\n    return (typeof value === 'function') ||\n        (typeof value === 'object' && value instanceof InjectionToken);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction INJECTOR_IMPL__PRE_R3__(providers, parent, name) {\n    return new StaticInjector(providers, parent, name);\n}\nfunction INJECTOR_IMPL__POST_R3__(providers, parent, name) {\n    return createInjector({ name: name }, parent, providers, name);\n}\nconst INJECTOR_IMPL = INJECTOR_IMPL__PRE_R3__;\n/**\n * Concrete injectors implement this interface. Injectors are configured\n * with [providers](guide/glossary#provider) that associate\n * dependencies of various types with [injection tokens](guide/glossary#di-token).\n *\n * @see [\"DI Providers\"](guide/dependency-injection-providers).\n * @see `StaticProvider`\n *\n * @usageNotes\n *\n *  The following example creates a service injector instance.\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n *\n * ### Usage example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n *\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n * @publicApi\n */\nclass Injector {\n    static create(options, parent) {\n        if (Array.isArray(options)) {\n            return INJECTOR_IMPL(options, parent, '');\n        }\n        else {\n            return INJECTOR_IMPL(options.providers, options.parent, options.name || '');\n        }\n    }\n}\nInjector.THROW_IF_NOT_FOUND = THROW_IF_NOT_FOUND;\nInjector.NULL = new NullInjector();\n/** @nocollapse */\nInjector.ɵprov = ɵɵdefineInjectable({\n    token: Injector,\n    providedIn: 'any',\n    factory: () => ɵɵinject(INJECTOR),\n});\n/**\n * @internal\n * @nocollapse\n */\nInjector.__NG_ELEMENT_ID__ = -1;\nconst IDENT = function (value) {\n    return value;\n};\nconst ɵ0$9 = IDENT;\nconst EMPTY = [];\nconst CIRCULAR$1 = IDENT;\nconst MULTI_PROVIDER_FN = function () {\n    return Array.prototype.slice.call(arguments);\n};\nconst ɵ1$1 = MULTI_PROVIDER_FN;\nconst NO_NEW_LINE$1 = 'ɵ';\nclass StaticInjector {\n    constructor(providers, parent = Injector.NULL, source = null) {\n        this.parent = parent;\n        this.source = source;\n        const records = this._records = new Map();\n        records.set(Injector, { token: Injector, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n        records.set(INJECTOR, { token: INJECTOR, fn: IDENT, deps: EMPTY, value: this, useNew: false });\n        this.scope = recursivelyProcessProviders(records, providers);\n    }\n    get(token, notFoundValue, flags = InjectFlags.Default) {\n        const records = this._records;\n        let record = records.get(token);\n        if (record === undefined) {\n            // This means we have never seen this record, see if it is tree shakable provider.\n            const injectableDef = getInjectableDef(token);\n            if (injectableDef) {\n                const providedIn = injectableDef && injectableDef.providedIn;\n                if (providedIn === 'any' || providedIn != null && providedIn === this.scope) {\n                    records.set(token, record = resolveProvider({ provide: token, useFactory: injectableDef.factory, deps: EMPTY }));\n                }\n            }\n            if (record === undefined) {\n                // Set record to null to make sure that we don't go through expensive lookup above again.\n                records.set(token, null);\n            }\n        }\n        let lastInjector = setCurrentInjector(this);\n        try {\n            return tryResolveToken(token, record, records, this.parent, notFoundValue, flags);\n        }\n        catch (e) {\n            return catchInjectorError(e, token, 'StaticInjectorError', this.source);\n        }\n        finally {\n            setCurrentInjector(lastInjector);\n        }\n    }\n    toString() {\n        const tokens = [], records = this._records;\n        records.forEach((v, token) => tokens.push(stringify(token)));\n        return `StaticInjector[${tokens.join(', ')}]`;\n    }\n}\nfunction resolveProvider(provider) {\n    const deps = computeDeps(provider);\n    let fn = IDENT;\n    let value = EMPTY;\n    let useNew = false;\n    let provide = resolveForwardRef(provider.provide);\n    if (USE_VALUE in provider) {\n        // We need to use USE_VALUE in provider since provider.useValue could be defined as undefined.\n        value = provider.useValue;\n    }\n    else if (provider.useFactory) {\n        fn = provider.useFactory;\n    }\n    else if (provider.useExisting) {\n        // Just use IDENT\n    }\n    else if (provider.useClass) {\n        useNew = true;\n        fn = resolveForwardRef(provider.useClass);\n    }\n    else if (typeof provide == 'function') {\n        useNew = true;\n        fn = provide;\n    }\n    else {\n        throw staticError('StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable', provider);\n    }\n    return { deps, fn, useNew, value };\n}\nfunction multiProviderMixError(token) {\n    return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n    let scope = null;\n    if (provider) {\n        provider = resolveForwardRef(provider);\n        if (Array.isArray(provider)) {\n            // if we have an array recurse into the array\n            for (let i = 0; i < provider.length; i++) {\n                scope = recursivelyProcessProviders(records, provider[i]) || scope;\n            }\n        }\n        else if (typeof provider === 'function') {\n            // Functions were supported in ReflectiveInjector, but are not here. For safety give useful\n            // error messages\n            throw staticError('Function/Class not supported', provider);\n        }\n        else if (provider && typeof provider === 'object' && provider.provide) {\n            // At this point we have what looks like a provider: {provide: ?, ....}\n            let token = resolveForwardRef(provider.provide);\n            const resolvedProvider = resolveProvider(provider);\n            if (provider.multi === true) {\n                // This is a multi provider.\n                let multiProvider = records.get(token);\n                if (multiProvider) {\n                    if (multiProvider.fn !== MULTI_PROVIDER_FN) {\n                        throw multiProviderMixError(token);\n                    }\n                }\n                else {\n                    // Create a placeholder factory which will look up the constituents of the multi provider.\n                    records.set(token, multiProvider = {\n                        token: provider.provide,\n                        deps: [],\n                        useNew: false,\n                        fn: MULTI_PROVIDER_FN,\n                        value: EMPTY\n                    });\n                }\n                // Treat the provider as the token.\n                token = provider;\n                multiProvider.deps.push({ token, options: 6 /* Default */ });\n            }\n            const record = records.get(token);\n            if (record && record.fn == MULTI_PROVIDER_FN) {\n                throw multiProviderMixError(token);\n            }\n            if (token === INJECTOR_SCOPE) {\n                scope = resolvedProvider.value;\n            }\n            records.set(token, resolvedProvider);\n        }\n        else {\n            throw staticError('Unexpected provider', provider);\n        }\n    }\n    return scope;\n}\nfunction tryResolveToken(token, record, records, parent, notFoundValue, flags) {\n    try {\n        return resolveToken(token, record, records, parent, notFoundValue, flags);\n    }\n    catch (e) {\n        // ensure that 'e' is of type Error.\n        if (!(e instanceof Error)) {\n            e = new Error(e);\n        }\n        const path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n        path.unshift(token);\n        if (record && record.value == CIRCULAR$1) {\n            // Reset the Circular flag.\n            record.value = EMPTY;\n        }\n        throw e;\n    }\n}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n    let value;\n    if (record && !(flags & InjectFlags.SkipSelf)) {\n        // If we don't have a record, this implies that we don't own the provider hence don't know how\n        // to resolve it.\n        value = record.value;\n        if (value == CIRCULAR$1) {\n            throw Error(NO_NEW_LINE$1 + 'Circular dependency');\n        }\n        else if (value === EMPTY) {\n            record.value = CIRCULAR$1;\n            let obj = undefined;\n            let useNew = record.useNew;\n            let fn = record.fn;\n            let depRecords = record.deps;\n            let deps = EMPTY;\n            if (depRecords.length) {\n                deps = [];\n                for (let i = 0; i < depRecords.length; i++) {\n                    const depRecord = depRecords[i];\n                    const options = depRecord.options;\n                    const childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n                    deps.push(tryResolveToken(\n                    // Current Token to resolve\n                    depRecord.token, \n                    // A record which describes how to resolve the token.\n                    // If undefined, this means we don't have such a record\n                    childRecord, \n                    // Other records we know about.\n                    records, \n                    // If we don't know how to resolve dependency and we should not check parent for it,\n                    // than pass in Null injector.\n                    !childRecord && !(options & 4 /* CheckParent */) ? Injector.NULL : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, InjectFlags.Default));\n                }\n            }\n            record.value = value = useNew ? new fn(...deps) : fn.apply(obj, deps);\n        }\n    }\n    else if (!(flags & InjectFlags.Self)) {\n        value = parent.get(token, notFoundValue, InjectFlags.Default);\n    }\n    else if (!(flags & InjectFlags.Optional)) {\n        value = Injector.NULL.get(token, notFoundValue);\n    }\n    else {\n        value = Injector.NULL.get(token, typeof notFoundValue !== 'undefined' ? notFoundValue : null);\n    }\n    return value;\n}\nfunction computeDeps(provider) {\n    let deps = EMPTY;\n    const providerDeps = provider.deps;\n    if (providerDeps && providerDeps.length) {\n        deps = [];\n        for (let i = 0; i < providerDeps.length; i++) {\n            let options = 6 /* Default */;\n            let token = resolveForwardRef(providerDeps[i]);\n            if (Array.isArray(token)) {\n                for (let j = 0, annotations = token; j < annotations.length; j++) {\n                    const annotation = annotations[j];\n                    if (annotation instanceof Optional || annotation == Optional) {\n                        options = options | 1 /* Optional */;\n                    }\n                    else if (annotation instanceof SkipSelf || annotation == SkipSelf) {\n                        options = options & ~2 /* CheckSelf */;\n                    }\n                    else if (annotation instanceof Self || annotation == Self) {\n                        options = options & ~4 /* CheckParent */;\n                    }\n                    else if (annotation instanceof Inject) {\n                        token = annotation.token;\n                    }\n                    else {\n                        token = resolveForwardRef(annotation);\n                    }\n                }\n            }\n            deps.push({ token, options });\n        }\n    }\n    else if (provider.useExisting) {\n        const token = resolveForwardRef(provider.useExisting);\n        deps = [{ token, options: 6 /* Default */ }];\n    }\n    else if (!providerDeps && !(USE_VALUE in provider)) {\n        // useValue & useExisting are the only ones which are exempt from deps all others need it.\n        throw staticError('\\'deps\\' required', provider);\n    }\n    return deps;\n}\nfunction staticError(text, obj) {\n    return new Error(formatError(text, obj, 'StaticInjectorError'));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction findFirstClosedCycle(keys) {\n    const res = [];\n    for (let i = 0; i < keys.length; ++i) {\n        if (res.indexOf(keys[i]) > -1) {\n            res.push(keys[i]);\n            return res;\n        }\n        res.push(keys[i]);\n    }\n    return res;\n}\nfunction constructResolvingPath(keys) {\n    if (keys.length > 1) {\n        const reversed = findFirstClosedCycle(keys.slice().reverse());\n        const tokenStrs = reversed.map(k => stringify(k.token));\n        return ' (' + tokenStrs.join(' -> ') + ')';\n    }\n    return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n    const keys = [key];\n    const errMsg = constructResolvingMessage(keys);\n    const error = (originalError ? wrappedError(errMsg, originalError) : Error(errMsg));\n    error.addKey = addKey;\n    error.keys = keys;\n    error.injectors = [injector];\n    error.constructResolvingMessage = constructResolvingMessage;\n    error[ERROR_ORIGINAL_ERROR] = originalError;\n    return error;\n}\nfunction addKey(injector, key) {\n    this.injectors.push(injector);\n    this.keys.push(key);\n    // Note: This updated message won't be reflected in the `.stack` property\n    this.message = this.constructResolvingMessage(this.keys);\n}\n/**\n * Thrown when trying to retrieve a dependency by key from {@link Injector}, but the\n * {@link Injector} does not have a {@link Provider} for the given key.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b:B) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n */\nfunction noProviderError(injector, key) {\n    return injectionError(injector, key, function (keys) {\n        const first = stringify(keys[0].token);\n        return `No provider for ${first}!${constructResolvingPath(keys)}`;\n    });\n}\n/**\n * Thrown when dependencies form a cycle.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * var injector = Injector.resolveAndCreate([\n *   {provide: \"one\", useFactory: (two) => \"two\", deps: [[new Inject(\"two\")]]},\n *   {provide: \"two\", useFactory: (one) => \"one\", deps: [[new Inject(\"one\")]]}\n * ]);\n *\n * expect(() => injector.get(\"one\")).toThrowError();\n * ```\n *\n * Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.\n */\nfunction cyclicDependencyError(injector, key) {\n    return injectionError(injector, key, function (keys) {\n        return `Cannot instantiate cyclic dependency!${constructResolvingPath(keys)}`;\n    });\n}\n/**\n * Thrown when a constructing type returns with an Error.\n *\n * The `InstantiationError` class contains the original error plus the dependency graph which caused\n * this object to be instantiated.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor() {\n *     throw new Error('message');\n *   }\n * }\n *\n * var injector = Injector.resolveAndCreate([A]);\n\n * try {\n *   injector.get(A);\n * } catch (e) {\n *   expect(e instanceof InstantiationError).toBe(true);\n *   expect(e.originalException.message).toEqual(\"message\");\n *   expect(e.originalStack).toBeDefined();\n * }\n * ```\n */\nfunction instantiationError(injector, originalException, originalStack, key) {\n    return injectionError(injector, key, function (keys) {\n        const first = stringify(keys[0].token);\n        return `${originalException.message}: Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;\n    }, originalException);\n}\n/**\n * Thrown when an object other then {@link Provider} (or `Type`) is passed to {@link Injector}\n * creation.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\"not a type\"])).toThrowError();\n * ```\n */\nfunction invalidProviderError(provider) {\n    return Error(`Invalid provider - only instances of Provider and Type are allowed, got: ${provider}`);\n}\n/**\n * Thrown when the class has no annotation information.\n *\n * Lack of annotation information prevents the {@link Injector} from determining which dependencies\n * need to be injected into the constructor.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {\n *   constructor(b) {}\n * }\n *\n * expect(() => Injector.resolveAndCreate([A])).toThrowError();\n * ```\n *\n * This error is also thrown when the class not marked with {@link Injectable} has parameter types.\n *\n * ```typescript\n * class B {}\n *\n * class A {\n *   constructor(b:B) {} // no information about the parameter types of A is available at runtime.\n * }\n *\n * expect(() => Injector.resolveAndCreate([A,B])).toThrowError();\n * ```\n *\n */\nfunction noAnnotationError(typeOrFunc, params) {\n    const signature = [];\n    for (let i = 0, ii = params.length; i < ii; i++) {\n        const parameter = params[i];\n        if (!parameter || parameter.length == 0) {\n            signature.push('?');\n        }\n        else {\n            signature.push(parameter.map(stringify).join(' '));\n        }\n    }\n    return Error('Cannot resolve all parameters for \\'' + stringify(typeOrFunc) + '\\'(' +\n        signature.join(', ') + '). ' +\n        'Make sure that all the parameters are decorated with Inject or have valid type annotations and that \\'' +\n        stringify(typeOrFunc) + '\\' is decorated with Injectable.');\n}\n/**\n * Thrown when getting an object by index.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * class A {}\n *\n * var injector = Injector.resolveAndCreate([A]);\n *\n * expect(() => injector.getAt(100)).toThrowError();\n * ```\n *\n */\nfunction outOfBoundsError(index) {\n    return Error(`Index ${index} is out-of-bounds.`);\n}\n// TODO: add a working example after alpha38 is released\n/**\n * Thrown when a multi provider and a regular provider are bound to the same token.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * expect(() => Injector.resolveAndCreate([\n *   { provide: \"Strings\", useValue: \"string1\", multi: true},\n *   { provide: \"Strings\", useValue: \"string2\", multi: false}\n * ])).toThrowError();\n * ```\n */\nfunction mixingMultiProvidersWithRegularProvidersError(provider1, provider2) {\n    return Error(`Cannot mix multi providers and regular providers, got: ${provider1} ${provider2}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A unique object used for retrieving items from the {@link ReflectiveInjector}.\n *\n * Keys have:\n * - a system-wide unique `id`.\n * - a `token`.\n *\n * `Key` is used internally by {@link ReflectiveInjector} because its system-wide unique `id` allows\n * the\n * injector to store created objects in a more efficient way.\n *\n * `Key` should not be created directly. {@link ReflectiveInjector} creates keys automatically when\n * resolving\n * providers.\n *\n * @deprecated No replacement\n * @publicApi\n */\nclass ReflectiveKey {\n    /**\n     * Private\n     */\n    constructor(token, id) {\n        this.token = token;\n        this.id = id;\n        if (!token) {\n            throw new Error('Token must be defined!');\n        }\n        this.displayName = stringify(this.token);\n    }\n    /**\n     * Retrieves a `Key` for a token.\n     */\n    static get(token) {\n        return _globalKeyRegistry.get(resolveForwardRef(token));\n    }\n    /**\n     * @returns the number of keys registered in the system.\n     */\n    static get numberOfKeys() {\n        return _globalKeyRegistry.numberOfKeys;\n    }\n}\nclass KeyRegistry {\n    constructor() {\n        this._allKeys = new Map();\n    }\n    get(token) {\n        if (token instanceof ReflectiveKey)\n            return token;\n        if (this._allKeys.has(token)) {\n            return this._allKeys.get(token);\n        }\n        const newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n        this._allKeys.set(token, newKey);\n        return newKey;\n    }\n    get numberOfKeys() {\n        return this._allKeys.size;\n    }\n}\nconst _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provides access to reflection data about symbols. Used internally by Angular\n * to power dependency injection and compilation.\n */\nclass Reflector {\n    constructor(reflectionCapabilities) {\n        this.reflectionCapabilities = reflectionCapabilities;\n    }\n    updateCapabilities(caps) {\n        this.reflectionCapabilities = caps;\n    }\n    factory(type) {\n        return this.reflectionCapabilities.factory(type);\n    }\n    parameters(typeOrFunc) {\n        return this.reflectionCapabilities.parameters(typeOrFunc);\n    }\n    annotations(typeOrFunc) {\n        return this.reflectionCapabilities.annotations(typeOrFunc);\n    }\n    propMetadata(typeOrFunc) {\n        return this.reflectionCapabilities.propMetadata(typeOrFunc);\n    }\n    hasLifecycleHook(type, lcProperty) {\n        return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n    }\n    getter(name) {\n        return this.reflectionCapabilities.getter(name);\n    }\n    setter(name) {\n        return this.reflectionCapabilities.setter(name);\n    }\n    method(name) {\n        return this.reflectionCapabilities.method(name);\n    }\n    importUri(type) {\n        return this.reflectionCapabilities.importUri(type);\n    }\n    resourceUri(type) {\n        return this.reflectionCapabilities.resourceUri(type);\n    }\n    resolveIdentifier(name, moduleUrl, members, runtime) {\n        return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n    }\n    resolveEnum(identifier, name) {\n        return this.reflectionCapabilities.resolveEnum(identifier, name);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The {@link Reflector} used internally in Angular to access metadata\n * about symbols.\n */\nconst reflector = new Reflector(new ReflectionCapabilities());\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * `Dependency` is used by the framework to extend DI.\n * This is internal to Angular and should not be used directly.\n */\nclass ReflectiveDependency {\n    constructor(key, optional, visibility) {\n        this.key = key;\n        this.optional = optional;\n        this.visibility = visibility;\n    }\n    static fromKey(key) {\n        return new ReflectiveDependency(key, false, null);\n    }\n}\nconst _EMPTY_LIST = [];\nclass ResolvedReflectiveProvider_ {\n    constructor(key, resolvedFactories, multiProvider) {\n        this.key = key;\n        this.resolvedFactories = resolvedFactories;\n        this.multiProvider = multiProvider;\n        this.resolvedFactory = this.resolvedFactories[0];\n    }\n}\n/**\n * An internal resolved representation of a factory function created by resolving `Provider`.\n * @publicApi\n */\nclass ResolvedReflectiveFactory {\n    constructor(\n    /**\n     * Factory function which can return an instance of an object represented by a key.\n     */\n    factory, \n    /**\n     * Arguments (dependencies) to the `factory` function.\n     */\n    dependencies) {\n        this.factory = factory;\n        this.dependencies = dependencies;\n    }\n}\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n    let factoryFn;\n    let resolvedDeps;\n    if (provider.useClass) {\n        const useClass = resolveForwardRef(provider.useClass);\n        factoryFn = reflector.factory(useClass);\n        resolvedDeps = _dependenciesFor(useClass);\n    }\n    else if (provider.useExisting) {\n        factoryFn = (aliasInstance) => aliasInstance;\n        resolvedDeps = [ReflectiveDependency.fromKey(ReflectiveKey.get(provider.useExisting))];\n    }\n    else if (provider.useFactory) {\n        factoryFn = provider.useFactory;\n        resolvedDeps = constructDependencies(provider.useFactory, provider.deps);\n    }\n    else {\n        factoryFn = () => provider.useValue;\n        resolvedDeps = _EMPTY_LIST;\n    }\n    return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the `Provider` into `ResolvedProvider`.\n *\n * `Injector` internally only uses `ResolvedProvider`, `Provider` contains convenience provider\n * syntax.\n */\nfunction resolveReflectiveProvider(provider) {\n    return new ResolvedReflectiveProvider_(ReflectiveKey.get(provider.provide), [resolveReflectiveFactory(provider)], provider.multi || false);\n}\n/**\n * Resolve a list of Providers.\n */\nfunction resolveReflectiveProviders(providers) {\n    const normalized = _normalizeProviders(providers, []);\n    const resolved = normalized.map(resolveReflectiveProvider);\n    const resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n    return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where each key is contained exactly once and\n * multi providers have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n    for (let i = 0; i < providers.length; i++) {\n        const provider = providers[i];\n        const existing = normalizedProvidersMap.get(provider.key.id);\n        if (existing) {\n            if (provider.multiProvider !== existing.multiProvider) {\n                throw mixingMultiProvidersWithRegularProvidersError(existing, provider);\n            }\n            if (provider.multiProvider) {\n                for (let j = 0; j < provider.resolvedFactories.length; j++) {\n                    existing.resolvedFactories.push(provider.resolvedFactories[j]);\n                }\n            }\n            else {\n                normalizedProvidersMap.set(provider.key.id, provider);\n            }\n        }\n        else {\n            let resolvedProvider;\n            if (provider.multiProvider) {\n                resolvedProvider = new ResolvedReflectiveProvider_(provider.key, provider.resolvedFactories.slice(), provider.multiProvider);\n            }\n            else {\n                resolvedProvider = provider;\n            }\n            normalizedProvidersMap.set(provider.key.id, resolvedProvider);\n        }\n    }\n    return normalizedProvidersMap;\n}\nfunction _normalizeProviders(providers, res) {\n    providers.forEach(b => {\n        if (b instanceof Type) {\n            res.push({ provide: b, useClass: b });\n        }\n        else if (b && typeof b == 'object' && b.provide !== undefined) {\n            res.push(b);\n        }\n        else if (Array.isArray(b)) {\n            _normalizeProviders(b, res);\n        }\n        else {\n            throw invalidProviderError(b);\n        }\n    });\n    return res;\n}\nfunction constructDependencies(typeOrFunc, dependencies) {\n    if (!dependencies) {\n        return _dependenciesFor(typeOrFunc);\n    }\n    else {\n        const params = dependencies.map(t => [t]);\n        return dependencies.map(t => _extractToken(typeOrFunc, t, params));\n    }\n}\nfunction _dependenciesFor(typeOrFunc) {\n    const params = reflector.parameters(typeOrFunc);\n    if (!params)\n        return [];\n    if (params.some(p => p == null)) {\n        throw noAnnotationError(typeOrFunc, params);\n    }\n    return params.map(p => _extractToken(typeOrFunc, p, params));\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n    let token = null;\n    let optional = false;\n    if (!Array.isArray(metadata)) {\n        if (metadata instanceof Inject) {\n            return _createDependency(metadata.token, optional, null);\n        }\n        else {\n            return _createDependency(metadata, optional, null);\n        }\n    }\n    let visibility = null;\n    for (let i = 0; i < metadata.length; ++i) {\n        const paramMetadata = metadata[i];\n        if (paramMetadata instanceof Type) {\n            token = paramMetadata;\n        }\n        else if (paramMetadata instanceof Inject) {\n            token = paramMetadata.token;\n        }\n        else if (paramMetadata instanceof Optional) {\n            optional = true;\n        }\n        else if (paramMetadata instanceof Self || paramMetadata instanceof SkipSelf) {\n            visibility = paramMetadata;\n        }\n        else if (paramMetadata instanceof InjectionToken) {\n            token = paramMetadata;\n        }\n    }\n    token = resolveForwardRef(token);\n    if (token != null) {\n        return _createDependency(token, optional, visibility);\n    }\n    else {\n        throw noAnnotationError(typeOrFunc, params);\n    }\n}\nfunction _createDependency(token, optional, visibility) {\n    return new ReflectiveDependency(ReflectiveKey.get(token), optional, visibility);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Threshold for the dynamic version\nconst UNDEFINED = {};\n/**\n * A ReflectiveDependency injection container used for instantiating objects and resolving\n * dependencies.\n *\n * An `Injector` is a replacement for a `new` operator, which can automatically resolve the\n * constructor dependencies.\n *\n * In typical use, application code asks for the dependencies in the constructor and they are\n * resolved by the `Injector`.\n *\n * @usageNotes\n * ### Example\n *\n * The following example creates an `Injector` configured to create `Engine` and `Car`.\n *\n * ```typescript\n * @Injectable()\n * class Engine {\n * }\n *\n * @Injectable()\n * class Car {\n *   constructor(public engine:Engine) {}\n * }\n *\n * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n * var car = injector.get(Car);\n * expect(car instanceof Car).toBe(true);\n * expect(car.engine instanceof Engine).toBe(true);\n * ```\n *\n * Notice, we don't use the `new` operator because we explicitly want to have the `Injector`\n * resolve all of the object's dependencies automatically.\n *\n * @deprecated from v5 - slow and brings in a lot of code, Use `Injector.create` instead.\n * @publicApi\n */\nclass ReflectiveInjector {\n    /**\n     * Turns an array of provider definitions into an array of resolved providers.\n     *\n     * A resolution is a process of flattening multiple nested arrays and converting individual\n     * providers into an array of `ResolvedReflectiveProvider`s.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var providers = ReflectiveInjector.resolve([Car, [[Engine]]]);\n     *\n     * expect(providers.length).toEqual(2);\n     *\n     * expect(providers[0] instanceof ResolvedReflectiveProvider).toBe(true);\n     * expect(providers[0].key.displayName).toBe(\"Car\");\n     * expect(providers[0].dependencies.length).toEqual(1);\n     * expect(providers[0].factory).toBeDefined();\n     *\n     * expect(providers[1].key.displayName).toBe(\"Engine\");\n     * });\n     * ```\n     *\n     */\n    static resolve(providers) {\n        return resolveReflectiveProviders(providers);\n    }\n    /**\n     * Resolves an array of providers and creates an injector from those providers.\n     *\n     * The passed-in providers can be an array of `Type`, `Provider`,\n     * or a recursive array of more providers.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var injector = ReflectiveInjector.resolveAndCreate([Car, Engine]);\n     * expect(injector.get(Car) instanceof Car).toBe(true);\n     * ```\n     */\n    static resolveAndCreate(providers, parent) {\n        const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n        return ReflectiveInjector.fromResolvedProviders(ResolvedReflectiveProviders, parent);\n    }\n    /**\n     * Creates an injector from previously resolved providers.\n     *\n     * This API is the recommended way to construct injectors in performance-sensitive parts.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * ```typescript\n     * @Injectable()\n     * class Engine {\n     * }\n     *\n     * @Injectable()\n     * class Car {\n     *   constructor(public engine:Engine) {}\n     * }\n     *\n     * var providers = ReflectiveInjector.resolve([Car, Engine]);\n     * var injector = ReflectiveInjector.fromResolvedProviders(providers);\n     * expect(injector.get(Car) instanceof Car).toBe(true);\n     * ```\n     */\n    static fromResolvedProviders(providers, parent) {\n        return new ReflectiveInjector_(providers, parent);\n    }\n}\nclass ReflectiveInjector_ {\n    /**\n     * Private\n     */\n    constructor(_providers, _parent) {\n        /** @internal */\n        this._constructionCounter = 0;\n        this._providers = _providers;\n        this.parent = _parent || null;\n        const len = _providers.length;\n        this.keyIds = [];\n        this.objs = [];\n        for (let i = 0; i < len; i++) {\n            this.keyIds[i] = _providers[i].key.id;\n            this.objs[i] = UNDEFINED;\n        }\n    }\n    get(token, notFoundValue = THROW_IF_NOT_FOUND) {\n        return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n    }\n    resolveAndCreateChild(providers) {\n        const ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n        return this.createChildFromResolved(ResolvedReflectiveProviders);\n    }\n    createChildFromResolved(providers) {\n        const inj = new ReflectiveInjector_(providers);\n        inj.parent = this;\n        return inj;\n    }\n    resolveAndInstantiate(provider) {\n        return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n    }\n    instantiateResolved(provider) {\n        return this._instantiateProvider(provider);\n    }\n    getProviderAtIndex(index) {\n        if (index < 0 || index >= this._providers.length) {\n            throw outOfBoundsError(index);\n        }\n        return this._providers[index];\n    }\n    /** @internal */\n    _new(provider) {\n        if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n            throw cyclicDependencyError(this, provider.key);\n        }\n        return this._instantiateProvider(provider);\n    }\n    _getMaxNumberOfObjects() {\n        return this.objs.length;\n    }\n    _instantiateProvider(provider) {\n        if (provider.multiProvider) {\n            const res = [];\n            for (let i = 0; i < provider.resolvedFactories.length; ++i) {\n                res[i] = this._instantiate(provider, provider.resolvedFactories[i]);\n            }\n            return res;\n        }\n        else {\n            return this._instantiate(provider, provider.resolvedFactories[0]);\n        }\n    }\n    _instantiate(provider, ResolvedReflectiveFactory) {\n        const factory = ResolvedReflectiveFactory.factory;\n        let deps;\n        try {\n            deps =\n                ResolvedReflectiveFactory.dependencies.map(dep => this._getByReflectiveDependency(dep));\n        }\n        catch (e) {\n            if (e.addKey) {\n                e.addKey(this, provider.key);\n            }\n            throw e;\n        }\n        let obj;\n        try {\n            obj = factory(...deps);\n        }\n        catch (e) {\n            throw instantiationError(this, e, e.stack, provider.key);\n        }\n        return obj;\n    }\n    _getByReflectiveDependency(dep) {\n        return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n    }\n    _getByKey(key, visibility, notFoundValue) {\n        if (key === ReflectiveInjector_.INJECTOR_KEY) {\n            return this;\n        }\n        if (visibility instanceof Self) {\n            return this._getByKeySelf(key, notFoundValue);\n        }\n        else {\n            return this._getByKeyDefault(key, notFoundValue, visibility);\n        }\n    }\n    _getObjByKeyId(keyId) {\n        for (let i = 0; i < this.keyIds.length; i++) {\n            if (this.keyIds[i] === keyId) {\n                if (this.objs[i] === UNDEFINED) {\n                    this.objs[i] = this._new(this._providers[i]);\n                }\n                return this.objs[i];\n            }\n        }\n        return UNDEFINED;\n    }\n    /** @internal */\n    _throwOrNull(key, notFoundValue) {\n        if (notFoundValue !== THROW_IF_NOT_FOUND) {\n            return notFoundValue;\n        }\n        else {\n            throw noProviderError(this, key);\n        }\n    }\n    /** @internal */\n    _getByKeySelf(key, notFoundValue) {\n        const obj = this._getObjByKeyId(key.id);\n        return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n    }\n    /** @internal */\n    _getByKeyDefault(key, notFoundValue, visibility) {\n        let inj;\n        if (visibility instanceof SkipSelf) {\n            inj = this.parent;\n        }\n        else {\n            inj = this;\n        }\n        while (inj instanceof ReflectiveInjector_) {\n            const inj_ = inj;\n            const obj = inj_._getObjByKeyId(key.id);\n            if (obj !== UNDEFINED)\n                return obj;\n            inj = inj_.parent;\n        }\n        if (inj !== null) {\n            return inj.get(key.token, notFoundValue);\n        }\n        else {\n            return this._throwOrNull(key, notFoundValue);\n        }\n    }\n    get displayName() {\n        const providers = _mapProviders(this, (b) => ' \"' + b.key.displayName + '\" ')\n            .join(', ');\n        return `ReflectiveInjector(providers: [${providers}])`;\n    }\n    toString() {\n        return this.displayName;\n    }\n}\nReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\nfunction _mapProviders(injector, fn) {\n    const res = [];\n    for (let i = 0; i < injector._providers.length; ++i) {\n        res[i] = fn(injector.getProviderAtIndex(i));\n    }\n    return res;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A DI token that you can use to create a virtual [provider](guide/glossary#provider)\n * that will populate the `entryComponents` field of components and NgModules\n * based on its `useValue` property value.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) are added to the `entryComponents` property.\n *\n * @usageNotes\n *\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on a router configuration that refers\n * to components.\n *\n * ```typescript\n * // helper function inside the router\n * function provideRoutes(routes) {\n *   return [\n *     {provide: ROUTES, useValue: routes},\n *     {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}\n *   ];\n * }\n *\n * // user code\n * let routes = [\n *   {path: '/root', component: RootComp},\n *   {path: '/teams', component: TeamsComp}\n * ];\n *\n * @NgModule({\n *   providers: [provideRoutes(routes)]\n * })\n * class ModuleWithRoutes {}\n * ```\n *\n * @publicApi\n * @deprecated Since 9.0.0. With Ivy, this property is no longer necessary.\n */\nconst ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n/**\n * Base class for query metadata.\n *\n * @see `ContentChildren`.\n * @see `ContentChild`.\n * @see `ViewChildren`.\n * @see `ViewChild`.\n *\n * @publicApi\n */\nclass Query {\n}\nconst ɵ0$a = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: false, descendants: false }, data));\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n * @publicApi\n */\nconst ContentChildren = makePropDecorator('ContentChildren', ɵ0$a, Query);\nconst ɵ1$2 = (selector, data = {}) => (Object.assign({ selector, first: true, isViewQuery: false, descendants: true }, data));\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n *\n * @publicApi\n */\nconst ContentChild = makePropDecorator('ContentChild', ɵ1$2, Query);\nconst ɵ2 = (selector, data = {}) => (Object.assign({ selector, first: false, isViewQuery: true, descendants: true }, data));\n/**\n * ViewChildren decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChildren = makePropDecorator('ViewChildren', ɵ2, Query);\nconst ɵ3 = (selector, data) => (Object.assign({ selector, first: true, isViewQuery: true, descendants: true }, data));\n/**\n * ViewChild decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst ViewChild = makePropDecorator('ViewChild', ɵ3, Query);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to resolve resource URLs on `@Component` when used with JIT compilation.\n *\n * Example:\n * ```\n * @Component({\n *   selector: 'my-comp',\n *   templateUrl: 'my-comp.html', // This requires asynchronous resolution\n * })\n * class MyComponent{\n * }\n *\n * // Calling `renderComponent` will fail because `renderComponent` is a synchronous process\n * // and `MyComponent`'s `@Component.templateUrl` needs to be resolved asynchronously.\n *\n * // Calling `resolveComponentResources()` will resolve `@Component.templateUrl` into\n * // `@Component.template`, which allows `renderComponent` to proceed in a synchronous manner.\n *\n * // Use browser's `fetch()` function as the default resource resolution strategy.\n * resolveComponentResources(fetch).then(() => {\n *   // After resolution all URLs have been converted into `template` strings.\n *   renderComponent(MyComponent);\n * });\n *\n * ```\n *\n * NOTE: In AOT the resolution happens during compilation, and so there should be no need\n * to call this method outside JIT mode.\n *\n * @param resourceResolver a function which is responsible for returning a `Promise` to the\n * contents of the resolved URL. Browser's `fetch()` method is a good default implementation.\n */\nfunction resolveComponentResources(resourceResolver) {\n    // Store all promises which are fetching the resources.\n    const componentResolved = [];\n    // Cache so that we don't fetch the same resource more than once.\n    const urlMap = new Map();\n    function cachedResourceResolve(url) {\n        let promise = urlMap.get(url);\n        if (!promise) {\n            const resp = resourceResolver(url);\n            urlMap.set(url, promise = resp.then(unwrapResponse));\n        }\n        return promise;\n    }\n    componentResourceResolutionQueue.forEach((component, type) => {\n        const promises = [];\n        if (component.templateUrl) {\n            promises.push(cachedResourceResolve(component.templateUrl).then((template) => {\n                component.template = template;\n            }));\n        }\n        const styleUrls = component.styleUrls;\n        const styles = component.styles || (component.styles = []);\n        const styleOffset = component.styles.length;\n        styleUrls && styleUrls.forEach((styleUrl, index) => {\n            styles.push(''); // pre-allocate array.\n            promises.push(cachedResourceResolve(styleUrl).then((style) => {\n                styles[styleOffset + index] = style;\n                styleUrls.splice(styleUrls.indexOf(styleUrl), 1);\n                if (styleUrls.length == 0) {\n                    component.styleUrls = undefined;\n                }\n            }));\n        });\n        const fullyResolved = Promise.all(promises).then(() => componentDefResolved(type));\n        componentResolved.push(fullyResolved);\n    });\n    clearResolutionOfComponentResourcesQueue();\n    return Promise.all(componentResolved).then(() => undefined);\n}\nlet componentResourceResolutionQueue = new Map();\n// Track when existing ɵcmp for a Type is waiting on resources.\nconst componentDefPendingResolution = new Set();\nfunction maybeQueueResolutionOfComponentResources(type, metadata) {\n    if (componentNeedsResolution(metadata)) {\n        componentResourceResolutionQueue.set(type, metadata);\n        componentDefPendingResolution.add(type);\n    }\n}\nfunction isComponentDefPendingResolution(type) {\n    return componentDefPendingResolution.has(type);\n}\nfunction componentNeedsResolution(component) {\n    return !!((component.templateUrl && !component.hasOwnProperty('template')) ||\n        component.styleUrls && component.styleUrls.length);\n}\nfunction clearResolutionOfComponentResourcesQueue() {\n    const old = componentResourceResolutionQueue;\n    componentResourceResolutionQueue = new Map();\n    return old;\n}\nfunction restoreComponentResolutionQueue(queue) {\n    componentDefPendingResolution.clear();\n    queue.forEach((_, type) => componentDefPendingResolution.add(type));\n    componentResourceResolutionQueue = queue;\n}\nfunction isComponentResourceResolutionQueueEmpty() {\n    return componentResourceResolutionQueue.size === 0;\n}\nfunction unwrapResponse(response) {\n    return typeof response == 'string' ? response : response.text();\n}\nfunction componentDefResolved(type) {\n    componentDefPendingResolution.delete(type);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Compute the static styling (class/style) from `TAttributes`.\n *\n * This function should be called during `firstCreatePass` only.\n *\n * @param tNode The `TNode` into which the styling information should be loaded.\n * @param attrs `TAttributes` containing the styling information.\n * @param writeToHost Where should the resulting static styles be written?\n *   - `false` Write to `TNode.stylesWithoutHost` / `TNode.classesWithoutHost`\n *   - `true` Write to `TNode.styles` / `TNode.classes`\n */\nfunction computeStaticStyling(tNode, attrs, writeToHost) {\n    ngDevMode &&\n        assertFirstCreatePass(getTView(), 'Expecting to be called in first template pass only');\n    let styles = writeToHost ? tNode.styles : null;\n    let classes = writeToHost ? tNode.classes : null;\n    let mode = 0;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const value = attrs[i];\n            if (typeof value === 'number') {\n                mode = value;\n            }\n            else if (mode == 1 /* Classes */) {\n                classes = concatStringsWithSpace(classes, value);\n            }\n            else if (mode == 2 /* Styles */) {\n                const style = value;\n                const styleValue = attrs[++i];\n                styles = concatStringsWithSpace(styles, style + ': ' + styleValue + ';');\n            }\n        }\n    }\n    writeToHost ? tNode.styles = styles : tNode.stylesWithoutHost = styles;\n    writeToHost ? tNode.classes = classes : tNode.classesWithoutHost = classes;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _symbolIterator = null;\nfunction getSymbolIterator() {\n    if (!_symbolIterator) {\n        const Symbol = _global['Symbol'];\n        if (Symbol && Symbol.iterator) {\n            _symbolIterator = Symbol.iterator;\n        }\n        else {\n            // es6-shim specific logic\n            const keys = Object.getOwnPropertyNames(Map.prototype);\n            for (let i = 0; i < keys.length; ++i) {\n                const key = keys[i];\n                if (key !== 'entries' && key !== 'size' &&\n                    Map.prototype[key] === Map.prototype['entries']) {\n                    _symbolIterator = key;\n                }\n            }\n        }\n    }\n    return _symbolIterator;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction devModeEqual(a, b) {\n    const isListLikeIterableA = isListLikeIterable(a);\n    const isListLikeIterableB = isListLikeIterable(b);\n    if (isListLikeIterableA && isListLikeIterableB) {\n        return areIterablesEqual(a, b, devModeEqual);\n    }\n    else {\n        const isAObject = a && (typeof a === 'object' || typeof a === 'function');\n        const isBObject = b && (typeof b === 'object' || typeof b === 'function');\n        if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n            return true;\n        }\n        else {\n            return Object.is(a, b);\n        }\n    }\n}\n/**\n * Indicates that the result of a {@link Pipe} transformation has changed even though the\n * reference has not changed.\n *\n * Wrapped values are unwrapped automatically during the change detection, and the unwrapped value\n * is stored.\n *\n * Example:\n *\n * ```\n * if (this._latestValue === this._latestReturnedValue) {\n *    return this._latestReturnedValue;\n *  } else {\n *    this._latestReturnedValue = this._latestValue;\n *    return WrappedValue.wrap(this._latestValue); // this will force update\n *  }\n * ```\n *\n * @publicApi\n * @deprecated from v10 stop using. (No replacement, deemed unnecessary.)\n */\nclass WrappedValue {\n    constructor(value) {\n        this.wrapped = value;\n    }\n    /** Creates a wrapped value. */\n    static wrap(value) {\n        return new WrappedValue(value);\n    }\n    /**\n     * Returns the underlying value of a wrapped value.\n     * Returns the given `value` when it is not wrapped.\n     **/\n    static unwrap(value) {\n        return WrappedValue.isWrapped(value) ? value.wrapped : value;\n    }\n    /** Returns true if `value` is a wrapped value. */\n    static isWrapped(value) {\n        return value instanceof WrappedValue;\n    }\n}\nfunction isListLikeIterable(obj) {\n    if (!isJsObject(obj))\n        return false;\n    return Array.isArray(obj) ||\n        (!(obj instanceof Map) && // JS Map are iterables but return entries as [k, v]\n            getSymbolIterator() in obj); // JS Iterable have a Symbol.iterator prop\n}\nfunction areIterablesEqual(a, b, comparator) {\n    const iterator1 = a[getSymbolIterator()]();\n    const iterator2 = b[getSymbolIterator()]();\n    while (true) {\n        const item1 = iterator1.next();\n        const item2 = iterator2.next();\n        if (item1.done && item2.done)\n            return true;\n        if (item1.done || item2.done)\n            return false;\n        if (!comparator(item1.value, item2.value))\n            return false;\n    }\n}\nfunction iterateListLike(obj, fn) {\n    if (Array.isArray(obj)) {\n        for (let i = 0; i < obj.length; i++) {\n            fn(obj[i]);\n        }\n    }\n    else {\n        const iterator = obj[getSymbolIterator()]();\n        let item;\n        while (!((item = iterator.next()).done)) {\n            fn(item.value);\n        }\n    }\n}\nfunction isJsObject(o) {\n    return o !== null && (typeof o === 'function' || typeof o === 'object');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// TODO(misko): consider inlining\n/** Updates binding and returns the value. */\nfunction updateBinding(lView, bindingIndex, value) {\n    return lView[bindingIndex] = value;\n}\n/** Gets the current binding value. */\nfunction getBinding(lView, bindingIndex) {\n    ngDevMode && assertIndexInRange(lView, bindingIndex);\n    ngDevMode &&\n        assertNotSame(lView[bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n    return lView[bindingIndex];\n}\n/**\n * Updates binding if changed, then returns whether it was updated.\n *\n * This function also checks the `CheckNoChangesMode` and throws if changes are made.\n * Some changes (Objects/iterables) during `CheckNoChangesMode` are exempt to comply with VE\n * behavior.\n *\n * @param lView current `LView`\n * @param bindingIndex The binding in the `LView` to check\n * @param value New value to check against `lView[bindingIndex]`\n * @returns `true` if the bindings has changed. (Throws if binding has changed during\n *          `CheckNoChangesMode`)\n */\nfunction bindingUpdated(lView, bindingIndex, value) {\n    ngDevMode && assertNotSame(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n    ngDevMode &&\n        assertLessThan(bindingIndex, lView.length, `Slot should have been initialized to NO_CHANGE`);\n    const oldValue = lView[bindingIndex];\n    if (Object.is(oldValue, value)) {\n        return false;\n    }\n    else {\n        if (ngDevMode && getCheckNoChangesMode()) {\n            // View engine didn't report undefined values as changed on the first checkNoChanges pass\n            // (before the change detection was run).\n            const oldValueToCompare = oldValue !== NO_CHANGE ? oldValue : undefined;\n            if (!devModeEqual(oldValueToCompare, value)) {\n                const details = getExpressionChangedErrorDetails(lView, bindingIndex, oldValueToCompare, value);\n                throwErrorIfNoChangesMode(oldValue === NO_CHANGE, details.oldValue, details.newValue, details.propName);\n            }\n            // There was a change, but the `devModeEqual` decided that the change is exempt from an error.\n            // For this reason we exit as if no change. The early exit is needed to prevent the changed\n            // value to be written into `LView` (If we would write the new value that we would not see it\n            // as change on next CD.)\n            return false;\n        }\n        lView[bindingIndex] = value;\n        return true;\n    }\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(lView, bindingIndex, exp1, exp2) {\n    const different = bindingUpdated(lView, bindingIndex, exp1);\n    return bindingUpdated(lView, bindingIndex + 1, exp2) || different;\n}\n/** Updates 3 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) {\n    const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n    return bindingUpdated(lView, bindingIndex + 2, exp3) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) {\n    const different = bindingUpdated2(lView, bindingIndex, exp1, exp2);\n    return bindingUpdated2(lView, bindingIndex + 2, exp3, exp4) || different;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Updates the value of or removes a bound attribute on an Element.\n *\n * Used in the case of `[attr.title]=\"value\"`\n *\n * @param name name The name of the attribute.\n * @param value value The attribute is removed when value is `null` or `undefined`.\n *                  Otherwise the attribute value is set to the stringified value.\n * @param sanitizer An optional function used to sanitize the value.\n * @param namespace Optional namespace to use when setting the attribute.\n *\n * @codeGenApi\n */\nfunction ɵɵattribute(name, value, sanitizer, namespace) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, name, value, sanitizer, namespace);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, 'attr.' + name, bindingIndex);\n    }\n    return ɵɵattribute;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create interpolation bindings with a variable number of expressions.\n *\n * If there are 1 to 8 expressions `interpolation1()` to `interpolation8()` should be used instead.\n * Those are faster because there is no need to create an array of expressions and iterate over it.\n *\n * `values`:\n * - has static text at even indexes,\n * - has evaluated expressions at odd indexes.\n *\n * Returns the concatenated string when any of the arguments changes, `NO_CHANGE` otherwise.\n */\nfunction interpolationV(lView, values) {\n    ngDevMode && assertLessThan(2, values.length, 'should have at least 3 values');\n    ngDevMode && assertEqual(values.length % 2, 1, 'should have an odd number of values');\n    let isBindingUpdated = false;\n    let bindingIndex = getBindingIndex();\n    for (let i = 1; i < values.length; i += 2) {\n        // Check if bindings (odd indexes) have changed\n        isBindingUpdated = bindingUpdated(lView, bindingIndex++, values[i]) || isBindingUpdated;\n    }\n    setBindingIndex(bindingIndex);\n    if (!isBindingUpdated) {\n        return NO_CHANGE;\n    }\n    // Build the updated content\n    let content = values[0];\n    for (let i = 1; i < values.length; i += 2) {\n        content += renderStringify(values[i]) + values[i + 1];\n    }\n    return content;\n}\n/**\n * Creates an interpolation binding with 1 expression.\n *\n * @param prefix static value used for concatenation only.\n * @param v0 value checked for change.\n * @param suffix static value used for concatenation only.\n */\nfunction interpolation1(lView, prefix, v0, suffix) {\n    const different = bindingUpdated(lView, nextBindingIndex(), v0);\n    return different ? prefix + renderStringify(v0) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 2 expressions.\n */\nfunction interpolation2(lView, prefix, v0, i0, v1, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated2(lView, bindingIndex, v0, v1);\n    incrementBindingIndex(2);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + suffix : NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 3 expressions.\n */\nfunction interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated3(lView, bindingIndex, v0, v1, v2);\n    incrementBindingIndex(3);\n    return different ?\n        prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + suffix :\n        NO_CHANGE;\n}\n/**\n * Create an interpolation binding with 4 expressions.\n */\nfunction interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const bindingIndex = getBindingIndex();\n    const different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    incrementBindingIndex(4);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 5 expressions.\n */\nfunction interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated(lView, bindingIndex + 4, v4) || different;\n    incrementBindingIndex(5);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 6 expressions.\n */\nfunction interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated2(lView, bindingIndex + 4, v4, v5) || different;\n    incrementBindingIndex(6);\n    return different ?\n        prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 + renderStringify(v2) + i2 +\n            renderStringify(v3) + i3 + renderStringify(v4) + i4 + renderStringify(v5) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 7 expressions.\n */\nfunction interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated3(lView, bindingIndex + 4, v4, v5, v6) || different;\n    incrementBindingIndex(7);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n        renderStringify(v5) + i5 + renderStringify(v6) + suffix :\n        NO_CHANGE;\n}\n/**\n * Creates an interpolation binding with 8 expressions.\n */\nfunction interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const bindingIndex = getBindingIndex();\n    let different = bindingUpdated4(lView, bindingIndex, v0, v1, v2, v3);\n    different = bindingUpdated4(lView, bindingIndex + 4, v4, v5, v6, v7) || different;\n    incrementBindingIndex(8);\n    return different ? prefix + renderStringify(v0) + i0 + renderStringify(v1) + i1 +\n        renderStringify(v2) + i2 + renderStringify(v3) + i3 + renderStringify(v4) + i4 +\n        renderStringify(v5) + i5 + renderStringify(v6) + i6 + renderStringify(v7) + suffix :\n        NO_CHANGE;\n}\n\n/**\n *\n * Update an interpolated attribute on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate1(attrName, prefix, v0, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 1, prefix, suffix);\n    }\n    return ɵɵattributeInterpolate1;\n}\n/**\n *\n * Update an interpolated attribute on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate2(attrName, prefix, v0, i0, v1, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 2, prefix, i0, suffix);\n    }\n    return ɵɵattributeInterpolate2;\n}\n/**\n *\n * Update an interpolated attribute on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate3(attrName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n    }\n    return ɵɵattributeInterpolate3;\n}\n/**\n *\n * Update an interpolated attribute on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate4(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n    }\n    return ɵɵattributeInterpolate4;\n}\n/**\n *\n * Update an interpolated attribute on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate5(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n    }\n    return ɵɵattributeInterpolate5;\n}\n/**\n *\n * Update an interpolated attribute on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate6(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n    }\n    return ɵɵattributeInterpolate6;\n}\n/**\n *\n * Update an interpolated attribute on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate7(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n    }\n    return ɵɵattributeInterpolate7;\n}\n/**\n *\n * Update an interpolated attribute on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div attr.title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param attrName The name of the attribute to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolate8(attrName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolatedValue, sanitizer, namespace);\n        ngDevMode &&\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n    }\n    return ɵɵattributeInterpolate8;\n}\n/**\n * Update an interpolated attribute on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵattributeInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param attrName The name of the attribute to update.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵattributeInterpolateV(attrName, values, sanitizer, namespace) {\n    const lView = getLView();\n    const interpolated = interpolationV(lView, values);\n    if (interpolated !== NO_CHANGE) {\n        const tNode = getSelectedTNode();\n        elementAttributeInternal(tNode, lView, attrName, interpolated, sanitizer, namespace);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(getTView().data, tNode, 'attr.' + attrName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵattributeInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Synchronously perform change detection on a component (and possibly its sub-components).\n *\n * This function triggers change detection in a synchronous way on a component.\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n    const view = getComponentViewByInstance(component);\n    detectChangesInternal(view[TVIEW], view, component);\n}\n/**\n * Marks the component as dirty (needing change detection). Marking a component dirty will\n * schedule a change detection on it at some point in the future.\n *\n * Marking an already dirty component as dirty won't do anything. Only one outstanding change\n * detection can be scheduled per component tree.\n *\n * @param component Component to mark as dirty.\n */\nfunction markDirty(component) {\n    ngDevMode && assertDefined(component, 'component');\n    const rootView = markViewDirty(getComponentViewByInstance(component));\n    ngDevMode && assertDefined(rootView[CONTEXT], 'rootContext should be defined');\n    scheduleTick(rootView[CONTEXT], 1 /* DetectChanges */);\n}\n/**\n * Used to perform change detection on the whole application.\n *\n * This is equivalent to `detectChanges`, but invoked on root component. Additionally, `tick`\n * executes lifecycle hooks and conditionally checks components based on their\n * `ChangeDetectionStrategy` and dirtiness.\n *\n * The preferred way to trigger change detection is to call `markDirty`. `markDirty` internally\n * schedules `tick` using a scheduler in order to coalesce multiple `markDirty` calls into a\n * single change detection run. By default, the scheduler is `requestAnimationFrame`, but can\n * be changed when calling `renderComponent` and providing the `scheduler` option.\n */\nfunction tick(component) {\n    const rootView = getRootView(component);\n    const rootContext = rootView[CONTEXT];\n    tickRootContext(rootContext);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    // TODO(pk): refactor getOrCreateTNode to have the \"create\" only version\n    const tNode = getOrCreateTNode(tView, lView[T_HOST], index, 0 /* Container */, tagName || null, getConstant(tViewConsts, attrsIndex));\n    resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n    registerPostOrderHooks(tView, tNode);\n    const embeddedTView = tNode.tViews = createTView(2 /* Embedded */, -1, templateFn, decls, vars, tView.directiveRegistry, tView.pipeRegistry, null, tView.schemas, tViewConsts);\n    const embeddedTViewNode = createTNode(tView, null, 2 /* View */, -1, null, null);\n    embeddedTViewNode.injectorIndex = tNode.injectorIndex;\n    embeddedTView.node = embeddedTViewNode;\n    if (tView.queries !== null) {\n        tView.queries.template(tView, tNode);\n        embeddedTView.queries = tView.queries.embeddedTView(tNode);\n    }\n    return tNode;\n}\n/**\n * Creates an LContainer for an ng-template (dynamically-inserted view), e.g.\n *\n * <ng-template #foo>\n *    <div></div>\n * </ng-template>\n *\n * @param index The index of the container in the data array\n * @param templateFn Inline template\n * @param decls The number of nodes, local refs, and pipes for this template\n * @param vars The number of bindings for this template\n * @param tagName The name of the container element, if applicable\n * @param attrsIndex Index of template attributes in the `consts` array.\n * @param localRefs Index of the local references in the `consts` array.\n * @param localRefExtractor A function which extracts local-refs values from the template.\n *        Defaults to the current element associated with the local-ref.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplate(index, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex, localRefExtractor) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    const tNode = tView.firstCreatePass ?\n        templateFirstCreatePass(index, tView, lView, templateFn, decls, vars, tagName, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setPreviousOrParentTNode(tNode, false);\n    const comment = lView[RENDERER].createComment(ngDevMode ? 'container' : '');\n    appendChild(tView, lView, comment, tNode);\n    attachPatchData(comment, lView);\n    addToViewTree(lView, lView[adjustedIndex] = createLContainer(comment, lView, comment, tNode));\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n    }\n    if (localRefsIndex != null) {\n        saveResolvedLocalsInData(lView, tNode, localRefExtractor);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Store a value in the `data` at a given `index`. */\nfunction store(tView, lView, index, value) {\n    // We don't store any static data for local variables, so the first time\n    // we see the template, we should store as null to avoid a sparse array\n    const adjustedIndex = index + HEADER_OFFSET;\n    if (adjustedIndex >= tView.data.length) {\n        tView.data[adjustedIndex] = null;\n        tView.blueprint[adjustedIndex] = null;\n    }\n    lView[adjustedIndex] = value;\n}\n/**\n * Retrieves a local reference from the current contextViewData.\n *\n * If the reference to retrieve is in a parent view, this instruction is used in conjunction\n * with a nextContext() call, which walks up the tree and updates the contextViewData instance.\n *\n * @param index The index of the local ref in contextViewData.\n *\n * @codeGenApi\n */\nfunction ɵɵreference(index) {\n    const contextLView = getContextLView();\n    return load(contextLView, index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ɵɵdirectiveInject(token, flags = InjectFlags.Default) {\n    const lView = getLView();\n    // Fall back to inject() if view hasn't been created. This situation can happen in tests\n    // if inject utilities are used before bootstrapping.\n    if (lView == null)\n        return ɵɵinject(token, flags);\n    const tNode = getPreviousOrParentTNode();\n    return getOrCreateInjectable(tNode, lView, resolveForwardRef(token), flags);\n}\n/**\n * Facade for the attribute injection from DI.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectAttribute(attrNameToInject) {\n    return injectAttributeImpl(getPreviousOrParentTNode(), attrNameToInject);\n}\n/**\n * Throws an error indicating that a factory function could not be generated by the compiler for a\n * particular class.\n *\n * This instruction allows the actual error message to be optimized away when ngDevMode is turned\n * off, saving bytes of generated code while still providing a good experience in dev mode.\n *\n * The name of the class is not mentioned here, but will be in the generated factory function name\n * and thus in the stack trace.\n *\n * @codeGenApi\n */\nfunction ɵɵinvalidFactory() {\n    const msg = ngDevMode ? `This constructor was not compatible with Dependency Injection.` : 'invalid';\n    throw new Error(msg);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a selected element.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵproperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, false);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵproperty;\n}\n/**\n * Given `<div style=\"...\" my-dir>` and `MyDir` with `@Input('style')` we need to write to\n * directive input.\n */\nfunction setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased) {\n    const inputs = tNode.inputs;\n    const property = isClassBased ? 'class' : 'style';\n    // We support both 'class' and `className` hence the fallback.\n    setInputsForProperty(tView, lView, inputs[property], property, value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) {\n    ngDevMode && assertFirstCreatePass(tView);\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, lView[T_HOST], index, 3 /* Element */, name, attrs);\n    const hasDirectives = resolveDirectives(tView, lView, tNode, getConstant(tViewConsts, localRefsIndex));\n    ngDevMode && logUnknownElementError(tView, native, tNode, hasDirectives);\n    if (tNode.attrs !== null) {\n        computeStaticStyling(tNode, tNode.attrs, false);\n    }\n    if (tNode.mergedAttrs !== null) {\n        computeStaticStyling(tNode, tNode.mergedAttrs, true);\n    }\n    if (tView.queries !== null) {\n        tView.queries.elementStart(tView, tNode);\n    }\n    return tNode;\n}\n/**\n * Create DOM element. The instruction must later be followed by `elementEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * Attributes and localRefs are passed as an array of strings where elements with an even index\n * hold an attribute name and elements with an odd index hold an attribute value, ex.:\n * ['id', 'warning5', 'class', 'alert']\n *\n * @codeGenApi\n */\nfunction ɵɵelementStart(index, name, attrsIndex, localRefsIndex) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = HEADER_OFFSET + index;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'elements should be created before any bindings');\n    ngDevMode && ngDevMode.rendererCreateElement++;\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const renderer = lView[RENDERER];\n    const native = lView[adjustedIndex] = elementCreate(name, renderer, getNamespace());\n    const tNode = tView.firstCreatePass ?\n        elementStartFirstCreatePass(index, tView, lView, native, name, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setPreviousOrParentTNode(tNode, true);\n    const mergedAttrs = tNode.mergedAttrs;\n    if (mergedAttrs !== null) {\n        setUpAttributes(renderer, native, mergedAttrs);\n    }\n    const classes = tNode.classes;\n    if (classes !== null) {\n        writeDirectClass(renderer, native, classes);\n    }\n    const styles = tNode.styles;\n    if (styles !== null) {\n        writeDirectStyle(renderer, native, styles);\n    }\n    appendChild(tView, lView, native, tNode);\n    // any immediate children of a component or template container must be pre-emptively\n    // monkey-patched with the component view data so that the element can be inspected\n    // later on using any element discovery utility methods (see `element_discovery.ts`)\n    if (getElementDepthCount() === 0) {\n        attachPatchData(native, lView);\n    }\n    increaseElementDepthCount();\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n        executeContentQueries(tView, tNode, lView);\n    }\n    if (localRefsIndex !== null) {\n        saveResolvedLocalsInData(lView, tNode);\n    }\n}\n/**\n * Mark the end of the element.\n *\n * @codeGenApi\n */\nfunction ɵɵelementEnd() {\n    let previousOrParentTNode = getPreviousOrParentTNode();\n    ngDevMode && assertDefined(previousOrParentTNode, 'No parent node to close.');\n    if (getIsParent()) {\n        setIsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(getPreviousOrParentTNode());\n        previousOrParentTNode = previousOrParentTNode.parent;\n        setPreviousOrParentTNode(previousOrParentTNode, false);\n    }\n    const tNode = previousOrParentTNode;\n    ngDevMode && assertNodeType(tNode, 3 /* Element */);\n    decreaseElementDepthCount();\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, previousOrParentTNode);\n        if (isContentQueryHost(previousOrParentTNode)) {\n            tView.queries.elementEnd(previousOrParentTNode);\n        }\n    }\n    if (tNode.classesWithoutHost != null && hasClassInput(tNode)) {\n        setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.classesWithoutHost, true);\n    }\n    if (tNode.stylesWithoutHost != null && hasStyleInput(tNode)) {\n        setDirectiveInputsWhichShadowsStyling(tView, tNode, getLView(), tNode.stylesWithoutHost, false);\n    }\n}\n/**\n * Creates an empty element using {@link elementStart} and {@link elementEnd}\n *\n * @param index Index of the element in the data array\n * @param name Name of the DOM Node\n * @param attrsIndex Index of the element's attributes in the `consts` array.\n * @param localRefsIndex Index of the element's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelement(index, name, attrsIndex, localRefsIndex) {\n    ɵɵelementStart(index, name, attrsIndex, localRefsIndex);\n    ɵɵelementEnd();\n}\nfunction logUnknownElementError(tView, element, tNode, hasDirectives) {\n    const schemas = tView.schemas;\n    // If `schemas` is set to `null`, that's an indication that this Component was compiled in AOT\n    // mode where this check happens at compile time. In JIT mode, `schemas` is always present and\n    // defined as an array (as an empty array in case `schemas` field is not defined) and we should\n    // execute the check below.\n    if (schemas === null)\n        return;\n    const tagName = tNode.tagName;\n    // If the element matches any directive, it's considered as valid.\n    if (!hasDirectives && tagName !== null) {\n        // The element is unknown if it's an instance of HTMLUnknownElement or it isn't registered\n        // as a custom element. Note that unknown elements with a dash in their name won't be instances\n        // of HTMLUnknownElement in browsers that support web components.\n        const isUnknown = \n        // Note that we can't check for `typeof HTMLUnknownElement === 'function'`,\n        // because while most browsers return 'function', IE returns 'object'.\n        (typeof HTMLUnknownElement !== 'undefined' && HTMLUnknownElement &&\n            element instanceof HTMLUnknownElement) ||\n            (typeof customElements !== 'undefined' && tagName.indexOf('-') > -1 &&\n                !customElements.get(tagName));\n        if (isUnknown && !matchingSchemas(tView, tagName)) {\n            let message = `'${tagName}' is not a known element:\\n`;\n            message += `1. If '${tagName}' is an Angular component, then verify that it is part of this module.\\n`;\n            if (tagName && tagName.indexOf('-') > -1) {\n                message += `2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.`;\n            }\n            else {\n                message +=\n                    `2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.`;\n            }\n            console.error(message);\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) {\n    ngDevMode && ngDevMode.firstCreatePass++;\n    const tViewConsts = tView.consts;\n    const attrs = getConstant(tViewConsts, attrsIndex);\n    const tNode = getOrCreateTNode(tView, lView[T_HOST], index, 4 /* ElementContainer */, 'ng-container', attrs);\n    // While ng-container doesn't necessarily support styling, we use the style context to identify\n    // and execute directives on the ng-container.\n    if (attrs !== null) {\n        computeStaticStyling(tNode, attrs, true);\n    }\n    const localRefs = getConstant(tViewConsts, localRefsIndex);\n    resolveDirectives(tView, lView, tNode, localRefs);\n    if (tView.queries !== null) {\n        tView.queries.elementStart(tView, tNode);\n    }\n    return tNode;\n}\n/**\n * Creates a logical container for other nodes (<ng-container>) backed by a comment node in the DOM.\n * The instruction must later be followed by `elementContainerEnd()` call.\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * Even if this instruction accepts a set of attributes no actual attribute values are propagated to\n * the DOM (as a comment node can't have attributes). Attributes are here only for directive\n * matching purposes and setting initial inputs of directives.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerStart(index, attrsIndex, localRefsIndex) {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'element containers should be created before any bindings');\n    const tNode = tView.firstCreatePass ?\n        elementContainerStartFirstCreatePass(index, tView, lView, attrsIndex, localRefsIndex) :\n        tView.data[adjustedIndex];\n    setPreviousOrParentTNode(tNode, true);\n    ngDevMode && ngDevMode.rendererCreateComment++;\n    const native = lView[adjustedIndex] =\n        lView[RENDERER].createComment(ngDevMode ? 'ng-container' : '');\n    appendChild(tView, lView, native, tNode);\n    attachPatchData(native, lView);\n    if (isDirectiveHost(tNode)) {\n        createDirectivesInstances(tView, lView, tNode);\n        executeContentQueries(tView, tNode, lView);\n    }\n    if (localRefsIndex != null) {\n        saveResolvedLocalsInData(lView, tNode);\n    }\n}\n/**\n * Mark the end of the <ng-container>.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainerEnd() {\n    let previousOrParentTNode = getPreviousOrParentTNode();\n    const tView = getTView();\n    if (getIsParent()) {\n        setIsNotParent();\n    }\n    else {\n        ngDevMode && assertHasParent(previousOrParentTNode);\n        previousOrParentTNode = previousOrParentTNode.parent;\n        setPreviousOrParentTNode(previousOrParentTNode, false);\n    }\n    ngDevMode && assertNodeType(previousOrParentTNode, 4 /* ElementContainer */);\n    if (tView.firstCreatePass) {\n        registerPostOrderHooks(tView, previousOrParentTNode);\n        if (isContentQueryHost(previousOrParentTNode)) {\n            tView.queries.elementEnd(previousOrParentTNode);\n        }\n    }\n}\n/**\n * Creates an empty logical container using {@link elementContainerStart}\n * and {@link elementContainerEnd}\n *\n * @param index Index of the element in the LView array\n * @param attrsIndex Index of the container attributes in the `consts` array.\n * @param localRefsIndex Index of the container's local references in the `consts` array.\n *\n * @codeGenApi\n */\nfunction ɵɵelementContainer(index, attrsIndex, localRefsIndex) {\n    ɵɵelementContainerStart(index, attrsIndex, localRefsIndex);\n    ɵɵelementContainerEnd();\n}\n\n/**\n * Returns the current OpaqueViewState instance.\n *\n * Used in conjunction with the restoreView() instruction to save a snapshot\n * of the current view and restore it when listeners are invoked. This allows\n * walking the declaration view tree in listeners to get vars from parent views.\n *\n * @codeGenApi\n */\nfunction ɵɵgetCurrentView() {\n    return getLView();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Determine if the argument is shaped like a Promise\n */\nfunction isPromise(obj) {\n    // allow any Promise/A+ compliant thenable.\n    // It's up to the caller to ensure that obj.then conforms to the spec\n    return !!obj && typeof obj.then === 'function';\n}\n/**\n * Determine if the argument is an Observable\n */\nfunction isObservable(obj) {\n    // TODO: use isObservable once we update pass rxjs 6.1\n    // https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#610-2018-05-03\n    return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds an event listener to the current node.\n *\n * If an output exists on one of the node's directives, it also subscribes to the output\n * and saves the subscription for later cleanup.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵlistener(eventName, listenerFn, useCapture = false, eventTargetResolver) {\n    const lView = getLView();\n    const tView = getTView();\n    const tNode = getPreviousOrParentTNode();\n    listenerInternal(tView, lView, lView[RENDERER], tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n    return ɵɵlistener;\n}\n/**\n * Registers a synthetic host listener (e.g. `(@foo.start)`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host listener (e.g. `@HostListener('@foo.start')`) properly gets rendered\n * in the component's renderer. Normally all host listeners are evaluated with the\n * parent component's renderer, but, in the case of animation @triggers, they need\n * to be evaluated with the sub component's renderer (because that's where the\n * animation triggers are defined).\n *\n * Do not use this instruction as a replacement for `listener`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param eventName Name of the event\n * @param listenerFn The function to be called when event emits\n * @param useCapture Whether or not to use capture in event listener\n * @param eventTargetResolver Function that returns global target information in case this listener\n * should be attached to a global object like window, document or body\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostListener(eventName, listenerFn, useCapture = false, eventTargetResolver) {\n    const tNode = getPreviousOrParentTNode();\n    const lView = getLView();\n    const tView = getTView();\n    const currentDef = getCurrentDirectiveDef(tView.data);\n    const renderer = loadComponentRenderer(currentDef, tNode, lView);\n    listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture, eventTargetResolver);\n    return ɵɵsyntheticHostListener;\n}\n/**\n * A utility function that checks if a given element has already an event handler registered for an\n * event with a specified name. The TView.cleanup data structure is used to find out which events\n * are registered for a given element.\n */\nfunction findExistingListener(tView, lView, eventName, tNodeIdx) {\n    const tCleanup = tView.cleanup;\n    if (tCleanup != null) {\n        for (let i = 0; i < tCleanup.length - 1; i += 2) {\n            const cleanupEventName = tCleanup[i];\n            if (cleanupEventName === eventName && tCleanup[i + 1] === tNodeIdx) {\n                // We have found a matching event name on the same node but it might not have been\n                // registered yet, so we must explicitly verify entries in the LView cleanup data\n                // structures.\n                const lCleanup = lView[CLEANUP];\n                const listenerIdxInLCleanup = tCleanup[i + 2];\n                return lCleanup.length > listenerIdxInLCleanup ? lCleanup[listenerIdxInLCleanup] : null;\n            }\n            // TView.cleanup can have a mix of 4-elements entries (for event handler cleanups) or\n            // 2-element entries (for directive and queries destroy hooks). As such we can encounter\n            // blocks of 4 or 2 items in the tView.cleanup and this is why we iterate over 2 elements\n            // first and jump another 2 elements if we detect listeners cleanup (4 elements). Also check\n            // documentation of TView.cleanup for more details of this data structure layout.\n            if (typeof cleanupEventName === 'string') {\n                i += 2;\n            }\n        }\n    }\n    return null;\n}\nfunction listenerInternal(tView, lView, renderer, tNode, eventName, listenerFn, useCapture = false, eventTargetResolver) {\n    const isTNodeDirectiveHost = isDirectiveHost(tNode);\n    const firstCreatePass = tView.firstCreatePass;\n    const tCleanup = firstCreatePass && (tView.cleanup || (tView.cleanup = []));\n    // When the ɵɵlistener instruction was generated and is executed we know that there is either a\n    // native listener or a directive output on this element. As such we we know that we will have to\n    // register a listener and store its cleanup function on LView.\n    const lCleanup = getLCleanup(lView);\n    ngDevMode &&\n        assertNodeOfPossibleTypes(tNode, [3 /* Element */, 0 /* Container */, 4 /* ElementContainer */]);\n    let processOutputs = true;\n    // add native event listener - applicable to elements only\n    if (tNode.type === 3 /* Element */) {\n        const native = getNativeByTNode(tNode, lView);\n        const resolved = eventTargetResolver ? eventTargetResolver(native) : EMPTY_OBJ;\n        const target = resolved.target || native;\n        const lCleanupIndex = lCleanup.length;\n        const idxOrTargetGetter = eventTargetResolver ?\n            (_lView) => eventTargetResolver(unwrapRNode(_lView[tNode.index])).target :\n            tNode.index;\n        // In order to match current behavior, native DOM event listeners must be added for all\n        // events (including outputs).\n        if (isProceduralRenderer(renderer)) {\n            // There might be cases where multiple directives on the same element try to register an event\n            // handler function for the same event. In this situation we want to avoid registration of\n            // several native listeners as each registration would be intercepted by NgZone and\n            // trigger change detection. This would mean that a single user action would result in several\n            // change detections being invoked. To avoid this situation we want to have only one call to\n            // native handler registration (for the same element and same type of event).\n            //\n            // In order to have just one native event handler in presence of multiple handler functions,\n            // we just register a first handler function as a native event listener and then chain\n            // (coalesce) other handler functions on top of the first native handler function.\n            let existingListener = null;\n            // Please note that the coalescing described here doesn't happen for events specifying an\n            // alternative target (ex. (document:click)) - this is to keep backward compatibility with the\n            // view engine.\n            // Also, we don't have to search for existing listeners is there are no directives\n            // matching on a given node as we can't register multiple event handlers for the same event in\n            // a template (this would mean having duplicate attributes).\n            if (!eventTargetResolver && isTNodeDirectiveHost) {\n                existingListener = findExistingListener(tView, lView, eventName, tNode.index);\n            }\n            if (existingListener !== null) {\n                // Attach a new listener to coalesced listeners list, maintaining the order in which\n                // listeners are registered. For performance reasons, we keep a reference to the last\n                // listener in that list (in `__ngLastListenerFn__` field), so we can avoid going through\n                // the entire set each time we need to add a new listener.\n                const lastListenerFn = existingListener.__ngLastListenerFn__ || existingListener;\n                lastListenerFn.__ngNextListenerFn__ = listenerFn;\n                existingListener.__ngLastListenerFn__ = listenerFn;\n                processOutputs = false;\n            }\n            else {\n                // The first argument of `listen` function in Procedural Renderer is:\n                // - either a target name (as a string) in case of global target (window, document, body)\n                // - or element reference (in all other cases)\n                listenerFn = wrapListener(tNode, lView, listenerFn, false /** preventDefault */);\n                const cleanupFn = renderer.listen(resolved.name || target, eventName, listenerFn);\n                ngDevMode && ngDevMode.rendererAddEventListener++;\n                lCleanup.push(listenerFn, cleanupFn);\n                tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, lCleanupIndex + 1);\n            }\n        }\n        else {\n            listenerFn = wrapListener(tNode, lView, listenerFn, true /** preventDefault */);\n            target.addEventListener(eventName, listenerFn, useCapture);\n            ngDevMode && ngDevMode.rendererAddEventListener++;\n            lCleanup.push(listenerFn);\n            tCleanup && tCleanup.push(eventName, idxOrTargetGetter, lCleanupIndex, useCapture);\n        }\n    }\n    // subscribe to directive outputs\n    const outputs = tNode.outputs;\n    let props;\n    if (processOutputs && outputs !== null && (props = outputs[eventName])) {\n        const propsLength = props.length;\n        if (propsLength) {\n            for (let i = 0; i < propsLength; i += 2) {\n                const index = props[i];\n                ngDevMode && assertIndexInRange(lView, index);\n                const minifiedName = props[i + 1];\n                const directiveInstance = lView[index];\n                const output = directiveInstance[minifiedName];\n                if (ngDevMode && !isObservable(output)) {\n                    throw new Error(`@Output ${minifiedName} not initialized in '${directiveInstance.constructor.name}'.`);\n                }\n                const subscription = output.subscribe(listenerFn);\n                const idx = lCleanup.length;\n                lCleanup.push(listenerFn, subscription);\n                tCleanup && tCleanup.push(eventName, tNode.index, idx, -(idx + 1));\n            }\n        }\n    }\n}\nfunction executeListenerWithErrorHandling(lView, listenerFn, e) {\n    try {\n        // Only explicitly returning false from a listener should preventDefault\n        return listenerFn(e) !== false;\n    }\n    catch (error) {\n        handleError(lView, error);\n        return false;\n    }\n}\n/**\n * Wraps an event listener with a function that marks ancestors dirty and prevents default behavior,\n * if applicable.\n *\n * @param tNode The TNode associated with this listener\n * @param lView The LView that contains this listener\n * @param listenerFn The listener function to call\n * @param wrapWithPreventDefault Whether or not to prevent default behavior\n * (the procedural renderer does this already, so in those cases, we should skip)\n */\nfunction wrapListener(tNode, lView, listenerFn, wrapWithPreventDefault) {\n    // Note: we are performing most of the work in the listener function itself\n    // to optimize listener registration.\n    return function wrapListenerIn_markDirtyAndPreventDefault(e) {\n        // Ivy uses `Function` as a special token that allows us to unwrap the function\n        // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`.\n        if (e === Function) {\n            return listenerFn;\n        }\n        // In order to be backwards compatible with View Engine, events on component host nodes\n        // must also mark the component view itself dirty (i.e. the view that it owns).\n        const startView = tNode.flags & 2 /* isComponentHost */ ?\n            getComponentLViewByIndex(tNode.index, lView) :\n            lView;\n        // See interfaces/view.ts for more on LViewFlags.ManualOnPush\n        if ((lView[FLAGS] & 32 /* ManualOnPush */) === 0) {\n            markViewDirty(startView);\n        }\n        let result = executeListenerWithErrorHandling(lView, listenerFn, e);\n        // A just-invoked listener function might have coalesced listeners so we need to check for\n        // their presence and invoke as needed.\n        let nextListenerFn = wrapListenerIn_markDirtyAndPreventDefault.__ngNextListenerFn__;\n        while (nextListenerFn) {\n            // We should prevent default if any of the listeners explicitly return false\n            result = executeListenerWithErrorHandling(lView, nextListenerFn, e) && result;\n            nextListenerFn = nextListenerFn.__ngNextListenerFn__;\n        }\n        if (wrapWithPreventDefault && result === false) {\n            e.preventDefault();\n            // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n            e.returnValue = false;\n        }\n        return result;\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves a context at the level specified and saves it as the global, contextViewData.\n * Will get the next level up if level is not specified.\n *\n * This is used to save contexts of parent views so they can be bound in embedded views, or\n * in conjunction with reference() to bind a ref from a parent view.\n *\n * @param level The relative level of the view from which to grab context compared to contextVewData\n * @returns context\n *\n * @codeGenApi\n */\nfunction ɵɵnextContext(level = 1) {\n    return nextContextImpl(level);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Checks a given node against matching projection slots and returns the\n * determined slot index. Returns \"null\" if no slot matched the given node.\n *\n * This function takes into account the parsed ngProjectAs selector from the\n * node's attributes. If present, it will check whether the ngProjectAs selector\n * matches any of the projection slot selectors.\n */\nfunction matchingProjectionSlotIndex(tNode, projectionSlots) {\n    let wildcardNgContentIndex = null;\n    const ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n    for (let i = 0; i < projectionSlots.length; i++) {\n        const slotValue = projectionSlots[i];\n        // The last wildcard projection slot should match all nodes which aren't matching\n        // any selector. This is necessary to be backwards compatible with view engine.\n        if (slotValue === '*') {\n            wildcardNgContentIndex = i;\n            continue;\n        }\n        // If we ran into an `ngProjectAs` attribute, we should match its parsed selector\n        // to the list of selectors, otherwise we fall back to matching against the node.\n        if (ngProjectAsAttrVal === null ?\n            isNodeMatchingSelectorList(tNode, slotValue, /* isProjectionMode */ true) :\n            isSelectorInSelectorList(ngProjectAsAttrVal, slotValue)) {\n            return i; // first matching selector \"captures\" a given node\n        }\n    }\n    return wildcardNgContentIndex;\n}\n/**\n * Instruction to distribute projectable nodes among <ng-content> occurrences in a given template.\n * It takes all the selectors from the entire component's template and decides where\n * each projected node belongs (it re-distributes nodes among \"buckets\" where each \"bucket\" is\n * backed by a selector).\n *\n * This function requires CSS selectors to be provided in 2 forms: parsed (by a compiler) and text,\n * un-parsed form.\n *\n * The parsed form is needed for efficient matching of a node against a given CSS selector.\n * The un-parsed, textual form is needed for support of the ngProjectAs attribute.\n *\n * Having a CSS selector in 2 different formats is not ideal, but alternatives have even more\n * drawbacks:\n * - having only a textual form would require runtime parsing of CSS selectors;\n * - we can't have only a parsed as we can't re-construct textual form from it (as entered by a\n * template author).\n *\n * @param projectionSlots? A collection of projection slots. A projection slot can be based\n *        on a parsed CSS selectors or set to the wildcard selector (\"*\") in order to match\n *        all nodes which do not match any selector. If not specified, a single wildcard\n *        selector projection slot will be defined.\n *\n * @codeGenApi\n */\nfunction ɵɵprojectionDef(projectionSlots) {\n    const componentNode = getLView()[DECLARATION_COMPONENT_VIEW][T_HOST];\n    if (!componentNode.projection) {\n        // If no explicit projection slots are defined, fall back to a single\n        // projection slot with the wildcard selector.\n        const numProjectionSlots = projectionSlots ? projectionSlots.length : 1;\n        const projectionHeads = componentNode.projection =\n            newArray(numProjectionSlots, null);\n        const tails = projectionHeads.slice();\n        let componentChild = componentNode.child;\n        while (componentChild !== null) {\n            const slotIndex = projectionSlots ? matchingProjectionSlotIndex(componentChild, projectionSlots) : 0;\n            if (slotIndex !== null) {\n                if (tails[slotIndex]) {\n                    tails[slotIndex].projectionNext = componentChild;\n                }\n                else {\n                    projectionHeads[slotIndex] = componentChild;\n                }\n                tails[slotIndex] = componentChild;\n            }\n            componentChild = componentChild.next;\n        }\n    }\n}\nlet delayProjection = false;\nfunction setDelayProjection(value) {\n    delayProjection = value;\n}\n/**\n * Inserts previously re-distributed projected nodes. This instruction must be preceded by a call\n * to the projectionDef instruction.\n *\n * @param nodeIndex\n * @param selectorIndex:\n *        - 0 when the selector is `*` (or unspecified as this is the default value),\n *        - 1 based index of the selector from the {@link projectionDef}\n *\n * @codeGenApi\n */\nfunction ɵɵprojection(nodeIndex, selectorIndex = 0, attrs) {\n    const lView = getLView();\n    const tView = getTView();\n    const tProjectionNode = getOrCreateTNode(tView, lView[T_HOST], nodeIndex, 1 /* Projection */, null, attrs || null);\n    // We can't use viewData[HOST_NODE] because projection nodes can be nested in embedded views.\n    if (tProjectionNode.projection === null)\n        tProjectionNode.projection = selectorIndex;\n    // `<ng-content>` has no content\n    setIsNotParent();\n    // We might need to delay the projection of nodes if they are in the middle of an i18n block\n    if (!delayProjection) {\n        // re-distribution of projectable nodes is stored on a component's view level\n        applyProjection(tView, lView, tProjectionNode);\n    }\n}\n\n/**\n *\n * Update an interpolated property on an element with a lone bound value\n *\n * Used when the value passed to a property has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div title=\"{{v0}}\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate('title', v0);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate(propName, v0, sanitizer) {\n    ɵɵpropertyInterpolate1(propName, '', v0, '', sanitizer);\n    return ɵɵpropertyInterpolate;\n}\n/**\n *\n * Update an interpolated property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate1('title', 'prefix', v0, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate1(propName, prefix, v0, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 1, prefix, suffix);\n    }\n    return ɵɵpropertyInterpolate1;\n}\n/**\n *\n * Update an interpolated property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate2('title', 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate2(propName, prefix, v0, i0, v1, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 2, prefix, i0, suffix);\n    }\n    return ɵɵpropertyInterpolate2;\n}\n/**\n *\n * Update an interpolated property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate3(\n * 'title', 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate3(propName, prefix, v0, i0, v1, i1, v2, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 3, prefix, i0, i1, suffix);\n    }\n    return ɵɵpropertyInterpolate3;\n}\n/**\n *\n * Update an interpolated property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate4(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate4(propName, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 4, prefix, i0, i1, i2, suffix);\n    }\n    return ɵɵpropertyInterpolate4;\n}\n/**\n *\n * Update an interpolated property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate5(\n * 'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate5(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 5, prefix, i0, i1, i2, i3, suffix);\n    }\n    return ɵɵpropertyInterpolate5;\n}\n/**\n *\n * Update an interpolated property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate6(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate6(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 6, prefix, i0, i1, i2, i3, i4, suffix);\n    }\n    return ɵɵpropertyInterpolate6;\n}\n/**\n *\n * Update an interpolated property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate7(\n *    'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate7(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 7, prefix, i0, i1, i2, i3, i4, i5, suffix);\n    }\n    return ɵɵpropertyInterpolate7;\n}\n/**\n *\n * Update an interpolated property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolate8(\n *  'title', 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolate8(propName, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        ngDevMode &&\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - 8, prefix, i0, i1, i2, i3, i4, i5, i6, suffix);\n    }\n    return ɵɵpropertyInterpolate8;\n}\n/**\n * Update an interpolated property on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  title=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is::\n *\n * ```ts\n * ɵɵpropertyInterpolateV(\n *  'title', ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * If the property name also exists as an input property on one of the element's directives,\n * the component property will be set instead of the element property. This check must\n * be conducted at runtime so child components that add new `@Inputs` don't have to be re-compiled.\n *\n * @param propName The name of the property to update.\n * @param values The collection of values and the strings inbetween those values, beginning with a\n * string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param sanitizer An optional sanitizer function\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵpropertyInterpolateV(propName, values, sanitizer) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    if (interpolatedValue !== NO_CHANGE) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, interpolatedValue, lView[RENDERER], sanitizer, false);\n        if (ngDevMode) {\n            const interpolationInBetween = [values[0]]; // prefix\n            for (let i = 2; i < values.length; i += 2) {\n                interpolationInBetween.push(values[i]);\n            }\n            storePropertyBindingMetadata(tView.data, tNode, propName, getBindingIndex() - interpolationInBetween.length + 1, ...interpolationInBetween);\n        }\n    }\n    return ɵɵpropertyInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file contains reuseable \"empty\" symbols that can be used as default return values\n * in different parts of the rendering code. Because the same symbols are returned, this\n * allows for identity checks against these values to be consistently used by the framework\n * code.\n */\nconst EMPTY_OBJ$1 = {};\nconst EMPTY_ARRAY$3 = [];\n// freezing the values prevents any code from accidentally inserting new values in\nif ((typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode()) {\n    // These property accesses can be ignored because ngDevMode will be set to false\n    // when optimizing code and the whole if statement will be dropped.\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_OBJ$1);\n    // tslint:disable-next-line:no-toplevel-property-access\n    Object.freeze(EMPTY_ARRAY$3);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: The word `styling` is used interchangeably as style or class styling.\n *\n * This file contains code to link styling instructions together so that they can be replayed in\n * priority order. The file exists because Ivy styling instruction execution order does not match\n * that of the priority order. The purpose of this code is to create a linked list so that the\n * instructions can be traversed in priority order when computing the styles.\n *\n * Assume we are dealing with the following code:\n * ```\n * @Component({\n *   template: `\n *     <my-cmp [style]=\" {color: '#001'} \"\n *             [style.color]=\" #002 \"\n *             dir-style-color-1\n *             dir-style-color-2> `\n * })\n * class ExampleComponent {\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#001'});\n *     ɵɵstyleProp('color', '#002');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-1]',\n * })\n * class Style1Directive {\n *   @HostBinding('style') style = {color: '#005'};\n *   @HostBinding('style.color') color = '#006';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#005'});\n *     ɵɵstyleProp('color', '#006');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `[dir-style-color-2]',\n * })\n * class Style2Directive {\n *   @HostBinding('style') style = {color: '#007'};\n *   @HostBinding('style.color') color = '#008';\n *\n *   static ngDir = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#007'});\n *     ɵɵstyleProp('color', '#008');\n *     ...\n *   }\n * }\n *\n * @Directive({\n *   selector: `my-cmp',\n * })\n * class MyComponent {\n *   @HostBinding('style') style = {color: '#003'};\n *   @HostBinding('style.color') color = '#004';\n *\n *   static ngComp = ... {\n *     ...\n *     // Compiler ensures that `ɵɵstyleProp` is after `ɵɵstyleMap`\n *     ɵɵstyleMap({color: '#003'});\n *     ɵɵstyleProp('color', '#004');\n *     ...\n *   }\n * }\n * ```\n *\n * The Order of instruction execution is:\n *\n * NOTE: the comment binding location is for illustrative purposes only.\n *\n * ```\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * ```\n *\n * The correct priority order of concatenation is:\n *\n * ```\n * // MyComponent\n *     ɵɵstyleMap({color: '#003'});   // Binding index: 20\n *     ɵɵstyleProp('color', '#004');  // Binding index: 22\n * // Style1Directive\n *     ɵɵstyleMap({color: '#005'});   // Binding index: 24\n *     ɵɵstyleProp('color', '#006');  // Binding index: 26\n * // Style2Directive\n *     ɵɵstyleMap({color: '#007'});   // Binding index: 28\n *     ɵɵstyleProp('color', '#008');  // Binding index: 30\n * // Template: (ExampleComponent)\n *     ɵɵstyleMap({color: '#001'});   // Binding index: 10\n *     ɵɵstyleProp('color', '#002');  // Binding index: 12\n * ```\n *\n * What color should be rendered?\n *\n * Once the items are correctly sorted in the list, the answer is simply the last item in the\n * concatenation list which is `#002`.\n *\n * To do so we keep a linked list of all of the bindings which pertain to this element.\n * Notice that the bindings are inserted in the order of execution, but the `TView.data` allows\n * us to traverse them in the order of priority.\n *\n * |Idx|`TView.data`|`LView`          | Notes\n * |---|------------|-----------------|--------------\n * |...|            |                 |\n * |10 |`null`      |`{color: '#001'}`| `ɵɵstyleMap('color', {color: '#001'})`\n * |11 |`30 | 12`   | ...             |\n * |12 |`color`     |`'#002'`         | `ɵɵstyleProp('color', '#002')`\n * |13 |`10 | 0`    | ...             |\n * |...|            |                 |\n * |20 |`null`      |`{color: '#003'}`| `ɵɵstyleMap('color', {color: '#003'})`\n * |21 |`0 | 22`    | ...             |\n * |22 |`color`     |`'#004'`         | `ɵɵstyleProp('color', '#004')`\n * |23 |`20 | 24`   | ...             |\n * |24 |`null`      |`{color: '#005'}`| `ɵɵstyleMap('color', {color: '#005'})`\n * |25 |`22 | 26`   | ...             |\n * |26 |`color`     |`'#006'`         | `ɵɵstyleProp('color', '#006')`\n * |27 |`24 | 28`   | ...             |\n * |28 |`null`      |`{color: '#007'}`| `ɵɵstyleMap('color', {color: '#007'})`\n * |29 |`26 | 30`   | ...             |\n * |30 |`color`     |`'#008'`         | `ɵɵstyleProp('color', '#008')`\n * |31 |`28 | 10`   | ...             |\n *\n * The above data structure allows us to re-concatenate the styling no matter which data binding\n * changes.\n *\n * NOTE: in addition to keeping track of next/previous index the `TView.data` also stores prev/next\n * duplicate bit. The duplicate bit if true says there either is a binding with the same name or\n * there is a map (which may contain the name). This information is useful in knowing if other\n * styles with higher priority need to be searched for overwrites.\n *\n * NOTE: See `should support example in 'tnode_linked_list.ts' documentation` in\n * `tnode_linked_list_spec.ts` for working example.\n */\nlet __unused_const_as_closure_does_not_like_standalone_comment_blocks__;\n/**\n * Insert new `tStyleValue` at `TData` and link existing style bindings such that we maintain linked\n * list of styles and compute the duplicate flag.\n *\n * Note: this function is executed during `firstUpdatePass` only to populate the `TView.data`.\n *\n * The function works by keeping track of `tStylingRange` which contains two pointers pointing to\n * the head/tail of the template portion of the styles.\n *  - if `isHost === false` (we are template) then insertion is at tail of `TStylingRange`\n *  - if `isHost === true` (we are host binding) then insertion is at head of `TStylingRange`\n *\n * @param tData The `TData` to insert into.\n * @param tNode `TNode` associated with the styling element.\n * @param tStylingKey See `TStylingKey`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isHostBinding `true` if the insertion is for a `hostBinding`. (insertion is in front of\n *               template.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction insertTStylingBinding(tData, tNode, tStylingKeyWithStatic, index, isHostBinding, isClassBinding) {\n    ngDevMode && assertFirstUpdatePass(getTView());\n    let tBindings = isClassBinding ? tNode.classBindings : tNode.styleBindings;\n    let tmplHead = getTStylingRangePrev(tBindings);\n    let tmplTail = getTStylingRangeNext(tBindings);\n    tData[index] = tStylingKeyWithStatic;\n    let isKeyDuplicateOfStatic = false;\n    let tStylingKey;\n    if (Array.isArray(tStylingKeyWithStatic)) {\n        // We are case when the `TStylingKey` contains static fields as well.\n        const staticKeyValueArray = tStylingKeyWithStatic;\n        tStylingKey = staticKeyValueArray[1]; // unwrap.\n        // We need to check if our key is present in the static so that we can mark it as duplicate.\n        if (tStylingKey === null ||\n            keyValueArrayIndexOf(staticKeyValueArray, tStylingKey) > 0) {\n            // tStylingKey is present in the statics, need to mark it as duplicate.\n            isKeyDuplicateOfStatic = true;\n        }\n    }\n    else {\n        tStylingKey = tStylingKeyWithStatic;\n    }\n    if (isHostBinding) {\n        // We are inserting host bindings\n        // If we don't have template bindings then `tail` is 0.\n        const hasTemplateBindings = tmplTail !== 0;\n        // This is important to know because that means that the `head` can't point to the first\n        // template bindings (there are none.) Instead the head points to the tail of the template.\n        if (hasTemplateBindings) {\n            // template head's \"prev\" will point to last host binding or to 0 if no host bindings yet\n            const previousNode = getTStylingRangePrev(tData[tmplHead + 1]);\n            tData[index + 1] = toTStylingRange(previousNode, tmplHead);\n            // if a host binding has already been registered, we need to update the next of that host\n            // binding to point to this one\n            if (previousNode !== 0) {\n                // We need to update the template-tail value to point to us.\n                tData[previousNode + 1] =\n                    setTStylingRangeNext(tData[previousNode + 1], index);\n            }\n            // The \"previous\" of the template binding head should point to this host binding\n            tData[tmplHead + 1] = setTStylingRangePrev(tData[tmplHead + 1], index);\n        }\n        else {\n            tData[index + 1] = toTStylingRange(tmplHead, 0);\n            // if a host binding has already been registered, we need to update the next of that host\n            // binding to point to this one\n            if (tmplHead !== 0) {\n                // We need to update the template-tail value to point to us.\n                tData[tmplHead + 1] = setTStylingRangeNext(tData[tmplHead + 1], index);\n            }\n            // if we don't have template, the head points to template-tail, and needs to be advanced.\n            tmplHead = index;\n        }\n    }\n    else {\n        // We are inserting in template section.\n        // We need to set this binding's \"previous\" to the current template tail\n        tData[index + 1] = toTStylingRange(tmplTail, 0);\n        ngDevMode &&\n            assertEqual(tmplHead !== 0 && tmplTail === 0, false, 'Adding template bindings after hostBindings is not allowed.');\n        if (tmplHead === 0) {\n            tmplHead = index;\n        }\n        else {\n            // We need to update the previous value \"next\" to point to this binding\n            tData[tmplTail + 1] = setTStylingRangeNext(tData[tmplTail + 1], index);\n        }\n        tmplTail = index;\n    }\n    // Now we need to update / compute the duplicates.\n    // Starting with our location search towards head (least priority)\n    if (isKeyDuplicateOfStatic) {\n        tData[index + 1] = setTStylingRangePrevDuplicate(tData[index + 1]);\n    }\n    markDuplicates(tData, tStylingKey, index, true, isClassBinding);\n    markDuplicates(tData, tStylingKey, index, false, isClassBinding);\n    markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding);\n    tBindings = toTStylingRange(tmplHead, tmplTail);\n    if (isClassBinding) {\n        tNode.classBindings = tBindings;\n    }\n    else {\n        tNode.styleBindings = tBindings;\n    }\n}\n/**\n * Look into the residual styling to see if the current `tStylingKey` is duplicate of residual.\n *\n * @param tNode `TNode` where the residual is stored.\n * @param tStylingKey `TStylingKey` to store.\n * @param tData `TData` associated with the current `LView`.\n * @param index location of where `tStyleValue` should be stored (and linked into list.)\n * @param isClassBinding True if the associated `tStylingKey` as a `class` styling.\n *                       `tNode.classBindings` should be used (or `tNode.styleBindings` otherwise.)\n */\nfunction markDuplicateOfResidualStyling(tNode, tStylingKey, tData, index, isClassBinding) {\n    const residual = isClassBinding ? tNode.residualClasses : tNode.residualStyles;\n    if (residual != null /* or undefined */ && typeof tStylingKey == 'string' &&\n        keyValueArrayIndexOf(residual, tStylingKey) >= 0) {\n        // We have duplicate in the residual so mark ourselves as duplicate.\n        tData[index + 1] = setTStylingRangeNextDuplicate(tData[index + 1]);\n    }\n}\n/**\n * Marks `TStyleValue`s as duplicates if another style binding in the list has the same\n * `TStyleValue`.\n *\n * NOTE: this function is intended to be called twice once with `isPrevDir` set to `true` and once\n * with it set to `false` to search both the previous as well as next items in the list.\n *\n * No duplicate case\n * ```\n *   [style.color]\n *   [style.width.px] <<- index\n *   [style.height.px]\n * ```\n *\n * In the above case adding `[style.width.px]` to the existing `[style.color]` produces no\n * duplicates because `width` is not found in any other part of the linked list.\n *\n * Duplicate case\n * ```\n *   [style.color]\n *   [style.width.em]\n *   [style.width.px] <<- index\n * ```\n * In the above case adding `[style.width.px]` will produce a duplicate with `[style.width.em]`\n * because `width` is found in the chain.\n *\n * Map case 1\n * ```\n *   [style.width.px]\n *   [style.color]\n *   [style]  <<- index\n * ```\n * In the above case adding `[style]` will produce a duplicate with any other bindings because\n * `[style]` is a Map and as such is fully dynamic and could produce `color` or `width`.\n *\n * Map case 2\n * ```\n *   [style]\n *   [style.width.px]\n *   [style.color]  <<- index\n * ```\n * In the above case adding `[style.color]` will produce a duplicate because there is already a\n * `[style]` binding which is a Map and as such is fully dynamic and could produce `color` or\n * `width`.\n *\n * NOTE: Once `[style]` (Map) is added into the system all things are mapped as duplicates.\n * NOTE: We use `style` as example, but same logic is applied to `class`es as well.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tStylingKey `TStylingKeyPrimitive` which contains the value to compare to other keys in\n *        the linked list.\n * @param index Starting location in the linked list to search from\n * @param isPrevDir Direction.\n *        - `true` for previous (lower priority);\n *        - `false` for next (higher priority).\n */\nfunction markDuplicates(tData, tStylingKey, index, isPrevDir, isClassBinding) {\n    const tStylingAtIndex = tData[index + 1];\n    const isMap = tStylingKey === null;\n    let cursor = isPrevDir ? getTStylingRangePrev(tStylingAtIndex) : getTStylingRangeNext(tStylingAtIndex);\n    let foundDuplicate = false;\n    // We keep iterating as long as we have a cursor\n    // AND either:\n    // - we found what we are looking for, OR\n    // - we are a map in which case we have to continue searching even after we find what we were\n    //   looking for since we are a wild card and everything needs to be flipped to duplicate.\n    while (cursor !== 0 && (foundDuplicate === false || isMap)) {\n        ngDevMode && assertIndexInRange(tData, cursor);\n        const tStylingValueAtCursor = tData[cursor];\n        const tStyleRangeAtCursor = tData[cursor + 1];\n        if (isStylingMatch(tStylingValueAtCursor, tStylingKey)) {\n            foundDuplicate = true;\n            tData[cursor + 1] = isPrevDir ? setTStylingRangeNextDuplicate(tStyleRangeAtCursor) :\n                setTStylingRangePrevDuplicate(tStyleRangeAtCursor);\n        }\n        cursor = isPrevDir ? getTStylingRangePrev(tStyleRangeAtCursor) :\n            getTStylingRangeNext(tStyleRangeAtCursor);\n    }\n    if (foundDuplicate) {\n        // if we found a duplicate, than mark ourselves.\n        tData[index + 1] = isPrevDir ? setTStylingRangePrevDuplicate(tStylingAtIndex) :\n            setTStylingRangeNextDuplicate(tStylingAtIndex);\n    }\n}\n/**\n * Determines if two `TStylingKey`s are a match.\n *\n * When computing weather a binding contains a duplicate, we need to compare if the instruction\n * `TStylingKey` has a match.\n *\n * Here are examples of `TStylingKey`s which match given `tStylingKeyCursor` is:\n * - `color`\n *    - `color`    // Match another color\n *    - `null`     // That means that `tStylingKey` is a `classMap`/`styleMap` instruction\n *    - `['', 'color', 'other', true]` // wrapped `color` so match\n *    - `['', null, 'other', true]`       // wrapped `null` so match\n *    - `['', 'width', 'color', 'value']` // wrapped static value contains a match on `'color'`\n * - `null`       // `tStylingKeyCursor` always match as it is `classMap`/`styleMap` instruction\n *\n * @param tStylingKeyCursor\n * @param tStylingKey\n */\nfunction isStylingMatch(tStylingKeyCursor, tStylingKey) {\n    ngDevMode &&\n        assertNotEqual(Array.isArray(tStylingKey), true, 'Expected that \\'tStylingKey\\' has been unwrapped');\n    if (tStylingKeyCursor === null || // If the cursor is `null` it means that we have map at that\n        // location so we must assume that we have a match.\n        tStylingKey == null || // If `tStylingKey` is `null` then it is a map therefor assume that it\n        // contains a match.\n        (Array.isArray(tStylingKeyCursor) ? tStylingKeyCursor[1] : tStylingKeyCursor) ===\n            tStylingKey // If the keys match explicitly than we are a match.\n    ) {\n        return true;\n    }\n    else if (Array.isArray(tStylingKeyCursor) && typeof tStylingKey === 'string') {\n        // if we did not find a match, but `tStylingKeyCursor` is `KeyValueArray` that means cursor has\n        // statics and we need to check those as well.\n        return keyValueArrayIndexOf(tStylingKeyCursor, tStylingKey) >=\n            0; // see if we are matching the key\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Global state of the parser. (This makes parser non-reentrant, but that is not an issue)\nconst parserState = {\n    textEnd: 0,\n    key: 0,\n    keyEnd: 0,\n    value: 0,\n    valueEnd: 0,\n};\n/**\n * Retrieves the last parsed `key` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedKey(text) {\n    return text.substring(parserState.key, parserState.keyEnd);\n}\n/**\n * Retrieves the last parsed `value` of style.\n * @param text the text to substring the key from.\n */\nfunction getLastParsedValue(text) {\n    return text.substring(parserState.value, parserState.valueEnd);\n}\n/**\n * Initializes `className` string for parsing and parses the first token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n * @param text `className` to parse\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassName(text) {\n    resetParserState(text);\n    return parseClassNameNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses next `className` token.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n *   const key = getLastParsedKey();\n *   ...\n * }\n * ```\n *\n * @param text `className` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseClassNameNext` should resume.\n */\nfunction parseClassNameNext(text, index) {\n    const end = parserState.textEnd;\n    if (end === index) {\n        return -1;\n    }\n    index = parserState.keyEnd = consumeClassToken(text, parserState.key = index, end);\n    return consumeWhitespace(text, index, end);\n}\n/**\n * Initializes `cssText` string for parsing and parses the first key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n * ```\n * @param text `cssText` to parse\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyle(text) {\n    resetParserState(text);\n    return parseStyleNext(text, consumeWhitespace(text, 0, parserState.textEnd));\n}\n/**\n * Parses the next `cssText` key/values.\n *\n * This function is intended to be used in this format:\n * ```\n * for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i))) {\n *   const key = getLastParsedKey();\n *   const value = getLastParsedValue();\n *   ...\n * }\n *\n * @param text `cssText` to parse\n * @param index where the parsing should resume.\n * @returns index where the next invocation of `parseStyleNext` should resume.\n */\nfunction parseStyleNext(text, startIndex) {\n    const end = parserState.textEnd;\n    let index = parserState.key = consumeWhitespace(text, startIndex, end);\n    if (end === index) {\n        // we reached an end so just quit\n        return -1;\n    }\n    index = parserState.keyEnd = consumeStyleKey(text, index, end);\n    index = consumeSeparator(text, index, end, 58 /* COLON */);\n    index = parserState.value = consumeWhitespace(text, index, end);\n    index = parserState.valueEnd = consumeStyleValue(text, index, end);\n    return consumeSeparator(text, index, end, 59 /* SEMI_COLON */);\n}\n/**\n * Reset the global state of the styling parser.\n * @param text The styling text to parse.\n */\nfunction resetParserState(text) {\n    parserState.key = 0;\n    parserState.keyEnd = 0;\n    parserState.value = 0;\n    parserState.valueEnd = 0;\n    parserState.textEnd = text.length;\n}\n/**\n * Returns index of next non-whitespace character.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index of next non-whitespace character (May be the same as `start` if no whitespace at\n *          that location.)\n */\nfunction consumeWhitespace(text, startIndex, endIndex) {\n    while (startIndex < endIndex && text.charCodeAt(startIndex) <= 32 /* SPACE */) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Returns index of last char in class token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last char in class token.\n */\nfunction consumeClassToken(text, startIndex, endIndex) {\n    while (startIndex < endIndex && text.charCodeAt(startIndex) > 32 /* SPACE */) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes all of the characters belonging to style key and token.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style key character.\n */\nfunction consumeStyleKey(text, startIndex, endIndex) {\n    let ch;\n    while (startIndex < endIndex &&\n        ((ch = text.charCodeAt(startIndex)) === 45 /* DASH */ || ch === 95 /* UNDERSCORE */ ||\n            ((ch & -33 /* UPPER_CASE */) >= 65 /* A */ && (ch & -33 /* UPPER_CASE */) <= 90 /* Z */) ||\n            (ch >= 48 /* ZERO */ && ch <= 57 /* NINE */))) {\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes all whitespace and the separator `:` after the style key.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after separator and surrounding whitespace.\n */\nfunction consumeSeparator(text, startIndex, endIndex, separator) {\n    startIndex = consumeWhitespace(text, startIndex, endIndex);\n    if (startIndex < endIndex) {\n        if (ngDevMode && text.charCodeAt(startIndex) !== separator) {\n            malformedStyleError(text, String.fromCharCode(separator), startIndex);\n        }\n        startIndex++;\n    }\n    return startIndex;\n}\n/**\n * Consumes style value honoring `url()` and `\"\"` text.\n *\n * @param text Text to scan\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after last style value character.\n */\nfunction consumeStyleValue(text, startIndex, endIndex) {\n    let ch1 = -1; // 1st previous character\n    let ch2 = -1; // 2nd previous character\n    let ch3 = -1; // 3rd previous character\n    let i = startIndex;\n    let lastChIndex = i;\n    while (i < endIndex) {\n        const ch = text.charCodeAt(i++);\n        if (ch === 59 /* SEMI_COLON */) {\n            return lastChIndex;\n        }\n        else if (ch === 34 /* DOUBLE_QUOTE */ || ch === 39 /* SINGLE_QUOTE */) {\n            lastChIndex = i = consumeQuotedText(text, ch, i, endIndex);\n        }\n        else if (startIndex ===\n            i - 4 && // We have seen only 4 characters so far \"URL(\" (Ignore \"foo_URL()\")\n            ch3 === 85 /* U */ &&\n            ch2 === 82 /* R */ && ch1 === 76 /* L */ && ch === 40 /* OPEN_PAREN */) {\n            lastChIndex = i = consumeQuotedText(text, 41 /* CLOSE_PAREN */, i, endIndex);\n        }\n        else if (ch > 32 /* SPACE */) {\n            // if we have a non-whitespace character then capture its location\n            lastChIndex = i;\n        }\n        ch3 = ch2;\n        ch2 = ch1;\n        ch1 = ch & -33 /* UPPER_CASE */;\n    }\n    return lastChIndex;\n}\n/**\n * Consumes all of the quoted characters.\n *\n * @param text Text to scan\n * @param quoteCharCode CharCode of either `\"` or `'` quote or `)` for `url(...)`.\n * @param startIndex Starting index of character where the scan should start.\n * @param endIndex Ending index of character where the scan should end.\n * @returns Index after quoted characters.\n */\nfunction consumeQuotedText(text, quoteCharCode, startIndex, endIndex) {\n    let ch1 = -1; // 1st previous character\n    let index = startIndex;\n    while (index < endIndex) {\n        const ch = text.charCodeAt(index++);\n        if (ch == quoteCharCode && ch1 !== 92 /* BACK_SLASH */) {\n            return index;\n        }\n        if (ch == 92 /* BACK_SLASH */ && ch1 === 92 /* BACK_SLASH */) {\n            // two back slashes cancel each other out. For example `\"\\\\\"` should properly end the\n            // quotation. (It should not assume that the last `\"` is escaped.)\n            ch1 = 0;\n        }\n        else {\n            ch1 = ch;\n        }\n    }\n    throw ngDevMode ? malformedStyleError(text, String.fromCharCode(quoteCharCode), endIndex) :\n        new Error();\n}\nfunction malformedStyleError(text, expecting, index) {\n    ngDevMode && assertEqual(typeof text === 'string', true, 'String expected here');\n    throw throwError(`Malformed style at location ${index} in string '` + text.substring(0, index) + '[>>' +\n        text.substring(index, index + 1) + '<<]' + text.substr(index + 1) +\n        `'. Expecting '${expecting}'.`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a style binding on an element with the provided value.\n *\n * If the style value is falsy then it will be removed from the element\n * (or assigned a different value depending if there are any styles placed\n * on the element with `styleMap` or any static styles that are\n * present from when the element was created with `styling`).\n *\n * Note that the styling element is updated as part of `stylingApply`.\n *\n * @param prop A valid CSS property.\n * @param value New value to write (`null` or an empty string to remove).\n * @param suffix Optional suffix. Used with scalar values to add unit such as `px`.\n *\n * Note that this will apply the provided style value to the host element if this function is called\n * within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleProp(prop, value, suffix) {\n    checkStylingProperty(prop, value, suffix, false);\n    return ɵɵstyleProp;\n}\n/**\n * Update a class binding on an element with the provided value.\n *\n * This instruction is meant to handle the `[class.foo]=\"exp\"` case and,\n * therefore, the class binding itself must already be allocated using\n * `styling` within the creation block.\n *\n * @param prop A valid CSS class (only one).\n * @param value A true/false value which will turn the class on or off.\n *\n * Note that this will apply the provided class value to the host element if this function\n * is called within a host binding function.\n *\n * @codeGenApi\n */\nfunction ɵɵclassProp(className, value) {\n    checkStylingProperty(className, value, null, true);\n    return ɵɵclassProp;\n}\n/**\n * Update style bindings using an object literal on an element.\n *\n * This instruction is meant to apply styling via the `[style]=\"exp\"` template bindings.\n * When styles are applied to the element they will then be updated with respect to\n * any styles/classes set via `styleProp`. If any styles are set to falsy\n * then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n *\n * @param styles A key/value style map of the styles that will be applied to the given element.\n *        Any missing styles (that have already been applied to the element beforehand) will be\n *        removed (unset) from the element's styling.\n *\n * Note that this will apply the provided styleMap value to the host element if this function\n * is called within a host binding.\n *\n * @codeGenApi\n */\nfunction ɵɵstyleMap(styles) {\n    checkStylingMap(styleKeyValueArraySet, styleStringParser, styles, false);\n}\n/**\n * Parse text as style and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵstyleMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction styleStringParser(keyValueArray, text) {\n    for (let i = parseStyle(text); i >= 0; i = parseStyleNext(text, i)) {\n        styleKeyValueArraySet(keyValueArray, getLastParsedKey(text), getLastParsedValue(text));\n    }\n}\n/**\n * Update class bindings using an object literal or class-string on an element.\n *\n * This instruction is meant to apply styling via the `[class]=\"exp\"` template bindings.\n * When classes are applied to the element they will then be updated with\n * respect to any styles/classes set via `classProp`. If any\n * classes are set to falsy then they will be removed from the element.\n *\n * Note that the styling instruction will not be applied until `stylingApply` is called.\n * Note that this will the provided classMap value to the host element if this function is called\n * within a host binding.\n *\n * @param classes A key/value map or string of CSS classes that will be added to the\n *        given element. Any missing classes (that have already been applied to the element\n *        beforehand) will be removed (unset) from the element's list of CSS classes.\n *\n * @codeGenApi\n */\nfunction ɵɵclassMap(classes) {\n    checkStylingMap(keyValueArraySet, classStringParser, classes, true);\n}\n/**\n * Parse text as class and add values to KeyValueArray.\n *\n * This code is pulled out to a separate function so that it can be tree shaken away if it is not\n * needed. It is only referenced from `ɵɵclassMap`.\n *\n * @param keyValueArray KeyValueArray to add parsed values to.\n * @param text text to parse.\n */\nfunction classStringParser(keyValueArray, text) {\n    for (let i = parseClassName(text); i >= 0; i = parseClassNameNext(text, i)) {\n        keyValueArraySet(keyValueArray, getLastParsedKey(text), true);\n    }\n}\n/**\n * Common code between `ɵɵclassProp` and `ɵɵstyleProp`.\n *\n * @param prop property name.\n * @param value binding value.\n * @param suffix suffix for the property (e.g. `em` or `px`)\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingProperty(prop, value, suffix, isClassBased) {\n    const lView = getLView();\n    const tView = getTView();\n    // Styling instructions use 2 slots per binding.\n    // 1. one for the value / TStylingKey\n    // 2. one for the intermittent-value / TStylingRange\n    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, prop, bindingIndex, isClassBased);\n    }\n    if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n        const tNode = tView.data[getSelectedIndex() + HEADER_OFFSET];\n        updateStyling(tView, tNode, lView, lView[RENDERER], prop, lView[bindingIndex + 1] = normalizeSuffix(value, suffix), isClassBased, bindingIndex);\n    }\n}\n/**\n * Common code between `ɵɵclassMap` and `ɵɵstyleMap`.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done for tree shaking purposes.\n * @param stringParser Parser used to parse `value` if `string`. (Passed in as `style` and `class`\n *        have different parsers.)\n * @param value bound value from application\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction checkStylingMap(keyValueArraySet, stringParser, value, isClassBased) {\n    const tView = getTView();\n    const bindingIndex = incrementBindingIndex(2);\n    if (tView.firstUpdatePass) {\n        stylingFirstUpdatePass(tView, null, bindingIndex, isClassBased);\n    }\n    const lView = getLView();\n    if (value !== NO_CHANGE && bindingUpdated(lView, bindingIndex, value)) {\n        // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n        // if so as not to read unnecessarily.\n        const tNode = tView.data[getSelectedIndex() + HEADER_OFFSET];\n        if (hasStylingInputShadow(tNode, isClassBased) && !isInHostBindings(tView, bindingIndex)) {\n            if (ngDevMode) {\n                // verify that if we are shadowing then `TData` is appropriately marked so that we skip\n                // processing this binding in styling resolution.\n                const tStylingKey = tView.data[bindingIndex];\n                assertEqual(Array.isArray(tStylingKey) ? tStylingKey[1] : tStylingKey, false, 'Styling linked list shadow input should be marked as \\'false\\'');\n            }\n            // VE does not concatenate the static portion like we are doing here.\n            // Instead VE just ignores the static completely if dynamic binding is present.\n            // Because of locality we have already set the static portion because we don't know if there\n            // is a dynamic portion until later. If we would ignore the static portion it would look like\n            // the binding has removed it. This would confuse `[ngStyle]`/`[ngClass]` to do the wrong\n            // thing as it would think that the static portion was removed. For this reason we\n            // concatenate it so that `[ngStyle]`/`[ngClass]`  can continue to work on changed.\n            let staticPrefix = isClassBased ? tNode.classesWithoutHost : tNode.stylesWithoutHost;\n            ngDevMode && isClassBased === false && staticPrefix !== null &&\n                assertEqual(staticPrefix.endsWith(';'), true, 'Expecting static portion to end with \\';\\'');\n            if (staticPrefix !== null) {\n                // We want to make sure that falsy values of `value` become empty strings.\n                value = concatStringsWithSpace(staticPrefix, value ? value : '');\n            }\n            // Given `<div [style] my-dir>` such that `my-dir` has `@Input('style')`.\n            // This takes over the `[style]` binding. (Same for `[class]`)\n            setDirectiveInputsWhichShadowsStyling(tView, tNode, lView, value, isClassBased);\n        }\n        else {\n            updateStylingMap(tView, tNode, lView, lView[RENDERER], lView[bindingIndex + 1], lView[bindingIndex + 1] = toStylingKeyValueArray(keyValueArraySet, stringParser, value), isClassBased, bindingIndex);\n        }\n    }\n}\n/**\n * Determines when the binding is in `hostBindings` section\n *\n * @param tView Current `TView`\n * @param bindingIndex index of binding which we would like if it is in `hostBindings`\n */\nfunction isInHostBindings(tView, bindingIndex) {\n    // All host bindings are placed after the expando section.\n    return bindingIndex >= tView.expandoStartIndex;\n}\n/**\n * Collects the necessary information to insert the binding into a linked list of style bindings\n * using `insertTStylingBinding`.\n *\n * @param tView `TView` where the binding linked list will be stored.\n * @param tStylingKey Property/key of the binding.\n * @param bindingIndex Index of binding associated with the `prop`\n * @param isClassBased `true` if `class` change (`false` if `style`)\n */\nfunction stylingFirstUpdatePass(tView, tStylingKey, bindingIndex, isClassBased) {\n    ngDevMode && assertFirstUpdatePass(tView);\n    const tData = tView.data;\n    if (tData[bindingIndex + 1] === null) {\n        // The above check is necessary because we don't clear first update pass until first successful\n        // (no exception) template execution. This prevents the styling instruction from double adding\n        // itself to the list.\n        // `getSelectedIndex()` should be here (rather than in instruction) so that it is guarded by the\n        // if so as not to read unnecessarily.\n        const tNode = tData[getSelectedIndex() + HEADER_OFFSET];\n        const isHostBindings = isInHostBindings(tView, bindingIndex);\n        if (hasStylingInputShadow(tNode, isClassBased) && tStylingKey === null && !isHostBindings) {\n            // `tStylingKey === null` implies that we are either `[style]` or `[class]` binding.\n            // If there is a directive which uses `@Input('style')` or `@Input('class')` than\n            // we need to neutralize this binding since that directive is shadowing it.\n            // We turn this into a noop by setting the key to `false`\n            tStylingKey = false;\n        }\n        tStylingKey = wrapInStaticStylingKey(tData, tNode, tStylingKey, isClassBased);\n        insertTStylingBinding(tData, tNode, tStylingKey, bindingIndex, isHostBindings, isClassBased);\n    }\n}\n/**\n * Adds static styling information to the binding if applicable.\n *\n * The linked list of styles not only stores the list and keys, but also stores static styling\n * information on some of the keys. This function determines if the key should contain the styling\n * information and computes it.\n *\n * See `TStylingStatic` for more details.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey `TStylingKeyPrimitive` which may need to be wrapped into `TStylingKey`\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction wrapInStaticStylingKey(tData, tNode, stylingKey, isClassBased) {\n    const hostDirectiveDef = getCurrentDirectiveDef(tData);\n    let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n    if (hostDirectiveDef === null) {\n        // We are in template node.\n        // If template node already had styling instruction then it has already collected the static\n        // styling and there is no need to collect them again. We know that we are the first styling\n        // instruction because the `TNode.*Bindings` points to 0 (nothing has been inserted yet).\n        const isFirstStylingInstructionInTemplate = (isClassBased ? tNode.classBindings : tNode.styleBindings) === 0;\n        if (isFirstStylingInstructionInTemplate) {\n            // It would be nice to be able to get the statics from `mergeAttrs`, however, at this point\n            // they are already merged and it would not be possible to figure which property belongs where\n            // in the priority.\n            stylingKey = collectStylingFromDirectives(null, tData, tNode, stylingKey, isClassBased);\n            stylingKey = collectStylingFromTAttrs(stylingKey, tNode.attrs, isClassBased);\n            // We know that if we have styling binding in template we can't have residual.\n            residual = null;\n        }\n    }\n    else {\n        // We are in host binding node and there was no binding instruction in template node.\n        // This means that we need to compute the residual.\n        const directiveStylingLast = tNode.directiveStylingLast;\n        const isFirstStylingInstructionInHostBinding = directiveStylingLast === -1 || tData[directiveStylingLast] !== hostDirectiveDef;\n        if (isFirstStylingInstructionInHostBinding) {\n            stylingKey =\n                collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased);\n            if (residual === null) {\n                // - If `null` than either:\n                //    - Template styling instruction already ran and it has consumed the static\n                //      styling into its `TStylingKey` and so there is no need to update residual. Instead\n                //      we need to update the `TStylingKey` associated with the first template node\n                //      instruction. OR\n                //    - Some other styling instruction ran and determined that there are no residuals\n                let templateStylingKey = getTemplateHeadTStylingKey(tData, tNode, isClassBased);\n                if (templateStylingKey !== undefined && Array.isArray(templateStylingKey)) {\n                    // Only recompute if `templateStylingKey` had static values. (If no static value found\n                    // then there is nothing to do since this operation can only produce less static keys, not\n                    // more.)\n                    templateStylingKey = collectStylingFromDirectives(null, tData, tNode, templateStylingKey[1] /* unwrap previous statics */, isClassBased);\n                    templateStylingKey =\n                        collectStylingFromTAttrs(templateStylingKey, tNode.attrs, isClassBased);\n                    setTemplateHeadTStylingKey(tData, tNode, isClassBased, templateStylingKey);\n                }\n            }\n            else {\n                // We only need to recompute residual if it is not `null`.\n                // - If existing residual (implies there was no template styling). This means that some of\n                //   the statics may have moved from the residual to the `stylingKey` and so we have to\n                //   recompute.\n                // - If `undefined` this is the first time we are running.\n                residual = collectResidual(tData, tNode, isClassBased);\n            }\n        }\n    }\n    if (residual !== undefined) {\n        isClassBased ? (tNode.residualClasses = residual) : (tNode.residualStyles = residual);\n    }\n    return stylingKey;\n}\n/**\n * Retrieve the `TStylingKey` for the template styling instruction.\n *\n * This is needed since `hostBinding` styling instructions are inserted after the template\n * instruction. While the template instruction needs to update the residual in `TNode` the\n * `hostBinding` instructions need to update the `TStylingKey` of the template instruction because\n * the template instruction is downstream from the `hostBindings` instructions.\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @return `TStylingKey` if found or `undefined` if not found.\n */\nfunction getTemplateHeadTStylingKey(tData, tNode, isClassBased) {\n    const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    if (getTStylingRangeNext(bindings) === 0) {\n        // There does not seem to be a styling instruction in the `template`.\n        return undefined;\n    }\n    return tData[getTStylingRangePrev(bindings)];\n}\n/**\n * Update the `TStylingKey` of the first template instruction in `TNode`.\n *\n * Logically `hostBindings` styling instructions are of lower priority than that of the template.\n * However, they execute after the template styling instructions. This means that they get inserted\n * in front of the template styling instructions.\n *\n * If we have a template styling instruction and a new `hostBindings` styling instruction is\n * executed it means that it may need to steal static fields from the template instruction. This\n * method allows us to update the first template instruction `TStylingKey` with a new value.\n *\n * Assume:\n * ```\n * <div my-dir style=\"color: red\" [style.color]=\"tmplExp\"></div>\n *\n * @Directive({\n *   host: {\n *     'style': 'width: 100px',\n *     '[style.color]': 'dirExp',\n *   }\n * })\n * class MyDir {}\n * ```\n *\n * when `[style.color]=\"tmplExp\"` executes it creates this data structure.\n * ```\n *  ['', 'color', 'color', 'red', 'width', '100px'],\n * ```\n *\n * The reason for this is that the template instruction does not know if there are styling\n * instructions and must assume that there are none and must collect all of the static styling.\n * (both\n * `color' and 'width`)\n *\n * When `'[style.color]': 'dirExp',` executes we need to insert a new data into the linked list.\n * ```\n *  ['', 'color', 'width', '100px'],  // newly inserted\n *  ['', 'color', 'color', 'red', 'width', '100px'], // this is wrong\n * ```\n *\n * Notice that the template statics is now wrong as it incorrectly contains `width` so we need to\n * update it like so:\n * ```\n *  ['', 'color', 'width', '100px'],\n *  ['', 'color', 'color', 'red'],    // UPDATE\n * ```\n *\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param tStylingKey New `TStylingKey` which is replacing the old one.\n */\nfunction setTemplateHeadTStylingKey(tData, tNode, isClassBased, tStylingKey) {\n    const bindings = isClassBased ? tNode.classBindings : tNode.styleBindings;\n    ngDevMode &&\n        assertNotEqual(getTStylingRangeNext(bindings), 0, 'Expecting to have at least one template styling binding.');\n    tData[getTStylingRangePrev(bindings)] = tStylingKey;\n}\n/**\n * Collect all static values after the current `TNode.directiveStylingLast` index.\n *\n * Collect the remaining styling information which has not yet been collected by an existing\n * styling instruction.\n *\n * @param tData `TData` where the `DirectiveDefs` are stored.\n * @param tNode `TNode` which contains the directive range.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectResidual(tData, tNode, isClassBased) {\n    let residual = undefined;\n    const directiveEnd = tNode.directiveEnd;\n    ngDevMode &&\n        assertNotEqual(tNode.directiveStylingLast, -1, 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.');\n    // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are\n    // collecting things after the last `hostBindings` directive which had a styling instruction.)\n    for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) {\n        const attrs = tData[i].hostAttrs;\n        residual = collectStylingFromTAttrs(residual, attrs, isClassBased);\n    }\n    return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased);\n}\n/**\n * Collect the static styling information with lower priority than `hostDirectiveDef`.\n *\n * (This is opposite of residual styling.)\n *\n * @param hostDirectiveDef `DirectiveDef` for which we want to collect lower priority static\n *        styling. (Or `null` if template styling)\n * @param tData `TData` where the linked list is stored.\n * @param tNode `TNode` for which the styling is being computed.\n * @param stylingKey Existing `TStylingKey` to update or wrap.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromDirectives(hostDirectiveDef, tData, tNode, stylingKey, isClassBased) {\n    // We need to loop because there can be directives which have `hostAttrs` but don't have\n    // `hostBindings` so this loop catches up to the current directive..\n    let currentDirective = null;\n    const directiveEnd = tNode.directiveEnd;\n    let directiveStylingLast = tNode.directiveStylingLast;\n    if (directiveStylingLast === -1) {\n        directiveStylingLast = tNode.directiveStart;\n    }\n    else {\n        directiveStylingLast++;\n    }\n    while (directiveStylingLast < directiveEnd) {\n        currentDirective = tData[directiveStylingLast];\n        ngDevMode && assertDefined(currentDirective, 'expected to be defined');\n        stylingKey = collectStylingFromTAttrs(stylingKey, currentDirective.hostAttrs, isClassBased);\n        if (currentDirective === hostDirectiveDef)\n            break;\n        directiveStylingLast++;\n    }\n    if (hostDirectiveDef !== null) {\n        // we only advance the styling cursor if we are collecting data from host bindings.\n        // Template executes before host bindings and so if we would update the index,\n        // host bindings would not get their statics.\n        tNode.directiveStylingLast = directiveStylingLast;\n    }\n    return stylingKey;\n}\n/**\n * Convert `TAttrs` into `TStylingStatic`.\n *\n * @param stylingKey existing `TStylingKey` to update or wrap.\n * @param attrs `TAttributes` to process.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction collectStylingFromTAttrs(stylingKey, attrs, isClassBased) {\n    const desiredMarker = isClassBased ? 1 /* Classes */ : 2 /* Styles */;\n    let currentMarker = -1 /* ImplicitAttributes */;\n    if (attrs !== null) {\n        for (let i = 0; i < attrs.length; i++) {\n            const item = attrs[i];\n            if (typeof item === 'number') {\n                currentMarker = item;\n            }\n            else {\n                if (currentMarker === desiredMarker) {\n                    if (!Array.isArray(stylingKey)) {\n                        stylingKey = stylingKey === undefined ? [] : ['', stylingKey];\n                    }\n                    keyValueArraySet(stylingKey, item, isClassBased ? true : attrs[++i]);\n                }\n            }\n        }\n    }\n    return stylingKey === undefined ? null : stylingKey;\n}\n/**\n * Convert user input to `KeyValueArray`.\n *\n * This function takes user input which could be `string`, Object literal, or iterable and converts\n * it into a consistent representation. The output of this is `KeyValueArray` (which is an array\n * where\n * even indexes contain keys and odd indexes contain values for those keys).\n *\n * The advantage of converting to `KeyValueArray` is that we can perform diff in an input\n * independent\n * way.\n * (ie we can compare `foo bar` to `['bar', 'baz'] and determine a set of changes which need to be\n * applied)\n *\n * The fact that `KeyValueArray` is sorted is very important because it allows us to compute the\n * difference in linear fashion without the need to allocate any additional data.\n *\n * For example if we kept this as a `Map` we would have to iterate over previous `Map` to determine\n * which values need to be deleted, over the new `Map` to determine additions, and we would have to\n * keep additional `Map` to keep track of duplicates or items which have not yet been visited.\n *\n * @param keyValueArraySet (See `keyValueArraySet` in \"util/array_utils\") Gets passed in as a\n *        function so that `style` can be processed. This is done\n *        for tree shaking purposes.\n * @param stringParser The parser is passed in so that it will be tree shakable. See\n *        `styleStringParser` and `classStringParser`\n * @param value The value to parse/convert to `KeyValueArray`\n */\nfunction toStylingKeyValueArray(keyValueArraySet, stringParser, value) {\n    if (value == null /*|| value === undefined */ || value === '')\n        return EMPTY_ARRAY$3;\n    const styleKeyValueArray = [];\n    const unwrappedValue = unwrapSafeValue(value);\n    if (Array.isArray(unwrappedValue)) {\n        for (let i = 0; i < unwrappedValue.length; i++) {\n            keyValueArraySet(styleKeyValueArray, unwrappedValue[i], true);\n        }\n    }\n    else if (typeof unwrappedValue === 'object') {\n        for (const key in unwrappedValue) {\n            if (unwrappedValue.hasOwnProperty(key)) {\n                keyValueArraySet(styleKeyValueArray, key, unwrappedValue[key]);\n            }\n        }\n    }\n    else if (typeof unwrappedValue === 'string') {\n        stringParser(styleKeyValueArray, unwrappedValue);\n    }\n    else {\n        ngDevMode &&\n            throwError('Unsupported styling type ' + typeof unwrappedValue + ': ' + unwrappedValue);\n    }\n    return styleKeyValueArray;\n}\n/**\n * Set a `value` for a `key`.\n *\n * See: `keyValueArraySet` for details\n *\n * @param keyValueArray KeyValueArray to add to.\n * @param key Style key to add.\n * @param value The value to set.\n */\nfunction styleKeyValueArraySet(keyValueArray, key, value) {\n    keyValueArraySet(keyValueArray, key, unwrapSafeValue(value));\n}\n/**\n * Update map based styling.\n *\n * Map based styling could be anything which contains more than one binding. For example `string`,\n * or object literal. Dealing with all of these types would complicate the logic so\n * instead this function expects that the complex input is first converted into normalized\n * `KeyValueArray`. The advantage of normalization is that we get the values sorted, which makes it\n * very cheap to compute deltas between the previous and current value.\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param oldKeyValueArray Previous value represented as `KeyValueArray`\n * @param newKeyValueArray Current value represented as `KeyValueArray`\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStylingMap(tView, tNode, lView, renderer, oldKeyValueArray, newKeyValueArray, isClassBased, bindingIndex) {\n    if (oldKeyValueArray === NO_CHANGE) {\n        // On first execution the oldKeyValueArray is NO_CHANGE => treat it as empty KeyValueArray.\n        oldKeyValueArray = EMPTY_ARRAY$3;\n    }\n    let oldIndex = 0;\n    let newIndex = 0;\n    let oldKey = 0 < oldKeyValueArray.length ? oldKeyValueArray[0] : null;\n    let newKey = 0 < newKeyValueArray.length ? newKeyValueArray[0] : null;\n    while (oldKey !== null || newKey !== null) {\n        ngDevMode && assertLessThan(oldIndex, 999, 'Are we stuck in infinite loop?');\n        ngDevMode && assertLessThan(newIndex, 999, 'Are we stuck in infinite loop?');\n        const oldValue = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex + 1] : undefined;\n        const newValue = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex + 1] : undefined;\n        let setKey = null;\n        let setValue = undefined;\n        if (oldKey === newKey) {\n            // UPDATE: Keys are equal => new value is overwriting old value.\n            oldIndex += 2;\n            newIndex += 2;\n            if (oldValue !== newValue) {\n                setKey = newKey;\n                setValue = newValue;\n            }\n        }\n        else if (newKey === null || oldKey !== null && oldKey < newKey) {\n            // DELETE: oldKey key is missing or we did not find the oldKey in the newValue\n            // (because the keyValueArray is sorted and `newKey` is found later alphabetically).\n            // `\"background\" < \"color\"` so we need to delete `\"background\"` because it is not found in the\n            // new array.\n            oldIndex += 2;\n            setKey = oldKey;\n        }\n        else {\n            // CREATE: newKey's is earlier alphabetically than oldKey's (or no oldKey) => we have new key.\n            // `\"color\" > \"background\"` so we need to add `color` because it is in new array but not in\n            // old array.\n            ngDevMode && assertDefined(newKey, 'Expecting to have a valid key');\n            newIndex += 2;\n            setKey = newKey;\n            setValue = newValue;\n        }\n        if (setKey !== null) {\n            updateStyling(tView, tNode, lView, renderer, setKey, setValue, isClassBased, bindingIndex);\n        }\n        oldKey = oldIndex < oldKeyValueArray.length ? oldKeyValueArray[oldIndex] : null;\n        newKey = newIndex < newKeyValueArray.length ? newKeyValueArray[newIndex] : null;\n    }\n}\n/**\n * Update a simple (property name) styling.\n *\n * This function takes `prop` and updates the DOM to that value. The function takes the binding\n * value as well as binding priority into consideration to determine which value should be written\n * to DOM. (For example it may be determined that there is a higher priority overwrite which blocks\n * the DOM write, or if the value goes to `undefined` a lower priority overwrite may be consulted.)\n *\n * @param tView Associated `TView.data` contains the linked list of binding priorities.\n * @param tNode `TNode` where the binding is located.\n * @param lView `LView` contains the values associated with other styling binding at this `TNode`.\n * @param renderer Renderer to use if any updates.\n * @param prop Either style property name or a class name.\n * @param value Either style value for `prop` or `true`/`false` if `prop` is class.\n * @param isClassBased `true` if `class` (`false` if `style`)\n * @param bindingIndex Binding index of the binding.\n */\nfunction updateStyling(tView, tNode, lView, renderer, prop, value, isClassBased, bindingIndex) {\n    if (tNode.type !== 3 /* Element */) {\n        // It is possible to have styling on non-elements (such as ng-container).\n        // This is rare, but it does happen. In such a case, just ignore the binding.\n        return;\n    }\n    const tData = tView.data;\n    const tRange = tData[bindingIndex + 1];\n    const higherPriorityValue = getTStylingRangeNextDuplicate(tRange) ?\n        findStylingValue(tData, tNode, lView, prop, getTStylingRangeNext(tRange), isClassBased) :\n        undefined;\n    if (!isStylingValuePresent(higherPriorityValue)) {\n        // We don't have a next duplicate, or we did not find a duplicate value.\n        if (!isStylingValuePresent(value)) {\n            // We should delete current value or restore to lower priority value.\n            if (getTStylingRangePrevDuplicate(tRange)) {\n                // We have a possible prev duplicate, let's retrieve it.\n                value = findStylingValue(tData, null, lView, prop, bindingIndex, isClassBased);\n            }\n        }\n        const rNode = getNativeByIndex(getSelectedIndex(), lView);\n        applyStyling(renderer, isClassBased, rNode, prop, value);\n    }\n}\n/**\n * Search for styling value with higher priority which is overwriting current value, or a\n * value of lower priority to which we should fall back if the value is `undefined`.\n *\n * When value is being applied at a location, related values need to be consulted.\n * - If there is a higher priority binding, we should be using that one instead.\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp1`\n *   requires that we check `exp2` to see if it is set to value other than `undefined`.\n * - If there is a lower priority binding and we are changing to `undefined`\n *   For example `<div  [style]=\"{color:exp1}\" [style.color]=\"exp2\">` change to `exp2` to\n *   `undefined` requires that we check `exp1` (and static values) and use that as new value.\n *\n * NOTE: The styling stores two values.\n * 1. The raw value which came from the application is stored at `index + 0` location. (This value\n *    is used for dirty checking).\n * 2. The normalized value is stored at `index + 1`.\n *\n * @param tData `TData` used for traversing the priority.\n * @param tNode `TNode` to use for resolving static styling. Also controls search direction.\n *   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n *      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n *   - `null` search prev and go all the way to end. Return last value where\n *     `isStylingValuePresent(value)` is true.\n * @param lView `LView` used for retrieving the actual values.\n * @param prop Property which we are interested in.\n * @param index Starting index in the linked list of styling bindings where the search should start.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction findStylingValue(tData, tNode, lView, prop, index, isClassBased) {\n    // `TNode` to use for resolving static styling. Also controls search direction.\n    //   - `TNode` search next and quit as soon as `isStylingValuePresent(value)` is true.\n    //      If no value found consult `tNode.residualStyle`/`tNode.residualClass` for default value.\n    //   - `null` search prev and go all the way to end. Return last value where\n    //     `isStylingValuePresent(value)` is true.\n    const isPrevDirection = tNode === null;\n    let value = undefined;\n    while (index > 0) {\n        const rawKey = tData[index];\n        const containsStatics = Array.isArray(rawKey);\n        // Unwrap the key if we contain static values.\n        const key = containsStatics ? rawKey[1] : rawKey;\n        const isStylingMap = key === null;\n        let valueAtLViewIndex = lView[index + 1];\n        if (valueAtLViewIndex === NO_CHANGE) {\n            // In firstUpdatePass the styling instructions create a linked list of styling.\n            // On subsequent passes it is possible for a styling instruction to try to read a binding\n            // which\n            // has not yet executed. In that case we will find `NO_CHANGE` and we should assume that\n            // we have `undefined` (or empty array in case of styling-map instruction) instead. This\n            // allows the resolution to apply the value (which may later be overwritten when the\n            // binding actually executes.)\n            valueAtLViewIndex = isStylingMap ? EMPTY_ARRAY$3 : undefined;\n        }\n        let currentValue = isStylingMap ? keyValueArrayGet(valueAtLViewIndex, prop) :\n            key === prop ? valueAtLViewIndex : undefined;\n        if (containsStatics && !isStylingValuePresent(currentValue)) {\n            currentValue = keyValueArrayGet(rawKey, prop);\n        }\n        if (isStylingValuePresent(currentValue)) {\n            value = currentValue;\n            if (isPrevDirection) {\n                return value;\n            }\n        }\n        const tRange = tData[index + 1];\n        index = isPrevDirection ? getTStylingRangePrev(tRange) : getTStylingRangeNext(tRange);\n    }\n    if (tNode !== null) {\n        // in case where we are going in next direction AND we did not find anything, we need to\n        // consult residual styling\n        let residual = isClassBased ? tNode.residualClasses : tNode.residualStyles;\n        if (residual != null /** OR residual !=== undefined */) {\n            value = keyValueArrayGet(residual, prop);\n        }\n    }\n    return value;\n}\n/**\n * Determines if the binding value should be used (or if the value is 'undefined' and hence priority\n * resolution should be used.)\n *\n * @param value Binding style value.\n */\nfunction isStylingValuePresent(value) {\n    // Currently only `undefined` value is considered non-binding. That is `undefined` says I don't\n    // have an opinion as to what this binding should be and you should consult other bindings by\n    // priority to determine the valid value.\n    // This is extracted into a single function so that we have a single place to control this.\n    return value !== undefined;\n}\n/**\n * Normalizes and/or adds a suffix to the value.\n *\n * If value is `null`/`undefined` no suffix is added\n * @param value\n * @param suffix\n */\nfunction normalizeSuffix(value, suffix) {\n    if (value == null /** || value === undefined */) {\n        // do nothing\n    }\n    else if (typeof suffix === 'string') {\n        value = value + suffix;\n    }\n    else if (typeof value === 'object') {\n        value = stringify(unwrapSafeValue(value));\n    }\n    return value;\n}\n/**\n * Tests if the `TNode` has input shadow.\n *\n * An input shadow is when a directive steals (shadows) the input by using `@Input('style')` or\n * `@Input('class')` as input.\n *\n * @param tNode `TNode` which we would like to see if it has shadow.\n * @param isClassBased `true` if `class` (`false` if `style`)\n */\nfunction hasStylingInputShadow(tNode, isClassBased) {\n    return (tNode.flags & (isClassBased ? 16 /* hasClassInput */ : 32 /* hasStyleInput */)) !== 0;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array\n * @param value Static string value to write.\n *\n * @codeGenApi\n */\nfunction ɵɵtext(index, value = '') {\n    const lView = getLView();\n    const tView = getTView();\n    const adjustedIndex = index + HEADER_OFFSET;\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'text nodes should be created before any bindings');\n    ngDevMode && assertIndexInRange(lView, adjustedIndex);\n    const tNode = tView.firstCreatePass ?\n        getOrCreateTNode(tView, lView[T_HOST], index, 3 /* Element */, null, null) :\n        tView.data[adjustedIndex];\n    const textNative = lView[adjustedIndex] = createTextNode(value, lView[RENDERER]);\n    appendChild(tView, lView, textNative, tNode);\n    // Text nodes are self closing.\n    setPreviousOrParentTNode(tNode, false);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update text content with a lone bound value\n *\n * Used when a text node has 1 interpolated value in it, an no additional text\n * surrounds that interpolated value:\n *\n * ```html\n * <div>{{v0}}</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate(v0);\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate(v0) {\n    ɵɵtextInterpolate1('', v0, '');\n    return ɵɵtextInterpolate;\n}\n/**\n *\n * Update text content with single bound value surrounded by other text.\n *\n * Used when a text node has 1 interpolated value in it:\n *\n * ```html\n * <div>prefix{{v0}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate1('prefix', v0, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation1(lView, prefix, v0, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate1;\n}\n/**\n *\n * Update text content with 2 bound values surrounded by other text.\n *\n * Used when a text node has 2 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate2;\n}\n/**\n *\n * Update text content with 3 bound values surrounded by other text.\n *\n * Used when a text node has 3 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate3;\n}\n/**\n *\n * Update text content with 4 bound values surrounded by other text.\n *\n * Used when a text node has 4 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see ɵɵtextInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate4;\n}\n/**\n *\n * Update text content with 5 bound values surrounded by other text.\n *\n * Used when a text node has 5 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate5;\n}\n/**\n *\n * Update text content with 6 bound values surrounded by other text.\n *\n * Used when a text node has 6 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change. @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate6;\n}\n/**\n *\n * Update text content with 7 bound values surrounded by other text.\n *\n * Used when a text node has 7 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate7;\n}\n/**\n *\n * Update text content with 8 bound values surrounded by other text.\n *\n * Used when a text node has 8 interpolated values in it:\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n * @returns itself, so that it may be chained.\n * @see textInterpolateV\n * @codeGenApi\n */\nfunction ɵɵtextInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolated = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolate8;\n}\n/**\n * Update text content with 9 or more bound values other surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div>prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix</div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵtextInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n *\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵtextInterpolateV(values) {\n    const lView = getLView();\n    const interpolated = interpolationV(lView, values);\n    if (interpolated !== NO_CHANGE) {\n        textBindingInternal(lView, getSelectedIndex(), interpolated);\n    }\n    return ɵɵtextInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated class on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate1('prefix', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate2('prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate3(\n * 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate4(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate5(\n * 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate6(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate7(\n *    'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n *\n * Update an interpolated class on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolate8(\n *  'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n/**\n * Update an interpolated class on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵclassMapInterpolateV(\n *  ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵclassMapInterpolateV(values) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingMap(keyValueArraySet, classStringParser, interpolatedValue, true);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style=\"key: {{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate1('key: ', v0, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate1(prefix, v0, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate2('key: ', v0, '; key1: ', v1, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate2(prefix, v0, i0, v1, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key2: {{v1}}; key2: {{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate3(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate3(prefix, v0, i0, v1, i1, v2, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate4(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate5(\n *     'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}};\n *             key5: {{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate6(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate7(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n *\n * Update an interpolated style on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *             key6: {{v6}}; key7: {{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolate8(\n *    'key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *    '; key6: ', v6, '; key7: ', v7, 'suffix');\n * ```\n *\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolate8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    ɵɵstyleMap(interpolatedValue);\n}\n/**\n * Update an interpolated style on an element with 9 or more bound values surrounded by text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  class=\"key: {{v0}}; key1: {{v1}}; key2: {{v2}}; key3: {{v3}}; key4: {{v4}}; key5: {{v5}};\n *         key6: {{v6}}; key7: {{v7}}; key8: {{v8}}; key9: {{v9}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstyleMapInterpolateV(\n *    ['key: ', v0, '; key1: ', v1, '; key2: ', v2, '; key3: ', v3, '; key4: ', v4, '; key5: ', v5,\n *     '; key6: ', v6, '; key7: ', v7, '; key8: ', v8, '; key9: ', v9, 'suffix']);\n * ```\n *.\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '; key2: ', value1, '; key2: ', value2, ..., value99, 'suffix']`)\n * @codeGenApi\n */\nfunction ɵɵstyleMapInterpolateV(values) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    ɵɵstyleMap(interpolatedValue);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n *\n * Update an interpolated style property on an element with single bound value surrounded by text.\n *\n * Used when the value passed to a property has 1 interpolated value in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate1(0, 'prefix', v0, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate1(prop, prefix, v0, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation1(lView, prefix, v0, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate1;\n}\n/**\n *\n * Update an interpolated style property on an element with 2 bound values surrounded by text.\n *\n * Used when the value passed to a property has 2 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate2(0, 'prefix', v0, '-', v1, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate2(prop, prefix, v0, i0, v1, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation2(lView, prefix, v0, i0, v1, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate2;\n}\n/**\n *\n * Update an interpolated style property on an element with 3 bound values surrounded by text.\n *\n * Used when the value passed to a property has 3 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate3(0, 'prefix', v0, '-', v1, '-', v2, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate3(prop, prefix, v0, i0, v1, i1, v2, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation3(lView, prefix, v0, i0, v1, i1, v2, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate3;\n}\n/**\n *\n * Update an interpolated style property on an element with 4 bound values surrounded by text.\n *\n * Used when the value passed to a property has 4 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate4(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate4(prop, prefix, v0, i0, v1, i1, v2, i2, v3, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation4(lView, prefix, v0, i0, v1, i1, v2, i2, v3, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate4;\n}\n/**\n *\n * Update an interpolated style property on an element with 5 bound values surrounded by text.\n *\n * Used when the value passed to a property has 5 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate5(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate5(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation5(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate5;\n}\n/**\n *\n * Update an interpolated style property on an element with 6 bound values surrounded by text.\n *\n * Used when the value passed to a property has 6 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate6(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate6(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation6(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate6;\n}\n/**\n *\n * Update an interpolated style property on an element with 7 bound values surrounded by text.\n *\n * Used when the value passed to a property has 7 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate7(\n *    0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate7(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation7(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate7;\n}\n/**\n *\n * Update an interpolated style property on an element with 8 bound values surrounded by text.\n *\n * Used when the value passed to a property has 8 interpolated values in it:\n *\n * ```html\n * <div style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}suffix\"></div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolate8(0, 'prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6,\n * '-', v7, 'suffix');\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`.\n * @param prefix Static value used for concatenation only.\n * @param v0 Value checked for change.\n * @param i0 Static value used for concatenation only.\n * @param v1 Value checked for change.\n * @param i1 Static value used for concatenation only.\n * @param v2 Value checked for change.\n * @param i2 Static value used for concatenation only.\n * @param v3 Value checked for change.\n * @param i3 Static value used for concatenation only.\n * @param v4 Value checked for change.\n * @param i4 Static value used for concatenation only.\n * @param v5 Value checked for change.\n * @param i5 Static value used for concatenation only.\n * @param v6 Value checked for change.\n * @param i6 Static value used for concatenation only.\n * @param v7 Value checked for change.\n * @param suffix Static value used for concatenation only.\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolate8(prop, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolation8(lView, prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolate8;\n}\n/**\n * Update an interpolated style property on an element with 9 or more bound values surrounded by\n * text.\n *\n * Used when the number of interpolated values exceeds 8.\n *\n * ```html\n * <div\n *  style.color=\"prefix{{v0}}-{{v1}}-{{v2}}-{{v3}}-{{v4}}-{{v5}}-{{v6}}-{{v7}}-{{v8}}-{{v9}}suffix\">\n * </div>\n * ```\n *\n * Its compiled representation is:\n *\n * ```ts\n * ɵɵstylePropInterpolateV(\n *  0, ['prefix', v0, '-', v1, '-', v2, '-', v3, '-', v4, '-', v5, '-', v6, '-', v7, '-', v9,\n *  'suffix']);\n * ```\n *\n * @param styleIndex Index of style to update. This index value refers to the\n *        index of the style in the style bindings array that was passed into\n *        `styling`..\n * @param values The collection of values and the strings in-between those values, beginning with\n * a string prefix and ending with a string suffix.\n * (e.g. `['prefix', value0, '-', value1, '-', value2, ..., value99, 'suffix']`)\n * @param valueSuffix Optional suffix. Used with scalar values to add unit such as `px`.\n * @returns itself, so that it may be chained.\n * @codeGenApi\n */\nfunction ɵɵstylePropInterpolateV(prop, values, valueSuffix) {\n    const lView = getLView();\n    const interpolatedValue = interpolationV(lView, values);\n    checkStylingProperty(prop, interpolatedValue, valueSuffix, false);\n    return ɵɵstylePropInterpolateV;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Update a property on a host element. Only applies to native node properties, not inputs.\n *\n * Operates on the element selected by index via the {@link select} instruction.\n *\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n * @returns This function returns itself so that it may be chained\n * (e.g. `property('name', ctx.name)('title', ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵhostProperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        elementPropertyInternal(tView, tNode, lView, propName, value, lView[RENDERER], sanitizer, true);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵhostProperty;\n}\n/**\n * Updates a synthetic host binding (e.g. `[@foo]`) on a component or directive.\n *\n * This instruction is for compatibility purposes and is designed to ensure that a\n * synthetic host binding (e.g. `@HostBinding('@foo')`) properly gets rendered in\n * the component's renderer. Normally all host bindings are evaluated with the parent\n * component's renderer, but, in the case of animation @triggers, they need to be\n * evaluated with the sub component's renderer (because that's where the animation\n * triggers are defined).\n *\n * Do not use this instruction as a replacement for `elementProperty`. This instruction\n * only exists to ensure compatibility with the ViewEngine's host binding behavior.\n *\n * @param index The index of the element to update in the data array\n * @param propName Name of property. Because it is going to DOM, this is not subject to\n *        renaming as part of minification.\n * @param value New value to write.\n * @param sanitizer An optional function used to sanitize the value.\n *\n * @codeGenApi\n */\nfunction ɵɵsyntheticHostProperty(propName, value, sanitizer) {\n    const lView = getLView();\n    const bindingIndex = nextBindingIndex();\n    if (bindingUpdated(lView, bindingIndex, value)) {\n        const tView = getTView();\n        const tNode = getSelectedTNode();\n        const currentDef = getCurrentDirectiveDef(tView.data);\n        const renderer = loadComponentRenderer(currentDef, tNode, lView);\n        elementPropertyInternal(tView, tNode, lView, propName, value, renderer, sanitizer, true);\n        ngDevMode && storePropertyBindingMetadata(tView.data, tNode, propName, bindingIndex);\n    }\n    return ɵɵsyntheticHostProperty;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves the component instance associated with a given DOM element.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```html\n * <my-app>\n *   <div>\n *     <child-comp></child-comp>\n *   </div>\n * </my-app>\n * ```\n * Calling `getComponent` on `<child-comp>` will return the instance of `ChildComponent`\n * associated with this DOM element.\n *\n * Calling the function on `<my-app>` will return the `MyApp` instance.\n *\n *\n * @param element DOM element from which the component should be retrieved.\n * @returns Component instance associated with the element or `null` if there\n *    is no component associated with it.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getComponent(element) {\n    assertDomElement(element);\n    const context = loadLContext(element, false);\n    if (context === null)\n        return null;\n    if (context.component === undefined) {\n        context.component = getComponentAtNodeIndex(context.nodeIndex, context.lView);\n    }\n    return context.component;\n}\n/**\n * If inside an embedded view (e.g. `*ngIf` or `*ngFor`), retrieves the context of the embedded\n * view that the element is part of. Otherwise retrieves the instance of the component whose view\n * owns the element (in this case, the result is the same as calling `getOwningComponent`).\n *\n * @param element Element for which to get the surrounding component instance.\n * @returns Instance of the component that is around the element or null if the element isn't\n *    inside any component.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getContext(element) {\n    assertDomElement(element);\n    const context = loadLContext(element, false);\n    return context === null ? null : context.lView[CONTEXT];\n}\n/**\n * Retrieves the component instance whose view contains the DOM element.\n *\n * For example, if `<child-comp>` is used in the template of `<app-comp>`\n * (i.e. a `ViewChild` of `<app-comp>`), calling `getOwningComponent` on `<child-comp>`\n * would return `<app-comp>`.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Component instance whose view owns the DOM element or null if the element is not\n *    part of a component view.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getOwningComponent(elementOrDir) {\n    const context = loadLContext(elementOrDir, false);\n    if (context === null)\n        return null;\n    let lView = context.lView;\n    let parent;\n    ngDevMode && assertLView(lView);\n    while (lView[HOST] === null && (parent = getLViewParent(lView))) {\n        // As long as lView[HOST] is null we know we are part of sub-template such as `*ngIf`\n        lView = parent;\n    }\n    return lView[FLAGS] & 512 /* IsRoot */ ? null : lView[CONTEXT];\n}\n/**\n * Retrieves all root components associated with a DOM element, directive or component instance.\n * Root components are those which have been bootstrapped by Angular.\n *\n * @param elementOrDir DOM element, component or directive instance\n *    for which to retrieve the root components.\n * @returns Root components associated with the target object.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getRootComponents(elementOrDir) {\n    return [...getRootContext(elementOrDir).components];\n}\n/**\n * Retrieves an `Injector` associated with an element, component or directive instance.\n *\n * @param elementOrDir DOM element, component or directive instance for which to\n *    retrieve the injector.\n * @returns Injector associated with the element, component or directive instance.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getInjector(elementOrDir) {\n    const context = loadLContext(elementOrDir, false);\n    if (context === null)\n        return Injector.NULL;\n    const tNode = context.lView[TVIEW].data[context.nodeIndex];\n    return new NodeInjector(tNode, context.lView);\n}\n/**\n * Retrieve a set of injection tokens at a given DOM node.\n *\n * @param element Element for which the injection tokens should be retrieved.\n */\nfunction getInjectionTokens(element) {\n    const context = loadLContext(element, false);\n    if (context === null)\n        return [];\n    const lView = context.lView;\n    const tView = lView[TVIEW];\n    const tNode = tView.data[context.nodeIndex];\n    const providerTokens = [];\n    const startIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n    const endIndex = tNode.directiveEnd;\n    for (let i = startIndex; i < endIndex; i++) {\n        let value = tView.data[i];\n        if (isDirectiveDefHack(value)) {\n            // The fact that we sometimes store Type and sometimes DirectiveDef in this location is a\n            // design flaw.  We should always store same type so that we can be monomorphic. The issue\n            // is that for Components/Directives we store the def instead the type. The correct behavior\n            // is that we should always be storing injectable type in this location.\n            value = value.type;\n        }\n        providerTokens.push(value);\n    }\n    return providerTokens;\n}\n/**\n * Retrieves directive instances associated with a given DOM element. Does not include\n * component instances.\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n *   <button my-button></button>\n *   <my-comp></my-comp>\n * </my-app>\n * ```\n * Calling `getDirectives` on `<button>` will return an array with an instance of the `MyButton`\n * directive that is associated with the DOM element.\n *\n * Calling `getDirectives` on `<my-comp>` will return an empty array.\n *\n * @param element DOM element for which to get the directives.\n * @returns Array of directives associated with the element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getDirectives(element) {\n    const context = loadLContext(element);\n    if (context.directives === undefined) {\n        context.directives = getDirectivesAtNodeIndex(context.nodeIndex, context.lView, false);\n    }\n    // The `directives` in this case are a named array called `LComponentView`. Clone the\n    // result so we don't expose an internal data structure in the user's console.\n    return context.directives === null ? [] : [...context.directives];\n}\nfunction loadLContext(target, throwOnNotFound = true) {\n    const context = getLContext(target);\n    if (!context && throwOnNotFound) {\n        throw new Error(ngDevMode ? `Unable to find context associated with ${stringifyForError(target)}` :\n            'Invalid ng target');\n    }\n    return context;\n}\n/**\n * Retrieve map of local references.\n *\n * The references are retrieved as a map of local reference name to element or directive instance.\n *\n * @param target DOM element, component or directive instance for which to retrieve\n *    the local references.\n */\nfunction getLocalRefs(target) {\n    const context = loadLContext(target, false);\n    if (context === null)\n        return {};\n    if (context.localRefs === undefined) {\n        context.localRefs = discoverLocalRefs(context.lView, context.nodeIndex);\n    }\n    return context.localRefs || {};\n}\n/**\n * Retrieves the host element of a component or directive instance.\n * The host element is the DOM element that matched the selector of the directive.\n *\n * @param componentOrDirective Component or directive instance for which the host\n *     element should be retrieved.\n * @returns Host element of the target.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getHostElement(componentOrDirective) {\n    return getLContext(componentOrDirective).native;\n}\n/**\n * Retrieves the rendered text for a given component.\n *\n * This function retrieves the host element of a component and\n * and then returns the `textContent` for that element. This implies\n * that the text returned will include re-projected content of\n * the component as well.\n *\n * @param component The component to return the content text for.\n */\nfunction getRenderedText(component) {\n    const hostElement = getHostElement(component);\n    return hostElement.textContent || '';\n}\nfunction loadLContextFromNode(node) {\n    if (!(node instanceof Node))\n        throw new Error('Expecting instance of DOM Element');\n    return loadLContext(node);\n}\n/**\n * Retrieves a list of event listeners associated with a DOM element. The list does include host\n * listeners, but it does not include event listeners defined outside of the Angular context\n * (e.g. through `addEventListener`).\n *\n * @usageNotes\n * Given the following DOM structure:\n * ```\n * <my-app>\n *   <div (click)=\"doSomething()\"></div>\n * </my-app>\n *\n * ```\n * Calling `getListeners` on `<div>` will return an object that looks as follows:\n * ```\n * {\n *   name: 'click',\n *   element: <div>,\n *   callback: () => doSomething(),\n *   useCapture: false\n * }\n * ```\n *\n * @param element Element for which the DOM listeners should be retrieved.\n * @returns Array of event listeners on the DOM element.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction getListeners(element) {\n    assertDomElement(element);\n    const lContext = loadLContext(element, false);\n    if (lContext === null)\n        return [];\n    const lView = lContext.lView;\n    const tView = lView[TVIEW];\n    const lCleanup = lView[CLEANUP];\n    const tCleanup = tView.cleanup;\n    const listeners = [];\n    if (tCleanup && lCleanup) {\n        for (let i = 0; i < tCleanup.length;) {\n            const firstParam = tCleanup[i++];\n            const secondParam = tCleanup[i++];\n            if (typeof firstParam === 'string') {\n                const name = firstParam;\n                const listenerElement = unwrapRNode(lView[secondParam]);\n                const callback = lCleanup[tCleanup[i++]];\n                const useCaptureOrIndx = tCleanup[i++];\n                // if useCaptureOrIndx is boolean then report it as is.\n                // if useCaptureOrIndx is positive number then it in unsubscribe method\n                // if useCaptureOrIndx is negative number then it is a Subscription\n                const type = (typeof useCaptureOrIndx === 'boolean' || useCaptureOrIndx >= 0) ? 'dom' : 'output';\n                const useCapture = typeof useCaptureOrIndx === 'boolean' ? useCaptureOrIndx : false;\n                if (element == listenerElement) {\n                    listeners.push({ element, name, callback, useCapture, type });\n                }\n            }\n        }\n    }\n    listeners.sort(sortListeners);\n    return listeners;\n}\nfunction sortListeners(a, b) {\n    if (a.name == b.name)\n        return 0;\n    return a.name < b.name ? -1 : 1;\n}\n/**\n * This function should not exist because it is megamorphic and only mostly correct.\n *\n * See call site for more info.\n */\nfunction isDirectiveDefHack(obj) {\n    return obj.type !== undefined && obj.template !== undefined && obj.declaredInputs !== undefined;\n}\n/**\n * Returns the attached `DebugNode` instance for an element in the DOM.\n *\n * @param element DOM element which is owned by an existing component's view.\n */\nfunction getDebugNode(element) {\n    let debugNode = null;\n    const lContext = loadLContextFromNode(element);\n    const lView = lContext.lView;\n    const nodeIndex = lContext.nodeIndex;\n    if (nodeIndex !== -1) {\n        const valueInLView = lView[nodeIndex];\n        // this means that value in the lView is a component with its own\n        // data. In this situation the TNode is not accessed at the same spot.\n        const tNode = isLView(valueInLView) ? valueInLView[T_HOST] :\n            getTNode(lView[TVIEW], nodeIndex - HEADER_OFFSET);\n        debugNode = buildDebugNode(tNode, lView, nodeIndex);\n    }\n    return debugNode;\n}\n/**\n * Retrieve the component `LView` from component/element.\n *\n * NOTE: `LView` is a private and should not be leaked outside.\n *       Don't export this method to `ng.*` on window.\n *\n * @param target DOM element or component instance for which to retrieve the LView.\n */\nfunction getComponentLView(target) {\n    const lContext = loadLContext(target);\n    const nodeIndx = lContext.nodeIndex;\n    const lView = lContext.lView;\n    const componentLView = lView[nodeIndx];\n    ngDevMode && assertLView(componentLView);\n    return componentLView;\n}\n/** Asserts that a value is a DOM Element. */\nfunction assertDomElement(value) {\n    if (typeof Element !== 'undefined' && !(value instanceof Element)) {\n        throw new Error('Expecting instance of DOM Element');\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a component for check (in case of OnPush components) and synchronously\n * performs change detection on the application this component belongs to.\n *\n * @param component Component to {@link ChangeDetectorRef#markForCheck mark for check}.\n *\n * @publicApi\n * @globalApi ng\n */\nfunction applyChanges(component) {\n    markDirty(component);\n    getRootComponents(component).forEach(rootComponent => detectChanges(rootComponent));\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This file introduces series of globally accessible debug tools\n * to allow for the Angular debugging story to function.\n *\n * To see this in action run the following command:\n *\n *   bazel run --config=ivy\n *   //packages/core/test/bundling/todo:devserver\n *\n *  Then load `localhost:5432` and start using the console tools.\n */\n/**\n * This value reflects the property on the window where the dev\n * tools are patched (window.ng).\n * */\nconst GLOBAL_PUBLISH_EXPANDO_KEY = 'ng';\nlet _published = false;\n/**\n * Publishes a collection of default debug tools onto`window.ng`.\n *\n * These functions are available globally when Angular is in development\n * mode and are automatically stripped away from prod mode is on.\n */\nfunction publishDefaultGlobalUtils() {\n    if (!_published) {\n        _published = true;\n        publishGlobalUtil('getComponent', getComponent);\n        publishGlobalUtil('getContext', getContext);\n        publishGlobalUtil('getListeners', getListeners);\n        publishGlobalUtil('getOwningComponent', getOwningComponent);\n        publishGlobalUtil('getHostElement', getHostElement);\n        publishGlobalUtil('getInjector', getInjector);\n        publishGlobalUtil('getRootComponents', getRootComponents);\n        publishGlobalUtil('getDirectives', getDirectives);\n        publishGlobalUtil('applyChanges', applyChanges);\n    }\n}\n/**\n * Publishes the given function to `window.ng` so that it can be\n * used from the browser console when an application is not in production.\n */\nfunction publishGlobalUtil(name, fn) {\n    if (typeof COMPILED === 'undefined' || !COMPILED) {\n        // Note: we can't export `ng` when using closure enhanced optimization as:\n        // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n        // - we can't declare a closure extern as the namespace `ng` is already used within Google\n        //   for typings for AngularJS (via `goog.provide('ng....')`).\n        const w = _global;\n        ngDevMode && assertDefined(fn, 'function not defined');\n        if (w) {\n            let container = w[GLOBAL_PUBLISH_EXPANDO_KEY];\n            if (!container) {\n                container = w[GLOBAL_PUBLISH_EXPANDO_KEY] = {};\n            }\n            container[name] = fn;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$b = (token, notFoundValue) => {\n    throw new Error('NullInjector: Not found: ' + stringifyForError(token));\n};\n// TODO: A hack to not pull in the NullInjector from @angular/core.\nconst NULL_INJECTOR$1 = {\n    get: ɵ0$b\n};\n/**\n * Bootstraps a Component into an existing host element and returns an instance\n * of the component.\n *\n * Use this function to bootstrap a component into the DOM tree. Each invocation\n * of this function will create a separate tree of components, injectors and\n * change detection cycles and lifetimes. To dynamically insert a new component\n * into an existing tree such that it shares the same injection, change detection\n * and object lifetime, use {@link ViewContainer#createComponent}.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\nfunction renderComponent$1(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts = {}) {\n    ngDevMode && publishDefaultGlobalUtils();\n    ngDevMode && assertComponentType(componentType);\n    const rendererFactory = opts.rendererFactory || domRendererFactory3;\n    const sanitizer = opts.sanitizer || null;\n    const componentDef = getComponentDef(componentType);\n    if (componentDef.type != componentType)\n        componentDef.type = componentType;\n    // The first index of the first selector is the tag name.\n    const componentTag = componentDef.selectors[0][0];\n    const hostRenderer = rendererFactory.createRenderer(null, null);\n    const hostRNode = locateHostElement(hostRenderer, opts.host || componentTag, componentDef.encapsulation);\n    const rootFlags = componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n        16 /* CheckAlways */ | 512 /* IsRoot */;\n    const rootContext = createRootContext(opts.scheduler, opts.playerHandler);\n    const renderer = rendererFactory.createRenderer(hostRNode, componentDef);\n    const rootTView = createTView(0 /* Root */, -1, null, 1, 0, null, null, null, null, null);\n    const rootView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, renderer, undefined, opts.injector || null);\n    enterView(rootView, null);\n    let component;\n    try {\n        if (rendererFactory.begin)\n            rendererFactory.begin();\n        const componentView = createRootComponentView(hostRNode, componentDef, rootView, rendererFactory, renderer, sanitizer);\n        component = createRootComponent(componentView, componentDef, rootView, rootContext, opts.hostFeatures || null);\n        // create mode pass\n        renderView(rootTView, rootView, null);\n        // update mode pass\n        refreshView(rootTView, rootView, null, null);\n    }\n    finally {\n        leaveView();\n        if (rendererFactory.end)\n            rendererFactory.end();\n    }\n    return component;\n}\n/**\n * Creates the root component view and the root component node.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n * @param rootView The parent view where the host node is stored\n * @param hostRenderer The current renderer\n * @param sanitizer The sanitizer, if provided\n *\n * @returns Component view created\n */\nfunction createRootComponentView(rNode, def, rootView, rendererFactory, hostRenderer, sanitizer) {\n    const tView = rootView[TVIEW];\n    ngDevMode && assertIndexInRange(rootView, 0 + HEADER_OFFSET);\n    rootView[0 + HEADER_OFFSET] = rNode;\n    const tNode = getOrCreateTNode(tView, null, 0, 3 /* Element */, null, null);\n    const mergedAttrs = tNode.mergedAttrs = def.hostAttrs;\n    if (mergedAttrs !== null) {\n        computeStaticStyling(tNode, mergedAttrs, true);\n        if (rNode !== null) {\n            setUpAttributes(hostRenderer, rNode, mergedAttrs);\n            if (tNode.classes !== null) {\n                writeDirectClass(hostRenderer, rNode, tNode.classes);\n            }\n            if (tNode.styles !== null) {\n                writeDirectStyle(hostRenderer, rNode, tNode.styles);\n            }\n        }\n    }\n    const viewRenderer = rendererFactory.createRenderer(rNode, def);\n    const componentView = createLView(rootView, getOrCreateTComponentView(def), null, def.onPush ? 64 /* Dirty */ : 16 /* CheckAlways */, rootView[HEADER_OFFSET], tNode, rendererFactory, viewRenderer, sanitizer);\n    if (tView.firstCreatePass) {\n        diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, rootView), tView, def.type);\n        markAsComponentHost(tView, tNode);\n        initTNodeFlags(tNode, rootView.length, 1);\n    }\n    addToViewTree(rootView, componentView);\n    // Store component view at node index, with node as the HOST\n    return rootView[HEADER_OFFSET] = componentView;\n}\n/**\n * Creates a root component and sets it up with features and host bindings. Shared by\n * renderComponent() and ViewContainerRef.createComponent().\n */\nfunction createRootComponent(componentView, componentDef, rootLView, rootContext, hostFeatures) {\n    const tView = rootLView[TVIEW];\n    // Create directive instance with factory() and store at next index in viewData\n    const component = instantiateRootComponent(tView, rootLView, componentDef);\n    rootContext.components.push(component);\n    componentView[CONTEXT] = component;\n    hostFeatures && hostFeatures.forEach((feature) => feature(component, componentDef));\n    // We want to generate an empty QueryList for root content queries for backwards\n    // compatibility with ViewEngine.\n    if (componentDef.contentQueries) {\n        componentDef.contentQueries(1 /* Create */, component, rootLView.length - 1);\n    }\n    const rootTNode = getPreviousOrParentTNode();\n    if (tView.firstCreatePass &&\n        (componentDef.hostBindings !== null || componentDef.hostAttrs !== null)) {\n        const elementIndex = rootTNode.index - HEADER_OFFSET;\n        setSelectedIndex(elementIndex);\n        const rootTView = rootLView[TVIEW];\n        addHostBindingsToExpandoInstructions(rootTView, componentDef);\n        growHostVarsSpace(rootTView, rootLView, componentDef.hostVars);\n        invokeHostBindingsInCreationMode(componentDef, component);\n    }\n    return component;\n}\nfunction createRootContext(scheduler, playerHandler) {\n    return {\n        components: [],\n        scheduler: scheduler || defaultScheduler,\n        clean: CLEAN_PROMISE,\n        playerHandler: playerHandler || null,\n        flags: 0 /* Empty */\n    };\n}\n/**\n * Used to enable lifecycle hooks on the root component.\n *\n * Include this feature when calling `renderComponent` if the root component\n * you are rendering has lifecycle hooks defined. Otherwise, the hooks won't\n * be called properly.\n *\n * Example:\n *\n * ```\n * renderComponent(AppComponent, {hostFeatures: [LifecycleHooksFeature]});\n * ```\n */\nfunction LifecycleHooksFeature(component, def) {\n    const rootTView = readPatchedLView(component)[TVIEW];\n    const dirIndex = rootTView.data.length - 1;\n    // TODO(misko): replace `as TNode` with createTNode call. (needs refactoring to lose dep on\n    // LNode).\n    registerPostOrderHooks(rootTView, { directiveStart: dirIndex, directiveEnd: dirIndex + 1 });\n}\n/**\n * Wait on component until it is rendered.\n *\n * This function returns a `Promise` which is resolved when the component's\n * change detection is executed. This is determined by finding the scheduler\n * associated with the `component`'s render tree and waiting until the scheduler\n * flushes. If nothing is scheduled, the function returns a resolved promise.\n *\n * Example:\n * ```\n * await whenRendered(myComponent);\n * ```\n *\n * @param component Component to wait upon\n * @returns Promise which resolves when the component is rendered.\n */\nfunction whenRendered(component) {\n    return getRootContext(component).clean;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getSuperType(type) {\n    return Object.getPrototypeOf(type.prototype).constructor;\n}\n/**\n * Merges the definition from a super class to a sub class.\n * @param definition The definition that is a SubClass of another directive of component\n *\n * @codeGenApi\n */\nfunction ɵɵInheritDefinitionFeature(definition) {\n    let superType = getSuperType(definition.type);\n    let shouldInheritFields = true;\n    const inheritanceChain = [definition];\n    while (superType) {\n        let superDef = undefined;\n        if (isComponentDef(definition)) {\n            // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n            superDef = superType.ɵcmp || superType.ɵdir;\n        }\n        else {\n            if (superType.ɵcmp) {\n                throw new Error('Directives cannot inherit Components');\n            }\n            // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n            superDef = superType.ɵdir;\n        }\n        if (superDef) {\n            if (shouldInheritFields) {\n                inheritanceChain.push(superDef);\n                // Some fields in the definition may be empty, if there were no values to put in them that\n                // would've justified object creation. Unwrap them if necessary.\n                const writeableDef = definition;\n                writeableDef.inputs = maybeUnwrapEmpty(definition.inputs);\n                writeableDef.declaredInputs = maybeUnwrapEmpty(definition.declaredInputs);\n                writeableDef.outputs = maybeUnwrapEmpty(definition.outputs);\n                // Merge hostBindings\n                const superHostBindings = superDef.hostBindings;\n                superHostBindings && inheritHostBindings(definition, superHostBindings);\n                // Merge queries\n                const superViewQuery = superDef.viewQuery;\n                const superContentQueries = superDef.contentQueries;\n                superViewQuery && inheritViewQuery(definition, superViewQuery);\n                superContentQueries && inheritContentQueries(definition, superContentQueries);\n                // Merge inputs and outputs\n                fillProperties(definition.inputs, superDef.inputs);\n                fillProperties(definition.declaredInputs, superDef.declaredInputs);\n                fillProperties(definition.outputs, superDef.outputs);\n                // Merge animations metadata.\n                // If `superDef` is a Component, the `data` field is present (defaults to an empty object).\n                if (isComponentDef(superDef) && superDef.data.animation) {\n                    // If super def is a Component, the `definition` is also a Component, since Directives can\n                    // not inherit Components (we throw an error above and cannot reach this code).\n                    const defData = definition.data;\n                    defData.animation = (defData.animation || []).concat(superDef.data.animation);\n                }\n            }\n            // Run parent features\n            const features = superDef.features;\n            if (features) {\n                for (let i = 0; i < features.length; i++) {\n                    const feature = features[i];\n                    if (feature && feature.ngInherit) {\n                        feature(definition);\n                    }\n                    // If `InheritDefinitionFeature` is a part of the current `superDef`, it means that this\n                    // def already has all the necessary information inherited from its super class(es), so we\n                    // can stop merging fields from super classes. However we need to iterate through the\n                    // prototype chain to look for classes that might contain other \"features\" (like\n                    // NgOnChanges), which we should invoke for the original `definition`. We set the\n                    // `shouldInheritFields` flag to indicate that, essentially skipping fields inheritance\n                    // logic and only invoking functions from the \"features\" list.\n                    if (feature === ɵɵInheritDefinitionFeature) {\n                        shouldInheritFields = false;\n                    }\n                }\n            }\n        }\n        superType = Object.getPrototypeOf(superType);\n    }\n    mergeHostAttrsAcrossInheritance(inheritanceChain);\n}\n/**\n * Merge the `hostAttrs` and `hostVars` from the inherited parent to the base class.\n *\n * @param inheritanceChain A list of `WritableDefs` starting at the top most type and listing\n * sub-types in order. For each type take the `hostAttrs` and `hostVars` and merge it with the child\n * type.\n */\nfunction mergeHostAttrsAcrossInheritance(inheritanceChain) {\n    let hostVars = 0;\n    let hostAttrs = null;\n    // We process the inheritance order from the base to the leaves here.\n    for (let i = inheritanceChain.length - 1; i >= 0; i--) {\n        const def = inheritanceChain[i];\n        // For each `hostVars`, we need to add the superclass amount.\n        def.hostVars = (hostVars += def.hostVars);\n        // for each `hostAttrs` we need to merge it with superclass.\n        def.hostAttrs =\n            mergeHostAttrs(def.hostAttrs, hostAttrs = mergeHostAttrs(hostAttrs, def.hostAttrs));\n    }\n}\nfunction maybeUnwrapEmpty(value) {\n    if (value === EMPTY_OBJ) {\n        return {};\n    }\n    else if (value === EMPTY_ARRAY) {\n        return [];\n    }\n    else {\n        return value;\n    }\n}\nfunction inheritViewQuery(definition, superViewQuery) {\n    const prevViewQuery = definition.viewQuery;\n    if (prevViewQuery) {\n        definition.viewQuery = (rf, ctx) => {\n            superViewQuery(rf, ctx);\n            prevViewQuery(rf, ctx);\n        };\n    }\n    else {\n        definition.viewQuery = superViewQuery;\n    }\n}\nfunction inheritContentQueries(definition, superContentQueries) {\n    const prevContentQueries = definition.contentQueries;\n    if (prevContentQueries) {\n        definition.contentQueries = (rf, ctx, directiveIndex) => {\n            superContentQueries(rf, ctx, directiveIndex);\n            prevContentQueries(rf, ctx, directiveIndex);\n        };\n    }\n    else {\n        definition.contentQueries = superContentQueries;\n    }\n}\nfunction inheritHostBindings(definition, superHostBindings) {\n    const prevHostBindings = definition.hostBindings;\n    if (prevHostBindings) {\n        definition.hostBindings = (rf, ctx) => {\n            superHostBindings(rf, ctx);\n            prevHostBindings(rf, ctx);\n        };\n    }\n    else {\n        definition.hostBindings = superHostBindings;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Fields which exist on either directive or component definitions, and need to be copied from\n * parent to child classes by the `ɵɵCopyDefinitionFeature`.\n */\nconst COPY_DIRECTIVE_FIELDS = [\n    // The child class should use the providers of its parent.\n    'providersResolver',\n];\n/**\n * Fields which exist only on component definitions, and need to be copied from parent to child\n * classes by the `ɵɵCopyDefinitionFeature`.\n *\n * The type here allows any field of `ComponentDef` which is not also a property of `DirectiveDef`,\n * since those should go in `COPY_DIRECTIVE_FIELDS` above.\n */\nconst COPY_COMPONENT_FIELDS = [\n    // The child class should use the template function of its parent, including all template\n    // semantics.\n    'template',\n    'decls',\n    'consts',\n    'vars',\n    'onPush',\n    'ngContentSelectors',\n    // The child class should use the CSS styles of its parent, including all styling semantics.\n    'styles',\n    'encapsulation',\n    // The child class should be checked by the runtime in the same way as its parent.\n    'schemas',\n];\n/**\n * Copies the fields not handled by the `ɵɵInheritDefinitionFeature` from the supertype of a\n * definition.\n *\n * This exists primarily to support ngcc migration of an existing View Engine pattern, where an\n * entire decorator is inherited from a parent to a child class. When ngcc detects this case, it\n * generates a skeleton definition on the child class, and applies this feature.\n *\n * The `ɵɵCopyDefinitionFeature` then copies any needed fields from the parent class' definition,\n * including things like the component template function.\n *\n * @param definition The definition of a child class which inherits from a parent class with its\n * own definition.\n *\n * @codeGenApi\n */\nfunction ɵɵCopyDefinitionFeature(definition) {\n    let superType = getSuperType(definition.type);\n    let superDef = undefined;\n    if (isComponentDef(definition)) {\n        // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n        superDef = superType.ɵcmp;\n    }\n    else {\n        // Don't use getComponentDef/getDirectiveDef. This logic relies on inheritance.\n        superDef = superType.ɵdir;\n    }\n    // Needed because `definition` fields are readonly.\n    const defAny = definition;\n    // Copy over any fields that apply to either directives or components.\n    for (const field of COPY_DIRECTIVE_FIELDS) {\n        defAny[field] = superDef[field];\n    }\n    if (isComponentDef(superDef)) {\n        // Copy over any component-specific fields.\n        for (const field of COPY_COMPONENT_FIELDS) {\n            defAny[field] = superDef[field];\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Resolves the providers which are defined in the DirectiveDef.\n *\n * When inserting the tokens and the factories in their respective arrays, we can assume that\n * this method is called first for the component (if any), and then for other directives on the same\n * node.\n * As a consequence,the providers are always processed in that order:\n * 1) The view providers of the component\n * 2) The providers of the component\n * 3) The providers of the other directives\n * This matches the structure of the injectables arrays of a view (for each node).\n * So the tokens and the factories can be pushed at the end of the arrays, except\n * in one case for multi providers.\n *\n * @param def the directive definition\n * @param providers: Array of `providers`.\n * @param viewProviders: Array of `viewProviders`.\n */\nfunction providersResolver(def, providers, viewProviders) {\n    const tView = getTView();\n    if (tView.firstCreatePass) {\n        const isComponent = isComponentDef(def);\n        // The list of view providers is processed first, and the flags are updated\n        resolveProvider$1(viewProviders, tView.data, tView.blueprint, isComponent, true);\n        // Then, the list of providers is processed, and the flags are updated\n        resolveProvider$1(providers, tView.data, tView.blueprint, isComponent, false);\n    }\n}\n/**\n * Resolves a provider and publishes it to the DI system.\n */\nfunction resolveProvider$1(provider, tInjectables, lInjectablesBlueprint, isComponent, isViewProvider) {\n    provider = resolveForwardRef(provider);\n    if (Array.isArray(provider)) {\n        // Recursively call `resolveProvider`\n        // Recursion is OK in this case because this code will not be in hot-path once we implement\n        // cloning of the initial state.\n        for (let i = 0; i < provider.length; i++) {\n            resolveProvider$1(provider[i], tInjectables, lInjectablesBlueprint, isComponent, isViewProvider);\n        }\n    }\n    else {\n        const tView = getTView();\n        const lView = getLView();\n        let token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n        let providerFactory = providerToFactory(provider);\n        const tNode = getPreviousOrParentTNode();\n        const beginIndex = tNode.providerIndexes & 1048575 /* ProvidersStartIndexMask */;\n        const endIndex = tNode.directiveStart;\n        const cptViewProvidersCount = tNode.providerIndexes >> 20 /* CptViewProvidersCountShift */;\n        if (isTypeProvider(provider) || !provider.multi) {\n            // Single provider case: the factory is created and pushed immediately\n            const factory = new NodeInjectorFactory(providerFactory, isViewProvider, ɵɵdirectiveInject);\n            const existingFactoryIndex = indexOf(token, tInjectables, isViewProvider ? beginIndex : beginIndex + cptViewProvidersCount, endIndex);\n            if (existingFactoryIndex === -1) {\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n                registerDestroyHooksIfSupported(tView, provider, tInjectables.length);\n                tInjectables.push(token);\n                tNode.directiveStart++;\n                tNode.directiveEnd++;\n                if (isViewProvider) {\n                    tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n                }\n                lInjectablesBlueprint.push(factory);\n                lView.push(factory);\n            }\n            else {\n                lInjectablesBlueprint[existingFactoryIndex] = factory;\n                lView[existingFactoryIndex] = factory;\n            }\n        }\n        else {\n            // Multi provider case:\n            // We create a multi factory which is going to aggregate all the values.\n            // Since the output of such a factory depends on content or view injection,\n            // we create two of them, which are linked together.\n            //\n            // The first one (for view providers) is always in the first block of the injectables array,\n            // and the second one (for providers) is always in the second block.\n            // This is important because view providers have higher priority. When a multi token\n            // is being looked up, the view providers should be found first.\n            // Note that it is not possible to have a multi factory in the third block (directive block).\n            //\n            // The algorithm to process multi providers is as follows:\n            // 1) If the multi provider comes from the `viewProviders` of the component:\n            //   a) If the special view providers factory doesn't exist, it is created and pushed.\n            //   b) Else, the multi provider is added to the existing multi factory.\n            // 2) If the multi provider comes from the `providers` of the component or of another\n            // directive:\n            //   a) If the multi factory doesn't exist, it is created and provider pushed into it.\n            //      It is also linked to the multi factory for view providers, if it exists.\n            //   b) Else, the multi provider is added to the existing multi factory.\n            const existingProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex + cptViewProvidersCount, endIndex);\n            const existingViewProvidersFactoryIndex = indexOf(token, tInjectables, beginIndex, beginIndex + cptViewProvidersCount);\n            const doesProvidersFactoryExist = existingProvidersFactoryIndex >= 0 &&\n                lInjectablesBlueprint[existingProvidersFactoryIndex];\n            const doesViewProvidersFactoryExist = existingViewProvidersFactoryIndex >= 0 &&\n                lInjectablesBlueprint[existingViewProvidersFactoryIndex];\n            if (isViewProvider && !doesViewProvidersFactoryExist ||\n                !isViewProvider && !doesProvidersFactoryExist) {\n                // Cases 1.a and 2.a\n                diPublicInInjector(getOrCreateNodeInjectorForNode(tNode, lView), tView, token);\n                const factory = multiFactory(isViewProvider ? multiViewProvidersFactoryResolver : multiProvidersFactoryResolver, lInjectablesBlueprint.length, isViewProvider, isComponent, providerFactory);\n                if (!isViewProvider && doesViewProvidersFactoryExist) {\n                    lInjectablesBlueprint[existingViewProvidersFactoryIndex].providerFactory = factory;\n                }\n                registerDestroyHooksIfSupported(tView, provider, tInjectables.length, 0);\n                tInjectables.push(token);\n                tNode.directiveStart++;\n                tNode.directiveEnd++;\n                if (isViewProvider) {\n                    tNode.providerIndexes += 1048576 /* CptViewProvidersCountShifter */;\n                }\n                lInjectablesBlueprint.push(factory);\n                lView.push(factory);\n            }\n            else {\n                // Cases 1.b and 2.b\n                const indexInFactory = multiFactoryAdd(lInjectablesBlueprint[isViewProvider ? existingViewProvidersFactoryIndex :\n                    existingProvidersFactoryIndex], providerFactory, !isViewProvider && isComponent);\n                registerDestroyHooksIfSupported(tView, provider, existingProvidersFactoryIndex > -1 ? existingProvidersFactoryIndex :\n                    existingViewProvidersFactoryIndex, indexInFactory);\n            }\n            if (!isViewProvider && isComponent && doesViewProvidersFactoryExist) {\n                lInjectablesBlueprint[existingViewProvidersFactoryIndex].componentProviders++;\n            }\n        }\n    }\n}\n/**\n * Registers the `ngOnDestroy` hook of a provider, if the provider supports destroy hooks.\n * @param tView `TView` in which to register the hook.\n * @param provider Provider whose hook should be registered.\n * @param contextIndex Index under which to find the context for the hook when it's being invoked.\n * @param indexInFactory Only required for `multi` providers. Index of the provider in the multi\n * provider factory.\n */\nfunction registerDestroyHooksIfSupported(tView, provider, contextIndex, indexInFactory) {\n    const providerIsTypeProvider = isTypeProvider(provider);\n    if (providerIsTypeProvider || isClassProvider(provider)) {\n        const prototype = (provider.useClass || provider).prototype;\n        const ngOnDestroy = prototype.ngOnDestroy;\n        if (ngOnDestroy) {\n            const hooks = tView.destroyHooks || (tView.destroyHooks = []);\n            if (!providerIsTypeProvider && provider.multi) {\n                ngDevMode &&\n                    assertDefined(indexInFactory, 'indexInFactory when registering multi factory destroy hook');\n                const existingCallbacksIndex = hooks.indexOf(contextIndex);\n                if (existingCallbacksIndex === -1) {\n                    hooks.push(contextIndex, [indexInFactory, ngOnDestroy]);\n                }\n                else {\n                    hooks[existingCallbacksIndex + 1].push(indexInFactory, ngOnDestroy);\n                }\n            }\n            else {\n                hooks.push(contextIndex, ngOnDestroy);\n            }\n        }\n    }\n}\n/**\n * Add a factory in a multi factory.\n * @returns Index at which the factory was inserted.\n */\nfunction multiFactoryAdd(multiFactory, factory, isComponentProvider) {\n    if (isComponentProvider) {\n        multiFactory.componentProviders++;\n    }\n    return multiFactory.multi.push(factory) - 1;\n}\n/**\n * Returns the index of item in the array, but only in the begin to end range.\n */\nfunction indexOf(item, arr, begin, end) {\n    for (let i = begin; i < end; i++) {\n        if (arr[i] === item)\n            return i;\n    }\n    return -1;\n}\n/**\n * Use this with `multi` `providers`.\n */\nfunction multiProvidersFactoryResolver(_, tData, lData, tNode) {\n    return multiResolve(this.multi, []);\n}\n/**\n * Use this with `multi` `viewProviders`.\n *\n * This factory knows how to concatenate itself with the existing `multi` `providers`.\n */\nfunction multiViewProvidersFactoryResolver(_, tData, lView, tNode) {\n    const factories = this.multi;\n    let result;\n    if (this.providerFactory) {\n        const componentCount = this.providerFactory.componentProviders;\n        const multiProviders = getNodeInjectable(lView, lView[TVIEW], this.providerFactory.index, tNode);\n        // Copy the section of the array which contains `multi` `providers` from the component\n        result = multiProviders.slice(0, componentCount);\n        // Insert the `viewProvider` instances.\n        multiResolve(factories, result);\n        // Copy the section of the array which contains `multi` `providers` from other directives\n        for (let i = componentCount; i < multiProviders.length; i++) {\n            result.push(multiProviders[i]);\n        }\n    }\n    else {\n        result = [];\n        // Insert the `viewProvider` instances.\n        multiResolve(factories, result);\n    }\n    return result;\n}\n/**\n * Maps an array of factories into an array of values.\n */\nfunction multiResolve(factories, result) {\n    for (let i = 0; i < factories.length; i++) {\n        const factory = factories[i];\n        result.push(factory());\n    }\n    return result;\n}\n/**\n * Creates a multi factory.\n */\nfunction multiFactory(factoryFn, index, isViewProvider, isComponent, f) {\n    const factory = new NodeInjectorFactory(factoryFn, isViewProvider, ɵɵdirectiveInject);\n    factory.multi = [];\n    factory.index = index;\n    factory.componentProviders = 0;\n    multiFactoryAdd(factory, f, isComponent && !isViewProvider);\n    return factory;\n}\n\n/**\n * This feature resolves the providers of a directive (or component),\n * and publish them into the DI system, making it visible to others for injection.\n *\n * For example:\n * ```ts\n * class ComponentWithProviders {\n *   constructor(private greeter: GreeterDE) {}\n *\n *   static ɵcmp = defineComponent({\n *     type: ComponentWithProviders,\n *     selectors: [['component-with-providers']],\n *    factory: () => new ComponentWithProviders(directiveInject(GreeterDE as any)),\n *    decls: 1,\n *    vars: 1,\n *    template: function(fs: RenderFlags, ctx: ComponentWithProviders) {\n *      if (fs & RenderFlags.Create) {\n *        ɵɵtext(0);\n *      }\n *      if (fs & RenderFlags.Update) {\n *        ɵɵtextInterpolate(ctx.greeter.greet());\n *      }\n *    },\n *    features: [ProvidersFeature([GreeterDE])]\n *  });\n * }\n * ```\n *\n * @param definition\n *\n * @codeGenApi\n */\nfunction ɵɵProvidersFeature(providers, viewProviders = []) {\n    return (definition) => {\n        definition.providersResolver =\n            (def, processProvidersFn) => {\n                return providersResolver(def, //\n                processProvidersFn ? processProvidersFn(providers) : providers, //\n                viewProviders);\n            };\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a component created by a `ComponentFactory`.\n * Provides access to the component instance and related objects,\n * and provides the means of destroying the instance.\n *\n * @publicApi\n */\nclass ComponentRef {\n}\n/**\n * Base class for a factory that can create a component dynamically.\n * Instantiate a factory for a given type of component with `resolveComponentFactory()`.\n * Use the resulting `ComponentFactory.create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n *\n * @publicApi\n */\nclass ComponentFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noComponentFactoryError(component) {\n    const error = Error(`No component factory found for ${stringify(component)}. Did you add it to @NgModule.entryComponents?`);\n    error[ERROR_COMPONENT] = component;\n    return error;\n}\nconst ERROR_COMPONENT = 'ngComponent';\nfunction getComponent$1(error) {\n    return error[ERROR_COMPONENT];\n}\nclass _NullComponentFactoryResolver {\n    resolveComponentFactory(component) {\n        throw noComponentFactoryError(component);\n    }\n}\n/**\n * A simple registry that maps `Components` to generated `ComponentFactory` classes\n * that can be used to create instances of components.\n * Use to obtain the factory for a given component type,\n * then use the factory's `create()` method to create a component of that type.\n *\n * @see [Dynamic Components](guide/dynamic-component-loader)\n * @publicApi\n */\nclass ComponentFactoryResolver {\n}\nComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\nclass CodegenComponentFactoryResolver {\n    constructor(factories, _parent, _ngModule) {\n        this._parent = _parent;\n        this._ngModule = _ngModule;\n        this._factories = new Map();\n        for (let i = 0; i < factories.length; i++) {\n            const factory = factories[i];\n            this._factories.set(factory.componentType, factory);\n        }\n    }\n    resolveComponentFactory(component) {\n        let factory = this._factories.get(component);\n        if (!factory && this._parent) {\n            factory = this._parent.resolveComponentFactory(component);\n        }\n        if (!factory) {\n            throw noComponentFactoryError(component);\n        }\n        return new ComponentFactoryBoundToModule(factory, this._ngModule);\n    }\n}\nclass ComponentFactoryBoundToModule extends ComponentFactory {\n    constructor(factory, ngModule) {\n        super();\n        this.factory = factory;\n        this.ngModule = ngModule;\n        this.selector = factory.selector;\n        this.componentType = factory.componentType;\n        this.ngContentSelectors = factory.ngContentSelectors;\n        this.inputs = factory.inputs;\n        this.outputs = factory.outputs;\n    }\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction noop(...args) {\n    // Do nothing.\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A wrapper around a native element inside of a View.\n *\n * An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM\n * element.\n *\n * @security Permitting direct access to the DOM can make your application more vulnerable to\n * XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n// Note: We don't expose things like `Injector`, `ViewContainer`, ... here,\n// i.e. users have to ask for what they need. With that, we can build better analysis tools\n// and could do better codegen in the future.\nclass ElementRef {\n    constructor(nativeElement) {\n        this.nativeElement = nativeElement;\n    }\n}\n/**\n * @internal\n * @nocollapse\n */\nElementRef.__NG_ELEMENT_ID__ = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);\nconst SWITCH_ELEMENT_REF_FACTORY__POST_R3__ = injectElementRef;\nconst SWITCH_ELEMENT_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_ELEMENT_REF_FACTORY = SWITCH_ELEMENT_REF_FACTORY__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Creates and initializes a custom renderer that implements the `Renderer2` base class.\n *\n * @publicApi\n */\nclass RendererFactory2 {\n}\n/**\n * Flags for renderer-specific style modifiers.\n * @publicApi\n */\nvar RendererStyleFlags2;\n(function (RendererStyleFlags2) {\n    // TODO(misko): This needs to be refactored into a separate file so that it can be imported from\n    // `node_manipulation.ts` Currently doing the import cause resolution order to change and fails\n    // the tests. The work around is to have hard coded value in `node_manipulation.ts` for now.\n    /**\n     * Marks a style as important.\n     */\n    RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n    /**\n     * Marks a style as using dash case naming (this-is-dash-case).\n     */\n    RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));\n/**\n * Extend this base class to implement custom rendering. By default, Angular\n * renders a template into DOM. You can use custom rendering to intercept\n * rendering calls, or to render to something other than DOM.\n *\n * Create your custom renderer using `RendererFactory2`.\n *\n * Use a custom renderer to bypass Angular's templating and\n * make custom UI changes that can't be expressed declaratively.\n * For example if you need to set a property or an attribute whose name is\n * not statically known, use the `setProperty()` or\n * `setAttribute()` method.\n *\n * @publicApi\n */\nclass Renderer2 {\n}\n/**\n * @internal\n * @nocollapse\n */\nRenderer2.__NG_ELEMENT_ID__ = () => SWITCH_RENDERER2_FACTORY();\nconst SWITCH_RENDERER2_FACTORY__POST_R3__ = injectRenderer2;\nconst SWITCH_RENDERER2_FACTORY__PRE_R3__ = noop;\nconst SWITCH_RENDERER2_FACTORY = SWITCH_RENDERER2_FACTORY__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n * @publicApi\n */\nclass Sanitizer {\n}\n/** @nocollapse */\nSanitizer.ɵprov = ɵɵdefineInjectable({\n    token: Sanitizer,\n    providedIn: 'root',\n    factory: () => null,\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @description Represents the version of Angular\n *\n * @publicApi\n */\nclass Version {\n    constructor(full) {\n        this.full = full;\n        this.major = full.split('.')[0];\n        this.minor = full.split('.')[1];\n        this.patch = full.split('.').slice(2).join('.');\n    }\n}\n/**\n * @publicApi\n */\nconst VERSION = new Version('10.1.1');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultIterableDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return isListLikeIterable(obj);\n    }\n    create(trackByFn) {\n        return new DefaultIterableDiffer(trackByFn);\n    }\n}\nconst trackByIdentity = (index, item) => item;\nconst ɵ0$c = trackByIdentity;\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n * @publicApi\n */\nclass DefaultIterableDiffer {\n    constructor(trackByFn) {\n        this.length = 0;\n        // Keeps track of the used records at any point in time (during & across `_check()` calls)\n        this._linkedRecords = null;\n        // Keeps track of the removed records at any point in time during `_check()` calls.\n        this._unlinkedRecords = null;\n        this._previousItHead = null;\n        this._itHead = null;\n        this._itTail = null;\n        this._additionsHead = null;\n        this._additionsTail = null;\n        this._movesHead = null;\n        this._movesTail = null;\n        this._removalsHead = null;\n        this._removalsTail = null;\n        // Keeps track of records where custom track by is the same, but item identity has changed\n        this._identityChangesHead = null;\n        this._identityChangesTail = null;\n        this._trackByFn = trackByFn || trackByIdentity;\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._itHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachOperation(fn) {\n        let nextIt = this._itHead;\n        let nextRemove = this._removalsHead;\n        let addRemoveOffset = 0;\n        let moveOffsets = null;\n        while (nextIt || nextRemove) {\n            // Figure out which is the next record to process\n            // Order: remove, add, move\n            const record = !nextRemove ||\n                nextIt &&\n                    nextIt.currentIndex <\n                        getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n                nextIt :\n                nextRemove;\n            const adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n            const currentIndex = record.currentIndex;\n            // consume the item, and adjust the addRemoveOffset and update moveDistance if necessary\n            if (record === nextRemove) {\n                addRemoveOffset--;\n                nextRemove = nextRemove._nextRemoved;\n            }\n            else {\n                nextIt = nextIt._next;\n                if (record.previousIndex == null) {\n                    addRemoveOffset++;\n                }\n                else {\n                    // INVARIANT:  currentIndex < previousIndex\n                    if (!moveOffsets)\n                        moveOffsets = [];\n                    const localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n                    const localCurrentIndex = currentIndex - addRemoveOffset;\n                    if (localMovePreviousIndex != localCurrentIndex) {\n                        for (let i = 0; i < localMovePreviousIndex; i++) {\n                            const offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n                            const index = offset + i;\n                            if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n                                moveOffsets[i] = offset + 1;\n                            }\n                        }\n                        const previousIndex = record.previousIndex;\n                        moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n                    }\n                }\n            }\n            if (adjPreviousIndex !== currentIndex) {\n                fn(record, adjPreviousIndex, currentIndex);\n            }\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachMovedItem(fn) {\n        let record;\n        for (record = this._movesHead; record !== null; record = record._nextMoved) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    forEachIdentityChange(fn) {\n        let record;\n        for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n            fn(record);\n        }\n    }\n    diff(collection) {\n        if (collection == null)\n            collection = [];\n        if (!isListLikeIterable(collection)) {\n            throw new Error(`Error trying to diff '${stringify(collection)}'. Only arrays and iterables are allowed`);\n        }\n        if (this.check(collection)) {\n            return this;\n        }\n        else {\n            return null;\n        }\n    }\n    onDestroy() { }\n    check(collection) {\n        this._reset();\n        let record = this._itHead;\n        let mayBeDirty = false;\n        let index;\n        let item;\n        let itemTrackBy;\n        if (Array.isArray(collection)) {\n            this.length = collection.length;\n            for (let index = 0; index < this.length; index++) {\n                item = collection[index];\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n                    record = this._mismatch(record, item, itemTrackBy, index);\n                    mayBeDirty = true;\n                }\n                else {\n                    if (mayBeDirty) {\n                        // TODO(misko): can we limit this to duplicates only?\n                        record = this._verifyReinsertion(record, item, itemTrackBy, index);\n                    }\n                    if (!Object.is(record.item, item))\n                        this._addIdentityChange(record, item);\n                }\n                record = record._next;\n            }\n        }\n        else {\n            index = 0;\n            iterateListLike(collection, (item) => {\n                itemTrackBy = this._trackByFn(index, item);\n                if (record === null || !Object.is(record.trackById, itemTrackBy)) {\n                    record = this._mismatch(record, item, itemTrackBy, index);\n                    mayBeDirty = true;\n                }\n                else {\n                    if (mayBeDirty) {\n                        // TODO(misko): can we limit this to duplicates only?\n                        record = this._verifyReinsertion(record, item, itemTrackBy, index);\n                    }\n                    if (!Object.is(record.item, item))\n                        this._addIdentityChange(record, item);\n                }\n                record = record._next;\n                index++;\n            });\n            this.length = index;\n        }\n        this._truncate(record);\n        this.collection = collection;\n        return this.isDirty;\n    }\n    /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n     * changes.\n     */\n    get isDirty() {\n        return this._additionsHead !== null || this._movesHead !== null ||\n            this._removalsHead !== null || this._identityChangesHead !== null;\n    }\n    /**\n     * Reset the state of the change objects to show no changes. This means set previousKey to\n     * currentKey, and clear all of the queues (additions, moves, removals).\n     * Set the previousIndexes of moved and added items to their currentIndexes\n     * Reset the list of additions, moves and removals\n     *\n     * @internal\n     */\n    _reset() {\n        if (this.isDirty) {\n            let record;\n            let nextRecord;\n            for (record = this._previousItHead = this._itHead; record !== null; record = record._next) {\n                record._nextPrevious = record._next;\n            }\n            for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n                record.previousIndex = record.currentIndex;\n            }\n            this._additionsHead = this._additionsTail = null;\n            for (record = this._movesHead; record !== null; record = nextRecord) {\n                record.previousIndex = record.currentIndex;\n                nextRecord = record._nextMoved;\n            }\n            this._movesHead = this._movesTail = null;\n            this._removalsHead = this._removalsTail = null;\n            this._identityChangesHead = this._identityChangesTail = null;\n            // TODO(vicb): when assert gets supported\n            // assert(!this.isDirty);\n        }\n    }\n    /**\n     * This is the core function which handles differences between collections.\n     *\n     * - `record` is the record which we saw at this position last time. If null then it is a new\n     *   item.\n     * - `item` is the current item in the collection\n     * - `index` is the position of the item in the collection\n     *\n     * @internal\n     */\n    _mismatch(record, item, itemTrackBy, index) {\n        // The previous record after which we will append the current one.\n        let previousRecord;\n        if (record === null) {\n            previousRecord = this._itTail;\n        }\n        else {\n            previousRecord = record._prev;\n            // Remove the record from the collection since we know it does not match the item.\n            this._remove(record);\n        }\n        // Attempt to see if we have seen the item before.\n        record = this._linkedRecords === null ? null : this._linkedRecords.get(itemTrackBy, index);\n        if (record !== null) {\n            // We have seen this before, we need to move it forward in the collection.\n            // But first we need to check if identity changed, so we can update in view if necessary\n            if (!Object.is(record.item, item))\n                this._addIdentityChange(record, item);\n            this._moveAfter(record, previousRecord, index);\n        }\n        else {\n            // Never seen it, check evicted list.\n            record = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n            if (record !== null) {\n                // It is an item which we have evicted earlier: reinsert it back into the list.\n                // But first we need to check if identity changed, so we can update in view if necessary\n                if (!Object.is(record.item, item))\n                    this._addIdentityChange(record, item);\n                this._reinsertAfter(record, previousRecord, index);\n            }\n            else {\n                // It is a new item: add it.\n                record =\n                    this._addAfter(new IterableChangeRecord_(item, itemTrackBy), previousRecord, index);\n            }\n        }\n        return record;\n    }\n    /**\n     * This check is only needed if an array contains duplicates. (Short circuit of nothing dirty)\n     *\n     * Use case: `[a, a]` => `[b, a, a]`\n     *\n     * If we did not have this check then the insertion of `b` would:\n     *   1) evict first `a`\n     *   2) insert `b` at `0` index.\n     *   3) leave `a` at index `1` as is. <-- this is wrong!\n     *   3) reinsert `a` at index 2. <-- this is wrong!\n     *\n     * The correct behavior is:\n     *   1) evict first `a`\n     *   2) insert `b` at `0` index.\n     *   3) reinsert `a` at index 1.\n     *   3) move `a` at from `1` to `2`.\n     *\n     *\n     * Double check that we have not evicted a duplicate item. We need to check if the item type may\n     * have already been removed:\n     * The insertion of b will evict the first 'a'. If we don't reinsert it now it will be reinserted\n     * at the end. Which will show up as the two 'a's switching position. This is incorrect, since a\n     * better way to think of it is as insert of 'b' rather then switch 'a' with 'b' and then add 'a'\n     * at the end.\n     *\n     * @internal\n     */\n    _verifyReinsertion(record, item, itemTrackBy, index) {\n        let reinsertRecord = this._unlinkedRecords === null ? null : this._unlinkedRecords.get(itemTrackBy, null);\n        if (reinsertRecord !== null) {\n            record = this._reinsertAfter(reinsertRecord, record._prev, index);\n        }\n        else if (record.currentIndex != index) {\n            record.currentIndex = index;\n            this._addToMoves(record, index);\n        }\n        return record;\n    }\n    /**\n     * Get rid of any excess {@link IterableChangeRecord_}s from the previous collection\n     *\n     * - `record` The first excess {@link IterableChangeRecord_}.\n     *\n     * @internal\n     */\n    _truncate(record) {\n        // Anything after that needs to be removed;\n        while (record !== null) {\n            const nextRecord = record._next;\n            this._addToRemovals(this._unlink(record));\n            record = nextRecord;\n        }\n        if (this._unlinkedRecords !== null) {\n            this._unlinkedRecords.clear();\n        }\n        if (this._additionsTail !== null) {\n            this._additionsTail._nextAdded = null;\n        }\n        if (this._movesTail !== null) {\n            this._movesTail._nextMoved = null;\n        }\n        if (this._itTail !== null) {\n            this._itTail._next = null;\n        }\n        if (this._removalsTail !== null) {\n            this._removalsTail._nextRemoved = null;\n        }\n        if (this._identityChangesTail !== null) {\n            this._identityChangesTail._nextIdentityChange = null;\n        }\n    }\n    /** @internal */\n    _reinsertAfter(record, prevRecord, index) {\n        if (this._unlinkedRecords !== null) {\n            this._unlinkedRecords.remove(record);\n        }\n        const prev = record._prevRemoved;\n        const next = record._nextRemoved;\n        if (prev === null) {\n            this._removalsHead = next;\n        }\n        else {\n            prev._nextRemoved = next;\n        }\n        if (next === null) {\n            this._removalsTail = prev;\n        }\n        else {\n            next._prevRemoved = prev;\n        }\n        this._insertAfter(record, prevRecord, index);\n        this._addToMoves(record, index);\n        return record;\n    }\n    /** @internal */\n    _moveAfter(record, prevRecord, index) {\n        this._unlink(record);\n        this._insertAfter(record, prevRecord, index);\n        this._addToMoves(record, index);\n        return record;\n    }\n    /** @internal */\n    _addAfter(record, prevRecord, index) {\n        this._insertAfter(record, prevRecord, index);\n        if (this._additionsTail === null) {\n            // TODO(vicb):\n            // assert(this._additionsHead === null);\n            this._additionsTail = this._additionsHead = record;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_additionsTail._nextAdded === null);\n            // assert(record._nextAdded === null);\n            this._additionsTail = this._additionsTail._nextAdded = record;\n        }\n        return record;\n    }\n    /** @internal */\n    _insertAfter(record, prevRecord, index) {\n        // TODO(vicb):\n        // assert(record != prevRecord);\n        // assert(record._next === null);\n        // assert(record._prev === null);\n        const next = prevRecord === null ? this._itHead : prevRecord._next;\n        // TODO(vicb):\n        // assert(next != record);\n        // assert(prevRecord != record);\n        record._next = next;\n        record._prev = prevRecord;\n        if (next === null) {\n            this._itTail = record;\n        }\n        else {\n            next._prev = record;\n        }\n        if (prevRecord === null) {\n            this._itHead = record;\n        }\n        else {\n            prevRecord._next = record;\n        }\n        if (this._linkedRecords === null) {\n            this._linkedRecords = new _DuplicateMap();\n        }\n        this._linkedRecords.put(record);\n        record.currentIndex = index;\n        return record;\n    }\n    /** @internal */\n    _remove(record) {\n        return this._addToRemovals(this._unlink(record));\n    }\n    /** @internal */\n    _unlink(record) {\n        if (this._linkedRecords !== null) {\n            this._linkedRecords.remove(record);\n        }\n        const prev = record._prev;\n        const next = record._next;\n        // TODO(vicb):\n        // assert((record._prev = null) === null);\n        // assert((record._next = null) === null);\n        if (prev === null) {\n            this._itHead = next;\n        }\n        else {\n            prev._next = next;\n        }\n        if (next === null) {\n            this._itTail = prev;\n        }\n        else {\n            next._prev = prev;\n        }\n        return record;\n    }\n    /** @internal */\n    _addToMoves(record, toIndex) {\n        // TODO(vicb):\n        // assert(record._nextMoved === null);\n        if (record.previousIndex === toIndex) {\n            return record;\n        }\n        if (this._movesTail === null) {\n            // TODO(vicb):\n            // assert(_movesHead === null);\n            this._movesTail = this._movesHead = record;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_movesTail._nextMoved === null);\n            this._movesTail = this._movesTail._nextMoved = record;\n        }\n        return record;\n    }\n    _addToRemovals(record) {\n        if (this._unlinkedRecords === null) {\n            this._unlinkedRecords = new _DuplicateMap();\n        }\n        this._unlinkedRecords.put(record);\n        record.currentIndex = null;\n        record._nextRemoved = null;\n        if (this._removalsTail === null) {\n            // TODO(vicb):\n            // assert(_removalsHead === null);\n            this._removalsTail = this._removalsHead = record;\n            record._prevRemoved = null;\n        }\n        else {\n            // TODO(vicb):\n            // assert(_removalsTail._nextRemoved === null);\n            // assert(record._nextRemoved === null);\n            record._prevRemoved = this._removalsTail;\n            this._removalsTail = this._removalsTail._nextRemoved = record;\n        }\n        return record;\n    }\n    /** @internal */\n    _addIdentityChange(record, item) {\n        record.item = item;\n        if (this._identityChangesTail === null) {\n            this._identityChangesTail = this._identityChangesHead = record;\n        }\n        else {\n            this._identityChangesTail = this._identityChangesTail._nextIdentityChange = record;\n        }\n        return record;\n    }\n}\nclass IterableChangeRecord_ {\n    constructor(item, trackById) {\n        this.item = item;\n        this.trackById = trackById;\n        this.currentIndex = null;\n        this.previousIndex = null;\n        /** @internal */\n        this._nextPrevious = null;\n        /** @internal */\n        this._prev = null;\n        /** @internal */\n        this._next = null;\n        /** @internal */\n        this._prevDup = null;\n        /** @internal */\n        this._nextDup = null;\n        /** @internal */\n        this._prevRemoved = null;\n        /** @internal */\n        this._nextRemoved = null;\n        /** @internal */\n        this._nextAdded = null;\n        /** @internal */\n        this._nextMoved = null;\n        /** @internal */\n        this._nextIdentityChange = null;\n    }\n}\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nclass _DuplicateItemRecordList {\n    constructor() {\n        /** @internal */\n        this._head = null;\n        /** @internal */\n        this._tail = null;\n    }\n    /**\n     * Append the record to the list of duplicates.\n     *\n     * Note: by design all records in the list of duplicates hold the same value in record.item.\n     */\n    add(record) {\n        if (this._head === null) {\n            this._head = this._tail = record;\n            record._nextDup = null;\n            record._prevDup = null;\n        }\n        else {\n            // TODO(vicb):\n            // assert(record.item ==  _head.item ||\n            //       record.item is num && record.item.isNaN && _head.item is num && _head.item.isNaN);\n            this._tail._nextDup = record;\n            record._prevDup = this._tail;\n            record._nextDup = null;\n            this._tail = record;\n        }\n    }\n    // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n    // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n    get(trackById, atOrAfterIndex) {\n        let record;\n        for (record = this._head; record !== null; record = record._nextDup) {\n            if ((atOrAfterIndex === null || atOrAfterIndex <= record.currentIndex) &&\n                Object.is(record.trackById, trackById)) {\n                return record;\n            }\n        }\n        return null;\n    }\n    /**\n     * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n     *\n     * Returns whether the list of duplicates is empty.\n     */\n    remove(record) {\n        // TODO(vicb):\n        // assert(() {\n        //  // verify that the record being removed is in the list.\n        //  for (IterableChangeRecord_ cursor = _head; cursor != null; cursor = cursor._nextDup) {\n        //    if (identical(cursor, record)) return true;\n        //  }\n        //  return false;\n        //});\n        const prev = record._prevDup;\n        const next = record._nextDup;\n        if (prev === null) {\n            this._head = next;\n        }\n        else {\n            prev._nextDup = next;\n        }\n        if (next === null) {\n            this._tail = prev;\n        }\n        else {\n            next._prevDup = prev;\n        }\n        return this._head === null;\n    }\n}\nclass _DuplicateMap {\n    constructor() {\n        this.map = new Map();\n    }\n    put(record) {\n        const key = record.trackById;\n        let duplicates = this.map.get(key);\n        if (!duplicates) {\n            duplicates = new _DuplicateItemRecordList();\n            this.map.set(key, duplicates);\n        }\n        duplicates.add(record);\n    }\n    /**\n     * Retrieve the `value` using key. Because the IterableChangeRecord_ value may be one which we\n     * have already iterated over, we use the `atOrAfterIndex` to pretend it is not there.\n     *\n     * Use case: `[a, b, c, a, a]` if we are at index `3` which is the second `a` then asking if we\n     * have any more `a`s needs to return the second `a`.\n     */\n    get(trackById, atOrAfterIndex) {\n        const key = trackById;\n        const recordList = this.map.get(key);\n        return recordList ? recordList.get(trackById, atOrAfterIndex) : null;\n    }\n    /**\n     * Removes a {@link IterableChangeRecord_} from the list of duplicates.\n     *\n     * The list of duplicates also is removed from the map if it gets empty.\n     */\n    remove(record) {\n        const key = record.trackById;\n        const recordList = this.map.get(key);\n        // Remove the list of duplicates when it gets empty\n        if (recordList.remove(record)) {\n            this.map.delete(key);\n        }\n        return record;\n    }\n    get isEmpty() {\n        return this.map.size === 0;\n    }\n    clear() {\n        this.map.clear();\n    }\n}\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n    const previousIndex = item.previousIndex;\n    if (previousIndex === null)\n        return previousIndex;\n    let moveOffset = 0;\n    if (moveOffsets && previousIndex < moveOffsets.length) {\n        moveOffset = moveOffsets[previousIndex];\n    }\n    return previousIndex + addRemoveOffset + moveOffset;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass DefaultKeyValueDifferFactory {\n    constructor() { }\n    supports(obj) {\n        return obj instanceof Map || isJsObject(obj);\n    }\n    create() {\n        return new DefaultKeyValueDiffer();\n    }\n}\nclass DefaultKeyValueDiffer {\n    constructor() {\n        this._records = new Map();\n        this._mapHead = null;\n        // _appendAfter is used in the check loop\n        this._appendAfter = null;\n        this._previousMapHead = null;\n        this._changesHead = null;\n        this._changesTail = null;\n        this._additionsHead = null;\n        this._additionsTail = null;\n        this._removalsHead = null;\n        this._removalsTail = null;\n    }\n    get isDirty() {\n        return this._additionsHead !== null || this._changesHead !== null ||\n            this._removalsHead !== null;\n    }\n    forEachItem(fn) {\n        let record;\n        for (record = this._mapHead; record !== null; record = record._next) {\n            fn(record);\n        }\n    }\n    forEachPreviousItem(fn) {\n        let record;\n        for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n            fn(record);\n        }\n    }\n    forEachChangedItem(fn) {\n        let record;\n        for (record = this._changesHead; record !== null; record = record._nextChanged) {\n            fn(record);\n        }\n    }\n    forEachAddedItem(fn) {\n        let record;\n        for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n            fn(record);\n        }\n    }\n    forEachRemovedItem(fn) {\n        let record;\n        for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n            fn(record);\n        }\n    }\n    diff(map) {\n        if (!map) {\n            map = new Map();\n        }\n        else if (!(map instanceof Map || isJsObject(map))) {\n            throw new Error(`Error trying to diff '${stringify(map)}'. Only maps and objects are allowed`);\n        }\n        return this.check(map) ? this : null;\n    }\n    onDestroy() { }\n    /**\n     * Check the current state of the map vs the previous.\n     * The algorithm is optimised for when the keys do no change.\n     */\n    check(map) {\n        this._reset();\n        let insertBefore = this._mapHead;\n        this._appendAfter = null;\n        this._forEach(map, (value, key) => {\n            if (insertBefore && insertBefore.key === key) {\n                this._maybeAddToChanges(insertBefore, value);\n                this._appendAfter = insertBefore;\n                insertBefore = insertBefore._next;\n            }\n            else {\n                const record = this._getOrCreateRecordForKey(key, value);\n                insertBefore = this._insertBeforeOrAppend(insertBefore, record);\n            }\n        });\n        // Items remaining at the end of the list have been deleted\n        if (insertBefore) {\n            if (insertBefore._prev) {\n                insertBefore._prev._next = null;\n            }\n            this._removalsHead = insertBefore;\n            for (let record = insertBefore; record !== null; record = record._nextRemoved) {\n                if (record === this._mapHead) {\n                    this._mapHead = null;\n                }\n                this._records.delete(record.key);\n                record._nextRemoved = record._next;\n                record.previousValue = record.currentValue;\n                record.currentValue = null;\n                record._prev = null;\n                record._next = null;\n            }\n        }\n        // Make sure tails have no next records from previous runs\n        if (this._changesTail)\n            this._changesTail._nextChanged = null;\n        if (this._additionsTail)\n            this._additionsTail._nextAdded = null;\n        return this.isDirty;\n    }\n    /**\n     * Inserts a record before `before` or append at the end of the list when `before` is null.\n     *\n     * Notes:\n     * - This method appends at `this._appendAfter`,\n     * - This method updates `this._appendAfter`,\n     * - The return value is the new value for the insertion pointer.\n     */\n    _insertBeforeOrAppend(before, record) {\n        if (before) {\n            const prev = before._prev;\n            record._next = before;\n            record._prev = prev;\n            before._prev = record;\n            if (prev) {\n                prev._next = record;\n            }\n            if (before === this._mapHead) {\n                this._mapHead = record;\n            }\n            this._appendAfter = before;\n            return before;\n        }\n        if (this._appendAfter) {\n            this._appendAfter._next = record;\n            record._prev = this._appendAfter;\n        }\n        else {\n            this._mapHead = record;\n        }\n        this._appendAfter = record;\n        return null;\n    }\n    _getOrCreateRecordForKey(key, value) {\n        if (this._records.has(key)) {\n            const record = this._records.get(key);\n            this._maybeAddToChanges(record, value);\n            const prev = record._prev;\n            const next = record._next;\n            if (prev) {\n                prev._next = next;\n            }\n            if (next) {\n                next._prev = prev;\n            }\n            record._next = null;\n            record._prev = null;\n            return record;\n        }\n        const record = new KeyValueChangeRecord_(key);\n        this._records.set(key, record);\n        record.currentValue = value;\n        this._addToAdditions(record);\n        return record;\n    }\n    /** @internal */\n    _reset() {\n        if (this.isDirty) {\n            let record;\n            // let `_previousMapHead` contain the state of the map before the changes\n            this._previousMapHead = this._mapHead;\n            for (record = this._previousMapHead; record !== null; record = record._next) {\n                record._nextPrevious = record._next;\n            }\n            // Update `record.previousValue` with the value of the item before the changes\n            // We need to update all changed items (that's those which have been added and changed)\n            for (record = this._changesHead; record !== null; record = record._nextChanged) {\n                record.previousValue = record.currentValue;\n            }\n            for (record = this._additionsHead; record != null; record = record._nextAdded) {\n                record.previousValue = record.currentValue;\n            }\n            this._changesHead = this._changesTail = null;\n            this._additionsHead = this._additionsTail = null;\n            this._removalsHead = null;\n        }\n    }\n    // Add the record or a given key to the list of changes only when the value has actually changed\n    _maybeAddToChanges(record, newValue) {\n        if (!Object.is(newValue, record.currentValue)) {\n            record.previousValue = record.currentValue;\n            record.currentValue = newValue;\n            this._addToChanges(record);\n        }\n    }\n    _addToAdditions(record) {\n        if (this._additionsHead === null) {\n            this._additionsHead = this._additionsTail = record;\n        }\n        else {\n            this._additionsTail._nextAdded = record;\n            this._additionsTail = record;\n        }\n    }\n    _addToChanges(record) {\n        if (this._changesHead === null) {\n            this._changesHead = this._changesTail = record;\n        }\n        else {\n            this._changesTail._nextChanged = record;\n            this._changesTail = record;\n        }\n    }\n    /** @internal */\n    _forEach(obj, fn) {\n        if (obj instanceof Map) {\n            obj.forEach(fn);\n        }\n        else {\n            Object.keys(obj).forEach(k => fn(obj[k], k));\n        }\n    }\n}\nclass KeyValueChangeRecord_ {\n    constructor(key) {\n        this.key = key;\n        this.previousValue = null;\n        this.currentValue = null;\n        /** @internal */\n        this._nextPrevious = null;\n        /** @internal */\n        this._next = null;\n        /** @internal */\n        this._prev = null;\n        /** @internal */\n        this._nextAdded = null;\n        /** @internal */\n        this._nextRemoved = null;\n        /** @internal */\n        this._nextChanged = null;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different iterable diffing strategies used by NgFor, NgClass, and others.\n *\n * @publicApi\n */\nclass IterableDiffers {\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent != null) {\n            const copied = parent.factories.slice();\n            factories = factories.concat(copied);\n        }\n        return new IterableDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link IterableDifferFactory} and returns a provider used to extend the\n     * inherited {@link IterableDiffers} instance with the provided factories and return a new\n     * {@link IterableDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link IterableDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     IterableDiffers.extend([new ImmutableListDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n        return {\n            provide: IterableDiffers,\n            useFactory: (parent) => {\n                if (!parent) {\n                    // Typically would occur when calling IterableDiffers.extend inside of dependencies passed\n                    // to\n                    // bootstrap(), which would override default pipes instead of extending them.\n                    throw new Error('Cannot extend IterableDiffers without a parent injector');\n                }\n                return IterableDiffers.create(factories, parent);\n            },\n            // Dependency technically isn't optional, but we can provide a better error message this way.\n            deps: [[IterableDiffers, new SkipSelf(), new Optional()]]\n        };\n    }\n    find(iterable) {\n        const factory = this.factories.find(f => f.supports(iterable));\n        if (factory != null) {\n            return factory;\n        }\n        else {\n            throw new Error(`Cannot find a differ supporting object '${iterable}' of type '${getTypeNameForDebugging(iterable)}'`);\n        }\n    }\n}\n/** @nocollapse */\nIterableDiffers.ɵprov = ɵɵdefineInjectable({\n    token: IterableDiffers,\n    providedIn: 'root',\n    factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])\n});\nfunction getTypeNameForDebugging(type) {\n    return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A repository of different Map diffing strategies used by NgClass, NgStyle, and others.\n *\n * @publicApi\n */\nclass KeyValueDiffers {\n    constructor(factories) {\n        this.factories = factories;\n    }\n    static create(factories, parent) {\n        if (parent) {\n            const copied = parent.factories.slice();\n            factories = factories.concat(copied);\n        }\n        return new KeyValueDiffers(factories);\n    }\n    /**\n     * Takes an array of {@link KeyValueDifferFactory} and returns a provider used to extend the\n     * inherited {@link KeyValueDiffers} instance with the provided factories and return a new\n     * {@link KeyValueDiffers} instance.\n     *\n     * @usageNotes\n     * ### Example\n     *\n     * The following example shows how to extend an existing list of factories,\n     * which will only be applied to the injector for this component and its children.\n     * This step is all that's required to make a new {@link KeyValueDiffer} available.\n     *\n     * ```\n     * @Component({\n     *   viewProviders: [\n     *     KeyValueDiffers.extend([new ImmutableMapDiffer()])\n     *   ]\n     * })\n     * ```\n     */\n    static extend(factories) {\n        return {\n            provide: KeyValueDiffers,\n            useFactory: (parent) => {\n                if (!parent) {\n                    // Typically would occur when calling KeyValueDiffers.extend inside of dependencies passed\n                    // to bootstrap(), which would override default pipes instead of extending them.\n                    throw new Error('Cannot extend KeyValueDiffers without a parent injector');\n                }\n                return KeyValueDiffers.create(factories, parent);\n            },\n            // Dependency technically isn't optional, but we can provide a better error message this way.\n            deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]\n        };\n    }\n    find(kv) {\n        const factory = this.factories.find(f => f.supports(kv));\n        if (factory) {\n            return factory;\n        }\n        throw new Error(`Cannot find a differ supporting object '${kv}'`);\n    }\n}\n/** @nocollapse */\nKeyValueDiffers.ɵprov = ɵɵdefineInjectable({\n    token: KeyValueDiffers,\n    providedIn: 'root',\n    factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])\n});\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Structural diffing for `Object`s and `Map`s.\n */\nconst keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nconst iterableDiff = [new DefaultIterableDifferFactory()];\nconst defaultIterableDiffers = new IterableDiffers(iterableDiff);\nconst defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an embedded template that can be used to instantiate embedded views.\n * To instantiate embedded views based on a template, use the `ViewContainerRef`\n * method `createEmbeddedView()`.\n *\n * Access a `TemplateRef` instance by placing a directive on an `<ng-template>`\n * element (or directive prefixed with `*`). The `TemplateRef` for the embedded view\n * is injected into the constructor of the directive,\n * using the `TemplateRef` token.\n *\n * You can also use a `Query` to find a `TemplateRef` associated with\n * a component or a directive.\n *\n * @see `ViewContainerRef`\n * @see [Navigate the Component Tree with DI](guide/dependency-injection-navtree)\n *\n * @publicApi\n */\nclass TemplateRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nTemplateRef.__NG_ELEMENT_ID__ = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef);\nconst SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = injectTemplateRef;\nconst SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_TEMPLATE_REF_FACTORY = SWITCH_TEMPLATE_REF_FACTORY__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents a container where one or more views can be attached to a component.\n *\n * Can contain *host views* (created by instantiating a\n * component with the `createComponent()` method), and *embedded views*\n * (created by instantiating a `TemplateRef` with the `createEmbeddedView()` method).\n *\n * A view container instance can contain other view containers,\n * creating a [view hierarchy](guide/glossary#view-tree).\n *\n * @see `ComponentRef`\n * @see `EmbeddedViewRef`\n *\n * @publicApi\n */\nclass ViewContainerRef {\n}\n/**\n * @internal\n * @nocollapse\n */\nViewContainerRef.__NG_ELEMENT_ID__ = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef);\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ = injectViewContainerRef;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__ = noop;\nconst SWITCH_VIEW_CONTAINER_REF_FACTORY = SWITCH_VIEW_CONTAINER_REF_FACTORY__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction expressionChangedAfterItHasBeenCheckedError(context, oldValue, currValue, isFirstCheck) {\n    let msg = `ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '${oldValue}'. Current value: '${currValue}'.`;\n    if (isFirstCheck) {\n        msg +=\n            ` It seems like the view has been created after its parent and its children have been dirty checked.` +\n                ` Has it been created in a change detection hook ?`;\n    }\n    return viewDebugError(msg, context);\n}\nfunction viewWrappedDebugError(err, context) {\n    if (!(err instanceof Error)) {\n        // errors that are not Error instances don't have a stack,\n        // so it is ok to wrap them into a new Error object...\n        err = new Error(err.toString());\n    }\n    _addDebugContext(err, context);\n    return err;\n}\nfunction viewDebugError(msg, context) {\n    const err = new Error(msg);\n    _addDebugContext(err, context);\n    return err;\n}\nfunction _addDebugContext(err, context) {\n    err[ERROR_DEBUG_CONTEXT] = context;\n    err[ERROR_LOGGER] = context.logError.bind(context);\n}\nfunction isViewDebugError(err) {\n    return !!getDebugContext(err);\n}\nfunction viewDestroyedError(action) {\n    return new Error(`ViewDestroyedError: Attempt to use a destroyed view: ${action}`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Called before each cycle of a view's check to detect whether this is in the\n// initState for which we need to call ngOnInit, ngAfterContentInit or ngAfterViewInit\n// lifecycle methods. Returns true if this check cycle should call lifecycle\n// methods.\nfunction shiftInitState(view, priorInitState, newInitState) {\n    // Only update the InitState if we are currently in the prior state.\n    // For example, only move into CallingInit if we are in BeforeInit. Only\n    // move into CallingContentInit if we are in CallingInit. Normally this will\n    // always be true because of how checkCycle is called in checkAndUpdateView.\n    // However, if checkAndUpdateView is called recursively or if an exception is\n    // thrown while checkAndUpdateView is running, checkAndUpdateView starts over\n    // from the beginning. This ensures the state is monotonically increasing,\n    // terminating in the AfterInit state, which ensures the Init methods are called\n    // at least once and only once.\n    const state = view.state;\n    const initState = state & 1792 /* InitState_Mask */;\n    if (initState === priorInitState) {\n        view.state = (state & ~1792 /* InitState_Mask */) | newInitState;\n        view.initIndex = -1;\n        return true;\n    }\n    return initState === newInitState;\n}\n// Returns true if the lifecycle init method should be called for the node with\n// the given init index.\nfunction shouldCallLifecycleInitHook(view, initState, index) {\n    if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n        view.initIndex = index + 1;\n        return true;\n    }\n    return false;\n}\n/**\n * Node instance data.\n *\n * We have a separate type per NodeType to save memory\n * (TextData | ElementData | ProviderData | PureExpressionData | QueryList<any>)\n *\n * To keep our code monomorphic,\n * we prohibit using `NodeData` directly but enforce the use of accessors (`asElementData`, ...).\n * This way, no usage site can get a `NodeData` from view.nodes and then use it for different\n * purposes.\n */\nclass NodeData {\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asTextData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asElementData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asProviderData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asPureExpressionData(view, index) {\n    return view.nodes[index];\n}\n/**\n * Accessor for view.nodes, enforcing that every usage site stays monomorphic.\n */\nfunction asQueryList(view, index) {\n    return view.nodes[index];\n}\nclass DebugContext {\n}\n/**\n * This object is used to prevent cycles in the source files and to have a place where\n * debug mode can hook it. It is lazily filled when `isDevMode` is known.\n */\nconst Services = {\n    setCurrentNode: undefined,\n    createRootView: undefined,\n    createEmbeddedView: undefined,\n    createComponentView: undefined,\n    createNgModuleRef: undefined,\n    overrideProvider: undefined,\n    overrideComponentView: undefined,\n    clearOverrides: undefined,\n    checkAndUpdateView: undefined,\n    checkNoChangesView: undefined,\n    destroyView: undefined,\n    resolveDep: undefined,\n    createDebugContext: undefined,\n    handleEvent: undefined,\n    updateDirectives: undefined,\n    updateRenderer: undefined,\n    dirtyParentQueries: undefined,\n};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst NOOP = () => { };\nconst _tokenKeyCache = new Map();\nfunction tokenKey(token) {\n    let key = _tokenKeyCache.get(token);\n    if (!key) {\n        key = stringify(token) + '_' + _tokenKeyCache.size;\n        _tokenKeyCache.set(token, key);\n    }\n    return key;\n}\nfunction unwrapValue(view, nodeIdx, bindingIdx, value) {\n    if (WrappedValue.isWrapped(value)) {\n        value = WrappedValue.unwrap(value);\n        const globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n        const oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n        view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n    }\n    return value;\n}\nconst UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nconst EMPTY_RENDERER_TYPE_ID = '$$empty';\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createRendererType2(values) {\n    return {\n        id: UNDEFINED_RENDERER_TYPE_ID,\n        styles: values.styles,\n        encapsulation: values.encapsulation,\n        data: values.data\n    };\n}\nlet _renderCompCount$1 = 0;\nfunction resolveRendererType2(type) {\n    if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n        // first time we see this RendererType2. Initialize it...\n        const isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation$1.None) ||\n            type.styles.length || Object.keys(type.data).length);\n        if (isFilled) {\n            type.id = `c${_renderCompCount$1++}`;\n        }\n        else {\n            type.id = EMPTY_RENDERER_TYPE_ID;\n        }\n    }\n    if (type && type.id === EMPTY_RENDERER_TYPE_ID) {\n        type = null;\n    }\n    return type || null;\n}\nfunction checkBinding(view, def, bindingIdx, value) {\n    const oldValues = view.oldValues;\n    if ((view.state & 2 /* FirstCheck */) ||\n        !Object.is(oldValues[def.bindingIndex + bindingIdx], value)) {\n        return true;\n    }\n    return false;\n}\nfunction checkAndUpdateBinding(view, def, bindingIdx, value) {\n    if (checkBinding(view, def, bindingIdx, value)) {\n        view.oldValues[def.bindingIndex + bindingIdx] = value;\n        return true;\n    }\n    return false;\n}\nfunction checkBindingNoChanges(view, def, bindingIdx, value) {\n    const oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n    if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n        const bindingName = def.bindings[bindingIdx].name;\n        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, def.nodeIndex), `${bindingName}: ${oldValue}`, `${bindingName}: ${value}`, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n    }\n}\nfunction markParentViewsForCheck(view) {\n    let currView = view;\n    while (currView) {\n        if (currView.def.flags & 2 /* OnPush */) {\n            currView.state |= 8 /* ChecksEnabled */;\n        }\n        currView = currView.viewContainerParent || currView.parent;\n    }\n}\nfunction markParentViewsForCheckProjectedViews(view, endView) {\n    let currView = view;\n    while (currView && currView !== endView) {\n        currView.state |= 64 /* CheckProjectedViews */;\n        currView = currView.viewContainerParent || currView.parent;\n    }\n}\nfunction dispatchEvent(view, nodeIndex, eventName, event) {\n    try {\n        const nodeDef = view.def.nodes[nodeIndex];\n        const startView = nodeDef.flags & 33554432 /* ComponentView */ ?\n            asElementData(view, nodeIndex).componentView :\n            view;\n        markParentViewsForCheck(startView);\n        return Services.handleEvent(view, nodeIndex, eventName, event);\n    }\n    catch (e) {\n        // Attention: Don't rethrow, as it would cancel Observable subscriptions!\n        view.root.errorHandler.handleError(e);\n    }\n}\nfunction declaredViewContainer(view) {\n    if (view.parent) {\n        const parentView = view.parent;\n        return asElementData(parentView, view.parentNodeDef.nodeIndex);\n    }\n    return null;\n}\n/**\n * for component views, this is the host element.\n * for embedded views, this is the index of the parent node\n * that contains the view container.\n */\nfunction viewParentEl(view) {\n    const parentView = view.parent;\n    if (parentView) {\n        return view.parentNodeDef.parent;\n    }\n    else {\n        return null;\n    }\n}\nfunction renderNode(view, def) {\n    switch (def.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return asElementData(view, def.nodeIndex).renderElement;\n        case 2 /* TypeText */:\n            return asTextData(view, def.nodeIndex).renderText;\n    }\n}\nfunction elementEventFullName(target, name) {\n    return target ? `${target}:${name}` : name;\n}\nfunction isComponentView(view) {\n    return !!view.parent && !!(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction isEmbeddedView(view) {\n    return !!view.parent && !(view.parentNodeDef.flags & 32768 /* Component */);\n}\nfunction filterQueryId(queryId) {\n    return 1 << (queryId % 32);\n}\nfunction splitMatchedQueriesDsl(matchedQueriesDsl) {\n    const matchedQueries = {};\n    let matchedQueryIds = 0;\n    const references = {};\n    if (matchedQueriesDsl) {\n        matchedQueriesDsl.forEach(([queryId, valueType]) => {\n            if (typeof queryId === 'number') {\n                matchedQueries[queryId] = valueType;\n                matchedQueryIds |= filterQueryId(queryId);\n            }\n            else {\n                references[queryId] = valueType;\n            }\n        });\n    }\n    return { matchedQueries, references, matchedQueryIds };\n}\nfunction splitDepsDsl(deps, sourceName) {\n    return deps.map(value => {\n        let token;\n        let flags;\n        if (Array.isArray(value)) {\n            [flags, token] = value;\n        }\n        else {\n            flags = 0 /* None */;\n            token = value;\n        }\n        if (token && (typeof token === 'function' || typeof token === 'object') && sourceName) {\n            Object.defineProperty(token, SOURCE, { value: sourceName, configurable: true });\n        }\n        return { flags, token, tokenKey: tokenKey(token) };\n    });\n}\nfunction getParentRenderElement(view, renderHost, def) {\n    let renderParent = def.renderParent;\n    if (renderParent) {\n        if ((renderParent.flags & 1 /* TypeElement */) === 0 ||\n            (renderParent.flags & 33554432 /* ComponentView */) === 0 ||\n            (renderParent.element.componentRendererType &&\n                renderParent.element.componentRendererType.encapsulation === ViewEncapsulation$1.Native)) {\n            // only children of non components, or children of components with native encapsulation should\n            // be attached.\n            return asElementData(view, def.renderParent.nodeIndex).renderElement;\n        }\n    }\n    else {\n        return renderHost;\n    }\n}\nconst DEFINITION_CACHE = new WeakMap();\nfunction resolveDefinition(factory) {\n    let value = DEFINITION_CACHE.get(factory);\n    if (!value) {\n        value = factory(() => NOOP);\n        value.factory = factory;\n        DEFINITION_CACHE.set(factory, value);\n    }\n    return value;\n}\nfunction rootRenderNodes(view) {\n    const renderNodes = [];\n    visitRootRenderNodes(view, 0 /* Collect */, undefined, undefined, renderNodes);\n    return renderNodes;\n}\nfunction visitRootRenderNodes(view, action, parentNode, nextSibling, target) {\n    // We need to re-compute the parent node in case the nodes have been moved around manually\n    if (action === 3 /* RemoveChild */) {\n        parentNode = view.renderer.parentNode(renderNode(view, view.def.lastRenderRootNode));\n    }\n    visitSiblingRenderNodes(view, action, 0, view.def.nodes.length - 1, parentNode, nextSibling, target);\n}\nfunction visitSiblingRenderNodes(view, action, startIndex, endIndex, parentNode, nextSibling, target) {\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & (1 /* TypeElement */ | 2 /* TypeText */ | 8 /* TypeNgContent */)) {\n            visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target);\n        }\n        // jump to next sibling\n        i += nodeDef.childCount;\n    }\n}\nfunction visitProjectedRenderNodes(view, ngContentIndex, action, parentNode, nextSibling, target) {\n    let compView = view;\n    while (compView && !isComponentView(compView)) {\n        compView = compView.parent;\n    }\n    const hostView = compView.parent;\n    const hostElDef = viewParentEl(compView);\n    const startIndex = hostElDef.nodeIndex + 1;\n    const endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = hostView.def.nodes[i];\n        if (nodeDef.ngContentIndex === ngContentIndex) {\n            visitRenderNode(hostView, nodeDef, action, parentNode, nextSibling, target);\n        }\n        // jump to next sibling\n        i += nodeDef.childCount;\n    }\n    if (!hostView.parent) {\n        // a root view\n        const projectedNodes = view.root.projectableNodes[ngContentIndex];\n        if (projectedNodes) {\n            for (let i = 0; i < projectedNodes.length; i++) {\n                execRenderNodeAction(view, projectedNodes[i], action, parentNode, nextSibling, target);\n            }\n        }\n    }\n}\nfunction visitRenderNode(view, nodeDef, action, parentNode, nextSibling, target) {\n    if (nodeDef.flags & 8 /* TypeNgContent */) {\n        visitProjectedRenderNodes(view, nodeDef.ngContent.index, action, parentNode, nextSibling, target);\n    }\n    else {\n        const rn = renderNode(view, nodeDef);\n        if (action === 3 /* RemoveChild */ && (nodeDef.flags & 33554432 /* ComponentView */) &&\n            (nodeDef.bindingFlags & 48 /* CatSyntheticProperty */)) {\n            // Note: we might need to do both actions.\n            if (nodeDef.bindingFlags & (16 /* SyntheticProperty */)) {\n                execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n            }\n            if (nodeDef.bindingFlags & (32 /* SyntheticHostProperty */)) {\n                const compView = asElementData(view, nodeDef.nodeIndex).componentView;\n                execRenderNodeAction(compView, rn, action, parentNode, nextSibling, target);\n            }\n        }\n        else {\n            execRenderNodeAction(view, rn, action, parentNode, nextSibling, target);\n        }\n        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n            const embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n            for (let k = 0; k < embeddedViews.length; k++) {\n                visitRootRenderNodes(embeddedViews[k], action, parentNode, nextSibling, target);\n            }\n        }\n        if (nodeDef.flags & 1 /* TypeElement */ && !nodeDef.element.name) {\n            visitSiblingRenderNodes(view, action, nodeDef.nodeIndex + 1, nodeDef.nodeIndex + nodeDef.childCount, parentNode, nextSibling, target);\n        }\n    }\n}\nfunction execRenderNodeAction(view, renderNode, action, parentNode, nextSibling, target) {\n    const renderer = view.renderer;\n    switch (action) {\n        case 1 /* AppendChild */:\n            renderer.appendChild(parentNode, renderNode);\n            break;\n        case 2 /* InsertBefore */:\n            renderer.insertBefore(parentNode, renderNode, nextSibling);\n            break;\n        case 3 /* RemoveChild */:\n            renderer.removeChild(parentNode, renderNode);\n            break;\n        case 0 /* Collect */:\n            target.push(renderNode);\n            break;\n    }\n}\nconst NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction splitNamespace(name) {\n    if (name[0] === ':') {\n        const match = name.match(NS_PREFIX_RE);\n        return [match[1], match[2]];\n    }\n    return ['', name];\n}\nfunction calcBindingFlags(bindings) {\n    let flags = 0;\n    for (let i = 0; i < bindings.length; i++) {\n        flags |= bindings[i].flags;\n    }\n    return flags;\n}\nfunction interpolate(valueCount, constAndInterp) {\n    let result = '';\n    for (let i = 0; i < valueCount * 2; i = i + 2) {\n        result = result + constAndInterp[i] + _toStringWithNull(constAndInterp[i + 1]);\n    }\n    return result + constAndInterp[valueCount * 2];\n}\nfunction inlineInterpolate(valueCount, c0, a1, c1, a2, c2, a3, c3, a4, c4, a5, c5, a6, c6, a7, c7, a8, c8, a9, c9) {\n    switch (valueCount) {\n        case 1:\n            return c0 + _toStringWithNull(a1) + c1;\n        case 2:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2;\n        case 3:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3;\n        case 4:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4;\n        case 5:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5;\n        case 6:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) + c6;\n        case 7:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7;\n        case 8:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8;\n        case 9:\n            return c0 + _toStringWithNull(a1) + c1 + _toStringWithNull(a2) + c2 + _toStringWithNull(a3) +\n                c3 + _toStringWithNull(a4) + c4 + _toStringWithNull(a5) + c5 + _toStringWithNull(a6) +\n                c6 + _toStringWithNull(a7) + c7 + _toStringWithNull(a8) + c8 + _toStringWithNull(a9) + c9;\n        default:\n            throw new Error(`Does not support more than 9 expressions`);\n    }\n}\nfunction _toStringWithNull(v) {\n    return v != null ? v.toString() : '';\n}\nconst EMPTY_ARRAY$4 = [];\nconst EMPTY_MAP = {};\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst UNDEFINED_VALUE = {};\nconst InjectorRefTokenKey = tokenKey(Injector);\nconst INJECTORRefTokenKey = tokenKey(INJECTOR);\nconst NgModuleRefTokenKey = tokenKey(NgModuleRef);\nfunction moduleProvideDef(flags, token, value, deps) {\n    // Need to resolve forwardRefs as e.g. for `useValue` we\n    // lowered the expression and then stopped evaluating it,\n    // i.e. also didn't unwrap it.\n    value = resolveForwardRef(value);\n    const depDefs = splitDepsDsl(deps, stringify(token));\n    return {\n        // will bet set by the module definition\n        index: -1,\n        deps: depDefs,\n        flags,\n        token,\n        value\n    };\n}\nfunction moduleDef(providers) {\n    const providersByKey = {};\n    const modules = [];\n    let scope = null;\n    for (let i = 0; i < providers.length; i++) {\n        const provider = providers[i];\n        if (provider.token === INJECTOR_SCOPE) {\n            scope = provider.value;\n        }\n        if (provider.flags & 1073741824 /* TypeNgModule */) {\n            modules.push(provider.token);\n        }\n        provider.index = i;\n        providersByKey[tokenKey(provider.token)] = provider;\n    }\n    return {\n        // Will be filled later...\n        factory: null,\n        providersByKey,\n        providers,\n        modules,\n        scope: scope,\n    };\n}\nfunction initNgModule(data) {\n    const def = data._def;\n    const providers = data._providers = newArray(def.providers.length);\n    for (let i = 0; i < def.providers.length; i++) {\n        const provDef = def.providers[i];\n        if (!(provDef.flags & 4096 /* LazyProvider */)) {\n            // Make sure the provider has not been already initialized outside this loop.\n            if (providers[i] === undefined) {\n                providers[i] = _createProviderInstance(data, provDef);\n            }\n        }\n    }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n    const former = setCurrentInjector(data);\n    try {\n        if (depDef.flags & 8 /* Value */) {\n            return depDef.token;\n        }\n        if (depDef.flags & 2 /* Optional */) {\n            notFoundValue = null;\n        }\n        if (depDef.flags & 1 /* SkipSelf */) {\n            return data._parent.get(depDef.token, notFoundValue);\n        }\n        const tokenKey = depDef.tokenKey;\n        switch (tokenKey) {\n            case InjectorRefTokenKey:\n            case INJECTORRefTokenKey:\n            case NgModuleRefTokenKey:\n                return data;\n        }\n        const providerDef = data._def.providersByKey[tokenKey];\n        let injectableDef;\n        if (providerDef) {\n            let providerInstance = data._providers[providerDef.index];\n            if (providerInstance === undefined) {\n                providerInstance = data._providers[providerDef.index] =\n                    _createProviderInstance(data, providerDef);\n            }\n            return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n        }\n        else if ((injectableDef = getInjectableDef(depDef.token)) && targetsModule(data, injectableDef)) {\n            const index = data._providers.length;\n            data._def.providers[index] = data._def.providersByKey[depDef.tokenKey] = {\n                flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n                value: injectableDef.factory,\n                deps: [],\n                index,\n                token: depDef.token,\n            };\n            data._providers[index] = UNDEFINED_VALUE;\n            return (data._providers[index] =\n                _createProviderInstance(data, data._def.providersByKey[depDef.tokenKey]));\n        }\n        else if (depDef.flags & 4 /* Self */) {\n            return notFoundValue;\n        }\n        return data._parent.get(depDef.token, notFoundValue);\n    }\n    finally {\n        setCurrentInjector(former);\n    }\n}\nfunction moduleTransitivelyPresent(ngModule, scope) {\n    return ngModule._def.modules.indexOf(scope) > -1;\n}\nfunction targetsModule(ngModule, def) {\n    const providedIn = def.providedIn;\n    return providedIn != null &&\n        (providedIn === 'any' || providedIn === ngModule._def.scope ||\n            moduleTransitivelyPresent(ngModule, providedIn));\n}\nfunction _createProviderInstance(ngModule, providerDef) {\n    let injectable;\n    switch (providerDef.flags & 201347067 /* Types */) {\n        case 512 /* TypeClassProvider */:\n            injectable = _createClass(ngModule, providerDef.value, providerDef.deps);\n            break;\n        case 1024 /* TypeFactoryProvider */:\n            injectable = _callFactory(ngModule, providerDef.value, providerDef.deps);\n            break;\n        case 2048 /* TypeUseExistingProvider */:\n            injectable = resolveNgModuleDep(ngModule, providerDef.deps[0]);\n            break;\n        case 256 /* TypeValueProvider */:\n            injectable = providerDef.value;\n            break;\n    }\n    // The read of `ngOnDestroy` here is slightly expensive as it's megamorphic, so it should be\n    // avoided if possible. The sequence of checks here determines whether ngOnDestroy needs to be\n    // checked. It might not if the `injectable` isn't an object or if NodeFlags.OnDestroy is already\n    // set (ngOnDestroy was detected statically).\n    if (injectable !== UNDEFINED_VALUE && injectable !== null && typeof injectable === 'object' &&\n        !(providerDef.flags & 131072 /* OnDestroy */) && typeof injectable.ngOnDestroy === 'function') {\n        providerDef.flags |= 131072 /* OnDestroy */;\n    }\n    return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return new ctor();\n        case 1:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]));\n        case 2:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n        case 3:\n            return new ctor(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n            }\n            return new ctor(...depValues);\n    }\n}\nfunction _callFactory(ngModule, factory, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return factory();\n        case 1:\n            return factory(resolveNgModuleDep(ngModule, deps[0]));\n        case 2:\n            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]));\n        case 3:\n            return factory(resolveNgModuleDep(ngModule, deps[0]), resolveNgModuleDep(ngModule, deps[1]), resolveNgModuleDep(ngModule, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n            }\n            return factory(...depValues);\n    }\n}\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n    const def = ngModule._def;\n    const destroyed = new Set();\n    for (let i = 0; i < def.providers.length; i++) {\n        const provDef = def.providers[i];\n        if (provDef.flags & 131072 /* OnDestroy */) {\n            const instance = ngModule._providers[i];\n            if (instance && instance !== UNDEFINED_VALUE) {\n                const onDestroy = instance.ngOnDestroy;\n                if (typeof onDestroy === 'function' && !destroyed.has(instance)) {\n                    onDestroy.apply(instance);\n                    destroyed.add(instance);\n                }\n            }\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction attachEmbeddedView(parentView, elementData, viewIndex, view) {\n    let embeddedViews = elementData.viewContainer._embeddedViews;\n    if (viewIndex === null || viewIndex === undefined) {\n        viewIndex = embeddedViews.length;\n    }\n    view.viewContainerParent = parentView;\n    addToArray(embeddedViews, viewIndex, view);\n    attachProjectedView(elementData, view);\n    Services.dirtyParentQueries(view);\n    const prevView = viewIndex > 0 ? embeddedViews[viewIndex - 1] : null;\n    renderAttachEmbeddedView(elementData, prevView, view);\n}\nfunction attachProjectedView(vcElementData, view) {\n    const dvcElementData = declaredViewContainer(view);\n    if (!dvcElementData || dvcElementData === vcElementData ||\n        view.state & 16 /* IsProjectedView */) {\n        return;\n    }\n    // Note: For performance reasons, we\n    // - add a view to template._projectedViews only 1x throughout its lifetime,\n    //   and remove it not until the view is destroyed.\n    //   (hard, as when a parent view is attached/detached we would need to attach/detach all\n    //    nested projected views as well, even across component boundaries).\n    // - don't track the insertion order of views in the projected views array\n    //   (hard, as when the views of the same template are inserted different view containers)\n    view.state |= 16 /* IsProjectedView */;\n    let projectedViews = dvcElementData.template._projectedViews;\n    if (!projectedViews) {\n        projectedViews = dvcElementData.template._projectedViews = [];\n    }\n    projectedViews.push(view);\n    // Note: we are changing the NodeDef here as we cannot calculate\n    // the fact whether a template is used for projection during compilation.\n    markNodeAsProjectedTemplate(view.parent.def, view.parentNodeDef);\n}\nfunction markNodeAsProjectedTemplate(viewDef, nodeDef) {\n    if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n        return;\n    }\n    viewDef.nodeFlags |= 4 /* ProjectedTemplate */;\n    nodeDef.flags |= 4 /* ProjectedTemplate */;\n    let parentNodeDef = nodeDef.parent;\n    while (parentNodeDef) {\n        parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n        parentNodeDef = parentNodeDef.parent;\n    }\n}\nfunction detachEmbeddedView(elementData, viewIndex) {\n    const embeddedViews = elementData.viewContainer._embeddedViews;\n    if (viewIndex == null || viewIndex >= embeddedViews.length) {\n        viewIndex = embeddedViews.length - 1;\n    }\n    if (viewIndex < 0) {\n        return null;\n    }\n    const view = embeddedViews[viewIndex];\n    view.viewContainerParent = null;\n    removeFromArray(embeddedViews, viewIndex);\n    // See attachProjectedView for why we don't update projectedViews here.\n    Services.dirtyParentQueries(view);\n    renderDetachView$1(view);\n    return view;\n}\nfunction detachProjectedView(view) {\n    if (!(view.state & 16 /* IsProjectedView */)) {\n        return;\n    }\n    const dvcElementData = declaredViewContainer(view);\n    if (dvcElementData) {\n        const projectedViews = dvcElementData.template._projectedViews;\n        if (projectedViews) {\n            removeFromArray(projectedViews, projectedViews.indexOf(view));\n            Services.dirtyParentQueries(view);\n        }\n    }\n}\nfunction moveEmbeddedView(elementData, oldViewIndex, newViewIndex) {\n    const embeddedViews = elementData.viewContainer._embeddedViews;\n    const view = embeddedViews[oldViewIndex];\n    removeFromArray(embeddedViews, oldViewIndex);\n    if (newViewIndex == null) {\n        newViewIndex = embeddedViews.length;\n    }\n    addToArray(embeddedViews, newViewIndex, view);\n    // Note: Don't need to change projectedViews as the order in there\n    // as always invalid...\n    Services.dirtyParentQueries(view);\n    renderDetachView$1(view);\n    const prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n    renderAttachEmbeddedView(elementData, prevView, view);\n    return view;\n}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n    const prevRenderNode = prevView ? renderNode(prevView, prevView.def.lastRenderRootNode) : elementData.renderElement;\n    const parentNode = view.renderer.parentNode(prevRenderNode);\n    const nextSibling = view.renderer.nextSibling(prevRenderNode);\n    // Note: We can't check if `nextSibling` is present, as on WebWorkers it will always be!\n    // However, browsers automatically do `appendChild` when there is no `nextSibling`.\n    visitRootRenderNodes(view, 2 /* InsertBefore */, parentNode, nextSibling, undefined);\n}\nfunction renderDetachView$1(view) {\n    visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EMPTY_CONTEXT = {};\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createComponentFactory(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors) {\n    return new ComponentFactory_(selector, componentType, viewDefFactory, inputs, outputs, ngContentSelectors);\n}\nfunction getComponentViewDefinitionFactory(componentFactory) {\n    return componentFactory.viewDefFactory;\n}\nclass ComponentFactory_ extends ComponentFactory {\n    constructor(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n        // Attention: this ctor is called as top level function.\n        // Putting any logic in here will destroy closure tree shaking!\n        super();\n        this.selector = selector;\n        this.componentType = componentType;\n        this._inputs = _inputs;\n        this._outputs = _outputs;\n        this.ngContentSelectors = ngContentSelectors;\n        this.viewDefFactory = viewDefFactory;\n    }\n    get inputs() {\n        const inputsArr = [];\n        const inputs = this._inputs;\n        for (let propName in inputs) {\n            const templateName = inputs[propName];\n            inputsArr.push({ propName, templateName });\n        }\n        return inputsArr;\n    }\n    get outputs() {\n        const outputsArr = [];\n        for (let propName in this._outputs) {\n            const templateName = this._outputs[propName];\n            outputsArr.push({ propName, templateName });\n        }\n        return outputsArr;\n    }\n    /**\n     * Creates a new component.\n     */\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        if (!ngModule) {\n            throw new Error('ngModule should be provided');\n        }\n        const viewDef = resolveDefinition(this.viewDefFactory);\n        const componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n        const view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n        const component = asProviderData(view, componentNodeIndex).instance;\n        if (rootSelectorOrNode) {\n            view.renderer.setAttribute(asElementData(view, 0).renderElement, 'ng-version', VERSION.full);\n        }\n        return new ComponentRef_(view, new ViewRef_(view), component);\n    }\n}\nclass ComponentRef_ extends ComponentRef {\n    constructor(_view, _viewRef, _component) {\n        super();\n        this._view = _view;\n        this._viewRef = _viewRef;\n        this._component = _component;\n        this._elDef = this._view.def.nodes[0];\n        this.hostView = _viewRef;\n        this.changeDetectorRef = _viewRef;\n        this.instance = _component;\n    }\n    get location() {\n        return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n    }\n    get injector() {\n        return new Injector_(this._view, this._elDef);\n    }\n    get componentType() {\n        return this._component.constructor;\n    }\n    destroy() {\n        this._viewRef.destroy();\n    }\n    onDestroy(callback) {\n        this._viewRef.onDestroy(callback);\n    }\n}\nfunction createViewContainerData(view, elDef, elData) {\n    return new ViewContainerRef_(view, elDef, elData);\n}\nclass ViewContainerRef_ {\n    constructor(_view, _elDef, _data) {\n        this._view = _view;\n        this._elDef = _elDef;\n        this._data = _data;\n        /**\n         * @internal\n         */\n        this._embeddedViews = [];\n    }\n    get element() {\n        return new ElementRef(this._data.renderElement);\n    }\n    get injector() {\n        return new Injector_(this._view, this._elDef);\n    }\n    /** @deprecated No replacement */\n    get parentInjector() {\n        let view = this._view;\n        let elDef = this._elDef.parent;\n        while (!elDef && view) {\n            elDef = viewParentEl(view);\n            view = view.parent;\n        }\n        return view ? new Injector_(view, elDef) : new Injector_(this._view, null);\n    }\n    clear() {\n        const len = this._embeddedViews.length;\n        for (let i = len - 1; i >= 0; i--) {\n            const view = detachEmbeddedView(this._data, i);\n            Services.destroyView(view);\n        }\n    }\n    get(index) {\n        const view = this._embeddedViews[index];\n        if (view) {\n            const ref = new ViewRef_(view);\n            ref.attachToViewContainerRef(this);\n            return ref;\n        }\n        return null;\n    }\n    get length() {\n        return this._embeddedViews.length;\n    }\n    createEmbeddedView(templateRef, context, index) {\n        const viewRef = templateRef.createEmbeddedView(context || {});\n        this.insert(viewRef, index);\n        return viewRef;\n    }\n    createComponent(componentFactory, index, injector, projectableNodes, ngModuleRef) {\n        const contextInjector = injector || this.parentInjector;\n        if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n            ngModuleRef = contextInjector.get(NgModuleRef);\n        }\n        const componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n        this.insert(componentRef.hostView, index);\n        return componentRef;\n    }\n    insert(viewRef, index) {\n        if (viewRef.destroyed) {\n            throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n        }\n        const viewRef_ = viewRef;\n        const viewData = viewRef_._view;\n        attachEmbeddedView(this._view, this._data, index, viewData);\n        viewRef_.attachToViewContainerRef(this);\n        return viewRef;\n    }\n    move(viewRef, currentIndex) {\n        if (viewRef.destroyed) {\n            throw new Error('Cannot move a destroyed View in a ViewContainer!');\n        }\n        const previousIndex = this._embeddedViews.indexOf(viewRef._view);\n        moveEmbeddedView(this._data, previousIndex, currentIndex);\n        return viewRef;\n    }\n    indexOf(viewRef) {\n        return this._embeddedViews.indexOf(viewRef._view);\n    }\n    remove(index) {\n        const viewData = detachEmbeddedView(this._data, index);\n        if (viewData) {\n            Services.destroyView(viewData);\n        }\n    }\n    detach(index) {\n        const view = detachEmbeddedView(this._data, index);\n        return view ? new ViewRef_(view) : null;\n    }\n}\nfunction createChangeDetectorRef(view) {\n    return new ViewRef_(view);\n}\nclass ViewRef_ {\n    constructor(_view) {\n        this._view = _view;\n        this._viewContainerRef = null;\n        this._appRef = null;\n    }\n    get rootNodes() {\n        return rootRenderNodes(this._view);\n    }\n    get context() {\n        return this._view.context;\n    }\n    get destroyed() {\n        return (this._view.state & 128 /* Destroyed */) !== 0;\n    }\n    markForCheck() {\n        markParentViewsForCheck(this._view);\n    }\n    detach() {\n        this._view.state &= ~4 /* Attached */;\n    }\n    detectChanges() {\n        const fs = this._view.root.rendererFactory;\n        if (fs.begin) {\n            fs.begin();\n        }\n        try {\n            Services.checkAndUpdateView(this._view);\n        }\n        finally {\n            if (fs.end) {\n                fs.end();\n            }\n        }\n    }\n    checkNoChanges() {\n        Services.checkNoChangesView(this._view);\n    }\n    reattach() {\n        this._view.state |= 4 /* Attached */;\n    }\n    onDestroy(callback) {\n        if (!this._view.disposables) {\n            this._view.disposables = [];\n        }\n        this._view.disposables.push(callback);\n    }\n    destroy() {\n        if (this._appRef) {\n            this._appRef.detachView(this);\n        }\n        else if (this._viewContainerRef) {\n            this._viewContainerRef.detach(this._viewContainerRef.indexOf(this));\n        }\n        Services.destroyView(this._view);\n    }\n    detachFromAppRef() {\n        this._appRef = null;\n        renderDetachView$1(this._view);\n        Services.dirtyParentQueries(this._view);\n    }\n    attachToAppRef(appRef) {\n        if (this._viewContainerRef) {\n            throw new Error('This view is already attached to a ViewContainer!');\n        }\n        this._appRef = appRef;\n    }\n    attachToViewContainerRef(vcRef) {\n        if (this._appRef) {\n            throw new Error('This view is already attached directly to the ApplicationRef!');\n        }\n        this._viewContainerRef = vcRef;\n    }\n}\nfunction createTemplateData(view, def) {\n    return new TemplateRef_(view, def);\n}\nclass TemplateRef_ extends TemplateRef {\n    constructor(_parentView, _def) {\n        super();\n        this._parentView = _parentView;\n        this._def = _def;\n    }\n    createEmbeddedView(context) {\n        return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, this._def.element.template, context));\n    }\n    get elementRef() {\n        return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n    }\n}\nfunction createInjector$1(view, elDef) {\n    return new Injector_(view, elDef);\n}\nclass Injector_ {\n    constructor(view, elDef) {\n        this.view = view;\n        this.elDef = elDef;\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n        const allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n        return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token, tokenKey: tokenKey(token) }, notFoundValue);\n    }\n}\nfunction nodeValue(view, index) {\n    const def = view.def.nodes[index];\n    if (def.flags & 1 /* TypeElement */) {\n        const elData = asElementData(view, def.nodeIndex);\n        return def.element.template ? elData.template : elData.renderElement;\n    }\n    else if (def.flags & 2 /* TypeText */) {\n        return asTextData(view, def.nodeIndex).renderText;\n    }\n    else if (def.flags & (20224 /* CatProvider */ | 16 /* TypePipe */)) {\n        return asProviderData(view, def.nodeIndex).instance;\n    }\n    throw new Error(`Illegal state: read nodeValue for node index ${index}`);\n}\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n    return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nclass NgModuleRef_ {\n    constructor(_moduleType, _parent, _bootstrapComponents, _def) {\n        this._moduleType = _moduleType;\n        this._parent = _parent;\n        this._bootstrapComponents = _bootstrapComponents;\n        this._def = _def;\n        this._destroyListeners = [];\n        this._destroyed = false;\n        this.injector = this;\n        initNgModule(this);\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {\n        let flags = 0 /* None */;\n        if (injectFlags & InjectFlags.SkipSelf) {\n            flags |= 1 /* SkipSelf */;\n        }\n        else if (injectFlags & InjectFlags.Self) {\n            flags |= 4 /* Self */;\n        }\n        return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n    }\n    get instance() {\n        return this.get(this._moduleType);\n    }\n    get componentFactoryResolver() {\n        return this.get(ComponentFactoryResolver);\n    }\n    destroy() {\n        if (this._destroyed) {\n            throw new Error(`The ng module ${stringify(this.instance.constructor)} has already been destroyed.`);\n        }\n        this._destroyed = true;\n        callNgModuleLifecycle(this, 131072 /* OnDestroy */);\n        this._destroyListeners.forEach((listener) => listener());\n    }\n    onDestroy(callback) {\n        this._destroyListeners.push(callback);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst Renderer2TokenKey = tokenKey(Renderer2);\nconst ElementRefTokenKey = tokenKey(ElementRef);\nconst ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nconst TemplateRefTokenKey = tokenKey(TemplateRef);\nconst ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nconst InjectorRefTokenKey$1 = tokenKey(Injector);\nconst INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n    const bindings = [];\n    if (props) {\n        for (let prop in props) {\n            const [bindingIndex, nonMinifiedName] = props[prop];\n            bindings[bindingIndex] = {\n                flags: 8 /* TypeProperty */,\n                name: prop,\n                nonMinifiedName,\n                ns: null,\n                securityContext: null,\n                suffix: null\n            };\n        }\n    }\n    const outputDefs = [];\n    if (outputs) {\n        for (let propName in outputs) {\n            outputDefs.push({ type: 1 /* DirectiveOutput */, propName, target: null, eventName: outputs[propName] });\n        }\n    }\n    flags |= 16384 /* TypeDirective */;\n    return _def(checkIndex, flags, matchedQueries, childCount, ctor, ctor, deps, bindings, outputDefs);\n}\nfunction pipeDef(flags, ctor, deps) {\n    flags |= 16 /* TypePipe */;\n    return _def(-1, flags, null, 0, ctor, ctor, deps);\n}\nfunction providerDef(flags, matchedQueries, token, value, deps) {\n    return _def(-1, flags, matchedQueries, 0, token, value, deps);\n}\nfunction _def(checkIndex, flags, matchedQueriesDsl, childCount, token, value, deps, bindings, outputs) {\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    if (!outputs) {\n        outputs = [];\n    }\n    if (!bindings) {\n        bindings = [];\n    }\n    // Need to resolve forwardRefs as e.g. for `useValue` we\n    // lowered the expression and then stopped evaluating it,\n    // i.e. also didn't unwrap it.\n    value = resolveForwardRef(value);\n    const depDefs = splitDepsDsl(deps, stringify(token));\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex: -1,\n        childCount,\n        bindings,\n        bindingFlags: calcBindingFlags(bindings),\n        outputs,\n        element: null,\n        provider: { token, value, deps: depDefs },\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createProviderInstance(view, def) {\n    return _createProviderInstance$1(view, def);\n}\nfunction createPipeInstance(view, def) {\n    // deps are looked up from component.\n    let compView = view;\n    while (compView.parent && !isComponentView(compView)) {\n        compView = compView.parent;\n    }\n    // pipes can see the private services of the component\n    const allowPrivateServices = true;\n    // pipes are always eager and classes!\n    return createClass(compView.parent, viewParentEl(compView), allowPrivateServices, def.provider.value, def.provider.deps);\n}\nfunction createDirectiveInstance(view, def) {\n    // components can see other private services, other directives can't.\n    const allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n    // directives are always eager and classes!\n    const instance = createClass(view, def.parent, allowPrivateServices, def.provider.value, def.provider.deps);\n    if (def.outputs.length) {\n        for (let i = 0; i < def.outputs.length; i++) {\n            const output = def.outputs[i];\n            const outputObservable = instance[output.propName];\n            if (isObservable(outputObservable)) {\n                const subscription = outputObservable.subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n                view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n            }\n            else {\n                throw new Error(`@Output ${output.propName} not initialized in '${instance.constructor.name}'.`);\n            }\n        }\n    }\n    return instance;\n}\nfunction eventHandlerClosure(view, index, eventName) {\n    return (event) => dispatchEvent(view, index, eventName, event);\n}\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const providerData = asProviderData(view, def.nodeIndex);\n    const directive = providerData.instance;\n    let changed = false;\n    let changes = undefined;\n    const bindLen = def.bindings.length;\n    if (bindLen > 0 && checkBinding(view, def, 0, v0)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 0, v0, changes);\n    }\n    if (bindLen > 1 && checkBinding(view, def, 1, v1)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 1, v1, changes);\n    }\n    if (bindLen > 2 && checkBinding(view, def, 2, v2)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 2, v2, changes);\n    }\n    if (bindLen > 3 && checkBinding(view, def, 3, v3)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 3, v3, changes);\n    }\n    if (bindLen > 4 && checkBinding(view, def, 4, v4)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 4, v4, changes);\n    }\n    if (bindLen > 5 && checkBinding(view, def, 5, v5)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 5, v5, changes);\n    }\n    if (bindLen > 6 && checkBinding(view, def, 6, v6)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 6, v6, changes);\n    }\n    if (bindLen > 7 && checkBinding(view, def, 7, v7)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 7, v7, changes);\n    }\n    if (bindLen > 8 && checkBinding(view, def, 8, v8)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 8, v8, changes);\n    }\n    if (bindLen > 9 && checkBinding(view, def, 9, v9)) {\n        changed = true;\n        changes = updateProp(view, providerData, def, 9, v9, changes);\n    }\n    if (changes) {\n        directive.ngOnChanges(changes);\n    }\n    if ((def.flags & 65536 /* OnInit */) &&\n        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n        directive.ngOnInit();\n    }\n    if (def.flags & 262144 /* DoCheck */) {\n        directive.ngDoCheck();\n    }\n    return changed;\n}\nfunction checkAndUpdateDirectiveDynamic(view, def, values) {\n    const providerData = asProviderData(view, def.nodeIndex);\n    const directive = providerData.instance;\n    let changed = false;\n    let changes = undefined;\n    for (let i = 0; i < values.length; i++) {\n        if (checkBinding(view, def, i, values[i])) {\n            changed = true;\n            changes = updateProp(view, providerData, def, i, values[i], changes);\n        }\n    }\n    if (changes) {\n        directive.ngOnChanges(changes);\n    }\n    if ((def.flags & 65536 /* OnInit */) &&\n        shouldCallLifecycleInitHook(view, 256 /* InitState_CallingOnInit */, def.nodeIndex)) {\n        directive.ngOnInit();\n    }\n    if (def.flags & 262144 /* DoCheck */) {\n        directive.ngDoCheck();\n    }\n    return changed;\n}\nfunction _createProviderInstance$1(view, def) {\n    // private services can see other private services\n    const allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n    const providerDef = def.provider;\n    switch (def.flags & 201347067 /* Types */) {\n        case 512 /* TypeClassProvider */:\n            return createClass(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n        case 1024 /* TypeFactoryProvider */:\n            return callFactory(view, def.parent, allowPrivateServices, providerDef.value, providerDef.deps);\n        case 2048 /* TypeUseExistingProvider */:\n            return resolveDep(view, def.parent, allowPrivateServices, providerDef.deps[0]);\n        case 256 /* TypeValueProvider */:\n            return providerDef.value;\n    }\n}\nfunction createClass(view, elDef, allowPrivateServices, ctor, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return new ctor();\n        case 1:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n        case 2:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n        case 3:\n            return new ctor(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n            }\n            return new ctor(...depValues);\n    }\n}\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n    const len = deps.length;\n    switch (len) {\n        case 0:\n            return factory();\n        case 1:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]));\n        case 2:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]));\n        case 3:\n            return factory(resolveDep(view, elDef, allowPrivateServices, deps[0]), resolveDep(view, elDef, allowPrivateServices, deps[1]), resolveDep(view, elDef, allowPrivateServices, deps[2]));\n        default:\n            const depValues = [];\n            for (let i = 0; i < len; i++) {\n                depValues.push(resolveDep(view, elDef, allowPrivateServices, deps[i]));\n            }\n            return factory(...depValues);\n    }\n}\n// This default value is when checking the hierarchy for a token.\n//\n// It means both:\n// - the token is not provided by the current injector,\n// - only the element injectors should be checked (ie do not check module injectors\n//\n//          mod1\n//         /\n//       el1   mod2\n//         \\  /\n//         el2\n//\n// When requesting el2.injector.get(token), we should check in the following order and return the\n// first found value:\n// - el2.injector.get(token, default)\n// - el1.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) -> do not check the module\n// - mod2.injector.get(token, default)\nconst NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue = Injector.THROW_IF_NOT_FOUND) {\n    if (depDef.flags & 8 /* Value */) {\n        return depDef.token;\n    }\n    const startView = view;\n    if (depDef.flags & 2 /* Optional */) {\n        notFoundValue = null;\n    }\n    const tokenKey = depDef.tokenKey;\n    if (tokenKey === ChangeDetectorRefTokenKey) {\n        // directives on the same element as a component should be able to control the change detector\n        // of that component as well.\n        allowPrivateServices = !!(elDef && elDef.element.componentView);\n    }\n    if (elDef && (depDef.flags & 1 /* SkipSelf */)) {\n        allowPrivateServices = false;\n        elDef = elDef.parent;\n    }\n    let searchView = view;\n    while (searchView) {\n        if (elDef) {\n            switch (tokenKey) {\n                case Renderer2TokenKey: {\n                    const compView = findCompView(searchView, elDef, allowPrivateServices);\n                    return compView.renderer;\n                }\n                case ElementRefTokenKey:\n                    return new ElementRef(asElementData(searchView, elDef.nodeIndex).renderElement);\n                case ViewContainerRefTokenKey:\n                    return asElementData(searchView, elDef.nodeIndex).viewContainer;\n                case TemplateRefTokenKey: {\n                    if (elDef.element.template) {\n                        return asElementData(searchView, elDef.nodeIndex).template;\n                    }\n                    break;\n                }\n                case ChangeDetectorRefTokenKey: {\n                    let cdView = findCompView(searchView, elDef, allowPrivateServices);\n                    return createChangeDetectorRef(cdView);\n                }\n                case InjectorRefTokenKey$1:\n                case INJECTORRefTokenKey$1:\n                    return createInjector$1(searchView, elDef);\n                default:\n                    const providerDef = (allowPrivateServices ? elDef.element.allProviders :\n                        elDef.element.publicProviders)[tokenKey];\n                    if (providerDef) {\n                        let providerData = asProviderData(searchView, providerDef.nodeIndex);\n                        if (!providerData) {\n                            providerData = { instance: _createProviderInstance$1(searchView, providerDef) };\n                            searchView.nodes[providerDef.nodeIndex] = providerData;\n                        }\n                        return providerData.instance;\n                    }\n            }\n        }\n        allowPrivateServices = isComponentView(searchView);\n        elDef = viewParentEl(searchView);\n        searchView = searchView.parent;\n        if (depDef.flags & 4 /* Self */) {\n            searchView = null;\n        }\n    }\n    const value = startView.root.injector.get(depDef.token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR);\n    if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n        notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n        // Return the value from the root element injector when\n        // - it provides it\n        //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        // - the module injector should not be checked\n        //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n        return value;\n    }\n    return startView.root.ngModule.injector.get(depDef.token, notFoundValue);\n}\nfunction findCompView(view, elDef, allowPrivateServices) {\n    let compView;\n    if (allowPrivateServices) {\n        compView = asElementData(view, elDef.nodeIndex).componentView;\n    }\n    else {\n        compView = view;\n        while (compView.parent && !isComponentView(compView)) {\n            compView = compView.parent;\n        }\n    }\n    return compView;\n}\nfunction updateProp(view, providerData, def, bindingIdx, value, changes) {\n    if (def.flags & 32768 /* Component */) {\n        const compView = asElementData(view, def.parent.nodeIndex).componentView;\n        if (compView.def.flags & 2 /* OnPush */) {\n            compView.state |= 8 /* ChecksEnabled */;\n        }\n    }\n    const binding = def.bindings[bindingIdx];\n    const propName = binding.name;\n    // Note: This is still safe with Closure Compiler as\n    // the user passed in the property name as an object has to `providerDef`,\n    // so Closure Compiler will have renamed the property correctly already.\n    providerData.instance[propName] = value;\n    if (def.flags & 524288 /* OnChanges */) {\n        changes = changes || {};\n        const oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n        const binding = def.bindings[bindingIdx];\n        changes[binding.nonMinifiedName] =\n            new SimpleChange(oldValue, value, (view.state & 2 /* FirstCheck */) !== 0);\n    }\n    view.oldValues[def.bindingIndex + bindingIdx] = value;\n    return changes;\n}\n// This function calls the ngAfterContentCheck, ngAfterContentInit,\n// ngAfterViewCheck, and ngAfterViewInit lifecycle hooks (depending on the node\n// flags in lifecycle). Unlike ngDoCheck, ngOnChanges and ngOnInit, which are\n// called during a pre-order traversal of the view tree (that is calling the\n// parent hooks before the child hooks) these events are sent in using a\n// post-order traversal of the tree (children before parents). This changes the\n// meaning of initIndex in the view state. For ngOnInit, initIndex tracks the\n// expected nodeIndex which a ngOnInit should be called. When sending\n// ngAfterContentInit and ngAfterViewInit it is the expected count of\n// ngAfterContentInit or ngAfterViewInit methods that have been called. This\n// ensure that despite being called recursively or after picking up after an\n// exception, the ngAfterContentInit or ngAfterViewInit will be called on the\n// correct nodes. Consider for example, the following (where E is an element\n// and D is a directive)\n//  Tree:       pre-order index  post-order index\n//    E1        0                6\n//      E2      1                1\n//       D3     2                0\n//      E4      3                5\n//       E5     4                4\n//        E6    5                2\n//        E7    6                3\n// As can be seen, the post-order index has an unclear relationship to the\n// pre-order index (postOrderIndex === preOrderIndex - parentCount +\n// childCount). Since number of calls to ngAfterContentInit and ngAfterViewInit\n// are stable (will be the same for the same view regardless of exceptions or\n// recursion) we just need to count them which will roughly correspond to the\n// post-order index (it skips elements and directives that do not have\n// lifecycle hooks).\n//\n// For example, if an exception is raised in the E6.onAfterViewInit() the\n// initIndex is left at 3 (by shouldCallLifecycleInitHook() which set it to\n// initIndex + 1). When checkAndUpdateView() is called again D3, E2 and E6 will\n// not have their ngAfterViewInit() called but, starting with E7, the rest of\n// the view will begin getting ngAfterViewInit() called until a check and\n// pass is complete.\n//\n// This algorthim also handles recursion. Consider if E4's ngAfterViewInit()\n// indirectly calls E1's ChangeDetectorRef.detectChanges(). The expected\n// initIndex is set to 6, the recusive checkAndUpdateView() starts walk again.\n// D3, E2, E6, E7, E5 and E4 are skipped, ngAfterViewInit() is called on E1.\n// When the recursion returns the initIndex will be 7 so E1 is skipped as it\n// has already been called in the recursively called checkAnUpdateView().\nfunction callLifecycleHooksChildrenFirst(view, lifecycles) {\n    if (!(view.def.nodeFlags & lifecycles)) {\n        return;\n    }\n    const nodes = view.def.nodes;\n    let initIndex = 0;\n    for (let i = 0; i < nodes.length; i++) {\n        const nodeDef = nodes[i];\n        let parent = nodeDef.parent;\n        if (!parent && nodeDef.flags & lifecycles) {\n            // matching root node (e.g. a pipe)\n            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n        }\n        if ((nodeDef.childFlags & lifecycles) === 0) {\n            // no child matches one of the lifecycles\n            i += nodeDef.childCount;\n        }\n        while (parent && (parent.flags & 1 /* TypeElement */) &&\n            i === parent.nodeIndex + parent.childCount) {\n            // last child of an element\n            if (parent.directChildFlags & lifecycles) {\n                initIndex = callElementProvidersLifecycles(view, parent, lifecycles, initIndex);\n            }\n            parent = parent.parent;\n        }\n    }\n}\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n    for (let i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & lifecycles) {\n            callProviderLifecycles(view, i, nodeDef.flags & lifecycles, initIndex++);\n        }\n        // only visit direct children\n        i += nodeDef.childCount;\n    }\n    return initIndex;\n}\nfunction callProviderLifecycles(view, index, lifecycles, initIndex) {\n    const providerData = asProviderData(view, index);\n    if (!providerData) {\n        return;\n    }\n    const provider = providerData.instance;\n    if (!provider) {\n        return;\n    }\n    Services.setCurrentNode(view, index);\n    if (lifecycles & 1048576 /* AfterContentInit */ &&\n        shouldCallLifecycleInitHook(view, 512 /* InitState_CallingAfterContentInit */, initIndex)) {\n        provider.ngAfterContentInit();\n    }\n    if (lifecycles & 2097152 /* AfterContentChecked */) {\n        provider.ngAfterContentChecked();\n    }\n    if (lifecycles & 4194304 /* AfterViewInit */ &&\n        shouldCallLifecycleInitHook(view, 768 /* InitState_CallingAfterViewInit */, initIndex)) {\n        provider.ngAfterViewInit();\n    }\n    if (lifecycles & 8388608 /* AfterViewChecked */) {\n        provider.ngAfterViewChecked();\n    }\n    if (lifecycles & 131072 /* OnDestroy */) {\n        provider.ngOnDestroy();\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass ComponentFactoryResolver$1 extends ComponentFactoryResolver {\n    /**\n     * @param ngModule The NgModuleRef to which all resolved factories are bound.\n     */\n    constructor(ngModule) {\n        super();\n        this.ngModule = ngModule;\n    }\n    resolveComponentFactory(component) {\n        ngDevMode && assertComponentType(component);\n        const componentDef = getComponentDef(component);\n        return new ComponentFactory$1(componentDef, this.ngModule);\n    }\n}\nfunction toRefArray(map) {\n    const array = [];\n    for (let nonMinified in map) {\n        if (map.hasOwnProperty(nonMinified)) {\n            const minified = map[nonMinified];\n            array.push({ propName: minified, templateName: nonMinified });\n        }\n    }\n    return array;\n}\nfunction getNamespace$1(elementName) {\n    const name = elementName.toLowerCase();\n    return name === 'svg' ? SVG_NAMESPACE : (name === 'math' ? MATH_ML_NAMESPACE : null);\n}\n/**\n * A change detection scheduler token for {@link RootContext}. This token is the default value used\n * for the default `RootContext` found in the {@link ROOT_CONTEXT} token.\n */\nconst SCHEDULER = new InjectionToken('SCHEDULER_TOKEN', {\n    providedIn: 'root',\n    factory: () => defaultScheduler,\n});\nfunction createChainedInjector(rootViewInjector, moduleInjector) {\n    return {\n        get: (token, notFoundValue, flags) => {\n            const value = rootViewInjector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, flags);\n            if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR ||\n                notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {\n                // Return the value from the root element injector when\n                // - it provides it\n                //   (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n                // - the module injector should not be checked\n                //   (notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR)\n                return value;\n            }\n            return moduleInjector.get(token, notFoundValue, flags);\n        }\n    };\n}\n/**\n * Render3 implementation of {@link viewEngine_ComponentFactory}.\n */\nclass ComponentFactory$1 extends ComponentFactory {\n    /**\n     * @param componentDef The component definition.\n     * @param ngModule The NgModuleRef to which the factory is bound.\n     */\n    constructor(componentDef, ngModule) {\n        super();\n        this.componentDef = componentDef;\n        this.ngModule = ngModule;\n        this.componentType = componentDef.type;\n        this.selector = stringifyCSSSelectorList(componentDef.selectors);\n        this.ngContentSelectors =\n            componentDef.ngContentSelectors ? componentDef.ngContentSelectors : [];\n        this.isBoundToModule = !!ngModule;\n    }\n    get inputs() {\n        return toRefArray(this.componentDef.inputs);\n    }\n    get outputs() {\n        return toRefArray(this.componentDef.outputs);\n    }\n    create(injector, projectableNodes, rootSelectorOrNode, ngModule) {\n        ngModule = ngModule || this.ngModule;\n        const rootViewInjector = ngModule ? createChainedInjector(injector, ngModule.injector) : injector;\n        const rendererFactory = rootViewInjector.get(RendererFactory2, domRendererFactory3);\n        const sanitizer = rootViewInjector.get(Sanitizer, null);\n        const hostRenderer = rendererFactory.createRenderer(null, this.componentDef);\n        // Determine a tag name used for creating host elements when this component is created\n        // dynamically. Default to 'div' if this component did not specify any tag name in its selector.\n        const elementName = this.componentDef.selectors[0][0] || 'div';\n        const hostRNode = rootSelectorOrNode ?\n            locateHostElement(hostRenderer, rootSelectorOrNode, this.componentDef.encapsulation) :\n            elementCreate(elementName, rendererFactory.createRenderer(null, this.componentDef), getNamespace$1(elementName));\n        const rootFlags = this.componentDef.onPush ? 64 /* Dirty */ | 512 /* IsRoot */ :\n            16 /* CheckAlways */ | 512 /* IsRoot */;\n        const rootContext = createRootContext();\n        // Create the root view. Uses empty TView and ContentTemplate.\n        const rootTView = createTView(0 /* Root */, -1, null, 1, 0, null, null, null, null, null);\n        const rootLView = createLView(null, rootTView, rootContext, rootFlags, null, null, rendererFactory, hostRenderer, sanitizer, rootViewInjector);\n        // rootView is the parent when bootstrapping\n        // TODO(misko): it looks like we are entering view here but we don't really need to as\n        // `renderView` does that. However as the code is written it is needed because\n        // `createRootComponentView` and `createRootComponent` both read global state. Fixing those\n        // issues would allow us to drop this.\n        enterView(rootLView, null);\n        let component;\n        let tElementNode;\n        try {\n            const componentView = createRootComponentView(hostRNode, this.componentDef, rootLView, rendererFactory, hostRenderer);\n            if (hostRNode) {\n                if (rootSelectorOrNode) {\n                    setUpAttributes(hostRenderer, hostRNode, ['ng-version', VERSION.full]);\n                }\n                else {\n                    // If host element is created as a part of this function call (i.e. `rootSelectorOrNode`\n                    // is not defined), also apply attributes and classes extracted from component selector.\n                    // Extract attributes and classes from the first selector only to match VE behavior.\n                    const { attrs, classes } = extractAttrsAndClassesFromSelector(this.componentDef.selectors[0]);\n                    if (attrs) {\n                        setUpAttributes(hostRenderer, hostRNode, attrs);\n                    }\n                    if (classes && classes.length > 0) {\n                        writeDirectClass(hostRenderer, hostRNode, classes.join(' '));\n                    }\n                }\n            }\n            tElementNode = getTNode(rootTView, 0);\n            if (projectableNodes !== undefined) {\n                const projection = tElementNode.projection = [];\n                for (let i = 0; i < this.ngContentSelectors.length; i++) {\n                    const nodesforSlot = projectableNodes[i];\n                    // Projectable nodes can be passed as array of arrays or an array of iterables (ngUpgrade\n                    // case). Here we do normalize passed data structure to be an array of arrays to avoid\n                    // complex checks down the line.\n                    // We also normalize the length of the passed in projectable nodes (to match the number of\n                    // <ng-container> slots defined by a component).\n                    projection.push(nodesforSlot != null ? Array.from(nodesforSlot) : null);\n                }\n            }\n            // TODO: should LifecycleHooksFeature and other host features be generated by the compiler and\n            // executed here?\n            // Angular 5 reference: https://stackblitz.com/edit/lifecycle-hooks-vcref\n            component = createRootComponent(componentView, this.componentDef, rootLView, rootContext, [LifecycleHooksFeature]);\n            renderView(rootTView, rootLView, null);\n        }\n        finally {\n            leaveView();\n        }\n        const componentRef = new ComponentRef$1(this.componentType, component, createElementRef(ElementRef, tElementNode, rootLView), rootLView, tElementNode);\n        // The host element of the internal root view is attached to the component's host view node.\n        ngDevMode && assertNodeOfPossibleTypes(rootTView.node, [2 /* View */]);\n        rootTView.node.child = tElementNode;\n        return componentRef;\n    }\n}\nconst componentFactoryResolver = new ComponentFactoryResolver$1();\n/**\n * Creates a ComponentFactoryResolver and stores it on the injector. Or, if the\n * ComponentFactoryResolver\n * already exists, retrieves the existing ComponentFactoryResolver.\n *\n * @returns The ComponentFactoryResolver instance to use\n */\nfunction injectComponentFactoryResolver() {\n    return componentFactoryResolver;\n}\n/**\n * Represents an instance of a Component created via a {@link ComponentFactory}.\n *\n * `ComponentRef` provides access to the Component Instance as well other objects related to this\n * Component Instance and allows you to destroy the Component Instance via the {@link #destroy}\n * method.\n *\n */\nclass ComponentRef$1 extends ComponentRef {\n    constructor(componentType, instance, location, _rootLView, _tNode) {\n        super();\n        this.location = location;\n        this._rootLView = _rootLView;\n        this._tNode = _tNode;\n        this.destroyCbs = [];\n        this.instance = instance;\n        this.hostView = this.changeDetectorRef = new RootViewRef(_rootLView);\n        assignTViewNodeToLView(_rootLView[TVIEW], null, -1, _rootLView);\n        this.componentType = componentType;\n    }\n    get injector() {\n        return new NodeInjector(this._tNode, this._rootLView);\n    }\n    destroy() {\n        if (this.destroyCbs) {\n            this.destroyCbs.forEach(fn => fn());\n            this.destroyCbs = null;\n            !this.hostView.destroyed && this.hostView.destroy();\n        }\n    }\n    onDestroy(callback) {\n        if (this.destroyCbs) {\n            this.destroyCbs.push(callback);\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\nconst u = undefined;\nfunction plural(n) {\n    let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\\.?/, '').length;\n    if (i === 1 && v === 0)\n        return 1;\n    return 5;\n}\nvar localeEn = [\n    'en',\n    [['a', 'p'], ['AM', 'PM'], u],\n    [['AM', 'PM'], u, u],\n    [\n        ['S', 'M', 'T', 'W', 'T', 'F', 'S'], ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n        ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n        ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']\n    ],\n    u,\n    [\n        ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n        ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n        [\n            'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',\n            'October', 'November', 'December'\n        ]\n    ],\n    u,\n    [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']],\n    0,\n    [6, 0],\n    ['M/d/yy', 'MMM d, y', 'MMMM d, y', 'EEEE, MMMM d, y'],\n    ['h:mm a', 'h:mm:ss a', 'h:mm:ss a z', 'h:mm:ss a zzzz'],\n    ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n    ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n    ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'],\n    'USD',\n    '$',\n    'US Dollar',\n    {},\n    'ltr',\n    plural\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * This const is used to store the locale data registered with `registerLocaleData`\n */\nlet LOCALE_DATA = {};\n/**\n * Register locale data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature `registerLocaleData(data: any, extraData?: any)` is deprecated since v5.1\n */\nfunction registerLocaleData(data, localeId, extraData) {\n    if (typeof localeId !== 'string') {\n        extraData = localeId;\n        localeId = data[LocaleDataIndex.LocaleId];\n    }\n    localeId = localeId.toLowerCase().replace(/_/g, '-');\n    LOCALE_DATA[localeId] = data;\n    if (extraData) {\n        LOCALE_DATA[localeId][LocaleDataIndex.ExtraData] = extraData;\n    }\n}\n/**\n * Finds the locale data for a given locale.\n *\n * @param locale The locale code.\n * @returns The locale data.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction findLocaleData(locale) {\n    const normalizedLocale = normalizeLocale(locale);\n    let match = getLocaleData(normalizedLocale);\n    if (match) {\n        return match;\n    }\n    // let's try to find a parent locale\n    const parentLocale = normalizedLocale.split('-')[0];\n    match = getLocaleData(parentLocale);\n    if (match) {\n        return match;\n    }\n    if (parentLocale === 'en') {\n        return localeEn;\n    }\n    throw new Error(`Missing locale data for the locale \"${locale}\".`);\n}\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n */\nfunction getLocaleCurrencyCode(locale) {\n    const data = findLocaleData(locale);\n    return data[LocaleDataIndex.CurrencyCode] || null;\n}\n/**\n * Retrieves the plural function used by ICU expressions to determine the plural case to use\n * for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The plural function for the locale.\n * @see `NgPlural`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocalePluralCase(locale) {\n    const data = findLocaleData(locale);\n    return data[LocaleDataIndex.PluralCase];\n}\n/**\n * Helper function to get the given `normalizedLocale` from `LOCALE_DATA`\n * or from the global `ng.common.locale`.\n */\nfunction getLocaleData(normalizedLocale) {\n    if (!(normalizedLocale in LOCALE_DATA)) {\n        LOCALE_DATA[normalizedLocale] = _global.ng && _global.ng.common && _global.ng.common.locales &&\n            _global.ng.common.locales[normalizedLocale];\n    }\n    return LOCALE_DATA[normalizedLocale];\n}\n/**\n * Helper function to remove all the locale data from `LOCALE_DATA`.\n */\nfunction unregisterAllLocaleData() {\n    LOCALE_DATA = {};\n}\n/**\n * Index of each type of locale data from the locale data array\n */\nvar LocaleDataIndex;\n(function (LocaleDataIndex) {\n    LocaleDataIndex[LocaleDataIndex[\"LocaleId\"] = 0] = \"LocaleId\";\n    LocaleDataIndex[LocaleDataIndex[\"DayPeriodsFormat\"] = 1] = \"DayPeriodsFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DayPeriodsStandalone\"] = 2] = \"DayPeriodsStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"DaysFormat\"] = 3] = \"DaysFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DaysStandalone\"] = 4] = \"DaysStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"MonthsFormat\"] = 5] = \"MonthsFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"MonthsStandalone\"] = 6] = \"MonthsStandalone\";\n    LocaleDataIndex[LocaleDataIndex[\"Eras\"] = 7] = \"Eras\";\n    LocaleDataIndex[LocaleDataIndex[\"FirstDayOfWeek\"] = 8] = \"FirstDayOfWeek\";\n    LocaleDataIndex[LocaleDataIndex[\"WeekendRange\"] = 9] = \"WeekendRange\";\n    LocaleDataIndex[LocaleDataIndex[\"DateFormat\"] = 10] = \"DateFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"TimeFormat\"] = 11] = \"TimeFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"DateTimeFormat\"] = 12] = \"DateTimeFormat\";\n    LocaleDataIndex[LocaleDataIndex[\"NumberSymbols\"] = 13] = \"NumberSymbols\";\n    LocaleDataIndex[LocaleDataIndex[\"NumberFormats\"] = 14] = \"NumberFormats\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencyCode\"] = 15] = \"CurrencyCode\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencySymbol\"] = 16] = \"CurrencySymbol\";\n    LocaleDataIndex[LocaleDataIndex[\"CurrencyName\"] = 17] = \"CurrencyName\";\n    LocaleDataIndex[LocaleDataIndex[\"Currencies\"] = 18] = \"Currencies\";\n    LocaleDataIndex[LocaleDataIndex[\"Directionality\"] = 19] = \"Directionality\";\n    LocaleDataIndex[LocaleDataIndex[\"PluralCase\"] = 20] = \"PluralCase\";\n    LocaleDataIndex[LocaleDataIndex[\"ExtraData\"] = 21] = \"ExtraData\";\n})(LocaleDataIndex || (LocaleDataIndex = {}));\n/**\n * Returns the canonical form of a locale name - lowercase with `_` replaced with `-`.\n */\nfunction normalizeLocale(locale) {\n    return locale.toLowerCase().replace(/_/g, '-');\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst pluralMapping = ['zero', 'one', 'two', 'few', 'many'];\n/**\n * Returns the plural case based on the locale\n */\nfunction getPluralCase(value, locale) {\n    const plural = getLocalePluralCase(locale)(parseInt(value, 10));\n    const result = pluralMapping[plural];\n    return (result !== undefined) ? result : 'other';\n}\n/**\n * The locale id that the application is using by default (for translations and ICU expressions).\n */\nconst DEFAULT_LOCALE_ID = 'en-US';\n/**\n * USD currency code that the application uses by default for CurrencyPipe when no\n * DEFAULT_CURRENCY_CODE is provided.\n */\nconst USD_CURRENCY_CODE = 'USD';\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The locale id that the application is currently using (for translations and ICU expressions).\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nlet LOCALE_ID = DEFAULT_LOCALE_ID;\n/**\n * Sets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n *\n * @param localeId\n */\nfunction setLocaleId(localeId) {\n    assertDefined(localeId, `Expected localeId to be defined`);\n    if (typeof localeId === 'string') {\n        LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');\n    }\n}\n/**\n * Gets the locale id that will be used for translations and ICU expressions.\n * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine\n * but is now defined as a global value.\n */\nfunction getLocaleId() {\n    return LOCALE_ID;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.\n */\nif (typeof ngI18nClosureMode === 'undefined') {\n    // These property accesses can be ignored because ngI18nClosureMode will be set to false\n    // when optimizing code and the whole if statement will be dropped.\n    // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.\n    // NOTE: we need to have it in IIFE so that the tree-shaker is happy.\n    (function () {\n        // tslint:disable-next-line:no-toplevel-property-access\n        _global['ngI18nClosureMode'] =\n            // TODO(FW-1250): validate that this actually, you know, works.\n            // tslint:disable-next-line:no-toplevel-property-access\n            typeof goog !== 'undefined' && typeof goog.getMsg === 'function';\n    })();\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getParentFromI18nMutateOpCode(mergedCode) {\n    return mergedCode >>> 17 /* SHIFT_PARENT */;\n}\nfunction getRefFromI18nMutateOpCode(mergedCode) {\n    return (mergedCode & 131064 /* MASK_REF */) >>> 3 /* SHIFT_REF */;\n}\nfunction getInstructionFromI18nMutateOpCode(mergedCode) {\n    return mergedCode & 7 /* MASK_INSTRUCTION */;\n}\n/**\n * Marks that the next string is an element name.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst ELEMENT_MARKER = {\n    marker: 'element'\n};\n/**\n * Marks that the next string is comment text.\n *\n * See `I18nMutateOpCodes` documentation.\n */\nconst COMMENT_MARKER = {\n    marker: 'comment'\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$6 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst i18nIndexStack = [];\nlet i18nIndexStackPointer = -1;\nfunction popI18nIndex() {\n    return i18nIndexStack[i18nIndexStackPointer--];\n}\nfunction pushI18nIndex(index) {\n    i18nIndexStack[++i18nIndexStackPointer] = index;\n}\nlet changeMask = 0b0;\nlet shiftsCounter = 0;\nfunction setMaskBit(bit) {\n    if (bit) {\n        changeMask = changeMask | (1 << shiftsCounter);\n    }\n    shiftsCounter++;\n}\nfunction applyI18n(tView, lView, index) {\n    if (shiftsCounter > 0) {\n        ngDevMode && assertDefined(tView, `tView should be defined`);\n        const tI18n = tView.data[index + HEADER_OFFSET];\n        let updateOpCodes;\n        let tIcus = null;\n        if (Array.isArray(tI18n)) {\n            updateOpCodes = tI18n;\n        }\n        else {\n            updateOpCodes = tI18n.update;\n            tIcus = tI18n.icus;\n        }\n        const bindingsStartIndex = getBindingIndex() - shiftsCounter - 1;\n        applyUpdateOpCodes(tView, tIcus, lView, updateOpCodes, bindingsStartIndex, changeMask);\n        // Reset changeMask & maskBit to default for the next update cycle\n        changeMask = 0b0;\n        shiftsCounter = 0;\n    }\n}\n/**\n * Apply `I18nMutateOpCodes` OpCodes.\n *\n * @param tView Current `TView`\n * @param rootIndex Pointer to the root (parent) tNode for the i18n.\n * @param createOpCodes OpCodes to process\n * @param lView Current `LView`\n */\nfunction applyCreateOpCodes(tView, rootindex, createOpCodes, lView) {\n    const renderer = lView[RENDERER];\n    let currentTNode = null;\n    let previousTNode = null;\n    const visitedNodes = [];\n    for (let i = 0; i < createOpCodes.length; i++) {\n        const opCode = createOpCodes[i];\n        if (typeof opCode == 'string') {\n            const textRNode = createTextNode(opCode, renderer);\n            const textNodeIndex = createOpCodes[++i];\n            ngDevMode && ngDevMode.rendererCreateTextNode++;\n            previousTNode = currentTNode;\n            currentTNode =\n                createDynamicNodeAtIndex(tView, lView, textNodeIndex, 3 /* Element */, textRNode, null);\n            visitedNodes.push(textNodeIndex);\n            setIsNotParent();\n        }\n        else if (typeof opCode == 'number') {\n            switch (opCode & 7 /* MASK_INSTRUCTION */) {\n                case 1 /* AppendChild */:\n                    const destinationNodeIndex = opCode >>> 17 /* SHIFT_PARENT */;\n                    let destinationTNode;\n                    if (destinationNodeIndex === rootindex) {\n                        // If the destination node is `i18nStart`, we don't have a\n                        // top-level node and we should use the host node instead\n                        destinationTNode = lView[T_HOST];\n                    }\n                    else {\n                        destinationTNode = getTNode(tView, destinationNodeIndex);\n                    }\n                    ngDevMode &&\n                        assertDefined(currentTNode, `You need to create or select a node before you can insert it into the DOM`);\n                    previousTNode =\n                        appendI18nNode(tView, currentTNode, destinationTNode, previousTNode, lView);\n                    break;\n                case 0 /* Select */:\n                    // Negative indices indicate that a given TNode is a sibling node, not a parent node\n                    // (see `i18nStartFirstPass` for additional information).\n                    const isParent = opCode >= 0;\n                    // FIXME(misko): This SHIFT_REF looks suspect as it does not have mask.\n                    const nodeIndex = (isParent ? opCode : ~opCode) >>> 3 /* SHIFT_REF */;\n                    visitedNodes.push(nodeIndex);\n                    previousTNode = currentTNode;\n                    currentTNode = getTNode(tView, nodeIndex);\n                    if (currentTNode) {\n                        setPreviousOrParentTNode(currentTNode, isParent);\n                    }\n                    break;\n                case 5 /* ElementEnd */:\n                    const elementIndex = opCode >>> 3 /* SHIFT_REF */;\n                    previousTNode = currentTNode = getTNode(tView, elementIndex);\n                    setPreviousOrParentTNode(currentTNode, false);\n                    break;\n                case 4 /* Attr */:\n                    const elementNodeIndex = opCode >>> 3 /* SHIFT_REF */;\n                    const attrName = createOpCodes[++i];\n                    const attrValue = createOpCodes[++i];\n                    // This code is used for ICU expressions only, since we don't support\n                    // directives/components in ICUs, we don't need to worry about inputs here\n                    elementAttributeInternal(getTNode(tView, elementNodeIndex), lView, attrName, attrValue, null, null);\n                    break;\n                default:\n                    throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n            }\n        }\n        else {\n            switch (opCode) {\n                case COMMENT_MARKER:\n                    const commentValue = createOpCodes[++i];\n                    const commentNodeIndex = createOpCodes[++i];\n                    ngDevMode &&\n                        assertEqual(typeof commentValue, 'string', `Expected \"${commentValue}\" to be a comment node value`);\n                    const commentRNode = renderer.createComment(commentValue);\n                    ngDevMode && ngDevMode.rendererCreateComment++;\n                    previousTNode = currentTNode;\n                    currentTNode = createDynamicNodeAtIndex(tView, lView, commentNodeIndex, 5 /* IcuContainer */, commentRNode, null);\n                    visitedNodes.push(commentNodeIndex);\n                    attachPatchData(commentRNode, lView);\n                    // We will add the case nodes later, during the update phase\n                    setIsNotParent();\n                    break;\n                case ELEMENT_MARKER:\n                    const tagNameValue = createOpCodes[++i];\n                    const elementNodeIndex = createOpCodes[++i];\n                    ngDevMode &&\n                        assertEqual(typeof tagNameValue, 'string', `Expected \"${tagNameValue}\" to be an element node tag name`);\n                    const elementRNode = renderer.createElement(tagNameValue);\n                    ngDevMode && ngDevMode.rendererCreateElement++;\n                    previousTNode = currentTNode;\n                    currentTNode = createDynamicNodeAtIndex(tView, lView, elementNodeIndex, 3 /* Element */, elementRNode, tagNameValue);\n                    visitedNodes.push(elementNodeIndex);\n                    break;\n                default:\n                    throw new Error(`Unable to determine the type of mutate operation for \"${opCode}\"`);\n            }\n        }\n    }\n    setIsNotParent();\n    return visitedNodes;\n}\n/**\n * Apply `I18nUpdateOpCodes` OpCodes\n *\n * @param tView Current `TView`\n * @param tIcus If ICUs present than this contains them.\n * @param lView Current `LView`\n * @param updateOpCodes OpCodes to process\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n *     `bindingsStartIndex`)\n */\nfunction applyUpdateOpCodes(tView, tIcus, lView, updateOpCodes, bindingsStartIndex, changeMask) {\n    let caseCreated = false;\n    for (let i = 0; i < updateOpCodes.length; i++) {\n        // bit code to check if we should apply the next update\n        const checkBit = updateOpCodes[i];\n        // Number of opCodes to skip until next set of update codes\n        const skipCodes = updateOpCodes[++i];\n        if (checkBit & changeMask) {\n            // The value has been updated since last checked\n            let value = '';\n            for (let j = i + 1; j <= (i + skipCodes); j++) {\n                const opCode = updateOpCodes[j];\n                if (typeof opCode == 'string') {\n                    value += opCode;\n                }\n                else if (typeof opCode == 'number') {\n                    if (opCode < 0) {\n                        // Negative opCode represent `i18nExp` values offset.\n                        value += renderStringify(lView[bindingsStartIndex - opCode]);\n                    }\n                    else {\n                        const nodeIndex = opCode >>> 2 /* SHIFT_REF */;\n                        switch (opCode & 3 /* MASK_OPCODE */) {\n                            case 1 /* Attr */:\n                                const propName = updateOpCodes[++j];\n                                const sanitizeFn = updateOpCodes[++j];\n                                elementPropertyInternal(tView, getTNode(tView, nodeIndex), lView, propName, value, lView[RENDERER], sanitizeFn, false);\n                                break;\n                            case 0 /* Text */:\n                                textBindingInternal(lView, nodeIndex, value);\n                                break;\n                            case 2 /* IcuSwitch */:\n                                caseCreated =\n                                    applyIcuSwitchCase(tView, tIcus, updateOpCodes[++j], lView, value);\n                                break;\n                            case 3 /* IcuUpdate */:\n                                applyIcuUpdateCase(tView, tIcus, updateOpCodes[++j], bindingsStartIndex, lView, caseCreated);\n                                break;\n                        }\n                    }\n                }\n            }\n        }\n        i += skipCodes;\n    }\n}\n/**\n * Apply OpCodes associated with updating an existing ICU.\n *\n * @param tView Current `TView`\n * @param tIcus ICUs active at this location.\n * @param tIcuIndex Index into `tIcus` to process.\n * @param bindingsStartIndex Location of the first `ɵɵi18nApply`\n * @param lView Current `LView`\n * @param changeMask Each bit corresponds to a `ɵɵi18nExp` (Counting backwards from\n *     `bindingsStartIndex`)\n */\nfunction applyIcuUpdateCase(tView, tIcus, tIcuIndex, bindingsStartIndex, lView, caseCreated) {\n    ngDevMode && assertIndexInRange(tIcus, tIcuIndex);\n    const tIcu = tIcus[tIcuIndex];\n    ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex);\n    const activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n    if (activeCaseIndex !== null) {\n        const mask = caseCreated ?\n            -1 : // -1 is same as all bits on, which simulates creation since it marks all bits dirty\n            changeMask;\n        applyUpdateOpCodes(tView, tIcus, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask);\n    }\n}\n/**\n * Apply OpCodes associated with switching a case on ICU.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcus ICUs active at this location.\n * @param tICuIndex Index into `tIcus` to process.\n * @param lView Current `LView`\n * @param value Value of the case to update to.\n * @returns true if a new case was created (needed so that the update executes regardless of the\n *     bitmask)\n */\nfunction applyIcuSwitchCase(tView, tIcus, tICuIndex, lView, value) {\n    applyIcuSwitchCaseRemove(tView, tIcus, tICuIndex, lView);\n    // Rebuild a new case for this ICU\n    let caseCreated = false;\n    const tIcu = tIcus[tICuIndex];\n    const caseIndex = getCaseIndex(tIcu, value);\n    lView[tIcu.currentCaseLViewIndex] = caseIndex !== -1 ? caseIndex : null;\n    if (caseIndex > -1) {\n        // Add the nodes for the new case\n        applyCreateOpCodes(tView, -1, // -1 means we don't have parent node\n        tIcu.create[caseIndex], lView);\n        caseCreated = true;\n    }\n    return caseCreated;\n}\n/**\n * Apply OpCodes associated with tearing down of DOM.\n *\n * This involves tearing down existing case and than building up a new case.\n *\n * @param tView Current `TView`\n * @param tIcus ICUs active at this location.\n * @param tIcuIndex Index into `tIcus` to process.\n * @param lView Current `LView`\n * @returns true if a new case was created (needed so that the update executes regardless of the\n *     bitmask)\n */\nfunction applyIcuSwitchCaseRemove(tView, tIcus, tIcuIndex, lView) {\n    ngDevMode && assertIndexInRange(tIcus, tIcuIndex);\n    const tIcu = tIcus[tIcuIndex];\n    const activeCaseIndex = lView[tIcu.currentCaseLViewIndex];\n    if (activeCaseIndex !== null) {\n        const removeCodes = tIcu.remove[activeCaseIndex];\n        for (let k = 0; k < removeCodes.length; k++) {\n            const removeOpCode = removeCodes[k];\n            const nodeOrIcuIndex = removeOpCode >>> 3 /* SHIFT_REF */;\n            switch (removeOpCode & 7 /* MASK_INSTRUCTION */) {\n                case 3 /* Remove */:\n                    // FIXME(misko): this comment is wrong!\n                    // Remove DOM element, but do *not* mark TNode as detached, since we are\n                    // just switching ICU cases (while keeping the same TNode), so a DOM element\n                    // representing a new ICU case will be re-created.\n                    removeNode(tView, lView, nodeOrIcuIndex, /* markAsDetached */ false);\n                    break;\n                case 6 /* RemoveNestedIcu */:\n                    applyIcuSwitchCaseRemove(tView, tIcus, nodeOrIcuIndex, lView);\n                    break;\n            }\n        }\n    }\n}\nfunction appendI18nNode(tView, tNode, parentTNode, previousTNode, lView) {\n    ngDevMode && ngDevMode.rendererMoveNode++;\n    const nextNode = tNode.next;\n    if (!previousTNode) {\n        previousTNode = parentTNode;\n    }\n    // Re-organize node tree to put this node in the correct position.\n    if (previousTNode === parentTNode && tNode !== parentTNode.child) {\n        tNode.next = parentTNode.child;\n        parentTNode.child = tNode;\n    }\n    else if (previousTNode !== parentTNode && tNode !== previousTNode.next) {\n        tNode.next = previousTNode.next;\n        previousTNode.next = tNode;\n    }\n    else {\n        tNode.next = null;\n    }\n    if (parentTNode !== lView[T_HOST]) {\n        tNode.parent = parentTNode;\n    }\n    // If tNode was moved around, we might need to fix a broken link.\n    let cursor = tNode.next;\n    while (cursor) {\n        if (cursor.next === tNode) {\n            cursor.next = nextNode;\n        }\n        cursor = cursor.next;\n    }\n    // If the placeholder to append is a projection, we need to move the projected nodes instead\n    if (tNode.type === 1 /* Projection */) {\n        applyProjection(tView, lView, tNode);\n        return tNode;\n    }\n    appendChild(tView, lView, getNativeByTNode(tNode, lView), tNode);\n    const slotValue = lView[tNode.index];\n    if (tNode.type !== 0 /* Container */ && isLContainer(slotValue)) {\n        // Nodes that inject ViewContainerRef also have a comment node that should be moved\n        appendChild(tView, lView, slotValue[NATIVE], tNode);\n    }\n    return tNode;\n}\n/**\n * See `i18nEnd` above.\n */\nfunction i18nEndFirstPass(tView, lView) {\n    ngDevMode &&\n        assertEqual(getBindingIndex(), tView.bindingStartIndex, 'i18nEnd should be called before any binding');\n    const rootIndex = popI18nIndex();\n    const tI18n = tView.data[rootIndex + HEADER_OFFSET];\n    ngDevMode && assertDefined(tI18n, `You should call i18nStart before i18nEnd`);\n    // Find the last node that was added before `i18nEnd`\n    const lastCreatedNode = getPreviousOrParentTNode();\n    // Read the instructions to insert/move/remove DOM elements\n    const visitedNodes = applyCreateOpCodes(tView, rootIndex, tI18n.create, lView);\n    // Remove deleted nodes\n    let index = rootIndex + 1;\n    while (index <= lastCreatedNode.index - HEADER_OFFSET) {\n        if (visitedNodes.indexOf(index) === -1) {\n            removeNode(tView, lView, index, /* markAsDetached */ true);\n        }\n        // Check if an element has any local refs and skip them\n        const tNode = getTNode(tView, index);\n        if (tNode &&\n            (tNode.type === 0 /* Container */ || tNode.type === 3 /* Element */ ||\n                tNode.type === 4 /* ElementContainer */) &&\n            tNode.localNames !== null) {\n            // Divide by 2 to get the number of local refs,\n            // since they are stored as an array that also includes directive indexes,\n            // i.e. [\"localRef\", directiveIndex, ...]\n            index += tNode.localNames.length >> 1;\n        }\n        index++;\n    }\n}\nfunction removeNode(tView, lView, index, markAsDetached) {\n    const removedPhTNode = getTNode(tView, index);\n    const removedPhRNode = getNativeByIndex(index, lView);\n    if (removedPhRNode) {\n        nativeRemoveNode(lView[RENDERER], removedPhRNode);\n    }\n    const slotValue = load(lView, index);\n    if (isLContainer(slotValue)) {\n        const lContainer = slotValue;\n        if (removedPhTNode.type !== 0 /* Container */) {\n            nativeRemoveNode(lView[RENDERER], lContainer[NATIVE]);\n        }\n    }\n    if (markAsDetached) {\n        // Define this node as detached to avoid projecting it later\n        removedPhTNode.flags |= 64 /* isDetached */;\n    }\n    ngDevMode && ngDevMode.rendererRemoveNode++;\n}\n/**\n * Creates and stores the dynamic TNode, and unhooks it from the tree for now.\n */\nfunction createDynamicNodeAtIndex(tView, lView, index, type, native, name) {\n    const previousOrParentTNode = getPreviousOrParentTNode();\n    ngDevMode && assertIndexInRange(lView, index + HEADER_OFFSET);\n    lView[index + HEADER_OFFSET] = native;\n    // FIXME(misko): Why does this create A TNode??? I would not expect this to be here.\n    const tNode = getOrCreateTNode(tView, lView[T_HOST], index, type, name, null);\n    // We are creating a dynamic node, the previous tNode might not be pointing at this node.\n    // We will link ourselves into the tree later with `appendI18nNode`.\n    if (previousOrParentTNode && previousOrParentTNode.next === tNode) {\n        previousOrParentTNode.next = null;\n    }\n    return tNode;\n}\n/**\n * Returns the index of the current case of an ICU expression depending on the main binding value\n *\n * @param icuExpression\n * @param bindingValue The value of the main binding used by this ICU expression\n */\nfunction getCaseIndex(icuExpression, bindingValue) {\n    let index = icuExpression.cases.indexOf(bindingValue);\n    if (index === -1) {\n        switch (icuExpression.type) {\n            case 1 /* plural */: {\n                const resolvedCase = getPluralCase(bindingValue, getLocaleId());\n                index = icuExpression.cases.indexOf(resolvedCase);\n                if (index === -1 && resolvedCase !== 'other') {\n                    index = icuExpression.cases.indexOf('other');\n                }\n                break;\n            }\n            case 0 /* select */: {\n                index = icuExpression.cases.indexOf('other');\n                break;\n            }\n        }\n    }\n    return index;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Converts `I18nUpdateOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nUpdateOpCodes.debug` property if `ngDevMode` is enabled.\n * This function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nUpdateOpCodes` if attached as a method.\n * @param opcodes `I18nUpdateOpCodes` if invoked as a function.\n */\nfunction i18nUpdateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(value) {\n        const ref = value >>> 2 /* SHIFT_REF */;\n        const opCode = value & 3 /* MASK_OPCODE */;\n        switch (opCode) {\n            case 0 /* Text */:\n                return `(lView[${ref}] as Text).textContent = $$$`;\n            case 1 /* Attr */:\n                const attrName = parser.consumeString();\n                const sanitizationFn = parser.consumeFunction();\n                const value = sanitizationFn ? `(${sanitizationFn})($$$)` : '$$$';\n                return `(lView[${ref}] as Element).setAttribute('${attrName}', ${value})`;\n            case 2 /* IcuSwitch */:\n                return `icuSwitchCase(lView[${ref}] as Comment, ${parser.consumeNumber()}, $$$)`;\n            case 3 /* IcuUpdate */:\n                return `icuUpdateCase(lView[${ref}] as Comment, ${parser.consumeNumber()})`;\n        }\n        throw new Error('unexpected OpCode');\n    }\n    while (parser.hasMore()) {\n        let mask = parser.consumeNumber();\n        let size = parser.consumeNumber();\n        const end = parser.i + size;\n        const statements = [];\n        let statement = '';\n        while (parser.i < end) {\n            let value = parser.consumeNumberOrString();\n            if (typeof value === 'string') {\n                statement += value;\n            }\n            else if (value < 0) {\n                // Negative numbers are ref indexes\n                statement += '${lView[' + (0 - value) + ']}';\n            }\n            else {\n                // Positive numbers are operations.\n                const opCodeText = consumeOpCode(value);\n                statements.push(opCodeText.replace('$$$', '`' + statement + '`') + ';');\n                statement = '';\n            }\n        }\n        lines.push(`if (mask & 0b${mask.toString(2)}) { ${statements.join(' ')} }`);\n    }\n    return lines;\n}\n/**\n * Converts `I18nMutableOpCodes` array into a human readable format.\n *\n * This function is attached to the `I18nMutableOpCodes.debug` if `ngDevMode` is enabled. This\n * function provides a human readable view of the opcodes. This is useful when debugging the\n * application as well as writing more readable tests.\n *\n * @param this `I18nMutableOpCodes` if attached as a method.\n * @param opcodes `I18nMutableOpCodes` if invoked as a function.\n */\nfunction i18nMutateOpCodesToString(opcodes) {\n    const parser = new OpCodeParser(opcodes || (Array.isArray(this) ? this : []));\n    let lines = [];\n    function consumeOpCode(opCode) {\n        const parent = getParentFromI18nMutateOpCode(opCode);\n        const ref = getRefFromI18nMutateOpCode(opCode);\n        switch (getInstructionFromI18nMutateOpCode(opCode)) {\n            case 0 /* Select */:\n                lastRef = ref;\n                return '';\n            case 1 /* AppendChild */:\n                return `(lView[${parent}] as Element).appendChild(lView[${lastRef}])`;\n            case 3 /* Remove */:\n                return `(lView[${parent}] as Element).remove(lView[${ref}])`;\n            case 4 /* Attr */:\n                return `(lView[${ref}] as Element).setAttribute(\"${parser.consumeString()}\", \"${parser.consumeString()}\")`;\n            case 5 /* ElementEnd */:\n                return `setPreviousOrParentTNode(tView.data[${ref}] as TNode)`;\n            case 6 /* RemoveNestedIcu */:\n                return `removeNestedICU(${ref})`;\n        }\n        throw new Error('Unexpected OpCode');\n    }\n    let lastRef = -1;\n    while (parser.hasMore()) {\n        let value = parser.consumeNumberStringOrMarker();\n        if (value === COMMENT_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createComment(\"${text}\")`);\n        }\n        else if (value === ELEMENT_MARKER) {\n            const text = parser.consumeString();\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createElement(\"${text}\")`);\n        }\n        else if (typeof value === 'string') {\n            lastRef = parser.consumeNumber();\n            lines.push(`lView[${lastRef}] = document.createTextNode(\"${value}\")`);\n        }\n        else if (typeof value === 'number') {\n            const line = consumeOpCode(value);\n            line && lines.push(line);\n        }\n        else {\n            throw new Error('Unexpected value');\n        }\n    }\n    return lines;\n}\nclass OpCodeParser {\n    constructor(codes) {\n        this.i = 0;\n        this.codes = codes;\n    }\n    hasMore() {\n        return this.i < this.codes.length;\n    }\n    consumeNumber() {\n        let value = this.codes[this.i++];\n        assertNumber(value, 'expecting number in OpCode');\n        return value;\n    }\n    consumeString() {\n        let value = this.codes[this.i++];\n        assertString(value, 'expecting string in OpCode');\n        return value;\n    }\n    consumeFunction() {\n        let value = this.codes[this.i++];\n        if (value === null || typeof value === 'function') {\n            return value;\n        }\n        throw new Error('expecting function in OpCode');\n    }\n    consumeNumberOrString() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string') {\n            return value;\n        }\n        assertNumber(value, 'expecting number or string in OpCode');\n        return value;\n    }\n    consumeNumberStringOrMarker() {\n        let value = this.codes[this.i++];\n        if (typeof value === 'string' || typeof value === 'number' || value == COMMENT_MARKER ||\n            value == ELEMENT_MARKER) {\n            return value;\n        }\n        assertNumber(value, 'expecting number, string, COMMENT_MARKER or ELEMENT_MARKER in OpCode');\n        return value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst BINDING_REGEXP = /�(\\d+):?\\d*�/gi;\nconst ICU_REGEXP = /({\\s*�\\d+:?\\d*�\\s*,\\s*\\S{6}\\s*,[\\s\\S]*})/gi;\nconst NESTED_ICU = /�(\\d+)�/;\nconst ICU_BLOCK_REGEXP = /^\\s*(�\\d+:?\\d*�)\\s*,\\s*(select|plural)\\s*,/;\n// Count for the number of vars that will be allocated for each i18n block.\n// It is global because this is used in multiple functions that include loops and recursive calls.\n// This is reset to 0 when `i18nStartFirstPass` is called.\nlet i18nVarsCount;\nconst parentIndexStack = [];\nconst MARKER = `�`;\nconst SUBTEMPLATE_REGEXP = /�\\/?\\*(\\d+:\\d+)�/gi;\nconst PH_REGEXP = /�(\\/?[#*!]\\d+):?\\d*�/gi;\n/**\n * Angular Dart introduced &ngsp; as a placeholder for non-removable space, see:\n * https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart#L25-L32\n * In Angular Dart &ngsp; is converted to the 0xE500 PUA (Private Use Areas) unicode character\n * and later on replaced by a space. We are re-implementing the same idea here, since translations\n * might contain this special character.\n */\nconst NGSP_UNICODE_REGEXP = /\\uE500/g;\nfunction replaceNgsp(value) {\n    return value.replace(NGSP_UNICODE_REGEXP, ' ');\n}\n/**\n * See `i18nStart` above.\n */\nfunction i18nStartFirstPass(lView, tView, index, message, subTemplateIndex) {\n    const startIndex = tView.blueprint.length - HEADER_OFFSET;\n    i18nVarsCount = 0;\n    const previousOrParentTNode = getPreviousOrParentTNode();\n    const parentTNode = getIsParent() ? previousOrParentTNode : previousOrParentTNode && previousOrParentTNode.parent;\n    let parentIndex = parentTNode && parentTNode !== lView[T_HOST] ? parentTNode.index - HEADER_OFFSET : index;\n    let parentIndexPointer = 0;\n    parentIndexStack[parentIndexPointer] = parentIndex;\n    const createOpCodes = [];\n    if (ngDevMode) {\n        attachDebugGetter(createOpCodes, i18nMutateOpCodesToString);\n    }\n    // If the previous node wasn't the direct parent then we have a translation without top level\n    // element and we need to keep a reference of the previous element if there is one. We should also\n    // keep track whether an element was a parent node or not, so that the logic that consumes\n    // the generated `I18nMutateOpCode`s can leverage this information to properly set TNode state\n    // (whether it's a parent or sibling).\n    if (index > 0 && previousOrParentTNode !== parentTNode) {\n        let previousTNodeIndex = previousOrParentTNode.index - HEADER_OFFSET;\n        // If current TNode is a sibling node, encode it using a negative index. This information is\n        // required when the `Select` action is processed (see the `readCreateOpCodes` function).\n        if (!getIsParent()) {\n            previousTNodeIndex = ~previousTNodeIndex;\n        }\n        // Create an OpCode to select the previous TNode\n        createOpCodes.push(previousTNodeIndex << 3 /* SHIFT_REF */ | 0 /* Select */);\n    }\n    const updateOpCodes = [];\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    const icuExpressions = [];\n    if (message === '' && isRootTemplateMessage(subTemplateIndex)) {\n        // If top level translation is an empty string, do not invoke additional processing\n        // and just create op codes for empty text node instead.\n        createOpCodes.push(message, allocNodeIndex(startIndex), parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n    }\n    else {\n        const templateTranslation = getTranslationForTemplate(message, subTemplateIndex);\n        const msgParts = replaceNgsp(templateTranslation).split(PH_REGEXP);\n        for (let i = 0; i < msgParts.length; i++) {\n            let value = msgParts[i];\n            if (i & 1) {\n                // Odd indexes are placeholders (elements and sub-templates)\n                if (value.charAt(0) === '/') {\n                    // It is a closing tag\n                    if (value.charAt(1) === \"#\" /* ELEMENT */) {\n                        const phIndex = parseInt(value.substr(2), 10);\n                        parentIndex = parentIndexStack[--parentIndexPointer];\n                        createOpCodes.push(phIndex << 3 /* SHIFT_REF */ | 5 /* ElementEnd */);\n                    }\n                }\n                else {\n                    const phIndex = parseInt(value.substr(1), 10);\n                    const isElement = value.charAt(0) === \"#\" /* ELEMENT */;\n                    // The value represents a placeholder that we move to the designated index.\n                    // Note: positive indicies indicate that a TNode with a given index should also be marked\n                    // as parent while executing `Select` instruction.\n                    createOpCodes.push((isElement ? phIndex : ~phIndex) << 3 /* SHIFT_REF */ |\n                        0 /* Select */, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                    if (isElement) {\n                        parentIndexStack[++parentIndexPointer] = parentIndex = phIndex;\n                    }\n                }\n            }\n            else {\n                // Even indexes are text (including bindings & ICU expressions)\n                const parts = extractParts(value);\n                for (let j = 0; j < parts.length; j++) {\n                    if (j & 1) {\n                        // Odd indexes are ICU expressions\n                        const icuExpression = parts[j];\n                        // Verify that ICU expression has the right shape. Translations might contain invalid\n                        // constructions (while original messages were correct), so ICU parsing at runtime may\n                        // not succeed (thus `icuExpression` remains a string).\n                        if (typeof icuExpression !== 'object') {\n                            throw new Error(`Unable to parse ICU expression in \"${templateTranslation}\" message.`);\n                        }\n                        // Create the comment node that will anchor the ICU expression\n                        const icuNodeIndex = allocNodeIndex(startIndex);\n                        createOpCodes.push(COMMENT_MARKER, ngDevMode ? `ICU ${icuNodeIndex}` : '', icuNodeIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                        // Update codes for the ICU expression\n                        const mask = getBindingMask(icuExpression);\n                        icuStart(icuExpressions, icuExpression, icuNodeIndex, icuNodeIndex);\n                        // Since this is recursive, the last TIcu that was pushed is the one we want\n                        const tIcuIndex = icuExpressions.length - 1;\n                        updateOpCodes.push(toMaskBit(icuExpression.mainBinding), // mask of the main binding\n                        3, // skip 3 opCodes if not changed\n                        -1 - icuExpression.mainBinding, icuNodeIndex << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */, tIcuIndex, mask, // mask of all the bindings of this ICU expression\n                        2, // skip 2 opCodes if not changed\n                        icuNodeIndex << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */, tIcuIndex);\n                    }\n                    else if (parts[j] !== '') {\n                        const text = parts[j];\n                        // Even indexes are text (including bindings)\n                        const hasBinding = text.match(BINDING_REGEXP);\n                        // Create text nodes\n                        const textNodeIndex = allocNodeIndex(startIndex);\n                        createOpCodes.push(\n                        // If there is a binding, the value will be set during update\n                        hasBinding ? '' : text, textNodeIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                        if (hasBinding) {\n                            addAllToArray(generateBindingUpdateOpCodes(text, textNodeIndex), updateOpCodes);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    if (i18nVarsCount > 0) {\n        allocExpando(tView, lView, i18nVarsCount);\n    }\n    // NOTE: local var needed to properly assert the type of `TI18n`.\n    const tI18n = {\n        vars: i18nVarsCount,\n        create: createOpCodes,\n        update: updateOpCodes,\n        icus: icuExpressions.length ? icuExpressions : null,\n    };\n    tView.data[index + HEADER_OFFSET] = tI18n;\n}\n/**\n * See `i18nAttributes` above.\n */\nfunction i18nAttributesFirstPass(lView, tView, index, values) {\n    const previousElement = getPreviousOrParentTNode();\n    const previousElementIndex = previousElement.index - HEADER_OFFSET;\n    const updateOpCodes = [];\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    for (let i = 0; i < values.length; i += 2) {\n        const attrName = values[i];\n        const message = values[i + 1];\n        const parts = message.split(ICU_REGEXP);\n        for (let j = 0; j < parts.length; j++) {\n            const value = parts[j];\n            if (j & 1) {\n                // Odd indexes are ICU expressions\n                // TODO(ocombe): support ICU expressions in attributes\n                throw new Error('ICU expressions are not yet supported in attributes');\n            }\n            else if (value !== '') {\n                // Even indexes are text (including bindings)\n                const hasBinding = !!value.match(BINDING_REGEXP);\n                if (hasBinding) {\n                    if (tView.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n                        addAllToArray(generateBindingUpdateOpCodes(value, previousElementIndex, attrName), updateOpCodes);\n                    }\n                }\n                else {\n                    const tNode = getTNode(tView, previousElementIndex);\n                    // Set attributes for Elements only, for other types (like ElementContainer),\n                    // only set inputs below\n                    if (tNode.type === 3 /* Element */) {\n                        elementAttributeInternal(tNode, lView, attrName, value, null, null);\n                    }\n                    // Check if that attribute is a directive input\n                    const dataValue = tNode.inputs !== null && tNode.inputs[attrName];\n                    if (dataValue) {\n                        setInputsForProperty(tView, lView, dataValue, attrName, value);\n                        if (ngDevMode) {\n                            const element = getNativeByIndex(previousElementIndex, lView);\n                            setNgReflectProperties(lView, element, tNode.type, dataValue, value);\n                        }\n                    }\n                }\n            }\n        }\n    }\n    if (tView.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n        tView.data[index + HEADER_OFFSET] = updateOpCodes;\n    }\n}\n/**\n * Generate the OpCodes to update the bindings of a string.\n *\n * @param str The string containing the bindings.\n * @param destinationNode Index of the destination node which will receive the binding.\n * @param attrName Name of the attribute, if the string belongs to an attribute.\n * @param sanitizeFn Sanitization function used to sanitize the string after update, if necessary.\n */\nfunction generateBindingUpdateOpCodes(str, destinationNode, attrName, sanitizeFn = null) {\n    const updateOpCodes = [null, null]; // Alloc space for mask and size\n    if (ngDevMode) {\n        attachDebugGetter(updateOpCodes, i18nUpdateOpCodesToString);\n    }\n    const textParts = str.split(BINDING_REGEXP);\n    let mask = 0;\n    for (let j = 0; j < textParts.length; j++) {\n        const textValue = textParts[j];\n        if (j & 1) {\n            // Odd indexes are bindings\n            const bindingIndex = parseInt(textValue, 10);\n            updateOpCodes.push(-1 - bindingIndex);\n            mask = mask | toMaskBit(bindingIndex);\n        }\n        else if (textValue !== '') {\n            // Even indexes are text\n            updateOpCodes.push(textValue);\n        }\n    }\n    updateOpCodes.push(destinationNode << 2 /* SHIFT_REF */ |\n        (attrName ? 1 /* Attr */ : 0 /* Text */));\n    if (attrName) {\n        updateOpCodes.push(attrName, sanitizeFn);\n    }\n    updateOpCodes[0] = mask;\n    updateOpCodes[1] = updateOpCodes.length - 2;\n    return updateOpCodes;\n}\nfunction getBindingMask(icuExpression, mask = 0) {\n    mask = mask | toMaskBit(icuExpression.mainBinding);\n    let match;\n    for (let i = 0; i < icuExpression.values.length; i++) {\n        const valueArr = icuExpression.values[i];\n        for (let j = 0; j < valueArr.length; j++) {\n            const value = valueArr[j];\n            if (typeof value === 'string') {\n                while (match = BINDING_REGEXP.exec(value)) {\n                    mask = mask | toMaskBit(parseInt(match[1], 10));\n                }\n            }\n            else {\n                mask = getBindingMask(value, mask);\n            }\n        }\n    }\n    return mask;\n}\nfunction allocNodeIndex(startIndex) {\n    return startIndex + i18nVarsCount++;\n}\n/**\n * Convert binding index to mask bit.\n *\n * Each index represents a single bit on the bit-mask. Because bit-mask only has 32 bits, we make\n * the 32nd bit share all masks for all bindings higher than 32. Since it is extremely rare to have\n * more than 32 bindings this will be hit very rarely. The downside of hitting this corner case is\n * that we will execute binding code more often than necessary. (penalty of performance)\n */\nfunction toMaskBit(bindingIndex) {\n    return 1 << Math.min(bindingIndex, 31);\n}\nfunction isRootTemplateMessage(subTemplateIndex) {\n    return subTemplateIndex === undefined;\n}\n/**\n * Removes everything inside the sub-templates of a message.\n */\nfunction removeInnerTemplateTranslation(message) {\n    let match;\n    let res = '';\n    let index = 0;\n    let inTemplate = false;\n    let tagMatched;\n    while ((match = SUBTEMPLATE_REGEXP.exec(message)) !== null) {\n        if (!inTemplate) {\n            res += message.substring(index, match.index + match[0].length);\n            tagMatched = match[1];\n            inTemplate = true;\n        }\n        else {\n            if (match[0] === `${MARKER}/*${tagMatched}${MARKER}`) {\n                index = match.index;\n                inTemplate = false;\n            }\n        }\n    }\n    ngDevMode &&\n        assertEqual(inTemplate, false, `Tag mismatch: unable to find the end of the sub-template in the translation \"${message}\"`);\n    res += message.substr(index);\n    return res;\n}\n/**\n * Extracts a part of a message and removes the rest.\n *\n * This method is used for extracting a part of the message associated with a template. A translated\n * message can span multiple templates.\n *\n * Example:\n * ```\n * <div i18n>Translate <span *ngIf>me</span>!</div>\n * ```\n *\n * @param message The message to crop\n * @param subTemplateIndex Index of the sub-template to extract. If undefined it returns the\n * external template and removes all sub-templates.\n */\nfunction getTranslationForTemplate(message, subTemplateIndex) {\n    if (isRootTemplateMessage(subTemplateIndex)) {\n        // We want the root template message, ignore all sub-templates\n        return removeInnerTemplateTranslation(message);\n    }\n    else {\n        // We want a specific sub-template\n        const start = message.indexOf(`:${subTemplateIndex}${MARKER}`) + 2 + subTemplateIndex.toString().length;\n        const end = message.search(new RegExp(`${MARKER}\\\\/\\\\*\\\\d+:${subTemplateIndex}${MARKER}`));\n        return removeInnerTemplateTranslation(message.substring(start, end));\n    }\n}\n/**\n * Generate the OpCodes for ICU expressions.\n *\n * @param tIcus\n * @param icuExpression\n * @param startIndex\n * @param expandoStartIndex\n */\nfunction icuStart(tIcus, icuExpression, startIndex, expandoStartIndex) {\n    const createCodes = [];\n    const removeCodes = [];\n    const updateCodes = [];\n    const vars = [];\n    const childIcus = [];\n    const values = icuExpression.values;\n    for (let i = 0; i < values.length; i++) {\n        // Each value is an array of strings & other ICU expressions\n        const valueArr = values[i];\n        const nestedIcus = [];\n        for (let j = 0; j < valueArr.length; j++) {\n            const value = valueArr[j];\n            if (typeof value !== 'string') {\n                // It is an nested ICU expression\n                const icuIndex = nestedIcus.push(value) - 1;\n                // Replace nested ICU expression by a comment node\n                valueArr[j] = `<!--�${icuIndex}�-->`;\n            }\n        }\n        const icuCase = parseIcuCase(valueArr.join(''), startIndex, nestedIcus, tIcus, expandoStartIndex);\n        createCodes.push(icuCase.create);\n        removeCodes.push(icuCase.remove);\n        updateCodes.push(icuCase.update);\n        vars.push(icuCase.vars);\n        childIcus.push(icuCase.childIcus);\n    }\n    const tIcu = {\n        type: icuExpression.type,\n        vars,\n        currentCaseLViewIndex: HEADER_OFFSET +\n            expandoStartIndex // expandoStartIndex does not include the header so add it.\n            + 1,\n        childIcus,\n        cases: icuExpression.cases,\n        create: createCodes,\n        remove: removeCodes,\n        update: updateCodes\n    };\n    tIcus.push(tIcu);\n    // Adding the maximum possible of vars needed (based on the cases with the most vars)\n    i18nVarsCount += Math.max(...vars);\n}\n/**\n * Parses text containing an ICU expression and produces a JSON object for it.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern Text containing an ICU expression that needs to be parsed.\n *\n */\nfunction parseICUBlock(pattern) {\n    const cases = [];\n    const values = [];\n    let icuType = 1 /* plural */;\n    let mainBinding = 0;\n    pattern = pattern.replace(ICU_BLOCK_REGEXP, function (str, binding, type) {\n        if (type === 'select') {\n            icuType = 0 /* select */;\n        }\n        else {\n            icuType = 1 /* plural */;\n        }\n        mainBinding = parseInt(binding.substr(1), 10);\n        return '';\n    });\n    const parts = extractParts(pattern);\n    // Looking for (key block)+ sequence. One of the keys has to be \"other\".\n    for (let pos = 0; pos < parts.length;) {\n        let key = parts[pos++].trim();\n        if (icuType === 1 /* plural */) {\n            // Key can be \"=x\", we just want \"x\"\n            key = key.replace(/\\s*(?:=)?(\\w+)\\s*/, '$1');\n        }\n        if (key.length) {\n            cases.push(key);\n        }\n        const blocks = extractParts(parts[pos++]);\n        if (cases.length > values.length) {\n            values.push(blocks);\n        }\n    }\n    // TODO(ocombe): support ICU expressions in attributes, see #21615\n    return { type: icuType, mainBinding: mainBinding, cases, values };\n}\n/**\n * Transforms a string template into an HTML template and a list of instructions used to update\n * attributes or nodes that contain bindings.\n *\n * @param unsafeHtml The string to parse\n * @param parentIndex\n * @param nestedIcus\n * @param tIcus\n * @param expandoStartIndex\n */\nfunction parseIcuCase(unsafeHtml, parentIndex, nestedIcus, tIcus, expandoStartIndex) {\n    const inertBodyHelper = getInertBodyHelper(getDocument());\n    const inertBodyElement = inertBodyHelper.getInertBodyElement(unsafeHtml);\n    if (!inertBodyElement) {\n        throw new Error('Unable to generate inert body element');\n    }\n    const wrapper = getTemplateContent(inertBodyElement) || inertBodyElement;\n    const opCodes = {\n        vars: 1,\n        childIcus: [],\n        create: [],\n        remove: [],\n        update: []\n    };\n    if (ngDevMode) {\n        attachDebugGetter(opCodes.create, i18nMutateOpCodesToString);\n        attachDebugGetter(opCodes.remove, i18nMutateOpCodesToString);\n        attachDebugGetter(opCodes.update, i18nUpdateOpCodesToString);\n    }\n    parseNodes(wrapper.firstChild, opCodes, parentIndex, nestedIcus, tIcus, expandoStartIndex);\n    return opCodes;\n}\n/**\n * Breaks pattern into strings and top level {...} blocks.\n * Can be used to break a message into text and ICU expressions, or to break an ICU expression into\n * keys and cases.\n * Original code from closure library, modified for Angular.\n *\n * @param pattern (sub)Pattern to be broken.\n *\n */\nfunction extractParts(pattern) {\n    if (!pattern) {\n        return [];\n    }\n    let prevPos = 0;\n    const braceStack = [];\n    const results = [];\n    const braces = /[{}]/g;\n    // lastIndex doesn't get set to 0 so we have to.\n    braces.lastIndex = 0;\n    let match;\n    while (match = braces.exec(pattern)) {\n        const pos = match.index;\n        if (match[0] == '}') {\n            braceStack.pop();\n            if (braceStack.length == 0) {\n                // End of the block.\n                const block = pattern.substring(prevPos, pos);\n                if (ICU_BLOCK_REGEXP.test(block)) {\n                    results.push(parseICUBlock(block));\n                }\n                else {\n                    results.push(block);\n                }\n                prevPos = pos + 1;\n            }\n        }\n        else {\n            if (braceStack.length == 0) {\n                const substring = pattern.substring(prevPos, pos);\n                results.push(substring);\n                prevPos = pos + 1;\n            }\n            braceStack.push('{');\n        }\n    }\n    const substring = pattern.substring(prevPos);\n    results.push(substring);\n    return results;\n}\n/**\n * Parses a node, its children and its siblings, and generates the mutate & update OpCodes.\n *\n * @param currentNode The first node to parse\n * @param icuCase The data for the ICU expression case that contains those nodes\n * @param parentIndex Index of the current node's parent\n * @param nestedIcus Data for the nested ICU expressions that this case contains\n * @param tIcus Data for all ICU expressions of the current message\n * @param expandoStartIndex Expando start index for the current ICU expression\n */\nfunction parseNodes(currentNode, icuCase, parentIndex, nestedIcus, tIcus, expandoStartIndex) {\n    if (currentNode) {\n        const nestedIcusToCreate = [];\n        while (currentNode) {\n            const nextNode = currentNode.nextSibling;\n            const newIndex = expandoStartIndex + ++icuCase.vars;\n            switch (currentNode.nodeType) {\n                case Node.ELEMENT_NODE:\n                    const element = currentNode;\n                    const tagName = element.tagName.toLowerCase();\n                    if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n                        // This isn't a valid element, we won't create an element for it\n                        icuCase.vars--;\n                    }\n                    else {\n                        icuCase.create.push(ELEMENT_MARKER, tagName, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                        const elAttrs = element.attributes;\n                        for (let i = 0; i < elAttrs.length; i++) {\n                            const attr = elAttrs.item(i);\n                            const lowerAttrName = attr.name.toLowerCase();\n                            const hasBinding = !!attr.value.match(BINDING_REGEXP);\n                            // we assume the input string is safe, unless it's using a binding\n                            if (hasBinding) {\n                                if (VALID_ATTRS.hasOwnProperty(lowerAttrName)) {\n                                    if (URI_ATTRS[lowerAttrName]) {\n                                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, _sanitizeUrl), icuCase.update);\n                                    }\n                                    else if (SRCSET_ATTRS[lowerAttrName]) {\n                                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name, sanitizeSrcset), icuCase.update);\n                                    }\n                                    else {\n                                        addAllToArray(generateBindingUpdateOpCodes(attr.value, newIndex, attr.name), icuCase.update);\n                                    }\n                                }\n                                else {\n                                    ngDevMode &&\n                                        console.warn(`WARNING: ignoring unsafe attribute value ${lowerAttrName} on element ${tagName} (see http://g.co/ng/security#xss)`);\n                                }\n                            }\n                            else {\n                                icuCase.create.push(newIndex << 3 /* SHIFT_REF */ | 4 /* Attr */, attr.name, attr.value);\n                            }\n                        }\n                        // Parse the children of this node (if any)\n                        parseNodes(currentNode.firstChild, icuCase, newIndex, nestedIcus, tIcus, expandoStartIndex);\n                        // Remove the parent node after the children\n                        icuCase.remove.push(newIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n                    }\n                    break;\n                case Node.TEXT_NODE:\n                    const value = currentNode.textContent || '';\n                    const hasBinding = value.match(BINDING_REGEXP);\n                    icuCase.create.push(hasBinding ? '' : value, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                    icuCase.remove.push(newIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n                    if (hasBinding) {\n                        addAllToArray(generateBindingUpdateOpCodes(value, newIndex), icuCase.update);\n                    }\n                    break;\n                case Node.COMMENT_NODE:\n                    // Check if the comment node is a placeholder for a nested ICU\n                    const match = NESTED_ICU.exec(currentNode.textContent || '');\n                    if (match) {\n                        const nestedIcuIndex = parseInt(match[1], 10);\n                        const newLocal = ngDevMode ? `nested ICU ${nestedIcuIndex}` : '';\n                        // Create the comment node that will anchor the ICU expression\n                        icuCase.create.push(COMMENT_MARKER, newLocal, newIndex, parentIndex << 17 /* SHIFT_PARENT */ | 1 /* AppendChild */);\n                        const nestedIcu = nestedIcus[nestedIcuIndex];\n                        nestedIcusToCreate.push([nestedIcu, newIndex]);\n                    }\n                    else {\n                        // We do not handle any other type of comment\n                        icuCase.vars--;\n                    }\n                    break;\n                default:\n                    // We do not handle any other type of element\n                    icuCase.vars--;\n            }\n            currentNode = nextNode;\n        }\n        for (let i = 0; i < nestedIcusToCreate.length; i++) {\n            const nestedIcu = nestedIcusToCreate[i][0];\n            const nestedIcuNodeIndex = nestedIcusToCreate[i][1];\n            icuStart(tIcus, nestedIcu, nestedIcuNodeIndex, expandoStartIndex + icuCase.vars);\n            // Since this is recursive, the last TIcu that was pushed is the one we want\n            const nestTIcuIndex = tIcus.length - 1;\n            icuCase.vars += Math.max(...tIcus[nestTIcuIndex].vars);\n            icuCase.childIcus.push(nestTIcuIndex);\n            const mask = getBindingMask(nestedIcu);\n            icuCase.update.push(toMaskBit(nestedIcu.mainBinding), // mask of the main binding\n            3, // skip 3 opCodes if not changed\n            -1 - nestedIcu.mainBinding, nestedIcuNodeIndex << 2 /* SHIFT_REF */ | 2 /* IcuSwitch */, \n            // FIXME(misko): Index should be part of the opcode\n            nestTIcuIndex, mask, // mask of all the bindings of this ICU expression\n            2, // skip 2 opCodes if not changed\n            nestedIcuNodeIndex << 2 /* SHIFT_REF */ | 3 /* IcuUpdate */, nestTIcuIndex);\n            icuCase.remove.push(nestTIcuIndex << 3 /* SHIFT_REF */ | 6 /* RemoveNestedIcu */, \n            // FIXME(misko): Index should be part of the opcode\n            nestedIcuNodeIndex << 3 /* SHIFT_REF */ | 3 /* Remove */);\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// i18nPostprocess consts\nconst ROOT_TEMPLATE_ID = 0;\nconst PP_MULTI_VALUE_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]/;\nconst PP_PLACEHOLDERS_REGEXP = /\\[(�.+?�?)\\]|(�\\/?\\*\\d+:\\d+�)/g;\nconst PP_ICU_VARS_REGEXP = /({\\s*)(VAR_(PLURAL|SELECT)(_\\d+)?)(\\s*,)/g;\nconst PP_ICU_PLACEHOLDERS_REGEXP = /{([A-Z0-9_]+)}/g;\nconst PP_ICUS_REGEXP = /�I18N_EXP_(ICU(_\\d+)?)�/g;\nconst PP_CLOSE_TEMPLATE_REGEXP = /\\/\\*/;\nconst PP_TEMPLATE_ID_REGEXP = /\\d+\\:(\\d+)/;\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction i18nPostprocess(message, replacements = {}) {\n    /**\n     * Step 1: resolve all multi-value placeholders like [�#5�|�*1:1��#2:1�|�#4:1�]\n     *\n     * Note: due to the way we process nested templates (BFS), multi-value placeholders are typically\n     * grouped by templates, for example: [�#5�|�#6�|�#1:1�|�#3:2�] where �#5� and �#6� belong to root\n     * template, �#1:1� belong to nested template with index 1 and �#1:2� - nested template with index\n     * 3. However in real templates the order might be different: i.e. �#1:1� and/or �#3:2� may go in\n     * front of �#6�. The post processing step restores the right order by keeping track of the\n     * template id stack and looks for placeholders that belong to the currently active template.\n     */\n    let result = message;\n    if (PP_MULTI_VALUE_PLACEHOLDERS_REGEXP.test(message)) {\n        const matches = {};\n        const templateIdsStack = [ROOT_TEMPLATE_ID];\n        result = result.replace(PP_PLACEHOLDERS_REGEXP, (m, phs, tmpl) => {\n            const content = phs || tmpl;\n            const placeholders = matches[content] || [];\n            if (!placeholders.length) {\n                content.split('|').forEach((placeholder) => {\n                    const match = placeholder.match(PP_TEMPLATE_ID_REGEXP);\n                    const templateId = match ? parseInt(match[1], 10) : ROOT_TEMPLATE_ID;\n                    const isCloseTemplateTag = PP_CLOSE_TEMPLATE_REGEXP.test(placeholder);\n                    placeholders.push([templateId, isCloseTemplateTag, placeholder]);\n                });\n                matches[content] = placeholders;\n            }\n            if (!placeholders.length) {\n                throw new Error(`i18n postprocess: unmatched placeholder - ${content}`);\n            }\n            const currentTemplateId = templateIdsStack[templateIdsStack.length - 1];\n            let idx = 0;\n            // find placeholder index that matches current template id\n            for (let i = 0; i < placeholders.length; i++) {\n                if (placeholders[i][0] === currentTemplateId) {\n                    idx = i;\n                    break;\n                }\n            }\n            // update template id stack based on the current tag extracted\n            const [templateId, isCloseTemplateTag, placeholder] = placeholders[idx];\n            if (isCloseTemplateTag) {\n                templateIdsStack.pop();\n            }\n            else if (currentTemplateId !== templateId) {\n                templateIdsStack.push(templateId);\n            }\n            // remove processed tag from the list\n            placeholders.splice(idx, 1);\n            return placeholder;\n        });\n    }\n    // return current result if no replacements specified\n    if (!Object.keys(replacements).length) {\n        return result;\n    }\n    /**\n     * Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n     */\n    result = result.replace(PP_ICU_VARS_REGEXP, (match, start, key, _type, _idx, end) => {\n        return replacements.hasOwnProperty(key) ? `${start}${replacements[key]}${end}` : match;\n    });\n    /**\n     * Step 3: replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n     */\n    result = result.replace(PP_ICU_PLACEHOLDERS_REGEXP, (match, key) => {\n        return replacements.hasOwnProperty(key) ? replacements[key] : match;\n    });\n    /**\n     * Step 4: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�) in case\n     * multiple ICUs have the same placeholder name\n     */\n    result = result.replace(PP_ICUS_REGEXP, (match, key) => {\n        if (replacements.hasOwnProperty(key)) {\n            const list = replacements[key];\n            if (!list.length) {\n                throw new Error(`i18n postprocess: unmatched ICU - ${match} with key: ${key}`);\n            }\n            return list.shift();\n        }\n        return match;\n    });\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Marks a block of text as translatable.\n *\n * The instructions `i18nStart` and `i18nEnd` mark the translation block in the template.\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�!{index}(:{block})�`/`�/!{index}(:{block})�`: *Projection Placeholder*:  Marks the\n *   beginning and end of <ng-content> that was embedded in the original translation block.\n *   The placeholder `index` points to the element index in the template instructions set.\n *   An optional `block` that matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nStart(index, messageIndex, subTemplateIndex) {\n    const tView = getTView();\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const message = getConstant(tView.consts, messageIndex);\n    pushI18nIndex(index);\n    // We need to delay projections until `i18nEnd`\n    setDelayProjection(true);\n    if (tView.firstCreatePass && tView.data[index + HEADER_OFFSET] === null) {\n        i18nStartFirstPass(getLView(), tView, index, message, subTemplateIndex);\n    }\n}\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nEnd() {\n    const lView = getLView();\n    const tView = getTView();\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    i18nEndFirstPass(tView, lView);\n    // Stop delaying projections\n    setDelayProjection(false);\n}\n/**\n *\n * Use this instruction to create a translation block that doesn't contain any placeholder.\n * It calls both {@link i18nStart} and {@link i18nEnd} in one instruction.\n *\n * The translation `message` is the value which is locale specific. The translation string may\n * contain placeholders which associate inner elements and sub-templates within the translation.\n *\n * The translation `message` placeholders are:\n * - `�{index}(:{block})�`: *Binding Placeholder*: Marks a location where an expression will be\n *   interpolated into. The placeholder `index` points to the expression binding index. An optional\n *   `block` that matches the sub-template in which it was declared.\n * - `�#{index}(:{block})�`/`�/#{index}(:{block})�`: *Element Placeholder*:  Marks the beginning\n *   and end of DOM element that were embedded in the original translation block. The placeholder\n *   `index` points to the element index in the template instructions set. An optional `block` that\n *   matches the sub-template in which it was declared.\n * - `�*{index}:{block}�`/`�/*{index}:{block}�`: *Sub-template Placeholder*: Sub-templates must be\n *   split up and translated separately in each angular template function. The `index` points to the\n *   `template` instruction index. A `block` that matches the sub-template in which it was declared.\n *\n * @param index A unique index of the translation in the static block.\n * @param messageIndex An index of the translation message from the `def.consts` array.\n * @param subTemplateIndex Optional sub-template index in the `message`.\n *\n * @codeGenApi\n */\nfunction ɵɵi18n(index, messageIndex, subTemplateIndex) {\n    ɵɵi18nStart(index, messageIndex, subTemplateIndex);\n    ɵɵi18nEnd();\n}\n/**\n * Marks a list of attributes as translatable.\n *\n * @param index A unique index in the static block\n * @param values\n *\n * @codeGenApi\n */\nfunction ɵɵi18nAttributes(index, attrsIndex) {\n    const lView = getLView();\n    const tView = getTView();\n    ngDevMode && assertDefined(tView, `tView should be defined`);\n    const attrs = getConstant(tView.consts, attrsIndex);\n    i18nAttributesFirstPass(lView, tView, index, attrs);\n}\n/**\n * Stores the values of the bindings during each update cycle in order to determine if we need to\n * update the translated nodes.\n *\n * @param value The binding's value\n * @returns This function returns itself so that it may be chained\n * (e.g. `i18nExp(ctx.name)(ctx.title)`)\n *\n * @codeGenApi\n */\nfunction ɵɵi18nExp(value) {\n    const lView = getLView();\n    setMaskBit(bindingUpdated(lView, nextBindingIndex(), value));\n    return ɵɵi18nExp;\n}\n/**\n * Updates a translation block or an i18n attribute when the bindings have changed.\n *\n * @param index Index of either {@link i18nStart} (translation block) or {@link i18nAttributes}\n * (i18n attribute) on which it should update the content.\n *\n * @codeGenApi\n */\nfunction ɵɵi18nApply(index) {\n    applyI18n(getTView(), getLView(), index);\n}\n/**\n * Handles message string post-processing for internationalization.\n *\n * Handles message string post-processing by transforming it from intermediate\n * format (that might contain some markers that we need to replace) to the final\n * form, consumable by i18nStart instruction. Post processing steps include:\n *\n * 1. Resolve all multi-value cases (like [�*1:1��#2:1�|�#4:1�|�5�])\n * 2. Replace all ICU vars (like \"VAR_PLURAL\")\n * 3. Replace all placeholders used inside ICUs in a form of {PLACEHOLDER}\n * 4. Replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n *    in case multiple ICUs have the same placeholder name\n *\n * @param message Raw translation string for post processing\n * @param replacements Set of replacements that should be applied\n *\n * @returns Transformed string that can be consumed by i18nStart instruction\n *\n * @codeGenApi\n */\nfunction ɵɵi18nPostprocess(message, replacements = {}) {\n    return i18nPostprocess(message, replacements);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Adds decorator, constructor, and property metadata to a given type via static metadata fields\n * on the type.\n *\n * These metadata fields can later be read with Angular's `ReflectionCapabilities` API.\n *\n * Calls to `setClassMetadata` can be marked as pure, resulting in the metadata assignments being\n * tree-shaken away during production builds.\n */\nfunction setClassMetadata(type, decorators, ctorParameters, propDecorators) {\n    return noSideEffects(() => {\n        const clazz = type;\n        // We determine whether a class has its own metadata by taking the metadata from the\n        // parent constructor and checking whether it's the same as the subclass metadata below.\n        // We can't use `hasOwnProperty` here because it doesn't work correctly in IE10 for\n        // static fields that are defined by TS. See\n        // https://github.com/angular/angular/pull/28439#issuecomment-459349218.\n        const parentPrototype = clazz.prototype ? Object.getPrototypeOf(clazz.prototype) : null;\n        const parentConstructor = parentPrototype && parentPrototype.constructor;\n        if (decorators !== null) {\n            if (clazz.decorators !== undefined &&\n                (!parentConstructor || parentConstructor.decorators !== clazz.decorators)) {\n                clazz.decorators.push(...decorators);\n            }\n            else {\n                clazz.decorators = decorators;\n            }\n        }\n        if (ctorParameters !== null) {\n            // Rather than merging, clobber the existing parameters. If other projects exist which\n            // use tsickle-style annotations and reflect over them in the same way, this could\n            // cause issues, but that is vanishingly unlikely.\n            clazz.ctorParameters = ctorParameters;\n        }\n        if (propDecorators !== null) {\n            // The property decorator objects are merged as it is possible different fields have\n            // different decorator types. Decorators on individual fields are not merged, as it's\n            // also incredibly unlikely that a field will be decorated both with an Angular\n            // decorator and a non-Angular decorator that's also been downleveled.\n            if (clazz.propDecorators !== undefined &&\n                (!parentConstructor ||\n                    parentConstructor.propDecorators !== clazz.propDecorators)) {\n                clazz.propDecorators = Object.assign(Object.assign({}, clazz.propDecorators), propDecorators);\n            }\n            else {\n                clazz.propDecorators = propDecorators;\n            }\n        }\n    });\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Map of module-id to the corresponding NgModule.\n * - In pre Ivy we track NgModuleFactory,\n * - In post Ivy we track the NgModuleType\n */\nconst modules = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @publicApi\n */\nfunction registerModuleFactory(id, factory) {\n    const existing = modules.get(id);\n    assertSameOrNotExisting(id, existing && existing.moduleType, factory.moduleType);\n    modules.set(id, factory);\n}\nfunction assertSameOrNotExisting(id, type, incoming) {\n    if (type && type !== incoming) {\n        throw new Error(`Duplicate module registered for ${id} - ${stringify(type)} vs ${stringify(type.name)}`);\n    }\n}\nfunction registerNgModuleType(ngModuleType) {\n    if (ngModuleType.ɵmod.id !== null) {\n        const id = ngModuleType.ɵmod.id;\n        const existing = modules.get(id);\n        assertSameOrNotExisting(id, existing, ngModuleType);\n        modules.set(id, ngModuleType);\n    }\n    let imports = ngModuleType.ɵmod.imports;\n    if (imports instanceof Function) {\n        imports = imports();\n    }\n    if (imports) {\n        imports.forEach(i => registerNgModuleType(i));\n    }\n}\nfunction clearModulesForTest() {\n    modules.clear();\n}\nfunction getRegisteredNgModuleType(id) {\n    return modules.get(id) || autoRegisterModuleById[id];\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass NgModuleRef$1 extends NgModuleRef {\n    constructor(ngModuleType, _parent) {\n        super();\n        this._parent = _parent;\n        // tslint:disable-next-line:require-internal-with-underscore\n        this._bootstrapComponents = [];\n        this.injector = this;\n        this.destroyCbs = [];\n        // When bootstrapping a module we have a dependency graph that looks like this:\n        // ApplicationRef -> ComponentFactoryResolver -> NgModuleRef. The problem is that if the\n        // module being resolved tries to inject the ComponentFactoryResolver, it'll create a\n        // circular dependency which will result in a runtime error, because the injector doesn't\n        // exist yet. We work around the issue by creating the ComponentFactoryResolver ourselves\n        // and providing it, rather than letting the injector resolve it.\n        this.componentFactoryResolver = new ComponentFactoryResolver$1(this);\n        const ngModuleDef = getNgModuleDef(ngModuleType);\n        ngDevMode &&\n            assertDefined(ngModuleDef, `NgModule '${stringify(ngModuleType)}' is not a subtype of 'NgModuleType'.`);\n        const ngLocaleIdDef = getNgLocaleIdDef(ngModuleType);\n        ngLocaleIdDef && setLocaleId(ngLocaleIdDef);\n        this._bootstrapComponents = maybeUnwrapFn(ngModuleDef.bootstrap);\n        this._r3Injector = createInjectorWithoutInjectorInstances(ngModuleType, _parent, [\n            { provide: NgModuleRef, useValue: this }, {\n                provide: ComponentFactoryResolver,\n                useValue: this.componentFactoryResolver\n            }\n        ], stringify(ngModuleType));\n        // We need to resolve the injector types separately from the injector creation, because\n        // the module might be trying to use this ref in its contructor for DI which will cause a\n        // circular error that will eventually error out, because the injector isn't created yet.\n        this._r3Injector._resolveInjectorDefTypes();\n        this.instance = this.get(ngModuleType);\n    }\n    get(token, notFoundValue = Injector.THROW_IF_NOT_FOUND, injectFlags = InjectFlags.Default) {\n        if (token === Injector || token === NgModuleRef || token === INJECTOR) {\n            return this;\n        }\n        return this._r3Injector.get(token, notFoundValue, injectFlags);\n    }\n    destroy() {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        const injector = this._r3Injector;\n        !injector.destroyed && injector.destroy();\n        this.destroyCbs.forEach(fn => fn());\n        this.destroyCbs = null;\n    }\n    onDestroy(callback) {\n        ngDevMode && assertDefined(this.destroyCbs, 'NgModule already destroyed');\n        this.destroyCbs.push(callback);\n    }\n}\nclass NgModuleFactory$1 extends NgModuleFactory {\n    constructor(moduleType) {\n        super();\n        this.moduleType = moduleType;\n        const ngModuleDef = getNgModuleDef(moduleType);\n        if (ngModuleDef !== null) {\n            // Register the NgModule with Angular's module registry. The location (and hence timing) of\n            // this call is critical to ensure this works correctly (modules get registered when expected)\n            // without bloating bundles (modules are registered when otherwise not referenced).\n            //\n            // In View Engine, registration occurs in the .ngfactory.js file as a side effect. This has\n            // several practical consequences:\n            //\n            // - If an .ngfactory file is not imported from, the module won't be registered (and can be\n            //   tree shaken).\n            // - If an .ngfactory file is imported from, the module will be registered even if an instance\n            //   is not actually created (via `create` below).\n            // - Since an .ngfactory file in View Engine references the .ngfactory files of the NgModule's\n            //   imports,\n            //\n            // In Ivy, things are a bit different. .ngfactory files still exist for compatibility, but are\n            // not a required API to use - there are other ways to obtain an NgModuleFactory for a given\n            // NgModule. Thus, relying on a side effect in the .ngfactory file is not sufficient. Instead,\n            // the side effect of registration is added here, in the constructor of NgModuleFactory,\n            // ensuring no matter how a factory is created, the module is registered correctly.\n            //\n            // An alternative would be to include the registration side effect inline following the actual\n            // NgModule definition. This also has the correct timing, but breaks tree-shaking - modules\n            // will be registered and retained even if they're otherwise never referenced.\n            registerNgModuleType(moduleType);\n        }\n    }\n    create(parentInjector) {\n        return new NgModuleRef$1(this.moduleType, parentInjector);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Bindings for pure functions are stored after regular bindings.\n *\n * |-------decls------|---------vars---------|                 |----- hostVars (dir1) ------|\n * ------------------------------------------------------------------------------------------\n * | nodes/refs/pipes | bindings | fn slots  | injector | dir1 | host bindings | host slots |\n * ------------------------------------------------------------------------------------------\n *                    ^                      ^\n *      TView.bindingStartIndex      TView.expandoStartIndex\n *\n * Pure function instructions are given an offset from the binding root. Adding the offset to the\n * binding root gives the first index where the bindings are stored. In component views, the binding\n * root is the bindingStartIndex. In host bindings, the binding root is the expandoStartIndex +\n * any directive instances + any hostVars in directives evaluated before it.\n *\n * See VIEW_DATA.md for more information about host binding resolution.\n */\n/**\n * If the value hasn't been saved, calls the pure function to store and return the\n * value. If it has been saved, returns the saved value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns a value\n * @param thisArg Optional calling context of pureFn\n * @returns value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction0(slotOffset, pureFn, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    return lView[bindingIndex] === NO_CHANGE ?\n        updateBinding(lView, bindingIndex, thisArg ? pureFn.call(thisArg) : pureFn()) :\n        getBinding(lView, bindingIndex);\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction1(slotOffset, pureFn, exp, thisArg) {\n    return pureFunction1Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction2(slotOffset, pureFn, exp1, exp2, thisArg) {\n    return pureFunction2Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction3(slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n    return pureFunction3Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction4(slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n    return pureFunction4Internal(getLView(), getBindingRoot(), slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction5(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated(lView, bindingIndex + 4, exp5) || different ?\n        updateBinding(lView, bindingIndex + 5, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n            pureFn(exp1, exp2, exp3, exp4, exp5)) :\n        getBinding(lView, bindingIndex + 5);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction6(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated2(lView, bindingIndex + 4, exp5, exp6) || different ?\n        updateBinding(lView, bindingIndex + 6, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n        getBinding(lView, bindingIndex + 6);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction7(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    let different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated3(lView, bindingIndex + 4, exp5, exp6, exp7) || different ?\n        updateBinding(lView, bindingIndex + 7, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n        getBinding(lView, bindingIndex + 7);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @param exp8\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunction8(slotOffset, pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n    const bindingIndex = getBindingRoot() + slotOffset;\n    const lView = getLView();\n    const different = bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4);\n    return bindingUpdated4(lView, bindingIndex + 4, exp5, exp6, exp7, exp8) || different ?\n        updateBinding(lView, bindingIndex + 8, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n            pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n        getBinding(lView, bindingIndex + 8);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n * @codeGenApi\n */\nfunction ɵɵpureFunctionV(slotOffset, pureFn, exps, thisArg) {\n    return pureFunctionVInternal(getLView(), getBindingRoot(), slotOffset, pureFn, exps, thisArg);\n}\n/**\n * Results of a pure function invocation are stored in LView in a dedicated slot that is initialized\n * to NO_CHANGE. In rare situations a pure pipe might throw an exception on the very first\n * invocation and not produce any valid results. In this case LView would keep holding the NO_CHANGE\n * value. The NO_CHANGE is not something that we can use in expressions / bindings thus we convert\n * it to `undefined`.\n */\nfunction getPureFunctionReturnValue(lView, returnValueIndex) {\n    ngDevMode && assertIndexInRange(lView, returnValueIndex);\n    const lastReturnValue = lView[returnValueIndex];\n    return lastReturnValue === NO_CHANGE ? undefined : lastReturnValue;\n}\n/**\n * If the value of the provided exp has changed, calls the pure function to return\n * an updated value. Or if the value has not changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction1Internal(lView, bindingRoot, slotOffset, pureFn, exp, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated(lView, bindingIndex, exp) ?\n        updateBinding(lView, bindingIndex + 1, thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 1);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction2Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated2(lView, bindingIndex, exp1, exp2) ?\n        updateBinding(lView, bindingIndex + 2, thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 2);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunction3Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated3(lView, bindingIndex, exp1, exp2, exp3) ?\n        updateBinding(lView, bindingIndex + 3, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 3);\n}\n/**\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n *\n */\nfunction pureFunction4Internal(lView, bindingRoot, slotOffset, pureFn, exp1, exp2, exp3, exp4, thisArg) {\n    const bindingIndex = bindingRoot + slotOffset;\n    return bindingUpdated4(lView, bindingIndex, exp1, exp2, exp3, exp4) ?\n        updateBinding(lView, bindingIndex + 4, thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n        getPureFunctionReturnValue(lView, bindingIndex + 4);\n}\n/**\n * pureFunction instruction that can support any number of bindings.\n *\n * If the value of any provided exp has changed, calls the pure function to return\n * an updated value. Or if no values have changed, returns cached value.\n *\n * @param lView LView in which the function is being executed.\n * @param bindingRoot Binding root index.\n * @param slotOffset the offset from binding root to the reserved slot\n * @param pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exps An array of binding values\n * @param thisArg Optional calling context of pureFn\n * @returns Updated or cached value\n */\nfunction pureFunctionVInternal(lView, bindingRoot, slotOffset, pureFn, exps, thisArg) {\n    let bindingIndex = bindingRoot + slotOffset;\n    let different = false;\n    for (let i = 0; i < exps.length; i++) {\n        bindingUpdated(lView, bindingIndex++, exps[i]) && (different = true);\n    }\n    return different ? updateBinding(lView, bindingIndex, pureFn.apply(thisArg, exps)) :\n        getPureFunctionReturnValue(lView, bindingIndex);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Create a pipe.\n *\n * @param index Pipe index where the pipe will be stored.\n * @param pipeName The name of the pipe\n * @returns T the instance of the pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵpipe(index, pipeName) {\n    const tView = getTView();\n    let pipeDef;\n    const adjustedIndex = index + HEADER_OFFSET;\n    if (tView.firstCreatePass) {\n        pipeDef = getPipeDef$1(pipeName, tView.pipeRegistry);\n        tView.data[adjustedIndex] = pipeDef;\n        if (pipeDef.onDestroy) {\n            (tView.destroyHooks || (tView.destroyHooks = [])).push(adjustedIndex, pipeDef.onDestroy);\n        }\n    }\n    else {\n        pipeDef = tView.data[adjustedIndex];\n    }\n    const pipeFactory = pipeDef.factory || (pipeDef.factory = getFactoryDef(pipeDef.type, true));\n    const previousInjectImplementation = setInjectImplementation(ɵɵdirectiveInject);\n    // DI for pipes is supposed to behave like directives when placed on a component\n    // host node, which means that we have to disable access to `viewProviders`.\n    const previousIncludeViewProviders = setIncludeViewProviders(false);\n    const pipeInstance = pipeFactory();\n    setIncludeViewProviders(previousIncludeViewProviders);\n    setInjectImplementation(previousInjectImplementation);\n    store(tView, getLView(), index, pipeInstance);\n    return pipeInstance;\n}\n/**\n * Searches the pipe registry for a pipe with the given name. If one is found,\n * returns the pipe. Otherwise, an error is thrown because the pipe cannot be resolved.\n *\n * @param name Name of pipe to resolve\n * @param registry Full list of available pipes\n * @returns Matching PipeDef\n */\nfunction getPipeDef$1(name, registry) {\n    if (registry) {\n        for (let i = registry.length - 1; i >= 0; i--) {\n            const pipeDef = registry[i];\n            if (name === pipeDef.name) {\n                return pipeDef;\n            }\n        }\n    }\n    throw new Error(`The pipe '${name}' could not be found!`);\n}\n/**\n * Invokes a pipe with 1 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind1(index, slotOffset, v1) {\n    const lView = getLView();\n    const pipeInstance = load(lView, index);\n    return unwrapValue$1(lView, isPure(lView, index) ?\n        pureFunction1Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, pipeInstance) :\n        pipeInstance.transform(v1));\n}\n/**\n * Invokes a pipe with 2 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind2(index, slotOffset, v1, v2) {\n    const lView = getLView();\n    const pipeInstance = load(lView, index);\n    return unwrapValue$1(lView, isPure(lView, index) ?\n        pureFunction2Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, pipeInstance) :\n        pipeInstance.transform(v1, v2));\n}\n/**\n * Invokes a pipe with 3 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 4rd argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind3(index, slotOffset, v1, v2, v3) {\n    const lView = getLView();\n    const pipeInstance = load(lView, index);\n    return unwrapValue$1(lView, isPure(lView, index) ? pureFunction3Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, pipeInstance) :\n        pipeInstance.transform(v1, v2, v3));\n}\n/**\n * Invokes a pipe with 4 arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n * @param v3 3rd argument to {@link PipeTransform#transform}.\n * @param v4 4th argument to {@link PipeTransform#transform}.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBind4(index, slotOffset, v1, v2, v3, v4) {\n    const lView = getLView();\n    const pipeInstance = load(lView, index);\n    return unwrapValue$1(lView, isPure(lView, index) ? pureFunction4Internal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, v1, v2, v3, v4, pipeInstance) :\n        pipeInstance.transform(v1, v2, v3, v4));\n}\n/**\n * Invokes a pipe with variable number of arguments.\n *\n * This instruction acts as a guard to {@link PipeTransform#transform} invoking\n * the pipe only when an input to the pipe changes.\n *\n * @param index Pipe index where the pipe was stored on creation.\n * @param slotOffset the offset in the reserved slot space\n * @param values Array of arguments to pass to {@link PipeTransform#transform} method.\n *\n * @codeGenApi\n */\nfunction ɵɵpipeBindV(index, slotOffset, values) {\n    const lView = getLView();\n    const pipeInstance = load(lView, index);\n    return unwrapValue$1(lView, isPure(lView, index) ?\n        pureFunctionVInternal(lView, getBindingRoot(), slotOffset, pipeInstance.transform, values, pipeInstance) :\n        pipeInstance.transform.apply(pipeInstance, values));\n}\nfunction isPure(lView, index) {\n    return lView[TVIEW].data[index + HEADER_OFFSET].pure;\n}\n/**\n * Unwrap the output of a pipe transformation.\n * In order to trick change detection into considering that the new value is always different from\n * the old one, the old value is overwritten by NO_CHANGE.\n *\n * @param newValue the pipe transformation output.\n */\nfunction unwrapValue$1(lView, newValue) {\n    if (WrappedValue.isWrapped(newValue)) {\n        newValue = WrappedValue.unwrap(newValue);\n        // The NO_CHANGE value needs to be written at the index where the impacted binding value is\n        // stored\n        const bindingToInvalidateIdx = getBindingIndex();\n        lView[bindingToInvalidateIdx] = NO_CHANGE;\n    }\n    return newValue;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass EventEmitter_ extends Subject {\n    constructor(isAsync = false) {\n        super();\n        this.__isAsync = isAsync;\n    }\n    emit(value) {\n        super.next(value);\n    }\n    subscribe(generatorOrNext, error, complete) {\n        let schedulerFn;\n        let errorFn = (err) => null;\n        let completeFn = () => null;\n        if (generatorOrNext && typeof generatorOrNext === 'object') {\n            schedulerFn = this.__isAsync ? (value) => {\n                setTimeout(() => generatorOrNext.next(value));\n            } : (value) => {\n                generatorOrNext.next(value);\n            };\n            if (generatorOrNext.error) {\n                errorFn = this.__isAsync ? (err) => {\n                    setTimeout(() => generatorOrNext.error(err));\n                } : (err) => {\n                    generatorOrNext.error(err);\n                };\n            }\n            if (generatorOrNext.complete) {\n                completeFn = this.__isAsync ? () => {\n                    setTimeout(() => generatorOrNext.complete());\n                } : () => {\n                    generatorOrNext.complete();\n                };\n            }\n        }\n        else {\n            schedulerFn = this.__isAsync ? (value) => {\n                setTimeout(() => generatorOrNext(value));\n            } : (value) => {\n                generatorOrNext(value);\n            };\n            if (error) {\n                errorFn = this.__isAsync ? (err) => {\n                    setTimeout(() => error(err));\n                } : (err) => {\n                    error(err);\n                };\n            }\n            if (complete) {\n                completeFn = this.__isAsync ? () => {\n                    setTimeout(() => complete());\n                } : () => {\n                    complete();\n                };\n            }\n        }\n        const sink = super.subscribe(schedulerFn, errorFn, completeFn);\n        if (generatorOrNext instanceof Subscription) {\n            generatorOrNext.add(sink);\n        }\n        return sink;\n    }\n}\n/**\n * @publicApi\n */\nconst EventEmitter = EventEmitter_;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction symbolIterator() {\n    return this._results[getSymbolIterator()]();\n}\n/**\n * An unmodifiable list of items that Angular keeps up to date when the state\n * of the application changes.\n *\n * The type of object that {@link ViewChildren}, {@link ContentChildren}, and {@link QueryList}\n * provide.\n *\n * Implements an iterable interface, therefore it can be used in both ES6\n * javascript `for (var i of items)` loops as well as in Angular templates with\n * `*ngFor=\"let i of myList\"`.\n *\n * Changes can be observed by subscribing to the changes `Observable`.\n *\n * NOTE: In the future this class will implement an `Observable` interface.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * @Component({...})\n * class Container {\n *   @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n * @publicApi\n */\nclass QueryList {\n    constructor() {\n        this.dirty = true;\n        this._results = [];\n        this.changes = new EventEmitter();\n        this.length = 0;\n        // This function should be declared on the prototype, but doing so there will cause the class\n        // declaration to have side-effects and become not tree-shakable. For this reason we do it in\n        // the constructor.\n        // [getSymbolIterator()](): Iterator<T> { ... }\n        const symbol = getSymbolIterator();\n        const proto = QueryList.prototype;\n        if (!proto[symbol])\n            proto[symbol] = symbolIterator;\n    }\n    /**\n     * See\n     * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n     */\n    map(fn) {\n        return this._results.map(fn);\n    }\n    /**\n     * See\n     * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n     */\n    filter(fn) {\n        return this._results.filter(fn);\n    }\n    /**\n     * See\n     * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n     */\n    find(fn) {\n        return this._results.find(fn);\n    }\n    /**\n     * See\n     * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n     */\n    reduce(fn, init) {\n        return this._results.reduce(fn, init);\n    }\n    /**\n     * See\n     * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n     */\n    forEach(fn) {\n        this._results.forEach(fn);\n    }\n    /**\n     * See\n     * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n     */\n    some(fn) {\n        return this._results.some(fn);\n    }\n    /**\n     * Returns a copy of the internal results list as an Array.\n     */\n    toArray() {\n        return this._results.slice();\n    }\n    toString() {\n        return this._results.toString();\n    }\n    /**\n     * Updates the stored data of the query list, and resets the `dirty` flag to `false`, so that\n     * on change detection, it will not notify of changes to the queries, unless a new change\n     * occurs.\n     *\n     * @param resultsTree The query results to store\n     */\n    reset(resultsTree) {\n        this._results = flatten(resultsTree);\n        this.dirty = false;\n        this.length = this._results.length;\n        this.last = this._results[this.length - 1];\n        this.first = this._results[0];\n    }\n    /**\n     * Triggers a change event by emitting on the `changes` {@link EventEmitter}.\n     */\n    notifyOnChanges() {\n        this.changes.emit(this);\n    }\n    /** internal */\n    setDirty() {\n        this.dirty = true;\n    }\n    /** internal */\n    destroy() {\n        this.changes.complete();\n        this.changes.unsubscribe();\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$7 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\nconst unusedValueExportToPlacateAjd$8 = 1;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst unusedValueToPlacateAjd$2 = unusedValueExportToPlacateAjd$7 + unusedValueExportToPlacateAjd$3 + unusedValueExportToPlacateAjd$4 + unusedValueExportToPlacateAjd$8;\nclass LQuery_ {\n    constructor(queryList) {\n        this.queryList = queryList;\n        this.matches = null;\n    }\n    clone() {\n        return new LQuery_(this.queryList);\n    }\n    setDirty() {\n        this.queryList.setDirty();\n    }\n}\nclass LQueries_ {\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    createEmbeddedView(tView) {\n        const tQueries = tView.queries;\n        if (tQueries !== null) {\n            const noOfInheritedQueries = tView.contentQueries !== null ? tView.contentQueries[0] : tQueries.length;\n            const viewLQueries = [];\n            // An embedded view has queries propagated from a declaration view at the beginning of the\n            // TQueries collection and up until a first content query declared in the embedded view. Only\n            // propagated LQueries are created at this point (LQuery corresponding to declared content\n            // queries will be instantiated from the content query instructions for each directive).\n            for (let i = 0; i < noOfInheritedQueries; i++) {\n                const tQuery = tQueries.getByIndex(i);\n                const parentLQuery = this.queries[tQuery.indexInDeclarationView];\n                viewLQueries.push(parentLQuery.clone());\n            }\n            return new LQueries_(viewLQueries);\n        }\n        return null;\n    }\n    insertView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    detachView(tView) {\n        this.dirtyQueriesWithMatches(tView);\n    }\n    dirtyQueriesWithMatches(tView) {\n        for (let i = 0; i < this.queries.length; i++) {\n            if (getTQuery(tView, i).matches !== null) {\n                this.queries[i].setDirty();\n            }\n        }\n    }\n}\nclass TQueryMetadata_ {\n    constructor(predicate, descendants, isStatic, read = null) {\n        this.predicate = predicate;\n        this.descendants = descendants;\n        this.isStatic = isStatic;\n        this.read = read;\n    }\n}\nclass TQueries_ {\n    constructor(queries = []) {\n        this.queries = queries;\n    }\n    elementStart(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementStart(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].elementEnd(tNode);\n        }\n    }\n    embeddedTView(tNode) {\n        let queriesForTemplateRef = null;\n        for (let i = 0; i < this.length; i++) {\n            const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;\n            const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);\n            if (tqueryClone) {\n                tqueryClone.indexInDeclarationView = i;\n                if (queriesForTemplateRef !== null) {\n                    queriesForTemplateRef.push(tqueryClone);\n                }\n                else {\n                    queriesForTemplateRef = [tqueryClone];\n                }\n            }\n        }\n        return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;\n    }\n    template(tView, tNode) {\n        ngDevMode &&\n            assertFirstCreatePass(tView, 'Queries should collect results on the first template pass only');\n        for (let i = 0; i < this.queries.length; i++) {\n            this.queries[i].template(tView, tNode);\n        }\n    }\n    getByIndex(index) {\n        ngDevMode && assertIndexInRange(this.queries, index);\n        return this.queries[index];\n    }\n    get length() {\n        return this.queries.length;\n    }\n    track(tquery) {\n        this.queries.push(tquery);\n    }\n}\nclass TQuery_ {\n    constructor(metadata, nodeIndex = -1) {\n        this.metadata = metadata;\n        this.matches = null;\n        this.indexInDeclarationView = -1;\n        this.crossesNgTemplate = false;\n        /**\n         * A flag indicating if a given query still applies to nodes it is crossing. We use this flag\n         * (alongside with _declarationNodeIndex) to know when to stop applying content queries to\n         * elements in a template.\n         */\n        this._appliesToNextNode = true;\n        this._declarationNodeIndex = nodeIndex;\n    }\n    elementStart(tView, tNode) {\n        if (this.isApplyingToNode(tNode)) {\n            this.matchTNode(tView, tNode);\n        }\n    }\n    elementEnd(tNode) {\n        if (this._declarationNodeIndex === tNode.index) {\n            this._appliesToNextNode = false;\n        }\n    }\n    template(tView, tNode) {\n        this.elementStart(tView, tNode);\n    }\n    embeddedTView(tNode, childQueryIndex) {\n        if (this.isApplyingToNode(tNode)) {\n            this.crossesNgTemplate = true;\n            // A marker indicating a `<ng-template>` element (a placeholder for query results from\n            // embedded views created based on this `<ng-template>`).\n            this.addMatch(-tNode.index, childQueryIndex);\n            return new TQuery_(this.metadata);\n        }\n        return null;\n    }\n    isApplyingToNode(tNode) {\n        if (this._appliesToNextNode && this.metadata.descendants === false) {\n            const declarationNodeIdx = this._declarationNodeIndex;\n            let parent = tNode.parent;\n            // Determine if a given TNode is a \"direct\" child of a node on which a content query was\n            // declared (only direct children of query's host node can match with the descendants: false\n            // option). There are 3 main use-case / conditions to consider here:\n            // - <needs-target><i #target></i></needs-target>: here <i #target> parent node is a query\n            // host node;\n            // - <needs-target><ng-template [ngIf]=\"true\"><i #target></i></ng-template></needs-target>:\n            // here <i #target> parent node is null;\n            // - <needs-target><ng-container><i #target></i></ng-container></needs-target>: here we need\n            // to go past `<ng-container>` to determine <i #target> parent node (but we shouldn't traverse\n            // up past the query's host node!).\n            while (parent !== null && parent.type === 4 /* ElementContainer */ &&\n                parent.index !== declarationNodeIdx) {\n                parent = parent.parent;\n            }\n            return declarationNodeIdx === (parent !== null ? parent.index : -1);\n        }\n        return this._appliesToNextNode;\n    }\n    matchTNode(tView, tNode) {\n        const predicate = this.metadata.predicate;\n        if (Array.isArray(predicate)) {\n            for (let i = 0; i < predicate.length; i++) {\n                const name = predicate[i];\n                this.matchTNodeWithReadOption(tView, tNode, getIdxOfMatchingSelector(tNode, name));\n                // Also try matching the name to a provider since strings can be used as DI tokens too.\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, name, false, false));\n            }\n        }\n        else {\n            if (predicate === TemplateRef) {\n                if (tNode.type === 0 /* Container */) {\n                    this.matchTNodeWithReadOption(tView, tNode, -1);\n                }\n            }\n            else {\n                this.matchTNodeWithReadOption(tView, tNode, locateDirectiveOrProvider(tNode, tView, predicate, false, false));\n            }\n        }\n    }\n    matchTNodeWithReadOption(tView, tNode, nodeMatchIdx) {\n        if (nodeMatchIdx !== null) {\n            const read = this.metadata.read;\n            if (read !== null) {\n                if (read === ElementRef || read === ViewContainerRef ||\n                    read === TemplateRef && tNode.type === 0 /* Container */) {\n                    this.addMatch(tNode.index, -2);\n                }\n                else {\n                    const directiveOrProviderIdx = locateDirectiveOrProvider(tNode, tView, read, false, false);\n                    if (directiveOrProviderIdx !== null) {\n                        this.addMatch(tNode.index, directiveOrProviderIdx);\n                    }\n                }\n            }\n            else {\n                this.addMatch(tNode.index, nodeMatchIdx);\n            }\n        }\n    }\n    addMatch(tNodeIdx, matchIdx) {\n        if (this.matches === null) {\n            this.matches = [tNodeIdx, matchIdx];\n        }\n        else {\n            this.matches.push(tNodeIdx, matchIdx);\n        }\n    }\n}\n/**\n * Iterates over local names for a given node and returns directive index\n * (or -1 if a local name points to an element).\n *\n * @param tNode static data of a node to check\n * @param selector selector to match\n * @returns directive index, -1 or null if a selector didn't match any of the local names\n */\nfunction getIdxOfMatchingSelector(tNode, selector) {\n    const localNames = tNode.localNames;\n    if (localNames !== null) {\n        for (let i = 0; i < localNames.length; i += 2) {\n            if (localNames[i] === selector) {\n                return localNames[i + 1];\n            }\n        }\n    }\n    return null;\n}\nfunction createResultByTNodeType(tNode, currentView) {\n    if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {\n        return createElementRef(ElementRef, tNode, currentView);\n    }\n    else if (tNode.type === 0 /* Container */) {\n        return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n    }\n    return null;\n}\nfunction createResultForNode(lView, tNode, matchingIdx, read) {\n    if (matchingIdx === -1) {\n        // if read token and / or strategy is not specified, detect it using appropriate tNode type\n        return createResultByTNodeType(tNode, lView);\n    }\n    else if (matchingIdx === -2) {\n        // read a special token from a node injector\n        return createSpecialToken(lView, tNode, read);\n    }\n    else {\n        // read a token\n        return getNodeInjectable(lView, lView[TVIEW], matchingIdx, tNode);\n    }\n}\nfunction createSpecialToken(lView, tNode, read) {\n    if (read === ElementRef) {\n        return createElementRef(ElementRef, tNode, lView);\n    }\n    else if (read === TemplateRef) {\n        return createTemplateRef(TemplateRef, ElementRef, tNode, lView);\n    }\n    else if (read === ViewContainerRef) {\n        ngDevMode &&\n            assertNodeOfPossibleTypes(tNode, [3 /* Element */, 0 /* Container */, 4 /* ElementContainer */]);\n        return createContainerRef(ViewContainerRef, ElementRef, tNode, lView);\n    }\n    else {\n        ngDevMode &&\n            throwError(`Special token to read should be one of ElementRef, TemplateRef or ViewContainerRef but got ${stringify(read)}.`);\n    }\n}\n/**\n * A helper function that creates query results for a given view. This function is meant to do the\n * processing once and only once for a given view instance (a set of results for a given view\n * doesn't change).\n */\nfunction materializeViewResults(tView, lView, tQuery, queryIndex) {\n    const lQuery = lView[QUERIES].queries[queryIndex];\n    if (lQuery.matches === null) {\n        const tViewData = tView.data;\n        const tQueryMatches = tQuery.matches;\n        const result = [];\n        for (let i = 0; i < tQueryMatches.length; i += 2) {\n            const matchedNodeIdx = tQueryMatches[i];\n            if (matchedNodeIdx < 0) {\n                // we at the <ng-template> marker which might have results in views created based on this\n                // <ng-template> - those results will be in separate views though, so here we just leave\n                // null as a placeholder\n                result.push(null);\n            }\n            else {\n                ngDevMode && assertIndexInRange(tViewData, matchedNodeIdx);\n                const tNode = tViewData[matchedNodeIdx];\n                result.push(createResultForNode(lView, tNode, tQueryMatches[i + 1], tQuery.metadata.read));\n            }\n        }\n        lQuery.matches = result;\n    }\n    return lQuery.matches;\n}\n/**\n * A helper function that collects (already materialized) query results from a tree of views,\n * starting with a provided LView.\n */\nfunction collectQueryResults(tView, lView, queryIndex, result) {\n    const tQuery = tView.queries.getByIndex(queryIndex);\n    const tQueryMatches = tQuery.matches;\n    if (tQueryMatches !== null) {\n        const lViewResults = materializeViewResults(tView, lView, tQuery, queryIndex);\n        for (let i = 0; i < tQueryMatches.length; i += 2) {\n            const tNodeIdx = tQueryMatches[i];\n            if (tNodeIdx > 0) {\n                result.push(lViewResults[i / 2]);\n            }\n            else {\n                const childQueryIndex = tQueryMatches[i + 1];\n                const declarationLContainer = lView[-tNodeIdx];\n                ngDevMode && assertLContainer(declarationLContainer);\n                // collect matches for views inserted in this container\n                for (let i = CONTAINER_HEADER_OFFSET; i < declarationLContainer.length; i++) {\n                    const embeddedLView = declarationLContainer[i];\n                    if (embeddedLView[DECLARATION_LCONTAINER] === embeddedLView[PARENT]) {\n                        collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n                    }\n                }\n                // collect matches for views created from this declaration container and inserted into\n                // different containers\n                if (declarationLContainer[MOVED_VIEWS] !== null) {\n                    const embeddedLViews = declarationLContainer[MOVED_VIEWS];\n                    for (let i = 0; i < embeddedLViews.length; i++) {\n                        const embeddedLView = embeddedLViews[i];\n                        collectQueryResults(embeddedLView[TVIEW], embeddedLView, childQueryIndex, result);\n                    }\n                }\n            }\n        }\n    }\n    return result;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n *\n * @returns `true` if a query got dirty during change detection or if this is a static query\n * resolving in creation mode, `false` otherwise.\n *\n * @codeGenApi\n */\nfunction ɵɵqueryRefresh(queryList) {\n    const lView = getLView();\n    const tView = getTView();\n    const queryIndex = getCurrentQueryIndex();\n    setCurrentQueryIndex(queryIndex + 1);\n    const tQuery = getTQuery(tView, queryIndex);\n    if (queryList.dirty && (isCreationMode(lView) === tQuery.metadata.isStatic)) {\n        if (tQuery.matches === null) {\n            queryList.reset([]);\n        }\n        else {\n            const result = tQuery.crossesNgTemplate ?\n                collectQueryResults(tView, lView, queryIndex, []) :\n                materializeViewResults(tView, lView, tQuery, queryIndex);\n            queryList.reset(result);\n            queryList.notifyOnChanges();\n        }\n        return true;\n    }\n    return false;\n}\n/**\n * Creates new QueryList for a static view query.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵstaticViewQuery(predicate, descend, read) {\n    viewQueryInternal(getTView(), getLView(), predicate, descend, read, true);\n}\n/**\n * Creates new QueryList, stores the reference in LView and returns QueryList.\n *\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n *\n * @codeGenApi\n */\nfunction ɵɵviewQuery(predicate, descend, read) {\n    viewQueryInternal(getTView(), getLView(), predicate, descend, read, false);\n}\nfunction viewQueryInternal(tView, lView, predicate, descend, read, isStatic) {\n    if (tView.firstCreatePass) {\n        createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), -1);\n        if (isStatic) {\n            tView.staticViewQueries = true;\n        }\n    }\n    createLQuery(tView, lView);\n}\n/**\n * Registers a QueryList, associated with a content query, for later refresh (part of a view\n * refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵcontentQuery(directiveIndex, predicate, descend, read) {\n    contentQueryInternal(getTView(), getLView(), predicate, descend, read, false, getPreviousOrParentTNode(), directiveIndex);\n}\n/**\n * Registers a QueryList, associated with a static content query, for later refresh\n * (part of a view refresh).\n *\n * @param directiveIndex Current directive index\n * @param predicate The type for which the query will search\n * @param descend Whether or not to descend into children\n * @param read What to save in the query\n * @returns QueryList<T>\n *\n * @codeGenApi\n */\nfunction ɵɵstaticContentQuery(directiveIndex, predicate, descend, read) {\n    contentQueryInternal(getTView(), getLView(), predicate, descend, read, true, getPreviousOrParentTNode(), directiveIndex);\n}\nfunction contentQueryInternal(tView, lView, predicate, descend, read, isStatic, tNode, directiveIndex) {\n    if (tView.firstCreatePass) {\n        createTQuery(tView, new TQueryMetadata_(predicate, descend, isStatic, read), tNode.index);\n        saveContentQueryAndDirectiveIndex(tView, directiveIndex);\n        if (isStatic) {\n            tView.staticContentQueries = true;\n        }\n    }\n    createLQuery(tView, lView);\n}\n/**\n * Loads a QueryList corresponding to the current view or content query.\n *\n * @codeGenApi\n */\nfunction ɵɵloadQuery() {\n    return loadQueryInternal(getLView(), getCurrentQueryIndex());\n}\nfunction loadQueryInternal(lView, queryIndex) {\n    ngDevMode &&\n        assertDefined(lView[QUERIES], 'LQueries should be defined when trying to load a query');\n    ngDevMode && assertIndexInRange(lView[QUERIES].queries, queryIndex);\n    return lView[QUERIES].queries[queryIndex].queryList;\n}\nfunction createLQuery(tView, lView) {\n    const queryList = new QueryList();\n    storeCleanupWithContext(tView, lView, queryList, queryList.destroy);\n    if (lView[QUERIES] === null)\n        lView[QUERIES] = new LQueries_();\n    lView[QUERIES].queries.push(new LQuery_(queryList));\n}\nfunction createTQuery(tView, metadata, nodeIndex) {\n    if (tView.queries === null)\n        tView.queries = new TQueries_();\n    tView.queries.track(new TQuery_(metadata, nodeIndex));\n}\nfunction saveContentQueryAndDirectiveIndex(tView, directiveIndex) {\n    const tViewContentQueries = tView.contentQueries || (tView.contentQueries = []);\n    const lastSavedDirectiveIndex = tView.contentQueries.length ? tViewContentQueries[tViewContentQueries.length - 1] : -1;\n    if (directiveIndex !== lastSavedDirectiveIndex) {\n        tViewContentQueries.push(tView.queries.length - 1, directiveIndex);\n    }\n}\nfunction getTQuery(tView, index) {\n    ngDevMode && assertDefined(tView.queries, 'TQueries must be defined to retrieve a TQuery');\n    return tView.queries.getByIndex(index);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Retrieves `TemplateRef` instance from `Injector` when a local reference is placed on the\n * `<ng-template>` element.\n *\n * @codeGenApi\n */\nfunction ɵɵtemplateRefExtractor(tNode, currentView) {\n    return createTemplateRef(TemplateRef, ElementRef, tNode, currentView);\n}\n/**\n * Returns the appropriate `ChangeDetectorRef` for a pipe.\n *\n * @codeGenApi\n */\nfunction ɵɵinjectPipeChangeDetectorRef(flags = InjectFlags.Default) {\n    const value = injectChangeDetectorRef(true);\n    if (value == null && !(flags & InjectFlags.Optional)) {\n        throw new Error(`No provider for ChangeDetectorRef!`);\n    }\n    else {\n        return value;\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$d = () => ({\n    'ɵɵattribute': ɵɵattribute,\n    'ɵɵattributeInterpolate1': ɵɵattributeInterpolate1,\n    'ɵɵattributeInterpolate2': ɵɵattributeInterpolate2,\n    'ɵɵattributeInterpolate3': ɵɵattributeInterpolate3,\n    'ɵɵattributeInterpolate4': ɵɵattributeInterpolate4,\n    'ɵɵattributeInterpolate5': ɵɵattributeInterpolate5,\n    'ɵɵattributeInterpolate6': ɵɵattributeInterpolate6,\n    'ɵɵattributeInterpolate7': ɵɵattributeInterpolate7,\n    'ɵɵattributeInterpolate8': ɵɵattributeInterpolate8,\n    'ɵɵattributeInterpolateV': ɵɵattributeInterpolateV,\n    'ɵɵdefineComponent': ɵɵdefineComponent,\n    'ɵɵdefineDirective': ɵɵdefineDirective,\n    'ɵɵdefineInjectable': ɵɵdefineInjectable,\n    'ɵɵdefineInjector': ɵɵdefineInjector,\n    'ɵɵdefineNgModule': ɵɵdefineNgModule,\n    'ɵɵdefinePipe': ɵɵdefinePipe,\n    'ɵɵdirectiveInject': ɵɵdirectiveInject,\n    'ɵɵgetFactoryOf': ɵɵgetFactoryOf,\n    'ɵɵgetInheritedFactory': ɵɵgetInheritedFactory,\n    'ɵɵinject': ɵɵinject,\n    'ɵɵinjectAttribute': ɵɵinjectAttribute,\n    'ɵɵinvalidFactory': ɵɵinvalidFactory,\n    'ɵɵinvalidFactoryDep': ɵɵinvalidFactoryDep,\n    'ɵɵinjectPipeChangeDetectorRef': ɵɵinjectPipeChangeDetectorRef,\n    'ɵɵtemplateRefExtractor': ɵɵtemplateRefExtractor,\n    'ɵɵNgOnChangesFeature': ɵɵNgOnChangesFeature,\n    'ɵɵProvidersFeature': ɵɵProvidersFeature,\n    'ɵɵCopyDefinitionFeature': ɵɵCopyDefinitionFeature,\n    'ɵɵInheritDefinitionFeature': ɵɵInheritDefinitionFeature,\n    'ɵɵnextContext': ɵɵnextContext,\n    'ɵɵnamespaceHTML': ɵɵnamespaceHTML,\n    'ɵɵnamespaceMathML': ɵɵnamespaceMathML,\n    'ɵɵnamespaceSVG': ɵɵnamespaceSVG,\n    'ɵɵenableBindings': ɵɵenableBindings,\n    'ɵɵdisableBindings': ɵɵdisableBindings,\n    'ɵɵelementStart': ɵɵelementStart,\n    'ɵɵelementEnd': ɵɵelementEnd,\n    'ɵɵelement': ɵɵelement,\n    'ɵɵelementContainerStart': ɵɵelementContainerStart,\n    'ɵɵelementContainerEnd': ɵɵelementContainerEnd,\n    'ɵɵelementContainer': ɵɵelementContainer,\n    'ɵɵpureFunction0': ɵɵpureFunction0,\n    'ɵɵpureFunction1': ɵɵpureFunction1,\n    'ɵɵpureFunction2': ɵɵpureFunction2,\n    'ɵɵpureFunction3': ɵɵpureFunction3,\n    'ɵɵpureFunction4': ɵɵpureFunction4,\n    'ɵɵpureFunction5': ɵɵpureFunction5,\n    'ɵɵpureFunction6': ɵɵpureFunction6,\n    'ɵɵpureFunction7': ɵɵpureFunction7,\n    'ɵɵpureFunction8': ɵɵpureFunction8,\n    'ɵɵpureFunctionV': ɵɵpureFunctionV,\n    'ɵɵgetCurrentView': ɵɵgetCurrentView,\n    'ɵɵrestoreView': ɵɵrestoreView,\n    'ɵɵlistener': ɵɵlistener,\n    'ɵɵprojection': ɵɵprojection,\n    'ɵɵsyntheticHostProperty': ɵɵsyntheticHostProperty,\n    'ɵɵsyntheticHostListener': ɵɵsyntheticHostListener,\n    'ɵɵpipeBind1': ɵɵpipeBind1,\n    'ɵɵpipeBind2': ɵɵpipeBind2,\n    'ɵɵpipeBind3': ɵɵpipeBind3,\n    'ɵɵpipeBind4': ɵɵpipeBind4,\n    'ɵɵpipeBindV': ɵɵpipeBindV,\n    'ɵɵprojectionDef': ɵɵprojectionDef,\n    'ɵɵhostProperty': ɵɵhostProperty,\n    'ɵɵproperty': ɵɵproperty,\n    'ɵɵpropertyInterpolate': ɵɵpropertyInterpolate,\n    'ɵɵpropertyInterpolate1': ɵɵpropertyInterpolate1,\n    'ɵɵpropertyInterpolate2': ɵɵpropertyInterpolate2,\n    'ɵɵpropertyInterpolate3': ɵɵpropertyInterpolate3,\n    'ɵɵpropertyInterpolate4': ɵɵpropertyInterpolate4,\n    'ɵɵpropertyInterpolate5': ɵɵpropertyInterpolate5,\n    'ɵɵpropertyInterpolate6': ɵɵpropertyInterpolate6,\n    'ɵɵpropertyInterpolate7': ɵɵpropertyInterpolate7,\n    'ɵɵpropertyInterpolate8': ɵɵpropertyInterpolate8,\n    'ɵɵpropertyInterpolateV': ɵɵpropertyInterpolateV,\n    'ɵɵpipe': ɵɵpipe,\n    'ɵɵqueryRefresh': ɵɵqueryRefresh,\n    'ɵɵviewQuery': ɵɵviewQuery,\n    'ɵɵstaticViewQuery': ɵɵstaticViewQuery,\n    'ɵɵstaticContentQuery': ɵɵstaticContentQuery,\n    'ɵɵloadQuery': ɵɵloadQuery,\n    'ɵɵcontentQuery': ɵɵcontentQuery,\n    'ɵɵreference': ɵɵreference,\n    'ɵɵclassMap': ɵɵclassMap,\n    'ɵɵclassMapInterpolate1': ɵɵclassMapInterpolate1,\n    'ɵɵclassMapInterpolate2': ɵɵclassMapInterpolate2,\n    'ɵɵclassMapInterpolate3': ɵɵclassMapInterpolate3,\n    'ɵɵclassMapInterpolate4': ɵɵclassMapInterpolate4,\n    'ɵɵclassMapInterpolate5': ɵɵclassMapInterpolate5,\n    'ɵɵclassMapInterpolate6': ɵɵclassMapInterpolate6,\n    'ɵɵclassMapInterpolate7': ɵɵclassMapInterpolate7,\n    'ɵɵclassMapInterpolate8': ɵɵclassMapInterpolate8,\n    'ɵɵclassMapInterpolateV': ɵɵclassMapInterpolateV,\n    'ɵɵstyleMap': ɵɵstyleMap,\n    'ɵɵstyleMapInterpolate1': ɵɵstyleMapInterpolate1,\n    'ɵɵstyleMapInterpolate2': ɵɵstyleMapInterpolate2,\n    'ɵɵstyleMapInterpolate3': ɵɵstyleMapInterpolate3,\n    'ɵɵstyleMapInterpolate4': ɵɵstyleMapInterpolate4,\n    'ɵɵstyleMapInterpolate5': ɵɵstyleMapInterpolate5,\n    'ɵɵstyleMapInterpolate6': ɵɵstyleMapInterpolate6,\n    'ɵɵstyleMapInterpolate7': ɵɵstyleMapInterpolate7,\n    'ɵɵstyleMapInterpolate8': ɵɵstyleMapInterpolate8,\n    'ɵɵstyleMapInterpolateV': ɵɵstyleMapInterpolateV,\n    'ɵɵstyleProp': ɵɵstyleProp,\n    'ɵɵstylePropInterpolate1': ɵɵstylePropInterpolate1,\n    'ɵɵstylePropInterpolate2': ɵɵstylePropInterpolate2,\n    'ɵɵstylePropInterpolate3': ɵɵstylePropInterpolate3,\n    'ɵɵstylePropInterpolate4': ɵɵstylePropInterpolate4,\n    'ɵɵstylePropInterpolate5': ɵɵstylePropInterpolate5,\n    'ɵɵstylePropInterpolate6': ɵɵstylePropInterpolate6,\n    'ɵɵstylePropInterpolate7': ɵɵstylePropInterpolate7,\n    'ɵɵstylePropInterpolate8': ɵɵstylePropInterpolate8,\n    'ɵɵstylePropInterpolateV': ɵɵstylePropInterpolateV,\n    'ɵɵclassProp': ɵɵclassProp,\n    'ɵɵadvance': ɵɵadvance,\n    'ɵɵtemplate': ɵɵtemplate,\n    'ɵɵtext': ɵɵtext,\n    'ɵɵtextInterpolate': ɵɵtextInterpolate,\n    'ɵɵtextInterpolate1': ɵɵtextInterpolate1,\n    'ɵɵtextInterpolate2': ɵɵtextInterpolate2,\n    'ɵɵtextInterpolate3': ɵɵtextInterpolate3,\n    'ɵɵtextInterpolate4': ɵɵtextInterpolate4,\n    'ɵɵtextInterpolate5': ɵɵtextInterpolate5,\n    'ɵɵtextInterpolate6': ɵɵtextInterpolate6,\n    'ɵɵtextInterpolate7': ɵɵtextInterpolate7,\n    'ɵɵtextInterpolate8': ɵɵtextInterpolate8,\n    'ɵɵtextInterpolateV': ɵɵtextInterpolateV,\n    'ɵɵi18n': ɵɵi18n,\n    'ɵɵi18nAttributes': ɵɵi18nAttributes,\n    'ɵɵi18nExp': ɵɵi18nExp,\n    'ɵɵi18nStart': ɵɵi18nStart,\n    'ɵɵi18nEnd': ɵɵi18nEnd,\n    'ɵɵi18nApply': ɵɵi18nApply,\n    'ɵɵi18nPostprocess': ɵɵi18nPostprocess,\n    'ɵɵresolveWindow': ɵɵresolveWindow,\n    'ɵɵresolveDocument': ɵɵresolveDocument,\n    'ɵɵresolveBody': ɵɵresolveBody,\n    'ɵɵsetComponentScope': ɵɵsetComponentScope,\n    'ɵɵsetNgModuleScope': ɵɵsetNgModuleScope,\n    'ɵɵsanitizeHtml': ɵɵsanitizeHtml,\n    'ɵɵsanitizeStyle': ɵɵsanitizeStyle,\n    'ɵɵsanitizeResourceUrl': ɵɵsanitizeResourceUrl,\n    'ɵɵsanitizeScript': ɵɵsanitizeScript,\n    'ɵɵsanitizeUrl': ɵɵsanitizeUrl,\n    'ɵɵsanitizeUrlOrResourceUrl': ɵɵsanitizeUrlOrResourceUrl,\n});\n/**\n * A mapping of the @angular/core API surface used in generated expressions to the actual symbols.\n *\n * This should be kept up to date with the public exports of @angular/core.\n */\nconst angularCoreEnv = (ɵ0$d)();\n\nlet jitOptions = null;\nfunction setJitOptions(options) {\n    if (jitOptions !== null) {\n        if (options.defaultEncapsulation !== jitOptions.defaultEncapsulation) {\n            ngDevMode &&\n                console.error('Provided value for `defaultEncapsulation` can not be changed once it has been set.');\n            return;\n        }\n        if (options.preserveWhitespaces !== jitOptions.preserveWhitespaces) {\n            ngDevMode &&\n                console.error('Provided value for `preserveWhitespaces` can not be changed once it has been set.');\n            return;\n        }\n    }\n    jitOptions = options;\n}\nfunction getJitOptions() {\n    return jitOptions;\n}\nfunction resetJitOptions() {\n    jitOptions = null;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst EMPTY_ARRAY$5 = [];\nconst moduleQueue = [];\n/**\n * Enqueues moduleDef to be checked later to see if scope can be set on its\n * component declarations.\n */\nfunction enqueueModuleForDelayedScoping(moduleType, ngModule) {\n    moduleQueue.push({ moduleType, ngModule });\n}\nlet flushingModuleQueue = false;\n/**\n * Loops over queued module definitions, if a given module definition has all of its\n * declarations resolved, it dequeues that module definition and sets the scope on\n * its declarations.\n */\nfunction flushModuleScopingQueueAsMuchAsPossible() {\n    if (!flushingModuleQueue) {\n        flushingModuleQueue = true;\n        try {\n            for (let i = moduleQueue.length - 1; i >= 0; i--) {\n                const { moduleType, ngModule } = moduleQueue[i];\n                if (ngModule.declarations && ngModule.declarations.every(isResolvedDeclaration)) {\n                    // dequeue\n                    moduleQueue.splice(i, 1);\n                    setScopeOnDeclaredComponents(moduleType, ngModule);\n                }\n            }\n        }\n        finally {\n            flushingModuleQueue = false;\n        }\n    }\n}\n/**\n * Returns truthy if a declaration has resolved. If the declaration happens to be\n * an array of declarations, it will recurse to check each declaration in that array\n * (which may also be arrays).\n */\nfunction isResolvedDeclaration(declaration) {\n    if (Array.isArray(declaration)) {\n        return declaration.every(isResolvedDeclaration);\n    }\n    return !!resolveForwardRef(declaration);\n}\n/**\n * Compiles a module in JIT mode.\n *\n * This function automatically gets called when a class has a `@NgModule` decorator.\n */\nfunction compileNgModule(moduleType, ngModule = {}) {\n    compileNgModuleDefs(moduleType, ngModule);\n    // Because we don't know if all declarations have resolved yet at the moment the\n    // NgModule decorator is executing, we're enqueueing the setting of module scope\n    // on its declarations to be run at a later time when all declarations for the module,\n    // including forward refs, have resolved.\n    enqueueModuleForDelayedScoping(moduleType, ngModule);\n}\n/**\n * Compiles and adds the `ɵmod` and `ɵinj` properties to the module class.\n *\n * It's possible to compile a module via this API which will allow duplicate declarations in its\n * root.\n */\nfunction compileNgModuleDefs(moduleType, ngModule, allowDuplicateDeclarationsInRoot = false) {\n    ngDevMode && assertDefined(moduleType, 'Required value moduleType');\n    ngDevMode && assertDefined(ngModule, 'Required value ngModule');\n    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);\n    let ngModuleDef = null;\n    Object.defineProperty(moduleType, NG_MOD_DEF, {\n        configurable: true,\n        get: () => {\n            if (ngModuleDef === null) {\n                if (ngDevMode && ngModule.imports && ngModule.imports.indexOf(moduleType) > -1) {\n                    // We need to assert this immediately, because allowing it to continue will cause it to\n                    // go into an infinite loop before we've reached the point where we throw all the errors.\n                    throw new Error(`'${stringifyForError(moduleType)}' module can't import itself`);\n                }\n                ngModuleDef = getCompilerFacade().compileNgModule(angularCoreEnv, `ng:///${moduleType.name}/ɵmod.js`, {\n                    type: moduleType,\n                    bootstrap: flatten(ngModule.bootstrap || EMPTY_ARRAY$5).map(resolveForwardRef),\n                    declarations: declarations.map(resolveForwardRef),\n                    imports: flatten(ngModule.imports || EMPTY_ARRAY$5)\n                        .map(resolveForwardRef)\n                        .map(expandModuleWithProviders),\n                    exports: flatten(ngModule.exports || EMPTY_ARRAY$5)\n                        .map(resolveForwardRef)\n                        .map(expandModuleWithProviders),\n                    schemas: ngModule.schemas ? flatten(ngModule.schemas) : null,\n                    id: ngModule.id || null,\n                });\n                // Set `schemas` on ngModuleDef to an empty array in JIT mode to indicate that runtime\n                // should verify that there are no unknown elements in a template. In AOT mode, that check\n                // happens at compile time and `schemas` information is not present on Component and Module\n                // defs after compilation (so the check doesn't happen the second time at runtime).\n                if (!ngModuleDef.schemas) {\n                    ngModuleDef.schemas = [];\n                }\n            }\n            return ngModuleDef;\n        }\n    });\n    let ngInjectorDef = null;\n    Object.defineProperty(moduleType, NG_INJ_DEF, {\n        get: () => {\n            if (ngInjectorDef === null) {\n                ngDevMode &&\n                    verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot);\n                const meta = {\n                    name: moduleType.name,\n                    type: moduleType,\n                    deps: reflectDependencies(moduleType),\n                    providers: ngModule.providers || EMPTY_ARRAY$5,\n                    imports: [\n                        (ngModule.imports || EMPTY_ARRAY$5).map(resolveForwardRef),\n                        (ngModule.exports || EMPTY_ARRAY$5).map(resolveForwardRef),\n                    ],\n                };\n                ngInjectorDef = getCompilerFacade().compileInjector(angularCoreEnv, `ng:///${moduleType.name}/ɵinj.js`, meta);\n            }\n            return ngInjectorDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction verifySemanticsOfNgModuleDef(moduleType, allowDuplicateDeclarationsInRoot, importingModule) {\n    if (verifiedNgModule.get(moduleType))\n        return;\n    verifiedNgModule.set(moduleType, true);\n    moduleType = resolveForwardRef(moduleType);\n    let ngModuleDef;\n    if (importingModule) {\n        ngModuleDef = getNgModuleDef(moduleType);\n        if (!ngModuleDef) {\n            throw new Error(`Unexpected value '${moduleType.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n    }\n    else {\n        ngModuleDef = getNgModuleDef(moduleType, true);\n    }\n    const errors = [];\n    const declarations = maybeUnwrapFn(ngModuleDef.declarations);\n    const imports = maybeUnwrapFn(ngModuleDef.imports);\n    flatten(imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n        verifySemanticsOfNgModuleImport(mod, moduleType);\n        verifySemanticsOfNgModuleDef(mod, false, moduleType);\n    });\n    const exports = maybeUnwrapFn(ngModuleDef.exports);\n    declarations.forEach(verifyDeclarationsHaveDefinitions);\n    declarations.forEach(verifyDirectivesHaveSelector);\n    const combinedDeclarations = [\n        ...declarations.map(resolveForwardRef),\n        ...flatten(imports.map(computeCombinedExports)).map(resolveForwardRef),\n    ];\n    exports.forEach(verifyExportsAreDeclaredOrReExported);\n    declarations.forEach(decl => verifyDeclarationIsUnique(decl, allowDuplicateDeclarationsInRoot));\n    declarations.forEach(verifyComponentEntryComponentsIsPartOfNgModule);\n    const ngModule = getAnnotation(moduleType, 'NgModule');\n    if (ngModule) {\n        ngModule.imports &&\n            flatten(ngModule.imports).map(unwrapModuleWithProvidersImports).forEach(mod => {\n                verifySemanticsOfNgModuleImport(mod, moduleType);\n                verifySemanticsOfNgModuleDef(mod, false, moduleType);\n            });\n        ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyCorrectBootstrapType);\n        ngModule.bootstrap && deepForEach(ngModule.bootstrap, verifyComponentIsPartOfNgModule);\n        ngModule.entryComponents &&\n            deepForEach(ngModule.entryComponents, verifyComponentIsPartOfNgModule);\n    }\n    // Throw Error if any errors were detected.\n    if (errors.length) {\n        throw new Error(errors.join('\\n'));\n    }\n    ////////////////////////////////////////////////////////////////////////////////////////////////\n    function verifyDeclarationsHaveDefinitions(type) {\n        type = resolveForwardRef(type);\n        const def = getComponentDef(type) || getDirectiveDef(type) || getPipeDef(type);\n        if (!def) {\n            errors.push(`Unexpected value '${stringifyForError(type)}' declared by the module '${stringifyForError(moduleType)}'. Please add a @Pipe/@Directive/@Component annotation.`);\n        }\n    }\n    function verifyDirectivesHaveSelector(type) {\n        type = resolveForwardRef(type);\n        const def = getDirectiveDef(type);\n        if (!getComponentDef(type) && def && def.selectors.length == 0) {\n            errors.push(`Directive ${stringifyForError(type)} has no selector, please add it!`);\n        }\n    }\n    function verifyExportsAreDeclaredOrReExported(type) {\n        type = resolveForwardRef(type);\n        const kind = getComponentDef(type) && 'component' || getDirectiveDef(type) && 'directive' ||\n            getPipeDef(type) && 'pipe';\n        if (kind) {\n            // only checked if we are declared as Component, Directive, or Pipe\n            // Modules don't need to be declared or imported.\n            if (combinedDeclarations.lastIndexOf(type) === -1) {\n                // We are exporting something which we don't explicitly declare or import.\n                errors.push(`Can't export ${kind} ${stringifyForError(type)} from ${stringifyForError(moduleType)} as it was neither declared nor imported!`);\n            }\n        }\n    }\n    function verifyDeclarationIsUnique(type, suppressErrors) {\n        type = resolveForwardRef(type);\n        const existingModule = ownerNgModule.get(type);\n        if (existingModule && existingModule !== moduleType) {\n            if (!suppressErrors) {\n                const modules = [existingModule, moduleType].map(stringifyForError).sort();\n                errors.push(`Type ${stringifyForError(type)} is part of the declarations of 2 modules: ${modules[0]} and ${modules[1]}! ` +\n                    `Please consider moving ${stringifyForError(type)} to a higher module that imports ${modules[0]} and ${modules[1]}. ` +\n                    `You can also create a new NgModule that exports and includes ${stringifyForError(type)} then import that NgModule in ${modules[0]} and ${modules[1]}.`);\n            }\n        }\n        else {\n            // Mark type as having owner.\n            ownerNgModule.set(type, moduleType);\n        }\n    }\n    function verifyComponentIsPartOfNgModule(type) {\n        type = resolveForwardRef(type);\n        const existingModule = ownerNgModule.get(type);\n        if (!existingModule) {\n            errors.push(`Component ${stringifyForError(type)} is not part of any NgModule or the module has not been imported into your module.`);\n        }\n    }\n    function verifyCorrectBootstrapType(type) {\n        type = resolveForwardRef(type);\n        if (!getComponentDef(type)) {\n            errors.push(`${stringifyForError(type)} cannot be used as an entry component.`);\n        }\n    }\n    function verifyComponentEntryComponentsIsPartOfNgModule(type) {\n        type = resolveForwardRef(type);\n        if (getComponentDef(type)) {\n            // We know we are component\n            const component = getAnnotation(type, 'Component');\n            if (component && component.entryComponents) {\n                deepForEach(component.entryComponents, verifyComponentIsPartOfNgModule);\n            }\n        }\n    }\n    function verifySemanticsOfNgModuleImport(type, importingModule) {\n        type = resolveForwardRef(type);\n        if (getComponentDef(type) || getDirectiveDef(type)) {\n            throw new Error(`Unexpected directive '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n        if (getPipeDef(type)) {\n            throw new Error(`Unexpected pipe '${type.name}' imported by the module '${importingModule.name}'. Please add an @NgModule annotation.`);\n        }\n    }\n}\nfunction unwrapModuleWithProvidersImports(typeOrWithProviders) {\n    typeOrWithProviders = resolveForwardRef(typeOrWithProviders);\n    return typeOrWithProviders.ngModule || typeOrWithProviders;\n}\nfunction getAnnotation(type, name) {\n    let annotation = null;\n    collect(type.__annotations__);\n    collect(type.decorators);\n    return annotation;\n    function collect(annotations) {\n        if (annotations) {\n            annotations.forEach(readAnnotation);\n        }\n    }\n    function readAnnotation(decorator) {\n        if (!annotation) {\n            const proto = Object.getPrototypeOf(decorator);\n            if (proto.ngMetadataName == name) {\n                annotation = decorator;\n            }\n            else if (decorator.type) {\n                const proto = Object.getPrototypeOf(decorator.type);\n                if (proto.ngMetadataName == name) {\n                    annotation = decorator.args[0];\n                }\n            }\n        }\n    }\n}\n/**\n * Keep track of compiled components. This is needed because in tests we often want to compile the\n * same component with more than one NgModule. This would cause an error unless we reset which\n * NgModule the component belongs to. We keep the list of compiled components here so that the\n * TestBed can reset it later.\n */\nlet ownerNgModule = new Map();\nlet verifiedNgModule = new Map();\nfunction resetCompiledComponents() {\n    ownerNgModule = new Map();\n    verifiedNgModule = new Map();\n    moduleQueue.length = 0;\n}\n/**\n * Computes the combined declarations of explicit declarations, as well as declarations inherited by\n * traversing the exports of imported modules.\n * @param type\n */\nfunction computeCombinedExports(type) {\n    type = resolveForwardRef(type);\n    const ngModuleDef = getNgModuleDef(type, true);\n    return [...flatten(maybeUnwrapFn(ngModuleDef.exports).map((type) => {\n            const ngModuleDef = getNgModuleDef(type);\n            if (ngModuleDef) {\n                verifySemanticsOfNgModuleDef(type, false);\n                return computeCombinedExports(type);\n            }\n            else {\n                return type;\n            }\n        }))];\n}\n/**\n * Some declared components may be compiled asynchronously, and thus may not have their\n * ɵcmp set yet. If this is the case, then a reference to the module is written into\n * the `ngSelectorScope` property of the declared type.\n */\nfunction setScopeOnDeclaredComponents(moduleType, ngModule) {\n    const declarations = flatten(ngModule.declarations || EMPTY_ARRAY$5);\n    const transitiveScopes = transitiveScopesFor(moduleType);\n    declarations.forEach(declaration => {\n        if (declaration.hasOwnProperty(NG_COMP_DEF)) {\n            // A `ɵcmp` field exists - go ahead and patch the component directly.\n            const component = declaration;\n            const componentDef = getComponentDef(component);\n            patchComponentDefWithScope(componentDef, transitiveScopes);\n        }\n        else if (!declaration.hasOwnProperty(NG_DIR_DEF) && !declaration.hasOwnProperty(NG_PIPE_DEF)) {\n            // Set `ngSelectorScope` for future reference when the component compilation finishes.\n            declaration.ngSelectorScope = moduleType;\n        }\n    });\n}\n/**\n * Patch the definition of a component with directives and pipes from the compilation scope of\n * a given module.\n */\nfunction patchComponentDefWithScope(componentDef, transitiveScopes) {\n    componentDef.directiveDefs = () => Array.from(transitiveScopes.compilation.directives)\n        .map(dir => dir.hasOwnProperty(NG_COMP_DEF) ? getComponentDef(dir) : getDirectiveDef(dir))\n        .filter(def => !!def);\n    componentDef.pipeDefs = () => Array.from(transitiveScopes.compilation.pipes).map(pipe => getPipeDef(pipe));\n    componentDef.schemas = transitiveScopes.schemas;\n    // Since we avoid Components/Directives/Pipes recompiling in case there are no overrides, we\n    // may face a problem where previously compiled defs available to a given Component/Directive\n    // are cached in TView and may become stale (in case any of these defs gets recompiled). In\n    // order to avoid this problem, we force fresh TView to be created.\n    componentDef.tView = null;\n}\n/**\n * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.\n *\n * This operation is memoized and the result is cached on the module's definition. This function can\n * be called on modules with components that have not fully compiled yet, but the result should not\n * be used until they have.\n *\n * @param moduleType module that transitive scope should be calculated for.\n */\nfunction transitiveScopesFor(moduleType) {\n    if (!isNgModule(moduleType)) {\n        throw new Error(`${moduleType.name} does not have a module def (ɵmod property)`);\n    }\n    const def = getNgModuleDef(moduleType);\n    if (def.transitiveCompileScopes !== null) {\n        return def.transitiveCompileScopes;\n    }\n    const scopes = {\n        schemas: def.schemas || null,\n        compilation: {\n            directives: new Set(),\n            pipes: new Set(),\n        },\n        exported: {\n            directives: new Set(),\n            pipes: new Set(),\n        },\n    };\n    maybeUnwrapFn(def.imports).forEach((imported) => {\n        const importedType = imported;\n        if (!isNgModule(importedType)) {\n            throw new Error(`Importing ${importedType.name} which does not have a ɵmod property`);\n        }\n        // When this module imports another, the imported module's exported directives and pipes are\n        // added to the compilation scope of this module.\n        const importedScope = transitiveScopesFor(importedType);\n        importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));\n        importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));\n    });\n    maybeUnwrapFn(def.declarations).forEach(declared => {\n        const declaredWithDefs = declared;\n        if (getPipeDef(declaredWithDefs)) {\n            scopes.compilation.pipes.add(declared);\n        }\n        else {\n            // Either declared has a ɵcmp or ɵdir, or it's a component which hasn't\n            // had its template compiled yet. In either case, it gets added to the compilation's\n            // directives.\n            scopes.compilation.directives.add(declared);\n        }\n    });\n    maybeUnwrapFn(def.exports).forEach((exported) => {\n        const exportedType = exported;\n        // Either the type is a module, a pipe, or a component/directive (which may not have a\n        // ɵcmp as it might be compiled asynchronously).\n        if (isNgModule(exportedType)) {\n            // When this module exports another, the exported module's exported directives and pipes are\n            // added to both the compilation and exported scopes of this module.\n            const exportedScope = transitiveScopesFor(exportedType);\n            exportedScope.exported.directives.forEach(entry => {\n                scopes.compilation.directives.add(entry);\n                scopes.exported.directives.add(entry);\n            });\n            exportedScope.exported.pipes.forEach(entry => {\n                scopes.compilation.pipes.add(entry);\n                scopes.exported.pipes.add(entry);\n            });\n        }\n        else if (getPipeDef(exportedType)) {\n            scopes.exported.pipes.add(exportedType);\n        }\n        else {\n            scopes.exported.directives.add(exportedType);\n        }\n    });\n    def.transitiveCompileScopes = scopes;\n    return scopes;\n}\nfunction expandModuleWithProviders(value) {\n    if (isModuleWithProviders(value)) {\n        return value.ngModule;\n    }\n    return value;\n}\nfunction isModuleWithProviders(value) {\n    return value.ngModule !== undefined;\n}\nfunction isNgModule(value) {\n    return !!getNgModuleDef(value);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Keep track of the compilation depth to avoid reentrancy issues during JIT compilation. This\n * matters in the following scenario:\n *\n * Consider a component 'A' that extends component 'B', both declared in module 'M'. During\n * the compilation of 'A' the definition of 'B' is requested to capture the inheritance chain,\n * potentially triggering compilation of 'B'. If this nested compilation were to trigger\n * `flushModuleScopingQueueAsMuchAsPossible` it may happen that module 'M' is still pending in the\n * queue, resulting in 'A' and 'B' to be patched with the NgModule scope. As the compilation of\n * 'A' is still in progress, this would introduce a circular dependency on its compilation. To avoid\n * this issue, the module scope queue is only flushed for compilations at the depth 0, to ensure\n * all compilations have finished.\n */\nlet compilationDepth = 0;\n/**\n * Compile an Angular component according to its decorator metadata, and patch the resulting\n * component def (ɵcmp) onto the component type.\n *\n * Compilation may be asynchronous (due to the need to resolve URLs for the component template or\n * other resources, for example). In the event that compilation is not immediate, `compileComponent`\n * will enqueue resource resolution into a global queue and will fail to return the `ɵcmp`\n * until the global queue has been resolved with a call to `resolveComponentResources`.\n */\nfunction compileComponent(type, metadata) {\n    // Initialize ngDevMode. This must be the first statement in compileComponent.\n    // See the `initNgDevMode` docstring for more information.\n    (typeof ngDevMode === 'undefined' || ngDevMode) && initNgDevMode();\n    let ngComponentDef = null;\n    // Metadata may have resources which need to be resolved.\n    maybeQueueResolutionOfComponentResources(type, metadata);\n    // Note that we're using the same function as `Directive`, because that's only subset of metadata\n    // that we need to create the ngFactoryDef. We're avoiding using the component metadata\n    // because we'd have to resolve the asynchronous templates.\n    addDirectiveFactoryDef(type, metadata);\n    Object.defineProperty(type, NG_COMP_DEF, {\n        get: () => {\n            if (ngComponentDef === null) {\n                const compiler = getCompilerFacade();\n                if (componentNeedsResolution(metadata)) {\n                    const error = [`Component '${type.name}' is not resolved:`];\n                    if (metadata.templateUrl) {\n                        error.push(` - templateUrl: ${metadata.templateUrl}`);\n                    }\n                    if (metadata.styleUrls && metadata.styleUrls.length) {\n                        error.push(` - styleUrls: ${JSON.stringify(metadata.styleUrls)}`);\n                    }\n                    error.push(`Did you run and wait for 'resolveComponentResources()'?`);\n                    throw new Error(error.join('\\n'));\n                }\n                // This const was called `jitOptions` previously but had to be renamed to `options` because\n                // of a bug with Terser that caused optimized JIT builds to throw a `ReferenceError`.\n                // This bug was investigated in https://github.com/angular/angular-cli/issues/17264.\n                // We should not rename it back until https://github.com/terser/terser/issues/615 is fixed.\n                const options = getJitOptions();\n                let preserveWhitespaces = metadata.preserveWhitespaces;\n                if (preserveWhitespaces === undefined) {\n                    if (options !== null && options.preserveWhitespaces !== undefined) {\n                        preserveWhitespaces = options.preserveWhitespaces;\n                    }\n                    else {\n                        preserveWhitespaces = false;\n                    }\n                }\n                let encapsulation = metadata.encapsulation;\n                if (encapsulation === undefined) {\n                    if (options !== null && options.defaultEncapsulation !== undefined) {\n                        encapsulation = options.defaultEncapsulation;\n                    }\n                    else {\n                        encapsulation = ViewEncapsulation$1.Emulated;\n                    }\n                }\n                const templateUrl = metadata.templateUrl || `ng:///${type.name}/template.html`;\n                const meta = Object.assign(Object.assign({}, directiveMetadata(type, metadata)), { typeSourceSpan: compiler.createParseSourceSpan('Component', type.name, templateUrl), template: metadata.template || '', preserveWhitespaces, styles: metadata.styles || EMPTY_ARRAY, animations: metadata.animations, directives: [], changeDetection: metadata.changeDetection, pipes: new Map(), encapsulation, interpolation: metadata.interpolation, viewProviders: metadata.viewProviders || null });\n                compilationDepth++;\n                try {\n                    if (meta.usesInheritance) {\n                        addDirectiveDefToUndecoratedParents(type);\n                    }\n                    ngComponentDef = compiler.compileComponent(angularCoreEnv, templateUrl, meta);\n                }\n                finally {\n                    // Ensure that the compilation depth is decremented even when the compilation failed.\n                    compilationDepth--;\n                }\n                if (compilationDepth === 0) {\n                    // When NgModule decorator executed, we enqueued the module definition such that\n                    // it would only dequeue and add itself as module scope to all of its declarations,\n                    // but only if  if all of its declarations had resolved. This call runs the check\n                    // to see if any modules that are in the queue can be dequeued and add scope to\n                    // their declarations.\n                    flushModuleScopingQueueAsMuchAsPossible();\n                }\n                // If component compilation is async, then the @NgModule annotation which declares the\n                // component may execute and set an ngSelectorScope property on the component type. This\n                // allows the component to patch itself with directiveDefs from the module after it\n                // finishes compiling.\n                if (hasSelectorScope(type)) {\n                    const scopes = transitiveScopesFor(type.ngSelectorScope);\n                    patchComponentDefWithScope(ngComponentDef, scopes);\n                }\n            }\n            return ngComponentDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction hasSelectorScope(component) {\n    return component.ngSelectorScope !== undefined;\n}\n/**\n * Compile an Angular directive according to its decorator metadata, and patch the resulting\n * directive def onto the component type.\n *\n * In the event that compilation is not immediate, `compileDirective` will return a `Promise` which\n * will resolve when compilation completes and the directive becomes usable.\n */\nfunction compileDirective(type, directive) {\n    let ngDirectiveDef = null;\n    addDirectiveFactoryDef(type, directive || {});\n    Object.defineProperty(type, NG_DIR_DEF, {\n        get: () => {\n            if (ngDirectiveDef === null) {\n                // `directive` can be null in the case of abstract directives as a base class\n                // that use `@Directive()` with no selector. In that case, pass empty object to the\n                // `directiveMetadata` function instead of null.\n                const meta = getDirectiveMetadata(type, directive || {});\n                ngDirectiveDef =\n                    getCompilerFacade().compileDirective(angularCoreEnv, meta.sourceMapUrl, meta.metadata);\n            }\n            return ngDirectiveDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction getDirectiveMetadata(type, metadata) {\n    const name = type && type.name;\n    const sourceMapUrl = `ng:///${name}/ɵdir.js`;\n    const compiler = getCompilerFacade();\n    const facade = directiveMetadata(type, metadata);\n    facade.typeSourceSpan = compiler.createParseSourceSpan('Directive', name, sourceMapUrl);\n    if (facade.usesInheritance) {\n        addDirectiveDefToUndecoratedParents(type);\n    }\n    return { metadata: facade, sourceMapUrl };\n}\nfunction addDirectiveFactoryDef(type, metadata) {\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const meta = getDirectiveMetadata(type, metadata);\n                const compiler = getCompilerFacade();\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${type.name}/ɵfac.js`, Object.assign(Object.assign({}, meta.metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Directive }));\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction extendsDirectlyFromObject(type) {\n    return Object.getPrototypeOf(type.prototype) === Object.prototype;\n}\n/**\n * Extract the `R3DirectiveMetadata` for a particular directive (either a `Directive` or a\n * `Component`).\n */\nfunction directiveMetadata(type, metadata) {\n    // Reflect inputs and outputs.\n    const reflect = getReflect();\n    const propMetadata = reflect.ownPropMetadata(type);\n    return {\n        name: type.name,\n        type: type,\n        typeArgumentCount: 0,\n        selector: metadata.selector !== undefined ? metadata.selector : null,\n        deps: reflectDependencies(type),\n        host: metadata.host || EMPTY_OBJ,\n        propMetadata: propMetadata,\n        inputs: metadata.inputs || EMPTY_ARRAY,\n        outputs: metadata.outputs || EMPTY_ARRAY,\n        queries: extractQueriesMetadata(type, propMetadata, isContentQuery),\n        lifecycle: { usesOnChanges: reflect.hasLifecycleHook(type, 'ngOnChanges') },\n        typeSourceSpan: null,\n        usesInheritance: !extendsDirectlyFromObject(type),\n        exportAs: extractExportAs(metadata.exportAs),\n        providers: metadata.providers || null,\n        viewQueries: extractQueriesMetadata(type, propMetadata, isViewQuery)\n    };\n}\n/**\n * Adds a directive definition to all parent classes of a type that don't have an Angular decorator.\n */\nfunction addDirectiveDefToUndecoratedParents(type) {\n    const objPrototype = Object.prototype;\n    let parent = Object.getPrototypeOf(type.prototype).constructor;\n    // Go up the prototype until we hit `Object`.\n    while (parent && parent !== objPrototype) {\n        // Since inheritance works if the class was annotated already, we only need to add\n        // the def if there are no annotations and the def hasn't been created already.\n        if (!getDirectiveDef(parent) && !getComponentDef(parent) &&\n            shouldAddAbstractDirective(parent)) {\n            compileDirective(parent, null);\n        }\n        parent = Object.getPrototypeOf(parent);\n    }\n}\nfunction convertToR3QueryPredicate(selector) {\n    return typeof selector === 'string' ? splitByComma(selector) : resolveForwardRef(selector);\n}\nfunction convertToR3QueryMetadata(propertyName, ann) {\n    return {\n        propertyName: propertyName,\n        predicate: convertToR3QueryPredicate(ann.selector),\n        descendants: ann.descendants,\n        first: ann.first,\n        read: ann.read ? ann.read : null,\n        static: !!ann.static\n    };\n}\nfunction extractQueriesMetadata(type, propMetadata, isQueryAnn) {\n    const queriesMeta = [];\n    for (const field in propMetadata) {\n        if (propMetadata.hasOwnProperty(field)) {\n            const annotations = propMetadata[field];\n            annotations.forEach(ann => {\n                if (isQueryAnn(ann)) {\n                    if (!ann.selector) {\n                        throw new Error(`Can't construct a query for the property \"${field}\" of ` +\n                            `\"${stringifyForError(type)}\" since the query selector wasn't defined.`);\n                    }\n                    if (annotations.some(isInputAnnotation)) {\n                        throw new Error(`Cannot combine @Input decorators with query decorators`);\n                    }\n                    queriesMeta.push(convertToR3QueryMetadata(field, ann));\n                }\n            });\n        }\n    }\n    return queriesMeta;\n}\nfunction extractExportAs(exportAs) {\n    return exportAs === undefined ? null : splitByComma(exportAs);\n}\nfunction isContentQuery(value) {\n    const name = value.ngMetadataName;\n    return name === 'ContentChild' || name === 'ContentChildren';\n}\nfunction isViewQuery(value) {\n    const name = value.ngMetadataName;\n    return name === 'ViewChild' || name === 'ViewChildren';\n}\nfunction isInputAnnotation(value) {\n    return value.ngMetadataName === 'Input';\n}\nfunction splitByComma(value) {\n    return value.split(',').map(piece => piece.trim());\n}\nconst LIFECYCLE_HOOKS = [\n    'ngOnChanges', 'ngOnInit', 'ngOnDestroy', 'ngDoCheck', 'ngAfterViewInit', 'ngAfterViewChecked',\n    'ngAfterContentInit', 'ngAfterContentChecked'\n];\nfunction shouldAddAbstractDirective(type) {\n    const reflect = getReflect();\n    if (LIFECYCLE_HOOKS.some(hookName => reflect.hasLifecycleHook(type, hookName))) {\n        return true;\n    }\n    const propMetadata = reflect.propMetadata(type);\n    for (const field in propMetadata) {\n        const annotations = propMetadata[field];\n        for (let i = 0; i < annotations.length; i++) {\n            const current = annotations[i];\n            const metadataName = current.ngMetadataName;\n            if (isInputAnnotation(current) || isContentQuery(current) || isViewQuery(current) ||\n                metadataName === 'Output' || metadataName === 'HostBinding' ||\n                metadataName === 'HostListener') {\n                return true;\n            }\n        }\n    }\n    return false;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction compilePipe(type, meta) {\n    let ngPipeDef = null;\n    let ngFactoryDef = null;\n    Object.defineProperty(type, NG_FACTORY_DEF, {\n        get: () => {\n            if (ngFactoryDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                const compiler = getCompilerFacade();\n                ngFactoryDef = compiler.compileFactory(angularCoreEnv, `ng:///${metadata.name}/ɵfac.js`, Object.assign(Object.assign({}, metadata), { injectFn: 'directiveInject', target: compiler.R3FactoryTarget.Pipe }));\n            }\n            return ngFactoryDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n    Object.defineProperty(type, NG_PIPE_DEF, {\n        get: () => {\n            if (ngPipeDef === null) {\n                const metadata = getPipeMetadata(type, meta);\n                ngPipeDef = getCompilerFacade().compilePipe(angularCoreEnv, `ng:///${metadata.name}/ɵpipe.js`, metadata);\n            }\n            return ngPipeDef;\n        },\n        // Make the property configurable in dev mode to allow overriding in tests\n        configurable: !!ngDevMode,\n    });\n}\nfunction getPipeMetadata(type, meta) {\n    return {\n        type: type,\n        typeArgumentCount: 0,\n        name: type.name,\n        deps: reflectDependencies(type),\n        pipeName: meta.name,\n        pure: meta.pure !== undefined ? meta.pure : true\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$e = (dir = {}) => dir, ɵ1$3 = (type, meta) => SWITCH_COMPILE_DIRECTIVE(type, meta);\n/**\n * Type of the Directive metadata.\n *\n * @publicApi\n */\nconst Directive = makeDecorator('Directive', ɵ0$e, undefined, undefined, ɵ1$3);\nconst ɵ2$1 = (c = {}) => (Object.assign({ changeDetection: ChangeDetectionStrategy.Default }, c)), ɵ3$1 = (type, meta) => SWITCH_COMPILE_COMPONENT(type, meta);\n/**\n * Component decorator and metadata.\n *\n * @Annotation\n * @publicApi\n */\nconst Component = makeDecorator('Component', ɵ2$1, Directive, undefined, ɵ3$1);\nconst ɵ4 = (p) => (Object.assign({ pure: true }, p)), ɵ5 = (type, meta) => SWITCH_COMPILE_PIPE(type, meta);\n/**\n * @Annotation\n * @publicApi\n */\nconst Pipe = makeDecorator('Pipe', ɵ4, undefined, undefined, ɵ5);\nconst ɵ6 = (bindingPropertyName) => ({ bindingPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst Input = makePropDecorator('Input', ɵ6);\nconst ɵ7 = (bindingPropertyName) => ({ bindingPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst Output = makePropDecorator('Output', ɵ7);\nconst ɵ8 = (hostPropertyName) => ({ hostPropertyName });\n/**\n * @Annotation\n * @publicApi\n */\nconst HostBinding = makePropDecorator('HostBinding', ɵ8);\nconst ɵ9 = (eventName, args) => ({ eventName, args });\n/**\n * Decorator that binds a DOM event to a host listener and supplies configuration metadata.\n * Angular invokes the supplied handler method when the host element emits the specified event,\n * and updates the bound element with the result.\n *\n * If the handler method returns false, applies `preventDefault` on the bound element.\n *\n * @usageNotes\n *\n * The following example declares a directive\n * that attaches a click listener to a button and counts clicks.\n *\n * ```ts\n * @Directive({selector: 'button[counting]'})\n * class CountClicks {\n *   numberOfClicks = 0;\n *\n *   @HostListener('click', ['$event.target'])\n *   onClick(btn) {\n *     console.log('button', btn, 'number of clicks:', this.numberOfClicks++);\n *  }\n * }\n *\n * @Component({\n *   selector: 'app',\n *   template: '<button counting>Increment</button>',\n * })\n * class App {}\n *\n * ```\n *\n * The following example registers another DOM event handler that listens for key-press events.\n * ``` ts\n * import { HostListener, Component } from \"@angular/core\";\n *\n * @Component({\n *   selector: 'app',\n *   template: `<h1>Hello, you have pressed keys {{counter}} number of times!</h1> Press any key to\n * increment the counter.\n *   <button (click)=\"resetCounter()\">Reset Counter</button>`\n * })\n * class AppComponent {\n *   counter = 0;\n *   @HostListener('window:keydown', ['$event'])\n *   handleKeyDown(event: KeyboardEvent) {\n *     this.counter++;\n *   }\n *   resetCounter() {\n *     this.counter = 0;\n *   }\n * }\n * ```\n *\n * @Annotation\n * @publicApi\n */\nconst HostListener = makePropDecorator('HostListener', ɵ9);\nconst SWITCH_COMPILE_COMPONENT__POST_R3__ = compileComponent;\nconst SWITCH_COMPILE_DIRECTIVE__POST_R3__ = compileDirective;\nconst SWITCH_COMPILE_PIPE__POST_R3__ = compilePipe;\nconst SWITCH_COMPILE_COMPONENT__PRE_R3__ = noop;\nconst SWITCH_COMPILE_DIRECTIVE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_PIPE__PRE_R3__ = noop;\nconst SWITCH_COMPILE_COMPONENT = SWITCH_COMPILE_COMPONENT__PRE_R3__;\nconst SWITCH_COMPILE_DIRECTIVE = SWITCH_COMPILE_DIRECTIVE__PRE_R3__;\nconst SWITCH_COMPILE_PIPE = SWITCH_COMPILE_PIPE__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ɵ0$f = (ngModule) => ngModule, ɵ1$4 = \n/**\n * Decorator that marks the following class as an NgModule, and supplies\n * configuration metadata for it.\n *\n * * The `declarations` and `entryComponents` options configure the compiler\n * with information about what belongs to the NgModule.\n * * The `providers` options configures the NgModule's injector to provide\n * dependencies the NgModule members.\n * * The `imports` and `exports` options bring in members from other modules, and make\n * this module's members available to others.\n */\n(type, meta) => SWITCH_COMPILE_NGMODULE(type, meta);\n/**\n * @Annotation\n * @publicApi\n */\nconst NgModule = makeDecorator('NgModule', ɵ0$f, undefined, undefined, ɵ1$4);\nfunction preR3NgModuleCompile(moduleType, metadata) {\n    let imports = (metadata && metadata.imports) || [];\n    if (metadata && metadata.exports) {\n        imports = [...imports, metadata.exports];\n    }\n    moduleType.ɵinj = ɵɵdefineInjector({\n        factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n        providers: metadata && metadata.providers,\n        imports: imports,\n    });\n}\nconst SWITCH_COMPILE_NGMODULE__POST_R3__ = compileNgModule;\nconst SWITCH_COMPILE_NGMODULE__PRE_R3__ = preR3NgModuleCompile;\nconst SWITCH_COMPILE_NGMODULE = SWITCH_COMPILE_NGMODULE__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that you can use to provide\n * one or more initialization functions.\n *\n * The provided functions are injected at application startup and executed during\n * app initialization. If any of these functions returns a Promise, initialization\n * does not complete until the Promise is resolved.\n *\n * You can, for example, create a factory function that loads language data\n * or an external configuration, and provide that function to the `APP_INITIALIZER` token.\n * The function is executed during the application bootstrap process,\n * and the needed data is available on startup.\n *\n * @see `ApplicationInitStatus`\n *\n * @publicApi\n */\nconst APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER} functions.\n *\n * @publicApi\n */\nclass ApplicationInitStatus {\n    constructor(appInits) {\n        this.appInits = appInits;\n        this.initialized = false;\n        this.done = false;\n        this.donePromise = new Promise((res, rej) => {\n            this.resolve = res;\n            this.reject = rej;\n        });\n    }\n    /** @internal */\n    runInitializers() {\n        if (this.initialized) {\n            return;\n        }\n        const asyncInitPromises = [];\n        const complete = () => {\n            this.done = true;\n            this.resolve();\n        };\n        if (this.appInits) {\n            for (let i = 0; i < this.appInits.length; i++) {\n                const initResult = this.appInits[i]();\n                if (isPromise(initResult)) {\n                    asyncInitPromises.push(initResult);\n                }\n            }\n        }\n        Promise.all(asyncInitPromises)\n            .then(() => {\n            complete();\n        })\n            .catch(e => {\n            this.reject(e);\n        });\n        if (asyncInitPromises.length === 0) {\n            complete();\n        }\n        this.initialized = true;\n    }\n}\nApplicationInitStatus.decorators = [\n    { type: Injectable }\n];\nApplicationInitStatus.ctorParameters = () => [\n    { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional }] }\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") representing a unique string ID, used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * BY default, the value is randomly generated and assigned to the application by Angular.\n * To provide a custom ID value, use a DI provider <!-- TODO: provider --> to configure\n * the root {@link Injector} that uses this token.\n *\n * @publicApi\n */\nconst APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n    return `${_randomChar()}${_randomChar()}${_randomChar()}`;\n}\n/**\n * Providers that generate a random `APP_ID_TOKEN`.\n * @publicApi\n */\nconst APP_ID_RANDOM_PROVIDER = {\n    provide: APP_ID,\n    useFactory: _appIdRandomProviderFactory,\n    deps: [],\n};\nfunction _randomChar() {\n    return String.fromCharCode(97 + Math.floor(Math.random() * 25));\n}\n/**\n * A function that is executed when a platform is initialized.\n * @publicApi\n */\nconst PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform ID.\n * @publicApi\n */\nconst PLATFORM_ID = new InjectionToken('Platform ID');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that provides a set of callbacks to\n * be called for every component that is bootstrapped.\n *\n * Each callback must take a `ComponentRef` instance and return nothing.\n *\n * `(componentRef: ComponentRef) => void`\n *\n * @publicApi\n */\nconst APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A [DI token](guide/glossary#di-token \"DI token definition\") that indicates the root directory of\n * the application\n * @publicApi\n */\nconst PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nclass Console {\n    log(message) {\n        // tslint:disable-next-line:no-console\n        console.log(message);\n    }\n    // Note: for reporting errors use `DOM.logError()` as it is platform specific\n    warn(message) {\n        // tslint:disable-next-line:no-console\n        console.warn(message);\n    }\n}\nConsole.decorators = [\n    { type: Injectable }\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Provide this token to set the locale of your application.\n * It is used for i18n extraction, by i18n pipes (DatePipe, I18nPluralPipe, CurrencyPipe,\n * DecimalPipe and PercentPipe) and by ICU expressions.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { LOCALE_ID } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: LOCALE_ID, useValue: 'en-US' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst LOCALE_ID$1 = new InjectionToken('LocaleId');\n/**\n * Provide this token to set the default currency code your application uses for\n * CurrencyPipe when there is no currency code passed into it. This is only used by\n * CurrencyPipe and has no relation to locale currency. Defaults to USD if not configured.\n *\n * See the [i18n guide](guide/i18n#setting-up-locale) for more information.\n *\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v10 the default currency code will be taken from the current locale.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: DEFAULT_CURRENCY_CODE, useValue: 'EUR' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst DEFAULT_CURRENCY_CODE = new InjectionToken('DefaultCurrencyCode');\n/**\n * Use this token at bootstrap to provide the content of your translation file (`xtb`,\n * `xlf` or `xlf2`) when you want to translate your application in another language.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * // content of your translation file\n * const translations = '....';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS, useValue: translations }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS = new InjectionToken('Translations');\n/**\n * Provide this token at bootstrap to set the format of your {@link TRANSLATIONS}: `xtb`,\n * `xlf` or `xlf2`.\n *\n * See the [i18n guide](guide/i18n#merge) for more information.\n *\n * @usageNotes\n * ### Example\n *\n * ```typescript\n * import { TRANSLATIONS_FORMAT } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   providers: [{provide: TRANSLATIONS_FORMAT, useValue: 'xlf' }]\n * });\n * ```\n *\n * @publicApi\n */\nconst TRANSLATIONS_FORMAT = new InjectionToken('TranslationsFormat');\n/**\n * Use this enum at bootstrap as an option of `bootstrapModule` to define the strategy\n * that the compiler should use in case of missing translations:\n * - Error: throw if you have missing translations.\n * - Warning (default): show a warning in the console and/or shell.\n * - Ignore: do nothing.\n *\n * See the [i18n guide](guide/i18n#missing-translation) for more information.\n *\n * @usageNotes\n * ### Example\n * ```typescript\n * import { MissingTranslationStrategy } from '@angular/core';\n * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n * import { AppModule } from './app/app.module';\n *\n * platformBrowserDynamic().bootstrapModule(AppModule, {\n *   missingTranslation: MissingTranslationStrategy.Error\n * });\n * ```\n *\n * @publicApi\n */\nvar MissingTranslationStrategy;\n(function (MissingTranslationStrategy) {\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Error\"] = 0] = \"Error\";\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Warning\"] = 1] = \"Warning\";\n    MissingTranslationStrategy[MissingTranslationStrategy[\"Ignore\"] = 2] = \"Ignore\";\n})(MissingTranslationStrategy || (MissingTranslationStrategy = {}));\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst SWITCH_IVY_ENABLED__POST_R3__ = true;\nconst SWITCH_IVY_ENABLED__PRE_R3__ = false;\nconst ivyEnabled = SWITCH_IVY_ENABLED__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Combination of NgModuleFactory and ComponentFactorys.\n *\n * @publicApi\n */\nclass ModuleWithComponentFactories {\n    constructor(ngModuleFactory, componentFactories) {\n        this.ngModuleFactory = ngModuleFactory;\n        this.componentFactories = componentFactories;\n    }\n}\nfunction _throwError() {\n    throw new Error(`Runtime compiler is not loaded`);\n}\nconst Compiler_compileModuleSync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleSync__POST_R3__ = function (moduleType) {\n    return new NgModuleFactory$1(moduleType);\n};\nconst Compiler_compileModuleSync = Compiler_compileModuleSync__PRE_R3__;\nconst Compiler_compileModuleAsync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAsync__POST_R3__ = function (moduleType) {\n    return Promise.resolve(Compiler_compileModuleSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAsync = Compiler_compileModuleAsync__PRE_R3__;\nconst Compiler_compileModuleAndAllComponentsSync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAndAllComponentsSync__POST_R3__ = function (moduleType) {\n    const ngModuleFactory = Compiler_compileModuleSync__POST_R3__(moduleType);\n    const moduleDef = getNgModuleDef(moduleType);\n    const componentFactories = maybeUnwrapFn(moduleDef.declarations)\n        .reduce((factories, declaration) => {\n        const componentDef = getComponentDef(declaration);\n        componentDef && factories.push(new ComponentFactory$1(componentDef));\n        return factories;\n    }, []);\n    return new ModuleWithComponentFactories(ngModuleFactory, componentFactories);\n};\nconst Compiler_compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync__PRE_R3__;\nconst Compiler_compileModuleAndAllComponentsAsync__PRE_R3__ = _throwError;\nconst Compiler_compileModuleAndAllComponentsAsync__POST_R3__ = function (moduleType) {\n    return Promise.resolve(Compiler_compileModuleAndAllComponentsSync__POST_R3__(moduleType));\n};\nconst Compiler_compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync__PRE_R3__;\n/**\n * Low-level service for running the angular compiler during runtime\n * to create {@link ComponentFactory}s, which\n * can later be used to create and render a Component instance.\n *\n * Each `@NgModule` provides an own `Compiler` to its injector,\n * that will use the directives/pipes of the ng module for compilation\n * of components.\n *\n * @publicApi\n */\nclass Compiler {\n    constructor() {\n        /**\n         * Compiles the given NgModule and all of its components. All templates of the components listed\n         * in `entryComponents` have to be inlined.\n         */\n        this.compileModuleSync = Compiler_compileModuleSync;\n        /**\n         * Compiles the given NgModule and all of its components\n         */\n        this.compileModuleAsync = Compiler_compileModuleAsync;\n        /**\n         * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n         */\n        this.compileModuleAndAllComponentsSync = Compiler_compileModuleAndAllComponentsSync;\n        /**\n         * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n         */\n        this.compileModuleAndAllComponentsAsync = Compiler_compileModuleAndAllComponentsAsync;\n    }\n    /**\n     * Clears all caches.\n     */\n    clearCache() { }\n    /**\n     * Clears the cache for the given component/ngModule.\n     */\n    clearCacheFor(type) { }\n    /**\n     * Returns the id for a given NgModule, if one is defined and known to the compiler.\n     */\n    getModuleId(moduleType) {\n        return undefined;\n    }\n}\nCompiler.decorators = [\n    { type: Injectable }\n];\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @publicApi\n */\nconst COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @publicApi\n */\nclass CompilerFactory {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst promise = (() => Promise.resolve(0))();\nfunction scheduleMicroTask(fn) {\n    if (typeof Zone === 'undefined') {\n        // use promise to schedule microTask instead of use Zone\n        promise.then(() => {\n            fn && fn.apply(null, null);\n        });\n    }\n    else {\n        Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction getNativeRequestAnimationFrame() {\n    let nativeRequestAnimationFrame = _global['requestAnimationFrame'];\n    let nativeCancelAnimationFrame = _global['cancelAnimationFrame'];\n    if (typeof Zone !== 'undefined' && nativeRequestAnimationFrame && nativeCancelAnimationFrame) {\n        // use unpatched version of requestAnimationFrame(native delegate) if possible\n        // to avoid another Change detection\n        const unpatchedRequestAnimationFrame = nativeRequestAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n        if (unpatchedRequestAnimationFrame) {\n            nativeRequestAnimationFrame = unpatchedRequestAnimationFrame;\n        }\n        const unpatchedCancelAnimationFrame = nativeCancelAnimationFrame[Zone.__symbol__('OriginalDelegate')];\n        if (unpatchedCancelAnimationFrame) {\n            nativeCancelAnimationFrame = unpatchedCancelAnimationFrame;\n        }\n    }\n    return { nativeRequestAnimationFrame, nativeCancelAnimationFrame };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n *   - docs explaining zones and the use of zones in Angular and change-detection\n *   - link to runOutsideAngular/run (throughout this file!)\n *   -->\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * import {Component, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n *   selector: 'ng-zone-demo',\n *   template: `\n *     <h2>Demo: NgZone</h2>\n *\n *     <p>Progress: {{progress}}%</p>\n *     <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n *     <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n *     <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n *   `,\n * })\n * export class NgZoneDemo {\n *   progress: number = 0;\n *   label: string;\n *\n *   constructor(private _ngZone: NgZone) {}\n *\n *   // Loop inside the Angular zone\n *   // so the UI DOES refresh after each setTimeout cycle\n *   processWithinAngularZone() {\n *     this.label = 'inside';\n *     this.progress = 0;\n *     this._increaseProgress(() => console.log('Inside Done!'));\n *   }\n *\n *   // Loop outside of the Angular zone\n *   // so the UI DOES NOT refresh after each setTimeout cycle\n *   processOutsideOfAngularZone() {\n *     this.label = 'outside';\n *     this.progress = 0;\n *     this._ngZone.runOutsideAngular(() => {\n *       this._increaseProgress(() => {\n *         // reenter the Angular zone and display done\n *         this._ngZone.run(() => { console.log('Outside Done!'); });\n *       });\n *     });\n *   }\n *\n *   _increaseProgress(doneCallback: () => void) {\n *     this.progress += 1;\n *     console.log(`Current progress: ${this.progress}%`);\n *\n *     if (this.progress < 100) {\n *       window.setTimeout(() => this._increaseProgress(doneCallback), 10);\n *     } else {\n *       doneCallback();\n *     }\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nclass NgZone {\n    constructor({ enableLongStackTrace = false, shouldCoalesceEventChangeDetection = false }) {\n        this.hasPendingMacrotasks = false;\n        this.hasPendingMicrotasks = false;\n        /**\n         * Whether there are no outstanding microtasks or macrotasks.\n         */\n        this.isStable = true;\n        /**\n         * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n         */\n        this.onUnstable = new EventEmitter(false);\n        /**\n         * Notifies when there is no more microtasks enqueued in the current VM Turn.\n         * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n         * For this reason this event can fire multiple times per VM Turn.\n         */\n        this.onMicrotaskEmpty = new EventEmitter(false);\n        /**\n         * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n         * implies we are about to relinquish VM turn.\n         * This event gets called just once.\n         */\n        this.onStable = new EventEmitter(false);\n        /**\n         * Notifies that an error has been delivered.\n         */\n        this.onError = new EventEmitter(false);\n        if (typeof Zone == 'undefined') {\n            throw new Error(`In this configuration Angular requires Zone.js`);\n        }\n        Zone.assertZonePatched();\n        const self = this;\n        self._nesting = 0;\n        self._outer = self._inner = Zone.current;\n        if (Zone['wtfZoneSpec']) {\n            self._inner = self._inner.fork(Zone['wtfZoneSpec']);\n        }\n        if (Zone['TaskTrackingZoneSpec']) {\n            self._inner = self._inner.fork(new Zone['TaskTrackingZoneSpec']);\n        }\n        if (enableLongStackTrace && Zone['longStackTraceZoneSpec']) {\n            self._inner = self._inner.fork(Zone['longStackTraceZoneSpec']);\n        }\n        self.shouldCoalesceEventChangeDetection = shouldCoalesceEventChangeDetection;\n        self.lastRequestAnimationFrameId = -1;\n        self.nativeRequestAnimationFrame = getNativeRequestAnimationFrame().nativeRequestAnimationFrame;\n        forkInnerZoneWithAngularBehavior(self);\n    }\n    static isInAngularZone() {\n        return Zone.current.get('isAngularZone') === true;\n    }\n    static assertInAngularZone() {\n        if (!NgZone.isInAngularZone()) {\n            throw new Error('Expected to be in Angular Zone, but it is not!');\n        }\n    }\n    static assertNotInAngularZone() {\n        if (NgZone.isInAngularZone()) {\n            throw new Error('Expected to not be in Angular Zone, but it is!');\n        }\n    }\n    /**\n     * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n     * the function.\n     *\n     * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * within the Angular zone.\n     *\n     * If a synchronous error happens it will be rethrown and not reported via `onError`.\n     */\n    run(fn, applyThis, applyArgs) {\n        return this._inner.run(fn, applyThis, applyArgs);\n    }\n    /**\n     * Executes the `fn` function synchronously within the Angular zone as a task and returns value\n     * returned by the function.\n     *\n     * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n     * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * within the Angular zone.\n     *\n     * If a synchronous error happens it will be rethrown and not reported via `onError`.\n     */\n    runTask(fn, applyThis, applyArgs, name) {\n        const zone = this._inner;\n        const task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop$1, noop$1);\n        try {\n            return zone.runTask(task, applyThis, applyArgs);\n        }\n        finally {\n            zone.cancelTask(task);\n        }\n    }\n    /**\n     * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n     * rethrown.\n     */\n    runGuarded(fn, applyThis, applyArgs) {\n        return this._inner.runGuarded(fn, applyThis, applyArgs);\n    }\n    /**\n     * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n     * the function.\n     *\n     * Running functions via {@link #runOutsideAngular} allows you to escape Angular's zone and do\n     * work that\n     * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n     *\n     * Any future tasks or microtasks scheduled from within this function will continue executing from\n     * outside of the Angular zone.\n     *\n     * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n     */\n    runOutsideAngular(fn) {\n        return this._outer.run(fn);\n    }\n}\nfunction noop$1() { }\nconst EMPTY_PAYLOAD = {};\nfunction checkStable(zone) {\n    if (zone._nesting == 0 && !zone.hasPendingMicrotasks && !zone.isStable) {\n        try {\n            zone._nesting++;\n            zone.onMicrotaskEmpty.emit(null);\n        }\n        finally {\n            zone._nesting--;\n            if (!zone.hasPendingMicrotasks) {\n                try {\n                    zone.runOutsideAngular(() => zone.onStable.emit(null));\n                }\n                finally {\n                    zone.isStable = true;\n                }\n            }\n        }\n    }\n}\nfunction delayChangeDetectionForEvents(zone) {\n    if (zone.lastRequestAnimationFrameId !== -1) {\n        return;\n    }\n    zone.lastRequestAnimationFrameId = zone.nativeRequestAnimationFrame.call(_global, () => {\n        // This is a work around for https://github.com/angular/angular/issues/36839.\n        // The core issue is that when event coalescing is enabled it is possible for microtasks\n        // to get flushed too early (As is the case with `Promise.then`) between the\n        // coalescing eventTasks.\n        //\n        // To workaround this we schedule a \"fake\" eventTask before we process the\n        // coalescing eventTasks. The benefit of this is that the \"fake\" container eventTask\n        //  will prevent the microtasks queue from getting drained in between the coalescing\n        // eventTask execution.\n        if (!zone.fakeTopEventTask) {\n            zone.fakeTopEventTask = Zone.root.scheduleEventTask('fakeTopEventTask', () => {\n                zone.lastRequestAnimationFrameId = -1;\n                updateMicroTaskStatus(zone);\n                checkStable(zone);\n            }, undefined, () => { }, () => { });\n        }\n        zone.fakeTopEventTask.invoke();\n    });\n    updateMicroTaskStatus(zone);\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n    const delayChangeDetectionForEventsDelegate = () => {\n        delayChangeDetectionForEvents(zone);\n    };\n    const maybeDelayChangeDetection = !!zone.shouldCoalesceEventChangeDetection &&\n        zone.nativeRequestAnimationFrame && delayChangeDetectionForEventsDelegate;\n    zone._inner = zone._inner.fork({\n        name: 'angular',\n        properties: { 'isAngularZone': true, 'maybeDelayChangeDetection': maybeDelayChangeDetection },\n        onInvokeTask: (delegate, current, target, task, applyThis, applyArgs) => {\n            try {\n                onEnter(zone);\n                return delegate.invokeTask(target, task, applyThis, applyArgs);\n            }\n            finally {\n                if (maybeDelayChangeDetection && task.type === 'eventTask') {\n                    maybeDelayChangeDetection();\n                }\n                onLeave(zone);\n            }\n        },\n        onInvoke: (delegate, current, target, callback, applyThis, applyArgs, source) => {\n            try {\n                onEnter(zone);\n                return delegate.invoke(target, callback, applyThis, applyArgs, source);\n            }\n            finally {\n                onLeave(zone);\n            }\n        },\n        onHasTask: (delegate, current, target, hasTaskState) => {\n            delegate.hasTask(target, hasTaskState);\n            if (current === target) {\n                // We are only interested in hasTask events which originate from our zone\n                // (A child hasTask event is not interesting to us)\n                if (hasTaskState.change == 'microTask') {\n                    zone._hasPendingMicrotasks = hasTaskState.microTask;\n                    updateMicroTaskStatus(zone);\n                    checkStable(zone);\n                }\n                else if (hasTaskState.change == 'macroTask') {\n                    zone.hasPendingMacrotasks = hasTaskState.macroTask;\n                }\n            }\n        },\n        onHandleError: (delegate, current, target, error) => {\n            delegate.handleError(target, error);\n            zone.runOutsideAngular(() => zone.onError.emit(error));\n            return false;\n        }\n    });\n}\nfunction updateMicroTaskStatus(zone) {\n    if (zone._hasPendingMicrotasks ||\n        (zone.shouldCoalesceEventChangeDetection && zone.lastRequestAnimationFrameId !== -1)) {\n        zone.hasPendingMicrotasks = true;\n    }\n    else {\n        zone.hasPendingMicrotasks = false;\n    }\n}\nfunction onEnter(zone) {\n    zone._nesting++;\n    if (zone.isStable) {\n        zone.isStable = false;\n        zone.onUnstable.emit(null);\n    }\n}\nfunction onLeave(zone) {\n    zone._nesting--;\n    checkStable(zone);\n}\n/**\n * Provides a noop implementation of `NgZone` which does nothing. This zone requires explicit calls\n * to framework to perform rendering.\n */\nclass NoopNgZone {\n    constructor() {\n        this.hasPendingMicrotasks = false;\n        this.hasPendingMacrotasks = false;\n        this.isStable = true;\n        this.onUnstable = new EventEmitter();\n        this.onMicrotaskEmpty = new EventEmitter();\n        this.onStable = new EventEmitter();\n        this.onError = new EventEmitter();\n    }\n    run(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runGuarded(fn, applyThis, applyArgs) {\n        return fn.apply(applyThis, applyArgs);\n    }\n    runOutsideAngular(fn) {\n        return fn();\n    }\n    runTask(fn, applyThis, applyArgs, name) {\n        return fn.apply(applyThis, applyArgs);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * The Testability service provides testing hooks that can be accessed from\n * the browser and by services such as Protractor. Each bootstrapped Angular\n * application on the page will have an instance of Testability.\n * @publicApi\n */\nclass Testability {\n    constructor(_ngZone) {\n        this._ngZone = _ngZone;\n        this._pendingCount = 0;\n        this._isZoneStable = true;\n        /**\n         * Whether any work was done since the last 'whenStable' callback. This is\n         * useful to detect if this could have potentially destabilized another\n         * component while it is stabilizing.\n         * @internal\n         */\n        this._didWork = false;\n        this._callbacks = [];\n        this.taskTrackingZone = null;\n        this._watchAngularEvents();\n        _ngZone.run(() => {\n            this.taskTrackingZone =\n                typeof Zone == 'undefined' ? null : Zone.current.get('TaskTrackingZone');\n        });\n    }\n    _watchAngularEvents() {\n        this._ngZone.onUnstable.subscribe({\n            next: () => {\n                this._didWork = true;\n                this._isZoneStable = false;\n            }\n        });\n        this._ngZone.runOutsideAngular(() => {\n            this._ngZone.onStable.subscribe({\n                next: () => {\n                    NgZone.assertNotInAngularZone();\n                    scheduleMicroTask(() => {\n                        this._isZoneStable = true;\n                        this._runCallbacksIfReady();\n                    });\n                }\n            });\n        });\n    }\n    /**\n     * Increases the number of pending request\n     * @deprecated pending requests are now tracked with zones.\n     */\n    increasePendingRequestCount() {\n        this._pendingCount += 1;\n        this._didWork = true;\n        return this._pendingCount;\n    }\n    /**\n     * Decreases the number of pending request\n     * @deprecated pending requests are now tracked with zones\n     */\n    decreasePendingRequestCount() {\n        this._pendingCount -= 1;\n        if (this._pendingCount < 0) {\n            throw new Error('pending async requests below zero');\n        }\n        this._runCallbacksIfReady();\n        return this._pendingCount;\n    }\n    /**\n     * Whether an associated application is stable\n     */\n    isStable() {\n        return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n    }\n    _runCallbacksIfReady() {\n        if (this.isStable()) {\n            // Schedules the call backs in a new frame so that it is always async.\n            scheduleMicroTask(() => {\n                while (this._callbacks.length !== 0) {\n                    let cb = this._callbacks.pop();\n                    clearTimeout(cb.timeoutId);\n                    cb.doneCb(this._didWork);\n                }\n                this._didWork = false;\n            });\n        }\n        else {\n            // Still not stable, send updates.\n            let pending = this.getPendingTasks();\n            this._callbacks = this._callbacks.filter((cb) => {\n                if (cb.updateCb && cb.updateCb(pending)) {\n                    clearTimeout(cb.timeoutId);\n                    return false;\n                }\n                return true;\n            });\n            this._didWork = true;\n        }\n    }\n    getPendingTasks() {\n        if (!this.taskTrackingZone) {\n            return [];\n        }\n        // Copy the tasks data so that we don't leak tasks.\n        return this.taskTrackingZone.macroTasks.map((t) => {\n            return {\n                source: t.source,\n                // From TaskTrackingZone:\n                // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n                creationLocation: t.creationLocation,\n                data: t.data\n            };\n        });\n    }\n    addCallback(cb, timeout, updateCb) {\n        let timeoutId = -1;\n        if (timeout && timeout > 0) {\n            timeoutId = setTimeout(() => {\n                this._callbacks = this._callbacks.filter((cb) => cb.timeoutId !== timeoutId);\n                cb(this._didWork, this.getPendingTasks());\n            }, timeout);\n        }\n        this._callbacks.push({ doneCb: cb, timeoutId: timeoutId, updateCb: updateCb });\n    }\n    /**\n     * Wait for the application to be stable with a timeout. If the timeout is reached before that\n     * happens, the callback receives a list of the macro tasks that were pending, otherwise null.\n     *\n     * @param doneCb The callback to invoke when Angular is stable or the timeout expires\n     *    whichever comes first.\n     * @param timeout Optional. The maximum time to wait for Angular to become stable. If not\n     *    specified, whenStable() will wait forever.\n     * @param updateCb Optional. If specified, this callback will be invoked whenever the set of\n     *    pending macrotasks changes. If this callback returns true doneCb will not be invoked\n     *    and no further updates will be issued.\n     */\n    whenStable(doneCb, timeout, updateCb) {\n        if (updateCb && !this.taskTrackingZone) {\n            throw new Error('Task tracking zone is required when passing an update callback to ' +\n                'whenStable(). Is \"zone.js/dist/task-tracking.js\" loaded?');\n        }\n        // These arguments are 'Function' above to keep the public API simple.\n        this.addCallback(doneCb, timeout, updateCb);\n        this._runCallbacksIfReady();\n    }\n    /**\n     * Get the number of pending requests\n     * @deprecated pending requests are now tracked with zones\n     */\n    getPendingRequestCount() {\n        return this._pendingCount;\n    }\n    /**\n     * Find providers by name\n     * @param using The root element to search from\n     * @param provider The name of binding variable\n     * @param exactMatch Whether using exactMatch\n     */\n    findProviders(using, provider, exactMatch) {\n        // TODO(juliemr): implement.\n        return [];\n    }\n}\nTestability.decorators = [\n    { type: Injectable }\n];\nTestability.ctorParameters = () => [\n    { type: NgZone }\n];\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @publicApi\n */\nclass TestabilityRegistry {\n    constructor() {\n        /** @internal */\n        this._applications = new Map();\n        _testabilityGetter.addToWindow(this);\n    }\n    /**\n     * Registers an application with a testability hook so that it can be tracked\n     * @param token token of application, root element\n     * @param testability Testability hook\n     */\n    registerApplication(token, testability) {\n        this._applications.set(token, testability);\n    }\n    /**\n     * Unregisters an application.\n     * @param token token of application, root element\n     */\n    unregisterApplication(token) {\n        this._applications.delete(token);\n    }\n    /**\n     * Unregisters all applications\n     */\n    unregisterAllApplications() {\n        this._applications.clear();\n    }\n    /**\n     * Get a testability hook associated with the application\n     * @param elem root element\n     */\n    getTestability(elem) {\n        return this._applications.get(elem) || null;\n    }\n    /**\n     * Get all registered testabilities\n     */\n    getAllTestabilities() {\n        return Array.from(this._applications.values());\n    }\n    /**\n     * Get all registered applications(root elements)\n     */\n    getAllRootElements() {\n        return Array.from(this._applications.keys());\n    }\n    /**\n     * Find testability of a node in the Tree\n     * @param elem node\n     * @param findInAncestors whether finding testability in ancestors if testability was not found in\n     * current node\n     */\n    findTestabilityInTree(elem, findInAncestors = true) {\n        return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n    }\n}\nTestabilityRegistry.decorators = [\n    { type: Injectable }\n];\nTestabilityRegistry.ctorParameters = () => [];\nclass _NoopGetTestability {\n    addToWindow(registry) { }\n    findTestabilityInTree(registry, elem, findInAncestors) {\n        return null;\n    }\n}\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @publicApi\n */\nfunction setTestabilityGetter(getter) {\n    _testabilityGetter = getter;\n}\nlet _testabilityGetter = new _NoopGetTestability();\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet _platform;\nlet compileNgModuleFactory = compileNgModuleFactory__PRE_R3__;\nfunction compileNgModuleFactory__PRE_R3__(injector, options, moduleType) {\n    const compilerFactory = injector.get(CompilerFactory);\n    const compiler = compilerFactory.createCompiler([options]);\n    return compiler.compileModuleAsync(moduleType);\n}\nfunction compileNgModuleFactory__POST_R3__(injector, options, moduleType) {\n    ngDevMode && assertNgModuleType(moduleType);\n    const moduleFactory = new NgModuleFactory$1(moduleType);\n    // All of the logic below is irrelevant for AOT-compiled code.\n    if (typeof ngJitMode !== 'undefined' && !ngJitMode) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerOptions = injector.get(COMPILER_OPTIONS, []).concat(options);\n    // Configure the compiler to use the provided options. This call may fail when multiple modules\n    // are bootstrapped with incompatible options, as a component can only be compiled according to\n    // a single set of options.\n    setJitOptions({\n        defaultEncapsulation: _lastDefined(compilerOptions.map(opts => opts.defaultEncapsulation)),\n        preserveWhitespaces: _lastDefined(compilerOptions.map(opts => opts.preserveWhitespaces)),\n    });\n    if (isComponentResourceResolutionQueueEmpty()) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compilerProviders = _mergeArrays(compilerOptions.map(o => o.providers));\n    // In case there are no compiler providers, we just return the module factory as\n    // there won't be any resource loader. This can happen with Ivy, because AOT compiled\n    // modules can be still passed through \"bootstrapModule\". In that case we shouldn't\n    // unnecessarily require the JIT compiler.\n    if (compilerProviders.length === 0) {\n        return Promise.resolve(moduleFactory);\n    }\n    const compiler = getCompilerFacade();\n    const compilerInjector = Injector.create({ providers: compilerProviders });\n    const resourceLoader = compilerInjector.get(compiler.ResourceLoader);\n    // The resource loader can also return a string while the \"resolveComponentResources\"\n    // always expects a promise. Therefore we need to wrap the returned value in a promise.\n    return resolveComponentResources(url => Promise.resolve(resourceLoader.get(url)))\n        .then(() => moduleFactory);\n}\n// the `window.ng` global utilities are only available in non-VE versions of\n// Angular. The function switch below will make sure that the code is not\n// included into Angular when PRE mode is active.\nfunction publishDefaultGlobalUtils__PRE_R3__() { }\nfunction publishDefaultGlobalUtils__POST_R3__() {\n    ngDevMode && publishDefaultGlobalUtils();\n}\nlet publishDefaultGlobalUtils$1 = publishDefaultGlobalUtils__PRE_R3__;\nlet isBoundToModule = isBoundToModule__PRE_R3__;\nfunction isBoundToModule__PRE_R3__(cf) {\n    return cf instanceof ComponentFactoryBoundToModule;\n}\nfunction isBoundToModule__POST_R3__(cf) {\n    return cf.isBoundToModule;\n}\nconst ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @publicApi\n */\nclass NgProbeToken {\n    constructor(name, token) {\n        this.name = name;\n        this.token = token;\n    }\n}\n/**\n * Creates a platform.\n * Platforms must be created on launch using this function.\n *\n * @publicApi\n */\nfunction createPlatform(injector) {\n    if (_platform && !_platform.destroyed &&\n        !_platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n        throw new Error('There can be only one platform. Destroy the previous one to create a new one.');\n    }\n    publishDefaultGlobalUtils$1();\n    _platform = injector.get(PlatformRef);\n    const inits = injector.get(PLATFORM_INITIALIZER, null);\n    if (inits)\n        inits.forEach((init) => init());\n    return _platform;\n}\n/**\n * Creates a factory for a platform. Can be used to provide or override `Providers` specific to\n * your applciation's runtime needs, such as `PLATFORM_INITIALIZER` and `PLATFORM_ID`.\n * @param parentPlatformFactory Another platform factory to modify. Allows you to compose factories\n * to build up configurations that might be required by different libraries or parts of the\n * application.\n * @param name Identifies the new platform factory.\n * @param providers A set of dependency providers for platforms created with the new factory.\n *\n * @publicApi\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers = []) {\n    const desc = `Platform: ${name}`;\n    const marker = new InjectionToken(desc);\n    return (extraProviders = []) => {\n        let platform = getPlatform();\n        if (!platform || platform.injector.get(ALLOW_MULTIPLE_PLATFORMS, false)) {\n            if (parentPlatformFactory) {\n                parentPlatformFactory(providers.concat(extraProviders).concat({ provide: marker, useValue: true }));\n            }\n            else {\n                const injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true }, {\n                    provide: INJECTOR_SCOPE,\n                    useValue: 'platform'\n                });\n                createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n            }\n        }\n        return assertPlatform(marker);\n    };\n}\n/**\n * Checks that there is currently a platform that contains the given token as a provider.\n *\n * @publicApi\n */\nfunction assertPlatform(requiredToken) {\n    const platform = getPlatform();\n    if (!platform) {\n        throw new Error('No platform exists!');\n    }\n    if (!platform.injector.get(requiredToken, null)) {\n        throw new Error('A platform with a different configuration has been created. Please destroy it first.');\n    }\n    return platform;\n}\n/**\n * Destroys the current Angular platform and all Angular applications on the page.\n * Destroys all modules and listeners registered with the platform.\n *\n * @publicApi\n */\nfunction destroyPlatform() {\n    if (_platform && !_platform.destroyed) {\n        _platform.destroy();\n    }\n}\n/**\n * Returns the current platform.\n *\n * @publicApi\n */\nfunction getPlatform() {\n    return _platform && !_platform.destroyed ? _platform : null;\n}\n/**\n * The Angular platform is the entry point for Angular on a web page.\n * Each page has exactly one platform. Services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n * A page's platform is initialized implicitly when a platform is created using a platform\n * factory such as `PlatformBrowser`, or explicitly by calling the `createPlatform()` function.\n *\n * @publicApi\n */\nclass PlatformRef {\n    /** @internal */\n    constructor(_injector) {\n        this._injector = _injector;\n        this._modules = [];\n        this._destroyListeners = [];\n        this._destroyed = false;\n    }\n    /**\n     * Creates an instance of an `@NgModule` for the given platform for offline compilation.\n     *\n     * @usageNotes\n     *\n     * The following example creates the NgModule for a browser platform.\n     *\n     * ```typescript\n     * my_module.ts:\n     *\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * main.ts:\n     * import {MyModuleNgFactory} from './my_module.ngfactory';\n     * import {platformBrowser} from '@angular/platform-browser';\n     *\n     * let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);\n     * ```\n     */\n    bootstrapModuleFactory(moduleFactory, options) {\n        // Note: We need to create the NgZone _before_ we instantiate the module,\n        // as instantiating the module creates some providers eagerly.\n        // So we create a mini parent injector that just contains the new NgZone and\n        // pass that as parent to the NgModuleFactory.\n        const ngZoneOption = options ? options.ngZone : undefined;\n        const ngZoneEventCoalescing = (options && options.ngZoneEventCoalescing) || false;\n        const ngZone = getNgZone(ngZoneOption, ngZoneEventCoalescing);\n        const providers = [{ provide: NgZone, useValue: ngZone }];\n        // Attention: Don't use ApplicationRef.run here,\n        // as we want to be sure that all possible constructor calls are inside `ngZone.run`!\n        return ngZone.run(() => {\n            const ngZoneInjector = Injector.create({ providers: providers, parent: this.injector, name: moduleFactory.moduleType.name });\n            const moduleRef = moduleFactory.create(ngZoneInjector);\n            const exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n            if (!exceptionHandler) {\n                throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n            }\n            moduleRef.onDestroy(() => remove(this._modules, moduleRef));\n            ngZone.runOutsideAngular(() => ngZone.onError.subscribe({\n                next: (error) => {\n                    exceptionHandler.handleError(error);\n                }\n            }));\n            return _callAndReportToErrorHandler(exceptionHandler, ngZone, () => {\n                const initStatus = moduleRef.injector.get(ApplicationInitStatus);\n                initStatus.runInitializers();\n                return initStatus.donePromise.then(() => {\n                    if (ivyEnabled) {\n                        // If the `LOCALE_ID` provider is defined at bootstrap then we set the value for ivy\n                        const localeId = moduleRef.injector.get(LOCALE_ID$1, DEFAULT_LOCALE_ID);\n                        setLocaleId(localeId || DEFAULT_LOCALE_ID);\n                    }\n                    this._moduleDoBootstrap(moduleRef);\n                    return moduleRef;\n                });\n            });\n        });\n    }\n    /**\n     * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n     *\n     * @usageNotes\n     * ### Simple Example\n     *\n     * ```typescript\n     * @NgModule({\n     *   imports: [BrowserModule]\n     * })\n     * class MyModule {}\n     *\n     * let moduleRef = platformBrowser().bootstrapModule(MyModule);\n     * ```\n     *\n     */\n    bootstrapModule(moduleType, compilerOptions = []) {\n        const options = optionsReducer({}, compilerOptions);\n        return compileNgModuleFactory(this.injector, options, moduleType)\n            .then(moduleFactory => this.bootstrapModuleFactory(moduleFactory, options));\n    }\n    _moduleDoBootstrap(moduleRef) {\n        const appRef = moduleRef.injector.get(ApplicationRef);\n        if (moduleRef._bootstrapComponents.length > 0) {\n            moduleRef._bootstrapComponents.forEach(f => appRef.bootstrap(f));\n        }\n        else if (moduleRef.instance.ngDoBootstrap) {\n            moduleRef.instance.ngDoBootstrap(appRef);\n        }\n        else {\n            throw new Error(`The module ${stringify(moduleRef.instance\n                .constructor)} was bootstrapped, but it does not declare \"@NgModule.bootstrap\" components nor a \"ngDoBootstrap\" method. ` +\n                `Please define one of these.`);\n        }\n        this._modules.push(moduleRef);\n    }\n    /**\n     * Registers a listener to be called when the platform is destroyed.\n     */\n    onDestroy(callback) {\n        this._destroyListeners.push(callback);\n    }\n    /**\n     * Retrieves the platform {@link Injector}, which is the parent injector for\n     * every Angular application on the page and provides singleton providers.\n     */\n    get injector() {\n        return this._injector;\n    }\n    /**\n     * Destroys the current Angular platform and all Angular applications on the page.\n     * Destroys all modules and listeners registered with the platform.\n     */\n    destroy() {\n        if (this._destroyed) {\n            throw new Error('The platform has already been destroyed!');\n        }\n        this._modules.slice().forEach(module => module.destroy());\n        this._destroyListeners.forEach(listener => listener());\n        this._destroyed = true;\n    }\n    get destroyed() {\n        return this._destroyed;\n    }\n}\nPlatformRef.decorators = [\n    { type: Injectable }\n];\nPlatformRef.ctorParameters = () => [\n    { type: Injector }\n];\nfunction getNgZone(ngZoneOption, ngZoneEventCoalescing) {\n    let ngZone;\n    if (ngZoneOption === 'noop') {\n        ngZone = new NoopNgZone();\n    }\n    else {\n        ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) || new NgZone({\n            enableLongStackTrace: isDevMode(),\n            shouldCoalesceEventChangeDetection: ngZoneEventCoalescing\n        });\n    }\n    return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n    try {\n        const result = callback();\n        if (isPromise(result)) {\n            return result.catch((e) => {\n                ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n                // rethrow as the exception handler might not do it\n                throw e;\n            });\n        }\n        return result;\n    }\n    catch (e) {\n        ngZone.runOutsideAngular(() => errorHandler.handleError(e));\n        // rethrow as the exception handler might not do it\n        throw e;\n    }\n}\nfunction optionsReducer(dst, objs) {\n    if (Array.isArray(objs)) {\n        dst = objs.reduce(optionsReducer, dst);\n    }\n    else {\n        dst = Object.assign(Object.assign({}, dst), objs);\n    }\n    return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n * @usageNotes\n *\n * {@a is-stable-examples}\n * ### isStable examples and caveats\n *\n * Note two important points about `isStable`, demonstrated in the examples below:\n * - the application will never be stable if you start any kind\n * of recurrent asynchronous task when the application starts\n * (for example for a polling process, started with a `setInterval`, a `setTimeout`\n * or using RxJS operators like `interval`);\n * - the `isStable` Observable runs outside of the Angular zone.\n *\n * Let's imagine that you start a recurrent task\n * (here incrementing a counter, using RxJS `interval`),\n * and at the same time subscribe to `isStable`.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *      filter(stable => stable)\n *   ).subscribe(() => console.log('App is stable now');\n *   interval(1000).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, `isStable` will never emit `true`,\n * and the trace \"App is stable now\" will never get logged.\n *\n * If you want to execute something when the app is stable,\n * you have to wait for the application to be stable\n * before starting your polling process.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     tap(stable => console.log('App is stable now')),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => console.log(counter));\n * }\n * ```\n * In this example, the trace \"App is stable now\" will be logged\n * and then the counter starts incrementing every second.\n *\n * Note also that this Observable runs outside of the Angular zone,\n * which means that the code in the subscription\n * to this Observable will not trigger the change detection.\n *\n * Let's imagine that instead of logging the counter value,\n * you update a field of your component\n * and display it in its template.\n *\n * ```\n * constructor(appRef: ApplicationRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => this.value = counter);\n * }\n * ```\n * As the `isStable` Observable runs outside the zone,\n * the `value` field will be updated properly,\n * but the template will not be refreshed!\n *\n * You'll have to manually trigger the change detection to update the template.\n *\n * ```\n * constructor(appRef: ApplicationRef, cd: ChangeDetectorRef) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => {\n *     this.value = counter;\n *     cd.detectChanges();\n *   });\n * }\n * ```\n *\n * Or make the subscription callback run inside the zone.\n *\n * ```\n * constructor(appRef: ApplicationRef, zone: NgZone) {\n *   appRef.isStable.pipe(\n *     first(stable => stable),\n *     switchMap(() => interval(1000))\n *   ).subscribe(counter => zone.run(() => this.value = counter));\n * }\n * ```\n *\n * @publicApi\n */\nclass ApplicationRef {\n    /** @internal */\n    constructor(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n        this._zone = _zone;\n        this._console = _console;\n        this._injector = _injector;\n        this._exceptionHandler = _exceptionHandler;\n        this._componentFactoryResolver = _componentFactoryResolver;\n        this._initStatus = _initStatus;\n        /** @internal */\n        this._bootstrapListeners = [];\n        this._views = [];\n        this._runningTick = false;\n        this._enforceNoNewChanges = false;\n        this._stable = true;\n        /**\n         * Get a list of component types registered to this application.\n         * This list is populated even before the component is created.\n         */\n        this.componentTypes = [];\n        /**\n         * Get a list of components registered to this application.\n         */\n        this.components = [];\n        this._enforceNoNewChanges = isDevMode();\n        this._zone.onMicrotaskEmpty.subscribe({\n            next: () => {\n                this._zone.run(() => {\n                    this.tick();\n                });\n            }\n        });\n        const isCurrentlyStable = new Observable((observer) => {\n            this._stable = this._zone.isStable && !this._zone.hasPendingMacrotasks &&\n                !this._zone.hasPendingMicrotasks;\n            this._zone.runOutsideAngular(() => {\n                observer.next(this._stable);\n                observer.complete();\n            });\n        });\n        const isStable = new Observable((observer) => {\n            // Create the subscription to onStable outside the Angular Zone so that\n            // the callback is run outside the Angular Zone.\n            let stableSub;\n            this._zone.runOutsideAngular(() => {\n                stableSub = this._zone.onStable.subscribe(() => {\n                    NgZone.assertNotInAngularZone();\n                    // Check whether there are no pending macro/micro tasks in the next tick\n                    // to allow for NgZone to update the state.\n                    scheduleMicroTask(() => {\n                        if (!this._stable && !this._zone.hasPendingMacrotasks &&\n                            !this._zone.hasPendingMicrotasks) {\n                            this._stable = true;\n                            observer.next(true);\n                        }\n                    });\n                });\n            });\n            const unstableSub = this._zone.onUnstable.subscribe(() => {\n                NgZone.assertInAngularZone();\n                if (this._stable) {\n                    this._stable = false;\n                    this._zone.runOutsideAngular(() => {\n                        observer.next(false);\n                    });\n                }\n            });\n            return () => {\n                stableSub.unsubscribe();\n                unstableSub.unsubscribe();\n            };\n        });\n        this.isStable =\n            merge$1(isCurrentlyStable, isStable.pipe(share()));\n    }\n    /**\n     * Bootstrap a new component at the root level of the application.\n     *\n     * @usageNotes\n     * ### Bootstrap process\n     *\n     * When bootstrapping a new root component into an application, Angular mounts the\n     * specified application component onto DOM elements identified by the componentType's\n     * selector and kicks off automatic change detection to finish initializing the component.\n     *\n     * Optionally, a component can be mounted onto a DOM element that does not match the\n     * componentType's selector.\n     *\n     * ### Example\n     * {@example core/ts/platform/platform.ts region='longform'}\n     */\n    bootstrap(componentOrFactory, rootSelectorOrNode) {\n        if (!this._initStatus.done) {\n            throw new Error('Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.');\n        }\n        let componentFactory;\n        if (componentOrFactory instanceof ComponentFactory) {\n            componentFactory = componentOrFactory;\n        }\n        else {\n            componentFactory =\n                this._componentFactoryResolver.resolveComponentFactory(componentOrFactory);\n        }\n        this.componentTypes.push(componentFactory.componentType);\n        // Create a factory associated with the current module if it's not bound to some other\n        const ngModule = isBoundToModule(componentFactory) ? undefined : this._injector.get(NgModuleRef);\n        const selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n        const compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n        compRef.onDestroy(() => {\n            this._unloadComponent(compRef);\n        });\n        const testability = compRef.injector.get(Testability, null);\n        if (testability) {\n            compRef.injector.get(TestabilityRegistry)\n                .registerApplication(compRef.location.nativeElement, testability);\n        }\n        this._loadComponent(compRef);\n        if (isDevMode()) {\n            this._console.log(`Angular is running in development mode. Call enableProdMode() to enable production mode.`);\n        }\n        return compRef;\n    }\n    /**\n     * Invoke this method to explicitly process change detection and its side-effects.\n     *\n     * In development mode, `tick()` also performs a second change detection cycle to ensure that no\n     * further changes are detected. If additional changes are picked up during this second cycle,\n     * bindings in the app have side-effects that cannot be resolved in a single change detection\n     * pass.\n     * In this case, Angular throws an error, since an Angular application can only have one change\n     * detection pass during which all change detection must complete.\n     */\n    tick() {\n        if (this._runningTick) {\n            throw new Error('ApplicationRef.tick is called recursively');\n        }\n        try {\n            this._runningTick = true;\n            for (let view of this._views) {\n                view.detectChanges();\n            }\n            if (this._enforceNoNewChanges) {\n                for (let view of this._views) {\n                    view.checkNoChanges();\n                }\n            }\n        }\n        catch (e) {\n            // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n            this._zone.runOutsideAngular(() => this._exceptionHandler.handleError(e));\n        }\n        finally {\n            this._runningTick = false;\n        }\n    }\n    /**\n     * Attaches a view so that it will be dirty checked.\n     * The view will be automatically detached when it is destroyed.\n     * This will throw if the view is already attached to a ViewContainer.\n     */\n    attachView(viewRef) {\n        const view = viewRef;\n        this._views.push(view);\n        view.attachToAppRef(this);\n    }\n    /**\n     * Detaches a view from dirty checking again.\n     */\n    detachView(viewRef) {\n        const view = viewRef;\n        remove(this._views, view);\n        view.detachFromAppRef();\n    }\n    _loadComponent(componentRef) {\n        this.attachView(componentRef.hostView);\n        this.tick();\n        this.components.push(componentRef);\n        // Get the listeners lazily to prevent DI cycles.\n        const listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n        listeners.forEach((listener) => listener(componentRef));\n    }\n    _unloadComponent(componentRef) {\n        this.detachView(componentRef.hostView);\n        remove(this.components, componentRef);\n    }\n    /** @internal */\n    ngOnDestroy() {\n        // TODO(alxhub): Dispose of the NgZone.\n        this._views.slice().forEach((view) => view.destroy());\n    }\n    /**\n     * Returns the number of attached views.\n     */\n    get viewCount() {\n        return this._views.length;\n    }\n}\nApplicationRef.decorators = [\n    { type: Injectable }\n];\nApplicationRef.ctorParameters = () => [\n    { type: NgZone },\n    { type: Console },\n    { type: Injector },\n    { type: ErrorHandler },\n    { type: ComponentFactoryResolver },\n    { type: ApplicationInitStatus }\n];\nfunction remove(list, el) {\n    const index = list.indexOf(el);\n    if (index > -1) {\n        list.splice(index, 1);\n    }\n}\nfunction _lastDefined(args) {\n    for (let i = args.length - 1; i >= 0; i--) {\n        if (args[i] !== undefined) {\n            return args[i];\n        }\n    }\n    return undefined;\n}\nfunction _mergeArrays(parts) {\n    const result = [];\n    parts.forEach((part) => part && result.push(...part));\n    return result;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Used to load ng module factories.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `NgModuleFactoryLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nclass NgModuleFactoryLoader {\n}\nfunction getModuleFactory__PRE_R3__(id) {\n    const factory = getRegisteredNgModuleType(id);\n    if (!factory)\n        throw noModuleError(id);\n    return factory;\n}\nfunction getModuleFactory__POST_R3__(id) {\n    const type = getRegisteredNgModuleType(id);\n    if (!type)\n        throw noModuleError(id);\n    return new NgModuleFactory$1(type);\n}\n/**\n * Returns the NgModuleFactory with the given id, if it exists and has been loaded.\n * Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module\n * cannot be found.\n * @publicApi\n */\nconst getModuleFactory = getModuleFactory__PRE_R3__;\nfunction noModuleError(id) {\n    return new Error(`No module with ID ${id} loaded`);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _SEPARATOR = '#';\nconst FACTORY_CLASS_SUFFIX = 'NgFactory';\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoaderConfig`\n * is part of its implementation. See `LoadChildren` for more details.\n */\nclass SystemJsNgModuleLoaderConfig {\n}\nconst DEFAULT_CONFIG = {\n    factoryPathPrefix: '',\n    factoryPathSuffix: '.ngfactory',\n};\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @publicApi\n * @deprecated the `string` form of `loadChildren` is deprecated, and `SystemJsNgModuleLoader` is\n * part of its implementation. See `LoadChildren` for more details.\n */\nclass SystemJsNgModuleLoader {\n    constructor(_compiler, config) {\n        this._compiler = _compiler;\n        this._config = config || DEFAULT_CONFIG;\n    }\n    load(path) {\n        const legacyOfflineMode = !ivyEnabled && this._compiler instanceof Compiler;\n        return legacyOfflineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n    }\n    loadAndCompile(path) {\n        let [module, exportName] = path.split(_SEPARATOR);\n        if (exportName === undefined) {\n            exportName = 'default';\n        }\n        return System.import(module)\n            .then((module) => module[exportName])\n            .then((type) => checkNotEmpty(type, module, exportName))\n            .then((type) => this._compiler.compileModuleAsync(type));\n    }\n    loadFactory(path) {\n        let [module, exportName] = path.split(_SEPARATOR);\n        let factoryClassSuffix = FACTORY_CLASS_SUFFIX;\n        if (exportName === undefined) {\n            exportName = 'default';\n            factoryClassSuffix = '';\n        }\n        return System.import(this._config.factoryPathPrefix + module + this._config.factoryPathSuffix)\n            .then((module) => module[exportName + factoryClassSuffix])\n            .then((factory) => checkNotEmpty(factory, module, exportName));\n    }\n}\nSystemJsNgModuleLoader.decorators = [\n    { type: Injectable }\n];\nSystemJsNgModuleLoader.ctorParameters = () => [\n    { type: Compiler },\n    { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional }] }\n];\nfunction checkNotEmpty(value, modulePath, exportName) {\n    if (!value) {\n        throw new Error(`Cannot find '${exportName}' in '${modulePath}'`);\n    }\n    return value;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Represents an Angular [view](guide/glossary#view \"Definition\").\n *\n * @see {@link ChangeDetectorRef#usage-notes Change detection usage}\n *\n * @publicApi\n */\nclass ViewRef$1 extends ChangeDetectorRef {\n}\n/**\n * Represents an Angular [view](guide/glossary#view) in a view container.\n * An [embedded view](guide/glossary#view-tree) can be referenced from a component\n * other than the hosting component whose template defines it, or it can be defined\n * independently by a `TemplateRef`.\n *\n * Properties of elements in a view can change, but the structure (number and order) of elements in\n * a view cannot. Change the structure of elements by inserting, moving, or\n * removing nested views in a view container.\n *\n * @see `ViewContainerRef`\n *\n * @usageNotes\n *\n * The following template breaks down into two separate `TemplateRef` instances,\n * an outer one and an inner one.\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <li *ngFor=\"let  item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * This is the outer `TemplateRef`:\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n *   <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * This is the inner `TemplateRef`:\n *\n * ```\n *   <li>{{item}}</li>\n * ```\n *\n * The outer and inner `TemplateRef` instances are assembled into views as follows:\n *\n * ```\n * <!-- ViewRef: outer-0 -->\n * Count: 2\n * <ul>\n *   <ng-template view-container-ref></ng-template>\n *   <!-- ViewRef: inner-1 --><li>first</li><!-- /ViewRef: inner-1 -->\n *   <!-- ViewRef: inner-2 --><li>second</li><!-- /ViewRef: inner-2 -->\n * </ul>\n * <!-- /ViewRef: outer-0 -->\n * ```\n * @publicApi\n */\nclass EmbeddedViewRef extends ViewRef$1 {\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * @publicApi\n */\nclass DebugEventListener {\n    constructor(name, callback) {\n        this.name = name;\n        this.callback = callback;\n    }\n}\nclass DebugNode__PRE_R3__ {\n    constructor(nativeNode, parent, _debugContext) {\n        this.listeners = [];\n        this.parent = null;\n        this._debugContext = _debugContext;\n        this.nativeNode = nativeNode;\n        if (parent && parent instanceof DebugElement__PRE_R3__) {\n            parent.addChild(this);\n        }\n    }\n    get injector() {\n        return this._debugContext.injector;\n    }\n    get componentInstance() {\n        return this._debugContext.component;\n    }\n    get context() {\n        return this._debugContext.context;\n    }\n    get references() {\n        return this._debugContext.references;\n    }\n    get providerTokens() {\n        return this._debugContext.providerTokens;\n    }\n}\nclass DebugElement__PRE_R3__ extends DebugNode__PRE_R3__ {\n    constructor(nativeNode, parent, _debugContext) {\n        super(nativeNode, parent, _debugContext);\n        this.properties = {};\n        this.attributes = {};\n        this.classes = {};\n        this.styles = {};\n        this.childNodes = [];\n        this.nativeElement = nativeNode;\n    }\n    addChild(child) {\n        if (child) {\n            this.childNodes.push(child);\n            child.parent = this;\n        }\n    }\n    removeChild(child) {\n        const childIndex = this.childNodes.indexOf(child);\n        if (childIndex !== -1) {\n            child.parent = null;\n            this.childNodes.splice(childIndex, 1);\n        }\n    }\n    insertChildrenAfter(child, newChildren) {\n        const siblingIndex = this.childNodes.indexOf(child);\n        if (siblingIndex !== -1) {\n            this.childNodes.splice(siblingIndex + 1, 0, ...newChildren);\n            newChildren.forEach(c => {\n                if (c.parent) {\n                    c.parent.removeChild(c);\n                }\n                child.parent = this;\n            });\n        }\n    }\n    insertBefore(refChild, newChild) {\n        const refIndex = this.childNodes.indexOf(refChild);\n        if (refIndex === -1) {\n            this.addChild(newChild);\n        }\n        else {\n            if (newChild.parent) {\n                newChild.parent.removeChild(newChild);\n            }\n            newChild.parent = this;\n            this.childNodes.splice(refIndex, 0, newChild);\n        }\n    }\n    query(predicate) {\n        const results = this.queryAll(predicate);\n        return results[0] || null;\n    }\n    queryAll(predicate) {\n        const matches = [];\n        _queryElementChildren(this, predicate, matches);\n        return matches;\n    }\n    queryAllNodes(predicate) {\n        const matches = [];\n        _queryNodeChildren(this, predicate, matches);\n        return matches;\n    }\n    get children() {\n        return this.childNodes //\n            .filter((node) => node instanceof DebugElement__PRE_R3__);\n    }\n    triggerEventHandler(eventName, eventObj) {\n        this.listeners.forEach((listener) => {\n            if (listener.name == eventName) {\n                listener.callback(eventObj);\n            }\n        });\n    }\n}\n/**\n * @publicApi\n */\nfunction asNativeElements(debugEls) {\n    return debugEls.map((el) => el.nativeElement);\n}\nfunction _queryElementChildren(element, predicate, matches) {\n    element.childNodes.forEach(node => {\n        if (node instanceof DebugElement__PRE_R3__) {\n            if (predicate(node)) {\n                matches.push(node);\n            }\n            _queryElementChildren(node, predicate, matches);\n        }\n    });\n}\nfunction _queryNodeChildren(parentNode, predicate, matches) {\n    if (parentNode instanceof DebugElement__PRE_R3__) {\n        parentNode.childNodes.forEach(node => {\n            if (predicate(node)) {\n                matches.push(node);\n            }\n            if (node instanceof DebugElement__PRE_R3__) {\n                _queryNodeChildren(node, predicate, matches);\n            }\n        });\n    }\n}\nclass DebugNode__POST_R3__ {\n    constructor(nativeNode) {\n        this.nativeNode = nativeNode;\n    }\n    get parent() {\n        const parent = this.nativeNode.parentNode;\n        return parent ? new DebugElement__POST_R3__(parent) : null;\n    }\n    get injector() {\n        return getInjector(this.nativeNode);\n    }\n    get componentInstance() {\n        const nativeElement = this.nativeNode;\n        return nativeElement &&\n            (getComponent(nativeElement) || getOwningComponent(nativeElement));\n    }\n    get context() {\n        return getComponent(this.nativeNode) || getContext(this.nativeNode);\n    }\n    get listeners() {\n        return getListeners(this.nativeNode).filter(listener => listener.type === 'dom');\n    }\n    get references() {\n        return getLocalRefs(this.nativeNode);\n    }\n    get providerTokens() {\n        return getInjectionTokens(this.nativeNode);\n    }\n}\nclass DebugElement__POST_R3__ extends DebugNode__POST_R3__ {\n    constructor(nativeNode) {\n        ngDevMode && assertDomNode(nativeNode);\n        super(nativeNode);\n    }\n    get nativeElement() {\n        return this.nativeNode.nodeType == Node.ELEMENT_NODE ? this.nativeNode : null;\n    }\n    get name() {\n        try {\n            const context = loadLContext(this.nativeNode);\n            const lView = context.lView;\n            const tData = lView[TVIEW].data;\n            const tNode = tData[context.nodeIndex];\n            return tNode.tagName;\n        }\n        catch (e) {\n            return this.nativeNode.nodeName;\n        }\n    }\n    /**\n     *  Gets a map of property names to property values for an element.\n     *\n     *  This map includes:\n     *  - Regular property bindings (e.g. `[id]=\"id\"`)\n     *  - Host property bindings (e.g. `host: { '[id]': \"id\" }`)\n     *  - Interpolated property bindings (e.g. `id=\"{{ value }}\")\n     *\n     *  It does not include:\n     *  - input property bindings (e.g. `[myCustomInput]=\"value\"`)\n     *  - attribute bindings (e.g. `[attr.role]=\"menu\"`)\n     */\n    get properties() {\n        const context = loadLContext(this.nativeNode, false);\n        if (context == null) {\n            return {};\n        }\n        const lView = context.lView;\n        const tData = lView[TVIEW].data;\n        const tNode = tData[context.nodeIndex];\n        const properties = {};\n        // Collect properties from the DOM.\n        copyDomProperties(this.nativeElement, properties);\n        // Collect properties from the bindings. This is needed for animation renderer which has\n        // synthetic properties which don't get reflected into the DOM.\n        collectPropertyBindings(properties, tNode, lView, tData);\n        return properties;\n    }\n    get attributes() {\n        const attributes = {};\n        const element = this.nativeElement;\n        if (!element) {\n            return attributes;\n        }\n        const context = loadLContext(element, false);\n        if (context == null) {\n            return {};\n        }\n        const lView = context.lView;\n        const tNodeAttrs = lView[TVIEW].data[context.nodeIndex].attrs;\n        const lowercaseTNodeAttrs = [];\n        // For debug nodes we take the element's attribute directly from the DOM since it allows us\n        // to account for ones that weren't set via bindings (e.g. ViewEngine keeps track of the ones\n        // that are set through `Renderer2`). The problem is that the browser will lowercase all names,\n        // however since we have the attributes already on the TNode, we can preserve the case by going\n        // through them once, adding them to the `attributes` map and putting their lower-cased name\n        // into an array. Afterwards when we're going through the native DOM attributes, we can check\n        // whether we haven't run into an attribute already through the TNode.\n        if (tNodeAttrs) {\n            let i = 0;\n            while (i < tNodeAttrs.length) {\n                const attrName = tNodeAttrs[i];\n                // Stop as soon as we hit a marker. We only care about the regular attributes. Everything\n                // else will be handled below when we read the final attributes off the DOM.\n                if (typeof attrName !== 'string')\n                    break;\n                const attrValue = tNodeAttrs[i + 1];\n                attributes[attrName] = attrValue;\n                lowercaseTNodeAttrs.push(attrName.toLowerCase());\n                i += 2;\n            }\n        }\n        const eAttrs = element.attributes;\n        for (let i = 0; i < eAttrs.length; i++) {\n            const attr = eAttrs[i];\n            const lowercaseName = attr.name.toLowerCase();\n            // Make sure that we don't assign the same attribute both in its\n            // case-sensitive form and the lower-cased one from the browser.\n            if (lowercaseTNodeAttrs.indexOf(lowercaseName) === -1) {\n                // Save the lowercase name to align the behavior between browsers.\n                // IE preserves the case, while all other browser convert it to lower case.\n                attributes[lowercaseName] = attr.value;\n            }\n        }\n        return attributes;\n    }\n    get styles() {\n        if (this.nativeElement && this.nativeElement.style) {\n            return this.nativeElement.style;\n        }\n        return {};\n    }\n    get classes() {\n        const result = {};\n        const element = this.nativeElement;\n        // SVG elements return an `SVGAnimatedString` instead of a plain string for the `className`.\n        const className = element.className;\n        const classes = className && typeof className !== 'string' ? className.baseVal.split(' ') :\n            className.split(' ');\n        classes.forEach((value) => result[value] = true);\n        return result;\n    }\n    get childNodes() {\n        const childNodes = this.nativeNode.childNodes;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode__POST_R3__(element));\n        }\n        return children;\n    }\n    get children() {\n        const nativeElement = this.nativeElement;\n        if (!nativeElement)\n            return [];\n        const childNodes = nativeElement.children;\n        const children = [];\n        for (let i = 0; i < childNodes.length; i++) {\n            const element = childNodes[i];\n            children.push(getDebugNode__POST_R3__(element));\n        }\n        return children;\n    }\n    query(predicate) {\n        const results = this.queryAll(predicate);\n        return results[0] || null;\n    }\n    queryAll(predicate) {\n        const matches = [];\n        _queryAllR3(this, predicate, matches, true);\n        return matches;\n    }\n    queryAllNodes(predicate) {\n        const matches = [];\n        _queryAllR3(this, predicate, matches, false);\n        return matches;\n    }\n    triggerEventHandler(eventName, eventObj) {\n        const node = this.nativeNode;\n        const invokedListeners = [];\n        this.listeners.forEach(listener => {\n            if (listener.name === eventName) {\n                const callback = listener.callback;\n                callback.call(node, eventObj);\n                invokedListeners.push(callback);\n            }\n        });\n        // We need to check whether `eventListeners` exists, because it's something\n        // that Zone.js only adds to `EventTarget` in browser environments.\n        if (typeof node.eventListeners === 'function') {\n            // Note that in Ivy we wrap event listeners with a call to `event.preventDefault` in some\n            // cases. We use '__ngUnwrap__' as a special token that gives us access to the actual event\n            // listener.\n            node.eventListeners(eventName).forEach((listener) => {\n                // In order to ensure that we can detect the special __ngUnwrap__ token described above, we\n                // use `toString` on the listener and see if it contains the token. We use this approach to\n                // ensure that it still worked with compiled code since it cannot remove or rename string\n                // literals. We also considered using a special function name (i.e. if(listener.name ===\n                // special)) but that was more cumbersome and we were also concerned the compiled code could\n                // strip the name, turning the condition in to (\"\" === \"\") and always returning true.\n                if (listener.toString().indexOf('__ngUnwrap__') !== -1) {\n                    const unwrappedListener = listener('__ngUnwrap__');\n                    return invokedListeners.indexOf(unwrappedListener) === -1 &&\n                        unwrappedListener.call(node, eventObj);\n                }\n            });\n        }\n    }\n}\nfunction copyDomProperties(element, properties) {\n    if (element) {\n        // Skip own properties (as those are patched)\n        let obj = Object.getPrototypeOf(element);\n        const NodePrototype = Node.prototype;\n        while (obj !== null && obj !== NodePrototype) {\n            const descriptors = Object.getOwnPropertyDescriptors(obj);\n            for (let key in descriptors) {\n                if (!key.startsWith('__') && !key.startsWith('on')) {\n                    // don't include properties starting with `__` and `on`.\n                    // `__` are patched values which should not be included.\n                    // `on` are listeners which also should not be included.\n                    const value = element[key];\n                    if (isPrimitiveValue(value)) {\n                        properties[key] = value;\n                    }\n                }\n            }\n            obj = Object.getPrototypeOf(obj);\n        }\n    }\n}\nfunction isPrimitiveValue(value) {\n    return typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' ||\n        value === null;\n}\nfunction _queryAllR3(parentElement, predicate, matches, elementsOnly) {\n    const context = loadLContext(parentElement.nativeNode, false);\n    if (context !== null) {\n        const parentTNode = context.lView[TVIEW].data[context.nodeIndex];\n        _queryNodeChildrenR3(parentTNode, context.lView, predicate, matches, elementsOnly, parentElement.nativeNode);\n    }\n    else {\n        // If the context is null, then `parentElement` was either created with Renderer2 or native DOM\n        // APIs.\n        _queryNativeNodeDescendants(parentElement.nativeNode, predicate, matches, elementsOnly);\n    }\n}\n/**\n * Recursively match the current TNode against the predicate, and goes on with the next ones.\n *\n * @param tNode the current TNode\n * @param lView the LView of this TNode\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenR3(tNode, lView, predicate, matches, elementsOnly, rootNativeNode) {\n    const nativeNode = getNativeByTNodeOrNull(tNode, lView);\n    // For each type of TNode, specific logic is executed.\n    if (tNode.type === 3 /* Element */ || tNode.type === 4 /* ElementContainer */) {\n        // Case 1: the TNode is an element\n        // The native node has to be checked.\n        _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n        if (isComponentHost(tNode)) {\n            // If the element is the host of a component, then all nodes in its view have to be processed.\n            // Note: the component's content (tNode.child) will be processed from the insertion points.\n            const componentView = getComponentLViewByIndex(tNode.index, lView);\n            if (componentView && componentView[TVIEW].firstChild) {\n                _queryNodeChildrenR3(componentView[TVIEW].firstChild, componentView, predicate, matches, elementsOnly, rootNativeNode);\n            }\n        }\n        else {\n            if (tNode.child) {\n                // Otherwise, its children have to be processed.\n                _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n            }\n            // We also have to query the DOM directly in order to catch elements inserted through\n            // Renderer2. Note that this is __not__ optimal, because we're walking similar trees multiple\n            // times. ViewEngine could do it more efficiently, because all the insertions go through\n            // Renderer2, however that's not the case in Ivy. This approach is being used because:\n            // 1. Matching the ViewEngine behavior would mean potentially introducing a depedency\n            //    from `Renderer2` to Ivy which could bring Ivy code into ViewEngine.\n            // 2. We would have to make `Renderer3` \"know\" about debug nodes.\n            // 3. It allows us to capture nodes that were inserted directly via the DOM.\n            nativeNode && _queryNativeNodeDescendants(nativeNode, predicate, matches, elementsOnly);\n        }\n        // In all cases, if a dynamic container exists for this node, each view inside it has to be\n        // processed.\n        const nodeOrContainer = lView[tNode.index];\n        if (isLContainer(nodeOrContainer)) {\n            _queryNodeChildrenInContainerR3(nodeOrContainer, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.type === 0 /* Container */) {\n        // Case 2: the TNode is a container\n        // The native node has to be checked.\n        const lContainer = lView[tNode.index];\n        _addQueryMatchR3(lContainer[NATIVE], predicate, matches, elementsOnly, rootNativeNode);\n        // Each view inside the container has to be processed.\n        _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode);\n    }\n    else if (tNode.type === 1 /* Projection */) {\n        // Case 3: the TNode is a projection insertion point (i.e. a <ng-content>).\n        // The nodes projected at this location all need to be processed.\n        const componentView = lView[DECLARATION_COMPONENT_VIEW];\n        const componentHost = componentView[T_HOST];\n        const head = componentHost.projection[tNode.projection];\n        if (Array.isArray(head)) {\n            for (let nativeNode of head) {\n                _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode);\n            }\n        }\n        else if (head) {\n            const nextLView = componentView[PARENT];\n            const nextTNode = nextLView[TVIEW].data[head.index];\n            _queryNodeChildrenR3(nextTNode, nextLView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n    else if (tNode.child) {\n        // Case 4: the TNode is a view.\n        _queryNodeChildrenR3(tNode.child, lView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n    // We don't want to go to the next sibling of the root node.\n    if (rootNativeNode !== nativeNode) {\n        // To determine the next node to be processed, we need to use the next or the projectionNext\n        // link, depending on whether the current node has been projected.\n        const nextTNode = (tNode.flags & 4 /* isProjected */) ? tNode.projectionNext : tNode.next;\n        if (nextTNode) {\n            _queryNodeChildrenR3(nextTNode, lView, predicate, matches, elementsOnly, rootNativeNode);\n        }\n    }\n}\n/**\n * Process all TNodes in a given container.\n *\n * @param lContainer the container to be processed\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _queryNodeChildrenInContainerR3(lContainer, predicate, matches, elementsOnly, rootNativeNode) {\n    for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) {\n        const childView = lContainer[i];\n        _queryNodeChildrenR3(childView[TVIEW].node, childView, predicate, matches, elementsOnly, rootNativeNode);\n    }\n}\n/**\n * Match the current native node against the predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n * @param rootNativeNode the root native node on which predicate should not be matched\n */\nfunction _addQueryMatchR3(nativeNode, predicate, matches, elementsOnly, rootNativeNode) {\n    if (rootNativeNode !== nativeNode) {\n        const debugNode = getDebugNode$1(nativeNode);\n        if (!debugNode) {\n            return;\n        }\n        // Type of the \"predicate and \"matches\" array are set based on the value of\n        // the \"elementsOnly\" parameter. TypeScript is not able to properly infer these\n        // types with generics, so we manually cast the parameters accordingly.\n        if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n            matches.indexOf(debugNode) === -1) {\n            matches.push(debugNode);\n        }\n        else if (!elementsOnly && predicate(debugNode) &&\n            matches.indexOf(debugNode) === -1) {\n            matches.push(debugNode);\n        }\n    }\n}\n/**\n * Match all the descendants of a DOM node against a predicate.\n *\n * @param nativeNode the current native node\n * @param predicate the predicate to match\n * @param matches the list of positive matches\n * @param elementsOnly whether only elements should be searched\n */\nfunction _queryNativeNodeDescendants(parentNode, predicate, matches, elementsOnly) {\n    const nodes = parentNode.childNodes;\n    const length = nodes.length;\n    for (let i = 0; i < length; i++) {\n        const node = nodes[i];\n        const debugNode = getDebugNode$1(node);\n        if (debugNode) {\n            if (elementsOnly && debugNode instanceof DebugElement__POST_R3__ && predicate(debugNode) &&\n                matches.indexOf(debugNode) === -1) {\n                matches.push(debugNode);\n            }\n            else if (!elementsOnly && predicate(debugNode) &&\n                matches.indexOf(debugNode) === -1) {\n                matches.push(debugNode);\n            }\n            _queryNativeNodeDescendants(node, predicate, matches, elementsOnly);\n        }\n    }\n}\n/**\n * Iterates through the property bindings for a given node and generates\n * a map of property names to values. This map only contains property bindings\n * defined in templates, not in host bindings.\n */\nfunction collectPropertyBindings(properties, tNode, lView, tData) {\n    let bindingIndexes = tNode.propertyBindings;\n    if (bindingIndexes !== null) {\n        for (let i = 0; i < bindingIndexes.length; i++) {\n            const bindingIndex = bindingIndexes[i];\n            const propMetadata = tData[bindingIndex];\n            const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER);\n            const propertyName = metadataParts[0];\n            if (metadataParts.length > 1) {\n                let value = metadataParts[1];\n                for (let j = 1; j < metadataParts.length - 1; j++) {\n                    value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1];\n                }\n                properties[propertyName] = value;\n            }\n            else {\n                properties[propertyName] = lView[bindingIndex];\n            }\n        }\n    }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nconst _nativeNodeToDebugNode = new Map();\nfunction getDebugNode__PRE_R3__(nativeNode) {\n    return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\nconst NG_DEBUG_PROPERTY = '__ng_debug__';\nfunction getDebugNode__POST_R3__(nativeNode) {\n    if (nativeNode instanceof Node) {\n        if (!(nativeNode.hasOwnProperty(NG_DEBUG_PROPERTY))) {\n            nativeNode[NG_DEBUG_PROPERTY] = nativeNode.nodeType == Node.ELEMENT_NODE ?\n                new DebugElement__POST_R3__(nativeNode) :\n                new DebugNode__POST_R3__(nativeNode);\n        }\n        return nativeNode[NG_DEBUG_PROPERTY];\n    }\n    return null;\n}\n/**\n * @publicApi\n */\nconst getDebugNode$1 = getDebugNode__PRE_R3__;\nfunction getDebugNodeR2__PRE_R3__(nativeNode) {\n    return getDebugNode__PRE_R3__(nativeNode);\n}\nfunction getDebugNodeR2__POST_R3__(_nativeNode) {\n    return null;\n}\nconst getDebugNodeR2 = getDebugNodeR2__PRE_R3__;\nfunction getAllDebugNodes() {\n    return Array.from(_nativeNodeToDebugNode.values());\n}\nfunction indexDebugNode(node) {\n    _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n    _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n/**\n * @publicApi\n */\nconst DebugNode = DebugNode__PRE_R3__;\n/**\n * @publicApi\n */\nconst DebugElement = DebugElement__PRE_R3__;\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst _CORE_PLATFORM_PROVIDERS = [\n    // Set a default platform name for platforms that don't set it explicitly.\n    { provide: PLATFORM_ID, useValue: 'unknown' },\n    { provide: PlatformRef, deps: [Injector] },\n    { provide: TestabilityRegistry, deps: [] },\n    { provide: Console, deps: [] },\n];\n/**\n * This platform has to be included in any other platform\n *\n * @publicApi\n */\nconst platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction _iterableDiffersFactory() {\n    return defaultIterableDiffers;\n}\nfunction _keyValueDiffersFactory() {\n    return defaultKeyValueDiffers;\n}\nfunction _localeFactory(locale) {\n    locale = locale || getGlobalLocale();\n    if (ivyEnabled) {\n        setLocaleId(locale);\n    }\n    return locale;\n}\n/**\n * Work out the locale from the potential global properties.\n *\n * * Closure Compiler: use `goog.LOCALE`.\n * * Ivy enabled: use `$localize.locale`\n */\nfunction getGlobalLocale() {\n    if (typeof ngI18nClosureMode !== 'undefined' && ngI18nClosureMode &&\n        typeof goog !== 'undefined' && goog.LOCALE !== 'en') {\n        // * The default `goog.LOCALE` value is `en`, while Angular used `en-US`.\n        // * In order to preserve backwards compatibility, we use Angular default value over\n        //   Closure Compiler's one.\n        return goog.LOCALE;\n    }\n    else {\n        // KEEP `typeof $localize !== 'undefined' && $localize.locale` IN SYNC WITH THE LOCALIZE\n        // COMPILE-TIME INLINER.\n        //\n        // * During compile time inlining of translations the expression will be replaced\n        //   with a string literal that is the current locale. Other forms of this expression are not\n        //   guaranteed to be replaced.\n        //\n        // * During runtime translation evaluation, the developer is required to set `$localize.locale`\n        //   if required, or just to provide their own `LOCALE_ID` provider.\n        return (ivyEnabled && typeof $localize !== 'undefined' && $localize.locale) ||\n            DEFAULT_LOCALE_ID;\n    }\n}\nconst ɵ0$g = USD_CURRENCY_CODE;\n/**\n * A built-in [dependency injection token](guide/glossary#di-token)\n * that is used to configure the root injector for bootstrapping.\n */\nconst APPLICATION_MODULE_PROVIDERS = [\n    {\n        provide: ApplicationRef,\n        useClass: ApplicationRef,\n        deps: [NgZone, Console, Injector, ErrorHandler, ComponentFactoryResolver, ApplicationInitStatus]\n    },\n    { provide: SCHEDULER, deps: [NgZone], useFactory: zoneSchedulerFactory },\n    {\n        provide: ApplicationInitStatus,\n        useClass: ApplicationInitStatus,\n        deps: [[new Optional(), APP_INITIALIZER]]\n    },\n    { provide: Compiler, useClass: Compiler, deps: [] },\n    APP_ID_RANDOM_PROVIDER,\n    { provide: IterableDiffers, useFactory: _iterableDiffersFactory, deps: [] },\n    { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory, deps: [] },\n    {\n        provide: LOCALE_ID$1,\n        useFactory: _localeFactory,\n        deps: [[new Inject(LOCALE_ID$1), new Optional(), new SkipSelf()]]\n    },\n    { provide: DEFAULT_CURRENCY_CODE, useValue: ɵ0$g },\n];\n/**\n * Schedule work at next available slot.\n *\n * In Ivy this is just `requestAnimationFrame`. For compatibility reasons when bootstrapped\n * using `platformRef.bootstrap` we need to use `NgZone.onStable` as the scheduling mechanism.\n * This overrides the scheduling mechanism in Ivy to `NgZone.onStable`.\n *\n * @param ngZone NgZone to use for scheduling.\n */\nfunction zoneSchedulerFactory(ngZone) {\n    let queue = [];\n    ngZone.onStable.subscribe(() => {\n        while (queue.length) {\n            queue.pop()();\n        }\n    });\n    return function (fn) {\n        queue.push(fn);\n    };\n}\n/**\n * Configures the root injector for an app with\n * providers of `@angular/core` dependencies that `ApplicationRef` needs\n * to bootstrap components.\n *\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * @publicApi\n */\nclass ApplicationModule {\n    // Inject ApplicationRef to make it eager...\n    constructor(appRef) { }\n}\nApplicationModule.decorators = [\n    { type: NgModule, args: [{ providers: APPLICATION_MODULE_PROVIDERS },] }\n];\nApplicationModule.ctorParameters = () => [\n    { type: ApplicationRef }\n];\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction anchorDef(flags, matchedQueriesDsl, ngContentIndex, childCount, handleEvent, templateFactory) {\n    flags |= 1 /* TypeElement */;\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    const template = templateFactory ? resolveDefinition(templateFactory) : null;\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        flags,\n        checkIndex: -1,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex,\n        childCount,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: {\n            ns: null,\n            name: null,\n            attrs: null,\n            template,\n            componentProvider: null,\n            componentView: null,\n            componentRendererType: null,\n            publicProviders: null,\n            allProviders: null,\n            handleEvent: handleEvent || NOOP\n        },\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction elementDef(checkIndex, flags, matchedQueriesDsl, ngContentIndex, childCount, namespaceAndName, fixedAttrs = [], bindings, outputs, handleEvent, componentView, componentRendererType) {\n    if (!handleEvent) {\n        handleEvent = NOOP;\n    }\n    const { matchedQueries, references, matchedQueryIds } = splitMatchedQueriesDsl(matchedQueriesDsl);\n    let ns = null;\n    let name = null;\n    if (namespaceAndName) {\n        [ns, name] = splitNamespace(namespaceAndName);\n    }\n    bindings = bindings || [];\n    const bindingDefs = [];\n    for (let i = 0; i < bindings.length; i++) {\n        const [bindingFlags, namespaceAndName, suffixOrSecurityContext] = bindings[i];\n        const [ns, name] = splitNamespace(namespaceAndName);\n        let securityContext = undefined;\n        let suffix = undefined;\n        switch (bindingFlags & 15 /* Types */) {\n            case 4 /* TypeElementStyle */:\n                suffix = suffixOrSecurityContext;\n                break;\n            case 1 /* TypeElementAttribute */:\n            case 8 /* TypeProperty */:\n                securityContext = suffixOrSecurityContext;\n                break;\n        }\n        bindingDefs[i] =\n            { flags: bindingFlags, ns, name, nonMinifiedName: name, securityContext, suffix };\n    }\n    outputs = outputs || [];\n    const outputDefs = [];\n    for (let i = 0; i < outputs.length; i++) {\n        const [target, eventName] = outputs[i];\n        outputDefs[i] =\n            { type: 0 /* ElementOutput */, target: target, eventName, propName: null };\n    }\n    fixedAttrs = fixedAttrs || [];\n    const attrs = fixedAttrs.map(([namespaceAndName, value]) => {\n        const [ns, name] = splitNamespace(namespaceAndName);\n        return [ns, name, value];\n    });\n    componentRendererType = resolveRendererType2(componentRendererType);\n    if (componentView) {\n        flags |= 33554432 /* ComponentView */;\n    }\n    flags |= 1 /* TypeElement */;\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries,\n        matchedQueryIds,\n        references,\n        ngContentIndex,\n        childCount,\n        bindings: bindingDefs,\n        bindingFlags: calcBindingFlags(bindingDefs),\n        outputs: outputDefs,\n        element: {\n            ns,\n            name,\n            attrs,\n            template: null,\n            // will bet set by the view definition\n            componentProvider: null,\n            componentView: componentView || null,\n            componentRendererType: componentRendererType,\n            publicProviders: null,\n            allProviders: null,\n            handleEvent: handleEvent || NOOP,\n        },\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createElement(view, renderHost, def) {\n    const elDef = def.element;\n    const rootSelectorOrNode = view.root.selectorOrNode;\n    const renderer = view.renderer;\n    let el;\n    if (view.parent || !rootSelectorOrNode) {\n        if (elDef.name) {\n            el = renderer.createElement(elDef.name, elDef.ns);\n        }\n        else {\n            el = renderer.createComment('');\n        }\n        const parentEl = getParentRenderElement(view, renderHost, def);\n        if (parentEl) {\n            renderer.appendChild(parentEl, el);\n        }\n    }\n    else {\n        // when using native Shadow DOM, do not clear the root element contents to allow slot projection\n        const preserveContent = (!!elDef.componentRendererType &&\n            elDef.componentRendererType.encapsulation === ViewEncapsulation$1.ShadowDom);\n        el = renderer.selectRootElement(rootSelectorOrNode, preserveContent);\n    }\n    if (elDef.attrs) {\n        for (let i = 0; i < elDef.attrs.length; i++) {\n            const [ns, name, value] = elDef.attrs[i];\n            renderer.setAttribute(el, name, value, ns);\n        }\n    }\n    return el;\n}\nfunction listenToElementOutputs(view, compView, def, el) {\n    for (let i = 0; i < def.outputs.length; i++) {\n        const output = def.outputs[i];\n        const handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n        let listenTarget = output.target;\n        let listenerView = view;\n        if (output.target === 'component') {\n            listenTarget = null;\n            listenerView = compView;\n        }\n        const disposable = listenerView.renderer.listen(listenTarget || el, output.eventName, handleEventClosure);\n        view.disposables[def.outputIndex + i] = disposable;\n    }\n}\nfunction renderEventHandlerClosure(view, index, eventName) {\n    return (event) => dispatchEvent(view, index, eventName, event);\n}\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindLen = def.bindings.length;\n    let changed = false;\n    if (bindLen > 0 && checkAndUpdateElementValue(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateElementValue(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateElementValue(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateElementValue(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateElementValue(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateElementValue(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateElementValue(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateElementValue(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateElementValue(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateElementValue(view, def, 9, v9))\n        changed = true;\n    return changed;\n}\nfunction checkAndUpdateElementDynamic(view, def, values) {\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        if (checkAndUpdateElementValue(view, def, i, values[i]))\n            changed = true;\n    }\n    return changed;\n}\nfunction checkAndUpdateElementValue(view, def, bindingIdx, value) {\n    if (!checkAndUpdateBinding(view, def, bindingIdx, value)) {\n        return false;\n    }\n    const binding = def.bindings[bindingIdx];\n    const elData = asElementData(view, def.nodeIndex);\n    const renderNode = elData.renderElement;\n    const name = binding.name;\n    switch (binding.flags & 15 /* Types */) {\n        case 1 /* TypeElementAttribute */:\n            setElementAttribute(view, binding, renderNode, binding.ns, name, value);\n            break;\n        case 2 /* TypeElementClass */:\n            setElementClass(view, renderNode, name, value);\n            break;\n        case 4 /* TypeElementStyle */:\n            setElementStyle(view, binding, renderNode, name, value);\n            break;\n        case 8 /* TypeProperty */:\n            const bindView = (def.flags & 33554432 /* ComponentView */ &&\n                binding.flags & 32 /* SyntheticHostProperty */) ?\n                elData.componentView :\n                view;\n            setElementProperty(bindView, binding, renderNode, name, value);\n            break;\n    }\n    return true;\n}\nfunction setElementAttribute(view, binding, renderNode, ns, name, value) {\n    const securityContext = binding.securityContext;\n    let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n    renderValue = renderValue != null ? renderValue.toString() : null;\n    const renderer = view.renderer;\n    if (value != null) {\n        renderer.setAttribute(renderNode, name, renderValue, ns);\n    }\n    else {\n        renderer.removeAttribute(renderNode, name, ns);\n    }\n}\nfunction setElementClass(view, renderNode, name, value) {\n    const renderer = view.renderer;\n    if (value) {\n        renderer.addClass(renderNode, name);\n    }\n    else {\n        renderer.removeClass(renderNode, name);\n    }\n}\nfunction setElementStyle(view, binding, renderNode, name, value) {\n    let renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);\n    if (renderValue != null) {\n        renderValue = renderValue.toString();\n        const unit = binding.suffix;\n        if (unit != null) {\n            renderValue = renderValue + unit;\n        }\n    }\n    else {\n        renderValue = null;\n    }\n    const renderer = view.renderer;\n    if (renderValue != null) {\n        renderer.setStyle(renderNode, name, renderValue);\n    }\n    else {\n        renderer.removeStyle(renderNode, name);\n    }\n}\nfunction setElementProperty(view, binding, renderNode, name, value) {\n    const securityContext = binding.securityContext;\n    let renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n    view.renderer.setProperty(renderNode, name, renderValue);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction queryDef(flags, id, bindings) {\n    let bindingDefs = [];\n    for (let propName in bindings) {\n        const bindingType = bindings[propName];\n        bindingDefs.push({ propName, bindingType });\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        // TODO(vicb): check\n        checkIndex: -1,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        ngContentIndex: -1,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        childCount: 0,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: { id, filterId: filterQueryId(id), bindings: bindingDefs },\n        ngContent: null\n    };\n}\nfunction createQuery() {\n    return new QueryList();\n}\nfunction dirtyParentQueries(view) {\n    const queryIds = view.def.nodeMatchedQueries;\n    while (view.parent && isEmbeddedView(view)) {\n        let tplDef = view.parentNodeDef;\n        view = view.parent;\n        // content queries\n        const end = tplDef.nodeIndex + tplDef.childCount;\n        for (let i = 0; i <= end; i++) {\n            const nodeDef = view.def.nodes[i];\n            if ((nodeDef.flags & 67108864 /* TypeContentQuery */) &&\n                (nodeDef.flags & 536870912 /* DynamicQuery */) &&\n                (nodeDef.query.filterId & queryIds) === nodeDef.query.filterId) {\n                asQueryList(view, i).setDirty();\n            }\n            if ((nodeDef.flags & 1 /* TypeElement */ && i + nodeDef.childCount < tplDef.nodeIndex) ||\n                !(nodeDef.childFlags & 67108864 /* TypeContentQuery */) ||\n                !(nodeDef.childFlags & 536870912 /* DynamicQuery */)) {\n                // skip elements that don't contain the template element or no query.\n                i += nodeDef.childCount;\n            }\n        }\n    }\n    // view queries\n    if (view.def.nodeFlags & 134217728 /* TypeViewQuery */) {\n        for (let i = 0; i < view.def.nodes.length; i++) {\n            const nodeDef = view.def.nodes[i];\n            if ((nodeDef.flags & 134217728 /* TypeViewQuery */) && (nodeDef.flags & 536870912 /* DynamicQuery */)) {\n                asQueryList(view, i).setDirty();\n            }\n            // only visit the root nodes\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction checkAndUpdateQuery(view, nodeDef) {\n    const queryList = asQueryList(view, nodeDef.nodeIndex);\n    if (!queryList.dirty) {\n        return;\n    }\n    let directiveInstance;\n    let newValues = undefined;\n    if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n        const elementDef = nodeDef.parent.parent;\n        newValues = calcQueryValues(view, elementDef.nodeIndex, elementDef.nodeIndex + elementDef.childCount, nodeDef.query, []);\n        directiveInstance = asProviderData(view, nodeDef.parent.nodeIndex).instance;\n    }\n    else if (nodeDef.flags & 134217728 /* TypeViewQuery */) {\n        newValues = calcQueryValues(view, 0, view.def.nodes.length - 1, nodeDef.query, []);\n        directiveInstance = view.component;\n    }\n    queryList.reset(newValues);\n    const bindings = nodeDef.query.bindings;\n    let notify = false;\n    for (let i = 0; i < bindings.length; i++) {\n        const binding = bindings[i];\n        let boundValue;\n        switch (binding.bindingType) {\n            case 0 /* First */:\n                boundValue = queryList.first;\n                break;\n            case 1 /* All */:\n                boundValue = queryList;\n                notify = true;\n                break;\n        }\n        directiveInstance[binding.propName] = boundValue;\n    }\n    if (notify) {\n        queryList.notifyOnChanges();\n    }\n}\nfunction calcQueryValues(view, startIndex, endIndex, queryDef, values) {\n    for (let i = startIndex; i <= endIndex; i++) {\n        const nodeDef = view.def.nodes[i];\n        const valueType = nodeDef.matchedQueries[queryDef.id];\n        if (valueType != null) {\n            values.push(getQueryValue(view, nodeDef, valueType));\n        }\n        if (nodeDef.flags & 1 /* TypeElement */ && nodeDef.element.template &&\n            (nodeDef.element.template.nodeMatchedQueries & queryDef.filterId) ===\n                queryDef.filterId) {\n            const elementData = asElementData(view, i);\n            // check embedded views that were attached at the place of their template,\n            // but process child nodes first if some match the query (see issue #16568)\n            if ((nodeDef.childMatchedQueries & queryDef.filterId) === queryDef.filterId) {\n                calcQueryValues(view, i + 1, i + nodeDef.childCount, queryDef, values);\n                i += nodeDef.childCount;\n            }\n            if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n                const embeddedViews = elementData.viewContainer._embeddedViews;\n                for (let k = 0; k < embeddedViews.length; k++) {\n                    const embeddedView = embeddedViews[k];\n                    const dvc = declaredViewContainer(embeddedView);\n                    if (dvc && dvc === elementData) {\n                        calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n                    }\n                }\n            }\n            const projectedViews = elementData.template._projectedViews;\n            if (projectedViews) {\n                for (let k = 0; k < projectedViews.length; k++) {\n                    const projectedView = projectedViews[k];\n                    calcQueryValues(projectedView, 0, projectedView.def.nodes.length - 1, queryDef, values);\n                }\n            }\n        }\n        if ((nodeDef.childMatchedQueries & queryDef.filterId) !== queryDef.filterId) {\n            // if no child matches the query, skip the children.\n            i += nodeDef.childCount;\n        }\n    }\n    return values;\n}\nfunction getQueryValue(view, nodeDef, queryValueType) {\n    if (queryValueType != null) {\n        // a match\n        switch (queryValueType) {\n            case 1 /* RenderElement */:\n                return asElementData(view, nodeDef.nodeIndex).renderElement;\n            case 0 /* ElementRef */:\n                return new ElementRef(asElementData(view, nodeDef.nodeIndex).renderElement);\n            case 2 /* TemplateRef */:\n                return asElementData(view, nodeDef.nodeIndex).template;\n            case 3 /* ViewContainerRef */:\n                return asElementData(view, nodeDef.nodeIndex).viewContainer;\n            case 4 /* Provider */:\n                return asProviderData(view, nodeDef.nodeIndex).instance;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction ngContentDef(ngContentIndex, index) {\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex: -1,\n        flags: 8 /* TypeNgContent */,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex,\n        childCount: 0,\n        bindings: [],\n        bindingFlags: 0,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: { index }\n    };\n}\nfunction appendNgContent(view, renderHost, def) {\n    const parentEl = getParentRenderElement(view, renderHost, def);\n    if (!parentEl) {\n        // Nothing to do if there is no parent element.\n        return;\n    }\n    const ngContentIndex = def.ngContent.index;\n    visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction purePipeDef(checkIndex, argCount) {\n    // argCount + 1 to include the pipe as first arg\n    return _pureExpressionDef(128 /* TypePurePipe */, checkIndex, newArray(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n    return _pureExpressionDef(32 /* TypePureArray */, checkIndex, newArray(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n    const keys = Object.keys(propToIndex);\n    const nbKeys = keys.length;\n    const propertyNames = [];\n    for (let i = 0; i < nbKeys; i++) {\n        const key = keys[i];\n        const index = propToIndex[key];\n        propertyNames.push(key);\n    }\n    return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n    const bindings = [];\n    for (let i = 0; i < propertyNames.length; i++) {\n        const prop = propertyNames[i];\n        bindings.push({\n            flags: 8 /* TypeProperty */,\n            name: prop,\n            ns: null,\n            nonMinifiedName: prop,\n            securityContext: null,\n            suffix: null\n        });\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex: -1,\n        childCount: 0,\n        bindings,\n        bindingFlags: calcBindingFlags(bindings),\n        outputs: [],\n        element: null,\n        provider: null,\n        text: null,\n        query: null,\n        ngContent: null\n    };\n}\nfunction createPureExpression(view, def) {\n    return { value: undefined };\n}\nfunction checkAndUpdatePureExpressionInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindings = def.bindings;\n    let changed = false;\n    const bindLen = bindings.length;\n    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n        changed = true;\n    if (changed) {\n        const data = asPureExpressionData(view, def.nodeIndex);\n        let value;\n        switch (def.flags & 201347067 /* Types */) {\n            case 32 /* TypePureArray */:\n                value = [];\n                if (bindLen > 0)\n                    value.push(v0);\n                if (bindLen > 1)\n                    value.push(v1);\n                if (bindLen > 2)\n                    value.push(v2);\n                if (bindLen > 3)\n                    value.push(v3);\n                if (bindLen > 4)\n                    value.push(v4);\n                if (bindLen > 5)\n                    value.push(v5);\n                if (bindLen > 6)\n                    value.push(v6);\n                if (bindLen > 7)\n                    value.push(v7);\n                if (bindLen > 8)\n                    value.push(v8);\n                if (bindLen > 9)\n                    value.push(v9);\n                break;\n            case 64 /* TypePureObject */:\n                value = {};\n                if (bindLen > 0)\n                    value[bindings[0].name] = v0;\n                if (bindLen > 1)\n                    value[bindings[1].name] = v1;\n                if (bindLen > 2)\n                    value[bindings[2].name] = v2;\n                if (bindLen > 3)\n                    value[bindings[3].name] = v3;\n                if (bindLen > 4)\n                    value[bindings[4].name] = v4;\n                if (bindLen > 5)\n                    value[bindings[5].name] = v5;\n                if (bindLen > 6)\n                    value[bindings[6].name] = v6;\n                if (bindLen > 7)\n                    value[bindings[7].name] = v7;\n                if (bindLen > 8)\n                    value[bindings[8].name] = v8;\n                if (bindLen > 9)\n                    value[bindings[9].name] = v9;\n                break;\n            case 128 /* TypePurePipe */:\n                const pipe = v0;\n                switch (bindLen) {\n                    case 1:\n                        value = pipe.transform(v0);\n                        break;\n                    case 2:\n                        value = pipe.transform(v1);\n                        break;\n                    case 3:\n                        value = pipe.transform(v1, v2);\n                        break;\n                    case 4:\n                        value = pipe.transform(v1, v2, v3);\n                        break;\n                    case 5:\n                        value = pipe.transform(v1, v2, v3, v4);\n                        break;\n                    case 6:\n                        value = pipe.transform(v1, v2, v3, v4, v5);\n                        break;\n                    case 7:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6);\n                        break;\n                    case 8:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7);\n                        break;\n                    case 9:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8);\n                        break;\n                    case 10:\n                        value = pipe.transform(v1, v2, v3, v4, v5, v6, v7, v8, v9);\n                        break;\n                }\n                break;\n        }\n        data.value = value;\n    }\n    return changed;\n}\nfunction checkAndUpdatePureExpressionDynamic(view, def, values) {\n    const bindings = def.bindings;\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        // Note: We need to loop over all values, so that\n        // the old values are updates as well!\n        if (checkAndUpdateBinding(view, def, i, values[i])) {\n            changed = true;\n        }\n    }\n    if (changed) {\n        const data = asPureExpressionData(view, def.nodeIndex);\n        let value;\n        switch (def.flags & 201347067 /* Types */) {\n            case 32 /* TypePureArray */:\n                value = values;\n                break;\n            case 64 /* TypePureObject */:\n                value = {};\n                for (let i = 0; i < values.length; i++) {\n                    value[bindings[i].name] = values[i];\n                }\n                break;\n            case 128 /* TypePurePipe */:\n                const pipe = values[0];\n                const params = values.slice(1);\n                value = pipe.transform(...params);\n                break;\n        }\n        data.value = value;\n    }\n    return changed;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction textDef(checkIndex, ngContentIndex, staticText) {\n    const bindings = [];\n    for (let i = 1; i < staticText.length; i++) {\n        bindings[i - 1] = {\n            flags: 8 /* TypeProperty */,\n            name: null,\n            ns: null,\n            nonMinifiedName: null,\n            securityContext: null,\n            suffix: staticText[i],\n        };\n    }\n    return {\n        // will bet set by the view definition\n        nodeIndex: -1,\n        parent: null,\n        renderParent: null,\n        bindingIndex: -1,\n        outputIndex: -1,\n        // regular values\n        checkIndex,\n        flags: 2 /* TypeText */,\n        childFlags: 0,\n        directChildFlags: 0,\n        childMatchedQueries: 0,\n        matchedQueries: {},\n        matchedQueryIds: 0,\n        references: {},\n        ngContentIndex,\n        childCount: 0,\n        bindings,\n        bindingFlags: 8 /* TypeProperty */,\n        outputs: [],\n        element: null,\n        provider: null,\n        text: { prefix: staticText[0] },\n        query: null,\n        ngContent: null,\n    };\n}\nfunction createText(view, renderHost, def) {\n    let renderNode;\n    const renderer = view.renderer;\n    renderNode = renderer.createText(def.text.prefix);\n    const parentEl = getParentRenderElement(view, renderHost, def);\n    if (parentEl) {\n        renderer.appendChild(parentEl, renderNode);\n    }\n    return { renderText: renderNode };\n}\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    let changed = false;\n    const bindings = def.bindings;\n    const bindLen = bindings.length;\n    if (bindLen > 0 && checkAndUpdateBinding(view, def, 0, v0))\n        changed = true;\n    if (bindLen > 1 && checkAndUpdateBinding(view, def, 1, v1))\n        changed = true;\n    if (bindLen > 2 && checkAndUpdateBinding(view, def, 2, v2))\n        changed = true;\n    if (bindLen > 3 && checkAndUpdateBinding(view, def, 3, v3))\n        changed = true;\n    if (bindLen > 4 && checkAndUpdateBinding(view, def, 4, v4))\n        changed = true;\n    if (bindLen > 5 && checkAndUpdateBinding(view, def, 5, v5))\n        changed = true;\n    if (bindLen > 6 && checkAndUpdateBinding(view, def, 6, v6))\n        changed = true;\n    if (bindLen > 7 && checkAndUpdateBinding(view, def, 7, v7))\n        changed = true;\n    if (bindLen > 8 && checkAndUpdateBinding(view, def, 8, v8))\n        changed = true;\n    if (bindLen > 9 && checkAndUpdateBinding(view, def, 9, v9))\n        changed = true;\n    if (changed) {\n        let value = def.text.prefix;\n        if (bindLen > 0)\n            value += _addInterpolationPart(v0, bindings[0]);\n        if (bindLen > 1)\n            value += _addInterpolationPart(v1, bindings[1]);\n        if (bindLen > 2)\n            value += _addInterpolationPart(v2, bindings[2]);\n        if (bindLen > 3)\n            value += _addInterpolationPart(v3, bindings[3]);\n        if (bindLen > 4)\n            value += _addInterpolationPart(v4, bindings[4]);\n        if (bindLen > 5)\n            value += _addInterpolationPart(v5, bindings[5]);\n        if (bindLen > 6)\n            value += _addInterpolationPart(v6, bindings[6]);\n        if (bindLen > 7)\n            value += _addInterpolationPart(v7, bindings[7]);\n        if (bindLen > 8)\n            value += _addInterpolationPart(v8, bindings[8]);\n        if (bindLen > 9)\n            value += _addInterpolationPart(v9, bindings[9]);\n        const renderNode = asTextData(view, def.nodeIndex).renderText;\n        view.renderer.setValue(renderNode, value);\n    }\n    return changed;\n}\nfunction checkAndUpdateTextDynamic(view, def, values) {\n    const bindings = def.bindings;\n    let changed = false;\n    for (let i = 0; i < values.length; i++) {\n        // Note: We need to loop over all values, so that\n        // the old values are updates as well!\n        if (checkAndUpdateBinding(view, def, i, values[i])) {\n            changed = true;\n        }\n    }\n    if (changed) {\n        let value = '';\n        for (let i = 0; i < values.length; i++) {\n            value = value + _addInterpolationPart(values[i], bindings[i]);\n        }\n        value = def.text.prefix + value;\n        const renderNode = asTextData(view, def.nodeIndex).renderText;\n        view.renderer.setValue(renderNode, value);\n    }\n    return changed;\n}\nfunction _addInterpolationPart(value, binding) {\n    const valueStr = value != null ? value.toString() : '';\n    return valueStr + binding.suffix;\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction viewDef(flags, nodes, updateDirectives, updateRenderer) {\n    // clone nodes and set auto calculated values\n    let viewBindingCount = 0;\n    let viewDisposableCount = 0;\n    let viewNodeFlags = 0;\n    let viewRootNodeFlags = 0;\n    let viewMatchedQueries = 0;\n    let currentParent = null;\n    let currentRenderParent = null;\n    let currentElementHasPublicProviders = false;\n    let currentElementHasPrivateProviders = false;\n    let lastRenderRootNode = null;\n    for (let i = 0; i < nodes.length; i++) {\n        const node = nodes[i];\n        node.nodeIndex = i;\n        node.parent = currentParent;\n        node.bindingIndex = viewBindingCount;\n        node.outputIndex = viewDisposableCount;\n        node.renderParent = currentRenderParent;\n        viewNodeFlags |= node.flags;\n        viewMatchedQueries |= node.matchedQueryIds;\n        if (node.element) {\n            const elDef = node.element;\n            elDef.publicProviders =\n                currentParent ? currentParent.element.publicProviders : Object.create(null);\n            elDef.allProviders = elDef.publicProviders;\n            // Note: We assume that all providers of an element are before any child element!\n            currentElementHasPublicProviders = false;\n            currentElementHasPrivateProviders = false;\n            if (node.element.template) {\n                viewMatchedQueries |= node.element.template.nodeMatchedQueries;\n            }\n        }\n        validateNode(currentParent, node, nodes.length);\n        viewBindingCount += node.bindings.length;\n        viewDisposableCount += node.outputs.length;\n        if (!currentRenderParent && (node.flags & 3 /* CatRenderNode */)) {\n            lastRenderRootNode = node;\n        }\n        if (node.flags & 20224 /* CatProvider */) {\n            if (!currentElementHasPublicProviders) {\n                currentElementHasPublicProviders = true;\n                // Use prototypical inheritance to not get O(n^2) complexity...\n                currentParent.element.publicProviders =\n                    Object.create(currentParent.element.publicProviders);\n                currentParent.element.allProviders = currentParent.element.publicProviders;\n            }\n            const isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n            const isComponent = (node.flags & 32768 /* Component */) !== 0;\n            if (!isPrivateService || isComponent) {\n                currentParent.element.publicProviders[tokenKey(node.provider.token)] = node;\n            }\n            else {\n                if (!currentElementHasPrivateProviders) {\n                    currentElementHasPrivateProviders = true;\n                    // Use prototypical inheritance to not get O(n^2) complexity...\n                    currentParent.element.allProviders =\n                        Object.create(currentParent.element.publicProviders);\n                }\n                currentParent.element.allProviders[tokenKey(node.provider.token)] = node;\n            }\n            if (isComponent) {\n                currentParent.element.componentProvider = node;\n            }\n        }\n        if (currentParent) {\n            currentParent.childFlags |= node.flags;\n            currentParent.directChildFlags |= node.flags;\n            currentParent.childMatchedQueries |= node.matchedQueryIds;\n            if (node.element && node.element.template) {\n                currentParent.childMatchedQueries |= node.element.template.nodeMatchedQueries;\n            }\n        }\n        else {\n            viewRootNodeFlags |= node.flags;\n        }\n        if (node.childCount > 0) {\n            currentParent = node;\n            if (!isNgContainer(node)) {\n                currentRenderParent = node;\n            }\n        }\n        else {\n            // When the current node has no children, check if it is the last children of its parent.\n            // When it is, propagate the flags up.\n            // The loop is required because an element could be the last transitive children of several\n            // elements. We loop to either the root or the highest opened element (= with remaining\n            // children)\n            while (currentParent && i === currentParent.nodeIndex + currentParent.childCount) {\n                const newParent = currentParent.parent;\n                if (newParent) {\n                    newParent.childFlags |= currentParent.childFlags;\n                    newParent.childMatchedQueries |= currentParent.childMatchedQueries;\n                }\n                currentParent = newParent;\n                // We also need to update the render parent & account for ng-container\n                if (currentParent && isNgContainer(currentParent)) {\n                    currentRenderParent = currentParent.renderParent;\n                }\n                else {\n                    currentRenderParent = currentParent;\n                }\n            }\n        }\n    }\n    const handleEvent = (view, nodeIndex, eventName, event) => nodes[nodeIndex].element.handleEvent(view, eventName, event);\n    return {\n        // Will be filled later...\n        factory: null,\n        nodeFlags: viewNodeFlags,\n        rootNodeFlags: viewRootNodeFlags,\n        nodeMatchedQueries: viewMatchedQueries,\n        flags,\n        nodes: nodes,\n        updateDirectives: updateDirectives || NOOP,\n        updateRenderer: updateRenderer || NOOP,\n        handleEvent,\n        bindingCount: viewBindingCount,\n        outputCount: viewDisposableCount,\n        lastRenderRootNode\n    };\n}\nfunction isNgContainer(node) {\n    return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction validateNode(parent, node, nodeCount) {\n    const template = node.element && node.element.template;\n    if (template) {\n        if (!template.lastRenderRootNode) {\n            throw new Error(`Illegal State: Embedded templates without nodes are not allowed!`);\n        }\n        if (template.lastRenderRootNode &&\n            template.lastRenderRootNode.flags & 16777216 /* EmbeddedViews */) {\n            throw new Error(`Illegal State: Last root node of a template can't have embedded views, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.flags & 20224 /* CatProvider */) {\n        const parentFlags = parent ? parent.flags : 0;\n        if ((parentFlags & 1 /* TypeElement */) === 0) {\n            throw new Error(`Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.query) {\n        if (node.flags & 67108864 /* TypeContentQuery */ &&\n            (!parent || (parent.flags & 16384 /* TypeDirective */) === 0)) {\n            throw new Error(`Illegal State: Content Query nodes need to be children of directives, at index ${node.nodeIndex}!`);\n        }\n        if (node.flags & 134217728 /* TypeViewQuery */ && parent) {\n            throw new Error(`Illegal State: View Query nodes have to be top level nodes, at index ${node.nodeIndex}!`);\n        }\n    }\n    if (node.childCount) {\n        const parentEnd = parent ? parent.nodeIndex + parent.childCount : nodeCount - 1;\n        if (node.nodeIndex <= parentEnd && node.nodeIndex + node.childCount > parentEnd) {\n            throw new Error(`Illegal State: childCount of node leads outside of parent, at index ${node.nodeIndex}!`);\n        }\n    }\n}\nfunction createEmbeddedView(parent, anchorDef, viewDef, context) {\n    // embedded views are seen as siblings to the anchor, so we need\n    // to get the parent of the anchor and use it as parentIndex.\n    const view = createView(parent.root, parent.renderer, parent, anchorDef, viewDef);\n    initView(view, parent.component, context);\n    createViewNodes(view);\n    return view;\n}\nfunction createRootView(root, def, context) {\n    const view = createView(root, root.renderer, null, null, def);\n    initView(view, context, context);\n    createViewNodes(view);\n    return view;\n}\nfunction createComponentView(parentView, nodeDef, viewDef, hostElement) {\n    const rendererType = nodeDef.element.componentRendererType;\n    let compRenderer;\n    if (!rendererType) {\n        compRenderer = parentView.root.renderer;\n    }\n    else {\n        compRenderer = parentView.root.rendererFactory.createRenderer(hostElement, rendererType);\n    }\n    return createView(parentView.root, compRenderer, parentView, nodeDef.element.componentProvider, viewDef);\n}\nfunction createView(root, renderer, parent, parentNodeDef, def) {\n    const nodes = new Array(def.nodes.length);\n    const disposables = def.outputCount ? new Array(def.outputCount) : null;\n    const view = {\n        def,\n        parent,\n        viewContainerParent: null,\n        parentNodeDef,\n        context: null,\n        component: null,\n        nodes,\n        state: 13 /* CatInit */,\n        root,\n        renderer,\n        oldValues: new Array(def.bindingCount),\n        disposables,\n        initIndex: -1\n    };\n    return view;\n}\nfunction initView(view, component, context) {\n    view.component = component;\n    view.context = context;\n}\nfunction createViewNodes(view) {\n    let renderHost;\n    if (isComponentView(view)) {\n        const hostDef = view.parentNodeDef;\n        renderHost = asElementData(view.parent, hostDef.parent.nodeIndex).renderElement;\n    }\n    const def = view.def;\n    const nodes = view.nodes;\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        Services.setCurrentNode(view, i);\n        let nodeData;\n        switch (nodeDef.flags & 201347067 /* Types */) {\n            case 1 /* TypeElement */:\n                const el = createElement(view, renderHost, nodeDef);\n                let componentView = undefined;\n                if (nodeDef.flags & 33554432 /* ComponentView */) {\n                    const compViewDef = resolveDefinition(nodeDef.element.componentView);\n                    componentView = Services.createComponentView(view, nodeDef, compViewDef, el);\n                }\n                listenToElementOutputs(view, componentView, nodeDef, el);\n                nodeData = {\n                    renderElement: el,\n                    componentView,\n                    viewContainer: null,\n                    template: nodeDef.element.template ? createTemplateData(view, nodeDef) : undefined\n                };\n                if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n                    nodeData.viewContainer = createViewContainerData(view, nodeDef, nodeData);\n                }\n                break;\n            case 2 /* TypeText */:\n                nodeData = createText(view, renderHost, nodeDef);\n                break;\n            case 512 /* TypeClassProvider */:\n            case 1024 /* TypeFactoryProvider */:\n            case 2048 /* TypeUseExistingProvider */:\n            case 256 /* TypeValueProvider */: {\n                nodeData = nodes[i];\n                if (!nodeData && !(nodeDef.flags & 4096 /* LazyProvider */)) {\n                    const instance = createProviderInstance(view, nodeDef);\n                    nodeData = { instance };\n                }\n                break;\n            }\n            case 16 /* TypePipe */: {\n                const instance = createPipeInstance(view, nodeDef);\n                nodeData = { instance };\n                break;\n            }\n            case 16384 /* TypeDirective */: {\n                nodeData = nodes[i];\n                if (!nodeData) {\n                    const instance = createDirectiveInstance(view, nodeDef);\n                    nodeData = { instance };\n                }\n                if (nodeDef.flags & 32768 /* Component */) {\n                    const compView = asElementData(view, nodeDef.parent.nodeIndex).componentView;\n                    initView(compView, nodeData.instance, nodeData.instance);\n                }\n                break;\n            }\n            case 32 /* TypePureArray */:\n            case 64 /* TypePureObject */:\n            case 128 /* TypePurePipe */:\n                nodeData = createPureExpression(view, nodeDef);\n                break;\n            case 67108864 /* TypeContentQuery */:\n            case 134217728 /* TypeViewQuery */:\n                nodeData = createQuery();\n                break;\n            case 8 /* TypeNgContent */:\n                appendNgContent(view, renderHost, nodeDef);\n                // no runtime data needed for NgContent...\n                nodeData = undefined;\n                break;\n        }\n        nodes[i] = nodeData;\n    }\n    // Create the ViewData.nodes of component views after we created everything else,\n    // so that e.g. ng-content works\n    execComponentViewsAction(view, ViewAction.CreateViewNodes);\n    // fill static content and view queries\n    execQueriesAction(view, 67108864 /* TypeContentQuery */ | 134217728 /* TypeViewQuery */, 268435456 /* StaticQuery */, 0 /* CheckAndUpdate */);\n}\nfunction checkNoChangesView(view) {\n    markProjectedViewsForCheck(view);\n    Services.updateDirectives(view, 1 /* CheckNoChanges */);\n    execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);\n    Services.updateRenderer(view, 1 /* CheckNoChanges */);\n    execComponentViewsAction(view, ViewAction.CheckNoChanges);\n    // Note: We don't check queries for changes as we didn't do this in v2.x.\n    // TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.\n    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n}\nfunction checkAndUpdateView(view) {\n    if (view.state & 1 /* BeforeFirstCheck */) {\n        view.state &= ~1 /* BeforeFirstCheck */;\n        view.state |= 2 /* FirstCheck */;\n    }\n    else {\n        view.state &= ~2 /* FirstCheck */;\n    }\n    shiftInitState(view, 0 /* InitState_BeforeInit */, 256 /* InitState_CallingOnInit */);\n    markProjectedViewsForCheck(view);\n    Services.updateDirectives(view, 0 /* CheckAndUpdate */);\n    execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate);\n    execQueriesAction(view, 67108864 /* TypeContentQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n    let callInit = shiftInitState(view, 256 /* InitState_CallingOnInit */, 512 /* InitState_CallingAfterContentInit */);\n    callLifecycleHooksChildrenFirst(view, 2097152 /* AfterContentChecked */ | (callInit ? 1048576 /* AfterContentInit */ : 0));\n    Services.updateRenderer(view, 0 /* CheckAndUpdate */);\n    execComponentViewsAction(view, ViewAction.CheckAndUpdate);\n    execQueriesAction(view, 134217728 /* TypeViewQuery */, 536870912 /* DynamicQuery */, 0 /* CheckAndUpdate */);\n    callInit = shiftInitState(view, 512 /* InitState_CallingAfterContentInit */, 768 /* InitState_CallingAfterViewInit */);\n    callLifecycleHooksChildrenFirst(view, 8388608 /* AfterViewChecked */ | (callInit ? 4194304 /* AfterViewInit */ : 0));\n    if (view.def.flags & 2 /* OnPush */) {\n        view.state &= ~8 /* ChecksEnabled */;\n    }\n    view.state &= ~(64 /* CheckProjectedViews */ | 32 /* CheckProjectedView */);\n    shiftInitState(view, 768 /* InitState_CallingAfterViewInit */, 1024 /* InitState_AfterInit */);\n}\nfunction checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    if (argStyle === 0 /* Inline */) {\n        return checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    }\n    else {\n        return checkAndUpdateNodeDynamic(view, nodeDef, v0);\n    }\n}\nfunction markProjectedViewsForCheck(view) {\n    const def = view.def;\n    if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n            const projectedViews = asElementData(view, i).template._projectedViews;\n            if (projectedViews) {\n                for (let i = 0; i < projectedViews.length; i++) {\n                    const projectedView = projectedViews[i];\n                    projectedView.state |= 32 /* CheckProjectedView */;\n                    markParentViewsForCheckProjectedViews(projectedView, view);\n                }\n            }\n        }\n        else if ((nodeDef.childFlags & 4 /* ProjectedTemplate */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction checkAndUpdateNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    switch (nodeDef.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return checkAndUpdateElementInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 2 /* TypeText */:\n            return checkAndUpdateTextInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 16384 /* TypeDirective */:\n            return checkAndUpdateDirectiveInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        case 32 /* TypePureArray */:\n        case 64 /* TypePureObject */:\n        case 128 /* TypePurePipe */:\n            return checkAndUpdatePureExpressionInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n        default:\n            throw 'unreachable';\n    }\n}\nfunction checkAndUpdateNodeDynamic(view, nodeDef, values) {\n    switch (nodeDef.flags & 201347067 /* Types */) {\n        case 1 /* TypeElement */:\n            return checkAndUpdateElementDynamic(view, nodeDef, values);\n        case 2 /* TypeText */:\n            return checkAndUpdateTextDynamic(view, nodeDef, values);\n        case 16384 /* TypeDirective */:\n            return checkAndUpdateDirectiveDynamic(view, nodeDef, values);\n        case 32 /* TypePureArray */:\n        case 64 /* TypePureObject */:\n        case 128 /* TypePurePipe */:\n            return checkAndUpdatePureExpressionDynamic(view, nodeDef, values);\n        default:\n            throw 'unreachable';\n    }\n}\nfunction checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    if (argStyle === 0 /* Inline */) {\n        checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    }\n    else {\n        checkNoChangesNodeDynamic(view, nodeDef, v0);\n    }\n    // Returning false is ok here as we would have thrown in case of a change.\n    return false;\n}\nfunction checkNoChangesNodeInline(view, nodeDef, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const bindLen = nodeDef.bindings.length;\n    if (bindLen > 0)\n        checkBindingNoChanges(view, nodeDef, 0, v0);\n    if (bindLen > 1)\n        checkBindingNoChanges(view, nodeDef, 1, v1);\n    if (bindLen > 2)\n        checkBindingNoChanges(view, nodeDef, 2, v2);\n    if (bindLen > 3)\n        checkBindingNoChanges(view, nodeDef, 3, v3);\n    if (bindLen > 4)\n        checkBindingNoChanges(view, nodeDef, 4, v4);\n    if (bindLen > 5)\n        checkBindingNoChanges(view, nodeDef, 5, v5);\n    if (bindLen > 6)\n        checkBindingNoChanges(view, nodeDef, 6, v6);\n    if (bindLen > 7)\n        checkBindingNoChanges(view, nodeDef, 7, v7);\n    if (bindLen > 8)\n        checkBindingNoChanges(view, nodeDef, 8, v8);\n    if (bindLen > 9)\n        checkBindingNoChanges(view, nodeDef, 9, v9);\n}\nfunction checkNoChangesNodeDynamic(view, nodeDef, values) {\n    for (let i = 0; i < values.length; i++) {\n        checkBindingNoChanges(view, nodeDef, i, values[i]);\n    }\n}\n/**\n * Workaround https://github.com/angular/tsickle/issues/497\n * @suppress {misplacedTypeAnnotation}\n */\nfunction checkNoChangesQuery(view, nodeDef) {\n    const queryList = asQueryList(view, nodeDef.nodeIndex);\n    if (queryList.dirty) {\n        throw expressionChangedAfterItHasBeenCheckedError(Services.createDebugContext(view, nodeDef.nodeIndex), `Query ${nodeDef.query.id} not dirty`, `Query ${nodeDef.query.id} dirty`, (view.state & 1 /* BeforeFirstCheck */) !== 0);\n    }\n}\nfunction destroyView(view) {\n    if (view.state & 128 /* Destroyed */) {\n        return;\n    }\n    execEmbeddedViewsAction(view, ViewAction.Destroy);\n    execComponentViewsAction(view, ViewAction.Destroy);\n    callLifecycleHooksChildrenFirst(view, 131072 /* OnDestroy */);\n    if (view.disposables) {\n        for (let i = 0; i < view.disposables.length; i++) {\n            view.disposables[i]();\n        }\n    }\n    detachProjectedView(view);\n    if (view.renderer.destroyNode) {\n        destroyViewNodes(view);\n    }\n    if (isComponentView(view)) {\n        view.renderer.destroy();\n    }\n    view.state |= 128 /* Destroyed */;\n}\nfunction destroyViewNodes(view) {\n    const len = view.def.nodes.length;\n    for (let i = 0; i < len; i++) {\n        const def = view.def.nodes[i];\n        if (def.flags & 1 /* TypeElement */) {\n            view.renderer.destroyNode(asElementData(view, i).renderElement);\n        }\n        else if (def.flags & 2 /* TypeText */) {\n            view.renderer.destroyNode(asTextData(view, i).renderText);\n        }\n        else if (def.flags & 67108864 /* TypeContentQuery */ || def.flags & 134217728 /* TypeViewQuery */) {\n            asQueryList(view, i).destroy();\n        }\n    }\n}\nvar ViewAction;\n(function (ViewAction) {\n    ViewAction[ViewAction[\"CreateViewNodes\"] = 0] = \"CreateViewNodes\";\n    ViewAction[ViewAction[\"CheckNoChanges\"] = 1] = \"CheckNoChanges\";\n    ViewAction[ViewAction[\"CheckNoChangesProjectedViews\"] = 2] = \"CheckNoChangesProjectedViews\";\n    ViewAction[ViewAction[\"CheckAndUpdate\"] = 3] = \"CheckAndUpdate\";\n    ViewAction[ViewAction[\"CheckAndUpdateProjectedViews\"] = 4] = \"CheckAndUpdateProjectedViews\";\n    ViewAction[ViewAction[\"Destroy\"] = 5] = \"Destroy\";\n})(ViewAction || (ViewAction = {}));\nfunction execComponentViewsAction(view, action) {\n    const def = view.def;\n    if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 33554432 /* ComponentView */) {\n            // a leaf\n            callViewAction(asElementData(view, i).componentView, action);\n        }\n        else if ((nodeDef.childFlags & 33554432 /* ComponentView */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction execEmbeddedViewsAction(view, action) {\n    const def = view.def;\n    if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n        return;\n    }\n    for (let i = 0; i < def.nodes.length; i++) {\n        const nodeDef = def.nodes[i];\n        if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n            // a leaf\n            const embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n            for (let k = 0; k < embeddedViews.length; k++) {\n                callViewAction(embeddedViews[k], action);\n            }\n        }\n        else if ((nodeDef.childFlags & 16777216 /* EmbeddedViews */) === 0) {\n            // a parent with leafs\n            // no child is a component,\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\nfunction callViewAction(view, action) {\n    const viewState = view.state;\n    switch (action) {\n        case ViewAction.CheckNoChanges:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n                    checkNoChangesView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, ViewAction.CheckNoChangesProjectedViews);\n                }\n            }\n            break;\n        case ViewAction.CheckNoChangesProjectedViews:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if (viewState & 32 /* CheckProjectedView */) {\n                    checkNoChangesView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, action);\n                }\n            }\n            break;\n        case ViewAction.CheckAndUpdate:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if ((viewState & 12 /* CatDetectChanges */) === 12 /* CatDetectChanges */) {\n                    checkAndUpdateView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, ViewAction.CheckAndUpdateProjectedViews);\n                }\n            }\n            break;\n        case ViewAction.CheckAndUpdateProjectedViews:\n            if ((viewState & 128 /* Destroyed */) === 0) {\n                if (viewState & 32 /* CheckProjectedView */) {\n                    checkAndUpdateView(view);\n                }\n                else if (viewState & 64 /* CheckProjectedViews */) {\n                    execProjectedViewsAction(view, action);\n                }\n            }\n            break;\n        case ViewAction.Destroy:\n            // Note: destroyView recurses over all views,\n            // so we don't need to special case projected views here.\n            destroyView(view);\n            break;\n        case ViewAction.CreateViewNodes:\n            createViewNodes(view);\n            break;\n    }\n}\nfunction execProjectedViewsAction(view, action) {\n    execEmbeddedViewsAction(view, action);\n    execComponentViewsAction(view, action);\n}\nfunction execQueriesAction(view, queryFlags, staticDynamicQueryFlag, checkType) {\n    if (!(view.def.nodeFlags & queryFlags) || !(view.def.nodeFlags & staticDynamicQueryFlag)) {\n        return;\n    }\n    const nodeCount = view.def.nodes.length;\n    for (let i = 0; i < nodeCount; i++) {\n        const nodeDef = view.def.nodes[i];\n        if ((nodeDef.flags & queryFlags) && (nodeDef.flags & staticDynamicQueryFlag)) {\n            Services.setCurrentNode(view, nodeDef.nodeIndex);\n            switch (checkType) {\n                case 0 /* CheckAndUpdate */:\n                    checkAndUpdateQuery(view, nodeDef);\n                    break;\n                case 1 /* CheckNoChanges */:\n                    checkNoChangesQuery(view, nodeDef);\n                    break;\n            }\n        }\n        if (!(nodeDef.childFlags & queryFlags) || !(nodeDef.childFlags & staticDynamicQueryFlag)) {\n            // no child has a matching query\n            // then skip the children\n            i += nodeDef.childCount;\n        }\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nlet initialized = false;\nfunction initServicesIfNeeded() {\n    if (initialized) {\n        return;\n    }\n    initialized = true;\n    const services = isDevMode() ? createDebugServices() : createProdServices();\n    Services.setCurrentNode = services.setCurrentNode;\n    Services.createRootView = services.createRootView;\n    Services.createEmbeddedView = services.createEmbeddedView;\n    Services.createComponentView = services.createComponentView;\n    Services.createNgModuleRef = services.createNgModuleRef;\n    Services.overrideProvider = services.overrideProvider;\n    Services.overrideComponentView = services.overrideComponentView;\n    Services.clearOverrides = services.clearOverrides;\n    Services.checkAndUpdateView = services.checkAndUpdateView;\n    Services.checkNoChangesView = services.checkNoChangesView;\n    Services.destroyView = services.destroyView;\n    Services.resolveDep = resolveDep;\n    Services.createDebugContext = services.createDebugContext;\n    Services.handleEvent = services.handleEvent;\n    Services.updateDirectives = services.updateDirectives;\n    Services.updateRenderer = services.updateRenderer;\n    Services.dirtyParentQueries = dirtyParentQueries;\n}\nfunction createProdServices() {\n    return {\n        setCurrentNode: () => { },\n        createRootView: createProdRootView,\n        createEmbeddedView: createEmbeddedView,\n        createComponentView: createComponentView,\n        createNgModuleRef: createNgModuleRef,\n        overrideProvider: NOOP,\n        overrideComponentView: NOOP,\n        clearOverrides: NOOP,\n        checkAndUpdateView: checkAndUpdateView,\n        checkNoChangesView: checkNoChangesView,\n        destroyView: destroyView,\n        createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex),\n        handleEvent: (view, nodeIndex, eventName, event) => view.def.handleEvent(view, nodeIndex, eventName, event),\n        updateDirectives: (view, checkType) => view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view),\n        updateRenderer: (view, checkType) => view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode : prodCheckNoChangesNode, view),\n    };\n}\nfunction createDebugServices() {\n    return {\n        setCurrentNode: debugSetCurrentNode,\n        createRootView: debugCreateRootView,\n        createEmbeddedView: debugCreateEmbeddedView,\n        createComponentView: debugCreateComponentView,\n        createNgModuleRef: debugCreateNgModuleRef,\n        overrideProvider: debugOverrideProvider,\n        overrideComponentView: debugOverrideComponentView,\n        clearOverrides: debugClearOverrides,\n        checkAndUpdateView: debugCheckAndUpdateView,\n        checkNoChangesView: debugCheckNoChangesView,\n        destroyView: debugDestroyView,\n        createDebugContext: (view, nodeIndex) => new DebugContext_(view, nodeIndex),\n        handleEvent: debugHandleEvent,\n        updateDirectives: debugUpdateDirectives,\n        updateRenderer: debugUpdateRenderer,\n    };\n}\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n    const rendererFactory = ngModule.injector.get(RendererFactory2);\n    return createRootView(createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode), def, context);\n}\nfunction debugCreateRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n    const rendererFactory = ngModule.injector.get(RendererFactory2);\n    const root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n    const defWithOverride = applyProviderOverridesToView(def);\n    return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n    const sanitizer = ngModule.injector.get(Sanitizer);\n    const errorHandler = ngModule.injector.get(ErrorHandler);\n    const renderer = rendererFactory.createRenderer(null, null);\n    return {\n        ngModule,\n        injector: elInjector,\n        projectableNodes,\n        selectorOrNode: rootSelectorOrNode,\n        sanitizer,\n        rendererFactory,\n        renderer,\n        errorHandler\n    };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef, context) {\n    const defWithOverride = applyProviderOverridesToView(viewDef);\n    return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction debugCreateComponentView(parentView, nodeDef, viewDef, hostElement) {\n    const overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n    if (overrideComponentView) {\n        viewDef = overrideComponentView;\n    }\n    else {\n        viewDef = applyProviderOverridesToView(viewDef);\n    }\n    return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef, hostElement]);\n}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n    const defWithOverride = applyProviderOverridesToNgModule(def);\n    return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nconst providerOverrides = new Map();\nconst providerOverridesWithScope = new Map();\nconst viewDefOverrides = new Map();\nfunction debugOverrideProvider(override) {\n    providerOverrides.set(override.token, override);\n    let injectableDef;\n    if (typeof override.token === 'function' && (injectableDef = getInjectableDef(override.token)) &&\n        typeof injectableDef.providedIn === 'function') {\n        providerOverridesWithScope.set(override.token, override);\n    }\n}\nfunction debugOverrideComponentView(comp, compFactory) {\n    const hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n    const compViewDef = resolveDefinition(hostViewDef.nodes[0].element.componentView);\n    viewDefOverrides.set(comp, compViewDef);\n}\nfunction debugClearOverrides() {\n    providerOverrides.clear();\n    providerOverridesWithScope.clear();\n    viewDefOverrides.clear();\n}\n// Notes about the algorithm:\n// 1) Locate the providers of an element and check if one of them was overwritten\n// 2) Change the providers of that element\n//\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToView(def) {\n    if (providerOverrides.size === 0) {\n        return def;\n    }\n    const elementIndicesWithOverwrittenProviders = findElementIndicesWithOverwrittenProviders(def);\n    if (elementIndicesWithOverwrittenProviders.length === 0) {\n        return def;\n    }\n    // clone the whole view definition,\n    // as it maintains references between the nodes that are hard to update.\n    def = def.factory(() => NOOP);\n    for (let i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n        applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n    }\n    return def;\n    function findElementIndicesWithOverwrittenProviders(def) {\n        const elIndicesWithOverwrittenProviders = [];\n        let lastElementDef = null;\n        for (let i = 0; i < def.nodes.length; i++) {\n            const nodeDef = def.nodes[i];\n            if (nodeDef.flags & 1 /* TypeElement */) {\n                lastElementDef = nodeDef;\n            }\n            if (lastElementDef && nodeDef.flags & 3840 /* CatProviderNoDirective */ &&\n                providerOverrides.has(nodeDef.provider.token)) {\n                elIndicesWithOverwrittenProviders.push(lastElementDef.nodeIndex);\n                lastElementDef = null;\n            }\n        }\n        return elIndicesWithOverwrittenProviders;\n    }\n    function applyProviderOverridesToElement(viewDef, elIndex) {\n        for (let i = elIndex + 1; i < viewDef.nodes.length; i++) {\n            const nodeDef = viewDef.nodes[i];\n            if (nodeDef.flags & 1 /* TypeElement */) {\n                // stop at the next element\n                return;\n            }\n            if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n                const provider = nodeDef.provider;\n                const override = providerOverrides.get(provider.token);\n                if (override) {\n                    nodeDef.flags = (nodeDef.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n                    provider.deps = splitDepsDsl(override.deps);\n                    provider.value = override.value;\n                }\n            }\n        }\n    }\n}\n// Notes about the algorithm:\n// We only create new datastructures if we need to, to keep perf impact\n// reasonable.\nfunction applyProviderOverridesToNgModule(def) {\n    const { hasOverrides, hasDeprecatedOverrides } = calcHasOverrides(def);\n    if (!hasOverrides) {\n        return def;\n    }\n    // clone the whole view definition,\n    // as it maintains references between the nodes that are hard to update.\n    def = def.factory(() => NOOP);\n    applyProviderOverrides(def);\n    return def;\n    function calcHasOverrides(def) {\n        let hasOverrides = false;\n        let hasDeprecatedOverrides = false;\n        if (providerOverrides.size === 0) {\n            return { hasOverrides, hasDeprecatedOverrides };\n        }\n        def.providers.forEach(node => {\n            const override = providerOverrides.get(node.token);\n            if ((node.flags & 3840 /* CatProviderNoDirective */) && override) {\n                hasOverrides = true;\n                hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n            }\n        });\n        def.modules.forEach(module => {\n            providerOverridesWithScope.forEach((override, token) => {\n                if (getInjectableDef(token).providedIn === module) {\n                    hasOverrides = true;\n                    hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n                }\n            });\n        });\n        return { hasOverrides, hasDeprecatedOverrides };\n    }\n    function applyProviderOverrides(def) {\n        for (let i = 0; i < def.providers.length; i++) {\n            const provider = def.providers[i];\n            if (hasDeprecatedOverrides) {\n                // We had a bug where me made\n                // all providers lazy. Keep this logic behind a flag\n                // for migrating existing users.\n                provider.flags |= 4096 /* LazyProvider */;\n            }\n            const override = providerOverrides.get(provider.token);\n            if (override) {\n                provider.flags = (provider.flags & ~3840 /* CatProviderNoDirective */) | override.flags;\n                provider.deps = splitDepsDsl(override.deps);\n                provider.value = override.value;\n            }\n        }\n        if (providerOverridesWithScope.size > 0) {\n            let moduleSet = new Set(def.modules);\n            providerOverridesWithScope.forEach((override, token) => {\n                if (moduleSet.has(getInjectableDef(token).providedIn)) {\n                    let provider = {\n                        token: token,\n                        flags: override.flags | (hasDeprecatedOverrides ? 4096 /* LazyProvider */ : 0 /* None */),\n                        deps: splitDepsDsl(override.deps),\n                        value: override.value,\n                        index: def.providers.length,\n                    };\n                    def.providers.push(provider);\n                    def.providersByKey[tokenKey(token)] = provider;\n                }\n            });\n        }\n    }\n}\nfunction prodCheckAndUpdateNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const nodeDef = view.def.nodes[checkIndex];\n    checkAndUpdateNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    return (nodeDef.flags & 224 /* CatPureExpression */) ?\n        asPureExpressionData(view, checkIndex).value :\n        undefined;\n}\nfunction prodCheckNoChangesNode(view, checkIndex, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n    const nodeDef = view.def.nodes[checkIndex];\n    checkNoChangesNode(view, nodeDef, argStyle, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9);\n    return (nodeDef.flags & 224 /* CatPureExpression */) ?\n        asPureExpressionData(view, checkIndex).value :\n        undefined;\n}\nfunction debugCheckAndUpdateView(view) {\n    return callWithDebugContext(DebugAction.detectChanges, checkAndUpdateView, null, [view]);\n}\nfunction debugCheckNoChangesView(view) {\n    return callWithDebugContext(DebugAction.checkNoChanges, checkNoChangesView, null, [view]);\n}\nfunction debugDestroyView(view) {\n    return callWithDebugContext(DebugAction.destroy, destroyView, null, [view]);\n}\nvar DebugAction;\n(function (DebugAction) {\n    DebugAction[DebugAction[\"create\"] = 0] = \"create\";\n    DebugAction[DebugAction[\"detectChanges\"] = 1] = \"detectChanges\";\n    DebugAction[DebugAction[\"checkNoChanges\"] = 2] = \"checkNoChanges\";\n    DebugAction[DebugAction[\"destroy\"] = 3] = \"destroy\";\n    DebugAction[DebugAction[\"handleEvent\"] = 4] = \"handleEvent\";\n})(DebugAction || (DebugAction = {}));\nlet _currentAction;\nlet _currentView;\nlet _currentNodeIndex;\nfunction debugSetCurrentNode(view, nodeIndex) {\n    _currentView = view;\n    _currentNodeIndex = nodeIndex;\n}\nfunction debugHandleEvent(view, nodeIndex, eventName, event) {\n    debugSetCurrentNode(view, nodeIndex);\n    return callWithDebugContext(DebugAction.handleEvent, view.def.handleEvent, null, [view, nodeIndex, eventName, event]);\n}\nfunction debugUpdateDirectives(view, checkType) {\n    if (view.state & 128 /* Destroyed */) {\n        throw viewDestroyedError(DebugAction[_currentAction]);\n    }\n    debugSetCurrentNode(view, nextDirectiveWithBinding(view, 0));\n    return view.def.updateDirectives(debugCheckDirectivesFn, view);\n    function debugCheckDirectivesFn(view, nodeIndex, argStyle, ...values) {\n        const nodeDef = view.def.nodes[nodeIndex];\n        if (checkType === 0 /* CheckAndUpdate */) {\n            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n        }\n        else {\n            debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n        }\n        if (nodeDef.flags & 16384 /* TypeDirective */) {\n            debugSetCurrentNode(view, nextDirectiveWithBinding(view, nodeIndex));\n        }\n        return (nodeDef.flags & 224 /* CatPureExpression */) ?\n            asPureExpressionData(view, nodeDef.nodeIndex).value :\n            undefined;\n    }\n}\nfunction debugUpdateRenderer(view, checkType) {\n    if (view.state & 128 /* Destroyed */) {\n        throw viewDestroyedError(DebugAction[_currentAction]);\n    }\n    debugSetCurrentNode(view, nextRenderNodeWithBinding(view, 0));\n    return view.def.updateRenderer(debugCheckRenderNodeFn, view);\n    function debugCheckRenderNodeFn(view, nodeIndex, argStyle, ...values) {\n        const nodeDef = view.def.nodes[nodeIndex];\n        if (checkType === 0 /* CheckAndUpdate */) {\n            debugCheckAndUpdateNode(view, nodeDef, argStyle, values);\n        }\n        else {\n            debugCheckNoChangesNode(view, nodeDef, argStyle, values);\n        }\n        if (nodeDef.flags & 3 /* CatRenderNode */) {\n            debugSetCurrentNode(view, nextRenderNodeWithBinding(view, nodeIndex));\n        }\n        return (nodeDef.flags & 224 /* CatPureExpression */) ?\n            asPureExpressionData(view, nodeDef.nodeIndex).value :\n            undefined;\n    }\n}\nfunction debugCheckAndUpdateNode(view, nodeDef, argStyle, givenValues) {\n    const changed = checkAndUpdateNode(view, nodeDef, argStyle, ...givenValues);\n    if (changed) {\n        const values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n        if (nodeDef.flags & 16384 /* TypeDirective */) {\n            const bindingValues = {};\n            for (let i = 0; i < nodeDef.bindings.length; i++) {\n                const binding = nodeDef.bindings[i];\n                const value = values[i];\n                if (binding.flags & 8 /* TypeProperty */) {\n                    bindingValues[normalizeDebugBindingName(binding.nonMinifiedName)] =\n                        normalizeDebugBindingValue(value);\n                }\n            }\n            const elDef = nodeDef.parent;\n            const el = asElementData(view, elDef.nodeIndex).renderElement;\n            if (!elDef.element.name) {\n                // a comment.\n                view.renderer.setValue(el, `bindings=${JSON.stringify(bindingValues, null, 2)}`);\n            }\n            else {\n                // a regular element.\n                for (let attr in bindingValues) {\n                    const value = bindingValues[attr];\n                    if (value != null) {\n                        view.renderer.setAttribute(el, attr, value);\n                    }\n                    else {\n                        view.renderer.removeAttribute(el, attr);\n                    }\n                }\n            }\n        }\n    }\n}\nfunction debugCheckNoChangesNode(view, nodeDef, argStyle, values) {\n    checkNoChangesNode(view, nodeDef, argStyle, ...values);\n}\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n    for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n        const nodeDef = view.def.nodes[i];\n        if (nodeDef.flags & 16384 /* TypeDirective */ && nodeDef.bindings && nodeDef.bindings.length) {\n            return i;\n        }\n    }\n    return null;\n}\nfunction nextRenderNodeWithBinding(view, nodeIndex) {\n    for (let i = nodeIndex; i < view.def.nodes.length; i++) {\n        const nodeDef = view.def.nodes[i];\n        if ((nodeDef.flags & 3 /* CatRenderNode */) && nodeDef.bindings && nodeDef.bindings.length) {\n            return i;\n        }\n    }\n    return null;\n}\nclass DebugContext_ {\n    constructor(view, nodeIndex) {\n        this.view = view;\n        this.nodeIndex = nodeIndex;\n        if (nodeIndex == null) {\n            this.nodeIndex = nodeIndex = 0;\n        }\n        this.nodeDef = view.def.nodes[nodeIndex];\n        let elDef = this.nodeDef;\n        let elView = view;\n        while (elDef && (elDef.flags & 1 /* TypeElement */) === 0) {\n            elDef = elDef.parent;\n        }\n        if (!elDef) {\n            while (!elDef && elView) {\n                elDef = viewParentEl(elView);\n                elView = elView.parent;\n            }\n        }\n        this.elDef = elDef;\n        this.elView = elView;\n    }\n    get elOrCompView() {\n        // Has to be done lazily as we use the DebugContext also during creation of elements...\n        return asElementData(this.elView, this.elDef.nodeIndex).componentView || this.view;\n    }\n    get injector() {\n        return createInjector$1(this.elView, this.elDef);\n    }\n    get component() {\n        return this.elOrCompView.component;\n    }\n    get context() {\n        return this.elOrCompView.context;\n    }\n    get providerTokens() {\n        const tokens = [];\n        if (this.elDef) {\n            for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n                const childDef = this.elView.def.nodes[i];\n                if (childDef.flags & 20224 /* CatProvider */) {\n                    tokens.push(childDef.provider.token);\n                }\n                i += childDef.childCount;\n            }\n        }\n        return tokens;\n    }\n    get references() {\n        const references = {};\n        if (this.elDef) {\n            collectReferences(this.elView, this.elDef, references);\n            for (let i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n                const childDef = this.elView.def.nodes[i];\n                if (childDef.flags & 20224 /* CatProvider */) {\n                    collectReferences(this.elView, childDef, references);\n                }\n                i += childDef.childCount;\n            }\n        }\n        return references;\n    }\n    get componentRenderElement() {\n        const elData = findHostElement(this.elOrCompView);\n        return elData ? elData.renderElement : undefined;\n    }\n    get renderNode() {\n        return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n            renderNode(this.elView, this.elDef);\n    }\n    logError(console, ...values) {\n        let logViewDef;\n        let logNodeIndex;\n        if (this.nodeDef.flags & 2 /* TypeText */) {\n            logViewDef = this.view.def;\n            logNodeIndex = this.nodeDef.nodeIndex;\n        }\n        else {\n            logViewDef = this.elView.def;\n            logNodeIndex = this.elDef.nodeIndex;\n        }\n        // Note: we only generate a log function for text and element nodes\n        // to make the generated code as small as possible.\n        const renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n        let currRenderNodeIndex = -1;\n        let nodeLogger = () => {\n            currRenderNodeIndex++;\n            if (currRenderNodeIndex === renderNodeIndex) {\n                return console.error.bind(console, ...values);\n            }\n            else {\n                return NOOP;\n            }\n        };\n        logViewDef.factory(nodeLogger);\n        if (currRenderNodeIndex < renderNodeIndex) {\n            console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n            console.error(...values);\n        }\n    }\n}\nfunction getRenderNodeIndex(viewDef, nodeIndex) {\n    let renderNodeIndex = -1;\n    for (let i = 0; i <= nodeIndex; i++) {\n        const nodeDef = viewDef.nodes[i];\n        if (nodeDef.flags & 3 /* CatRenderNode */) {\n            renderNodeIndex++;\n        }\n    }\n    return renderNodeIndex;\n}\nfunction findHostElement(view) {\n    while (view && !isComponentView(view)) {\n        view = view.parent;\n    }\n    if (view.parent) {\n        return asElementData(view.parent, viewParentEl(view).nodeIndex);\n    }\n    return null;\n}\nfunction collectReferences(view, nodeDef, references) {\n    for (let refName in nodeDef.references) {\n        references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n    }\n}\nfunction callWithDebugContext(action, fn, self, args) {\n    const oldAction = _currentAction;\n    const oldView = _currentView;\n    const oldNodeIndex = _currentNodeIndex;\n    try {\n        _currentAction = action;\n        const result = fn.apply(self, args);\n        _currentView = oldView;\n        _currentNodeIndex = oldNodeIndex;\n        _currentAction = oldAction;\n        return result;\n    }\n    catch (e) {\n        if (isViewDebugError(e) || !_currentView) {\n            throw e;\n        }\n        throw viewWrappedDebugError(e, getCurrentDebugContext());\n    }\n}\nfunction getCurrentDebugContext() {\n    return _currentView ? new DebugContext_(_currentView, _currentNodeIndex) : null;\n}\nclass DebugRendererFactory2 {\n    constructor(delegate) {\n        this.delegate = delegate;\n    }\n    createRenderer(element, renderData) {\n        return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n    }\n    begin() {\n        if (this.delegate.begin) {\n            this.delegate.begin();\n        }\n    }\n    end() {\n        if (this.delegate.end) {\n            this.delegate.end();\n        }\n    }\n    whenRenderingDone() {\n        if (this.delegate.whenRenderingDone) {\n            return this.delegate.whenRenderingDone();\n        }\n        return Promise.resolve(null);\n    }\n}\nclass DebugRenderer2 {\n    constructor(delegate) {\n        this.delegate = delegate;\n        /**\n         * Factory function used to create a `DebugContext` when a node is created.\n         *\n         * The `DebugContext` allows to retrieve information about the nodes that are useful in tests.\n         *\n         * The factory is configurable so that the `DebugRenderer2` could instantiate either a View Engine\n         * or a Render context.\n         */\n        this.debugContextFactory = getCurrentDebugContext;\n        this.data = this.delegate.data;\n    }\n    createDebugContext(nativeElement) {\n        return this.debugContextFactory(nativeElement);\n    }\n    destroyNode(node) {\n        const debugNode = getDebugNode$1(node);\n        removeDebugNodeFromIndex(debugNode);\n        if (debugNode instanceof DebugNode__PRE_R3__) {\n            debugNode.listeners.length = 0;\n        }\n        if (this.delegate.destroyNode) {\n            this.delegate.destroyNode(node);\n        }\n    }\n    destroy() {\n        this.delegate.destroy();\n    }\n    createElement(name, namespace) {\n        const el = this.delegate.createElement(name, namespace);\n        const debugCtx = this.createDebugContext(el);\n        if (debugCtx) {\n            const debugEl = new DebugElement__PRE_R3__(el, null, debugCtx);\n            debugEl.name = name;\n            indexDebugNode(debugEl);\n        }\n        return el;\n    }\n    createComment(value) {\n        const comment = this.delegate.createComment(value);\n        const debugCtx = this.createDebugContext(comment);\n        if (debugCtx) {\n            indexDebugNode(new DebugNode__PRE_R3__(comment, null, debugCtx));\n        }\n        return comment;\n    }\n    createText(value) {\n        const text = this.delegate.createText(value);\n        const debugCtx = this.createDebugContext(text);\n        if (debugCtx) {\n            indexDebugNode(new DebugNode__PRE_R3__(text, null, debugCtx));\n        }\n        return text;\n    }\n    appendChild(parent, newChild) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(newChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.addChild(debugChildEl);\n        }\n        this.delegate.appendChild(parent, newChild);\n    }\n    insertBefore(parent, newChild, refChild) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(newChild);\n        const debugRefEl = getDebugNode$1(refChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.insertBefore(debugRefEl, debugChildEl);\n        }\n        this.delegate.insertBefore(parent, newChild, refChild);\n    }\n    removeChild(parent, oldChild) {\n        const debugEl = getDebugNode$1(parent);\n        const debugChildEl = getDebugNode$1(oldChild);\n        if (debugEl && debugChildEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.removeChild(debugChildEl);\n        }\n        this.delegate.removeChild(parent, oldChild);\n    }\n    selectRootElement(selectorOrNode, preserveContent) {\n        const el = this.delegate.selectRootElement(selectorOrNode, preserveContent);\n        const debugCtx = getCurrentDebugContext();\n        if (debugCtx) {\n            indexDebugNode(new DebugElement__PRE_R3__(el, null, debugCtx));\n        }\n        return el;\n    }\n    setAttribute(el, name, value, namespace) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            const fullName = namespace ? namespace + ':' + name : name;\n            debugEl.attributes[fullName] = value;\n        }\n        this.delegate.setAttribute(el, name, value, namespace);\n    }\n    removeAttribute(el, name, namespace) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            const fullName = namespace ? namespace + ':' + name : name;\n            debugEl.attributes[fullName] = null;\n        }\n        this.delegate.removeAttribute(el, name, namespace);\n    }\n    addClass(el, name) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.classes[name] = true;\n        }\n        this.delegate.addClass(el, name);\n    }\n    removeClass(el, name) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.classes[name] = false;\n        }\n        this.delegate.removeClass(el, name);\n    }\n    setStyle(el, style, value, flags) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.styles[style] = value;\n        }\n        this.delegate.setStyle(el, style, value, flags);\n    }\n    removeStyle(el, style, flags) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.styles[style] = null;\n        }\n        this.delegate.removeStyle(el, style, flags);\n    }\n    setProperty(el, name, value) {\n        const debugEl = getDebugNode$1(el);\n        if (debugEl && debugEl instanceof DebugElement__PRE_R3__) {\n            debugEl.properties[name] = value;\n        }\n        this.delegate.setProperty(el, name, value);\n    }\n    listen(target, eventName, callback) {\n        if (typeof target !== 'string') {\n            const debugEl = getDebugNode$1(target);\n            if (debugEl) {\n                debugEl.listeners.push(new DebugEventListener(eventName, callback));\n            }\n        }\n        return this.delegate.listen(target, eventName, callback);\n    }\n    parentNode(node) {\n        return this.delegate.parentNode(node);\n    }\n    nextSibling(node) {\n        return this.delegate.nextSibling(node);\n    }\n    setValue(node, value) {\n        return this.delegate.setValue(node, value);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nfunction overrideProvider(override) {\n    initServicesIfNeeded();\n    return Services.overrideProvider(override);\n}\nfunction overrideComponentView(comp, componentFactory) {\n    initServicesIfNeeded();\n    return Services.overrideComponentView(comp, componentFactory);\n}\nfunction clearOverrides() {\n    initServicesIfNeeded();\n    return Services.clearOverrides();\n}\n// Attention: this function is called as top level function.\n// Putting any logic in here will destroy closure tree shaking!\nfunction createNgModuleFactory(ngModuleType, bootstrapComponents, defFactory) {\n    return new NgModuleFactory_(ngModuleType, bootstrapComponents, defFactory);\n}\nfunction cloneNgModuleDefinition(def) {\n    const providers = Array.from(def.providers);\n    const modules = Array.from(def.modules);\n    const providersByKey = {};\n    for (const key in def.providersByKey) {\n        providersByKey[key] = def.providersByKey[key];\n    }\n    return {\n        factory: def.factory,\n        scope: def.scope,\n        providers,\n        modules,\n        providersByKey,\n    };\n}\nclass NgModuleFactory_ extends NgModuleFactory {\n    constructor(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n        // Attention: this ctor is called as top level function.\n        // Putting any logic in here will destroy closure tree shaking!\n        super();\n        this.moduleType = moduleType;\n        this._bootstrapComponents = _bootstrapComponents;\n        this._ngModuleDefFactory = _ngModuleDefFactory;\n    }\n    create(parentInjector) {\n        initServicesIfNeeded();\n        // Clone the NgModuleDefinition so that any tree shakeable provider definition\n        // added to this instance of the NgModuleRef doesn't affect the cached copy.\n        // See https://github.com/angular/angular/issues/25018.\n        const def = cloneNgModuleDefinition(resolveDefinition(this._ngModuleDefFactory));\n        return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n    }\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// clang-format on\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nif (ngDevMode) {\n    // This helper is to give a reasonable error message to people upgrading to v9 that have not yet\n    // installed `@angular/localize` in their app.\n    // tslint:disable-next-line: no-toplevel-property-access\n    _global.$localize = _global.$localize || function () {\n        throw new Error('It looks like your application or one of its dependencies is using i18n.\\n' +\n            'Angular 9 introduced a global `$localize()` function that needs to be loaded.\\n' +\n            'Please run `ng add @angular/localize` from the Angular CLI.\\n' +\n            '(For non-CLI projects, add `import \\'@angular/localize/init\\';` to your `polyfills.ts` file.\\n' +\n            'For server-side rendering applications add the import to your `main.server.ts` file.)');\n    };\n}\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, Attribute, COMPILER_OPTIONS, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, ContentChild, ContentChildren, DEFAULT_CURRENCY_CODE, DebugElement, DebugEventListener, DebugNode, DefaultIterableDiffer, Directive, ElementRef, EmbeddedViewRef, ErrorHandler, EventEmitter, Host, HostBinding, HostListener, INJECTOR, Inject, InjectFlags, Injectable, InjectionToken, Injector, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID$1 as LOCALE_ID, MissingTranslationStrategy, ModuleWithComponentFactories, NO_ERRORS_SCHEMA, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, NgZone, Optional, Output, PACKAGE_ROOT_URL, PLATFORM_ID, PLATFORM_INITIALIZER, Pipe, PlatformRef, Query, QueryList, ReflectiveInjector, ReflectiveKey, Renderer2, RendererFactory2, RendererStyleFlags2, ResolvedReflectiveFactory, Sanitizer, SecurityContext, Self, SimpleChange, SkipSelf, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Testability, TestabilityRegistry, Type, VERSION, Version, ViewChild, ViewChildren, ViewContainerRef, ViewEncapsulation$1 as ViewEncapsulation, ViewRef$1 as ViewRef, WrappedValue, asNativeElements, assertPlatform, createPlatform, createPlatformFactory, defineInjectable, destroyPlatform, enableProdMode, forwardRef, getDebugNode$1 as getDebugNode, getModuleFactory, getPlatform, inject, isDevMode, platformCore, resolveForwardRef, setTestabilityGetter, ɵ0, ɵ1, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, ChangeDetectorStatus as ɵChangeDetectorStatus, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, ComponentFactory as ɵComponentFactory, Console as ɵConsole, DEFAULT_LOCALE_ID as ɵDEFAULT_LOCALE_ID, EMPTY_ARRAY$4 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, INJECTOR_IMPL__POST_R3__ as ɵINJECTOR_IMPL__POST_R3__, INJECTOR_SCOPE as ɵINJECTOR_SCOPE, LifecycleHooksFeature as ɵLifecycleHooksFeature, LocaleDataIndex as ɵLocaleDataIndex, NG_COMP_DEF as ɵNG_COMP_DEF, NG_DIR_DEF as ɵNG_DIR_DEF, NG_ELEMENT_ID as ɵNG_ELEMENT_ID, NG_INJ_DEF as ɵNG_INJ_DEF, NG_MOD_DEF as ɵNG_MOD_DEF, NG_PIPE_DEF as ɵNG_PIPE_DEF, NG_PROV_DEF as ɵNG_PROV_DEF, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, NO_CHANGE as ɵNO_CHANGE, NgModuleFactory$1 as ɵNgModuleFactory, NoopNgZone as ɵNoopNgZone, ReflectionCapabilities as ɵReflectionCapabilities, ComponentFactory$1 as ɵRender3ComponentFactory, ComponentRef$1 as ɵRender3ComponentRef, NgModuleRef$1 as ɵRender3NgModuleRef, SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, SWITCH_COMPILE_COMPONENT__POST_R3__ as ɵSWITCH_COMPILE_COMPONENT__POST_R3__, SWITCH_COMPILE_DIRECTIVE__POST_R3__ as ɵSWITCH_COMPILE_DIRECTIVE__POST_R3__, SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, SWITCH_COMPILE_PIPE__POST_R3__ as ɵSWITCH_COMPILE_PIPE__POST_R3__, SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, SWITCH_IVY_ENABLED__POST_R3__ as ɵSWITCH_IVY_ENABLED__POST_R3__, SWITCH_RENDERER2_FACTORY__POST_R3__ as ɵSWITCH_RENDERER2_FACTORY__POST_R3__, SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ as ɵSWITCH_TEMPLATE_REF_FACTORY__POST_R3__, SWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__ as ɵSWITCH_VIEW_CONTAINER_REF_FACTORY__POST_R3__, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeUrl as ɵ_sanitizeUrl, allowSanitizationBypassAndThrow as ɵallowSanitizationBypassAndThrow, anchorDef as ɵand, isForwardRef as ɵangular_packages_core_core_a, injectInjectorOnly as ɵangular_packages_core_core_b, instructionState as ɵangular_packages_core_core_ba, getLView as ɵangular_packages_core_core_bb, getPreviousOrParentTNode as ɵangular_packages_core_core_bc, getBindingRoot as ɵangular_packages_core_core_bd, nextContextImpl as ɵangular_packages_core_core_be, pureFunction1Internal as ɵangular_packages_core_core_bg, pureFunction2Internal as ɵangular_packages_core_core_bh, pureFunction3Internal as ɵangular_packages_core_core_bi, pureFunction4Internal as ɵangular_packages_core_core_bj, pureFunctionVInternal as ɵangular_packages_core_core_bk, getUrlSanitizer as ɵangular_packages_core_core_bl, makeParamDecorator as ɵangular_packages_core_core_bm, makePropDecorator as ɵangular_packages_core_core_bn, getClosureSafeProperty as ɵangular_packages_core_core_bo, getRootContext as ɵangular_packages_core_core_bq, i18nPostprocess as ɵangular_packages_core_core_br, NullInjector as ɵangular_packages_core_core_c, ReflectiveInjector_ as ɵangular_packages_core_core_d, ReflectiveDependency as ɵangular_packages_core_core_e, resolveReflectiveProviders as ɵangular_packages_core_core_f, _appIdRandomProviderFactory as ɵangular_packages_core_core_g, createElementRef as ɵangular_packages_core_core_h, createTemplateRef as ɵangular_packages_core_core_i, getModuleFactory__PRE_R3__ as ɵangular_packages_core_core_j, DebugNode__PRE_R3__ as ɵangular_packages_core_core_k, DebugElement__PRE_R3__ as ɵangular_packages_core_core_l, getDebugNodeR2__PRE_R3__ as ɵangular_packages_core_core_m, DefaultIterableDifferFactory as ɵangular_packages_core_core_n, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_o, _iterableDiffersFactory as ɵangular_packages_core_core_p, _keyValueDiffersFactory as ɵangular_packages_core_core_q, _localeFactory as ɵangular_packages_core_core_r, APPLICATION_MODULE_PROVIDERS as ɵangular_packages_core_core_s, zoneSchedulerFactory as ɵangular_packages_core_core_t, USD_CURRENCY_CODE as ɵangular_packages_core_core_u, _def as ɵangular_packages_core_core_v, DebugContext as ɵangular_packages_core_core_w, NgOnChangesFeatureImpl as ɵangular_packages_core_core_x, SCHEDULER as ɵangular_packages_core_core_y, injectAttributeImpl as ɵangular_packages_core_core_z, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, createComponentFactory as ɵccf, clearOverrides as ɵclearOverrides, clearResolutionOfComponentResourcesQueue as ɵclearResolutionOfComponentResourcesQueue, createNgModuleFactory as ɵcmf, compileComponent as ɵcompileComponent, compileDirective as ɵcompileDirective, compileNgModule as ɵcompileNgModule, compileNgModuleDefs as ɵcompileNgModuleDefs, compileNgModuleFactory__POST_R3__ as ɵcompileNgModuleFactory__POST_R3__, compilePipe as ɵcompilePipe, createInjector as ɵcreateInjector, createRendererType2 as ɵcrt, defaultIterableDiffers as ɵdefaultIterableDiffers, defaultKeyValueDiffers as ɵdefaultKeyValueDiffers, detectChanges as ɵdetectChanges, devModeEqual as ɵdevModeEqual, directiveDef as ɵdid, elementDef as ɵeld, findLocaleData as ɵfindLocaleData, flushModuleScopingQueueAsMuchAsPossible as ɵflushModuleScopingQueueAsMuchAsPossible, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, getDebugNodeR2 as ɵgetDebugNodeR2, getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, getDirectives as ɵgetDirectives, getHostElement as ɵgetHostElement, getInjectableDef as ɵgetInjectableDef, getLContext as ɵgetLContext, getLocaleCurrencyCode as ɵgetLocaleCurrencyCode, getLocalePluralCase as ɵgetLocalePluralCase, getModuleFactory__POST_R3__ as ɵgetModuleFactory__POST_R3__, getSanitizationBypassType as ɵgetSanitizationBypassType, _global as ɵglobal, initServicesIfNeeded as ɵinitServicesIfNeeded, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, isBoundToModule__POST_R3__ as ɵisBoundToModule__POST_R3__, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, isListLikeIterable as ɵisListLikeIterable, isObservable as ɵisObservable, isPromise as ɵisPromise, ivyEnabled as ɵivyEnabled, makeDecorator as ɵmakeDecorator, markDirty as ɵmarkDirty, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, noSideEffects as ɵnoSideEffects, nodeValue as ɵnov, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, pureArrayDef as ɵpad, patchComponentDefWithScope as ɵpatchComponentDefWithScope, pipeDef as ɵpid, pureObjectDef as ɵpod, purePipeDef as ɵppd, providerDef as ɵprd, publishDefaultGlobalUtils as ɵpublishDefaultGlobalUtils, publishGlobalUtil as ɵpublishGlobalUtil, queryDef as ɵqud, registerLocaleData as ɵregisterLocaleData, registerModuleFactory as ɵregisterModuleFactory, registerNgModuleType as ɵregisterNgModuleType, renderComponent$1 as ɵrenderComponent, resetCompiledComponents as ɵresetCompiledComponents, resetJitOptions as ɵresetJitOptions, resolveComponentResources as ɵresolveComponentResources, setClassMetadata as ɵsetClassMetadata, setCurrentInjector as ɵsetCurrentInjector, setDocument as ɵsetDocument, setLocaleId as ɵsetLocaleId, store as ɵstore, stringify as ɵstringify, textDef as ɵted, transitiveScopesFor as ɵtransitiveScopesFor, unregisterAllLocaleData as ɵunregisterLocaleData, unwrapValue as ɵunv, unwrapSafeValue as ɵunwrapSafeValue, viewDef as ɵvid, whenRendered as ɵwhenRendered, ɵɵCopyDefinitionFeature, ɵɵInheritDefinitionFeature, ɵɵNgOnChangesFeature, ɵɵProvidersFeature, ɵɵadvance, ɵɵattribute, ɵɵattributeInterpolate1, ɵɵattributeInterpolate2, ɵɵattributeInterpolate3, ɵɵattributeInterpolate4, ɵɵattributeInterpolate5, ɵɵattributeInterpolate6, ɵɵattributeInterpolate7, ɵɵattributeInterpolate8, ɵɵattributeInterpolateV, ɵɵclassMap, ɵɵclassMapInterpolate1, ɵɵclassMapInterpolate2, ɵɵclassMapInterpolate3, ɵɵclassMapInterpolate4, ɵɵclassMapInterpolate5, ɵɵclassMapInterpolate6, ɵɵclassMapInterpolate7, ɵɵclassMapInterpolate8, ɵɵclassMapInterpolateV, ɵɵclassProp, ɵɵcontentQuery, ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineInjectable, ɵɵdefineInjector, ɵɵdefineNgModule, ɵɵdefinePipe, ɵɵdirectiveInject, ɵɵdisableBindings, ɵɵelement, ɵɵelementContainer, ɵɵelementContainerEnd, ɵɵelementContainerStart, ɵɵelementEnd, ɵɵelementStart, ɵɵenableBindings, ɵɵgetCurrentView, ɵɵgetFactoryOf, ɵɵgetInheritedFactory, ɵɵhostProperty, ɵɵi18n, ɵɵi18nApply, ɵɵi18nAttributes, ɵɵi18nEnd, ɵɵi18nExp, ɵɵi18nPostprocess, ɵɵi18nStart, ɵɵinject, ɵɵinjectAttribute, ɵɵinjectPipeChangeDetectorRef, ɵɵinvalidFactory, ɵɵinvalidFactoryDep, ɵɵlistener, ɵɵloadQuery, ɵɵnamespaceHTML, ɵɵnamespaceMathML, ɵɵnamespaceSVG, ɵɵnextContext, ɵɵpipe, ɵɵpipeBind1, ɵɵpipeBind2, ɵɵpipeBind3, ɵɵpipeBind4, ɵɵpipeBindV, ɵɵprojection, ɵɵprojectionDef, ɵɵproperty, ɵɵpropertyInterpolate, ɵɵpropertyInterpolate1, ɵɵpropertyInterpolate2, ɵɵpropertyInterpolate3, ɵɵpropertyInterpolate4, ɵɵpropertyInterpolate5, ɵɵpropertyInterpolate6, ɵɵpropertyInterpolate7, ɵɵpropertyInterpolate8, ɵɵpropertyInterpolateV, ɵɵpureFunction0, ɵɵpureFunction1, ɵɵpureFunction2, ɵɵpureFunction3, ɵɵpureFunction4, ɵɵpureFunction5, ɵɵpureFunction6, ɵɵpureFunction7, ɵɵpureFunction8, ɵɵpureFunctionV, ɵɵqueryRefresh, ɵɵreference, ɵɵresolveBody, ɵɵresolveDocument, ɵɵresolveWindow, ɵɵrestoreView, ɵɵsanitizeHtml, ɵɵsanitizeResourceUrl, ɵɵsanitizeScript, ɵɵsanitizeStyle, ɵɵsanitizeUrl, ɵɵsanitizeUrlOrResourceUrl, ɵɵsetComponentScope, ɵɵsetNgModuleScope, ɵɵstaticContentQuery, ɵɵstaticViewQuery, ɵɵstyleMap, ɵɵstyleMapInterpolate1, ɵɵstyleMapInterpolate2, ɵɵstyleMapInterpolate3, ɵɵstyleMapInterpolate4, ɵɵstyleMapInterpolate5, ɵɵstyleMapInterpolate6, ɵɵstyleMapInterpolate7, ɵɵstyleMapInterpolate8, ɵɵstyleMapInterpolateV, ɵɵstyleProp, ɵɵstylePropInterpolate1, ɵɵstylePropInterpolate2, ɵɵstylePropInterpolate3, ɵɵstylePropInterpolate4, ɵɵstylePropInterpolate5, ɵɵstylePropInterpolate6, ɵɵstylePropInterpolate7, ɵɵstylePropInterpolate8, ɵɵstylePropInterpolateV, ɵɵsyntheticHostListener, ɵɵsyntheticHostProperty, ɵɵtemplate, ɵɵtemplateRefExtractor, ɵɵtext, ɵɵtextInterpolate, ɵɵtextInterpolate1, ɵɵtextInterpolate2, ɵɵtextInterpolate3, ɵɵtextInterpolate4, ɵɵtextInterpolate5, ɵɵtextInterpolate6, ɵɵtextInterpolate7, ɵɵtextInterpolate8, ɵɵtextInterpolateV, ɵɵviewQuery };\n//# sourceMappingURL=core.js.map\n","\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 ' + (panel.cardClass || '')\">\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 || null\"></ng-template>\n          </div>\n        </div>\n      </div>\n    </ng-template>\n  ","\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    <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, NgbSlideEventSource.INDICATOR)\"></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(NgbSlideEventSource.ARROW_LEFT)\" *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(NgbSlideEventSource.ARROW_RIGHT)\" *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  ","{{ i18n.getDayNumerals(date) }}","\n    <div class=\"ngb-dp-arrow\">\n      <button type=\"button\" class=\"btn btn-link ngb-dp-arrow-btn\" (click)=\"onClickPrev($event)\" [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)=\"onClickNext($event)\" [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    <select #month\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\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($any($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 #year\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\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($any($event).target.value)\">\n        <option *ngFor=\"let y of years\" [value]=\"y\">{{ i18n.getYearNumerals(y) }}</option>\n    </select>\n  ","\n    <ng-template #defaultDayTemplate let-date=\"date\" let-currentMonth=\"currentMonth\" let-selected=\"selected\"\n                 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    <ng-template #defaultContentTemplate>\n      <div *ngFor=\"let month of model.months; let i = index;\" class=\"ngb-dp-month\">\n        <div *ngIf=\"navigation === 'none' || (displayMonths > 1 && navigation === 'select')\" class=\"ngb-dp-month-name\">\n          {{ i18n.getMonthFullName(month.number, month.year) }} {{ i18n.getYearNumerals(month.year) }}\n        </div>\n        <ngb-datepicker-month [month]=\"month.firstDate\"></ngb-datepicker-month>\n      </div>\n    </ng-template>\n\n    <div class=\"ngb-dp-header\">\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 class=\"ngb-dp-content\" [class.ngb-dp-months]=\"!contentTemplate\" #content>\n      <ng-template [ngTemplateOutlet]=\"contentTemplate?.templateRef || defaultContentTemplate\"></ng-template>\n    </div>\n\n    <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n  ","\n    <div *ngIf=\"datepicker.showWeekdays\" class=\"ngb-dp-week ngb-dp-weekdays\" role=\"row\">\n      <div *ngIf=\"datepicker.showWeekNumbers\" class=\"ngb-dp-weekday ngb-dp-showweek\"></div>\n      <div *ngFor=\"let w of viewModel.weekdays\" class=\"ngb-dp-weekday small\" role=\"columnheader\">\n        {{ i18n.getWeekdayShortName(w) }}\n      </div>\n    </div>\n    <ng-template ngFor let-week [ngForOf]=\"viewModel.weeks\">\n      <div *ngIf=\"!week.collapsed\" class=\"ngb-dp-week\" role=\"row\">\n        <div *ngIf=\"datepicker.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); $event.preventDefault()\" 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]=\"datepicker.dayTemplate\" [ngTemplateOutletContext]=\"day.context\"></ng-template>\n          </ng-template>\n        </div>\n      </div>\n    </ng-template>\n  ","\n      <ng-template ngFor let-item [ngForOf]=\"nav.items\">\n          <div class=\"tab-pane\"\n               *ngIf=\"item.isPanelInDom()\"\n               [id]=\"item.panelDomId\"\n               [class.active]=\"item.active\"\n               [attr.role]=\"paneRole ? paneRole : nav.roles ? 'tabpanel' : undefined\"\n               [attr.aria-labelledby]=\"item.domId\">\n              <ng-template [ngTemplateOutlet]=\"item.contentTpl?.templateRef || null\"\n                           [ngTemplateOutletContext]=\"{$implicit: item.active}\"></ng-template>\n          </div>\n      </ng-template>\n  ","\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]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\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]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\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\" [attr.aria-current]=\"(pageNumber === page ? 'page' : null)\">\n        <a *ngIf=\"isEllipsis(pageNumber)\" class=\"page-link\" tabindex=\"-1\" aria-disabled=\"true\">\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          [attr.tabindex]=\"disabled ? '-1' : null\" [attr.aria-disabled]=\"disabled ? 'true' : null\">\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]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\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]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\n          <ng-template [ngTemplateOutlet]=\"tplLast?.templateRef || last\"\n                       [ngTemplateOutletContext]=\"{disabled: nextDisabled(), currentPage: page}\"></ng-template>\n        </a>\n      </li>\n    </ul>\n  ","\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() ? $any(title) : simpleTitle\" [ngTemplateOutletContext]=\"context\"></ng-template>\n    </h3>\n    <div class=\"popover-body\"><ng-content></ng-content></div>","\n    <div class=\"progress\" [style.height]=\"height\">\n      <div class=\"progress-bar{{type ? ' bg-' + type : ''}}{{textType ? ' text-' + textType : ''}}\n      {{animated ? ' progress-bar-animated' : ''}}{{striped ? ' progress-bar-striped' : ''}}\"\n      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\">{{getValue() / max | percent}}</span><ng-content></ng-content>\n      </div>\n    </div>\n  ","\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    <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-selected]=\"tab.id === activeId\" [attr.aria-disabled]=\"tab.disabled\">\n          {{tab.title}}<ng-template [ngTemplateOutlet]=\"tab.titleTpl?.templateRef || null\"></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          <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.templateRef || null\"></ng-template>\n        </div>\n      </ng-template>\n    </div>\n  ","\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\"\n            [class.form-control-lg]=\"isLargeSize\"\n            maxlength=\"2\" inputmode=\"numeric\" placeholder=\"HH\" i18n-placeholder=\"@@ngb.timepicker.HH\"\n            [value]=\"formatHour(model?.hour)\" (change)=\"updateHour($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Hours\" i18n-aria-label=\"@@ngb.timepicker.hours\"\n            (input)=\"formatInput($any($event).target)\"\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\" inputmode=\"numeric\" placeholder=\"MM\" i18n-placeholder=\"@@ngb.timepicker.MM\"\n            [value]=\"formatMinSec(model?.minute)\" (change)=\"updateMinute($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Minutes\" i18n-aria-label=\"@@ngb.timepicker.minutes\"\n            (input)=\"formatInput($any($event).target)\"\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\" inputmode=\"numeric\" placeholder=\"SS\" i18n-placeholder=\"@@ngb.timepicker.SS\"\n            [value]=\"formatMinSec(model?.second)\" (change)=\"updateSecond($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Seconds\" i18n-aria-label=\"@@ngb.timepicker.seconds\"\n            (input)=\"formatInput($any($event).target)\"\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 && model.hour >= 12; else am\"\n                          i18n=\"@@ngb.timepicker.PM\">{{ i18n.getAfternoonPeriod() }}</ng-container>\n            <ng-template #am i18n=\"@@ngb.timepicker.AM\">{{ i18n.getMorningPeriod() }}</ng-template>\n          </button>\n        </div>\n      </div>\n    </fieldset>\n  ","\n    <ng-template #headerTpl>\n      <strong class=\"mr-auto\">{{header}}</strong>\n    </ng-template>\n    <ng-template [ngIf]=\"contentHeaderTpl || header\">\n      <div class=\"toast-header\">\n        <ng-template [ngTemplateOutlet]=\"contentHeaderTpl || headerTpl\"></ng-template>\n        <button type=\"button\" class=\"close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.toast.close-aria\" (click)=\"hide()\">\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n    </ng-template>\n    <div class=\"toast-body\">\n      <ng-content></ng-content>\n    </div>\n  ","<div class=\"arrow\"></div><div class=\"tooltip-inner\"><ng-content></ng-content></div>","\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  ","<ng-template ngFor [ngForOf]=\"parts\" let-part let-isOdd=\"odd\"><span *ngIf=\"isOdd; else even\" [class]=\"highlightClass\">{{part}}</span><ng-template #even>{{part}}</ng-template></ng-template>","\n    <div #dialog [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '') +\n     (scrollable ? ' modal-dialog-scrollable' : '')\" role=\"document\">\n        <div class=\"modal-content\"><ng-content></ng-content></div>\n    </div>\n    ","import { Subscriber } from '../Subscriber';\nexport function bufferCount(bufferSize, startBufferEvery = null) {\n    return function bufferCountOperatorFunction(source) {\n        return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n    };\n}\nclass BufferCountOperator {\n    constructor(bufferSize, startBufferEvery) {\n        this.bufferSize = bufferSize;\n        this.startBufferEvery = startBufferEvery;\n        if (!startBufferEvery || bufferSize === startBufferEvery) {\n            this.subscriberClass = BufferCountSubscriber;\n        }\n        else {\n            this.subscriberClass = BufferSkipCountSubscriber;\n        }\n    }\n    call(subscriber, source) {\n        return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n    }\n}\nclass BufferCountSubscriber extends Subscriber {\n    constructor(destination, bufferSize) {\n        super(destination);\n        this.bufferSize = bufferSize;\n        this.buffer = [];\n    }\n    _next(value) {\n        const buffer = this.buffer;\n        buffer.push(value);\n        if (buffer.length == this.bufferSize) {\n            this.destination.next(buffer);\n            this.buffer = [];\n        }\n    }\n    _complete() {\n        const buffer = this.buffer;\n        if (buffer.length > 0) {\n            this.destination.next(buffer);\n        }\n        super._complete();\n    }\n}\nclass BufferSkipCountSubscriber extends Subscriber {\n    constructor(destination, bufferSize, startBufferEvery) {\n        super(destination);\n        this.bufferSize = bufferSize;\n        this.startBufferEvery = startBufferEvery;\n        this.buffers = [];\n        this.count = 0;\n    }\n    _next(value) {\n        const { bufferSize, startBufferEvery, buffers, count } = this;\n        this.count++;\n        if (count % startBufferEvery === 0) {\n            buffers.push([]);\n        }\n        for (let i = buffers.length; i--;) {\n            const buffer = buffers[i];\n            buffer.push(value);\n            if (buffer.length === bufferSize) {\n                buffers.splice(i, 1);\n                this.destination.next(buffer);\n            }\n        }\n    }\n    _complete() {\n        const { buffers, destination } = this;\n        while (buffers.length > 0) {\n            let buffer = buffers.shift();\n            if (buffer.length > 0) {\n                destination.next(buffer);\n            }\n        }\n        super._complete();\n    }\n}\n//# sourceMappingURL=bufferCount.js.map","import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\nexport function elementAt(index, defaultValue) {\n    if (index < 0) {\n        throw new ArgumentOutOfRangeError();\n    }\n    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(filter((v, i) => i === index), take(1), hasDefaultValue\n        ? defaultIfEmpty(defaultValue)\n        : throwIfEmpty(() => new ArgumentOutOfRangeError()));\n}\n//# sourceMappingURL=elementAt.js.map","const ObjectUnsubscribedErrorImpl = (() => {\n    function ObjectUnsubscribedErrorImpl() {\n        Error.call(this);\n        this.message = 'object unsubscribed';\n        this.name = 'ObjectUnsubscribedError';\n        return this;\n    }\n    ObjectUnsubscribedErrorImpl.prototype = Object.create(Error.prototype);\n    return ObjectUnsubscribedErrorImpl;\n})();\nexport const ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { not } from '../util/not';\nimport { filter } from './filter';\nexport function partition(predicate, thisArg) {\n    return (source) => [\n        filter(predicate, thisArg)(source),\n        filter(not(predicate, thisArg))(source)\n    ];\n}\n//# sourceMappingURL=partition.js.map","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function takeLast(count) {\n    return function takeLastOperatorFunction(source) {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeLastOperator(count));\n        }\n    };\n}\nclass TakeLastOperator {\n    constructor(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n    }\n}\nclass TakeLastSubscriber extends Subscriber {\n    constructor(destination, total) {\n        super(destination);\n        this.total = total;\n        this.ring = new Array();\n        this.count = 0;\n    }\n    _next(value) {\n        const ring = this.ring;\n        const total = this.total;\n        const count = this.count++;\n        if (ring.length < total) {\n            ring.push(value);\n        }\n        else {\n            const index = count % total;\n            ring[index] = value;\n        }\n    }\n    _complete() {\n        const destination = this.destination;\n        let count = this.count;\n        if (count > 0) {\n            const total = this.count >= this.total ? this.total : this.count;\n            const ring = this.ring;\n            for (let i = 0; i < total; i++) {\n                const idx = (count++) % total;\n                destination.next(ring[idx]);\n            }\n        }\n        destination.complete();\n    }\n}\n//# sourceMappingURL=takeLast.js.map","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n    return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeToObservable = (obj) => (subscriber) => {\n    const obs = obj[Symbol_observable]();\n    if (typeof obs.subscribe !== 'function') {\n        throw new TypeError('Provided object does not correctly implement Symbol.observable');\n    }\n    else {\n        return obs.subscribe(subscriber);\n    }\n};\n//# sourceMappingURL=subscribeToObservable.js.map","export default function _iterableToArrayLimit(arr, i) {\n  if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _e = undefined;\n\n  try {\n    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n\n  return _arr;\n}","import { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n    if (!scheduler) {\n        if (input instanceof Observable) {\n            return input;\n        }\n        return new Observable(subscribeTo(input));\n    }\n    else {\n        return scheduled(input, scheduler);\n    }\n}\n//# sourceMappingURL=from.js.map","import { Subscriber } from '../Subscriber';\nexport function mapTo(value) {\n    return (source) => source.lift(new MapToOperator(value));\n}\nclass MapToOperator {\n    constructor(value) {\n        this.value = value;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new MapToSubscriber(subscriber, this.value));\n    }\n}\nclass MapToSubscriber extends Subscriber {\n    constructor(destination, value) {\n        super(destination);\n        this.value = value;\n    }\n    _next(x) {\n        this.destination.next(this.value);\n    }\n}\n//# sourceMappingURL=mapTo.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","export const isArray = (() => Array.isArray || ((x) => x && typeof x.length === 'number'))();\n//# sourceMappingURL=isArray.js.map","export default function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}","import { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nexport class ConnectableObservable extends Observable {\n    constructor(source, subjectFactory) {\n        super();\n        this.source = source;\n        this.subjectFactory = subjectFactory;\n        this._refCount = 0;\n        this._isComplete = false;\n    }\n    _subscribe(subscriber) {\n        return this.getSubject().subscribe(subscriber);\n    }\n    getSubject() {\n        const subject = this._subject;\n        if (!subject || subject.isStopped) {\n            this._subject = this.subjectFactory();\n        }\n        return this._subject;\n    }\n    connect() {\n        let connection = this._connection;\n        if (!connection) {\n            this._isComplete = false;\n            connection = this._connection = new Subscription();\n            connection.add(this.source\n                .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n            if (connection.closed) {\n                this._connection = null;\n                connection = Subscription.EMPTY;\n            }\n        }\n        return connection;\n    }\n    refCount() {\n        return higherOrderRefCount()(this);\n    }\n}\nexport const connectableObservableDescriptor = (() => {\n    const connectableProto = ConnectableObservable.prototype;\n    return {\n        operator: { value: null },\n        _refCount: { value: 0, writable: true },\n        _subject: { value: null, writable: true },\n        _connection: { value: null, writable: true },\n        _subscribe: { value: connectableProto._subscribe },\n        _isComplete: { value: connectableProto._isComplete, writable: true },\n        getSubject: { value: connectableProto.getSubject },\n        connect: { value: connectableProto.connect },\n        refCount: { value: connectableProto.refCount }\n    };\n})();\nclass ConnectableSubscriber extends SubjectSubscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _error(err) {\n        this._unsubscribe();\n        super._error(err);\n    }\n    _complete() {\n        this.connectable._isComplete = true;\n        this._unsubscribe();\n        super._complete();\n    }\n    _unsubscribe() {\n        const connectable = this.connectable;\n        if (connectable) {\n            this.connectable = null;\n            const connection = connectable._connection;\n            connectable._refCount = 0;\n            connectable._subject = null;\n            connectable._connection = null;\n            if (connection) {\n                connection.unsubscribe();\n            }\n        }\n    }\n}\nclass RefCountOperator {\n    constructor(connectable) {\n        this.connectable = connectable;\n    }\n    call(subscriber, source) {\n        const { connectable } = this;\n        connectable._refCount++;\n        const refCounter = new RefCountSubscriber(subscriber, connectable);\n        const subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    }\n}\nclass RefCountSubscriber extends Subscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _unsubscribe() {\n        const { connectable } = this;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        const refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        const { connection } = this;\n        const sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    }\n}\n//# sourceMappingURL=ConnectableObservable.js.map","import { Observable } from '../Observable';\nexport const EMPTY = new Observable(subscriber => subscriber.complete());\nexport function empty(scheduler) {\n    return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n    return new Observable(subscriber => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","export function not(pred, thisArg) {\n    function notPred() {\n        return !(notPred.pred.apply(notPred.thisArg, arguments));\n    }\n    notPred.pred = pred;\n    notPred.thisArg = thisArg;\n    return notPred;\n}\n//# sourceMappingURL=not.js.map","import { Subscription } from '../Subscription';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nexport function bufferToggle(openings, closingSelector) {\n    return function bufferToggleOperatorFunction(source) {\n        return source.lift(new BufferToggleOperator(openings, closingSelector));\n    };\n}\nclass BufferToggleOperator {\n    constructor(openings, closingSelector) {\n        this.openings = openings;\n        this.closingSelector = closingSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));\n    }\n}\nclass BufferToggleSubscriber extends OuterSubscriber {\n    constructor(destination, openings, closingSelector) {\n        super(destination);\n        this.closingSelector = closingSelector;\n        this.contexts = [];\n        this.add(subscribeToResult(this, openings));\n    }\n    _next(value) {\n        const contexts = this.contexts;\n        const len = contexts.length;\n        for (let i = 0; i < len; i++) {\n            contexts[i].buffer.push(value);\n        }\n    }\n    _error(err) {\n        const contexts = this.contexts;\n        while (contexts.length > 0) {\n            const context = contexts.shift();\n            context.subscription.unsubscribe();\n            context.buffer = null;\n            context.subscription = null;\n        }\n        this.contexts = null;\n        super._error(err);\n    }\n    _complete() {\n        const contexts = this.contexts;\n        while (contexts.length > 0) {\n            const context = contexts.shift();\n            this.destination.next(context.buffer);\n            context.subscription.unsubscribe();\n            context.buffer = null;\n            context.subscription = null;\n        }\n        this.contexts = null;\n        super._complete();\n    }\n    notifyNext(outerValue, innerValue) {\n        outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);\n    }\n    notifyComplete(innerSub) {\n        this.closeBuffer(innerSub.context);\n    }\n    openBuffer(value) {\n        try {\n            const closingSelector = this.closingSelector;\n            const closingNotifier = closingSelector.call(this, value);\n            if (closingNotifier) {\n                this.trySubscribe(closingNotifier);\n            }\n        }\n        catch (err) {\n            this._error(err);\n        }\n    }\n    closeBuffer(context) {\n        const contexts = this.contexts;\n        if (contexts && context) {\n            const { buffer, subscription } = context;\n            this.destination.next(buffer);\n            contexts.splice(contexts.indexOf(context), 1);\n            this.remove(subscription);\n            subscription.unsubscribe();\n        }\n    }\n    trySubscribe(closingNotifier) {\n        const contexts = this.contexts;\n        const buffer = [];\n        const subscription = new Subscription();\n        const context = { buffer, subscription };\n        contexts.push(context);\n        const innerSubscription = subscribeToResult(this, closingNotifier, context);\n        if (!innerSubscription || innerSubscription.closed) {\n            this.closeBuffer(context);\n        }\n        else {\n            innerSubscription.context = context;\n            this.add(innerSubscription);\n            subscription.add(innerSubscription);\n        }\n    }\n}\n//# sourceMappingURL=bufferToggle.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler) {\n    concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n    return (source) => source.lift(new ExpandOperator(project, concurrent, scheduler));\n}\nexport class ExpandOperator {\n    constructor(project, concurrent, scheduler) {\n        this.project = project;\n        this.concurrent = concurrent;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n    }\n}\nexport class ExpandSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project, concurrent, scheduler) {\n        super(destination);\n        this.project = project;\n        this.concurrent = concurrent;\n        this.scheduler = scheduler;\n        this.index = 0;\n        this.active = 0;\n        this.hasCompleted = false;\n        if (concurrent < Number.POSITIVE_INFINITY) {\n            this.buffer = [];\n        }\n    }\n    static dispatch(arg) {\n        const { subscriber, result, value, index } = arg;\n        subscriber.subscribeToProjection(result, value, index);\n    }\n    _next(value) {\n        const destination = this.destination;\n        if (destination.closed) {\n            this._complete();\n            return;\n        }\n        const index = this.index++;\n        if (this.active < this.concurrent) {\n            destination.next(value);\n            try {\n                const { project } = this;\n                const result = project(value, index);\n                if (!this.scheduler) {\n                    this.subscribeToProjection(result, value, index);\n                }\n                else {\n                    const state = { subscriber: this, result, value, index };\n                    const destination = this.destination;\n                    destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));\n                }\n            }\n            catch (e) {\n                destination.error(e);\n            }\n        }\n        else {\n            this.buffer.push(value);\n        }\n    }\n    subscribeToProjection(result, value, index) {\n        this.active++;\n        const destination = this.destination;\n        destination.add(innerSubscribe(result, new SimpleInnerSubscriber(this)));\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (this.hasCompleted && this.active === 0) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    }\n    notifyNext(innerValue) {\n        this._next(innerValue);\n    }\n    notifyComplete() {\n        const buffer = this.buffer;\n        this.active--;\n        if (buffer && buffer.length > 0) {\n            this._next(buffer.shift());\n        }\n        if (this.hasCompleted && this.active === 0) {\n            this.destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=expand.js.map","import { reduce } from './reduce';\nexport function min(comparer) {\n    const min = (typeof comparer === 'function')\n        ? (x, y) => comparer(x, y) < 0 ? x : y\n        : (x, y) => x < y ? x : y;\n    return reduce(min);\n}\n//# sourceMappingURL=min.js.map","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?: string): HTMLElement | null {\n  if (!selector) {\n    return null;\n  }\n\n  /*\n   * In certain browsers (e.g. Edge 44.18362.449.0) HTMLDocument does\n   * not support `Element.prototype.closest`. To emulate the correct behaviour\n   * we return null when the method is missing.\n   *\n   * Note that in evergreen browsers `closest(document.documentElement, 'html')`\n   * will return the document element whilst in Edge null will be returned. This\n   * compromise was deemed good enough.\n   */\n  if (typeof element.closest === 'undefined') {\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  Host,\n  Input,\n  Optional,\n  Output,\n  QueryList,\n  TemplateRef,\n  ViewEncapsulation\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 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  /**\n   * An optional class applied to the accordion card element that wraps both panel title and content.\n   *\n   * @since 5.3.0\n   */\n  @Input() cardClass: string;\n\n  titleTpl: NgbPanelTitle;\n  headerTpl: NgbPanelHeader;\n  contentTpl: NgbPanelContent;\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  encapsulation: ViewEncapsulation.None,\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 ' + (panel.cardClass || '')\">\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 || null\"></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 | readonly 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 | null, nextState: boolean) {\n    if (panel != null && !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) || null; }\n\n  private _updateActiveIds() {\n    this.activeIds = this.panels.filter(panel => panel.isOpen && !panel.disabled).map(panel => panel.id);\n  }\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  static ngAcceptInputType_ngbPanelToggle: NgbPanel | '';\n\n  @Input()\n  set ngbPanelToggle(panel: NgbPanel) {\n    if (panel) {\n      this.panel = panel;\n    }\n  }\n\n  constructor(public accordion: NgbAccordion, @Optional() @Host() public panel: NgbPanel) {}\n}\n","import {NgModule} 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","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(); }\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} 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","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    '[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  static ngAcceptInputType_disabled: boolean | '';\n\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  static ngAcceptInputType_disabled: boolean | '';\n\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} 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","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  HostListener,\n  Inject,\n  Input,\n  NgZone,\n  OnDestroy,\n  Output,\n  PLATFORM_ID,\n  QueryList,\n  TemplateRef,\n  ViewEncapsulation\n} from '@angular/core';\nimport {isPlatformBrowser} from '@angular/common';\n\nimport {NgbCarouselConfig} from './carousel-config';\n\nimport {BehaviorSubject, combineLatest, NEVER, Subject, timer} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, 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  encapsulation: ViewEncapsulation.None,\n  host: {\n    'class': 'carousel slide',\n    '[style.display]': '\"block\"',\n    'tabIndex': '0',\n    '(keydown.arrowLeft)': 'keyboard && prev(NgbSlideEventSource.ARROW_LEFT)',\n    '(keydown.arrowRight)': 'keyboard && next(NgbSlideEventSource.ARROW_RIGHT)'\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, NgbSlideEventSource.INDICATOR)\"></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(NgbSlideEventSource.ARROW_LEFT)\" *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(NgbSlideEventSource.ARROW_RIGHT)\" *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, OnDestroy {\n  @ContentChildren(NgbSlide) slides: QueryList<NgbSlide>;\n\n  public NgbSlideEventSource = NgbSlideEventSource;\n\n  private _destroy$ = new Subject<void>();\n  private _interval$ = new BehaviorSubject(0);\n  private _mouseHover$ = new BehaviorSubject(false);\n  private _pauseOnHover$ = new BehaviorSubject(false);\n  private _pause$ = new BehaviorSubject(false);\n  private _wrap$ = new BehaviorSubject(false);\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()\n  set interval(value: number) {\n    this._interval$.next(value);\n  }\n\n  get interval() { return this._interval$.value; }\n\n  /**\n   * If `true`, will 'wrap' the carousel by switching from the last slide back to the first.\n   */\n  @Input()\n  set wrap(value: boolean) {\n    this._wrap$.next(value);\n  }\n\n  get wrap() { return this._wrap$.value; }\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()\n  set pauseOnHover(value: boolean) {\n    this._pauseOnHover$.next(value);\n  }\n\n  get pauseOnHover() { return this._pauseOnHover$.value; }\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  @HostListener('mouseenter')\n  mouseEnter() {\n    this._mouseHover$.next(true);\n  }\n\n  @HostListener('mouseleave')\n  mouseLeave() {\n    this._mouseHover$.next(false);\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        const hasNextSlide$ = combineLatest([\n                                this.slide.pipe(map(slideEvent => slideEvent.current), startWith(this.activeId)),\n                                this._wrap$, this.slides.changes.pipe(startWith(null))\n                              ])\n                                  .pipe(\n                                      map(([currentSlideId, wrap]) => {\n                                        const slideArr = this.slides.toArray();\n                                        const currentSlideIdx = this._getSlideIdxById(currentSlideId);\n                                        return wrap ? slideArr.length > 1 : currentSlideIdx < slideArr.length - 1;\n                                      }),\n                                      distinctUntilChanged());\n        combineLatest([this._pause$, this._pauseOnHover$, this._mouseHover$, this._interval$, hasNextSlide$])\n            .pipe(\n                map(([pause, pauseOnHover, mouseHover, interval, hasNextSlide]) =>\n                        ((pause || (pauseOnHover && mouseHover) || !hasNextSlide) ? 0 : interval)),\n\n                distinctUntilChanged(), switchMap(interval => interval > 0 ? timer(interval, interval) : NEVER),\n                takeUntil(this._destroy$))\n            .subscribe(() => this._ngZone.run(() => this.next(NgbSlideEventSource.TIMER)));\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 : '');\n  }\n\n  ngOnDestroy() { this._destroy$.next(); }\n\n  /**\n   * Navigates to a slide with the specified identifier.\n   */\n  select(slideId: string, source?: NgbSlideEventSource) {\n    this._cycleToSelected(slideId, this._getSlideEventDirection(this.activeId, slideId), source);\n  }\n\n  /**\n   * Navigates to the previous slide.\n   */\n  prev(source?: NgbSlideEventSource) {\n    this._cycleToSelected(this._getPrevSlide(this.activeId), NgbSlideEventDirection.RIGHT, source);\n  }\n\n  /**\n   * Navigates to the next slide.\n   */\n  next(source?: NgbSlideEventSource) {\n    this._cycleToSelected(this._getNextSlide(this.activeId), NgbSlideEventDirection.LEFT, source);\n  }\n\n  /**\n   * Pauses cycling through the slides.\n   */\n  pause() { this._pause$.next(true); }\n\n  /**\n   * Restarts cycling through the slides from left to right.\n   */\n  cycle() { this._pause$.next(false); }\n\n  private _cycleToSelected(slideIdx: string, direction: NgbSlideEventDirection, source?: NgbSlideEventSource) {\n    let selectedSlide = this._getSlideById(slideIdx);\n    if (selectedSlide && selectedSlide.id !== this.activeId) {\n      this.slide.emit(\n          {prev: this.activeId, current: selectedSlide.id, direction: direction, paused: this._pause$.value, source});\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 | null {\n    return this.slides.find(slide => slide.id === slideId) || null;\n  }\n\n  private _getSlideIdxById(slideId: string): number {\n    const slide = this._getSlideById(slideId);\n    return slide != null ? this.slides.toArray().indexOf(slide) : -1;\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   * Whether the pause() method was called (and no cycle() call was done afterwards).\n   *\n   * @since 5.1.0\n   */\n  paused: boolean;\n\n  /**\n   * Source triggering the slide change event.\n   *\n   * Possible values are `'timer' | 'arrowLeft' | 'arrowRight' | 'indicator'`\n   *\n   * @since 5.1.0\n   */\n  source?: NgbSlideEventSource;\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 enum NgbSlideEventSource {\n  TIMER = 'timer',\n  ARROW_LEFT = 'arrowLeft',\n  ARROW_RIGHT = 'arrowRight',\n  INDICATOR = 'indicator'\n}\n\nexport const NGB_CAROUSEL_DIRECTIVES = [NgbCarousel, NgbSlide];\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NGB_CAROUSEL_DIRECTIVES} from './carousel';\n\nexport {NgbCarousel, NgbSlide, NgbSlideEvent, NgbSlideEventDirection, NgbSlideEventSource} 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","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} from '@angular/core';\nimport {NgbCollapse} from './collapse';\n\nexport {NgbCollapse} from './collapse';\n\n@NgModule({declarations: [NgbCollapse], exports: [NgbCollapse]})\nexport class 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 | null): NgbDate | null {\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 : <any>null;\n    this.month = isInteger(month) ? month : <any>null;\n    this.day = isInteger(day) ? day : <any>null;\n  }\n\n  /**\n   * Checks if the current date is equal to another date.\n   */\n  equals(other?: NgbDateStruct | null): boolean {\n    return other != null && 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 | null): 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 | null): 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: readonly 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 | null): 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    let checkMonth = true;\n    let expectedMonth = jsDate.getMonth();\n\n    switch (period) {\n      case 'y':\n        jsDate.setFullYear(jsDate.getFullYear() + number);\n        break;\n      case 'm':\n        expectedMonth += number;\n        jsDate.setMonth(expectedMonth);\n        expectedMonth = expectedMonth % 12;\n        if (expectedMonth < 0) {\n          expectedMonth = expectedMonth + 12;\n        }\n        break;\n      case 'd':\n        jsDate.setDate(jsDate.getDate() + number);\n        checkMonth = false;\n        break;\n      default:\n        return date;\n    }\n\n    if (checkMonth && jsDate.getMonth() !== expectedMonth) {\n      // this means the destination month has less days than the initial month\n      // let's go back to the end of the previous month:\n      jsDate.setDate(0);\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: readonly 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 | null): 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 {NgbDatepickerI18n} from './datepicker-i18n';\n\nexport function isChangedDate(prev?: NgbDate | null, next?: NgbDate | null): boolean {\n  return !dateComparator(prev, next);\n}\n\nexport function isChangedMonth(prev?: NgbDate | null, next?: NgbDate | null): boolean {\n  return !prev && !next ? false : !prev || !next ? true : prev.year !== next.year || prev.month !== next.month;\n}\n\nexport function dateComparator(prev?: NgbDate | null, next?: NgbDate | null): boolean {\n  return (!prev && !next) || (!!prev && !!next && prev.equals(next));\n}\n\nexport function checkMinBeforeMax(minDate?: NgbDate | null, maxDate?: NgbDate | null): void {\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 | null, minDate?: NgbDate | null, maxDate?: NgbDate | null): NgbDate |\n    null {\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 || null;\n}\n\nexport function isDateSelectable(date: NgbDate | null | undefined, state: DatepickerViewModel) {\n  const {minDate, maxDate, disabled, markDisabled} = state;\n  // clang-format off\n  return !(\n    date === null ||\n    date === undefined ||\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(\n    calendar: NgbCalendar, date: NgbDate, minDate: NgbDate | null, maxDate: NgbDate | null) {\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 | null, maxDate: NgbDate | null) {\n  if (!date) {\n    return [];\n  }\n\n  const start = minDate ? Math.max(minDate.year, date.year - 500) : date.year - 10;\n  const end = maxDate ? Math.min(maxDate.year, date.year + 500) : date.year + 10;\n\n  const length = end - start + 1;\n  const numbers = Array(length);\n  for (let i = 0; i < length; i++) {\n    numbers[i] = start + i;\n  }\n\n  return numbers;\n}\n\nexport function nextMonthDisabled(calendar: NgbCalendar, date: NgbDate, maxDate: NgbDate | null) {\n  const nextDate = Object.assign(calendar.getNext(date, 'm'), {day: 1});\n  return maxDate != null && nextDate.after(maxDate);\n}\n\nexport function prevMonthDisabled(calendar: NgbCalendar, date: NgbDate, minDate: NgbDate | null) {\n  const prevDate = Object.assign(calendar.getPrev(date, 'm'), {day: 1});\n  return minDate != null && (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 = Object.assign(calendar.getNext(date, 'm', i), {day: 1});\n    months[i] = <any>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 = <any>null;\n  month.lastDate = <any>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,\n        currentYear: month.year, 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} 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\nexport interface DatepickerServiceInputs extends Partial<\n    Required<Pick<DatepickerViewModel, 'dayTemplateData' | 'displayMonths' | 'disabled' | 'firstDayOfWeek' |\n                      'focusVisible' | 'markDisabled' | 'maxDate' | 'minDate' | 'navigation' | 'outsideDays'>>> {}\n\n@Injectable()\nexport class NgbDatepickerService {\n  private _VALIDATORS:\n      {[K in keyof DatepickerServiceInputs]: (v: DatepickerServiceInputs[K]) => Partial<DatepickerViewModel>| void} = {\n        dayTemplateData: (dayTemplateData: NgbDayTemplateData) => {\n          if (this._state.dayTemplateData !== dayTemplateData) {\n            return {dayTemplateData};\n          }\n        },\n        displayMonths: (displayMonths: number) => {\n          displayMonths = toInteger(displayMonths);\n          if (isInteger(displayMonths) && displayMonths > 0 && this._state.displayMonths !== displayMonths) {\n            return {displayMonths};\n          }\n        },\n        disabled: (disabled: boolean) => {\n          if (this._state.disabled !== disabled) {\n            return {disabled};\n          }\n        },\n        firstDayOfWeek: (firstDayOfWeek: number) => {\n          firstDayOfWeek = toInteger(firstDayOfWeek);\n          if (isInteger(firstDayOfWeek) && firstDayOfWeek >= 0 && this._state.firstDayOfWeek !== firstDayOfWeek) {\n            return {firstDayOfWeek};\n          }\n        },\n        focusVisible: (focusVisible: boolean) => {\n          if (this._state.focusVisible !== focusVisible && !this._state.disabled) {\n            return {focusVisible};\n          }\n        },\n        markDisabled: (markDisabled: NgbMarkDisabled) => {\n          if (this._state.markDisabled !== markDisabled) {\n            return {markDisabled};\n          }\n        },\n        maxDate: (date: NgbDate) => {\n          const maxDate = this.toValidDate(date, null);\n          if (isChangedDate(this._state.maxDate, maxDate)) {\n            return {maxDate};\n          }\n        },\n        minDate: (date: NgbDate) => {\n          const minDate = this.toValidDate(date, null);\n          if (isChangedDate(this._state.minDate, minDate)) {\n            return {minDate};\n          }\n        },\n        navigation: (navigation: 'select' | 'arrows' | 'none') => {\n          if (this._state.navigation !== navigation) {\n            return {navigation};\n          }\n        },\n        outsideDays: (outsideDays: 'visible' | 'collapsed' | 'hidden') => {\n          if (this._state.outsideDays !== outsideDays) {\n            return {outsideDays};\n          }\n        }\n      };\n\n  private _model$ = new Subject<DatepickerViewModel>();\n\n  private _dateSelect$ = new Subject<NgbDate>();\n\n  private _state: DatepickerViewModel = {\n    dayTemplateData: null,\n    markDisabled: null,\n    maxDate: null,\n    minDate: null,\n    disabled: false,\n    displayMonths: 1,\n    firstDate: null,\n    firstDayOfWeek: 1,\n    lastDate: null,\n    focusDate: null,\n    focusVisible: false,\n    months: [],\n    navigation: 'select',\n    outsideDays: 'visible',\n    prevDisabled: false,\n    nextDisabled: false,\n    selectedDate: null,\n    selectBoxes: {years: [], months: []}\n  };\n\n  get model$(): Observable<DatepickerViewModel> { return this._model$.pipe(filter(model => model.months.length > 0)); }\n\n  get dateSelect$(): Observable<NgbDate> { return this._dateSelect$.pipe(filter(date => date !== null)); }\n\n  set(options: DatepickerServiceInputs) {\n    let patch = Object.keys(options)\n                    .map(key => this._VALIDATORS[key](options[key]))\n                    .reduce((obj, part) => ({...obj, ...part}), {});\n\n    if (Object.keys(patch).length > 0) {\n      this._nextState(patch);\n    }\n  }\n\n  constructor(private _calendar: NgbCalendar, private _i18n: NgbDatepickerI18n) {}\n\n  focus(date?: NgbDate | null) {\n    const focusedDate = this.toValidDate(date, null);\n    if (focusedDate != null && !this._state.disabled && isChangedDate(this._state.focusDate, focusedDate)) {\n      this._nextState({focusDate: date});\n    }\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 | null) {\n    const firstDate = this.toValidDate(date, this._calendar.getToday());\n    if (firstDate != null && !this._state.disabled &&\n        (!this._state.firstDate || isChangedMonth(this._state.firstDate, firstDate))) {\n      this._nextState({firstDate});\n    }\n  }\n\n  select(date?: NgbDate | null, options: {emitEvent?: boolean} = {}) {\n    const selectedDate = this.toValidDate(date, null);\n    if (selectedDate != null && !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._dateSelect$.next(selectedDate);\n      }\n    }\n  }\n\n  toValidDate(date?: NgbDateStruct | null, defaultValue?: NgbDate | null): NgbDate | null {\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  getMonth(struct: NgbDateStruct) {\n    for (let month of this._state.months) {\n      if (struct.month === month.number && struct.year === month.year) {\n        return month;\n      }\n    }\n    throw new Error(`month ${struct.month} of year ${struct.year} not found`);\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 =\n              !disabled && focusDate && 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 && !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[0].firstDate;\n      state.lastDate = months[months.length - 1].lastDate;\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 || state.focusDate.before(state.firstDate) || 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","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 | null,\n  disabled: boolean,\n  displayMonths: number,\n  firstDate: NgbDate | null,\n  firstDayOfWeek: number,\n  focusDate: NgbDate | null,\n  focusVisible: boolean,\n  lastDate: NgbDate | null,\n  markDisabled: NgbMarkDisabled | null,\n  maxDate: NgbDate | null,\n  minDate: NgbDate | null,\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 | null\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 | null): NgbDateStruct | null;\n\n  /**\n   * Converts an internal `NgbDateStruct` date to a user-model date of type `D`.\n   */\n  abstract toModel(date: NgbDateStruct | null): D | null;\n}\n\n@Injectable()\nexport class NgbDateStructAdapter extends NgbDateAdapter<NgbDateStruct> {\n  /**\n   * Converts a NgbDateStruct value into NgbDateStruct value\n   */\n  fromModel(date: NgbDateStruct | null): NgbDateStruct | null {\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 | null): NgbDateStruct | null {\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  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ContentChild,\n  Directive,\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 {DatepickerServiceInputs, NgbDatepickerService} from './datepicker-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\nexport const 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} | null;\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 * An interface that represents the readonly public state of the datepicker.\n *\n * Accessible via the `datepicker.state` getter\n *\n * @since 5.2.0\n */\nexport interface NgbDatepickerState {\n  /**\n   * The earliest date that can be displayed or selected\n   */\n  readonly minDate: NgbDate | null;\n\n  /**\n   * The latest date that can be displayed or selected\n   */\n  readonly maxDate: NgbDate | null;\n\n  /**\n   * The first visible date of currently displayed months\n   */\n  readonly firstDate: NgbDate;\n\n  /**\n   * The last visible date of currently displayed months\n   */\n  readonly lastDate: NgbDate;\n\n  /**\n   * The date currently focused by the datepicker\n   */\n  readonly focusedDate: NgbDate;\n\n  /**\n   * First dates of months currently displayed by the datepicker\n   *\n   * @since 5.3.0\n   */\n  readonly months: NgbDate[];\n}\n\n/**\n * A directive that marks the content template that customizes the way datepicker months are displayed\n *\n * @since 5.3.0\n */\n@Directive({selector: 'ng-template[ngbDatepickerContent]'})\nexport class NgbDatepickerContent {\n  constructor(public templateRef: TemplateRef<any>) {}\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 #defaultDayTemplate let-date=\"date\" let-currentMonth=\"currentMonth\" let-selected=\"selected\"\n                 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    <ng-template #defaultContentTemplate>\n      <div *ngFor=\"let month of model.months; let i = index;\" class=\"ngb-dp-month\">\n        <div *ngIf=\"navigation === 'none' || (displayMonths > 1 && navigation === 'select')\" class=\"ngb-dp-month-name\">\n          {{ i18n.getMonthFullName(month.number, month.year) }} {{ i18n.getYearNumerals(month.year) }}\n        </div>\n        <ngb-datepicker-month [month]=\"month.firstDate\"></ngb-datepicker-month>\n      </div>\n    </ng-template>\n\n    <div class=\"ngb-dp-header\">\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 class=\"ngb-dp-content\" [class.ngb-dp-months]=\"!contentTemplate\" #content>\n      <ng-template [ngTemplateOutlet]=\"contentTemplate?.templateRef || defaultContentTemplate\"></ng-template>\n    </div>\n\n    <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n  `,\n  providers: [NGB_DATEPICKER_VALUE_ACCESSOR, NgbDatepickerService]\n})\nexport class NgbDatepicker implements OnDestroy,\n    OnChanges, OnInit, ControlValueAccessor {\n  static ngAcceptInputType_autoClose: boolean | string;\n  static ngAcceptInputType_navigation: string;\n  static ngAcceptInputType_outsideDays: string;\n\n  model: DatepickerViewModel;\n\n  @ViewChild('defaultDayTemplate', {static: true}) private _defaultDayTemplate: TemplateRef<DayTemplateContext>;\n  @ViewChild('content', {static: true}) private _contentEl: ElementRef<HTMLElement>;\n  @ContentChild(NgbDatepickerContent, {static: true}) contentTemplate: NgbDatepickerContent;\n\n  private _controlValue: NgbDate | null = null;\n  private _destroyed$ = new Subject<void>();\n  private _publicState: NgbDatepickerState = <any>{};\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   * @since 5.2.0\n   */\n  @Output() dateSelect = new EventEmitter<NgbDate>();\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   * @deprecated 6.0.0 Please use 'dateSelect' output instead due to collision with native\n   * 'select' event.\n   */\n  @Output() select = this.dateSelect;\n\n  onChange = (_: any) => {};\n  onTouched = () => {};\n\n  constructor(\n      private _service: NgbDatepickerService, private _calendar: NgbCalendar, public i18n: NgbDatepickerI18n,\n      config: NgbDatepickerConfig, 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.dateSelect$.pipe(takeUntil(this._destroyed$)).subscribe(date => { this.dateSelect.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      // update public state\n      this._publicState = {\n        maxDate: model.maxDate,\n        minDate: model.minDate,\n        firstDate: model.firstDate !,\n        lastDate: model.lastDate !,\n        focusedDate: model.focusDate !,\n        months: model.months.map(viewModel => viewModel.firstDate)\n      };\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  /**\n   *  Returns the readonly public state of the datepicker\n   *\n   * @since 5.2.0\n   */\n  get state(): NgbDatepickerState { return this._publicState; }\n\n  /**\n   *  Returns the calendar service used in the specific datepicker instance.\n   *\n   *  @since 5.3.0\n   */\n  get calendar(): NgbCalendar { return this._calendar; }\n\n  /**\n   *  Focuses on given date.\n   */\n  focusDate(date?: NgbDateStruct | null): void { this._service.focus(NgbDate.from(date)); }\n\n  /**\n   *  Selects focused date.\n   */\n  focusSelect(): void { this._service.focusSelect(); }\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._contentEl.nativeElement, 'focusin');\n      const focusOuts$ = fromEvent<FocusEvent>(this._contentEl.nativeElement, 'focusout');\n      const {nativeElement} = this._elementRef;\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                        nativeElement.contains(target as Node) && nativeElement.contains(relatedTarget as Node))),\n              takeUntil(this._destroyed$))\n          .subscribe(({type}) => this._ngZone.run(() => this._service.set({focusVisible: type === 'focusin'})));\n    });\n  }\n\n  ngOnDestroy() { this._destroyed$.next(); }\n\n  ngOnInit() {\n    if (this.model === undefined) {\n      const inputs: DatepickerServiceInputs = {};\n      ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n       'outsideDays']\n          .forEach(name => inputs[name] = this[name]);\n      this._service.set(inputs);\n\n      this.navigateTo(this.startDate);\n    }\n    if (!this.dayTemplate) {\n      this.dayTemplate = this._defaultDayTemplate;\n    }\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    const inputs: DatepickerServiceInputs = {};\n    ['dayTemplateData', 'displayMonths', 'markDisabled', 'firstDayOfWeek', 'navigation', 'minDate', 'maxDate',\n     'outsideDays']\n        .filter(name => name in changes)\n        .forEach(name => inputs[name] = this[name]);\n    this._service.set(inputs);\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  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(disabled: boolean) { this._service.set({disabled}); }\n\n  writeValue(value) {\n    this._controlValue = NgbDate.from(this._ngbDateAdapter.fromModel(value));\n    this._service.select(this._controlValue);\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 {NgbDatepicker} from './datepicker';\nimport {Key} from '../util/key';\n\n/**\n * A service that represents the keyboard navigation.\n *\n * Default keyboard shortcuts [are documented in the overview](#/components/datepicker/overview#keyboard-shortcuts)\n *\n * @since 5.2.0\n */\n@Injectable({providedIn: 'root'})\nexport class NgbDatepickerKeyboardService {\n  /**\n   * Processes a keyboard event.\n   */\n  processKey(event: KeyboardEvent, datepicker: NgbDatepicker) {\n    const {state, calendar} = datepicker;\n    // tslint:disable-next-line:deprecation\n    switch (event.which) {\n      case Key.PageUp:\n        datepicker.focusDate(calendar.getPrev(state.focusedDate, event.shiftKey ? 'y' : 'm', 1));\n        break;\n      case Key.PageDown:\n        datepicker.focusDate(calendar.getNext(state.focusedDate, event.shiftKey ? 'y' : 'm', 1));\n        break;\n      case Key.End:\n        datepicker.focusDate(event.shiftKey ? state.maxDate : state.lastDate);\n        break;\n      case Key.Home:\n        datepicker.focusDate(event.shiftKey ? state.minDate : state.firstDate);\n        break;\n      case Key.ArrowLeft:\n        datepicker.focusDate(calendar.getPrev(state.focusedDate, 'd', 1));\n        break;\n      case Key.ArrowUp:\n        datepicker.focusDate(calendar.getPrev(state.focusedDate, 'd', calendar.getDaysPerWeek()));\n        break;\n      case Key.ArrowRight:\n        datepicker.focusDate(calendar.getNext(state.focusedDate, 'd', 1));\n        break;\n      case Key.ArrowDown:\n        datepicker.focusDate(calendar.getNext(state.focusedDate, 'd', calendar.getDaysPerWeek()));\n        break;\n      case Key.Enter:\n      case Key.Space:\n        datepicker.focusSelect();\n        break;\n      default:\n        return;\n    }\n    event.preventDefault();\n    event.stopPropagation();\n  }\n}\n","import {Component, Input, ViewEncapsulation} from '@angular/core';\nimport {NgbDatepicker} from './datepicker';\nimport {NgbDatepickerI18n} from './datepicker-i18n';\nimport {NgbDatepickerKeyboardService} from './datepicker-keyboard-service';\nimport {NgbDatepickerService} from './datepicker-service';\nimport {MonthViewModel, DayViewModel} from './datepicker-view-model';\nimport {NgbDateStruct} from './ngb-date-struct';\n\n/**\n * A component that renders one month including all the days, weekdays and week numbers. Can be used inside\n * the `<ng-template ngbDatepickerMonths></ng-template>` when you want to customize months layout.\n *\n * For a usage example, see [custom month layout demo](#/components/datepicker/examples#custommonth)\n *\n * @since 5.3.0\n */\n@Component({\n  selector: 'ngb-datepicker-month',\n  host: {'role': 'grid', '(keydown)': 'onKeyDown($event)'},\n  encapsulation: ViewEncapsulation.None,\n  styleUrls: ['./datepicker-month.scss'],\n  template: `\n    <div *ngIf=\"datepicker.showWeekdays\" class=\"ngb-dp-week ngb-dp-weekdays\" role=\"row\">\n      <div *ngIf=\"datepicker.showWeekNumbers\" class=\"ngb-dp-weekday ngb-dp-showweek\"></div>\n      <div *ngFor=\"let w of viewModel.weekdays\" class=\"ngb-dp-weekday small\" role=\"columnheader\">\n        {{ i18n.getWeekdayShortName(w) }}\n      </div>\n    </div>\n    <ng-template ngFor let-week [ngForOf]=\"viewModel.weeks\">\n      <div *ngIf=\"!week.collapsed\" class=\"ngb-dp-week\" role=\"row\">\n        <div *ngIf=\"datepicker.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); $event.preventDefault()\" 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]=\"datepicker.dayTemplate\" [ngTemplateOutletContext]=\"day.context\"></ng-template>\n          </ng-template>\n        </div>\n      </div>\n    </ng-template>\n  `\n})\nexport class NgbDatepickerMonth {\n  /**\n   * The first date of month to be rendered.\n   *\n   * This month must one of the months present in the\n   * [datepicker state](#/components/datepicker/api#NgbDatepickerState).\n   */\n  @Input()\n  set month(month: NgbDateStruct) {\n    this.viewModel = this._service.getMonth(month);\n  }\n\n  viewModel: MonthViewModel;\n\n  constructor(\n      public i18n: NgbDatepickerI18n, public datepicker: NgbDatepicker,\n      private _keyboardService: NgbDatepickerKeyboardService, private _service: NgbDatepickerService) {}\n\n  onKeyDown(event: KeyboardEvent) { this._keyboardService.processKey(event, this.datepicker); }\n\n  doSelect(day: DayViewModel) {\n    if (!day.context.disabled && !day.hidden) {\n      this.datepicker.onDateSelect(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)=\"onClickPrev($event)\" [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)=\"onClickNext($event)\" [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  onClickPrev(event: MouseEvent) {\n    (event.currentTarget as HTMLElement).focus();\n    this.navigate.emit(this.navigation.PREV);\n  }\n\n  onClickNext(event: MouseEvent) {\n    (event.currentTarget as HTMLElement).focus();\n    this.navigate.emit(this.navigation.NEXT);\n  }\n}\n","import {NgZone} from '@angular/core';\nimport {fromEvent, Observable, race} from 'rxjs';\nimport {delay, filter, map, takeUntil, tap, 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 have to add a more significant delay 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\nconst isMobile = (() => {\n  const isIOS = () => /iPad|iPhone|iPod/.test(navigator.userAgent) ||\n      (/Macintosh/.test(navigator.userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2);\n  const isAndroid = () => /Android/.test(navigator.userAgent);\n\n  return typeof navigator !== 'undefined' ? !!navigator.userAgent && (isIOS() || isAndroid()) : false;\n})();\n\n// setting 'ngbAutoClose' synchronously on mobile results in immediate popup closing\n// when tapping on the triggering element\nconst wrapAsyncForMobile = fn => isMobile ? () => setTimeout(() => fn(), 100) : fn;\n\nexport const enum SOURCE {ESCAPE, CLICK}\n\nexport function ngbAutoClose(\n    zone: NgZone, document: any, type: boolean | 'inside' | 'outside', close: (source: SOURCE) => void,\n    closed$: Observable<any>, insideElements: HTMLElement[], ignoreElements?: HTMLElement[], insideSelector?: string) {\n  // closing on ESC and outside clicks\n  if (type) {\n    zone.runOutsideAngular(wrapAsyncForMobile(() => {\n\n      const shouldCloseOnClick = (event: MouseEvent) => {\n        const element = event.target as HTMLElement;\n        if (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), tap(e => e.preventDefault()));\n\n\n      // we have to pre-calculate 'shouldCloseOnClick' on 'mousedown',\n      // because on 'mouseup' DOM nodes might be detached\n      const mouseDowns$ =\n          fromEvent<MouseEvent>(document, 'mousedown').pipe(map(shouldCloseOnClick), takeUntil(closed$));\n\n      const closeableClicks$ = fromEvent<MouseEvent>(document, 'mouseup')\n                                   .pipe(\n                                       withLatestFrom(mouseDowns$), filter(([_, shouldClose]) => shouldClose), delay(0),\n                                       takeUntil(closed$)) as Observable<MouseEvent>;\n\n\n      race<SOURCE>([\n        escapes$.pipe(map(_ => SOURCE.ESCAPE)), closeableClicks$.pipe(map(_ => SOURCE.CLICK))\n      ]).subscribe((source: SOURCE) => zone.run(() => close(source)));\n    }));\n  }\n}\n","import {NgZone} from '@angular/core';\n\nimport {fromEvent, Observable} from 'rxjs';\nimport {filter, map, takeUntil, withLatestFrom} from 'rxjs/operators';\n\nimport {Key} from './key';\n\n\nexport const 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 zone Angular zone\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 =\n    (zone: NgZone, element: HTMLElement, stopFocusTrap$: Observable<any>, refocusOnClick = false) => {\n      zone.runOutsideAngular(() => {\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    };\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+/;\nexport const 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    null {\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: string[] = [];\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 | null = null;\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 | null;\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 | null): string;\n}\n\n@Injectable()\nexport class NgbDateISOParserFormatter extends NgbDateParserFormatter {\n  parse(value: string): NgbDateStruct | null {\n    if (value != null) {\n      const dateParts = value.trim().split('-');\n      if (dateParts.length === 1 && isNumber(dateParts[0])) {\n        return {year: toInteger(dateParts[0]), month: <any>null, day: <any>null};\n      } else if (dateParts.length === 2 && isNumber(dateParts[0]) && isNumber(dateParts[1])) {\n        return {year: toInteger(dateParts[0]), month: toInteger(dateParts[1]), day: <any>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 | null): string {\n    return date ?\n        `${date.year}-${isNumber(date.month) ? padNumber(date.month) : ''}-${isNumber(date.day) ? padNumber(date.day) : ''}` :\n        '';\n  }\n}\n","import {Injectable} from '@angular/core';\n\nimport {NgbDatepickerConfig} from './datepicker-config';\nimport {PlacementArray} from '../util/positioning';\n\n/**\n * A configuration service for the [`NgbDatepickerInput`](#/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 datepicker inputs used in the application.\n *\n * @since 5.2.0\n */\n@Injectable({providedIn: 'root'})\nexport class NgbInputDatepickerConfig extends NgbDatepickerConfig {\n  autoClose: boolean | 'inside' | 'outside' = true;\n  container: null | 'body';\n  positionTarget: string | HTMLElement;\n  placement: PlacementArray = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];\n  restoreFocus: true | HTMLElement | string = true;\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 {\n  AbstractControl,\n  ControlValueAccessor,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  ValidationErrors,\n  Validator\n} 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 {NgbCalendar} from './ngb-calendar';\nimport {NgbDate} from './ngb-date';\nimport {NgbDateParserFormatter} from './ngb-date-parser-formatter';\nimport {NgbDateStruct} from './ngb-date-struct';\nimport {NgbInputDatepickerConfig} from './datepicker-input-config';\nimport {NgbDatepickerConfig} from './datepicker-config';\nimport {isString} from '../util/util';\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    '(focus)': 'onFocus()',\n    '(blur)': 'onBlur()',\n    '[disabled]': 'disabled'\n  },\n  providers: [\n    NGB_DATEPICKER_VALUE_ACCESSOR, NGB_DATEPICKER_VALIDATOR,\n    {provide: NgbDatepickerConfig, useExisting: NgbInputDatepickerConfig}\n  ],\n})\nexport class NgbInputDatepicker implements OnChanges,\n    OnDestroy, ControlValueAccessor, Validator {\n  static ngAcceptInputType_autoClose: boolean | string;\n  static ngAcceptInputType_disabled: boolean | '';\n  static ngAcceptInputType_navigation: string;\n  static ngAcceptInputType_outsideDays: string;\n\n  private _cRef: ComponentRef<NgbDatepicker>| null = null;\n  private _disabled = false;\n  private _elWithFocus: HTMLElement | null = null;\n  private _model: NgbDate | null = null;\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';\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;\n\n  /**\n   * If `true`, when closing datepicker will focus element that was focused before datepicker was opened.\n   *\n   * Alternatively you could provide a selector or an `HTMLElement` to focus. If the element doesn't exist or invalid,\n   * we'll fallback to focus document body.\n   *\n   * @since 5.2.0\n   */\n  @Input() restoreFocus: true | string | HTMLElement;\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 _calendar: NgbCalendar, private _dateAdapter: NgbDateAdapter<any>,\n      @Inject(DOCUMENT) private _document: any, private _changeDetector: ChangeDetectorRef,\n      config: NgbInputDatepickerConfig) {\n    ['autoClose', 'container', 'positionTarget', 'placement'].forEach(input => this[input] = config[input]);\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): ValidationErrors | null {\n    const {value} = c;\n\n    if (value != null) {\n      const ngbDate = this._fromDateStruct(this._dateAdapter.fromModel(value));\n\n      if (!ngbDate) {\n        return {'ngbDate': {invalid: value}};\n      }\n\n      if (this.minDate && ngbDate.before(NgbDate.from(this.minDate))) {\n        return {'ngbDate': {minDate: {minDate: this.minDate, actual: value}}};\n      }\n\n      if (this.maxDate && ngbDate.after(NgbDate.from(this.maxDate))) {\n        return {'ngbDate': {maxDate: {maxDate: this.maxDate, actual: value}}};\n      }\n    }\n\n    return null;\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        this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement);\n      }\n\n      // focus handling\n      this._elWithFocus = this._document.activeElement;\n      ngbFocusTrap(this._ngZone, 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      // restore focus\n      let elementToFocus: HTMLElement | null = this._elWithFocus;\n      if (isString(this.restoreFocus)) {\n        elementToFocus = this._document.querySelector(this.restoreFocus);\n      } else if (this.restoreFocus !== undefined) {\n        elementToFocus = this.restoreFocus as HTMLElement;\n      }\n\n      // in IE document.activeElement can contain an object without 'focus()' sometimes\n      if (elementToFocus && elementToFocus['focus']) {\n        elementToFocus.focus();\n      } else {\n        this._document.body.focus();\n      }\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  onFocus() { this._elWithFocus = this._elRef.nativeElement; }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes['minDate'] || changes['maxDate']) {\n      this._validatorChange();\n\n      if (this.isOpen()) {\n        if (changes['minDate']) {\n          this._cRef !.instance.minDate = this.minDate;\n        }\n        if (changes['maxDate']) {\n          this._cRef !.instance.maxDate = this.maxDate;\n        }\n        this._cRef !.instance.ngOnChanges(changes);\n      }\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.dateSelect.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 | null) {\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 | null): NgbDate | null {\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 (isString(this.positionTarget)) {\n      hostElement = this._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 {\n  Component,\n  Input,\n  Output,\n  EventEmitter,\n  ChangeDetectionStrategy,\n  ViewEncapsulation,\n  AfterViewChecked,\n  ViewChild,\n  ElementRef,\n  Renderer2\n} 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 #month\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\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($any($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 #year\n      [disabled]=\"disabled\"\n      class=\"custom-select\"\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($any($event).target.value)\">\n        <option *ngFor=\"let y of years\" [value]=\"y\">{{ i18n.getYearNumerals(y) }}</option>\n    </select>\n  `\n})\nexport class NgbDatepickerNavigationSelect implements AfterViewChecked {\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  @ViewChild('month', {static: true, read: ElementRef}) monthSelect: ElementRef;\n  @ViewChild('year', {static: true, read: ElementRef}) yearSelect: ElementRef;\n\n  private _month = -1;\n  private _year = -1;\n\n  constructor(public i18n: NgbDatepickerI18n, private _renderer: Renderer2) {}\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  ngAfterViewChecked() {\n    if (this.date) {\n      if (this.date.month !== this._month) {\n        this._month = this.date.month;\n        this._renderer.setProperty(this.monthSelect.nativeElement, 'value', this._month);\n      }\n      if (this.date.year !== this._year) {\n        this._year = this.date.year;\n        this._renderer.setProperty(this.yearSelect.nativeElement, 'value', this._year);\n      }\n    }\n  }\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: readonly 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 | null): boolean {\n    return date != null && 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  // Ignores the time part in date1 and date2:\n  const time1 = Date.UTC(date1.getFullYear(), date1.getMonth(), date1.getDate());\n  const time2 = Date.UTC(date2.getFullYear(), date2.getMonth(), date2.getDate());\n  const diff = Math.abs(time1 - time2);\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      return null as any;\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: readonly 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 | null): boolean {\n    return date != null && 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  if (year != null) {\n    let b = (year * 12 + 17) % 19;\n    return b >= ((b < 0) ? -7 : 12);\n  }\n  return false;\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: string[] = [];\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 | null): boolean {\n    if (date != null) {\n      let b = 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    return false;\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: readonly 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 | null): NgbDateStruct | null {\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 | null): Date | null {\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} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule} from '@angular/forms';\nimport {NgbDatepicker, NgbDatepickerContent} from './datepicker';\nimport {NgbDatepickerMonth} from './datepicker-month';\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, NgbDatepickerContent, NgbDatepickerNavigateEvent, NgbDatepickerState} 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 {NgbDatepickerMonth} from './datepicker-month';\nexport {NgbDatepickerDayView} from './datepicker-day-view';\nexport {NgbDatepickerNavigation} from './datepicker-navigation';\nexport {NgbDatepickerNavigationSelect} from './datepicker-navigation-select';\nexport {NgbDatepickerConfig} from './datepicker-config';\nexport {NgbInputDatepickerConfig} from './datepicker-input-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';\nexport {NgbDatepickerKeyboardService} from './datepicker-keyboard-service';\n\n@NgModule({\n  declarations: [\n    NgbDatepicker, NgbDatepickerContent, NgbDatepickerMonth, NgbDatepickerNavigation, NgbDatepickerNavigationSelect,\n    NgbDatepickerDayView, NgbInputDatepicker\n  ],\n  exports: [NgbDatepicker, NgbDatepickerContent, NgbInputDatepicker, NgbDatepickerMonth],\n  imports: [CommonModule, FormsModule],\n  entryComponents: [NgbDatepicker]\n})\nexport class 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  AfterContentInit,\n  OnDestroy,\n  Output,\n  QueryList,\n  Renderer2,\n  SimpleChanges,\n  Optional\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {fromEvent, Subject, Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\nimport {Placement, PlacementArray, positionElements} from '../util/positioning';\nimport {ngbAutoClose, SOURCE} from '../util/autoclose';\nimport {Key} from '../util/key';\n\nimport {NgbDropdownConfig} from './dropdown-config';\nimport {FOCUSABLE_ELEMENTS_SELECTOR} from '../util/focus-trap';\n\n@Directive({selector: '.navbar'})\nexport class NgbNavbar {\n}\n\n/**\n * A directive you should 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  static ngAcceptInputType_disabled: boolean | '';\n\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    '(keydown.Tab)': 'dropdown.onKeyDown($event)',\n    '(keydown.Shift.Tab)': 'dropdown.onKeyDown($event)'\n  }\n})\nexport class NgbDropdownMenu {\n  nativeElement: HTMLElement;\n  placement: Placement | null = 'bottom';\n  isOpen = false;\n\n  @ContentChildren(NgbDropdownItem) menuItems: QueryList<NgbDropdownItem>;\n\n  constructor(@Inject(forwardRef(() => NgbDropdown)) public dropdown, _elementRef: ElementRef<HTMLElement>) {\n    this.nativeElement = _elementRef.nativeElement;\n  }\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]', host: {'class': 'dropdown-toggle', '[attr.aria-expanded]': 'dropdown.isOpen()'}})\nexport class NgbDropdownAnchor {\n  nativeElement: HTMLElement;\n  constructor(@Inject(forwardRef(() => NgbDropdown)) public dropdown, _elementRef: ElementRef<HTMLElement>) {\n    this.nativeElement = _elementRef.nativeElement;\n  }\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    '[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    '(keydown.Tab)': 'dropdown.onKeyDown($event)',\n    '(keydown.Shift.Tab)': 'dropdown.onKeyDown($event)'\n  },\n  providers: [{provide: NgbDropdownAnchor, useExisting: forwardRef(() => NgbDropdownToggle)}]\n})\nexport class NgbDropdownToggle extends NgbDropdownAnchor {\n  constructor(@Inject(forwardRef(() => NgbDropdown)) dropdown, 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 AfterContentInit, OnDestroy {\n  static ngAcceptInputType_autoClose: boolean | string;\n  static ngAcceptInputType_display: string;\n  private _closed$ = new Subject<void>();\n  private _zoneSubscription: Subscription;\n  private _bodyContainer: HTMLElement | null = null;\n\n  @ContentChild(NgbDropdownMenu, {static: false}) private _menu: NgbDropdownMenu;\n  @ContentChild(NgbDropdownAnchor, {static: false}) 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. The default value is dynamic unless the dropdown is used\n   * inside a Bootstrap navbar. If you need custom placement for a dropdown in a navbar, set it to\n   * dynamic explicitly. See the [positioning of dropdown](#/positioning#dropdown)\n   * and the [navbar demo](/#/components/dropdown/examples#navbar) for more details.\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  ngAfterContentInit() {\n    this._ngZone.onStable.pipe(take(1)).subscribe(() => {\n      this._applyPlacementClasses();\n      if (this._open) {\n        this._setCloseHandlers();\n      }\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      if (this._anchor) {\n        this._anchor.nativeElement.focus();\n      }\n    }\n  }\n\n  private _setCloseHandlers() {\n    ngbAutoClose(\n        this._ngZone, this._document, this.autoClose,\n        (source: SOURCE) => {\n          this.close();\n          if (source === SOURCE.ESCAPE) {\n            this._anchor.nativeElement.focus();\n          }\n        },\n        this._closed$, this._menu ? [this._menu.nativeElement] : [], this._anchor ? [this._anchor.nativeElement] : [],\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 itemElement: HTMLElement | null = null;\n    const isEventFromToggle = this._isEventFromToggle(event);\n\n    if (!isEventFromToggle && itemElements.length) {\n      itemElements.forEach((item, index) => {\n        if (item.contains(event.target as HTMLElement)) {\n          itemElement = item;\n        }\n        if (item === 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 (itemElement && (this.autoClose === true || this.autoClose === 'inside')) {\n        // Item is either a button or a link, so click will be triggered by the browser on Enter or Space.\n        // So we have to register a one-time click handler that will fire after any user defined click handlers\n        // to close the dropdown\n        fromEvent(itemElement, 'click').pipe(take(1)).subscribe(() => this.close());\n      }\n      return;\n    }\n\n    if (key === Key.Tab) {\n      if (event.target && this.isOpen() && this.autoClose) {\n        if (this._anchor.nativeElement === event.target) {\n          if (this.container === 'body' && !event.shiftKey) {\n            /* This case is special: user is using [Tab] from the anchor/toggle.\n               User expects the next focusable element in the dropdown menu to get focus.\n               But the menu is not a sibling to anchor/toggle, it is at the end of the body.\n               Trick is to synchronously focus the menu element, and let the [keydown.Tab] go\n               so that browser will focus the proper element (first one focusable in the menu) */\n            this._renderer.setAttribute(this._menu.nativeElement, 'tabindex', '0');\n            this._menu.nativeElement.focus();\n            this._renderer.removeAttribute(this._menu.nativeElement, 'tabindex');\n          } else if (event.shiftKey) {\n            this.close();\n          }\n          return;\n        } else if (this.container === 'body') {\n          const focusableElements = this._menu.nativeElement.querySelectorAll(FOCUSABLE_ELEMENTS_SELECTOR);\n          if (event.shiftKey && event.target === focusableElements[0]) {\n            this._anchor.nativeElement.focus();\n            event.preventDefault();\n          } else if (!event.shiftKey && event.target === focusableElements[focusableElements.length - 1]) {\n            this._anchor.nativeElement.focus();\n            this.close();\n          }\n        } else {\n          fromEvent<FocusEvent>(event.target as HTMLElement, 'focusout').pipe(take(1)).subscribe(({relatedTarget}) => {\n            if (!this._elementRef.nativeElement.contains(relatedTarget as HTMLElement)) {\n              this.close();\n            }\n          });\n        }\n      }\n      return;\n    }\n\n    // opening / navigating\n    if (isEventFromToggle || itemElement) {\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.nativeElement.contains(event.target as HTMLElement);\n  }\n\n  private _getMenuElements(): HTMLElement[] {\n    const menu = this._menu;\n    if (menu == null) {\n      return [];\n    }\n    return menu.menuItems.filter(item => !item.disabled).map(item => item.elementRef.nativeElement);\n  }\n\n  private _positionMenu() {\n    const menu = this._menu;\n    if (this.isOpen() && menu) {\n      this._applyPlacementClasses(\n          this.display === 'dynamic' ? positionElements(\n                                           this._anchor.nativeElement, this._bodyContainer || this._menu.nativeElement,\n                                           this.placement, 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._menu) {\n      const dropdownElement = this._elementRef.nativeElement;\n      const dropdownMenuElement = this._menu.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._menu.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 | null) {\n    const menu = this._menu;\n    if (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      menu.placement = this.display === 'static' ? null : 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} from '@angular/core';\nimport {\n  NgbDropdown,\n  NgbDropdownAnchor,\n  NgbDropdownToggle,\n  NgbDropdownMenu,\n  NgbDropdownItem,\n  NgbNavbar\n} from './dropdown';\n\nexport {\n  NgbDropdown,\n  NgbDropdownAnchor,\n  NgbDropdownToggle,\n  NgbDropdownMenu,\n  NgbDropdownItem,\n  NgbNavbar\n} 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","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   * `aria-describedby` attribute value to set on the modal window.\n   *\n   * @since 6.1.0\n   */\n  ariaDescribedBy?: string;\n\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   * Since v5.3.0 it is also possible to pass the reference to an `HTMLElement`.\n   *\n   * If not specified, will be `body`.\n   */\n  container?: string | HTMLElement;\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   * Scrollable modal content (false by default).\n   *\n   * @since 5.0.0\n   */\n  scrollable?: boolean;\n\n  /**\n   * Size of a new modal window.\n   */\n  size?: 'sm' | 'lg' | 'xl' | string;\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 Required<NgbModalOptions> {\n  ariaLabelledBy: string;\n  ariaDescribedBy: string;\n  backdrop: boolean | 'static' = true;\n  beforeDismiss: () => boolean | Promise<boolean>;\n  centered: boolean;\n  container: string;\n  injector: Injector;\n  keyboard = true;\n  scrollable: boolean;\n  size: 'sm' | 'lg' | 'xl' | string;\n  windowClass: string;\n  backdropClass: string;\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>| null = null;\n  private _contentRef: ContentRef | null = null;\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), this._viewContainerRef.length,\n          this._injector, 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   * To be called right before a potential vertical scrollbar would be removed:\n   *\n   * - if there was a scrollbar, adds some compensation padding to the body\n   * to keep the same layout as when the scrollbar is there\n   * - if there was none, there is nothing to do\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 {\n    const width = this._getWidth();\n    return !this._isPresent(width) ? noop : this._adjustBody(width);\n  }\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(scrollbarWidth: number): CompensationReverter {\n    const body = this._document.body;\n    const userSetPaddingStyle = body.style.paddingRight;\n    const actualPadding = parseFloat(window.getComputedStyle(body)['padding-right']);\n    body.style['padding-right'] = `${actualPadding + scrollbarWidth}px`;\n    return () => body.style['padding-right'] = userSetPaddingStyle;\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(scrollbarWidth: number): boolean {\n    const rect = this._document.body.getBoundingClientRect();\n    const bodyToViewportGap = window.innerWidth - (rect.left + rect.right);\n    const uncertainty = 0.1 * scrollbarWidth;\n    return bodyToViewportGap >= scrollbarWidth - uncertainty;\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, ViewEncapsulation} from '@angular/core';\n\n@Component({\n  selector: 'ngb-modal-backdrop',\n  encapsulation: ViewEncapsulation.None,\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 or when the modal is closed, will return `undefined`.\n   */\n  get componentInstance(): any {\n    if (this._contentRef && 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 = <any>null;\n    this._backdropCmptRef = <any>null;\n    this._contentRef = <any>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  NgZone,\n  OnDestroy,\n  OnInit,\n  Output,\n  ViewChild,\n  ViewEncapsulation\n} from '@angular/core';\nimport {fromEvent, Subject} from 'rxjs';\nimport {filter, switchMap, take, takeUntil, tap} from 'rxjs/operators';\n\nimport {getFocusableBoundaryElements} from '../util/focus-trap';\nimport {Key} from '../util/key';\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    '[attr.aria-modal]': 'true',\n    '[attr.aria-labelledby]': 'ariaLabelledBy',\n    '[attr.aria-describedby]': 'ariaDescribedBy',\n  },\n  template: `\n    <div #dialog [class]=\"'modal-dialog' + (size ? ' modal-' + size : '') + (centered ? ' modal-dialog-centered' : '') +\n     (scrollable ? ' modal-dialog-scrollable' : '')\" role=\"document\">\n        <div class=\"modal-content\"><ng-content></ng-content></div>\n    </div>\n    `,\n  encapsulation: ViewEncapsulation.None,\n  styleUrls: ['./modal.scss']\n})\nexport class NgbModalWindow implements OnInit,\n    AfterViewInit, OnDestroy {\n  private _closed$ = new Subject<void>();\n  private _elWithFocus: Element | null = null;  // element that is focused prior to modal opening\n\n  @ViewChild('dialog', {static: true}) private _dialogEl: ElementRef<HTMLElement>;\n\n  @Input() ariaLabelledBy: string;\n  @Input() ariaDescribedBy: string;\n  @Input() backdrop: boolean | string = true;\n  @Input() centered: string;\n  @Input() keyboard = true;\n  @Input() scrollable: string;\n  @Input() size: string;\n  @Input() windowClass: string;\n\n  @Output('dismiss') dismissEvent = new EventEmitter();\n\n  constructor(\n      @Inject(DOCUMENT) private _document: any, private _elRef: ElementRef<HTMLElement>, private _zone: NgZone) {}\n\n  dismiss(reason): void { this.dismissEvent.emit(reason); }\n\n  ngOnInit() { this._elWithFocus = this._document.activeElement; }\n\n  ngAfterViewInit() {\n    const {nativeElement} = this._elRef;\n    this._zone.runOutsideAngular(() => {\n\n      fromEvent<KeyboardEvent>(nativeElement, 'keydown')\n          .pipe(\n              takeUntil(this._closed$),\n              // tslint:disable-next-line:deprecation\n              filter(e => e.which === Key.Escape && this.keyboard))\n          .subscribe(event => requestAnimationFrame(() => {\n                       if (!event.defaultPrevented) {\n                         this._zone.run(() => this.dismiss(ModalDismissReasons.ESC));\n                       }\n                     }));\n\n      // We're listening to 'mousedown' and 'mouseup' to prevent modal from closing when pressing the mouse\n      // inside the modal dialog and releasing it outside\n      let preventClose = false;\n      fromEvent<MouseEvent>(this._dialogEl.nativeElement, 'mousedown')\n          .pipe(\n              takeUntil(this._closed$), tap(() => preventClose = false),\n              switchMap(() => fromEvent<MouseEvent>(nativeElement, 'mouseup').pipe(takeUntil(this._closed$), take(1))),\n              filter(({target}) => nativeElement === target))\n          .subscribe(() => { preventClose = true; });\n\n      // We're listening to 'click' to dismiss modal on modal window click, except when:\n      // 1. clicking on modal dialog itself\n      // 2. closing was prevented by mousedown/up handlers\n      // 3. clicking on scrollbar when the viewport is too small and modal doesn't fit (click is not triggered at all)\n      fromEvent<MouseEvent>(nativeElement, 'click').pipe(takeUntil(this._closed$)).subscribe(({target}) => {\n        if (this.backdrop === true && nativeElement === target && !preventClose) {\n          this._zone.run(() => this.dismiss(ModalDismissReasons.BACKDROP_CLICK));\n        }\n        preventClose = false;\n      });\n    });\n\n    if (!nativeElement.contains(document.activeElement)) {\n      const autoFocusable = nativeElement.querySelector(`[ngbAutofocus]`) as HTMLElement;\n      const firstFocusable = getFocusableBoundaryElements(nativeElement)[0];\n\n      const elementToFocus = autoFocusable || firstFocusable || 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    this._zone.runOutsideAngular(() => {\n      setTimeout(() => elementToFocus.focus());\n      this._elWithFocus = null;\n    });\n\n    this._closed$.next();\n  }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n  ApplicationRef,\n  ComponentFactoryResolver,\n  ComponentRef,\n  EventEmitter,\n  Inject,\n  Injectable,\n  Injector,\n  NgZone,\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 {NgbModalOptions} from './modal-config';\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 | null> = new Map();\n  private _backdropAttributes = ['backdropClass'];\n  private _modalRefs: NgbModalRef[] = [];\n  private _windowAttributes =\n      ['ariaLabelledBy', 'ariaDescribedBy', 'backdrop', 'centered', 'keyboard', 'scrollable', 'size', 'windowClass'];\n  private _windowCmpts: ComponentRef<NgbModalWindow>[] = [];\n  private _activeInstances: EventEmitter<NgbModalRef[]> = new EventEmitter();\n\n  constructor(\n      private _applicationRef: ApplicationRef, private _injector: Injector, @Inject(DOCUMENT) private _document: any,\n      private _scrollBar: ScrollBar, private _rendererFactory: RendererFactory2, private _ngZone: NgZone) {\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(this._ngZone, 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 = options.container instanceof HTMLElement ? options.container : isDefined(options.container) ?\n                                                                   this._document.querySelector(options.container) :\n                                                                   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 =\n        this._getContentRef(moduleCFR, options.injector || contentInjector, content, activeModal, options);\n\n    let backdropCmptRef: ComponentRef<NgbModalBackdrop>| undefined =\n        options.backdrop !== false ? this._attachBackdrop(moduleCFR, containerEl) : undefined;\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  get activeInstances() { return this._activeInstances; }\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, activeModal: NgbActiveModal,\n      options: NgbModalOptions): 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, options);\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, context: NgbActiveModal,\n      options: NgbModalOptions): 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    const componentNativeEl = componentRef.location.nativeElement;\n    if (options.scrollable) {\n      (componentNativeEl as HTMLElement).classList.add('component-host-scrollable');\n    }\n    this._applicationRef.attachView(componentRef.hostView);\n    // FIXME: we should here get rid of the component nativeElement\n    // and use `[Array.from(componentNativeEl.childNodes)]` instead and remove the above CSS class.\n    return new ContentRef([[componentNativeEl]], 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        this._activeInstances.emit(this._modalRefs);\n      }\n    };\n    this._modalRefs.push(ngbModalRef);\n    this._activeInstances.emit(this._modalRefs);\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   * Returns an observable that holds the active modal instances.\n   */\n  get activeInstances() { return this._modalStack.activeInstances; }\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 {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","import {Injectable} from '@angular/core';\n\n/**\n * A configuration service for the [`NgbNav`](#/components/nav/api#NgbNav) 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 navs used in the application.\n *\n * @since 5.2.0\n */\n@Injectable({providedIn: 'root'})\nexport class NgbNavConfig {\n  destroyOnHide = true;\n  orientation: 'horizontal' | 'vertical' = 'horizontal';\n  roles: 'tablist' | false = 'tablist';\n  keyboard: boolean | 'changeWithArrows' = false;\n}\n","import {\n  AfterContentChecked,\n  AfterContentInit,\n  Attribute,\n  ChangeDetectorRef,\n  ContentChildren,\n  Directive,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Inject,\n  Input,\n  OnInit,\n  Output,\n  QueryList,\n  TemplateRef\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {isDefined} from '../util/util';\nimport {NgbNavConfig} from './nav-config';\nimport {Key} from '../util/key';\n\nconst isValidNavId = (id: any) => isDefined(id) && id !== '';\n\nlet navCounter = 0;\n\n/**\n * Context passed to the nav content template.\n *\n * See [this demo](#/components/nav/examples#keep-content) as the example.\n *\n * @since 5.2.0\n */\nexport interface NgbNavContentContext {\n  /**\n   * If `true`, current nav content is visible and active\n   */\n  $implicit: boolean;\n}\n\n\n/**\n * This directive must be used to wrap content to be displayed in the nav.\n *\n * @since 5.2.0\n */\n@Directive({selector: 'ng-template[ngbNavContent]'})\nexport class NgbNavContent {\n  constructor(public templateRef: TemplateRef<any>) {}\n}\n\n\n/**\n * The directive used to group nav link and related nav content. As well as set nav identifier and some options.\n *\n * @since 5.2.0\n */\n@Directive({selector: '[ngbNavItem]', exportAs: 'ngbNavItem', host: {'[class.nav-item]': 'true'}})\nexport class NgbNavItem implements AfterContentChecked, OnInit {\n  private _nav: NgbNav;\n\n  /**\n   * If `true`, non-active current nav item content will be removed from DOM\n   * Otherwise it will just be hidden\n   */\n  @Input() destroyOnHide;\n\n  /**\n   * If `true`, the current nav item is disabled and can't be toggled by user.\n   *\n   * Nevertheless disabled nav can be selected programmatically via the `.select()` method and the `[activeId]` binding.\n   */\n  @Input() disabled = false;\n\n  /**\n   * The id used for the DOM elements.\n   * Must be unique inside the document in case you have multiple `ngbNav`s on the page.\n   *\n   * Autogenerated as `ngb-nav-XXX` if not provided.\n   */\n  @Input() domId: string;\n\n  /**\n   * The id used as a model for active nav.\n   * It can be anything, but must be unique inside one `ngbNav`.\n   *\n   * The only limitation is that it is not possible to have the `''` (empty string) as id,\n   * because ` ngbNavItem `, `ngbNavItem=''` and `[ngbNavItem]=\"''\"` are indistinguishable\n   */\n  @Input('ngbNavItem') _id: any;\n\n  contentTpl: NgbNavContent | null;\n\n  @ContentChildren(NgbNavContent, {descendants: false}) contentTpls: QueryList<NgbNavContent>;\n\n  constructor(@Inject(forwardRef(() => NgbNav)) nav, public elementRef: ElementRef<any>) {\n    // TODO: cf https://github.com/angular/angular/issues/30106\n    this._nav = nav;\n  }\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.contentTpl = this.contentTpls.first;\n  }\n\n  ngOnInit() {\n    if (!isDefined(this.domId)) {\n      this.domId = `ngb-nav-${navCounter++}`;\n    }\n  }\n\n  get active() { return this._nav.activeId === this.id; }\n\n  get id() { return isValidNavId(this._id) ? this._id : this.domId; }\n\n  get panelDomId() { return `${this.domId}-panel`; }\n\n  isPanelInDom() {\n    return (isDefined(this.destroyOnHide) ? !this.destroyOnHide : !this._nav.destroyOnHide) || this.active;\n  }\n}\n\n\n/**\n * A nav directive that helps with implementing tabbed navigation components.\n *\n * @since 5.2.0\n */\n@Directive({\n  selector: '[ngbNav]',\n  exportAs: 'ngbNav',\n  host: {\n    '[class.nav]': 'true',\n    '[class.flex-column]': `orientation === 'vertical'`,\n    '[attr.aria-orientation]': `orientation === 'vertical' && roles === 'tablist' ? 'vertical' : undefined`,\n    '[attr.role]': `role ? role : roles ? 'tablist' : undefined`,\n    '(keydown.arrowLeft)': 'onKeyDown($event)',\n    '(keydown.arrowRight)': 'onKeyDown($event)',\n    '(keydown.arrowDown)': 'onKeyDown($event)',\n    '(keydown.arrowUp)': 'onKeyDown($event)',\n    '(keydown.Home)': 'onKeyDown($event)',\n    '(keydown.End)': 'onKeyDown($event)'\n  }\n})\nexport class NgbNav implements AfterContentInit {\n  static ngAcceptInputType_orientation: string;\n  static ngAcceptInputType_roles: boolean | string;\n\n  /**\n   * The id of the nav that should be active\n   *\n   * You could also use the `.select()` method and the `(navChange)` event\n   */\n  @Input() activeId: any;\n\n  /**\n   * The event emitted after the active nav changes\n   * The payload of the event is the newly active nav id\n   *\n   * If you want to prevent nav change, you should use `(navChange)` event\n   */\n  @Output() activeIdChange = new EventEmitter<any>();\n\n  /**\n   * If `true`, non-active nav content will be removed from DOM\n   * Otherwise it will just be hidden\n   */\n  @Input() destroyOnHide;\n\n  /**\n   * The orientation of navs.\n   *\n   * Using `vertical` will also add the `aria-orientation` attribute\n   */\n  @Input() orientation: 'horizontal' | 'vertical';\n\n  /**\n   * Role attribute generating strategy:\n   * - `false` - no role attributes will be generated\n   * - `'tablist'` - 'tablist', 'tab' and 'tabpanel' will be generated (default)\n   */\n  @Input() roles: 'tablist' | false;\n\n  /**\n   * Keyboard support for nav focus/selection using arrow keys.\n   *\n   * * `false` - no keyboard support.\n   * * `true` - navs will be focused using keyboard arrow keys\n   * * `'changeWithArrows'` -  nav will be selected using keyboard arrow keys\n   *\n   * See the [list of available keyboard shortcuts](#/components/nav/overview#keyboard-shortcuts).\n   *\n   * @since 6.1.0\n */\n  @Input() keyboard: boolean | 'changeWithArrows';\n\n  @ContentChildren(NgbNavItem) items: QueryList<NgbNavItem>;\n  @ContentChildren(forwardRef(() => NgbNavLink), {descendants: true}) links: QueryList<NgbNavLink>;\n\n  constructor(\n      @Attribute('role') public role: string, config: NgbNavConfig, private _cd: ChangeDetectorRef,\n      @Inject(DOCUMENT) private _document: any) {\n    this.destroyOnHide = config.destroyOnHide;\n    this.orientation = config.orientation;\n    this.roles = config.roles;\n    this.keyboard = config.keyboard;\n  }\n\n  /**\n   * The nav change event emitted right before the nav change happens on user click.\n   *\n   * This event won't be emitted if nav is changed programmatically via `[activeId]` or `.select()`.\n   *\n   * See [`NgbNavChangeEvent`](#/components/nav/api#NgbNavChangeEvent) for payload details.\n   */\n  @Output() navChange = new EventEmitter<NgbNavChangeEvent>();\n\n  click(item: NgbNavItem) {\n    if (!item.disabled) {\n      this._updateActiveId(item.id);\n    }\n  }\n\n  onKeyDown(event: KeyboardEvent) {\n    if (this.roles !== 'tablist' || !this.keyboard) {\n      return;\n    }\n    // tslint:disable-next-line: deprecation\n    const key = event.which;\n    const enabledLinks = this.links.filter(link => !link.navItem.disabled);\n    const {length} = enabledLinks;\n\n    let position = -1;\n\n    enabledLinks.forEach((link, index) => {\n      if (link.elRef.nativeElement === this._document.activeElement) {\n        position = index;\n      }\n    });\n\n    if (length) {\n      switch (key) {\n        case Key.ArrowLeft:\n          if (this.orientation === 'vertical') {\n            return;\n          }\n          position = (position - 1 + length) % length;\n          break;\n        case Key.ArrowRight:\n          if (this.orientation === 'vertical') {\n            return;\n          }\n          position = (position + 1) % length;\n          break;\n        case Key.ArrowDown:\n          if (this.orientation === 'horizontal') {\n            return;\n          }\n          position = (position + 1) % length;\n          break;\n        case Key.ArrowUp:\n          if (this.orientation === 'horizontal') {\n            return;\n          }\n          position = (position - 1 + length) % length;\n          break;\n        case Key.Home:\n          position = 0;\n          break;\n        case Key.End:\n          position = length - 1;\n          break;\n      }\n      if (this.keyboard === 'changeWithArrows') {\n        this.select(enabledLinks[position].navItem.id);\n      }\n      enabledLinks[position].elRef.nativeElement.focus();\n\n      event.preventDefault();\n    }\n  }\n\n  /**\n   * Selects the nav with the given id and shows its associated pane.\n   * Any other nav that was previously selected becomes unselected and its associated pane is hidden.\n   */\n  select(id: any) { this._updateActiveId(id, false); }\n\n  ngAfterContentInit() {\n    if (!isDefined(this.activeId)) {\n      const nextId = this.items.first ? this.items.first.id : null;\n      if (isValidNavId(nextId)) {\n        this._updateActiveId(nextId, false);\n        this._cd.detectChanges();\n      }\n    }\n  }\n\n  private _updateActiveId(nextId: any, emitNavChange = true) {\n    if (this.activeId !== nextId) {\n      let defaultPrevented = false;\n\n      if (emitNavChange) {\n        this.navChange.emit({activeId: this.activeId, nextId, preventDefault: () => { defaultPrevented = true; }});\n      }\n\n      if (!defaultPrevented) {\n        this.activeId = nextId;\n        this.activeIdChange.emit(nextId);\n      }\n    }\n  }\n}\n\n\n/**\n * A directive to put on the nav link.\n *\n * @since 5.2.0\n */\n@Directive({\n  selector: 'a[ngbNavLink]',\n  host: {\n    '[id]': 'navItem.domId',\n    '[class.nav-link]': 'true',\n    '[class.nav-item]': 'hasNavItemClass()',\n    '[attr.role]': `role ? role : nav.roles ? 'tab' : undefined`,\n    'href': '',\n    '[class.active]': 'navItem.active',\n    '[class.disabled]': 'navItem.disabled',\n    '[attr.tabindex]': 'navItem.disabled ? -1 : undefined',\n    '[attr.aria-controls]': 'navItem.isPanelInDom() ? navItem.panelDomId : null',\n    '[attr.aria-selected]': 'navItem.active',\n    '[attr.aria-disabled]': 'navItem.disabled',\n    '(click)': 'nav.click(navItem); $event.preventDefault()'\n  }\n})\nexport class NgbNavLink {\n  constructor(\n      @Attribute('role') public role: string, public navItem: NgbNavItem, public nav: NgbNav,\n      public elRef: ElementRef) {}\n\n  hasNavItemClass() {\n    // with alternative markup we have to add `.nav-item` class, because `ngbNavItem` is on the ng-container\n    return this.navItem.elementRef.nativeElement.nodeType === Node.COMMENT_NODE;\n  }\n}\n\n\n/**\n * The payload of the change event emitted right before the nav change happens on user click.\n *\n * This event won't be emitted if nav is changed programmatically via `[activeId]` or `.select()`.\n *\n * @since 5.2.0\n */\nexport interface NgbNavChangeEvent<T = any> {\n  /**\n   * Id of the currently active nav.\n   */\n  activeId: T;\n\n  /**\n   * Id of the newly selected nav.\n   */\n  nextId: T;\n\n  /**\n   * Function that will prevent nav change if called.\n   */\n  preventDefault: () => void;\n}\n","import {Component, Input, ViewEncapsulation} from '@angular/core';\nimport {NgbNav} from './nav';\n\n/**\n * The outlet where currently active nav content will be displayed.\n *\n * @since 5.2.0\n */\n@Component({\n  selector: '[ngbNavOutlet]',\n  host: {'[class.tab-content]': 'true'},\n  encapsulation: ViewEncapsulation.None,\n  template: `\n      <ng-template ngFor let-item [ngForOf]=\"nav.items\">\n          <div class=\"tab-pane\"\n               *ngIf=\"item.isPanelInDom()\"\n               [id]=\"item.panelDomId\"\n               [class.active]=\"item.active\"\n               [attr.role]=\"paneRole ? paneRole : nav.roles ? 'tabpanel' : undefined\"\n               [attr.aria-labelledby]=\"item.domId\">\n              <ng-template [ngTemplateOutlet]=\"item.contentTpl?.templateRef || null\"\n                           [ngTemplateOutletContext]=\"{$implicit: item.active}\"></ng-template>\n          </div>\n      </ng-template>\n  `\n})\nexport class NgbNavOutlet {\n  /**\n   * A role to set on the nav pane\n   */\n  @Input() paneRole;\n\n  /**\n   * Reference to the `NgbNav`\n   */\n  @Input('ngbNavOutlet') nav: NgbNav;\n}\n","import {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\n\nimport {NgbNav, NgbNavContent, NgbNavItem, NgbNavLink} from './nav';\nimport {NgbNavOutlet} from './nav-outlet';\n\nexport {NgbNav, NgbNavContent, NgbNavContentContext, NgbNavItem, NgbNavLink, NgbNavChangeEvent} from './nav';\nexport {NgbNavOutlet} from './nav-outlet';\nexport {NgbNavConfig} from './nav-config';\n\nconst NGB_NAV_DIRECTIVES = [NgbNavContent, NgbNav, NgbNavItem, NgbNavLink, NgbNavOutlet];\n\n@NgModule({declarations: NGB_NAV_DIRECTIVES, exports: NGB_NAV_DIRECTIVES, imports: [CommonModule]})\nexport class NgbNavModule {\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]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\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]=\"previousDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"previousDisabled() ? 'true' : null\">\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\" [attr.aria-current]=\"(pageNumber === page ? 'page' : null)\">\n        <a *ngIf=\"isEllipsis(pageNumber)\" class=\"page-link\" tabindex=\"-1\" aria-disabled=\"true\">\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          [attr.tabindex]=\"disabled ? '-1' : null\" [attr.aria-disabled]=\"disabled ? 'true' : null\">\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]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\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]=\"nextDisabled() ? '-1' : null\"\n          [attr.aria-disabled]=\"nextDisabled() ? 'true' : null\">\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, {static: false}) tplEllipsis: NgbPaginationEllipsis;\n  @ContentChild(NgbPaginationFirst, {static: false}) tplFirst: NgbPaginationFirst;\n  @ContentChild(NgbPaginationLast, {static: false}) tplLast: NgbPaginationLast;\n  @ContentChild(NgbPaginationNext, {static: false}) tplNext: NgbPaginationNext;\n  @ContentChild(NgbPaginationNumber, {static: false}) tplNumber: NgbPaginationNumber;\n  @ContentChild(NgbPaginationPrevious, {static: false}) 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        // The first page will always be included. If the displayed range\n        // starts after the third page, then add ellipsis. But if the range\n        // starts on the third page, then add the second page instead of\n        // an ellipsis, because the ellipsis would only hide a single page.\n        if (start > 2) {\n          this.pages.unshift(-1);\n        } else if (start === 2) {\n          this.pages.unshift(2);\n        }\n        this.pages.unshift(1);\n      }\n      if (end < this.pageCount) {\n        // The last page will always be included. If the displayed range\n        // ends before the third-last page, then add ellipsis. But if the range\n        // ends on third-last page, then add the second-last page instead of\n        // an ellipsis, because the ellipsis would only hide a single page.\n        if (end < (this.pageCount - 2)) {\n          this.pages.push(-1);\n        } else if (end === (this.pageCount - 2)) {\n          this.pages.push(this.pageCount - 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} 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","import {Observable, merge} from 'rxjs';\nimport {share, filter, delay, map} from 'rxjs/operators';\nimport {Renderer2} from '@angular/core';\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(\n    renderer: Renderer2, nativeElement: HTMLElement, triggers: Trigger[], isOpenedFn: () => boolean) {\n  return new Observable<boolean>(subscriber => {\n    const listeners: Function[] = [];\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: {open: boolean} | null = 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: Renderer2, nativeElement: HTMLElement, triggers: string, isOpenedFn: () => boolean, openFn: Function,\n    closeFn: Function, openDelay = 0, 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() ? $any(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  static ngAcceptInputType_autoClose: boolean | string;\n\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>| null = null;\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      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({ngbPopover, popoverTitle, disablePopover, popoverClass}: SimpleChanges) {\n    if (popoverClass && this.isOpen()) {\n      this._windowRef !.instance.popoverClass = popoverClass.currentValue;\n    }\n    // close popover if title and content become empty, or disablePopover set to true\n    if ((ngbPopover || popoverTitle || 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} 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","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  textType: string;\n  type: string;\n  showValue = false;\n  height: string;\n}\n","import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';\nimport {getValueInRange, isNumber} 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  encapsulation: ViewEncapsulation.None,\n  template: `\n    <div class=\"progress\" [style.height]=\"height\">\n      <div class=\"progress-bar{{type ? ' bg-' + type : ''}}{{textType ? ' text-' + textType : ''}}\n      {{animated ? ' progress-bar-animated' : ''}}{{striped ? ' progress-bar-striped' : ''}}\"\n      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\">{{getValue() / max | percent}}</span><ng-content></ng-content>\n      </div>\n    </div>\n  `\n})\nexport class NgbProgressbar {\n  private _max: number;\n\n  /**\n   * The maximal value to be displayed in the progress bar.\n   *\n   * Should be a positive number. Will default to 100 otherwise.\n   */\n  @Input()\n  set max(max: number) {\n    this._max = !isNumber(max) || max <= 0 ? 100 : max;\n  }\n\n  get max(): number { return this._max; }\n\n  /**\n   * If `true`, the stripes on the progress bar 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   * Optional text variant type of the progress bar.\n   *\n   * Supports types based on Bootstrap background color variants, like:\n   *  `\"success\"`, `\"info\"`, `\"warning\"`, `\"danger\"`, `\"primary\"`, `\"secondary\"`, `\"dark\"` and so on.\n   *\n   * @since 5.2.0\n   */\n  @Input() textType: string;\n\n  /**\n   * The type of the progress bar.\n   *\n   * Supports types based on Bootstrap background color variants, like:\n   *  `\"success\"`, `\"info\"`, `\"warning\"`, `\"danger\"`, `\"primary\"`, `\"secondary\"`, `\"dark\"` and so on.\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.textType = config.textType;\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} 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","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  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ContentChild,\n  EventEmitter,\n  forwardRef,\n  Input,\n  OnChanges,\n  OnInit,\n  Output,\n  SimpleChanges,\n  TemplateRef,\n  ViewEncapsulation\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  encapsulation: ViewEncapsulation.None,\n  host: {\n    'class': 'd-inline-flex',\n    '[tabindex]': 'disabled ? -1 : 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, {static: false}) 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) {\n    if (!this.readonly && !this.disabled) {\n      this.update(this.resettable && this.rate === value ? 0 : value);\n    }\n  }\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} 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","// tslint:disable:deprecation\nimport {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 * @deprecated 6.0.0 Please use NgbNav instead\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","// tslint:disable:deprecation\nimport {\n  AfterContentChecked,\n  Component,\n  ContentChildren,\n  Directive,\n  EventEmitter,\n  Input,\n  Output,\n  QueryList,\n  TemplateRef,\n  ViewEncapsulation\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 * @deprecated 6.0.0 Please use NgbNav instead\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 * @deprecated 6.0.0 Please use NgbNav instead\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 * @deprecated 6.0.0 Please use NgbNav instead\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 *\n * @deprecated 6.0.0 Please use NgbNav instead\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 * @deprecated 6.0.0 Please use NgbNav instead\n */\n@Component({\n  selector: 'ngb-tabset',\n  exportAs: 'ngbTabset',\n  encapsulation: ViewEncapsulation.None,\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-selected]=\"tab.id === activeId\" [attr.aria-disabled]=\"tab.disabled\">\n          {{tab.title}}<ng-template [ngTemplateOutlet]=\"tab.titleTpl?.templateRef || null\"></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          <ng-template [ngTemplateOutlet]=\"tab.contentTpl?.templateRef || null\"></ng-template>\n        </div>\n      </ng-template>\n    </div>\n  `\n})\nexport class NgbTabset implements AfterContentChecked {\n  static ngAcceptInputType_justify: string;\n  static ngAcceptInputType_orientation: string;\n\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 : <any>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] : <any>null;\n  }\n}\n","// tslint:disable:deprecation\nimport {NgModule} 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/**\n * @deprecated 6.0.0 Please use NgbNavModule instead\n */\n@NgModule({declarations: NGB_TABSET_DIRECTIVES, exports: NGB_TABSET_DIRECTIVES, imports: [CommonModule]})\nexport class 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 | null): NgbTimeStruct | null;\n\n  /**\n   * Converts an internal `NgbTimeStruct` time to a user-model time of type `T`.\n   */\n  abstract toModel(time: NgbTimeStruct | null): T | null;\n}\n\n@Injectable()\nexport class NgbTimeStructAdapter extends NgbTimeAdapter<NgbTimeStruct> {\n  /**\n   * Converts a NgbTimeStruct value into NgbTimeStruct value\n   */\n  fromModel(time: NgbTimeStruct | null): NgbTimeStruct | null {\n    return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n        {hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : <any>null} :\n        null;\n  }\n\n  /**\n   * Converts a NgbTimeStruct value into NgbTimeStruct value\n   */\n  toModel(time: NgbTimeStruct | null): NgbTimeStruct | null {\n    return (time && isInteger(time.hour) && isInteger(time.minute)) ?\n        {hour: time.hour, minute: time.minute, second: isInteger(time.second) ? time.second : <any>null} :\n        null;\n  }\n}\n","import {Inject, Injectable, LOCALE_ID} from '@angular/core';\nimport {FormStyle, getLocaleDayPeriods, TranslationWidth} from '@angular/common';\n\nexport function NGB_TIMEPICKER_I18N_FACTORY(locale) {\n  return new NgbTimepickerI18nDefault(locale);\n}\n\n/**\n * Type of the service supplying day periods (for example, 'AM' and 'PM') to NgbTimepicker component.\n * The default implementation of this service honors the Angular locale, and uses the registered locale data,\n * as explained in the Angular i18n guide.\n */\n@Injectable({providedIn: 'root', useFactory: NGB_TIMEPICKER_I18N_FACTORY, deps: [LOCALE_ID]})\nexport abstract class NgbTimepickerI18n {\n  /**\n   * Returns the name for the period before midday.\n   */\n  abstract getMorningPeriod(): string;\n\n  /**\n   * Returns the name for the period after midday.\n   */\n  abstract getAfternoonPeriod(): string;\n}\n\n@Injectable()\nexport class NgbTimepickerI18nDefault extends NgbTimepickerI18n {\n  private _periods: [string, string];\n\n  constructor(@Inject(LOCALE_ID) locale: string) {\n    super();\n\n    this._periods = getLocaleDayPeriods(locale, FormStyle.Standalone, TranslationWidth.Narrow);\n  }\n\n  getMorningPeriod(): string { return this._periods[0]; }\n\n  getAfternoonPeriod(): string { return this._periods[1]; }\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';\nimport {NgbTimepickerI18n} from './timepicker-i18n';\n\nconst FILTER_REGEX = /[^0-9]/g;\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\"\n            [class.form-control-lg]=\"isLargeSize\"\n            maxlength=\"2\" inputmode=\"numeric\" placeholder=\"HH\" i18n-placeholder=\"@@ngb.timepicker.HH\"\n            [value]=\"formatHour(model?.hour)\" (change)=\"updateHour($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Hours\" i18n-aria-label=\"@@ngb.timepicker.hours\"\n            (input)=\"formatInput($any($event).target)\"\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\" inputmode=\"numeric\" placeholder=\"MM\" i18n-placeholder=\"@@ngb.timepicker.MM\"\n            [value]=\"formatMinSec(model?.minute)\" (change)=\"updateMinute($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Minutes\" i18n-aria-label=\"@@ngb.timepicker.minutes\"\n            (input)=\"formatInput($any($event).target)\"\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\" inputmode=\"numeric\" placeholder=\"SS\" i18n-placeholder=\"@@ngb.timepicker.SS\"\n            [value]=\"formatMinSec(model?.second)\" (change)=\"updateSecond($any($event).target.value)\"\n            [readOnly]=\"readonlyInputs\" [disabled]=\"disabled\" aria-label=\"Seconds\" i18n-aria-label=\"@@ngb.timepicker.seconds\"\n            (input)=\"formatInput($any($event).target)\"\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 && model.hour >= 12; else am\"\n                          i18n=\"@@ngb.timepicker.PM\">{{ i18n.getAfternoonPeriod() }}</ng-container>\n            <ng-template #am i18n=\"@@ngb.timepicker.AM\">{{ i18n.getMorningPeriod() }}</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  static ngAcceptInputType_size: string;\n\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, public i18n: NgbTimepickerI18n) {\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  formatInput(input: HTMLInputElement) { input.value = input.value.replace(FILTER_REGEX, ''); }\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(isNumber(value) ? value : NaN); }\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} 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';\nexport {NgbTimepickerI18n} from './timepicker-i18n';\n\n@NgModule({declarations: [NgbTimepicker], exports: [NgbTimepicker], imports: [CommonModule]})\nexport class NgbTimepickerModule {\n}\n","import {Injectable} from '@angular/core';\n\n/**\n * Interface used to type all toast config options. See `NgbToastConfig`.\n *\n * @since 5.0.0\n */\nexport interface NgbToastOptions {\n  /**\n   * Specify if the toast component should emit the `hide()` output\n   * after a certain `delay` in ms.\n   */\n  autohide?: boolean;\n\n  /**\n   * Delay in ms after which the `hide()` output should be emitted.\n   */\n  delay?: number;\n\n  /**\n   * Type of aria-live attribute to be used.\n   *\n   * Could be one of these 2 values (as string):\n   * - `polite` (default)\n   * - `alert`\n   */\n  ariaLive?: 'polite' | 'alert';\n}\n\n/**\n * Configuration service for the NgbToast component. You can inject this service, typically in your root component,\n * and customize the values of its properties in order to provide default values for all the toasts used in the\n * application.\n *\n * @since 5.0.0\n */\n@Injectable({providedIn: 'root'})\nexport class NgbToastConfig implements NgbToastOptions {\n  autohide = true;\n  delay = 500;\n  ariaLive: 'polite' | 'alert' = 'polite';\n}\n","import {\n  AfterContentInit,\n  Attribute,\n  Component,\n  ContentChild,\n  Directive,\n  EventEmitter,\n  Input,\n  OnChanges,\n  Output,\n  SimpleChanges,\n  TemplateRef,\n  ViewEncapsulation,\n} from '@angular/core';\n\nimport {NgbToastConfig} from './toast-config';\n\n/**\n * This directive allows the usage of HTML markup or other directives\n * inside of the toast's header.\n *\n * @since 5.0.0\n */\n@Directive({selector: '[ngbToastHeader]'})\nexport class NgbToastHeader {\n}\n\n/**\n * Toasts provide feedback messages as notifications to the user.\n * Goal is to mimic the push notifications available both on mobile and desktop operating systems.\n *\n * @since 5.0.0\n */\n@Component({\n  selector: 'ngb-toast',\n  exportAs: 'ngbToast',\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    'role': 'alert',\n    '[attr.aria-live]': 'ariaLive',\n    'aria-atomic': 'true',\n    '[class.toast]': 'true',\n    '[class.show]': 'true',\n  },\n  template: `\n    <ng-template #headerTpl>\n      <strong class=\"mr-auto\">{{header}}</strong>\n    </ng-template>\n    <ng-template [ngIf]=\"contentHeaderTpl || header\">\n      <div class=\"toast-header\">\n        <ng-template [ngTemplateOutlet]=\"contentHeaderTpl || headerTpl\"></ng-template>\n        <button type=\"button\" class=\"close\" aria-label=\"Close\" i18n-aria-label=\"@@ngb.toast.close-aria\" (click)=\"hide()\">\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n    </ng-template>\n    <div class=\"toast-body\">\n      <ng-content></ng-content>\n    </div>\n  `,\n  styleUrls: ['./toast.scss']\n})\nexport class NgbToast implements AfterContentInit,\n    OnChanges {\n  private _timeoutID;\n\n  /**\n   * Delay after which the toast will hide (ms).\n   * default: `500` (ms) (inherited from NgbToastConfig)\n   */\n  @Input() delay: number;\n\n  /**\n   * Auto hide the toast after a delay in ms.\n   * default: `true` (inherited from NgbToastConfig)\n   */\n  @Input() autohide: boolean;\n\n  /**\n   * Text to be used as toast's header.\n   * Ignored if a ContentChild template is specified at the same time.\n   */\n  @Input() header: string;\n\n  /**\n   * A template like `<ng-template ngbToastHeader></ng-template>` can be\n   * used in the projected content to allow markup usage.\n   */\n  @ContentChild(NgbToastHeader, {read: TemplateRef, static: true}) contentHeaderTpl: TemplateRef<any>| null = null;\n\n  /**\n   * An event fired immediately when toast's `hide()` method has been called.\n   * It can only occur in 2 different scenarios:\n   * - `autohide` timeout fires\n   * - user clicks on a closing cross (&times)\n   *\n   * Additionally this output is purely informative. The toast won't disappear. It's up to the user to take care of\n   * that.\n   */\n  @Output('hide') hideOutput = new EventEmitter<void>();\n\n  constructor(@Attribute('aria-live') public ariaLive: string, config: NgbToastConfig) {\n    if (this.ariaLive == null) {\n      this.ariaLive = config.ariaLive;\n    }\n    this.delay = config.delay;\n    this.autohide = config.autohide;\n  }\n\n  ngAfterContentInit() { this._init(); }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if ('autohide' in changes) {\n      this._clearTimeout();\n      this._init();\n    }\n  }\n\n  hide() {\n    this._clearTimeout();\n    this.hideOutput.emit();\n  }\n\n  private _init() {\n    if (this.autohide && !this._timeoutID) {\n      this._timeoutID = setTimeout(() => this.hide(), this.delay);\n    }\n  }\n\n  private _clearTimeout() {\n    if (this._timeoutID) {\n      clearTimeout(this._timeoutID);\n      this._timeoutID = null;\n    }\n  }\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {NgbToast, NgbToastHeader} from './toast';\n\nexport {NgbToast, NgbToastHeader} from './toast';\nexport {NgbToastConfig, NgbToastOptions} from './toast-config';\n\n@NgModule({declarations: [NgbToast, NgbToastHeader], imports: [CommonModule], exports: [NgbToast, NgbToastHeader]})\nexport class NgbToastModule {\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  OnChanges,\n  SimpleChanges\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, OnChanges {\n  static ngAcceptInputType_autoClose: boolean | string;\n\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>| null = null;\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      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  ngOnChanges({tooltipClass}: SimpleChanges) {\n    if (tooltipClass && this.isOpen()) {\n      this._windowRef !.instance.tooltipClass = tooltipClass.currentValue;\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} 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","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 | null;\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 | readonly string[];\n\n  ngOnChanges(changes: SimpleChanges) {\n    const result = toString(this.result);\n\n    const terms = Array.isArray(this.term) ? this.term : [this.term];\n    const escapedTerms = terms.map(term => regExpEscape(toString(term))).filter(term => term);\n\n    this.parts = escapedTerms.length ? result.split(new RegExp(`(${escapedTerms.join('|')})`, 'gmi')) : [result];\n  }\n}\n","import {Component, EventEmitter, Input, OnInit, Output, TemplateRef, ViewEncapsulation} 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  encapsulation: ViewEncapsulation.None,\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      // if exists, it will always be attached to the <body>\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    if (element != null) {\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}\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<T = any> {\n  /**\n   * The item from the result list about to be selected.\n   */\n  item: T;\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 | null = null;\n  private _closed$ = new Subject();\n  private _inputValueBackup: string | null = null;\n  private _valueChanges: Observable<string>;\n  private _resubscribeTypeahead: BehaviorSubject<any>;\n  private _windowRef: ComponentRef<NgbTypeaheadWindow>| null = null;\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<readonly 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 | null = null;\n  popupId = `ngb-typeahead-${nextWindowId++}`;\n\n  private _onTouched = () => {};\n  private _onChange = (_: any) => {};\n\n  constructor(\n      private _elementRef: ElementRef<HTMLInputElement>, viewContainerRef: ViewContainerRef,\n      private _renderer: Renderer2, injector: Injector, componentFactoryResolver: ComponentFactoryResolver,\n      config: NgbTypeaheadConfig, ngZone: NgZone, private _live: Live, @Inject(DOCUMENT) private _document: any,\n      private _ngZone: NgZone, private _changeDetector: ChangeDetectorRef, 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      this._onChange(this.editable ? value : undefined);\n    }));\n    const results$ = inputValues$.pipe(this.ngbTypeahead);\n    const userInput$ = this._resubscribeTypeahead.pipe(switchMap(() => results$));\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        this._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 = null;\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<readonly 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} 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","import {NgModule} 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 {NgbNavModule} from './nav/nav.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 {NgbToastModule} from './toast/toast.module';\nimport {NgbTooltipModule} from './tooltip/tooltip.module';\nimport {NgbTypeaheadModule} from './typeahead/typeahead.module';\n\n\n\nexport {\n  NgbAccordion,\n  NgbAccordionConfig,\n  NgbAccordionModule,\n  NgbPanel,\n  NgbPanelChangeEvent,\n  NgbPanelContent,\n  NgbPanelHeader,\n  NgbPanelHeaderContext,\n  NgbPanelTitle,\n  NgbPanelToggle\n} from './accordion/accordion.module';\nexport {NgbAlert, NgbAlertConfig, NgbAlertModule} from './alert/alert.module';\nexport {NgbButtonLabel, NgbButtonsModule, NgbCheckBox, NgbRadio, NgbRadioGroup} from './buttons/buttons.module';\nexport {\n  NgbCarousel,\n  NgbCarouselConfig,\n  NgbCarouselModule,\n  NgbSlide,\n  NgbSlideEvent,\n  NgbSlideEventDirection,\n  NgbSlideEventSource\n} from './carousel/carousel.module';\nexport {NgbCollapse, NgbCollapseModule} from './collapse/collapse.module';\nexport {\n  NgbCalendar,\n  NgbCalendarGregorian,\n  NgbCalendarHebrew,\n  NgbCalendarIslamicCivil,\n  NgbCalendarIslamicUmalqura,\n  NgbCalendarPersian,\n  NgbDate,\n  NgbDateAdapter,\n  NgbDateNativeAdapter,\n  NgbDateNativeUTCAdapter,\n  NgbDateParserFormatter,\n  NgbDatepicker,\n  NgbDatepickerConfig,\n  NgbInputDatepickerConfig,\n  NgbDatepickerContent,\n  NgbDatepickerI18n,\n  NgbDatepickerI18nHebrew,\n  NgbDatepickerKeyboardService,\n  NgbDatepickerModule,\n  NgbDatepickerMonth,\n  NgbDatepickerNavigateEvent,\n  NgbDatepickerState,\n  NgbDateStruct,\n  NgbInputDatepicker,\n  NgbPeriod\n} from './datepicker/datepicker.module';\nexport {\n  NgbDropdown,\n  NgbDropdownAnchor,\n  NgbDropdownConfig,\n  NgbDropdownItem,\n  NgbDropdownMenu,\n  NgbDropdownModule,\n  NgbDropdownToggle,\n  NgbNavbar\n} from './dropdown/dropdown.module';\nexport {\n  ModalDismissReasons,\n  NgbActiveModal,\n  NgbModal,\n  NgbModalConfig,\n  NgbModalModule,\n  NgbModalOptions,\n  NgbModalRef\n} from './modal/modal.module';\nexport {\n  NgbNavChangeEvent,\n  NgbNavConfig,\n  NgbNav,\n  NgbNavContent,\n  NgbNavContentContext,\n  NgbNavItem,\n  NgbNavLink,\n  NgbNavModule,\n  NgbNavOutlet\n} from './nav/nav.module';\nexport {\n  NgbPagination,\n  NgbPaginationConfig,\n  NgbPaginationEllipsis,\n  NgbPaginationFirst,\n  NgbPaginationLast,\n  NgbPaginationModule,\n  NgbPaginationNext,\n  NgbPaginationNumber,\n  NgbPaginationPrevious\n} from './pagination/pagination.module';\nexport {NgbPopover, NgbPopoverConfig, NgbPopoverModule} from './popover/popover.module';\nexport {NgbProgressbar, NgbProgressbarConfig, NgbProgressbarModule} from './progressbar/progressbar.module';\nexport {NgbRating, NgbRatingConfig, NgbRatingModule} from './rating/rating.module';\nexport {\n  NgbTab,\n  NgbTabChangeEvent,\n  NgbTabContent,\n  NgbTabset,\n  NgbTabsetConfig,\n  NgbTabsetModule,\n  NgbTabTitle\n} from './tabset/tabset.module';\nexport {\n  NgbTimeAdapter,\n  NgbTimepickerI18n,\n  NgbTimepicker,\n  NgbTimepickerConfig,\n  NgbTimepickerModule,\n  NgbTimeStruct\n} from './timepicker/timepicker.module';\nexport {NgbToast, NgbToastConfig, NgbToastHeader, NgbToastModule} from './toast/toast.module';\nexport {NgbTooltip, NgbTooltipConfig, NgbTooltipModule} from './tooltip/tooltip.module';\nexport {\n  NgbHighlight,\n  NgbTypeahead,\n  NgbTypeaheadConfig,\n  NgbTypeaheadModule,\n  NgbTypeaheadSelectItemEvent\n} from './typeahead/typeahead.module';\nexport {Placement} from './util/positioning';\n\n\nconst NGB_MODULES = [\n  NgbAccordionModule, NgbAlertModule, NgbButtonsModule, NgbCarouselModule, NgbCollapseModule, NgbDatepickerModule,\n  NgbDropdownModule, NgbModalModule, NgbNavModule, NgbPaginationModule, NgbPopoverModule, NgbProgressbarModule,\n  NgbRatingModule, NgbTimepickerModule, NgbToastModule, NgbTooltipModule, NgbTypeaheadModule,\n  // tslint:disable-next-line:deprecation\n  NgbTabsetModule\n];\n\n@NgModule({imports: NGB_MODULES, exports: NGB_MODULES})\nexport class NgbModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n\nexport {NGB_CAROUSEL_DIRECTIVES as ɵa} from './carousel/carousel';\nexport {NGB_DATEPICKER_DATE_ADAPTER_FACTORY as ɵi,NgbDateStructAdapter as ɵj} from './datepicker/adapters/ngb-date-adapter';\nexport {NGB_DATEPICKER_VALUE_ACCESSOR as ɵb} from './datepicker/datepicker';\nexport {NgbDatepickerDayView as ɵd} from './datepicker/datepicker-day-view';\nexport {NGB_DATEPICKER_18N_FACTORY as ɵg,NgbDatepickerI18nDefault as ɵh} from './datepicker/datepicker-i18n';\nexport {NgbDatepickerNavigation as ɵe} from './datepicker/datepicker-navigation';\nexport {NgbDatepickerNavigationSelect as ɵf} from './datepicker/datepicker-navigation-select';\nexport {NgbDatepickerService as ɵt} from './datepicker/datepicker-service';\nexport {NgbCalendarHijri as ɵbb} from './datepicker/hijri/ngb-calendar-hijri';\nexport {NGB_DATEPICKER_CALENDAR_FACTORY as ɵc} from './datepicker/ngb-calendar';\nexport {NGB_DATEPICKER_PARSER_FORMATTER_FACTORY as ɵk,NgbDateISOParserFormatter as ɵl} from './datepicker/ngb-date-parser-formatter';\nexport {NgbModalBackdrop as ɵu} from './modal/modal-backdrop';\nexport {NgbModalStack as ɵw} from './modal/modal-stack';\nexport {NgbModalWindow as ɵv} from './modal/modal-window';\nexport {NgbPopoverWindow as ɵm} from './popover/popover';\nexport {NGB_DATEPICKER_TIME_ADAPTER_FACTORY as ɵn,NgbTimeStructAdapter as ɵo} from './timepicker/ngb-time-adapter';\nexport {NGB_TIMEPICKER_I18N_FACTORY as ɵp,NgbTimepickerI18nDefault as ɵq} from './timepicker/timepicker-i18n';\nexport {NgbTooltipWindow as ɵr} from './tooltip/tooltip';\nexport {NgbTypeaheadWindow as ɵs} from './typeahead/typeahead-window';\nexport {ARIA_LIVE_DELAY as ɵy,ARIA_LIVE_DELAY_FACTORY as ɵz,Live as ɵba} from './util/accessibility/live';\nexport {ContentRef as ɵbc} from './util/popup';\nexport {ScrollBar as ɵx} from './util/scrollbar';","import { Subscriber } from '../Subscriber';\nexport function takeWhile(predicate, inclusive = false) {\n    return (source) => source.lift(new TakeWhileOperator(predicate, inclusive));\n}\nclass TakeWhileOperator {\n    constructor(predicate, inclusive) {\n        this.predicate = predicate;\n        this.inclusive = inclusive;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));\n    }\n}\nclass TakeWhileSubscriber extends Subscriber {\n    constructor(destination, predicate, inclusive) {\n        super(destination);\n        this.predicate = predicate;\n        this.inclusive = inclusive;\n        this.index = 0;\n    }\n    _next(value) {\n        const destination = this.destination;\n        let result;\n        try {\n            result = this.predicate(value, this.index++);\n        }\n        catch (err) {\n            destination.error(err);\n            return;\n        }\n        this.nextOrComplete(value, result);\n    }\n    nextOrComplete(value, predicateResult) {\n        const destination = this.destination;\n        if (Boolean(predicateResult)) {\n            destination.next(value);\n        }\n        else {\n            if (this.inclusive) {\n                destination.next(value);\n            }\n            destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=takeWhile.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationOptions} from './animation_metadata';\nimport {AnimationPlayer} from './players/animation_player';\n\n/**\n * An injectable service that produces an animation sequence programmatically within an\n * Angular component or directive.\n * Provided by the `BrowserAnimationsModule` or `NoopAnimationsModule`.\n *\n * @usageNotes\n *\n * To use this service, add it to your component or directive as a dependency.\n * The service is instantiated along with your component.\n *\n * Apps do not typically need to create their own animation players, but if you\n * do need to, follow these steps:\n *\n * 1. Use the `build()` method to create a programmatic animation using the\n * `animate()` function. The method returns an `AnimationFactory` instance.\n *\n * 2. Use the factory object to create an `AnimationPlayer` and attach it to a DOM element.\n *\n * 3. Use the player object to control the animation programmatically.\n *\n * For example:\n *\n * ```ts\n * // import the service from BrowserAnimationsModule\n * import {AnimationBuilder} from '@angular/animations';\n * // require the service as a dependency\n * class MyCmp {\n *   constructor(private _builder: AnimationBuilder) {}\n *\n *   makeAnimation(element: any) {\n *     // first define a reusable animation\n *     const myAnimation = this._builder.build([\n *       style({ width: 0 }),\n *       animate(1000, style({ width: '100px' }))\n *     ]);\n *\n *     // use the returned factory object to create a player\n *     const player = myAnimation.create(element);\n *\n *     player.play();\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport abstract class AnimationBuilder {\n  /**\n   * Builds a factory for producing a defined animation.\n   * @param animation A reusable animation definition.\n   * @returns A factory object that can create a player for the defined animation.\n   * @see `animate()`\n   */\n  abstract build(animation: AnimationMetadata|AnimationMetadata[]): AnimationFactory;\n}\n\n/**\n * A factory object returned from the `AnimationBuilder`.`build()` method.\n *\n * @publicApi\n */\nexport abstract class AnimationFactory {\n  /**\n   * Creates an `AnimationPlayer` instance for the reusable animation defined by\n   * the `AnimationBuilder`.`build()` method that created this factory.\n   * Attaches the new player a DOM element.\n   * @param element The DOM element to which to attach the animation.\n   * @param options A set of options that can include a time delay and\n   * additional developer-defined parameters.\n   */\n  abstract create(element: any, options?: AnimationOptions): AnimationPlayer;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Represents a set of CSS styles for use in an animation style.\n */\nexport interface ɵStyleData {\n  [key: string]: string|number;\n}\n\n/**\n * Represents animation-step timing parameters for an animation step.\n * @see `animate()`\n *\n * @publicApi\n */\nexport declare type AnimateTimings = {\n  /**\n   * The full duration of an animation step. A number and optional time unit,\n   * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n   * The default unit is milliseconds.\n   */\n  duration: number,\n  /**\n   * The delay in applying an animation step. A number and optional time unit.\n   * The default unit is milliseconds.\n   */\n  delay: number,\n  /**\n   * An easing style that controls how an animations step accelerates\n   * and decelerates during its run time. An easing function such as `cubic-bezier()`,\n   * or one of the following constants:\n   * - `ease-in`\n   * - `ease-out`\n   * - `ease-in-and-out`\n   */\n  easing: string | null\n};\n\n/**\n * @description Options that control animation styling and timing.\n *\n * The following animation functions accept `AnimationOptions` data:\n *\n * - `transition()`\n * - `sequence()`\n * - `{@link animations/group group()}`\n * - `query()`\n * - `animation()`\n * - `useAnimation()`\n * - `animateChild()`\n *\n * Programmatic animations built using the `AnimationBuilder` service also\n * make use of `AnimationOptions`.\n *\n * @publicApi\n */\nexport declare interface AnimationOptions {\n  /**\n   * Sets a time-delay for initiating an animation action.\n   * A number and optional time unit, such as \"1s\" or \"10ms\" for one second\n   * and 10 milliseconds, respectively.The default unit is milliseconds.\n   * Default value is 0, meaning no delay.\n   */\n  delay?: number|string;\n  /**\n   * A set of developer-defined parameters that modify styling and timing\n   * when an animation action starts. An array of key-value pairs, where the provided value\n   * is used as a default.\n   */\n  params?: {[name: string]: any};\n}\n\n/**\n * Adds duration options to control animation styling and timing for a child animation.\n *\n * @see `animateChild()`\n *\n * @publicApi\n */\nexport declare interface AnimateChildOptions extends AnimationOptions {\n  duration?: number|string;\n}\n\n/**\n * @description Constants for the categories of parameters that can be defined for animations.\n *\n * A corresponding function defines a set of parameters for each category, and\n * collects them into a corresponding `AnimationMetadata` object.\n *\n * @publicApi\n */\nexport const enum AnimationMetadataType {\n  /**\n   * Associates a named animation state with a set of CSS styles.\n   * See `state()`\n   */\n  State = 0,\n  /**\n   * Data for a transition from one animation state to another.\n   * See `transition()`\n   */\n  Transition = 1,\n  /**\n   * Contains a set of animation steps.\n   * See `sequence()`\n   */\n  Sequence = 2,\n  /**\n   * Contains a set of animation steps.\n   * See `{@link animations/group group()}`\n   */\n  Group = 3,\n  /**\n   * Contains an animation step.\n   * See `animate()`\n   */\n  Animate = 4,\n  /**\n   * Contains a set of animation steps.\n   * See `keyframes()`\n   */\n  Keyframes = 5,\n  /**\n   * Contains a set of CSS property-value pairs into a named style.\n   * See `style()`\n   */\n  Style = 6,\n  /**\n   * Associates an animation with an entry trigger that can be attached to an element.\n   * See `trigger()`\n   */\n  Trigger = 7,\n  /**\n   * Contains a re-usable animation.\n   * See `animation()`\n   */\n  Reference = 8,\n  /**\n   * Contains data to use in executing child animations returned by a query.\n   * See `animateChild()`\n   */\n  AnimateChild = 9,\n  /**\n   * Contains animation parameters for a re-usable animation.\n   * See `useAnimation()`\n   */\n  AnimateRef = 10,\n  /**\n   * Contains child-animation query data.\n   * See `query()`\n   */\n  Query = 11,\n  /**\n   * Contains data for staggering an animation sequence.\n   * See `stagger()`\n   */\n  Stagger = 12\n}\n\n/**\n * Specifies automatic styling.\n *\n * @publicApi\n */\nexport const AUTO_STYLE = '*';\n\n/**\n * Base for animation data structures.\n *\n * @publicApi\n */\nexport interface AnimationMetadata {\n  type: AnimationMetadataType;\n}\n\n/**\n * Contains an animation trigger. Instantiated and returned by the\n * `trigger()` function.\n *\n * @publicApi\n */\nexport interface AnimationTriggerMetadata extends AnimationMetadata {\n  /**\n   * The trigger name, used to associate it with an element. Unique within the component.\n   */\n  name: string;\n  /**\n   * An animation definition object, containing an array of state and transition declarations.\n   */\n  definitions: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: {params?: {[name: string]: any}}|null;\n}\n\n/**\n * Encapsulates an animation state by associating a state name with a set of CSS styles.\n * Instantiated and returned by the `state()` function.\n *\n * @publicApi\n */\nexport interface AnimationStateMetadata extends AnimationMetadata {\n  /**\n   * The state name, unique within the component.\n   */\n  name: string;\n  /**\n   *  The CSS styles associated with this state.\n   */\n  styles: AnimationStyleMetadata;\n  /**\n   * An options object containing\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation.\n   */\n  options?: {params: {[name: string]: any}};\n}\n\n/**\n * Encapsulates an animation transition. Instantiated and returned by the\n * `transition()` function.\n *\n * @publicApi\n */\nexport interface AnimationTransitionMetadata extends AnimationMetadata {\n  /**\n   * An expression that describes a state change.\n   */\n  expr: string|\n      ((fromState: string, toState: string, element?: any,\n        params?: {[key: string]: any}) => boolean);\n  /**\n   * One or more animation objects to which this transition applies.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates a reusable animation, which is a collection of individual animation steps.\n * Instantiated and returned by the `animation()` function, and\n * passed to the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationReferenceMetadata extends AnimationMetadata {\n  /**\n   *  One or more animation step objects.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation query. Instantiated and returned by\n * the `query()` function.\n *\n * @publicApi\n */\nexport interface AnimationQueryMetadata extends AnimationMetadata {\n  /**\n   *  The CSS selector for this query.\n   */\n  selector: string;\n  /**\n   * One or more animation step objects.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n  /**\n   * A query options object.\n   */\n  options: AnimationQueryOptions|null;\n}\n\n/**\n * Encapsulates a keyframes sequence. Instantiated and returned by\n * the `keyframes()` function.\n *\n * @publicApi\n */\nexport interface AnimationKeyframesSequenceMetadata extends AnimationMetadata {\n  /**\n   * An array of animation styles.\n   */\n  steps: AnimationStyleMetadata[];\n}\n\n/**\n * Encapsulates an animation style. Instantiated and returned by\n * the `style()` function.\n *\n * @publicApi\n */\nexport interface AnimationStyleMetadata extends AnimationMetadata {\n  /**\n   * A set of CSS style properties.\n   */\n  styles: '*'|{[key: string]: string | number}|Array<{[key: string]: string | number}|'*'>;\n  /**\n   * A percentage of the total animate time at which the style is to be applied.\n   */\n  offset: number|null;\n}\n\n/**\n * Encapsulates an animation step. Instantiated and returned by\n * the `animate()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateMetadata extends AnimationMetadata {\n  /**\n   * The timing data for the step.\n   */\n  timings: string|number|AnimateTimings;\n  /**\n   * A set of styles used in the step.\n   */\n  styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata|null;\n}\n\n/**\n * Encapsulates a child animation, that can be run explicitly when the parent is run.\n * Instantiated and returned by the `animateChild` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateChildMetadata extends AnimationMetadata {\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates a reusable animation.\n * Instantiated and returned by the `useAnimation()` function.\n *\n * @publicApi\n */\nexport interface AnimationAnimateRefMetadata extends AnimationMetadata {\n  /**\n   * An animation reference object.\n   */\n  animation: AnimationReferenceMetadata;\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation sequence.\n * Instantiated and returned by the `sequence()` function.\n *\n * @publicApi\n */\nexport interface AnimationSequenceMetadata extends AnimationMetadata {\n  /**\n   *  An array of animation step objects.\n   */\n  steps: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates an animation group.\n * Instantiated and returned by the `{@link animations/group group()}` function.\n *\n * @publicApi\n */\nexport interface AnimationGroupMetadata extends AnimationMetadata {\n  /**\n   * One or more animation or style steps that form this group.\n   */\n  steps: AnimationMetadata[];\n  /**\n   * An options object containing a delay and\n   * developer-defined parameters that provide styling defaults and\n   * can be overridden on invocation. Default delay is 0.\n   */\n  options: AnimationOptions|null;\n}\n\n/**\n * Encapsulates animation query options.\n * Passed to the `query()` function.\n *\n * @publicApi\n */\nexport declare interface AnimationQueryOptions extends AnimationOptions {\n  /**\n   * True if this query is optional, false if it is required. Default is false.\n   * A required query throws an error if no elements are retrieved when\n   * the query is executed. An optional query does not.\n   *\n   */\n  optional?: boolean;\n  /**\n   * A maximum total number of results to return from the query.\n   * If negative, results are limited from the end of the query list towards the beginning.\n   * By default, results are not limited.\n   */\n  limit?: number;\n}\n\n/**\n * Encapsulates parameters for staggering the start times of a set of animation steps.\n * Instantiated and returned by the `stagger()` function.\n *\n * @publicApi\n **/\nexport interface AnimationStaggerMetadata extends AnimationMetadata {\n  /**\n   * The timing data for the steps.\n   */\n  timings: string|number;\n  /**\n   * One or more animation steps.\n   */\n  animation: AnimationMetadata|AnimationMetadata[];\n}\n\n/**\n * Creates a named animation trigger, containing a  list of `state()`\n * and `transition()` entries to be evaluated when the expression\n * bound to the trigger changes.\n *\n * @param name An identifying string.\n * @param definitions  An animation definition object, containing an array of `state()`\n * and `transition()` declarations.\n *\n * @return An object that encapsulates the trigger data.\n *\n * @usageNotes\n * Define an animation trigger in the `animations` section of `@Component` metadata.\n * In the template, reference the trigger by name and bind it to a trigger expression that\n * evaluates to a defined animation state, using the following format:\n *\n * `[@triggerName]=\"expression\"`\n *\n * Animation trigger bindings convert all values to strings, and then match the\n * previous and current values against any linked transitions.\n * Booleans can be specified as `1` or `true` and `0` or `false`.\n *\n * ### Usage Example\n *\n * The following example creates an animation trigger reference based on the provided\n * name value.\n * The provided animation value is expected to be an array consisting of state and\n * transition declarations.\n *\n * ```typescript\n * @Component({\n *   selector: \"my-component\",\n *   templateUrl: \"my-component-tpl.html\",\n *   animations: [\n *     trigger(\"myAnimationTrigger\", [\n *       state(...),\n *       state(...),\n *       transition(...),\n *       transition(...)\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   myStatusExp = \"something\";\n * }\n * ```\n *\n * The template associated with this component makes use of the defined trigger\n * by binding to an element within its template code.\n *\n * ```html\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * ### Using an inline function\n * The `transition` animation method also supports reading an inline function which can decide\n * if its associated animation should be run.\n *\n * ```typescript\n * // this method is run each time the `myAnimationTrigger` trigger value changes.\n * function myInlineMatcherFn(fromState: string, toState: string, element: any, params: {[key:\n string]: any}): boolean {\n *   // notice that `element` and `params` are also available here\n *   return toState == 'yes-please-animate';\n * }\n *\n * @Component({\n *   selector: 'my-component',\n *   templateUrl: 'my-component-tpl.html',\n *   animations: [\n *     trigger('myAnimationTrigger', [\n *       transition(myInlineMatcherFn, [\n *         // the animation sequence code\n *       ]),\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   myStatusExp = \"yes-please-animate\";\n * }\n * ```\n *\n * ### Disabling Animations\n * When true, the special animation control binding `@.disabled` binding prevents\n * all animations from rendering.\n * Place the  `@.disabled` binding on an element to disable\n * animations on the element itself, as well as any inner animation triggers\n * within the element.\n *\n * The following example shows how to use this feature:\n *\n * ```typescript\n * @Component({\n *   selector: 'my-component',\n *   template: `\n *     <div [@.disabled]=\"isDisabled\">\n *       <div [@childAnimation]=\"exp\"></div>\n *     </div>\n *   `,\n *   animations: [\n *     trigger(\"childAnimation\", [\n *       // ...\n *     ])\n *   ]\n * })\n * class MyComponent {\n *   isDisabled = true;\n *   exp = '...';\n * }\n * ```\n *\n * When `@.disabled` is true, it prevents the `@childAnimation` trigger from animating,\n * along with any inner animations.\n *\n * ### Disable animations application-wide\n * When an area of the template is set to have animations disabled,\n * **all** inner components have their animations disabled as well.\n * This means that you can disable all animations for an app\n * by placing a host binding set on `@.disabled` on the topmost Angular component.\n *\n * ```typescript\n * import {Component, HostBinding} from '@angular/core';\n *\n * @Component({\n *   selector: 'app-component',\n *   templateUrl: 'app.component.html',\n * })\n * class AppComponent {\n *   @HostBinding('@.disabled')\n *   public animationsDisabled = true;\n * }\n * ```\n *\n * ### Overriding disablement of inner animations\n * Despite inner animations being disabled, a parent animation can `query()`\n * for inner elements located in disabled areas of the template and still animate\n * them if needed. This is also the case for when a sub animation is\n * queried by a parent and then later animated using `animateChild()`.\n *\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, the animation\n * trigger callbacks still fire, but for zero seconds. When the callback fires, it provides\n * an instance of an `AnimationEvent`. If animations are disabled,\n * the `.disabled` flag on the event is true.\n *\n * @publicApi\n */\nexport function trigger(name: string, definitions: AnimationMetadata[]): AnimationTriggerMetadata {\n  return {type: AnimationMetadataType.Trigger, name, definitions, options: {}};\n}\n\n/**\n * Defines an animation step that combines styling information with timing information.\n *\n * @param timings Sets `AnimateTimings` for the parent animation.\n * A string in the format \"duration [delay] [easing]\".\n *  - Duration and delay are expressed as a number and optional time unit,\n * such as \"1s\" or \"10ms\" for one second and 10 milliseconds, respectively.\n * The default unit is milliseconds.\n *  - The easing value controls how the animation accelerates and decelerates\n * during its runtime. Value is one of  `ease`, `ease-in`, `ease-out`,\n * `ease-in-out`, or a `cubic-bezier()` function call.\n * If not supplied, no easing is applied.\n *\n * For example, the string \"1s 100ms ease-out\" specifies a duration of\n * 1000 milliseconds, and delay of 100 ms, and the \"ease-out\" easing style,\n * which decelerates near the end of the duration.\n * @param styles Sets AnimationStyles for the parent animation.\n * A function call to either `style()` or `keyframes()`\n * that returns a collection of CSS style entries to be applied to the parent animation.\n * When null, uses the styles from the destination state.\n * This is useful when describing an animation step that will complete an animation;\n * see \"Animating to the final state\" in `transitions()`.\n * @returns An object that encapsulates the animation step.\n *\n * @usageNotes\n * Call within an animation `sequence()`, `{@link animations/group group()}`, or\n * `transition()` call to specify an animation step\n * that applies given style data to the parent animation for a given amount of time.\n *\n * ### Syntax Examples\n * **Timing examples**\n *\n * The following examples show various `timings` specifications.\n * - `animate(500)` : Duration is 500 milliseconds.\n * - `animate(\"1s\")` : Duration is 1000 milliseconds.\n * - `animate(\"100ms 0.5s\")` : Duration is 100 milliseconds, delay is 500 milliseconds.\n * - `animate(\"5s ease-in\")` : Duration is 5000 milliseconds, easing in.\n * - `animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\")` : Duration is 5000 milliseconds, delay is 10\n * milliseconds, easing according to a bezier curve.\n *\n * **Style examples**\n *\n * The following example calls `style()` to set a single CSS style.\n * ```typescript\n * animate(500, style({ background: \"red\" }))\n * ```\n * The following example calls `keyframes()` to set a CSS style\n * to different values for successive keyframes.\n * ```typescript\n * animate(500, keyframes(\n *  [\n *   style({ background: \"blue\" })),\n *   style({ background: \"red\" }))\n *  ])\n * ```\n *\n * @publicApi\n */\nexport function animate(\n    timings: string|number,\n    styles: AnimationStyleMetadata|AnimationKeyframesSequenceMetadata|null =\n        null): AnimationAnimateMetadata {\n  return {type: AnimationMetadataType.Animate, styles, timings};\n}\n\n/**\n * @description Defines a list of animation steps to be run in parallel.\n *\n * @param steps An array of animation step objects.\n * - When steps are defined by `style()` or `animate()`\n * function calls, each call within the group is executed instantly.\n * - To specify offset styles to be applied at a later time, define steps with\n * `keyframes()`, or use `animate()` calls with a delay value.\n * For example:\n *\n * ```typescript\n * group([\n *   animate(\"1s\", style({ background: \"black\" })),\n *   animate(\"2s\", style({ color: \"white\" }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the group data.\n *\n * @usageNotes\n * Grouped animations are useful when a series of styles must be\n * animated at different starting times and closed off at different ending times.\n *\n * When called within a `sequence()` or a\n * `transition()` call, does not continue to the next\n * instruction until all of the inner animation steps have completed.\n *\n * @publicApi\n */\nexport function group(\n    steps: AnimationMetadata[], options: AnimationOptions|null = null): AnimationGroupMetadata {\n  return {type: AnimationMetadataType.Group, steps, options};\n}\n\n/**\n * Defines a list of animation steps to be run sequentially, one by one.\n *\n * @param steps An array of animation step objects.\n * - Steps defined by `style()` calls apply the styling data immediately.\n * - Steps defined by `animate()` calls apply the styling data over time\n *   as specified by the timing data.\n *\n * ```typescript\n * sequence([\n *   style({ opacity: 0 }),\n *   animate(\"1s\", style({ opacity: 1 }))\n * ])\n * ```\n *\n * @param options An options object containing a delay and\n * developer-defined parameters that provide styling defaults and\n * can be overridden on invocation.\n *\n * @return An object that encapsulates the sequence data.\n *\n * @usageNotes\n * When you pass an array of steps to a\n * `transition()` call, the steps run sequentially by default.\n * Compare this to the `{@link animations/group group()}` call, which runs animation steps in\n *parallel.\n *\n * When a sequence is used within a `{@link animations/group group()}` or a `transition()` call,\n * execution continues to the next instruction only after each of the inner animation\n * steps have completed.\n *\n * @publicApi\n **/\nexport function sequence(\n    steps: AnimationMetadata[], options: AnimationOptions|null = null): AnimationSequenceMetadata {\n  return {type: AnimationMetadataType.Sequence, steps, options};\n}\n\n/**\n * Declares a key/value object containing CSS properties/styles that\n * can then be used for an animation `state`, within an animation `sequence`,\n * or as styling data for calls to `animate()` and `keyframes()`.\n *\n * @param tokens A set of CSS styles or HTML styles associated with an animation state.\n * The value can be any of the following:\n * - A key-value style pair associating a CSS property with a value.\n * - An array of key-value style pairs.\n * - An asterisk (*), to use auto-styling, where styles are derived from the element\n * being animated and applied to the animation when it starts.\n *\n * Auto-styling can be used to define a state that depends on layout or other\n * environmental factors.\n *\n * @return An object that encapsulates the style data.\n *\n * @usageNotes\n * The following examples create animation styles that collect a set of\n * CSS property values:\n *\n * ```typescript\n * // string values for CSS properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical pixel values\n * style({ width: 100, height: 0 })\n * ```\n *\n * The following example uses auto-styling to allow a component to animate from\n * a height of 0 up to the height of the parent element:\n *\n * ```\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * @publicApi\n **/\nexport function style(tokens: '*'|{[key: string]: string | number}|\n                      Array<'*'|{[key: string]: string | number}>): AnimationStyleMetadata {\n  return {type: AnimationMetadataType.Style, styles: tokens, offset: null};\n}\n\n/**\n * Declares an animation state within a trigger attached to an element.\n *\n * @param name One or more names for the defined state in a comma-separated string.\n * The following reserved state names can be supplied to define a style for specific use\n * cases:\n *\n * - `void` You can associate styles with this name to be used when\n * the element is detached from the application. For example, when an `ngIf` evaluates\n * to false, the state of the associated element is void.\n *  - `*` (asterisk) Indicates the default state. You can associate styles with this name\n * to be used as the fallback when the state that is being animated is not declared\n * within the trigger.\n *\n * @param styles A set of CSS styles associated with this state, created using the\n * `style()` function.\n * This set of styles persists on the element once the state has been reached.\n * @param options Parameters that can be passed to the state when it is invoked.\n * 0 or more key-value pairs.\n * @return An object that encapsulates the new state data.\n *\n * @usageNotes\n * Use the `trigger()` function to register states to an animation trigger.\n * Use the `transition()` function to animate between states.\n * When a state is active within a component, its associated styles persist on the element,\n * even when the animation ends.\n *\n * @publicApi\n **/\nexport function state(\n    name: string, styles: AnimationStyleMetadata,\n    options?: {params: {[name: string]: any}}): AnimationStateMetadata {\n  return {type: AnimationMetadataType.State, name, styles, options};\n}\n\n/**\n * Defines a set of animation styles, associating each style with an optional `offset` value.\n *\n * @param steps A set of animation styles with optional offset data.\n * The optional `offset` value for a style specifies a percentage of the total animation\n * time at which that style is applied.\n * @returns An object that encapsulates the keyframes data.\n *\n * @usageNotes\n * Use with the `animate()` call. Instead of applying animations\n * from the current state\n * to the destination state, keyframes describe how each style entry is applied and at what point\n * within the animation arc.\n * Compare [CSS Keyframe Animations](https://www.w3schools.com/css/css3_animations.asp).\n *\n * ### Usage\n *\n * In the following example, the offset values describe\n * when each `backgroundColor` value is applied. The color is red at the start, and changes to\n * blue when 20% of the total time has elapsed.\n *\n * ```typescript\n * // the provided offset values\n * animate(\"5s\", keyframes([\n *   style({ backgroundColor: \"red\", offset: 0 }),\n *   style({ backgroundColor: \"blue\", offset: 0.2 }),\n *   style({ backgroundColor: \"orange\", offset: 0.3 }),\n *   style({ backgroundColor: \"black\", offset: 1 })\n * ]))\n * ```\n *\n * If there are no `offset` values specified in the style entries, the offsets\n * are calculated automatically.\n *\n * ```typescript\n * animate(\"5s\", keyframes([\n *   style({ backgroundColor: \"red\" }) // offset = 0\n *   style({ backgroundColor: \"blue\" }) // offset = 0.33\n *   style({ backgroundColor: \"orange\" }) // offset = 0.66\n *   style({ backgroundColor: \"black\" }) // offset = 1\n * ]))\n *```\n\n * @publicApi\n */\nexport function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSequenceMetadata {\n  return {type: AnimationMetadataType.Keyframes, steps};\n}\n\n/**\n * Declares an animation transition as a sequence of animation steps to run when a given\n * condition is satisfied. The condition is a Boolean expression or function that compares\n * the previous and current animation states, and returns true if this transition should occur.\n * When the state criteria of a defined transition are met, the associated animation is\n * triggered.\n *\n * @param stateChangeExpr A Boolean expression or function that compares the previous and current\n * animation states, and returns true if this transition should occur. Note that  \"true\" and \"false\"\n * match 1 and 0, respectively. An expression is evaluated each time a state change occurs in the\n * animation trigger element.\n * The animation steps run when the expression evaluates to true.\n *\n * - A state-change string takes the form \"state1 => state2\", where each side is a defined animation\n * state, or an asterix (*) to refer to a dynamic start or end state.\n *   - The expression string can contain multiple comma-separated statements;\n * for example \"state1 => state2, state3 => state4\".\n *   - Special values `:enter` and `:leave` initiate a transition on the entry and exit states,\n * equivalent to  \"void => *\"  and \"* => void\".\n *   - Special values `:increment` and `:decrement` initiate a transition when a numeric value has\n * increased or decreased in value.\n * - A function is executed each time a state change occurs in the animation trigger element.\n * The animation steps run when the function returns true.\n *\n * @param steps One or more animation objects, as returned by the `animate()` or\n * `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the animation,\n * and additional developer-defined parameters. Provided values for additional parameters are used\n * as defaults, and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the transition data.\n *\n * @usageNotes\n * The template associated with a component binds an animation trigger to an element.\n *\n * ```HTML\n * <!-- somewhere inside of my-component-tpl.html -->\n * <div [@myAnimationTrigger]=\"myStatusExp\">...</div>\n * ```\n *\n * All transitions are defined within an animation trigger,\n * along with named states that the transitions change to and from.\n *\n * ```typescript\n * trigger(\"myAnimationTrigger\", [\n *  // define states\n *  state(\"on\", style({ background: \"green\" })),\n *  state(\"off\", style({ background: \"grey\" })),\n *  ...]\n * ```\n *\n * Note that when you call the `sequence()` function within a `{@link animations/group group()}`\n * or a `transition()` call, execution does not continue to the next instruction\n * until each of the inner animation steps have completed.\n *\n * ### Syntax examples\n *\n * The following examples define transitions between the two defined states (and default states),\n * using various options:\n *\n * ```typescript\n * // Transition occurs when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500))\n * // Run the same animation for both directions\n * transition(\"on <=> off\", animate(500))\n * // Define multiple state-change pairs separated by commas\n * transition(\"on => off, off => void\", animate(500))\n * ```\n *\n * ### Special values for state-change expressions\n *\n * - Catch-all state change for when an element is inserted into the page and the\n * destination state is unknown:\n *\n * ```typescript\n * transition(\"void => *\", [\n *  style({ opacity: 0 }),\n *  animate(500)\n *  ])\n * ```\n *\n * - Capture a state change between any states:\n *\n *  `transition(\"* => *\", animate(\"1s 0s\"))`\n *\n * - Entry and exit transitions:\n *\n * ```typescript\n * transition(\":enter\", [\n *   style({ opacity: 0 }),\n *   animate(500, style({ opacity: 1 }))\n *   ]),\n * transition(\":leave\", [\n *   animate(500, style({ opacity: 0 }))\n *   ])\n * ```\n *\n * - Use `:increment` and `:decrement` to initiate transitions:\n *\n * ```typescript\n * transition(\":increment\", group([\n *  query(':enter', [\n *     style({ left: '100%' }),\n *     animate('0.5s ease-out', style('*'))\n *   ]),\n *  query(':leave', [\n *     animate('0.5s ease-out', style({ left: '-100%' }))\n *  ])\n * ]))\n *\n * transition(\":decrement\", group([\n *  query(':enter', [\n *     style({ left: '100%' }),\n *     animate('0.5s ease-out', style('*'))\n *   ]),\n *  query(':leave', [\n *     animate('0.5s ease-out', style({ left: '-100%' }))\n *  ])\n * ]))\n * ```\n *\n * ### State-change functions\n *\n * Here is an example of a `fromState` specified as a state-change function that invokes an\n * animation when true:\n *\n * ```typescript\n * transition((fromState, toState) =>\n *  {\n *   return fromState == \"off\" && toState == \"on\";\n *  },\n *  animate(\"1s 0s\"))\n * ```\n *\n * ### Animating to the final state\n *\n * If the final step in a transition is a call to `animate()` that uses a timing value\n * with no style data, that step is automatically considered the final animation arc,\n * for the element to reach the final state. Angular automatically adds or removes\n * CSS styles to ensure that the element is in the correct final state.\n *\n * The following example defines a transition that starts by hiding the element,\n * then makes sure that it animates properly to whatever state is currently active for trigger:\n *\n * ```typescript\n * transition(\"void => *\", [\n *   style({ opacity: 0 }),\n *   animate(500)\n *  ])\n * ```\n * ### Boolean value matching\n * If a trigger binding value is a Boolean, it can be matched using a transition expression\n * that compares true and false or 1 and 0. For example:\n *\n * ```\n * // in the template\n * <div [@openClose]=\"open ? true : false\">...</div>\n * // in the component metadata\n * trigger('openClose', [\n *   state('true', style({ height: '*' })),\n *   state('false', style({ height: '0px' })),\n *   transition('false <=> true', animate(500))\n * ])\n * ```\n *\n * @publicApi\n **/\nexport function transition(\n    stateChangeExpr: string|\n    ((fromState: string, toState: string, element?: any, params?: {[key: string]: any}) => boolean),\n    steps: AnimationMetadata|AnimationMetadata[],\n    options: AnimationOptions|null = null): AnimationTransitionMetadata {\n  return {type: AnimationMetadataType.Transition, expr: stateChangeExpr, animation: steps, options};\n}\n\n/**\n * Produces a reusable animation that can be invoked in another animation or sequence,\n * by calling the `useAnimation()` function.\n *\n * @param steps One or more animation objects, as returned by the `animate()`\n * or `sequence()` function, that form a transformation from one state to another.\n * A sequence is used by default when you pass an array.\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional developer-defined parameters.\n * Provided values for additional parameters are used as defaults,\n * and override values can be passed to the caller on invocation.\n * @returns An object that encapsulates the animation data.\n *\n * @usageNotes\n * The following example defines a reusable animation, providing some default parameter\n * values.\n *\n * ```typescript\n * var fadeAnimation = animation([\n *   style({ opacity: '{{ start }}' }),\n *   animate('{{ time }}',\n *   style({ opacity: '{{ end }}'}))\n *   ],\n *   { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * The following invokes the defined animation with a call to `useAnimation()`,\n * passing in override parameter values.\n *\n * ```js\n * useAnimation(fadeAnimation, {\n *   params: {\n *     time: '2s',\n *     start: 1,\n *     end: 0\n *   }\n * })\n * ```\n *\n * If any of the passed-in parameter values are missing from this call,\n * the default values are used. If one or more parameter values are missing before a step is\n * animated, `useAnimation()` throws an error.\n *\n * @publicApi\n */\nexport function animation(\n    steps: AnimationMetadata|AnimationMetadata[],\n    options: AnimationOptions|null = null): AnimationReferenceMetadata {\n  return {type: AnimationMetadataType.Reference, animation: steps, options};\n}\n\n/**\n * Executes a queried inner animation element within an animation sequence.\n *\n * @param options An options object that can contain a delay value for the start of the\n * animation, and additional override values for developer-defined parameters.\n * @return An object that encapsulates the child animation data.\n *\n * @usageNotes\n * Each time an animation is triggered in Angular, the parent animation\n * has priority and any child animations are blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations, and run them using this function.\n *\n * Note that this feature is designed to be used with `query()` and it will only work\n * with animations that are assigned using the Angular animation library. CSS keyframes\n * and transitions are not handled by this API.\n *\n * @publicApi\n */\nexport function animateChild(options: AnimateChildOptions|null = null):\n    AnimationAnimateChildMetadata {\n  return {type: AnimationMetadataType.AnimateChild, options};\n}\n\n/**\n * Starts a reusable animation that is created using the `animation()` function.\n *\n * @param animation The reusable animation to start.\n * @param options An options object that can contain a delay value for the start of\n * the animation, and additional override values for developer-defined parameters.\n * @return An object that contains the animation parameters.\n *\n * @publicApi\n */\nexport function useAnimation(\n    animation: AnimationReferenceMetadata,\n    options: AnimationOptions|null = null): AnimationAnimateRefMetadata {\n  return {type: AnimationMetadataType.AnimateRef, animation, options};\n}\n\n/**\n * Finds one or more inner elements within the current element that is\n * being animated within a sequence. Use with `animate()`.\n *\n * @param selector The element to query, or a set of elements that contain Angular-specific\n * characteristics, specified with one or more of the following tokens.\n *  - `query(\":enter\")` or `query(\":leave\")` : Query for newly inserted/removed elements.\n *  - `query(\":animating\")` : Query all currently animating elements.\n *  - `query(\"@triggerName\")` : Query elements that contain an animation trigger.\n *  - `query(\"@*\")` : Query all elements that contain an animation triggers.\n *  - `query(\":self\")` : Include the current element into the animation sequence.\n *\n * @param animation One or more animation steps to apply to the queried element or elements.\n * An array is treated as an animation sequence.\n * @param options An options object. Use the 'limit' field to limit the total number of\n * items to collect.\n * @return An object that encapsulates the query data.\n *\n * @usageNotes\n * Tokens can be merged into a combined query selector string. For example:\n *\n * ```typescript\n *  query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * The `query()` function collects multiple elements and works internally by using\n * `element.querySelectorAll`. Use the `limit` field of an options object to limit\n * the total number of items to be collected. For example:\n *\n * ```js\n * query('div', [\n *   animate(...),\n *   animate(...)\n * ], { limit: 1 })\n * ```\n *\n * By default, throws an error when zero items are found. Set the\n * `optional` flag to ignore this error. For example:\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n *   animate(...),\n *   animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Usage Example\n *\n * The following example queries for inner elements and animates them\n * individually using `animate()`.\n *\n * ```typescript\n * @Component({\n *   selector: 'inner',\n *   template: `\n *     <div [@queryAnimation]=\"exp\">\n *       <h1>Title</h1>\n *       <div class=\"content\">\n *         Blah blah blah\n *       </div>\n *     </div>\n *   `,\n *   animations: [\n *    trigger('queryAnimation', [\n *      transition('* => goAnimate', [\n *        // hide the inner elements\n *        query('h1', style({ opacity: 0 })),\n *        query('.content', style({ opacity: 0 })),\n *\n *        // animate the inner elements in, one by one\n *        query('h1', animate(1000, style({ opacity: 1 }))),\n *        query('.content', animate(1000, style({ opacity: 1 }))),\n *      ])\n *    ])\n *  ]\n * })\n * class Cmp {\n *   exp = '';\n *\n *   goAnimate() {\n *     this.exp = 'goAnimate';\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport function query(\n    selector: string, animation: AnimationMetadata|AnimationMetadata[],\n    options: AnimationQueryOptions|null = null): AnimationQueryMetadata {\n  return {type: AnimationMetadataType.Query, selector, animation, options};\n}\n\n/**\n * Use within an animation `query()` call to issue a timing gap after\n * each queried item is animated.\n *\n * @param timings A delay value.\n * @param animation One ore more animation steps.\n * @returns An object that encapsulates the stagger data.\n *\n * @usageNotes\n * In the following example, a container element wraps a list of items stamped out\n * by an `ngFor`. The container element contains an animation trigger that will later be set\n * to query for each of the inner items.\n *\n * Each time items are added, the opacity fade-in animation runs,\n * and each removed item is faded out.\n * When either of these animations occur, the stagger effect is\n * applied after each item's animation is started.\n *\n * ```html\n * <!-- list.component.html -->\n * <button (click)=\"toggle()\">Show / Hide Items</button>\n * <hr />\n * <div [@listAnimation]=\"items.length\">\n *   <div *ngFor=\"let item of items\">\n *     {{ item }}\n *   </div>\n * </div>\n * ```\n *\n * Here is the component code:\n *\n * ```typescript\n * import {trigger, transition, style, animate, query, stagger} from '@angular/animations';\n * @Component({\n *   templateUrl: 'list.component.html',\n *   animations: [\n *     trigger('listAnimation', [\n *     ...\n *     ])\n *   ]\n * })\n * class ListComponent {\n *   items = [];\n *\n *   showItems() {\n *     this.items = [0,1,2,3,4];\n *   }\n *\n *   hideItems() {\n *     this.items = [];\n *   }\n *\n *   toggle() {\n *     this.items.length ? this.hideItems() : this.showItems();\n *    }\n *  }\n * ```\n *\n * Here is the animation trigger code:\n *\n * ```typescript\n * trigger('listAnimation', [\n *   transition('* => *', [ // each time the binding value changes\n *     query(':leave', [\n *       stagger(100, [\n *         animate('0.5s', style({ opacity: 0 }))\n *       ])\n *     ]),\n *     query(':enter', [\n *       style({ opacity: 0 }),\n *       stagger(100, [\n *         animate('0.5s', style({ opacity: 1 }))\n *       ])\n *     ])\n *   ])\n * ])\n * ```\n *\n * @publicApi\n */\nexport function stagger(timings: string|number, animation: AnimationMetadata|AnimationMetadata[]):\n    AnimationStaggerMetadata {\n  return {type: AnimationMetadataType.Stagger, timings, animation};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport function scheduleMicroTask(cb: () => any) {\n  Promise.resolve(null).then(cb);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {scheduleMicroTask} from '../util';\n\n/**\n * Provides programmatic control of a reusable animation sequence,\n * built using the `build()` method of `AnimationBuilder`. The `build()` method\n * returns a factory, whose `create()` method instantiates and initializes this interface.\n *\n * @see `AnimationBuilder`\n * @see `AnimationFactory`\n * @see `animate()`\n *\n * @publicApi\n */\nexport interface AnimationPlayer {\n  /**\n   * Provides a callback to invoke when the animation finishes.\n   * @param fn The callback function.\n   * @see `finish()`\n   */\n  onDone(fn: () => void): void;\n  /**\n   * Provides a callback to invoke when the animation starts.\n   * @param fn The callback function.\n   * @see `run()`\n   */\n  onStart(fn: () => void): void;\n  /**\n   * Provides a callback to invoke after the animation is destroyed.\n   * @param fn The callback function.\n   * @see `destroy()`\n   * @see `beforeDestroy()`\n   */\n  onDestroy(fn: () => void): void;\n  /**\n   * Initializes the animation.\n   */\n  init(): void;\n  /**\n   * Reports whether the animation has started.\n   * @returns True if the animation has started, false otherwise.\n   */\n  hasStarted(): boolean;\n  /**\n   * Runs the animation, invoking the `onStart()` callback.\n   */\n  play(): void;\n  /**\n   * Pauses the animation.\n   */\n  pause(): void;\n  /**\n   * Restarts the paused animation.\n   */\n  restart(): void;\n  /**\n   * Ends the animation, invoking the `onDone()` callback.\n   */\n  finish(): void;\n  /**\n   * Destroys the animation, after invoking the `beforeDestroy()` callback.\n   * Calls the `onDestroy()` callback when destruction is completed.\n   */\n  destroy(): void;\n  /**\n   * Resets the animation to its initial state.\n   */\n  reset(): void;\n  /**\n   * Sets the position of the animation.\n   * @param position A 0-based offset into the duration, in milliseconds.\n   */\n  setPosition(position: any /** TODO #9100 */): void;\n  /**\n   * Reports the current position of the animation.\n   * @returns A 0-based offset into the duration, in milliseconds.\n   */\n  getPosition(): number;\n  /**\n   * The parent of this player, if any.\n   */\n  parentPlayer: AnimationPlayer|null;\n  /**\n   * The total run time of the animation, in milliseconds.\n   */\n  readonly totalTime: number;\n  /**\n   * Provides a callback to invoke before the animation is destroyed.\n   */\n  beforeDestroy?: () => any;\n  /**\n   * @internal\n   * Internal\n   */\n  triggerCallback?: (phaseName: string) => void;\n  /**\n   * @internal\n   * Internal\n   */\n  disabled?: boolean;\n}\n\n/**\n * An empty programmatic controller for reusable animations.\n * Used internally when animations are disabled, to avoid\n * checking for the null case when an animation player is expected.\n *\n * @see `animate()`\n * @see `AnimationPlayer`\n * @see `GroupPlayer`\n *\n * @publicApi\n */\nexport class NoopAnimationPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n  private _started = false;\n  private _destroyed = false;\n  private _finished = false;\n  public parentPlayer: AnimationPlayer|null = null;\n  public readonly totalTime: number;\n  constructor(duration: number = 0, delay: number = 0) {\n    this.totalTime = duration + delay;\n  }\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n  onStart(fn: () => void): void {\n    this._onStartFns.push(fn);\n  }\n  onDone(fn: () => void): void {\n    this._onDoneFns.push(fn);\n  }\n  onDestroy(fn: () => void): void {\n    this._onDestroyFns.push(fn);\n  }\n  hasStarted(): boolean {\n    return this._started;\n  }\n  init(): void {}\n  play(): void {\n    if (!this.hasStarted()) {\n      this._onStart();\n      this.triggerMicrotask();\n    }\n    this._started = true;\n  }\n\n  /** @internal */\n  triggerMicrotask() {\n    scheduleMicroTask(() => this._onFinish());\n  }\n\n  private _onStart() {\n    this._onStartFns.forEach(fn => fn());\n    this._onStartFns = [];\n  }\n\n  pause(): void {}\n  restart(): void {}\n  finish(): void {\n    this._onFinish();\n  }\n  destroy(): void {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      if (!this.hasStarted()) {\n        this._onStart();\n      }\n      this.finish();\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n  reset(): void {}\n  setPosition(position: number): void {}\n  getPosition(): number {\n    return 0;\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {scheduleMicroTask} from '../util';\nimport {AnimationPlayer} from './animation_player';\n\n/**\n * A programmatic controller for a group of reusable animations.\n * Used internally to control animations.\n *\n * @see `AnimationPlayer`\n * @see `{@link animations/group group()}`\n *\n */\nexport class AnimationGroupPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _finished = false;\n  private _started = false;\n  private _destroyed = false;\n  private _onDestroyFns: Function[] = [];\n\n  public parentPlayer: AnimationPlayer|null = null;\n  public totalTime: number = 0;\n  public readonly players: AnimationPlayer[];\n\n  constructor(_players: AnimationPlayer[]) {\n    this.players = _players;\n    let doneCount = 0;\n    let destroyCount = 0;\n    let startCount = 0;\n    const total = this.players.length;\n\n    if (total == 0) {\n      scheduleMicroTask(() => this._onFinish());\n    } else {\n      this.players.forEach(player => {\n        player.onDone(() => {\n          if (++doneCount == total) {\n            this._onFinish();\n          }\n        });\n        player.onDestroy(() => {\n          if (++destroyCount == total) {\n            this._onDestroy();\n          }\n        });\n        player.onStart(() => {\n          if (++startCount == total) {\n            this._onStart();\n          }\n        });\n      });\n    }\n\n    this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0);\n  }\n\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n\n  init(): void {\n    this.players.forEach(player => player.init());\n  }\n\n  onStart(fn: () => void): void {\n    this._onStartFns.push(fn);\n  }\n\n  private _onStart() {\n    if (!this.hasStarted()) {\n      this._started = true;\n      this._onStartFns.forEach(fn => fn());\n      this._onStartFns = [];\n    }\n  }\n\n  onDone(fn: () => void): void {\n    this._onDoneFns.push(fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    this._onDestroyFns.push(fn);\n  }\n\n  hasStarted() {\n    return this._started;\n  }\n\n  play() {\n    if (!this.parentPlayer) {\n      this.init();\n    }\n    this._onStart();\n    this.players.forEach(player => player.play());\n  }\n\n  pause(): void {\n    this.players.forEach(player => player.pause());\n  }\n\n  restart(): void {\n    this.players.forEach(player => player.restart());\n  }\n\n  finish(): void {\n    this._onFinish();\n    this.players.forEach(player => player.finish());\n  }\n\n  destroy(): void {\n    this._onDestroy();\n  }\n\n  private _onDestroy() {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      this._onFinish();\n      this.players.forEach(player => player.destroy());\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n\n  reset(): void {\n    this.players.forEach(player => player.reset());\n    this._destroyed = false;\n    this._finished = false;\n    this._started = false;\n  }\n\n  setPosition(p: number): void {\n    const timeAtPosition = p * this.totalTime;\n    this.players.forEach(player => {\n      const position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n      player.setPosition(position);\n    });\n  }\n\n  getPosition(): number {\n    let min = 0;\n    this.players.forEach(player => {\n      const p = player.getPosition();\n      min = Math.min(p, min);\n    });\n    return min;\n  }\n\n  beforeDestroy(): void {\n    this.players.forEach(player => {\n      if (player.beforeDestroy) {\n        player.beforeDestroy();\n      }\n    });\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {AnimationGroupPlayer as ɵAnimationGroupPlayer} from './players/animation_group_player';\nexport const ɵPRE_STYLE = '!';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all animation APIs of the animation package.\n */\nexport {AnimationBuilder, AnimationFactory} from './animation_builder';\nexport {AnimationEvent} from './animation_event';\nexport {animate, animateChild, AnimateChildOptions, AnimateTimings, animation, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, AUTO_STYLE, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, ɵStyleData} from './animation_metadata';\nexport {AnimationPlayer, NoopAnimationPlayer} from './players/animation_player';\n\nexport * from './private_export';\n","import { Injectable, Renderer2, ElementRef } from '@angular/core';\n\n@Injectable()\nexport class NgxGalleryHelperService {\n  private swipeHandlers: Map<string, Function[]> = new Map<string, Function[]>();\n\n  constructor(private renderer: Renderer2) {}\n\n  manageSwipe(status: boolean, element: ElementRef, id: string, nextHandler: Function, prevHandler: Function): void {\n\n      const handlers = this.getSwipeHandlers(id);\n\n      // swipeleft and swiperight are available only if hammerjs is included\n      try {\n          if (status && !handlers) {\n              this.swipeHandlers.set(id, [\n                  this.renderer.listen(element.nativeElement, 'swipeleft', () => nextHandler()),\n                  this.renderer.listen(element.nativeElement, 'swiperight', () => prevHandler())\n              ]);\n          } else if (!status && handlers) {\n              handlers.map((handler) => handler());\n              this.removeSwipeHandlers(id);\n          }\n      } catch (e) {}\n  }\n\n  validateUrl(url: string): string {\n      if (url.replace) {\n          return url.replace(new RegExp(' ', 'g'), '%20')\n              .replace(new RegExp('\\'', 'g'), '%27');\n      } else {\n          return url;\n      }\n  }\n\n  getBackgroundUrl(image: string) {\n      return 'url(\\'' + this.validateUrl(image) + '\\')';\n  }\n\n  private getSwipeHandlers(id: string): Function[] | undefined {\n      return this.swipeHandlers.get(id);\n  }\n\n  private removeSwipeHandlers(id: string): void {\n      this.swipeHandlers.delete(id);\n  }\n}\n","export class NgxGalleryAnimation {\r\n    static Fade = 'fade';\r\n    static Slide = 'slide';\r\n    static Rotate = 'rotate';\r\n    static Zoom = 'zoom';\r\n}\r\n","export class NgxGalleryImageSize {\r\n    static Cover = 'cover';\r\n    static Contain = 'contain';\r\n}\r\n","export class NgxGalleryLayout {\r\n    static ThumbnailsTop = 'thumbnails-top';\r\n    static ThumbnailsBottom = 'thumbnails-bottom';\r\n}\r\n","export class NgxGalleryOrder {\r\n    static Column = 1;\r\n    static Row = 2;\r\n    static Page = 3;\r\n}\r\n","export interface INgxGalleryAction {\r\n    icon: string;\r\n    disabled?: boolean;\r\n    titleText?: string;\r\n\r\n    onClick: (event: Event, index: number) => void;\r\n}\r\n\r\nexport class NgxGalleryAction implements INgxGalleryAction {\r\n    icon: string;\r\n    disabled?: boolean;\r\n    titleText?: string;\r\n\r\n    onClick: (event: Event, index: number) => void;\r\n\r\n    constructor(action: INgxGalleryAction) {\r\n        this.icon = action.icon;\r\n        this.disabled = action.disabled ? action.disabled : false;\r\n        this.titleText = action.titleText ? action.titleText : '';\r\n\r\n        this.onClick = action.onClick;\r\n    }\r\n}\r\n","import { NgxGalleryAnimation } from './ngx-gallery-animation.model';\r\nimport { NgxGalleryImageSize } from './ngx-gallery-image-size.model';\r\nimport { NgxGalleryLayout } from './ngx-gallery-layout.model';\r\nimport { NgxGalleryOrder } from './ngx-gallery-order.model';\r\nimport { NgxGalleryAction } from './ngx-gallery-action.model';\r\n\r\nexport interface INgxGalleryOptions {\r\n    width?: string;\r\n    height?: string;\r\n    breakpoint?: number;\r\n    fullWidth?: boolean;\r\n    layout?: string;\r\n    startIndex?: number;\r\n    linkTarget?: string;\r\n    lazyLoading?: boolean;\r\n    image?: boolean;\r\n    imagePercent?: number;\r\n    imageArrows?: boolean;\r\n    imageArrowsAutoHide?: boolean;\r\n    imageSwipe?: boolean;\r\n    imageAnimation?: string;\r\n    imageSize?: string;\r\n    imageAutoPlay?: boolean;\r\n    imageAutoPlayInterval?: number;\r\n    imageAutoPlayPauseOnHover?: boolean;\r\n    imageInfinityMove?: boolean;\r\n    imageActions?: NgxGalleryAction[];\r\n    imageDescription?: boolean;\r\n    imageBullets?: boolean;\r\n    thumbnails?: boolean;\r\n    thumbnailsColumns?: number;\r\n    thumbnailsRows?: number;\r\n    thumbnailsPercent?: number;\r\n    thumbnailsMargin?: number;\r\n    thumbnailsArrows?: boolean;\r\n    thumbnailsArrowsAutoHide?: boolean;\r\n    thumbnailsSwipe?: boolean;\r\n    thumbnailsMoveSize?: number;\r\n    thumbnailsOrder?: NgxGalleryOrder;\r\n    thumbnailsRemainingCount?: boolean;\r\n    thumbnailsAsLinks?: boolean;\r\n    thumbnailsAutoHide?: boolean;\r\n    thumbnailMargin?: number;\r\n    thumbnailSize?: string;\r\n    thumbnailActions?: NgxGalleryAction[];\r\n    preview?: boolean;\r\n    previewDescription?: boolean;\r\n    previewArrows?: boolean;\r\n    previewArrowsAutoHide?: boolean;\r\n    previewSwipe?: boolean;\r\n    previewFullscreen?: boolean;\r\n    previewForceFullscreen?: boolean;\r\n    previewCloseOnClick?: boolean;\r\n    previewCloseOnEsc?: boolean;\r\n    previewKeyboardNavigation?: boolean;\r\n    previewAnimation?: boolean;\r\n    previewAutoPlay?: boolean;\r\n    previewAutoPlayInterval?: number;\r\n    previewAutoPlayPauseOnHover?: boolean;\r\n    previewInfinityMove?: boolean;\r\n    previewZoom?: boolean;\r\n    previewZoomStep?: number;\r\n    previewZoomMax?: number;\r\n    previewZoomMin?: number;\r\n    previewRotate?: boolean;\r\n    previewDownload?: boolean;\r\n    previewCustom?: (index: number) => void;\r\n    previewBullets?: boolean;\r\n    arrowPrevIcon?: string;\r\n    arrowNextIcon?: string;\r\n    closeIcon?: string;\r\n    fullscreenIcon?: string;\r\n    spinnerIcon?: string;\r\n    zoomInIcon?: string;\r\n    zoomOutIcon?: string;\r\n    rotateLeftIcon?: string;\r\n    rotateRightIcon?: string;\r\n    downloadIcon?: string;\r\n    actions?: NgxGalleryAction[];\r\n}\r\n\r\nexport class NgxGalleryOptions implements INgxGalleryOptions {\r\n    width?: string;\r\n    height?: string;\r\n    breakpoint?: number;\r\n    fullWidth?: boolean;\r\n    layout?: string;\r\n    startIndex?: number;\r\n    linkTarget?: string;\r\n    lazyLoading?: boolean;\r\n    image?: boolean;\r\n    imagePercent?: number;\r\n    imageArrows?: boolean;\r\n    imageArrowsAutoHide?: boolean;\r\n    imageSwipe?: boolean;\r\n    imageAnimation?: string;\r\n    imageSize?: string;\r\n    imageAutoPlay?: boolean;\r\n    imageAutoPlayInterval?: number;\r\n    imageAutoPlayPauseOnHover?: boolean;\r\n    imageInfinityMove?: boolean;\r\n    imageActions?: NgxGalleryAction[];\r\n    imageDescription?: boolean;\r\n    imageBullets?: boolean;\r\n    thumbnails?: boolean;\r\n    thumbnailsColumns?: number;\r\n    thumbnailsRows?: number;\r\n    thumbnailsPercent?: number;\r\n    thumbnailsMargin?: number;\r\n    thumbnailsArrows?: boolean;\r\n    thumbnailsArrowsAutoHide?: boolean;\r\n    thumbnailsSwipe?: boolean;\r\n    thumbnailsMoveSize?: number;\r\n    thumbnailsOrder?: NgxGalleryOrder;\r\n    thumbnailsRemainingCount?: boolean;\r\n    thumbnailsAsLinks?: boolean;\r\n    thumbnailsAutoHide?: boolean;\r\n    thumbnailMargin?: number;\r\n    thumbnailSize?: string;\r\n    thumbnailActions?: NgxGalleryAction[];\r\n    preview?: boolean;\r\n    previewDescription?: boolean;\r\n    previewArrows?: boolean;\r\n    previewArrowsAutoHide?: boolean;\r\n    previewSwipe?: boolean;\r\n    previewFullscreen?: boolean;\r\n    previewForceFullscreen?: boolean;\r\n    previewCloseOnClick?: boolean;\r\n    previewCloseOnEsc?: boolean;\r\n    previewKeyboardNavigation?: boolean;\r\n    previewAnimation?: boolean;\r\n    previewAutoPlay?: boolean;\r\n    previewAutoPlayInterval?: number;\r\n    previewAutoPlayPauseOnHover?: boolean;\r\n    previewInfinityMove?: boolean;\r\n    previewZoom?: boolean;\r\n    previewZoomStep?: number;\r\n    previewZoomMax?: number;\r\n    previewZoomMin?: number;\r\n    previewRotate?: boolean;\r\n    previewDownload?: boolean;\r\n    previewCustom?: (index: number) => void;\r\n    previewBullets?: boolean;\r\n    arrowPrevIcon?: string;\r\n    arrowNextIcon?: string;\r\n    closeIcon?: string;\r\n    fullscreenIcon?: string;\r\n    spinnerIcon?: string;\r\n    zoomInIcon?: string;\r\n    zoomOutIcon?: string;\r\n    rotateLeftIcon?: string;\r\n    rotateRightIcon?: string;\r\n    downloadIcon?: string;\r\n    actions?: NgxGalleryAction[];\r\n\r\n    constructor(obj: INgxGalleryOptions) {\r\n\r\n        const preventDefaults = obj.breakpoint === undefined ? false : true;\r\n\r\n        function use<T>(source: T, defaultValue: T): T {\r\n            return obj && (source !== undefined || preventDefaults) ? source : defaultValue;\r\n        }\r\n\r\n        this.breakpoint = use(obj.breakpoint, undefined);\r\n        this.width = use(obj.width, '500px');\r\n        this.height = use(obj.height, '400px');\r\n        this.fullWidth = use(obj.fullWidth, false);\r\n        this.layout = use(obj.layout, NgxGalleryLayout.ThumbnailsBottom);\r\n        this.startIndex = use(obj.startIndex, 0);\r\n        this.linkTarget = use(obj.linkTarget, '_blank');\r\n        this.lazyLoading = use(obj.lazyLoading, true);\r\n\r\n        this.image = use(obj.image, true);\r\n        this.imagePercent = use(obj.imagePercent, 75);\r\n        this.imageArrows = use(obj.imageArrows, true);\r\n        this.imageArrowsAutoHide = use(obj.imageArrowsAutoHide, false);\r\n        this.imageSwipe = use(obj.imageSwipe, false);\r\n        this.imageAnimation = use(obj.imageAnimation, NgxGalleryAnimation.Fade);\r\n        this.imageSize = use(obj.imageSize, NgxGalleryImageSize.Cover);\r\n        this.imageAutoPlay = use(obj.imageAutoPlay, false);\r\n        this.imageAutoPlayInterval = use(obj.imageAutoPlayInterval, 2000);\r\n        this.imageAutoPlayPauseOnHover = use(obj.imageAutoPlayPauseOnHover, false);\r\n        this.imageInfinityMove = use(obj.imageInfinityMove, false);\r\n        if (obj && obj.imageActions && obj.imageActions.length) {\r\n            obj.imageActions = obj.imageActions.map(action => new NgxGalleryAction(action));\r\n        }\r\n        this.imageActions = use(obj.imageActions, []);\r\n        this.imageDescription = use(obj.imageDescription, false);\r\n        this.imageBullets = use(obj.imageBullets, false);\r\n\r\n        this.thumbnails = use(obj.thumbnails, true);\r\n        this.thumbnailsColumns = use(obj.thumbnailsColumns, 4);\r\n        this.thumbnailsRows = use(obj.thumbnailsRows, 1);\r\n        this.thumbnailsPercent = use(obj.thumbnailsPercent, 25);\r\n        this.thumbnailsMargin = use(obj.thumbnailsMargin, 10);\r\n        this.thumbnailsArrows = use(obj.thumbnailsArrows, true);\r\n        this.thumbnailsArrowsAutoHide = use(obj.thumbnailsArrowsAutoHide, false);\r\n        this.thumbnailsSwipe = use(obj.thumbnailsSwipe, false);\r\n        this.thumbnailsMoveSize = use(obj.thumbnailsMoveSize, 1);\r\n        this.thumbnailsOrder = use(obj.thumbnailsOrder, NgxGalleryOrder.Column);\r\n        this.thumbnailsRemainingCount = use(obj.thumbnailsRemainingCount, false);\r\n        this.thumbnailsAsLinks = use(obj.thumbnailsAsLinks, false);\r\n        this.thumbnailsAutoHide = use(obj.thumbnailsAutoHide, false);\r\n        this.thumbnailMargin = use(obj.thumbnailMargin, 10);\r\n        this.thumbnailSize = use(obj.thumbnailSize, NgxGalleryImageSize.Cover);\r\n        if (obj && obj.thumbnailActions && obj.thumbnailActions.length) {\r\n            obj.thumbnailActions = obj.thumbnailActions.map(action => new NgxGalleryAction(action));\r\n        }\r\n        this.thumbnailActions = use(obj.thumbnailActions, []);\r\n\r\n        this.preview = use(obj.preview, true);\r\n        this.previewDescription = use(obj.previewDescription, true);\r\n        this.previewArrows = use(obj.previewArrows, true);\r\n        this.previewArrowsAutoHide = use(obj.previewArrowsAutoHide, false);\r\n        this.previewSwipe = use(obj.previewSwipe, false);\r\n        this.previewFullscreen = use(obj.previewFullscreen, false);\r\n        this.previewForceFullscreen = use(obj.previewForceFullscreen, false);\r\n        this.previewCloseOnClick = use(obj.previewCloseOnClick, false);\r\n        this.previewCloseOnEsc = use(obj.previewCloseOnEsc, false);\r\n        this.previewKeyboardNavigation = use(obj.previewKeyboardNavigation, false);\r\n        this.previewAnimation = use(obj.previewAnimation, true);\r\n        this.previewAutoPlay = use(obj.previewAutoPlay, false);\r\n        this.previewAutoPlayInterval = use(obj.previewAutoPlayInterval, 2000);\r\n        this.previewAutoPlayPauseOnHover = use(obj.previewAutoPlayPauseOnHover, false);\r\n        this.previewInfinityMove = use(obj.previewInfinityMove, false);\r\n        this.previewZoom = use(obj.previewZoom, false);\r\n        this.previewZoomStep = use(obj.previewZoomStep, 0.1);\r\n        this.previewZoomMax = use(obj.previewZoomMax, 2);\r\n        this.previewZoomMin = use(obj.previewZoomMin, 0.5);\r\n        this.previewRotate = use(obj.previewRotate, false);\r\n        this.previewDownload = use(obj.previewDownload, false);\r\n        this.previewCustom = use(obj.previewCustom, undefined);\r\n        this.previewBullets = use(obj.previewBullets, false);\r\n\r\n        this.arrowPrevIcon = use(obj.arrowPrevIcon, 'fa fa-arrow-circle-left');\r\n        this.arrowNextIcon = use(obj.arrowNextIcon, 'fa fa-arrow-circle-right');\r\n        this.closeIcon = use(obj.closeIcon, 'fa fa-times-circle');\r\n        this.fullscreenIcon = use(obj.fullscreenIcon, 'fa fa-arrows-alt');\r\n        this.spinnerIcon = use(obj.spinnerIcon, 'fa fa-spinner fa-pulse fa-3x fa-fw');\r\n        this.zoomInIcon = use(obj.zoomInIcon, 'fa fa-search-plus');\r\n        this.zoomOutIcon = use(obj.zoomOutIcon, 'fa fa-search-minus');\r\n        this.rotateLeftIcon = use(obj.rotateLeftIcon, 'fa fa-undo');\r\n        this.rotateRightIcon = use(obj.rotateRightIcon, 'fa fa-repeat');\r\n        this.downloadIcon = use(obj.downloadIcon, 'fa fa-arrow-circle-down');\r\n\r\n        if (obj && obj.actions && obj.actions.length) {\r\n            obj.actions = obj.actions.map(action => new NgxGalleryAction(action));\r\n        }\r\n        this.actions = use(obj.actions, []);\r\n    }\r\n}\r\n","import { SafeResourceUrl } from '@angular/platform-browser';\r\n\r\nexport interface INgxGalleryOrderedImage {\r\n    src: string | SafeResourceUrl;\r\n    index: number;\r\n}\r\n\r\nexport class NgxGalleryOrderedImage implements INgxGalleryOrderedImage {\r\n    src: string | SafeResourceUrl;\r\n    index: number;\r\n\r\n    constructor(obj: INgxGalleryOrderedImage) {\r\n        this.src = obj.src;\r\n        this.index = obj.index;\r\n    }\r\n}\r\n","import { Component, OnInit, Input, OnChanges, Output, EventEmitter, ViewChild, ElementRef, ChangeDetectorRef, SimpleChanges, HostListener, Renderer2 } from '@angular/core';\nimport { SafeResourceUrl, SafeUrl, DomSanitizer, SafeStyle } from '@angular/platform-browser';\nimport { NgxGalleryAction } from '../ngx-gallery-action.model';\nimport { NgxGalleryHelperService } from '../ngx-gallery-helper.service';\n\n@Component({\n  selector: 'ngx-gallery-preview',\n  templateUrl: './ngx-gallery-preview.component.html',\n  styleUrls: ['./ngx-gallery-preview.component.scss']\n})\nexport class NgxGalleryPreviewComponent implements OnInit, OnChanges {\n\n  src: SafeUrl;\n  srcIndex: number;\n  description: string;\n  showSpinner = false;\n  positionLeft = 0;\n  positionTop = 0;\n  zoomValue = 1;\n  loading = false;\n  rotateValue = 0;\n  index = 0;\n\n  @Input() images: string[] | SafeResourceUrl[];\n  @Input() descriptions: string[];\n  @Input() showDescription: boolean;\n  @Input() arrows: boolean;\n  @Input() arrowsAutoHide: boolean;\n  @Input() swipe: boolean;\n  @Input() fullscreen: boolean;\n  @Input() forceFullscreen: boolean;\n  @Input() closeOnClick: boolean;\n  @Input() closeOnEsc: boolean;\n  @Input() keyboardNavigation: boolean;\n  @Input() arrowPrevIcon: string;\n  @Input() arrowNextIcon: string;\n  @Input() closeIcon: string;\n  @Input() fullscreenIcon: string;\n  @Input() spinnerIcon: string;\n  @Input() autoPlay: boolean;\n  @Input() autoPlayInterval: number;\n  @Input() autoPlayPauseOnHover: boolean;\n  @Input() infinityMove: boolean;\n  @Input() zoom: boolean;\n  @Input() zoomStep: number;\n  @Input() zoomMax: number;\n  @Input() zoomMin: number;\n  @Input() zoomInIcon: string;\n  @Input() zoomOutIcon: string;\n  @Input() animation: boolean;\n  @Input() actions: NgxGalleryAction[];\n  @Input() rotate: boolean;\n  @Input() rotateLeftIcon: string;\n  @Input() rotateRightIcon: string;\n  @Input() download: boolean;\n  @Input() downloadIcon: string;\n  @Input() bullets: string;\n\n  @Output() onOpen = new EventEmitter();\n  @Output() onClose = new EventEmitter();\n  @Output() onActiveChange = new EventEmitter<number>();\n\n  @ViewChild('previewImage') previewImage: ElementRef;\n\n  private isOpen = false;\n  private timer;\n  private initialX = 0;\n  private initialY = 0;\n  private initialLeft = 0;\n  private initialTop = 0;\n  private isMove = false;\n\n  private keyDownListener: Function;\n\n  constructor(private sanitization: DomSanitizer, private elementRef: ElementRef,\n      private helperService: NgxGalleryHelperService, private renderer: Renderer2,\n      private changeDetectorRef: ChangeDetectorRef) {}\n\n  ngOnInit(): void {\n      if (this.arrows && this.arrowsAutoHide) {\n          this.arrows = false;\n      }\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n      if (changes['swipe']) {\n          this.helperService.manageSwipe(this.swipe, this.elementRef,\n          'preview', () => this.showNext(), () => this.showPrev());\n      }\n  }\n\n  ngOnDestroy() {\n      if (this.keyDownListener) {\n          this.keyDownListener();\n      }\n  }\n\n  @HostListener('mouseenter') onMouseEnter() {\n      if (this.arrowsAutoHide && !this.arrows) {\n          this.arrows = true;\n      }\n  }\n\n  @HostListener('mouseleave') onMouseLeave() {\n      if (this.arrowsAutoHide && this.arrows) {\n          this.arrows = false;\n      }\n  }\n\n  onKeyDown(e) {\n      if (this.isOpen) {\n          if (this.keyboardNavigation) {\n              if (this.isKeyboardPrev(e)) {\n                  this.showPrev();\n              } else if (this.isKeyboardNext(e)) {\n                  this.showNext();\n              }\n          }\n          if (this.closeOnEsc && this.isKeyboardEsc(e)) {\n              this.close();\n          }\n      }\n  }\n\n  open(index: number): void {\n      this.onOpen.emit();\n\n      this.index = index;\n      this.isOpen = true;\n      this.show(true);\n\n      if (this.forceFullscreen) {\n          this.manageFullscreen();\n      }\n\n      this.keyDownListener = this.renderer.listen(\"window\", \"keydown\", (e) => this.onKeyDown(e));\n  }\n\n  close(): void {\n      this.isOpen = false;\n      this.closeFullscreen();\n      this.onClose.emit();\n\n      this.stopAutoPlay();\n\n      if (this.keyDownListener) {\n          this.keyDownListener();\n      }\n  }\n\n  imageMouseEnter(): void {\n      if (this.autoPlay && this.autoPlayPauseOnHover) {\n          this.stopAutoPlay();\n      }\n  }\n\n  imageMouseLeave(): void {\n      if (this.autoPlay && this.autoPlayPauseOnHover) {\n          this.startAutoPlay();\n      }\n  }\n\n  startAutoPlay(): void {\n      if (this.autoPlay) {\n          this.stopAutoPlay();\n\n          this.timer = setTimeout(() => {\n              if (!this.showNext()) {\n                  this.index = -1;\n                  this.showNext();\n              }\n          }, this.autoPlayInterval);\n      }\n  }\n\n  stopAutoPlay(): void {\n      if (this.timer) {\n          clearTimeout(this.timer);\n      }\n  }\n\n  showAtIndex(index: number): void {\n      this.index = index;\n      this.show();\n  }\n\n  showNext(): boolean {\n      if (this.canShowNext()) {\n          this.index++;\n\n          if (this.index === this.images.length) {\n              this.index = 0;\n          }\n\n          this.show();\n          return true;\n      } else {\n          return false;\n      }\n  }\n\n  showPrev(): void {\n      if (this.canShowPrev()) {\n          this.index--;\n\n          if (this.index < 0) {\n              this.index = this.images.length - 1;\n          }\n\n          this.show();\n      }\n  }\n\n  canShowNext(): boolean {\n      if (this.loading) {\n          return false;\n      } else if (this.images) {\n          return this.infinityMove || this.index < this.images.length - 1 ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  canShowPrev(): boolean {\n      if (this.loading) {\n          return false;\n      } else if (this.images) {\n          return this.infinityMove || this.index > 0 ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  manageFullscreen(): void {\n      if (this.fullscreen || this.forceFullscreen) {\n          const doc = <any>document;\n\n          if (!doc.fullscreenElement && !doc.mozFullScreenElement\n              && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {\n              this.openFullscreen();\n          } else {\n              this.closeFullscreen();\n          }\n      }\n  }\n\n  getSafeUrl(image: string): SafeUrl {\n      return image.substr(0, 10) === 'data:image' ?\n          image : this.sanitization.bypassSecurityTrustUrl(image);\n  }\n\n  zoomIn(): void {\n      if (this.canZoomIn()) {\n          this.zoomValue += this.zoomStep;\n\n          if (this.zoomValue > this.zoomMax) {\n              this.zoomValue = this.zoomMax;\n          }\n      }\n  }\n\n  zoomOut(): void {\n      if (this.canZoomOut()) {\n          this.zoomValue -= this.zoomStep;\n\n          if (this.zoomValue < this.zoomMin) {\n              this.zoomValue = this.zoomMin;\n          }\n\n          if (this.zoomValue <= 1) {\n              this.resetPosition()\n          }\n      }\n  }\n\n  rotateLeft(): void {\n      this.rotateValue -= 90;\n  }\n\n  rotateRight(): void {\n      this.rotateValue += 90;\n  }\n\n  getTransform(): SafeStyle {\n      return this.sanitization.bypassSecurityTrustStyle('scale(' + this.zoomValue + ') rotate(' + this.rotateValue + 'deg)');\n  }\n\n  canZoomIn(): boolean {\n      return this.zoomValue < this.zoomMax ? true : false;\n  }\n\n  canZoomOut(): boolean {\n      return this.zoomValue > this.zoomMin ? true : false;\n  }\n\n  canDragOnZoom() {\n      return this.zoom && this.zoomValue > 1;\n  }\n\n  mouseDownHandler(e): void {\n      if (this.canDragOnZoom()) {\n          this.initialX = this.getClientX(e);\n          this.initialY = this.getClientY(e);\n          this.initialLeft = this.positionLeft;\n          this.initialTop = this.positionTop;\n          this.isMove = true;\n\n          e.preventDefault();\n      }\n  }\n\n  mouseUpHandler(e): void {\n      this.isMove = false;\n  }\n\n  mouseMoveHandler(e) {\n      if (this.isMove) {\n          this.positionLeft = this.initialLeft + (this.getClientX(e) - this.initialX);\n          this.positionTop = this.initialTop + (this.getClientY(e) - this.initialY);\n      }\n  }\n\n  private getClientX(e): number {\n      return e.touches && e.touches.length ? e.touches[0].clientX : e.clientX;\n  }\n\n  private getClientY(e): number {\n      return e.touches && e.touches.length ? e.touches[0].clientY : e.clientY;\n  }\n\n  private resetPosition() {\n      if (this.zoom) {\n          this.positionLeft = 0;\n          this.positionTop = 0;\n      }\n  }\n\n  private isKeyboardNext(e): boolean {\n      return e.keyCode === 39 ? true : false;\n  }\n\n  private isKeyboardPrev(e): boolean {\n      return e.keyCode === 37 ? true : false;\n  }\n\n  private isKeyboardEsc(e): boolean {\n      return e.keyCode === 27 ? true : false;\n  }\n\n  private openFullscreen(): void {\n      const element = <any>document.documentElement;\n\n      if (element.requestFullscreen) {\n          element.requestFullscreen();\n      } else if (element.msRequestFullscreen) {\n          element.msRequestFullscreen();\n      } else if (element.mozRequestFullScreen) {\n          element.mozRequestFullScreen();\n      } else if (element.webkitRequestFullscreen) {\n          element.webkitRequestFullscreen();\n      }\n  }\n\n  private closeFullscreen(): void {\n      if (this.isFullscreen()) {\n          const doc = <any>document;\n\n          if (doc.exitFullscreen) {\n              doc.exitFullscreen();\n          } else if (doc.msExitFullscreen) {\n              doc.msExitFullscreen();\n          } else if (doc.mozCancelFullScreen) {\n              doc.mozCancelFullScreen();\n          } else if (doc.webkitExitFullscreen) {\n              doc.webkitExitFullscreen();\n          }\n      }\n  }\n\n  private isFullscreen() {\n      const doc = <any>document;\n\n      return doc.fullscreenElement || doc.webkitFullscreenElement\n          || doc.mozFullScreenElement || doc.msFullscreenElement;\n  }\n\n\n\n  private show(first = false) {\n      this.loading = true;\n      this.stopAutoPlay();\n\n      this.onActiveChange.emit(this.index);\n\n      if (first || !this.animation) {\n          this._show();\n      } else {\n          setTimeout(() => this._show(), 600);\n      }\n  }\n\n  private _show() {\n      this.zoomValue = 1;\n      this.rotateValue = 0;\n      this.resetPosition();\n\n      this.src = this.getSafeUrl(<string>this.images[this.index]);\n      this.srcIndex = this.index;\n      this.description = this.descriptions[this.index];\n      this.changeDetectorRef.markForCheck();\n\n      setTimeout(() => {\n          if (this.isLoaded(this.previewImage.nativeElement)) {\n              this.loading = false;\n              this.startAutoPlay();\n              this.changeDetectorRef.markForCheck();\n          } else {\n              setTimeout(() => {\n                  if (this.loading) {\n                      this.showSpinner = true;\n                      this.changeDetectorRef.markForCheck();\n                  }\n              })\n\n              this.previewImage.nativeElement.onload = () => {\n                  this.loading = false;\n                  this.showSpinner = false;\n                  this.previewImage.nativeElement.onload = null;\n                  this.startAutoPlay();\n                  this.changeDetectorRef.markForCheck();\n              }\n          }\n      })\n  }\n\n  private isLoaded(img): boolean {\n      if (!img.complete) {\n          return false;\n      }\n\n      if (typeof img.naturalWidth !== 'undefined' && img.naturalWidth === 0) {\n          return false;\n      }\n\n      return true;\n  }\n\n}","import { Component, OnInit, OnChanges, Input, Output, EventEmitter, ElementRef, SimpleChanges, HostListener } from '@angular/core';\nimport { NgxGalleryOrderedImage } from '../ngx-gallery-ordered-image.model';\nimport { NgxGalleryAction } from '../ngx-gallery-action.model';\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser';\nimport { NgxGalleryHelperService } from '../ngx-gallery-helper.service';\nimport { NgxGalleryAnimation } from '../ngx-gallery-animation.model';\n\n@Component({\n  selector: 'ngx-gallery-image',\n  templateUrl: './ngx-gallery-image.component.html',\n  styleUrls: ['./ngx-gallery-image.component.scss']\n})\nexport class NgxGalleryImageComponent implements OnInit, OnChanges {\n  @Input() images: NgxGalleryOrderedImage[];\n  @Input() clickable: boolean;\n  @Input() selectedIndex: number;\n  @Input() arrows: boolean;\n  @Input() arrowsAutoHide: boolean;\n  @Input() swipe: boolean;\n  @Input() animation: string;\n  @Input() size: string;\n  @Input() arrowPrevIcon: string;\n  @Input() arrowNextIcon: string;\n  @Input() autoPlay: boolean;\n  @Input() autoPlayInterval: number;\n  @Input() autoPlayPauseOnHover: boolean;\n  @Input() infinityMove: boolean;\n  @Input() lazyLoading: boolean;\n  @Input() actions: NgxGalleryAction[];\n  @Input() descriptions: string[];\n  @Input() showDescription: boolean;\n  @Input() bullets: boolean;\n\n  @Output() onClick = new EventEmitter();\n  @Output() onActiveChange = new EventEmitter();\n\n  canChangeImage = true;\n\n  private timer;\n\n  constructor(private sanitization: DomSanitizer,\n      private elementRef: ElementRef, private helperService: NgxGalleryHelperService) {}\n\n  ngOnInit(): void {\n      if (this.arrows && this.arrowsAutoHide) {\n          this.arrows = false;\n      }\n\n      if (this.autoPlay) {\n          this.startAutoPlay();\n      }\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n      if (changes['swipe']) {\n          this.helperService.manageSwipe(this.swipe, this.elementRef, 'image', () => this.showNext(), () => this.showPrev());\n      }\n  }\n\n  @HostListener('mouseenter') onMouseEnter() {\n      if (this.arrowsAutoHide && !this.arrows) {\n          this.arrows = true;\n      }\n\n      if (this.autoPlay && this.autoPlayPauseOnHover) {\n          this.stopAutoPlay();\n      }\n  }\n\n  @HostListener('mouseleave') onMouseLeave() {\n      if (this.arrowsAutoHide && this.arrows) {\n          this.arrows = false;\n      }\n\n      if (this.autoPlay && this.autoPlayPauseOnHover) {\n          this.startAutoPlay();\n      }\n  }\n\n  reset(index: number): void {\n      this.selectedIndex = index;\n  }\n\n  getImages(): NgxGalleryOrderedImage[] {\n      if (!this.images) {\n          return [];\n      }\n\n      if (this.lazyLoading) {\n          let indexes = [this.selectedIndex];\n          let prevIndex = this.selectedIndex - 1;\n\n          if (prevIndex === -1 && this.infinityMove) {\n              indexes.push(this.images.length - 1)\n          } else if (prevIndex >= 0) {\n              indexes.push(prevIndex);\n          }\n\n          let nextIndex = this.selectedIndex + 1;\n\n          if (nextIndex == this.images.length && this.infinityMove) {\n              indexes.push(0);\n          } else if (nextIndex < this.images.length) {\n              indexes.push(nextIndex);\n          }\n\n          return this.images.filter((img, i) => indexes.indexOf(i) != -1);\n      } else {\n          return this.images;\n      }\n  }\n\n  startAutoPlay(): void {\n      this.stopAutoPlay();\n\n      this.timer = setInterval(() => {\n          if (!this.showNext()) {\n              this.selectedIndex = -1;\n              this.showNext();\n          }\n      }, this.autoPlayInterval);\n  }\n\n  stopAutoPlay() {\n      if (this.timer) {\n          clearInterval(this.timer);\n      }\n  }\n\n  handleClick(event: Event, index: number): void {\n      if (this.clickable) {\n          this.onClick.emit(index);\n\n          event.stopPropagation();\n          event.preventDefault();\n      }\n  }\n\n  show(index: number) {\n      this.selectedIndex = index;\n      this.onActiveChange.emit(this.selectedIndex);\n      this.setChangeTimeout();\n  }\n\n  showNext(): boolean {\n      if (this.canShowNext() && this.canChangeImage) {\n          this.selectedIndex++;\n\n          if (this.selectedIndex === this.images.length) {\n              this.selectedIndex = 0;\n          }\n\n          this.onActiveChange.emit(this.selectedIndex);\n          this.setChangeTimeout();\n\n          return true;\n      } else {\n          return false;\n      }\n  }\n\n  showPrev(): void {\n      if (this.canShowPrev() && this.canChangeImage) {\n          this.selectedIndex--;\n\n          if (this.selectedIndex < 0) {\n              this.selectedIndex = this.images.length - 1;\n          }\n\n          this.onActiveChange.emit(this.selectedIndex);\n          this.setChangeTimeout();\n      }\n  }\n\n  setChangeTimeout() {\n      this.canChangeImage = false;\n      let timeout = 1000;\n\n      if (this.animation === NgxGalleryAnimation.Slide\n          || this.animation === NgxGalleryAnimation.Fade) {\n              timeout = 500;\n      }\n\n      setTimeout(() => {\n          this.canChangeImage = true;\n      }, timeout);\n  }\n\n  canShowNext(): boolean {\n      if (this.images) {\n          return this.infinityMove || this.selectedIndex < this.images.length - 1\n              ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  canShowPrev(): boolean {\n      if (this.images) {\n          return this.infinityMove || this.selectedIndex > 0 ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  getSafeUrl(image: string): SafeStyle {\n      return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image));\n  }\n}\n","import { Component, OnChanges, Input, Output, EventEmitter, ElementRef, SimpleChanges, HostListener } from '@angular/core';\nimport { SafeResourceUrl, DomSanitizer, SafeStyle } from '@angular/platform-browser';\nimport { NgxGalleryAction } from '../ngx-gallery-action.model';\nimport { NgxGalleryHelperService } from '../ngx-gallery-helper.service';\nimport { NgxGalleryOrder } from '../ngx-gallery-order.model';\n\n@Component({\n  selector: 'ngx-gallery-thumbnails',\n  templateUrl: './ngx-gallery-thumbnails.component.html',\n  styleUrls: ['./ngx-gallery-thumbnails.component.scss']\n})\nexport class NgxGalleryThumbnailsComponent implements OnChanges {\n\n  thumbnailsLeft: string;\n  thumbnailsMarginLeft: string;\n  mouseenter: boolean;\n  remainingCountValue: number;\n\n  minStopIndex = 0;\n\n  @Input() images: string[] | SafeResourceUrl[];\n  @Input() links: string[];\n  @Input() labels: string[];\n  @Input() linkTarget: string;\n  @Input() columns: number;\n  @Input() rows: number;\n  @Input() arrows: boolean;\n  @Input() arrowsAutoHide: boolean;\n  @Input() margin: number;\n  @Input() selectedIndex: number;\n  @Input() clickable: boolean;\n  @Input() swipe: boolean;\n  @Input() size: string;\n  @Input() arrowPrevIcon: string;\n  @Input() arrowNextIcon: string;\n  @Input() moveSize: number;\n  @Input() order: number;\n  @Input() remainingCount: boolean;\n  @Input() lazyLoading: boolean;\n  @Input() actions: NgxGalleryAction[];\n\n  @Output() onActiveChange = new EventEmitter();\n\n  private index = 0;\n\n  constructor(private sanitization: DomSanitizer, private elementRef: ElementRef,\n      private helperService: NgxGalleryHelperService) {}\n\n  ngOnChanges(changes: SimpleChanges): void {\n      if (changes['selectedIndex']) {\n          this.validateIndex();\n      }\n\n      if (changes['swipe']) {\n          this.helperService.manageSwipe(this.swipe, this.elementRef,\n          'thumbnails', () => this.moveRight(), () => this.moveLeft());\n      }\n\n      if (this.images) {\n          this.remainingCountValue = this.images.length - (this.rows * this.columns);\n      }\n  }\n\n  @HostListener('mouseenter') onMouseEnter() {\n      this.mouseenter = true;\n  }\n\n  @HostListener('mouseleave') onMouseLeave() {\n      this.mouseenter = false;\n  }\n\n  reset(index: number): void {\n      this.selectedIndex = index;\n      this.setDefaultPosition();\n\n      this.index = 0;\n      this.validateIndex();\n  }\n\n  getImages(): string[] | SafeResourceUrl[] {\n      if (!this.images) {\n          return [];\n      }\n\n      if (this.remainingCount) {\n          return this.images.slice(0, this.rows * this.columns);\n      } \n      else if (this.lazyLoading && this.order != NgxGalleryOrder.Row) {\n          let stopIndex = 0;\n\n          if (this.order === NgxGalleryOrder.Column) {\n              stopIndex = (this.index + this.columns + this.moveSize) * this.rows;\n          }\n          else if (this.order === NgxGalleryOrder.Page) {\n              stopIndex = this.index + ((this.columns * this.rows) * 2);\n          }\n\n          if (stopIndex <= this.minStopIndex) {\n              stopIndex = this.minStopIndex;\n          } else {\n              this.minStopIndex = stopIndex;\n          }\n\n          return this.images.slice(0, stopIndex);\n      } \n      else {\n          return this.images;\n      }\n  }\n\n  handleClick(event: Event, index: number): void {\n      if (!this.hasLink(index)) {\n          this.selectedIndex = index;\n          this.onActiveChange.emit(index);\n\n          event.stopPropagation();\n          event.preventDefault();\n      }\n  }\n\n  hasLink(index: number): boolean {\n      if (this.links && this.links.length && this.links[index]) return true;\n  }\n\n  moveRight(): void {\n      if (this.canMoveRight()) {\n          this.index += this.moveSize;\n          let maxIndex = this.getMaxIndex() - this.columns;\n\n          if (this.index > maxIndex) {\n              this.index = maxIndex;\n          }\n\n          this.setThumbnailsPosition();\n      }\n  }\n\n  moveLeft(): void {\n      if (this.canMoveLeft()) {\n          this.index -= this.moveSize;\n\n          if (this.index < 0) {\n              this.index = 0;\n          }\n\n          this.setThumbnailsPosition();\n      }\n  }\n\n  canMoveRight(): boolean {\n      return this.index + this.columns < this.getMaxIndex() ? true : false;\n  }\n\n  canMoveLeft(): boolean {\n      return this.index !== 0 ? true : false;\n  }\n\n  getThumbnailLeft(index: number): SafeStyle {\n      let calculatedIndex;\n\n      if (this.order === NgxGalleryOrder.Column) {\n          calculatedIndex = Math.floor(index / this.rows);\n      }\n      else if (this.order === NgxGalleryOrder.Page) {\n          calculatedIndex = (index % this.columns) + (Math.floor(index / (this.rows * this.columns)) * this.columns);\n      }\n      else if (this.order == NgxGalleryOrder.Row && this.remainingCount) {\n          calculatedIndex = index % this.columns;\n      }\n      else {\n          calculatedIndex = index % Math.ceil(this.images.length / this.rows);\n      }\n\n      return this.getThumbnailPosition(calculatedIndex, this.columns);\n  }\n\n  getThumbnailTop(index: number): SafeStyle {\n      let calculatedIndex;\n\n      if (this.order === NgxGalleryOrder.Column) {\n          calculatedIndex = index % this.rows;\n      }\n      else if (this.order === NgxGalleryOrder.Page) {\n          calculatedIndex = Math.floor(index / this.columns) - (Math.floor(index / (this.rows * this.columns)) * this.rows);\n      }\n      else if (this.order == NgxGalleryOrder.Row && this.remainingCount) {\n          calculatedIndex = Math.floor(index / this.columns);\n      }\n      else {\n          calculatedIndex = Math.floor(index / Math.ceil(this.images.length / this.rows));\n      }\n\n      return this.getThumbnailPosition(calculatedIndex, this.rows);\n  }\n\n  getThumbnailWidth(): SafeStyle {\n      return this.getThumbnailDimension(this.columns);\n  }\n\n  getThumbnailHeight(): SafeStyle {\n      return this.getThumbnailDimension(this.rows);\n  }\n\n  setThumbnailsPosition(): void {\n      this.thumbnailsLeft = - ((100 / this.columns) * this.index) + '%'\n\n      this.thumbnailsMarginLeft = - ((this.margin - (((this.columns - 1)\n      * this.margin) / this.columns)) * this.index) + 'px';\n  }\n\n  setDefaultPosition(): void {\n      this.thumbnailsLeft = '0px';\n      this.thumbnailsMarginLeft = '0px';\n  }\n\n  canShowArrows(): boolean {\n      if (this.remainingCount) {\n          return false;\n      } else if (this.arrows && this.images && this.images.length > this.getVisibleCount()\n          && (!this.arrowsAutoHide || this.mouseenter)) {\n          return true;\n      } else {\n          return false;\n      }\n  }\n\n  validateIndex(): void {\n      if (this.images) {\n          let newIndex;\n\n          if (this.order === NgxGalleryOrder.Column) {\n              newIndex = Math.floor(this.selectedIndex / this.rows);\n          } else {\n              newIndex = this.selectedIndex % Math.ceil(this.images.length / this.rows);\n          }\n\n          if (this.remainingCount) {\n              newIndex = 0;\n          }\n\n          if (newIndex < this.index || newIndex >= this.index + this.columns) {\n              const maxIndex = this.getMaxIndex() - this.columns;\n              this.index = newIndex > maxIndex ? maxIndex : newIndex;\n\n              this.setThumbnailsPosition();\n          }\n      }\n  }\n\n  getSafeUrl(image: string): SafeStyle {\n      return this.sanitization.bypassSecurityTrustStyle(this.helperService.getBackgroundUrl(image));\n  }\n\n  private getThumbnailPosition(index: number, count: number): SafeStyle {\n      return this.getSafeStyle('calc(' + ((100 / count) * index) + '% + '\n          + ((this.margin - (((count - 1) * this.margin) / count)) * index) + 'px)');\n  }\n\n  private getThumbnailDimension(count: number): SafeStyle {\n      if (this.margin !== 0) {\n          return this.getSafeStyle('calc(' + (100 / count) + '% - '\n              + (((count - 1) * this.margin) / count) + 'px)');\n      } else {\n          return this.getSafeStyle('calc(' + (100 / count) + '% + 1px)');\n      }\n  }\n\n  private getMaxIndex(): number {\n      if (this.order == NgxGalleryOrder.Page) {\n          let maxIndex = (Math.floor(this.images.length / this.getVisibleCount()) * this.columns);\n\n          if (this.images.length % this.getVisibleCount() > this.columns) {\n              maxIndex += this.columns;\n          }\n          else {\n              maxIndex += this.images.length % this.getVisibleCount();\n          }\n\n          return maxIndex;\n      }\n      else {\n          return Math.ceil(this.images.length / this.rows);\n      }\n  }\n\n  private getVisibleCount(): number {\n      return this.columns * this.rows;\n  }\n\n  private getSafeStyle(value: string): SafeStyle {\n      return this.sanitization.bypassSecurityTrustStyle(value);\n  }\n}\n","import { Component, OnInit, DoCheck, AfterViewInit, EventEmitter, Output, ViewChild, HostBinding, ElementRef, HostListener, Input } from '@angular/core';\nimport { SafeResourceUrl } from '@angular/platform-browser';\nimport { NgxGalleryHelperService } from './ngx-gallery-helper.service';\nimport { NgxGalleryOptions } from './ngx-gallery-options';\nimport { NgxGalleryImageSize } from './ngx-gallery-image-size.model';\nimport { NgxGalleryImage } from './ngx-gallery-image.model';\nimport { NgxGalleryOrderedImage } from './ngx-gallery-ordered-image.model';\nimport { NgxGalleryPreviewComponent } from './ngx-gallery-preview/ngx-gallery-preview.component';\nimport { NgxGalleryImageComponent } from './ngx-gallery-image/ngx-gallery-image.component';\nimport { NgxGalleryThumbnailsComponent } from './ngx-gallery-thumbnails/ngx-gallery-thumbnails.component';\nimport { NgxGalleryLayout } from './ngx-gallery-layout.model';\n\n@Component({\n  selector: 'ngx-gallery',\n  template: `\n    <div class=\"ngx-gallery-layout {{currentOptions?.layout}}\">\n      <ngx-gallery-image *ngIf=\"currentOptions?.image\" [style.height]=\"getImageHeight()\" [images]=\"mediumImages\" [clickable]=\"currentOptions?.preview\" [selectedIndex]=\"selectedIndex\" [arrows]=\"currentOptions?.imageArrows\" [arrowsAutoHide]=\"currentOptions?.imageArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\" [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [swipe]=\"currentOptions?.imageSwipe\" [animation]=\"currentOptions?.imageAnimation\" [size]=\"currentOptions?.imageSize\" [autoPlay]=\"currentOptions?.imageAutoPlay\" [autoPlayInterval]=\"currentOptions?.imageAutoPlayInterval\" [autoPlayPauseOnHover]=\"currentOptions?.imageAutoPlayPauseOnHover\" [infinityMove]=\"currentOptions?.imageInfinityMove\"  [lazyLoading]=\"currentOptions?.lazyLoading\" [actions]=\"currentOptions?.imageActions\" [descriptions]=\"descriptions\" [showDescription]=\"currentOptions?.imageDescription\" [bullets]=\"currentOptions?.imageBullets\" (onClick)=\"openPreview($event)\" (onActiveChange)=\"selectFromImage($event)\"></ngx-gallery-image>\n\n      <ngx-gallery-thumbnails *ngIf=\"currentOptions?.thumbnails\" [style.marginTop]=\"getThumbnailsMarginTop()\" [style.marginBottom]=\"getThumbnailsMarginBottom()\" [style.height]=\"getThumbnailsHeight()\" [images]=\"smallImages\" [links]=\"currentOptions?.thumbnailsAsLinks ? links : []\" [labels]=\"labels\" [linkTarget]=\"currentOptions?.linkTarget\" [selectedIndex]=\"selectedIndex\" [columns]=\"currentOptions?.thumbnailsColumns\" [rows]=\"currentOptions?.thumbnailsRows\" [margin]=\"currentOptions?.thumbnailMargin\" [arrows]=\"currentOptions?.thumbnailsArrows\" [arrowsAutoHide]=\"currentOptions?.thumbnailsArrowsAutoHide\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\" [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [clickable]=\"currentOptions?.image || currentOptions?.preview\" [swipe]=\"currentOptions?.thumbnailsSwipe\" [size]=\"currentOptions?.thumbnailSize\" [moveSize]=\"currentOptions?.thumbnailsMoveSize\" [order]=\"currentOptions?.thumbnailsOrder\" [remainingCount]=\"currentOptions?.thumbnailsRemainingCount\" [lazyLoading]=\"currentOptions?.lazyLoading\" [actions]=\"currentOptions?.thumbnailActions\"  (onActiveChange)=\"selectFromThumbnails($event)\"></ngx-gallery-thumbnails>\n\n      <ngx-gallery-preview [images]=\"bigImages\" [descriptions]=\"descriptions\" [showDescription]=\"currentOptions?.previewDescription\" [arrowPrevIcon]=\"currentOptions?.arrowPrevIcon\" [arrowNextIcon]=\"currentOptions?.arrowNextIcon\" [closeIcon]=\"currentOptions?.closeIcon\" [fullscreenIcon]=\"currentOptions?.fullscreenIcon\" [spinnerIcon]=\"currentOptions?.spinnerIcon\" [arrows]=\"currentOptions?.previewArrows\" [arrowsAutoHide]=\"currentOptions?.previewArrowsAutoHide\" [swipe]=\"currentOptions?.previewSwipe\" [fullscreen]=\"currentOptions?.previewFullscreen\" [forceFullscreen]=\"currentOptions?.previewForceFullscreen\" [closeOnClick]=\"currentOptions?.previewCloseOnClick\" [closeOnEsc]=\"currentOptions?.previewCloseOnEsc\" [keyboardNavigation]=\"currentOptions?.previewKeyboardNavigation\" [animation]=\"currentOptions?.previewAnimation\" [autoPlay]=\"currentOptions?.previewAutoPlay\" [autoPlayInterval]=\"currentOptions?.previewAutoPlayInterval\" [autoPlayPauseOnHover]=\"currentOptions?.previewAutoPlayPauseOnHover\" [infinityMove]=\"currentOptions?.previewInfinityMove\" [zoom]=\"currentOptions?.previewZoom\" [zoomStep]=\"currentOptions?.previewZoomStep\" [zoomMax]=\"currentOptions?.previewZoomMax\" [zoomMin]=\"currentOptions?.previewZoomMin\" [zoomInIcon]=\"currentOptions?.zoomInIcon\" [zoomOutIcon]=\"currentOptions?.zoomOutIcon\" [actions]=\"currentOptions?.actions\" [rotate]=\"currentOptions?.previewRotate\" [rotateLeftIcon]=\"currentOptions?.rotateLeftIcon\" [rotateRightIcon]=\"currentOptions?.rotateRightIcon\" [download]=\"currentOptions?.previewDownload\" [downloadIcon]=\"currentOptions?.downloadIcon\" [bullets]=\"currentOptions?.previewBullets\" (onClose)=\"onPreviewClose()\" (onOpen)=\"onPreviewOpen()\" (onActiveChange)=\"previewSelect($event)\" [class.ngx-gallery-active]=\"previewEnabled\"></ngx-gallery-preview>\n    </div>\n  `,\n  styleUrls: ['./ngx-gallery.component.scss'],\n  providers: [NgxGalleryHelperService]\n})\nexport class NgxGalleryComponent implements OnInit, DoCheck, AfterViewInit {\n  @Input() options: NgxGalleryOptions[];\n  @Input() images: NgxGalleryImage[];\n\n  @Output() imagesReady = new EventEmitter();\n  @Output() change = new EventEmitter<{ index: number; image: NgxGalleryImage; }>();\n  @Output() previewOpen = new EventEmitter();\n  @Output() previewClose = new EventEmitter();\n  @Output() previewChange = new EventEmitter<{ index: number; image: NgxGalleryImage; }>();\n\n  smallImages: string[] | SafeResourceUrl[];\n  mediumImages: NgxGalleryOrderedImage[];\n  bigImages: string[] | SafeResourceUrl[];\n  descriptions: string[];\n  links: string[];\n  labels: string[];\n\n  oldImages: NgxGalleryImage[];\n  oldImagesLength = 0;\n\n  selectedIndex = 0;\n  previewEnabled: boolean;\n\n  currentOptions: NgxGalleryOptions;\n\n  private breakpoint: number | undefined = undefined;\n  private prevBreakpoint: number | undefined = undefined;\n  private fullWidthTimeout: any;\n\n  @ViewChild(NgxGalleryPreviewComponent) preview: NgxGalleryPreviewComponent;\n  @ViewChild(NgxGalleryImageComponent) image: NgxGalleryImageComponent;\n  @ViewChild(NgxGalleryThumbnailsComponent) thubmnails: NgxGalleryThumbnailsComponent;\n\n  @HostBinding('style.width') width: string;\n  @HostBinding('style.height') height: string;\n  @HostBinding('style.left') left: string;\n\n  constructor(private myElement: ElementRef) {}\n\n  ngOnInit() {\n      this.options = this.options.map((opt) => new NgxGalleryOptions(opt));\n      this.sortOptions();\n      this.setBreakpoint();\n      this.setOptions();\n      this.checkFullWidth();\n      if (this.currentOptions) {\n          this.selectedIndex = <number>this.currentOptions.startIndex;\n      }\n  }\n\n  ngDoCheck(): void {\n      if (this.images !== undefined && (this.images.length !== this.oldImagesLength)\n          || (this.images !== this.oldImages)) {\n          this.oldImagesLength = this.images.length;\n          this.oldImages = this.images;\n          this.setOptions();\n          this.setImages();\n\n          if (this.images && this.images.length) {\n              this.imagesReady.emit();\n          }\n\n          if (this.image) {\n              this.image.reset(<number>this.currentOptions.startIndex);\n          }\n\n          if (this.currentOptions.thumbnailsAutoHide && this.currentOptions.thumbnails\n              && this.images.length <= 1) {\n              this.currentOptions.thumbnails = false;\n              this.currentOptions.imageArrows = false;\n          }\n\n          this.resetThumbnails();\n      }\n  }\n\n  ngAfterViewInit(): void {\n      this.checkFullWidth();\n  }\n\n  @HostListener('window:resize') onResize() {\n      this.setBreakpoint();\n\n      if (this.prevBreakpoint !== this.breakpoint) {\n          this.setOptions();\n          this.resetThumbnails();\n      }\n\n      if (this.currentOptions && this.currentOptions.fullWidth) {\n\n          if (this.fullWidthTimeout) {\n              clearTimeout(this.fullWidthTimeout);\n          }\n\n          this.fullWidthTimeout = setTimeout(() => {\n              this.checkFullWidth();\n          }, 200);\n      }\n  }\n\n  getImageHeight(): string {\n      return (this.currentOptions && this.currentOptions.thumbnails) ?\n          this.currentOptions.imagePercent + '%' : '100%';\n  }\n\n  getThumbnailsHeight(): string {\n      if (this.currentOptions && this.currentOptions.image) {\n          return 'calc(' + this.currentOptions.thumbnailsPercent + '% - '\n          + this.currentOptions.thumbnailsMargin + 'px)';\n      } else {\n          return '100%';\n      }\n  }\n\n  getThumbnailsMarginTop(): string {\n      if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsBottom) {\n          return this.currentOptions.thumbnailsMargin + 'px';\n      } else {\n          return '0px';\n      }\n  }\n\n  getThumbnailsMarginBottom(): string {\n      if (this.currentOptions && this.currentOptions.layout === NgxGalleryLayout.ThumbnailsTop) {\n          return this.currentOptions.thumbnailsMargin + 'px';\n      } else {\n          return '0px';\n      }\n  }\n\n  openPreview(index: number): void {\n      if (this.currentOptions.previewCustom) {\n          this.currentOptions.previewCustom(index);\n      } else {\n          this.previewEnabled = true;\n          this.preview.open(index);\n      }\n  }\n\n  onPreviewOpen(): void {\n      this.previewOpen.emit();\n\n      if (this.image && this.image.autoPlay) {\n          this.image.stopAutoPlay();\n      }\n  }\n\n  onPreviewClose(): void {\n      this.previewEnabled = false;\n      this.previewClose.emit();\n\n      if (this.image && this.image.autoPlay) {\n          this.image.startAutoPlay();\n      }\n  }\n\n  selectFromImage(index: number) {\n      this.select(index);\n  }\n\n  selectFromThumbnails(index: number) {\n      this.select(index);\n\n      if (this.currentOptions && this.currentOptions.thumbnails && this.currentOptions.preview\n          && (!this.currentOptions.image || this.currentOptions.thumbnailsRemainingCount)) {\n          this.openPreview(this.selectedIndex);\n      }\n  }\n\n  show(index: number): void {\n      this.select(index);\n  }\n\n  showNext(): void {\n      this.image.showNext();\n  }\n\n  showPrev(): void {\n      this.image.showPrev();\n  }\n\n  canShowNext(): boolean {\n      if (this.images && this.currentOptions) {\n          return (this.currentOptions.imageInfinityMove || this.selectedIndex < this.images.length - 1)\n              ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  canShowPrev(): boolean {\n      if (this.images && this.currentOptions) {\n          return (this.currentOptions.imageInfinityMove || this.selectedIndex > 0) ? true : false;\n      } else {\n          return false;\n      }\n  }\n\n  previewSelect(index: number) {\n      this.previewChange.emit({index, image: this.images[index]});\n  }\n\n  moveThumbnailsRight() {\n      this.thubmnails.moveRight();\n  }\n\n  moveThumbnailsLeft() {\n      this.thubmnails.moveLeft();\n  }\n\n  canMoveThumbnailsRight() {\n      return this.thubmnails.canMoveRight();\n  }\n\n  canMoveThumbnailsLeft() {\n      return this.thubmnails.canMoveLeft();\n  }\n\n  private resetThumbnails() {\n      if (this.thubmnails) {\n          this.thubmnails.reset(<number>this.currentOptions.startIndex);\n      }\n  }\n\n  private select(index: number) {\n      this.selectedIndex = index;\n\n      this.change.emit({\n          index,\n          image: this.images[index]\n      });\n  }\n\n  private checkFullWidth(): void {\n      if (this.currentOptions && this.currentOptions.fullWidth) {\n          this.width = document.body.clientWidth + 'px';\n          this.left = (-(document.body.clientWidth -\n              this.myElement.nativeElement.parentNode.innerWidth) / 2) + 'px';\n      }\n  }\n\n  private setImages(): void {\n      this.smallImages = this.images.map((img) => <string>img.small);\n      this.mediumImages = this.images.map((img, i) => new NgxGalleryOrderedImage({\n          src: img.medium,\n          index: i\n      }));\n      this.bigImages = this.images.map((img) => <string>img.big);\n      this.descriptions = this.images.map((img) => <string>img.description);\n      this.links = this.images.map((img) => <string>img.url);\n      this.labels = this.images.map((img) => <string>img.label);\n  }\n\n  private setBreakpoint(): void {\n      this.prevBreakpoint = this.breakpoint;\n      let breakpoints;\n\n      if (typeof window !== 'undefined') {\n          breakpoints = this.options.filter((opt) => opt.breakpoint >= window.innerWidth)\n              .map((opt) => opt.breakpoint);\n      }\n\n      if (breakpoints && breakpoints.length) {\n          this.breakpoint = breakpoints.pop();\n      } else {\n          this.breakpoint = undefined;\n      }\n  }\n\n  private sortOptions(): void {\n      this.options = [\n          ...this.options.filter((a) => a.breakpoint === undefined),\n          ...this.options\n              .filter((a) => a.breakpoint !== undefined)\n              .sort((a, b) => b.breakpoint - a.breakpoint)\n      ];\n  }\n\n  private setOptions(): void {\n      this.currentOptions = new NgxGalleryOptions({});\n\n      this.options\n          .filter((opt) => opt.breakpoint === undefined || opt.breakpoint >= this.breakpoint)\n          .map((opt) => this.combineOptions(this.currentOptions, opt));\n\n      this.width = <string>this.currentOptions.width;\n      this.height = <string>this.currentOptions.height;\n  }\n\n  private combineOptions(first: NgxGalleryOptions, second: NgxGalleryOptions) {\n      Object.keys(second).map((val) => first[val] = second[val] !== undefined ? second[val] : first[val]);\n  }\n}\n","import { Component, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n  selector: 'ngx-gallery-action',\n  templateUrl: './ngx-gallery-action.component.html',\n  styleUrls: ['./ngx-gallery-action.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgxGalleryActionComponent {\n  @Input() icon: string;\n  @Input() disabled = false;\n  @Input() titleText = '';\n\n  @Output() onClick: EventEmitter<Event> = new EventEmitter();\n\n  handleClick(event: Event) {\n      if (!this.disabled) {\n          this.onClick.emit(event);\n      }\n\n      event.stopPropagation();\n      event.preventDefault();\n  }\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n  selector: 'ngx-gallery-arrows',\n  templateUrl: './ngx-gallery-arrows.component.html',\n  styleUrls: ['./ngx-gallery-arrows.component.scss']\n})\nexport class NgxGalleryArrowsComponent{\n  @Input() prevDisabled: boolean;\n  @Input() nextDisabled: boolean;\n  @Input() arrowPrevIcon: string;\n  @Input() arrowNextIcon: string;\n\n  @Output() onPrevClick = new EventEmitter();\n  @Output() onNextClick = new EventEmitter();\n\n  handlePrevClick(): void {\n      this.onPrevClick.emit();\n  }\n\n  handleNextClick(): void {\n      this.onNextClick.emit();\n  }\n}\n","import { Component, Input, EventEmitter, Output } from '@angular/core';\n\n@Component({\n  selector: 'ngx-gallery-bullets',\n  templateUrl: './ngx-gallery-bullets.component.html',\n  styleUrls: ['./ngx-gallery-bullets.component.scss']\n})\nexport class NgxGalleryBulletsComponent {\n  @Input() count: number;\n  @Input() active: number = 0;\n\n  @Output() onChange = new EventEmitter();\n\n  getBullets(): number[] {\n      return Array(this.count);\n  }\n\n  handleChange(event: Event, index: number): void {\n      this.onChange.emit(index);\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { NgxGalleryComponent } from './ngx-gallery.component';\nimport { NgxGalleryPreviewComponent } from './ngx-gallery-preview/ngx-gallery-preview.component';\nimport { NgxGalleryImageComponent } from './ngx-gallery-image/ngx-gallery-image.component';\nimport { NgxGalleryThumbnailsComponent } from './ngx-gallery-thumbnails/ngx-gallery-thumbnails.component';\nimport { NgxGalleryActionComponent } from './ngx-gallery-action/ngx-gallery-action.component';\nimport { NgxGalleryArrowsComponent } from './ngx-gallery-arrows/ngx-gallery-arrows.component';\nimport { NgxGalleryBulletsComponent } from './ngx-gallery-bullets/ngx-gallery-bullets.component';\nimport { CommonModule } from '@angular/common';\n\n\n\n@NgModule({\n  declarations: [\n    NgxGalleryComponent,\n    NgxGalleryPreviewComponent, \n    NgxGalleryImageComponent,\n    NgxGalleryThumbnailsComponent,\n    NgxGalleryActionComponent,\n    NgxGalleryArrowsComponent,\n    NgxGalleryBulletsComponent\n  ],\n  imports: [\n    CommonModule\n  ],\n  exports: [NgxGalleryComponent]\n})\nexport class NgxGalleryModule { }\n","import { SafeResourceUrl } from '@angular/platform-browser';\r\n\r\nexport interface INgxGalleryImage {\r\n    small?: string | SafeResourceUrl;\r\n    medium?: string | SafeResourceUrl;\r\n    big?: string | SafeResourceUrl;\r\n    description?: string;\r\n    url?: string;\r\n    label?: string;\r\n}\r\n\r\nexport class NgxGalleryImage implements INgxGalleryImage {\r\n    small?: string | SafeResourceUrl;\r\n    medium?: string | SafeResourceUrl;\r\n    big?: string | SafeResourceUrl;\r\n    description?: string;\r\n    url?: string;\r\n    label?: string;\r\n\r\n    constructor(obj: INgxGalleryImage) {\r\n        this.small = obj.small;\r\n        this.medium = obj.medium;\r\n        this.big = obj.big;\r\n        this.description = obj.description;\r\n        this.url = obj.url;\r\n        this.label = obj.label;\r\n    }\r\n}\r\n","/*\n * Public API Surface of ngx-gallery\n */\nexport * from './lib/ngx-gallery.component';\nexport * from './lib/ngx-gallery.module';\nexport * from './lib/ngx-gallery-action/ngx-gallery-action.component';\nexport * from './lib/ngx-gallery-image/ngx-gallery-image.component';\nexport * from './lib/ngx-gallery-thumbnails/ngx-gallery-thumbnails.component';\nexport * from './lib/ngx-gallery-preview/ngx-gallery-preview.component';\nexport * from './lib/ngx-gallery-arrows/ngx-gallery-arrows.component';\nexport * from './lib/ngx-gallery-bullets/ngx-gallery-bullets.component';\nexport * from './lib/ngx-gallery-options';\nexport * from './lib/ngx-gallery-image.model';\nexport * from './lib/ngx-gallery-animation.model';\nexport * from './lib/ngx-gallery-helper.service';\nexport * from './lib/ngx-gallery-image-size.model';\nexport * from './lib/ngx-gallery-layout.model';\nexport * from './lib/ngx-gallery-order.model';\nexport * from './lib/ngx-gallery-ordered-image.model';\nexport * from './lib/ngx-gallery-action.model';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n","import { Subscriber } from '../Subscriber';\nexport function every(predicate, thisArg) {\n    return (source) => source.lift(new EveryOperator(predicate, thisArg, source));\n}\nclass EveryOperator {\n    constructor(predicate, thisArg, source) {\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n        this.source = source;\n    }\n    call(observer, source) {\n        return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n    }\n}\nclass EverySubscriber extends Subscriber {\n    constructor(destination, predicate, thisArg, source) {\n        super(destination);\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n        this.source = source;\n        this.index = 0;\n        this.thisArg = thisArg || this;\n    }\n    notifyComplete(everyValueMatch) {\n        this.destination.next(everyValueMatch);\n        this.destination.complete();\n    }\n    _next(value) {\n        let result = false;\n        try {\n            result = this.predicate.call(this.thisArg, value, this.index++, this.source);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (!result) {\n            this.notifyComplete(false);\n        }\n    }\n    _complete() {\n        this.notifyComplete(true);\n    }\n}\n//# sourceMappingURL=every.js.map","import { zip as zipStatic } from '../observable/zip';\nexport function zip(...observables) {\n    return function zipOperatorFunction(source) {\n        return source.lift.call(zipStatic(source, ...observables));\n    };\n}\n//# sourceMappingURL=zip.js.map","import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function repeatWhen(notifier) {\n    return (source) => source.lift(new RepeatWhenOperator(notifier));\n}\nclass RepeatWhenOperator {\n    constructor(notifier) {\n        this.notifier = notifier;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n    }\n}\nclass RepeatWhenSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, notifier, source) {\n        super(destination);\n        this.notifier = notifier;\n        this.source = source;\n        this.sourceIsBeingSubscribedTo = true;\n    }\n    notifyNext() {\n        this.sourceIsBeingSubscribedTo = true;\n        this.source.subscribe(this);\n    }\n    notifyComplete() {\n        if (this.sourceIsBeingSubscribedTo === false) {\n            return super.complete();\n        }\n    }\n    complete() {\n        this.sourceIsBeingSubscribedTo = false;\n        if (!this.isStopped) {\n            if (!this.retries) {\n                this.subscribeToRetries();\n            }\n            if (!this.retriesSubscription || this.retriesSubscription.closed) {\n                return super.complete();\n            }\n            this._unsubscribeAndRecycle();\n            this.notifications.next(undefined);\n        }\n    }\n    _unsubscribe() {\n        const { notifications, retriesSubscription } = this;\n        if (notifications) {\n            notifications.unsubscribe();\n            this.notifications = undefined;\n        }\n        if (retriesSubscription) {\n            retriesSubscription.unsubscribe();\n            this.retriesSubscription = undefined;\n        }\n        this.retries = undefined;\n    }\n    _unsubscribeAndRecycle() {\n        const { _unsubscribe } = this;\n        this._unsubscribe = null;\n        super._unsubscribeAndRecycle();\n        this._unsubscribe = _unsubscribe;\n        return this;\n    }\n    subscribeToRetries() {\n        this.notifications = new Subject();\n        let retries;\n        try {\n            const { notifier } = this;\n            retries = notifier(this.notifications);\n        }\n        catch (e) {\n            return super.complete();\n        }\n        this.retries = retries;\n        this.retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n    }\n}\n//# sourceMappingURL=repeatWhen.js.map","import { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat(...observables) {\n    return concatAll()(of(...observables));\n}\n//# sourceMappingURL=concat.js.map","import { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nexport class Observable {\n    constructor(subscribe) {\n        this._isScalar = false;\n        if (subscribe) {\n            this._subscribe = subscribe;\n        }\n    }\n    lift(operator) {\n        const observable = new Observable();\n        observable.source = this;\n        observable.operator = operator;\n        return observable;\n    }\n    subscribe(observerOrNext, error, complete) {\n        const { operator } = this;\n        const sink = toSubscriber(observerOrNext, error, complete);\n        if (operator) {\n            sink.add(operator.call(sink, this.source));\n        }\n        else {\n            sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n                this._subscribe(sink) :\n                this._trySubscribe(sink));\n        }\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            if (sink.syncErrorThrowable) {\n                sink.syncErrorThrowable = false;\n                if (sink.syncErrorThrown) {\n                    throw sink.syncErrorValue;\n                }\n            }\n        }\n        return sink;\n    }\n    _trySubscribe(sink) {\n        try {\n            return this._subscribe(sink);\n        }\n        catch (err) {\n            if (config.useDeprecatedSynchronousErrorHandling) {\n                sink.syncErrorThrown = true;\n                sink.syncErrorValue = err;\n            }\n            if (canReportError(sink)) {\n                sink.error(err);\n            }\n            else {\n                console.warn(err);\n            }\n        }\n    }\n    forEach(next, promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            let subscription;\n            subscription = this.subscribe((value) => {\n                try {\n                    next(value);\n                }\n                catch (err) {\n                    reject(err);\n                    if (subscription) {\n                        subscription.unsubscribe();\n                    }\n                }\n            }, reject, resolve);\n        });\n    }\n    _subscribe(subscriber) {\n        const { source } = this;\n        return source && source.subscribe(subscriber);\n    }\n    [Symbol_observable]() {\n        return this;\n    }\n    pipe(...operations) {\n        if (operations.length === 0) {\n            return this;\n        }\n        return pipeFromArray(operations)(this);\n    }\n    toPromise(promiseCtor) {\n        promiseCtor = getPromiseCtor(promiseCtor);\n        return new promiseCtor((resolve, reject) => {\n            let value;\n            this.subscribe((x) => value = x, (err) => reject(err), () => resolve(value));\n        });\n    }\n}\nObservable.create = (subscribe) => {\n    return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n    if (!promiseCtor) {\n        promiseCtor = config.Promise || Promise;\n    }\n    if (!promiseCtor) {\n        throw new Error('no Promise impl found');\n    }\n    return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map","import { AsyncScheduler } from './AsyncScheduler';\nexport class QueueScheduler extends AsyncScheduler {\n}\n//# sourceMappingURL=QueueScheduler.js.map","import { Observable } from '../Observable';\nimport { from } from './from';\nimport { isArray } from '../util/isArray';\nimport { EMPTY } from './empty';\nexport function onErrorResumeNext(...sources) {\n    if (sources.length === 0) {\n        return EMPTY;\n    }\n    const [first, ...remainder] = sources;\n    if (sources.length === 1 && isArray(first)) {\n        return onErrorResumeNext(...first);\n    }\n    return new Observable(subscriber => {\n        const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber));\n        return from(first).subscribe({\n            next(value) { subscriber.next(value); },\n            error: subNext,\n            complete: subNext,\n        });\n    });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","import { Subscriber } from '../Subscriber';\nexport function count(predicate) {\n    return (source) => source.lift(new CountOperator(predicate, source));\n}\nclass CountOperator {\n    constructor(predicate, source) {\n        this.predicate = predicate;\n        this.source = source;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n    }\n}\nclass CountSubscriber extends Subscriber {\n    constructor(destination, predicate, source) {\n        super(destination);\n        this.predicate = predicate;\n        this.source = source;\n        this.count = 0;\n        this.index = 0;\n    }\n    _next(value) {\n        if (this.predicate) {\n            this._tryPredicate(value);\n        }\n        else {\n            this.count++;\n        }\n    }\n    _tryPredicate(value) {\n        let result;\n        try {\n            result = this.predicate(value, this.index++, this.source);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (result) {\n            this.count++;\n        }\n    }\n    _complete() {\n        this.destination.next(this.count);\n        this.destination.complete();\n    }\n}\n//# sourceMappingURL=count.js.map","export const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');\n//# sourceMappingURL=isArrayLike.js.map","import { reduce } from './reduce';\nfunction toArrayReducer(arr, item, index) {\n    if (index === 0) {\n        return [item];\n    }\n    arr.push(item);\n    return arr;\n}\nexport function toArray() {\n    return reduce(toArrayReducer, []);\n}\n//# sourceMappingURL=toArray.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n    constructor(SchedulerAction, now = Scheduler.now) {\n        super(SchedulerAction, () => {\n            if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n                return AsyncScheduler.delegate.now();\n            }\n            else {\n                return now();\n            }\n        });\n        this.actions = [];\n        this.active = false;\n        this.scheduled = undefined;\n    }\n    schedule(work, delay = 0, state) {\n        if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n            return AsyncScheduler.delegate.schedule(work, delay, state);\n        }\n        else {\n            return super.schedule(work, delay, state);\n        }\n    }\n    flush(action) {\n        const { actions } = this;\n        if (this.active) {\n            actions.push(action);\n            return;\n        }\n        let error;\n        this.active = true;\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (action = actions.shift());\n        this.active = false;\n        if (error) {\n            while (action = actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n    return (source) => {\n        if (count === 0) {\n            return empty();\n        }\n        else {\n            return source.lift(new TakeOperator(count));\n        }\n    };\n}\nclass TakeOperator {\n    constructor(total) {\n        this.total = total;\n        if (this.total < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TakeSubscriber(subscriber, this.total));\n    }\n}\nclass TakeSubscriber extends Subscriber {\n    constructor(destination, total) {\n        super(destination);\n        this.total = total;\n        this.count = 0;\n    }\n    _next(value) {\n        const total = this.total;\n        const count = ++this.count;\n        if (count <= total) {\n            this.destination.next(value);\n            if (count === total) {\n                this.destination.complete();\n                this.unsubscribe();\n            }\n        }\n    }\n}\n//# sourceMappingURL=take.js.map","import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function catchError(selector) {\n    return function catchErrorOperatorFunction(source) {\n        const operator = new CatchOperator(selector);\n        const caught = source.lift(operator);\n        return (operator.caught = caught);\n    };\n}\nclass CatchOperator {\n    constructor(selector) {\n        this.selector = selector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n    }\n}\nclass CatchSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, selector, caught) {\n        super(destination);\n        this.selector = selector;\n        this.caught = caught;\n    }\n    error(err) {\n        if (!this.isStopped) {\n            let result;\n            try {\n                result = this.selector(err, this.caught);\n            }\n            catch (err2) {\n                super.error(err2);\n                return;\n            }\n            this._unsubscribeAndRecycle();\n            const innerSubscriber = new SimpleInnerSubscriber(this);\n            this.add(innerSubscriber);\n            const innerSubscription = innerSubscribe(result, innerSubscriber);\n            if (innerSubscription !== innerSubscriber) {\n                this.add(innerSubscription);\n            }\n        }\n    }\n}\n//# sourceMappingURL=catchError.js.map","export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}","import { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith(...array) {\n    const scheduler = array[array.length - 1];\n    if (isScheduler(scheduler)) {\n        array.pop();\n        return (source) => concat(array, source, scheduler);\n    }\n    else {\n        return (source) => concat(array, source);\n    }\n}\n//# sourceMappingURL=startWith.js.map","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}","import { ZipOperator } from '../observable/zip';\nexport function zipAll(project) {\n    return (source) => source.lift(new ZipOperator(project));\n}\n//# sourceMappingURL=zipAll.js.map","import { FindValueOperator } from '../operators/find';\nexport function findIndex(predicate, thisArg) {\n    return (source) => source.lift(new FindValueOperator(predicate, source, true, thisArg));\n}\n//# sourceMappingURL=findIndex.js.map","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nexport function debounceTime(dueTime, scheduler = async) {\n    return (source) => source.lift(new DebounceTimeOperator(dueTime, scheduler));\n}\nclass DebounceTimeOperator {\n    constructor(dueTime, scheduler) {\n        this.dueTime = dueTime;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n    }\n}\nclass DebounceTimeSubscriber extends Subscriber {\n    constructor(destination, dueTime, scheduler) {\n        super(destination);\n        this.dueTime = dueTime;\n        this.scheduler = scheduler;\n        this.debouncedSubscription = null;\n        this.lastValue = null;\n        this.hasValue = false;\n    }\n    _next(value) {\n        this.clearDebounce();\n        this.lastValue = value;\n        this.hasValue = true;\n        this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));\n    }\n    _complete() {\n        this.debouncedNext();\n        this.destination.complete();\n    }\n    debouncedNext() {\n        this.clearDebounce();\n        if (this.hasValue) {\n            const { lastValue } = this;\n            this.lastValue = null;\n            this.hasValue = false;\n            this.destination.next(lastValue);\n        }\n    }\n    clearDebounce() {\n        const debouncedSubscription = this.debouncedSubscription;\n        if (debouncedSubscription !== null) {\n            this.remove(debouncedSubscription);\n            debouncedSubscription.unsubscribe();\n            this.debouncedSubscription = null;\n        }\n    }\n}\nfunction dispatchNext(subscriber) {\n    subscriber.debouncedNext();\n}\n//# sourceMappingURL=debounceTime.js.map","import { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n    let hasSeed = false;\n    if (arguments.length >= 2) {\n        hasSeed = true;\n    }\n    return function scanOperatorFunction(source) {\n        return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n    };\n}\nclass ScanOperator {\n    constructor(accumulator, seed, hasSeed = false) {\n        this.accumulator = accumulator;\n        this.seed = seed;\n        this.hasSeed = hasSeed;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n    }\n}\nclass ScanSubscriber extends Subscriber {\n    constructor(destination, accumulator, _seed, hasSeed) {\n        super(destination);\n        this.accumulator = accumulator;\n        this._seed = _seed;\n        this.hasSeed = hasSeed;\n        this.index = 0;\n    }\n    get seed() {\n        return this._seed;\n    }\n    set seed(value) {\n        this.hasSeed = true;\n        this._seed = value;\n    }\n    _next(value) {\n        if (!this.hasSeed) {\n            this.seed = value;\n            this.destination.next(value);\n        }\n        else {\n            return this._tryNext(value);\n        }\n    }\n    _tryNext(value) {\n        const index = this.index++;\n        let result;\n        try {\n            result = this.accumulator(this.seed, value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n        this.seed = result;\n        this.destination.next(result);\n    }\n}\n//# sourceMappingURL=scan.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of(...args) {\n    let scheduler = args[args.length - 1];\n    if (isScheduler(scheduler)) {\n        args.pop();\n        return scheduleArray(args, scheduler);\n    }\n    else {\n        return fromArray(args);\n    }\n}\n//# sourceMappingURL=of.js.map","export function getSymbolIterator() {\n    if (typeof Symbol !== 'function' || !Symbol.iterator) {\n        return '@@iterator';\n    }\n    return Symbol.iterator;\n}\nexport const iterator = getSymbolIterator();\nexport const $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n    if (!input) {\n        throw new Error('Iterable cannot be null');\n    }\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        let iterator;\n        sub.add(() => {\n            if (iterator && typeof iterator.return === 'function') {\n                iterator.return();\n            }\n        });\n        sub.add(scheduler.schedule(() => {\n            iterator = input[Symbol_iterator]();\n            sub.add(scheduler.schedule(function () {\n                if (subscriber.closed) {\n                    return;\n                }\n                let value;\n                let done;\n                try {\n                    const result = iterator.next();\n                    value = result.value;\n                    done = result.done;\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return;\n                }\n                if (done) {\n                    subscriber.complete();\n                }\n                else {\n                    subscriber.next(value);\n                    this.schedule();\n                }\n            }));\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleIterable.js.map","import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function retryWhen(notifier) {\n    return (source) => source.lift(new RetryWhenOperator(notifier, source));\n}\nclass RetryWhenOperator {\n    constructor(notifier, source) {\n        this.notifier = notifier;\n        this.source = source;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));\n    }\n}\nclass RetryWhenSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, notifier, source) {\n        super(destination);\n        this.notifier = notifier;\n        this.source = source;\n    }\n    error(err) {\n        if (!this.isStopped) {\n            let errors = this.errors;\n            let retries = this.retries;\n            let retriesSubscription = this.retriesSubscription;\n            if (!retries) {\n                errors = new Subject();\n                try {\n                    const { notifier } = this;\n                    retries = notifier(errors);\n                }\n                catch (e) {\n                    return super.error(e);\n                }\n                retriesSubscription = innerSubscribe(retries, new SimpleInnerSubscriber(this));\n            }\n            else {\n                this.errors = undefined;\n                this.retriesSubscription = undefined;\n            }\n            this._unsubscribeAndRecycle();\n            this.errors = errors;\n            this.retries = retries;\n            this.retriesSubscription = retriesSubscription;\n            errors.next(err);\n        }\n    }\n    _unsubscribe() {\n        const { errors, retriesSubscription } = this;\n        if (errors) {\n            errors.unsubscribe();\n            this.errors = undefined;\n        }\n        if (retriesSubscription) {\n            retriesSubscription.unsubscribe();\n            this.retriesSubscription = undefined;\n        }\n        this.retries = undefined;\n    }\n    notifyNext() {\n        const { _unsubscribe } = this;\n        this._unsubscribe = null;\n        this._unsubscribeAndRecycle();\n        this._unsubscribe = _unsubscribe;\n        this.source.subscribe(this);\n    }\n}\n//# sourceMappingURL=retryWhen.js.map","export default function _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import { Subject } from './Subject';\nimport { Subscription } from './Subscription';\nexport class AsyncSubject extends Subject {\n    constructor() {\n        super(...arguments);\n        this.value = null;\n        this.hasNext = false;\n        this.hasCompleted = false;\n    }\n    _subscribe(subscriber) {\n        if (this.hasError) {\n            subscriber.error(this.thrownError);\n            return Subscription.EMPTY;\n        }\n        else if (this.hasCompleted && this.hasNext) {\n            subscriber.next(this.value);\n            subscriber.complete();\n            return Subscription.EMPTY;\n        }\n        return super._subscribe(subscriber);\n    }\n    next(value) {\n        if (!this.hasCompleted) {\n            this.value = value;\n            this.hasNext = true;\n        }\n    }\n    error(error) {\n        if (!this.hasCompleted) {\n            super.error(error);\n        }\n    }\n    complete() {\n        this.hasCompleted = true;\n        if (this.hasNext) {\n            super.next(this.value);\n        }\n        super.complete();\n    }\n}\n//# sourceMappingURL=AsyncSubject.js.map","export function hostReportError(err) {\n    setTimeout(() => { throw err; }, 0);\n}\n//# sourceMappingURL=hostReportError.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { takeLast } from './takeLast';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { identity } from '../util/identity';\nexport function last(predicate, defaultValue) {\n    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=last.js.map","import { Observable } from '../Observable';\nexport function range(start = 0, count, scheduler) {\n    return new Observable(subscriber => {\n        if (count === undefined) {\n            count = start;\n            start = 0;\n        }\n        let index = 0;\n        let current = start;\n        if (scheduler) {\n            return scheduler.schedule(dispatch, 0, {\n                index, count, start, subscriber\n            });\n        }\n        else {\n            do {\n                if (index++ >= count) {\n                    subscriber.complete();\n                    break;\n                }\n                subscriber.next(current++);\n                if (subscriber.closed) {\n                    break;\n                }\n            } while (true);\n        }\n        return undefined;\n    });\n}\nexport function dispatch(state) {\n    const { start, index, count, subscriber } = state;\n    if (index >= count) {\n        subscriber.complete();\n        return;\n    }\n    subscriber.next(start);\n    if (subscriber.closed) {\n        return;\n    }\n    state.index = index + 1;\n    state.start = start + 1;\n    this.schedule(state);\n}\n//# sourceMappingURL=range.js.map","import { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n    return new Observable(subscriber => {\n        let input;\n        try {\n            input = observableFactory();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        const source = input ? from(input) : empty();\n        return source.subscribe(subscriber);\n    });\n}\n//# sourceMappingURL=defer.js.map","import { Subject } from '../Subject';\nimport { multicast } from './multicast';\nexport function publish(selector) {\n    return selector ?\n        multicast(() => new Subject(), selector) :\n        multicast(new Subject());\n}\n//# sourceMappingURL=publish.js.map","import { isArray } from '../util/isArray';\nimport { fromArray } from './fromArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function race(...observables) {\n    if (observables.length === 1) {\n        if (isArray(observables[0])) {\n            observables = observables[0];\n        }\n        else {\n            return observables[0];\n        }\n    }\n    return fromArray(observables, undefined).lift(new RaceOperator());\n}\nexport class RaceOperator {\n    call(subscriber, source) {\n        return source.subscribe(new RaceSubscriber(subscriber));\n    }\n}\nexport class RaceSubscriber extends OuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.hasFirst = false;\n        this.observables = [];\n        this.subscriptions = [];\n    }\n    _next(observable) {\n        this.observables.push(observable);\n    }\n    _complete() {\n        const observables = this.observables;\n        const len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            for (let i = 0; i < len && !this.hasFirst; i++) {\n                const observable = observables[i];\n                const subscription = subscribeToResult(this, observable, undefined, i);\n                if (this.subscriptions) {\n                    this.subscriptions.push(subscription);\n                }\n                this.add(subscription);\n            }\n            this.observables = null;\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        if (!this.hasFirst) {\n            this.hasFirst = true;\n            for (let i = 0; i < this.subscriptions.length; i++) {\n                if (i !== outerIndex) {\n                    let subscription = this.subscriptions[i];\n                    subscription.unsubscribe();\n                    this.remove(subscription);\n                }\n            }\n            this.subscriptions = null;\n        }\n        this.destination.next(innerValue);\n    }\n}\n//# sourceMappingURL=race.js.map","import { Observable } from '../Observable';\nimport { asap } from '../scheduler/asap';\nimport { isNumeric } from '../util/isNumeric';\nexport class SubscribeOnObservable extends Observable {\n    constructor(source, delayTime = 0, scheduler = asap) {\n        super();\n        this.source = source;\n        this.delayTime = delayTime;\n        this.scheduler = scheduler;\n        if (!isNumeric(delayTime) || delayTime < 0) {\n            this.delayTime = 0;\n        }\n        if (!scheduler || typeof scheduler.schedule !== 'function') {\n            this.scheduler = asap;\n        }\n    }\n    static create(source, delay = 0, scheduler = asap) {\n        return new SubscribeOnObservable(source, delay, scheduler);\n    }\n    static dispatch(arg) {\n        const { source, subscriber } = arg;\n        return this.add(source.subscribe(subscriber));\n    }\n    _subscribe(subscriber) {\n        const delay = this.delayTime;\n        const source = this.source;\n        const scheduler = this.scheduler;\n        return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {\n            source, subscriber\n        });\n    }\n}\n//# sourceMappingURL=SubscribeOnObservable.js.map","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nexport function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n    return (source) => source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n}\nclass GroupByOperator {\n    constructor(keySelector, elementSelector, durationSelector, subjectSelector) {\n        this.keySelector = keySelector;\n        this.elementSelector = elementSelector;\n        this.durationSelector = durationSelector;\n        this.subjectSelector = subjectSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n    }\n}\nclass GroupBySubscriber extends Subscriber {\n    constructor(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n        super(destination);\n        this.keySelector = keySelector;\n        this.elementSelector = elementSelector;\n        this.durationSelector = durationSelector;\n        this.subjectSelector = subjectSelector;\n        this.groups = null;\n        this.attemptedToUnsubscribe = false;\n        this.count = 0;\n    }\n    _next(value) {\n        let key;\n        try {\n            key = this.keySelector(value);\n        }\n        catch (err) {\n            this.error(err);\n            return;\n        }\n        this._group(value, key);\n    }\n    _group(value, key) {\n        let groups = this.groups;\n        if (!groups) {\n            groups = this.groups = new Map();\n        }\n        let group = groups.get(key);\n        let element;\n        if (this.elementSelector) {\n            try {\n                element = this.elementSelector(value);\n            }\n            catch (err) {\n                this.error(err);\n            }\n        }\n        else {\n            element = value;\n        }\n        if (!group) {\n            group = (this.subjectSelector ? this.subjectSelector() : new Subject());\n            groups.set(key, group);\n            const groupedObservable = new GroupedObservable(key, group, this);\n            this.destination.next(groupedObservable);\n            if (this.durationSelector) {\n                let duration;\n                try {\n                    duration = this.durationSelector(new GroupedObservable(key, group));\n                }\n                catch (err) {\n                    this.error(err);\n                    return;\n                }\n                this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));\n            }\n        }\n        if (!group.closed) {\n            group.next(element);\n        }\n    }\n    _error(err) {\n        const groups = this.groups;\n        if (groups) {\n            groups.forEach((group, key) => {\n                group.error(err);\n            });\n            groups.clear();\n        }\n        this.destination.error(err);\n    }\n    _complete() {\n        const groups = this.groups;\n        if (groups) {\n            groups.forEach((group, key) => {\n                group.complete();\n            });\n            groups.clear();\n        }\n        this.destination.complete();\n    }\n    removeGroup(key) {\n        this.groups.delete(key);\n    }\n    unsubscribe() {\n        if (!this.closed) {\n            this.attemptedToUnsubscribe = true;\n            if (this.count === 0) {\n                super.unsubscribe();\n            }\n        }\n    }\n}\nclass GroupDurationSubscriber extends Subscriber {\n    constructor(key, group, parent) {\n        super(group);\n        this.key = key;\n        this.group = group;\n        this.parent = parent;\n    }\n    _next(value) {\n        this.complete();\n    }\n    _unsubscribe() {\n        const { parent, key } = this;\n        this.key = this.parent = null;\n        if (parent) {\n            parent.removeGroup(key);\n        }\n    }\n}\nexport class GroupedObservable extends Observable {\n    constructor(key, groupSubject, refCountSubscription) {\n        super();\n        this.key = key;\n        this.groupSubject = groupSubject;\n        this.refCountSubscription = refCountSubscription;\n    }\n    _subscribe(subscriber) {\n        const subscription = new Subscription();\n        const { refCountSubscription, groupSubject } = this;\n        if (refCountSubscription && !refCountSubscription.closed) {\n            subscription.add(new InnerRefCountSubscription(refCountSubscription));\n        }\n        subscription.add(groupSubject.subscribe(subscriber));\n        return subscription;\n    }\n}\nclass InnerRefCountSubscription extends Subscription {\n    constructor(parent) {\n        super();\n        this.parent = parent;\n        parent.count++;\n    }\n    unsubscribe() {\n        const parent = this.parent;\n        if (!parent.closed && !this.closed) {\n            super.unsubscribe();\n            parent.count -= 1;\n            if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n                parent.unsubscribe();\n            }\n        }\n    }\n}\n//# sourceMappingURL=groupBy.js.map","import { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { isScheduler } from '../util/isScheduler';\nexport function bufferTime(bufferTimeSpan) {\n    let length = arguments.length;\n    let scheduler = async;\n    if (isScheduler(arguments[arguments.length - 1])) {\n        scheduler = arguments[arguments.length - 1];\n        length--;\n    }\n    let bufferCreationInterval = null;\n    if (length >= 2) {\n        bufferCreationInterval = arguments[1];\n    }\n    let maxBufferSize = Number.POSITIVE_INFINITY;\n    if (length >= 3) {\n        maxBufferSize = arguments[2];\n    }\n    return function bufferTimeOperatorFunction(source) {\n        return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));\n    };\n}\nclass BufferTimeOperator {\n    constructor(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n        this.bufferTimeSpan = bufferTimeSpan;\n        this.bufferCreationInterval = bufferCreationInterval;\n        this.maxBufferSize = maxBufferSize;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));\n    }\n}\nclass Context {\n    constructor() {\n        this.buffer = [];\n    }\n}\nclass BufferTimeSubscriber extends Subscriber {\n    constructor(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n        super(destination);\n        this.bufferTimeSpan = bufferTimeSpan;\n        this.bufferCreationInterval = bufferCreationInterval;\n        this.maxBufferSize = maxBufferSize;\n        this.scheduler = scheduler;\n        this.contexts = [];\n        const context = this.openContext();\n        this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;\n        if (this.timespanOnly) {\n            const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan };\n            this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n        }\n        else {\n            const closeState = { subscriber: this, context };\n            const creationState = { bufferTimeSpan, bufferCreationInterval, subscriber: this, scheduler };\n            this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));\n            this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));\n        }\n    }\n    _next(value) {\n        const contexts = this.contexts;\n        const len = contexts.length;\n        let filledBufferContext;\n        for (let i = 0; i < len; i++) {\n            const context = contexts[i];\n            const buffer = context.buffer;\n            buffer.push(value);\n            if (buffer.length == this.maxBufferSize) {\n                filledBufferContext = context;\n            }\n        }\n        if (filledBufferContext) {\n            this.onBufferFull(filledBufferContext);\n        }\n    }\n    _error(err) {\n        this.contexts.length = 0;\n        super._error(err);\n    }\n    _complete() {\n        const { contexts, destination } = this;\n        while (contexts.length > 0) {\n            const context = contexts.shift();\n            destination.next(context.buffer);\n        }\n        super._complete();\n    }\n    _unsubscribe() {\n        this.contexts = null;\n    }\n    onBufferFull(context) {\n        this.closeContext(context);\n        const closeAction = context.closeAction;\n        closeAction.unsubscribe();\n        this.remove(closeAction);\n        if (!this.closed && this.timespanOnly) {\n            context = this.openContext();\n            const bufferTimeSpan = this.bufferTimeSpan;\n            const timeSpanOnlyState = { subscriber: this, context, bufferTimeSpan };\n            this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n        }\n    }\n    openContext() {\n        const context = new Context();\n        this.contexts.push(context);\n        return context;\n    }\n    closeContext(context) {\n        this.destination.next(context.buffer);\n        const contexts = this.contexts;\n        const spliceIndex = contexts ? contexts.indexOf(context) : -1;\n        if (spliceIndex >= 0) {\n            contexts.splice(contexts.indexOf(context), 1);\n        }\n    }\n}\nfunction dispatchBufferTimeSpanOnly(state) {\n    const subscriber = state.subscriber;\n    const prevContext = state.context;\n    if (prevContext) {\n        subscriber.closeContext(prevContext);\n    }\n    if (!subscriber.closed) {\n        state.context = subscriber.openContext();\n        state.context.closeAction = this.schedule(state, state.bufferTimeSpan);\n    }\n}\nfunction dispatchBufferCreation(state) {\n    const { bufferCreationInterval, bufferTimeSpan, subscriber, scheduler } = state;\n    const context = subscriber.openContext();\n    const action = this;\n    if (!subscriber.closed) {\n        subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber, context }));\n        action.schedule(state, bufferCreationInterval);\n    }\n}\nfunction dispatchBufferClose(arg) {\n    const { subscriber, context } = arg;\n    subscriber.closeContext(context);\n}\n//# sourceMappingURL=bufferTime.js.map","export default function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n    return distinctUntilChanged((x, y) => compare ? compare(x[key], y[key]) : x[key] === y[key]);\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map","import { Subscription } from '../Subscription';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function bufferWhen(closingSelector) {\n    return function (source) {\n        return source.lift(new BufferWhenOperator(closingSelector));\n    };\n}\nclass BufferWhenOperator {\n    constructor(closingSelector) {\n        this.closingSelector = closingSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n    }\n}\nclass BufferWhenSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, closingSelector) {\n        super(destination);\n        this.closingSelector = closingSelector;\n        this.subscribing = false;\n        this.openBuffer();\n    }\n    _next(value) {\n        this.buffer.push(value);\n    }\n    _complete() {\n        const buffer = this.buffer;\n        if (buffer) {\n            this.destination.next(buffer);\n        }\n        super._complete();\n    }\n    _unsubscribe() {\n        this.buffer = undefined;\n        this.subscribing = false;\n    }\n    notifyNext() {\n        this.openBuffer();\n    }\n    notifyComplete() {\n        if (this.subscribing) {\n            this.complete();\n        }\n        else {\n            this.openBuffer();\n        }\n    }\n    openBuffer() {\n        let { closingSubscription } = this;\n        if (closingSubscription) {\n            this.remove(closingSubscription);\n            closingSubscription.unsubscribe();\n        }\n        const buffer = this.buffer;\n        if (this.buffer) {\n            this.destination.next(buffer);\n        }\n        this.buffer = [];\n        let closingNotifier;\n        try {\n            const { closingSelector } = this;\n            closingNotifier = closingSelector();\n        }\n        catch (err) {\n            return this.error(err);\n        }\n        closingSubscription = new Subscription();\n        this.closingSubscription = closingSubscription;\n        this.add(closingSubscription);\n        this.subscribing = true;\n        closingSubscription.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));\n        this.subscribing = false;\n    }\n}\n//# sourceMappingURL=bufferWhen.js.map","import { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function timer(dueTime = 0, periodOrScheduler, scheduler) {\n    let period = -1;\n    if (isNumeric(periodOrScheduler)) {\n        period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);\n    }\n    else if (isScheduler(periodOrScheduler)) {\n        scheduler = periodOrScheduler;\n    }\n    if (!isScheduler(scheduler)) {\n        scheduler = async;\n    }\n    return new Observable(subscriber => {\n        const due = isNumeric(dueTime)\n            ? dueTime\n            : (+dueTime - scheduler.now());\n        return scheduler.schedule(dispatch, due, {\n            index: 0, period, subscriber\n        });\n    });\n}\nfunction dispatch(state) {\n    const { index, period, subscriber } = state;\n    subscriber.next(index);\n    if (subscriber.closed) {\n        return;\n    }\n    else if (period === -1) {\n        return subscriber.complete();\n    }\n    state.index = index + 1;\n    this.schedule(state, period);\n}\n//# sourceMappingURL=timer.js.map","import { Immediate } from '../util/Immediate';\nimport { AsyncAction } from './AsyncAction';\nexport class AsapAction extends AsyncAction {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && delay > 0) {\n            return super.requestAsyncId(scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return super.recycleAsyncId(scheduler, id, delay);\n        }\n        if (scheduler.actions.length === 0) {\n            Immediate.clearImmediate(id);\n            scheduler.scheduled = undefined;\n        }\n        return undefined;\n    }\n}\n//# sourceMappingURL=AsapAction.js.map","import { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n    return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map","import { Observable } from '../Observable';\nimport { from } from './from';\nimport { EMPTY } from './empty';\nexport function using(resourceFactory, observableFactory) {\n    return new Observable(subscriber => {\n        let resource;\n        try {\n            resource = resourceFactory();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        let result;\n        try {\n            result = observableFactory(resource);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        const source = result ? from(result) : EMPTY;\n        const subscription = source.subscribe(subscriber);\n        return () => {\n            subscription.unsubscribe();\n            if (resource) {\n                resource.unsubscribe();\n            }\n        };\n    });\n}\n//# sourceMappingURL=using.js.map","import { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { canReportError } from '../util/canReportError';\nimport { isArray } from '../util/isArray';\nimport { isScheduler } from '../util/isScheduler';\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n    if (resultSelector) {\n        if (isScheduler(resultSelector)) {\n            scheduler = resultSelector;\n        }\n        else {\n            return (...args) => bindCallback(callbackFunc, scheduler)(...args).pipe(map((args) => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n        }\n    }\n    return function (...args) {\n        const context = this;\n        let subject;\n        const params = {\n            context,\n            subject,\n            callbackFunc,\n            scheduler,\n        };\n        return new Observable(subscriber => {\n            if (!scheduler) {\n                if (!subject) {\n                    subject = new AsyncSubject();\n                    const handler = (...innerArgs) => {\n                        subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n                        subject.complete();\n                    };\n                    try {\n                        callbackFunc.apply(context, [...args, handler]);\n                    }\n                    catch (err) {\n                        if (canReportError(subject)) {\n                            subject.error(err);\n                        }\n                        else {\n                            console.warn(err);\n                        }\n                    }\n                }\n                return subject.subscribe(subscriber);\n            }\n            else {\n                const state = {\n                    args, subscriber, params,\n                };\n                return scheduler.schedule(dispatch, 0, state);\n            }\n        });\n    };\n}\nfunction dispatch(state) {\n    const self = this;\n    const { args, subscriber, params } = state;\n    const { callbackFunc, context, scheduler } = params;\n    let { subject } = params;\n    if (!subject) {\n        subject = params.subject = new AsyncSubject();\n        const handler = (...innerArgs) => {\n            const value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n            this.add(scheduler.schedule(dispatchNext, 0, { value, subject }));\n        };\n        try {\n            callbackFunc.apply(context, [...args, handler]);\n        }\n        catch (err) {\n            subject.error(err);\n        }\n    }\n    this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(state) {\n    const { value, subject } = state;\n    subject.next(value);\n    subject.complete();\n}\nfunction dispatchError(state) {\n    const { err, subject } = state;\n    subject.error(err);\n}\n//# sourceMappingURL=bindCallback.js.map","import setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct\";\nexport default function _construct(Parent, args, Class) {\n  if (isNativeReflectConstruct()) {\n    _construct = Reflect.construct;\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) setPrototypeOf(instance, Class.prototype);\n      return instance;\n    };\n  }\n\n  return _construct.apply(null, arguments);\n}","import { AsyncScheduler } from './AsyncScheduler';\nexport class AsapScheduler extends AsyncScheduler {\n    flush(action) {\n        this.active = true;\n        this.scheduled = undefined;\n        const { actions } = this;\n        let error;\n        let index = -1;\n        let count = actions.length;\n        action = action || actions.shift();\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (++index < count && (action = actions.shift()));\n        this.active = false;\n        if (error) {\n            while (++index < count && (action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n//# sourceMappingURL=AsapScheduler.js.map","import superPropBase from \"./superPropBase\";\nexport default function _get(target, property, receiver) {\n  if (typeof Reflect !== \"undefined\" && Reflect.get) {\n    _get = Reflect.get;\n  } else {\n    _get = function _get(target, property, receiver) {\n      var base = superPropBase(target, property);\n      if (!base) return;\n      var desc = Object.getOwnPropertyDescriptor(base, property);\n\n      if (desc.get) {\n        return desc.get.call(receiver);\n      }\n\n      return desc.value;\n    };\n  }\n\n  return _get(target, property, receiver || target);\n}","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nlet _DOM: DomAdapter = null!;\n\nexport function getDOM(): DomAdapter {\n  return _DOM;\n}\n\nexport function setDOM(adapter: DomAdapter) {\n  _DOM = adapter;\n}\n\nexport function setRootDomAdapter(adapter: DomAdapter) {\n  if (!_DOM) {\n    _DOM = adapter;\n  }\n}\n\n/* tslint:disable:requireParameterType */\n/**\n * Provides DOM operations in an environment-agnostic way.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class DomAdapter {\n  // Needs Domino-friendly test utility\n  abstract getProperty(el: Element, name: string): any;\n  abstract dispatchEvent(el: any, evt: any): any;\n\n  // Used by router\n  abstract log(error: any): any;\n  abstract logGroup(error: any): any;\n  abstract logGroupEnd(): any;\n\n  // Used by Meta\n  abstract remove(el: any): Node;\n  abstract createElement(tagName: any, doc?: any): HTMLElement;\n  abstract createHtmlDocument(): HTMLDocument;\n  abstract getDefaultDocument(): Document;\n\n  // Used by By.css\n  abstract isElementNode(node: any): boolean;\n\n  // Used by Testability\n  abstract isShadowRoot(node: any): boolean;\n\n  // Used by KeyEventsPlugin\n  abstract onAndCancel(el: any, evt: any, listener: any): Function;\n  abstract supportsDOMEvents(): boolean;\n\n  // Used by PlatformLocation and ServerEventManagerPlugin\n  abstract getGlobalEventTarget(doc: Document, target: string): any;\n\n  // Used by PlatformLocation\n  abstract getHistory(): History;\n  abstract getLocation():\n      any; /** This is the ambient Location definition, NOT Location from @angular/common.  */\n  abstract getBaseHref(doc: Document): string|null;\n  abstract resetBaseElement(): void;\n\n  // TODO: remove dependency in DefaultValueAccessor\n  abstract getUserAgent(): string;\n\n  // Used by AngularProfiler\n  abstract performanceNow(): number;\n\n  // Used by CookieXSRFStrategy\n  abstract supportsCookies(): boolean;\n  abstract getCookie(name: string): string|null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * A DI Token representing the main rendering context. In a browser this is the DOM Document.\n *\n * Note: Document might not be available in the Application Context when Application and Rendering\n * Contexts are not the same (e.g. when running the application in a Web Worker).\n *\n * @publicApi\n */\nexport const DOCUMENT = new InjectionToken<Document>('DocumentToken');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, InjectionToken, ɵɵinject} from '@angular/core';\nimport {getDOM} from '../dom_adapter';\nimport {DOCUMENT} from '../dom_tokens';\n\n/**\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n *\n * `PlatformLocation` encapsulates all calls to DOM APIs, which allows the Router to be\n * platform-agnostic.\n * This means that we can have different implementation of `PlatformLocation` for the different\n * platforms that Angular supports. For example, `@angular/platform-browser` provides an\n * implementation specific to the browser environment, while `@angular/platform-server` provides\n * one suitable for use with server-side rendering.\n *\n * The `PlatformLocation` class is used directly by all implementations of {@link LocationStrategy}\n * when they need to interact with the DOM APIs like pushState, popState, etc.\n *\n * {@link LocationStrategy} in turn is used by the {@link Location} service which is used directly\n * by the {@link Router} in order to navigate between routes. Since all interactions between {@link\n * Router} /\n * {@link Location} / {@link LocationStrategy} and DOM APIs flow through the `PlatformLocation`\n * class, they are all platform-agnostic.\n *\n * @publicApi\n */\n@Injectable({\n  providedIn: 'platform',\n  // See #23917\n  useFactory: useBrowserPlatformLocation\n})\nexport abstract class PlatformLocation {\n  abstract getBaseHrefFromDOM(): string;\n  abstract getState(): unknown;\n  abstract onPopState(fn: LocationChangeListener): void;\n  abstract onHashChange(fn: LocationChangeListener): void;\n\n  abstract get href(): string;\n  abstract get protocol(): string;\n  abstract get hostname(): string;\n  abstract get port(): string;\n  abstract get pathname(): string;\n  abstract get search(): string;\n  abstract get hash(): string;\n\n  abstract replaceState(state: any, title: string, url: string): void;\n\n  abstract pushState(state: any, title: string, url: string): void;\n\n  abstract forward(): void;\n\n  abstract back(): void;\n}\n\nexport function useBrowserPlatformLocation() {\n  return ɵɵinject(BrowserPlatformLocation);\n}\n\n/**\n * @description\n * Indicates when a location is initialized.\n *\n * @publicApi\n */\nexport const LOCATION_INITIALIZED = new InjectionToken<Promise<any>>('Location Initialized');\n\n/**\n * @description\n * A serializable version of the event from `onPopState` or `onHashChange`\n *\n * @publicApi\n */\nexport interface LocationChangeEvent {\n  type: string;\n  state: any;\n}\n\n/**\n * @publicApi\n */\nexport interface LocationChangeListener {\n  (event: LocationChangeEvent): any;\n}\n\n\n\n/**\n * `PlatformLocation` encapsulates all of the direct calls to platform APIs.\n * This class should not be used directly by an application developer. Instead, use\n * {@link Location}.\n */\n@Injectable({\n  providedIn: 'platform',\n  // See #23917\n  useFactory: createBrowserPlatformLocation,\n})\nexport class BrowserPlatformLocation extends PlatformLocation {\n  public readonly location!: Location;\n  private _history!: History;\n\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    super();\n    this._init();\n  }\n\n  // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n  /** @internal */\n  _init() {\n    (this as {location: Location}).location = getDOM().getLocation();\n    this._history = getDOM().getHistory();\n  }\n\n  getBaseHrefFromDOM(): string {\n    return getDOM().getBaseHref(this._doc)!;\n  }\n\n  onPopState(fn: LocationChangeListener): void {\n    getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);\n  }\n\n  onHashChange(fn: LocationChangeListener): void {\n    getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);\n  }\n\n  get href(): string {\n    return this.location.href;\n  }\n  get protocol(): string {\n    return this.location.protocol;\n  }\n  get hostname(): string {\n    return this.location.hostname;\n  }\n  get port(): string {\n    return this.location.port;\n  }\n  get pathname(): string {\n    return this.location.pathname;\n  }\n  get search(): string {\n    return this.location.search;\n  }\n  get hash(): string {\n    return this.location.hash;\n  }\n  set pathname(newPath: string) {\n    this.location.pathname = newPath;\n  }\n\n  pushState(state: any, title: string, url: string): void {\n    if (supportsState()) {\n      this._history.pushState(state, title, url);\n    } else {\n      this.location.hash = url;\n    }\n  }\n\n  replaceState(state: any, title: string, url: string): void {\n    if (supportsState()) {\n      this._history.replaceState(state, title, url);\n    } else {\n      this.location.hash = url;\n    }\n  }\n\n  forward(): void {\n    this._history.forward();\n  }\n\n  back(): void {\n    this._history.back();\n  }\n\n  getState(): unknown {\n    return this._history.state;\n  }\n}\n\nexport function supportsState(): boolean {\n  return !!window.history.pushState;\n}\nexport function createBrowserPlatformLocation() {\n  return new BrowserPlatformLocation(ɵɵinject(DOCUMENT));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {DomAdapter as ɵDomAdapter, getDOM as ɵgetDOM, setRootDomAdapter as ɵsetRootDomAdapter} from './dom_adapter';\nexport {BrowserPlatformLocation as ɵBrowserPlatformLocation} from './location/platform_location';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n/**\n * Joins two parts of a URL with a slash if needed.\n *\n * @param start  URL string\n * @param end    URL string\n *\n *\n * @returns The joined URL string.\n */\nexport function joinWithSlash(start: string, end: string): string {\n  if (start.length == 0) {\n    return end;\n  }\n  if (end.length == 0) {\n    return start;\n  }\n  let slashes = 0;\n  if (start.endsWith('/')) {\n    slashes++;\n  }\n  if (end.startsWith('/')) {\n    slashes++;\n  }\n  if (slashes == 2) {\n    return start + end.substring(1);\n  }\n  if (slashes == 1) {\n    return start + end;\n  }\n  return start + '/' + end;\n}\n\n/**\n * Removes a trailing slash from a URL string if needed.\n * Looks for the first occurrence of either `#`, `?`, or the end of the\n * line as `/` characters and removes the trailing slash if one exists.\n *\n * @param url URL string.\n *\n * @returns The URL string, modified if needed.\n */\nexport function stripTrailingSlash(url: string): string {\n  const match = url.match(/#|\\?|$/);\n  const pathEndIdx = match && match.index || url.length;\n  const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n  return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}\n\n/**\n * Normalizes URL parameters by prepending with `?` if needed.\n *\n * @param  params String of URL parameters.\n *\n * @returns The normalized URL parameters string.\n */\nexport function normalizeQueryParams(params: string): string {\n  return params && params[0] !== '?' ? '?' + params : params;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, InjectionToken, Optional, ɵɵinject} from '@angular/core';\nimport {DOCUMENT} from '../dom_tokens';\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\nimport {joinWithSlash, normalizeQueryParams} from './util';\n\n/**\n * Enables the `Location` service to read route state from the browser's URL.\n * Angular provides two strategies:\n * `HashLocationStrategy` and `PathLocationStrategy`.\n *\n * Applications should use the `Router` or `Location` services to\n * interact with application route state.\n *\n * For instance, `HashLocationStrategy` produces URLs like\n * <code class=\"no-auto-link\">http://example.com#/foo</code>,\n * and `PathLocationStrategy` produces\n * <code class=\"no-auto-link\">http://example.com/foo</code> as an equivalent URL.\n *\n * See these two classes for more.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: provideLocationStrategy})\nexport abstract class LocationStrategy {\n  abstract path(includeHash?: boolean): string;\n  abstract prepareExternalUrl(internal: string): string;\n  abstract pushState(state: any, title: string, url: string, queryParams: string): void;\n  abstract replaceState(state: any, title: string, url: string, queryParams: string): void;\n  abstract forward(): void;\n  abstract back(): void;\n  abstract onPopState(fn: LocationChangeListener): void;\n  abstract getBaseHref(): string;\n}\n\nexport function provideLocationStrategy(platformLocation: PlatformLocation) {\n  // See #23917\n  const location = ɵɵinject(DOCUMENT).location;\n  return new PathLocationStrategy(\n      ɵɵinject(PlatformLocation as any), location && location.origin || '');\n}\n\n\n/**\n * A predefined [DI token](guide/glossary#di-token) for the base href\n * to be used with the `PathLocationStrategy`.\n * The base href is the URL prefix that should be preserved when generating\n * and recognizing URLs.\n *\n * @usageNotes\n *\n * The following example shows how to use this token to configure the root app injector\n * with a base href value, so that the DI framework can supply the dependency anywhere in the app.\n *\n * ```typescript\n * import {Component, NgModule} from '@angular/core';\n * import {APP_BASE_HREF} from '@angular/common';\n *\n * @NgModule({\n *   providers: [{provide: APP_BASE_HREF, useValue: '/my/app'}]\n * })\n * class AppModule {}\n * ```\n *\n * @publicApi\n */\nexport const APP_BASE_HREF = new InjectionToken<string>('appBaseHref');\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the\n * browser's URL.\n *\n * If you're using `PathLocationStrategy`, you must provide a {@link APP_BASE_HREF}\n * or add a `<base href>` element to the document.\n *\n * For instance, if you provide an `APP_BASE_HREF` of `'/my/app/'` and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`. To ensure all relative URIs resolve correctly,\n * the `<base href>` and/or `APP_BASE_HREF` should end with a `/`.\n *\n * Similarly, if you add `<base href='/my/app/'/>` to the document and call\n * `location.go('/foo')`, the browser's URL will become\n * `example.com/my/app/foo`.\n *\n * Note that when using `PathLocationStrategy`, neither the query nor\n * the fragment in the `<base href>` will be preserved, as outlined\n * by the [RFC](https://tools.ietf.org/html/rfc3986#section-5.2.2).\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable()\nexport class PathLocationStrategy extends LocationStrategy {\n  private _baseHref: string;\n\n  constructor(\n      private _platformLocation: PlatformLocation,\n      @Optional() @Inject(APP_BASE_HREF) href?: string) {\n    super();\n\n    if (href == null) {\n      href = this._platformLocation.getBaseHrefFromDOM();\n    }\n\n    if (href == null) {\n      throw new Error(\n          `No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.`);\n    }\n\n    this._baseHref = href;\n  }\n\n  onPopState(fn: LocationChangeListener): void {\n    this._platformLocation.onPopState(fn);\n    this._platformLocation.onHashChange(fn);\n  }\n\n  getBaseHref(): string {\n    return this._baseHref;\n  }\n\n  prepareExternalUrl(internal: string): string {\n    return joinWithSlash(this._baseHref, internal);\n  }\n\n  path(includeHash: boolean = false): string {\n    const pathname =\n        this._platformLocation.pathname + normalizeQueryParams(this._platformLocation.search);\n    const hash = this._platformLocation.hash;\n    return hash && includeHash ? `${pathname}${hash}` : pathname;\n  }\n\n  pushState(state: any, title: string, url: string, queryParams: string) {\n    const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n    this._platformLocation.pushState(state, title, externalUrl);\n  }\n\n  replaceState(state: any, title: string, url: string, queryParams: string) {\n    const externalUrl = this.prepareExternalUrl(url + normalizeQueryParams(queryParams));\n    this._platformLocation.replaceState(state, title, externalUrl);\n  }\n\n  forward(): void {\n    this._platformLocation.forward();\n  }\n\n  back(): void {\n    this._platformLocation.back();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, Optional} from '@angular/core';\nimport {APP_BASE_HREF, LocationStrategy} from './location_strategy';\nimport {LocationChangeListener, PlatformLocation} from './platform_location';\nimport {joinWithSlash, normalizeQueryParams} from './util';\n\n\n\n/**\n * @description\n * A {@link LocationStrategy} used to configure the {@link Location} service to\n * represent its state in the\n * [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)\n * of the browser's URL.\n *\n * For instance, if you call `location.go('/foo')`, the browser's URL will become\n * `example.com#/foo`.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n * @publicApi\n */\n@Injectable()\nexport class HashLocationStrategy extends LocationStrategy {\n  private _baseHref: string = '';\n  constructor(\n      private _platformLocation: PlatformLocation,\n      @Optional() @Inject(APP_BASE_HREF) _baseHref?: string) {\n    super();\n    if (_baseHref != null) {\n      this._baseHref = _baseHref;\n    }\n  }\n\n  onPopState(fn: LocationChangeListener): void {\n    this._platformLocation.onPopState(fn);\n    this._platformLocation.onHashChange(fn);\n  }\n\n  getBaseHref(): string {\n    return this._baseHref;\n  }\n\n  path(includeHash: boolean = false): string {\n    // the hash value is always prefixed with a `#`\n    // and if it is empty then it will stay empty\n    let path = this._platformLocation.hash;\n    if (path == null) path = '#';\n\n    return path.length > 0 ? path.substring(1) : path;\n  }\n\n  prepareExternalUrl(internal: string): string {\n    const url = joinWithSlash(this._baseHref, internal);\n    return url.length > 0 ? ('#' + url) : url;\n  }\n\n  pushState(state: any, title: string, path: string, queryParams: string) {\n    let url: string|null = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n    if (url.length == 0) {\n      url = this._platformLocation.pathname;\n    }\n    this._platformLocation.pushState(state, title, url);\n  }\n\n  replaceState(state: any, title: string, path: string, queryParams: string) {\n    let url = this.prepareExternalUrl(path + normalizeQueryParams(queryParams));\n    if (url.length == 0) {\n      url = this._platformLocation.pathname;\n    }\n    this._platformLocation.replaceState(state, title, url);\n  }\n\n  forward(): void {\n    this._platformLocation.forward();\n  }\n\n  back(): void {\n    this._platformLocation.back();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter, Injectable, ɵɵinject} from '@angular/core';\nimport {SubscriptionLike} from 'rxjs';\nimport {LocationStrategy} from './location_strategy';\nimport {PlatformLocation} from './platform_location';\nimport {joinWithSlash, normalizeQueryParams, stripTrailingSlash} from './util';\n\n/** @publicApi */\nexport interface PopStateEvent {\n  pop?: boolean;\n  state?: any;\n  type?: string;\n  url?: string;\n}\n\n/**\n * @description\n *\n * A service that applications can use to interact with a browser's URL.\n *\n * Depending on the `LocationStrategy` used, `Location` persists\n * to the URL's path or the URL's hash segment.\n *\n * @usageNotes\n *\n * It's better to use the `Router#navigate` service to trigger route changes. Use\n * `Location` only if you need to interact with or create normalized URLs outside of\n * routing.\n *\n * `Location` is responsible for normalizing the URL against the application's base href.\n * A normalized URL is absolute from the URL host, includes the application's base href, and has no\n * trailing slash:\n * - `/my/app/user/123` is normalized\n * - `my/app/user/123` **is not** normalized\n * - `/my/app/user/123/` **is not** normalized\n *\n * ### Example\n *\n * <code-example path='common/location/ts/path_location_component.ts'\n * region='LocationComponent'></code-example>\n *\n * @publicApi\n */\n@Injectable({\n  providedIn: 'root',\n  // See #23917\n  useFactory: createLocation,\n})\nexport class Location {\n  /** @internal */\n  _subject: EventEmitter<any> = new EventEmitter();\n  /** @internal */\n  _baseHref: string;\n  /** @internal */\n  _platformStrategy: LocationStrategy;\n  /** @internal */\n  _platformLocation: PlatformLocation;\n  /** @internal */\n  _urlChangeListeners: ((url: string, state: unknown) => void)[] = [];\n  /** @internal */\n  _urlChangeSubscription?: SubscriptionLike;\n\n  constructor(platformStrategy: LocationStrategy, platformLocation: PlatformLocation) {\n    this._platformStrategy = platformStrategy;\n    const browserBaseHref = this._platformStrategy.getBaseHref();\n    this._platformLocation = platformLocation;\n    this._baseHref = stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n    this._platformStrategy.onPopState((ev) => {\n      this._subject.emit({\n        'url': this.path(true),\n        'pop': true,\n        'state': ev.state,\n        'type': ev.type,\n      });\n    });\n  }\n\n  /**\n   * Normalizes the URL path for this location.\n   *\n   * @param includeHash True to include an anchor fragment in the path.\n   *\n   * @returns The normalized URL path.\n   */\n  // TODO: vsavkin. Remove the boolean flag and always include hash once the deprecated router is\n  // removed.\n  path(includeHash: boolean = false): string {\n    return this.normalize(this._platformStrategy.path(includeHash));\n  }\n\n  /**\n   * Reports the current state of the location history.\n   * @returns The current value of the `history.state` object.\n   */\n  getState(): unknown {\n    return this._platformLocation.getState();\n  }\n\n  /**\n   * Normalizes the given path and compares to the current normalized path.\n   *\n   * @param path The given URL path.\n   * @param query Query parameters.\n   *\n   * @returns True if the given URL path is equal to the current normalized path, false\n   * otherwise.\n   */\n  isCurrentPathEqualTo(path: string, query: string = ''): boolean {\n    return this.path() == this.normalize(path + normalizeQueryParams(query));\n  }\n\n  /**\n   * Normalizes a URL path by stripping any trailing slashes.\n   *\n   * @param url String representing a URL.\n   *\n   * @returns The normalized URL string.\n   */\n  normalize(url: string): string {\n    return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n  }\n\n  /**\n   * Normalizes an external URL path.\n   * If the given URL doesn't begin with a leading slash (`'/'`), adds one\n   * before normalizing. Adds a hash if `HashLocationStrategy` is\n   * in use, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n   *\n   * @param url String representing a URL.\n   *\n   * @returns  A normalized platform-specific URL.\n   */\n  prepareExternalUrl(url: string): string {\n    if (url && url[0] !== '/') {\n      url = '/' + url;\n    }\n    return this._platformStrategy.prepareExternalUrl(url);\n  }\n\n  // TODO: rename this method to pushState\n  /**\n   * Changes the browser's URL to a normalized version of a given URL, and pushes a\n   * new item onto the platform's history.\n   *\n   * @param path  URL path to normalize.\n   * @param query Query parameters.\n   * @param state Location history state.\n   *\n   */\n  go(path: string, query: string = '', state: any = null): void {\n    this._platformStrategy.pushState(state, '', path, query);\n    this._notifyUrlChangeListeners(\n        this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n  }\n\n  /**\n   * Changes the browser's URL to a normalized version of the given URL, and replaces\n   * the top item on the platform's history stack.\n   *\n   * @param path  URL path to normalize.\n   * @param query Query parameters.\n   * @param state Location history state.\n   */\n  replaceState(path: string, query: string = '', state: any = null): void {\n    this._platformStrategy.replaceState(state, '', path, query);\n    this._notifyUrlChangeListeners(\n        this.prepareExternalUrl(path + normalizeQueryParams(query)), state);\n  }\n\n  /**\n   * Navigates forward in the platform's history.\n   */\n  forward(): void {\n    this._platformStrategy.forward();\n  }\n\n  /**\n   * Navigates back in the platform's history.\n   */\n  back(): void {\n    this._platformStrategy.back();\n  }\n\n  /**\n   * Registers a URL change listener. Use to catch updates performed by the Angular\n   * framework that are not detectible through \"popstate\" or \"hashchange\" events.\n   *\n   * @param fn The change handler function, which take a URL and a location history state.\n   */\n  onUrlChange(fn: (url: string, state: unknown) => void) {\n    this._urlChangeListeners.push(fn);\n\n    if (!this._urlChangeSubscription) {\n      this._urlChangeSubscription = this.subscribe(v => {\n        this._notifyUrlChangeListeners(v.url, v.state);\n      });\n    }\n  }\n\n  /** @internal */\n  _notifyUrlChangeListeners(url: string = '', state: unknown) {\n    this._urlChangeListeners.forEach(fn => fn(url, state));\n  }\n\n  /**\n   * Subscribes to the platform's `popState` events.\n   *\n   * @param value Event that is triggered when the state history changes.\n   * @param exception The exception to throw.\n   *\n   * @returns Subscribed events.\n   */\n  subscribe(\n      onNext: (value: PopStateEvent) => void, onThrow?: ((exception: any) => void)|null,\n      onReturn?: (() => void)|null): SubscriptionLike {\n    return this._subject.subscribe({next: onNext, error: onThrow, complete: onReturn});\n  }\n\n  /**\n   * Normalizes URL parameters by prepending with `?` if needed.\n   *\n   * @param  params String of URL parameters.\n   *\n   * @returns The normalized URL parameters string.\n   */\n  public static normalizeQueryParams: (params: string) => string = normalizeQueryParams;\n\n  /**\n   * Joins two parts of a URL with a slash if needed.\n   *\n   * @param start  URL string\n   * @param end    URL string\n   *\n   *\n   * @returns The joined URL string.\n   */\n  public static joinWithSlash: (start: string, end: string) => string = joinWithSlash;\n\n  /**\n   * Removes a trailing slash from a URL string if needed.\n   * Looks for the first occurrence of either `#`, `?`, or the end of the\n   * line as `/` characters and removes the trailing slash if one exists.\n   *\n   * @param url URL string.\n   *\n   * @returns The URL string, modified if needed.\n   */\n  public static stripTrailingSlash: (url: string) => string = stripTrailingSlash;\n}\n\nexport function createLocation() {\n  return new Location(ɵɵinject(LocationStrategy as any), ɵɵinject(PlatformLocation as any));\n}\n\nfunction _stripBaseHref(baseHref: string, url: string): string {\n  return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;\n}\n\nfunction _stripIndexHtml(url: string): string {\n  return url.replace(/\\/index.html$/, '');\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {HashLocationStrategy} from './hash_location_strategy';\nexport {Location, PopStateEvent} from './location';\nexport {APP_BASE_HREF, LocationStrategy, PathLocationStrategy} from './location_strategy';\nexport {LOCATION_INITIALIZED, LocationChangeEvent, LocationChangeListener, PlatformLocation} from './platform_location';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// THIS CODE IS GENERATED - DO NOT MODIFY\n// See angular/tools/gulp-tasks/cldr/extract.js\n\nexport type CurrenciesSymbols = [string]|[string | undefined, string];\n\n/** @internal */\nexport const CURRENCIES_EN:\n    {[code: string]: CurrenciesSymbols|[string | undefined, string | undefined, number]} = {\n      'ADP': [undefined, undefined, 0],\n      'AFN': [undefined, undefined, 0],\n      'ALL': [undefined, undefined, 0],\n      'AMD': [undefined, undefined, 2],\n      'AOA': [undefined, 'Kz'],\n      'ARS': [undefined, '$'],\n      'AUD': ['A$', '$'],\n      'BAM': [undefined, 'KM'],\n      'BBD': [undefined, '$'],\n      'BDT': [undefined, '৳'],\n      'BHD': [undefined, undefined, 3],\n      'BIF': [undefined, undefined, 0],\n      'BMD': [undefined, '$'],\n      'BND': [undefined, '$'],\n      'BOB': [undefined, 'Bs'],\n      'BRL': ['R$'],\n      'BSD': [undefined, '$'],\n      'BWP': [undefined, 'P'],\n      'BYN': [undefined, 'р.', 2],\n      'BYR': [undefined, undefined, 0],\n      'BZD': [undefined, '$'],\n      'CAD': ['CA$', '$', 2],\n      'CHF': [undefined, undefined, 2],\n      'CLF': [undefined, undefined, 4],\n      'CLP': [undefined, '$', 0],\n      'CNY': ['CN¥', '¥'],\n      'COP': [undefined, '$', 2],\n      'CRC': [undefined, '₡', 2],\n      'CUC': [undefined, '$'],\n      'CUP': [undefined, '$'],\n      'CZK': [undefined, 'Kč', 2],\n      'DJF': [undefined, undefined, 0],\n      'DKK': [undefined, 'kr', 2],\n      'DOP': [undefined, '$'],\n      'EGP': [undefined, 'E£'],\n      'ESP': [undefined, '₧', 0],\n      'EUR': ['€'],\n      'FJD': [undefined, '$'],\n      'FKP': [undefined, '£'],\n      'GBP': ['£'],\n      'GEL': [undefined, '₾'],\n      'GIP': [undefined, '£'],\n      'GNF': [undefined, 'FG', 0],\n      'GTQ': [undefined, 'Q'],\n      'GYD': [undefined, '$', 2],\n      'HKD': ['HK$', '$'],\n      'HNL': [undefined, 'L'],\n      'HRK': [undefined, 'kn'],\n      'HUF': [undefined, 'Ft', 2],\n      'IDR': [undefined, 'Rp', 2],\n      'ILS': ['₪'],\n      'INR': ['₹'],\n      'IQD': [undefined, undefined, 0],\n      'IRR': [undefined, undefined, 0],\n      'ISK': [undefined, 'kr', 0],\n      'ITL': [undefined, undefined, 0],\n      'JMD': [undefined, '$'],\n      'JOD': [undefined, undefined, 3],\n      'JPY': ['¥', undefined, 0],\n      'KHR': [undefined, '៛'],\n      'KMF': [undefined, 'CF', 0],\n      'KPW': [undefined, '₩', 0],\n      'KRW': ['₩', undefined, 0],\n      'KWD': [undefined, undefined, 3],\n      'KYD': [undefined, '$'],\n      'KZT': [undefined, '₸'],\n      'LAK': [undefined, '₭', 0],\n      'LBP': [undefined, 'L£', 0],\n      'LKR': [undefined, 'Rs'],\n      'LRD': [undefined, '$'],\n      'LTL': [undefined, 'Lt'],\n      'LUF': [undefined, undefined, 0],\n      'LVL': [undefined, 'Ls'],\n      'LYD': [undefined, undefined, 3],\n      'MGA': [undefined, 'Ar', 0],\n      'MGF': [undefined, undefined, 0],\n      'MMK': [undefined, 'K', 0],\n      'MNT': [undefined, '₮', 2],\n      'MRO': [undefined, undefined, 0],\n      'MUR': [undefined, 'Rs', 2],\n      'MXN': ['MX$', '$'],\n      'MYR': [undefined, 'RM'],\n      'NAD': [undefined, '$'],\n      'NGN': [undefined, '₦'],\n      'NIO': [undefined, 'C$'],\n      'NOK': [undefined, 'kr', 2],\n      'NPR': [undefined, 'Rs'],\n      'NZD': ['NZ$', '$'],\n      'OMR': [undefined, undefined, 3],\n      'PHP': [undefined, '₱'],\n      'PKR': [undefined, 'Rs', 2],\n      'PLN': [undefined, 'zł'],\n      'PYG': [undefined, '₲', 0],\n      'RON': [undefined, 'lei'],\n      'RSD': [undefined, undefined, 0],\n      'RUB': [undefined, '₽'],\n      'RUR': [undefined, 'р.'],\n      'RWF': [undefined, 'RF', 0],\n      'SBD': [undefined, '$'],\n      'SEK': [undefined, 'kr', 2],\n      'SGD': [undefined, '$'],\n      'SHP': [undefined, '£'],\n      'SLL': [undefined, undefined, 0],\n      'SOS': [undefined, undefined, 0],\n      'SRD': [undefined, '$'],\n      'SSP': [undefined, '£'],\n      'STD': [undefined, undefined, 0],\n      'STN': [undefined, 'Db'],\n      'SYP': [undefined, '£', 0],\n      'THB': [undefined, '฿'],\n      'TMM': [undefined, undefined, 0],\n      'TND': [undefined, undefined, 3],\n      'TOP': [undefined, 'T$'],\n      'TRL': [undefined, undefined, 0],\n      'TRY': [undefined, '₺'],\n      'TTD': [undefined, '$'],\n      'TWD': ['NT$', '$', 2],\n      'TZS': [undefined, undefined, 2],\n      'UAH': [undefined, '₴'],\n      'UGX': [undefined, undefined, 0],\n      'USD': ['$'],\n      'UYI': [undefined, undefined, 0],\n      'UYU': [undefined, '$'],\n      'UYW': [undefined, undefined, 4],\n      'UZS': [undefined, undefined, 2],\n      'VEF': [undefined, 'Bs', 2],\n      'VND': ['₫', undefined, 0],\n      'VUV': [undefined, undefined, 0],\n      'XAF': ['FCFA', undefined, 0],\n      'XCD': ['EC$', '$'],\n      'XOF': ['CFA', undefined, 0],\n      'XPF': ['CFPF', undefined, 0],\n      'XXX': ['¤'],\n      'YER': [undefined, undefined, 0],\n      'ZAR': [undefined, 'R'],\n      'ZMK': [undefined, undefined, 0],\n      'ZMW': [undefined, 'ZK'],\n      'ZWD': [undefined, undefined, 0]\n    };\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵCurrencyIndex, ɵExtraLocaleDataIndex, ɵfindLocaleData, ɵgetLocaleCurrencyCode, ɵgetLocalePluralCase, ɵLocaleDataIndex} from '@angular/core';\n\nimport {CURRENCIES_EN, CurrenciesSymbols} from './currencies';\n\n\n/**\n * Format styles that can be used to represent numbers.\n * @see `getLocaleNumberFormat()`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum NumberFormatStyle {\n  Decimal,\n  Percent,\n  Currency,\n  Scientific\n}\n\n/**\n * Plurality cases used for translating plurals to different languages.\n *\n * @see `NgPlural`\n * @see `NgPluralCase`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum Plural {\n  Zero = 0,\n  One = 1,\n  Two = 2,\n  Few = 3,\n  Many = 4,\n  Other = 5,\n}\n\n/**\n * Context-dependant translation forms for strings.\n * Typically the standalone version is for the nominative form of the word,\n * and the format version is used for the genitive case.\n * @see [CLDR website](http://cldr.unicode.org/translation/date-time-1/date-time#TOC-Standalone-vs.-Format-Styles)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum FormStyle {\n  Format,\n  Standalone\n}\n\n/**\n * String widths available for translations.\n * The specific character widths are locale-specific.\n * Examples are given for the word \"Sunday\" in English.\n *\n * @publicApi\n */\nexport enum TranslationWidth {\n  /** 1 character for `en-US`. For example: 'S' */\n  Narrow,\n  /** 3 characters for `en-US`. For example: 'Sun' */\n  Abbreviated,\n  /** Full length for `en-US`. For example: \"Sunday\" */\n  Wide,\n  /** 2 characters for `en-US`, For example: \"Su\" */\n  Short\n}\n\n/**\n * String widths available for date-time formats.\n * The specific character widths are locale-specific.\n * Examples are given for `en-US`.\n *\n * @see `getLocaleDateFormat()`\n * @see `getLocaleTimeFormat()``\n * @see `getLocaleDateTimeFormat()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n */\nexport enum FormatWidth {\n  /**\n   * For `en-US`, 'M/d/yy, h:mm a'`\n   * (Example: `6/15/15, 9:03 AM`)\n   */\n  Short,\n  /**\n   * For `en-US`, `'MMM d, y, h:mm:ss a'`\n   * (Example: `Jun 15, 2015, 9:03:01 AM`)\n   */\n  Medium,\n  /**\n   * For `en-US`, `'MMMM d, y, h:mm:ss a z'`\n   * (Example: `June 15, 2015 at 9:03:01 AM GMT+1`)\n   */\n  Long,\n  /**\n   * For `en-US`, `'EEEE, MMMM d, y, h:mm:ss a zzzz'`\n   * (Example: `Monday, June 15, 2015 at 9:03:01 AM GMT+01:00`)\n   */\n  Full\n}\n\n/**\n * Symbols that can be used to replace placeholders in number patterns.\n * Examples are based on `en-US` values.\n *\n * @see `getLocaleNumberSymbol()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport enum NumberSymbol {\n  /**\n   * Decimal separator.\n   * For `en-US`, the dot character.\n   * Example : 2,345`.`67\n   */\n  Decimal,\n  /**\n   * Grouping separator, typically for thousands.\n   * For `en-US`, the comma character.\n   * Example: 2`,`345.67\n   */\n  Group,\n  /**\n   * List-item separator.\n   * Example: \"one, two, and three\"\n   */\n  List,\n  /**\n   * Sign for percentage (out of 100).\n   * Example: 23.4%\n   */\n  PercentSign,\n  /**\n   * Sign for positive numbers.\n   * Example: +23\n   */\n  PlusSign,\n  /**\n   * Sign for negative numbers.\n   * Example: -23\n   */\n  MinusSign,\n  /**\n   * Computer notation for exponential value (n times a power of 10).\n   * Example: 1.2E3\n   */\n  Exponential,\n  /**\n   * Human-readable format of exponential.\n   * Example: 1.2x103\n   */\n  SuperscriptingExponent,\n  /**\n   * Sign for permille (out of 1000).\n   * Example: 23.4‰\n   */\n  PerMille,\n  /**\n   * Infinity, can be used with plus and minus.\n   * Example: ∞, +∞, -∞\n   */\n  Infinity,\n  /**\n   * Not a number.\n   * Example: NaN\n   */\n  NaN,\n  /**\n   * Symbol used between time units.\n   * Example: 10:52\n   */\n  TimeSeparator,\n  /**\n   * Decimal separator for currency values (fallback to `Decimal`).\n   * Example: $2,345.67\n   */\n  CurrencyDecimal,\n  /**\n   * Group separator for currency values (fallback to `Group`).\n   * Example: $2,345.67\n   */\n  CurrencyGroup\n}\n\n/**\n * The value for each day of the week, based on the `en-US` locale\n *\n * @publicApi\n */\nexport enum WeekDay {\n  Sunday = 0,\n  Monday,\n  Tuesday,\n  Wednesday,\n  Thursday,\n  Friday,\n  Saturday\n}\n\n/**\n * Retrieves the locale ID from the currently loaded locale.\n * The loaded locale could be, for example, a global one rather than a regional one.\n * @param locale A locale code, such as `fr-FR`.\n * @returns The locale code. For example, `fr`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleId(locale: string): string {\n  return ɵfindLocaleData(locale)[ɵLocaleDataIndex.LocaleId];\n}\n\n/**\n * Retrieves day period strings for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized period strings. For example, `[AM, PM]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDayPeriods(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): [string, string] {\n  const data = ɵfindLocaleData(locale);\n  const amPmData = <[string, string][][]>[\n    data[ɵLocaleDataIndex.DayPeriodsFormat], data[ɵLocaleDataIndex.DayPeriodsStandalone]\n  ];\n  const amPm = getLastDefinedValue(amPmData, formStyle);\n  return getLastDefinedValue(amPm, width);\n}\n\n/**\n * Retrieves days of the week for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,`[Sunday, Monday, ... Saturday]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDayNames(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = ɵfindLocaleData(locale);\n  const daysData =\n      <string[][][]>[data[ɵLocaleDataIndex.DaysFormat], data[ɵLocaleDataIndex.DaysStandalone]];\n  const days = getLastDefinedValue(daysData, formStyle);\n  return getLastDefinedValue(days, width);\n}\n\n/**\n * Retrieves months of the year for the given locale, using the Gregorian calendar.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns An array of localized name strings.\n * For example,  `[January, February, ...]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleMonthNames(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = ɵfindLocaleData(locale);\n  const monthsData =\n      <string[][][]>[data[ɵLocaleDataIndex.MonthsFormat], data[ɵLocaleDataIndex.MonthsStandalone]];\n  const months = getLastDefinedValue(monthsData, formStyle);\n  return getLastDefinedValue(months, width);\n}\n\n/**\n * Retrieves Gregorian-calendar eras for the given locale.\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n\n * @returns An array of localized era strings.\n * For example, `[AD, BC]` for `en-US`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleEraNames(locale: string, width: TranslationWidth): [string, string] {\n  const data = ɵfindLocaleData(locale);\n  const erasData = <[string, string][]>data[ɵLocaleDataIndex.Eras];\n  return getLastDefinedValue(erasData, width);\n}\n\n/**\n * Retrieves the first day of the week for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns A day index number, using the 0-based week-day index for `en-US`\n * (Sunday = 0, Monday = 1, ...).\n * For example, for `fr-FR`, returns 1 to indicate that the first day is Monday.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleFirstDayOfWeek(locale: string): WeekDay {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.FirstDayOfWeek];\n}\n\n/**\n * Range of week days that are considered the week-end for the given locale.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The range of day values, `[startDay, endDay]`.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleWeekEndRange(locale: string): [WeekDay, WeekDay] {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.WeekendRange];\n}\n\n/**\n * Retrieves a localized date-value formating string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formating string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDateFormat(locale: string, width: FormatWidth): string {\n  const data = ɵfindLocaleData(locale);\n  return getLastDefinedValue(data[ɵLocaleDataIndex.DateFormat], width);\n}\n\n/**\n * Retrieves a localized time-value formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n\n * @publicApi\n */\nexport function getLocaleTimeFormat(locale: string, width: FormatWidth): string {\n  const data = ɵfindLocaleData(locale);\n  return getLastDefinedValue(data[ɵLocaleDataIndex.TimeFormat], width);\n}\n\n/**\n * Retrieves a localized date-time formatting string.\n *\n * @param locale A locale code for the locale format rules to use.\n * @param width The format type.\n * @returns The localized formatting string.\n * @see `FormatWidth`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleDateTimeFormat(locale: string, width: FormatWidth): string {\n  const data = ɵfindLocaleData(locale);\n  const dateTimeFormatData = <string[]>data[ɵLocaleDataIndex.DateTimeFormat];\n  return getLastDefinedValue(dateTimeFormatData, width);\n}\n\n/**\n * Retrieves a localized number symbol that can be used to replace placeholders in number formats.\n * @param locale The locale code.\n * @param symbol The symbol to localize.\n * @returns The character for the localized symbol.\n * @see `NumberSymbol`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleNumberSymbol(locale: string, symbol: NumberSymbol): string {\n  const data = ɵfindLocaleData(locale);\n  const res = data[ɵLocaleDataIndex.NumberSymbols][symbol];\n  if (typeof res === 'undefined') {\n    if (symbol === NumberSymbol.CurrencyDecimal) {\n      return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Decimal];\n    } else if (symbol === NumberSymbol.CurrencyGroup) {\n      return data[ɵLocaleDataIndex.NumberSymbols][NumberSymbol.Group];\n    }\n  }\n  return res;\n}\n\n/**\n * Retrieves a number format for a given locale.\n *\n * Numbers are formatted using patterns, like `#,###.00`. For example, the pattern `#,###.00`\n * when used to format the number 12345.678 could result in \"12'345,678\". That would happen if the\n * grouping separator for your language is an apostrophe, and the decimal separator is a comma.\n *\n * <b>Important:</b> The characters `.` `,` `0` `#` (and others below) are special placeholders\n * that stand for the decimal separator, and so on, and are NOT real characters.\n * You must NOT \"translate\" the placeholders. For example, don't change `.` to `,` even though in\n * your language the decimal point is written with a comma. The symbols should be replaced by the\n * local equivalents, using the appropriate `NumberSymbol` for your language.\n *\n * Here are the special characters used in number patterns:\n *\n * | Symbol | Meaning |\n * |--------|---------|\n * | . | Replaced automatically by the character used for the decimal point. |\n * | , | Replaced by the \"grouping\" (thousands) separator. |\n * | 0 | Replaced by a digit (or zero if there aren't enough digits). |\n * | # | Replaced by a digit (or nothing if there aren't enough). |\n * | ¤ | Replaced by a currency symbol, such as $ or USD. |\n * | % | Marks a percent format. The % symbol may change position, but must be retained. |\n * | E | Marks a scientific format. The E symbol may change position, but must be retained. |\n * | ' | Special characters used as literal characters are quoted with ASCII single quotes. |\n *\n * @param locale A locale code for the locale format rules to use.\n * @param type The type of numeric value to be formatted (such as `Decimal` or `Currency`.)\n * @returns The localized format string.\n * @see `NumberFormatStyle`\n * @see [CLDR website](http://cldr.unicode.org/translation/number-patterns)\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleNumberFormat(locale: string, type: NumberFormatStyle): string {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.NumberFormats][type];\n}\n\n/**\n * Retrieves the symbol used to represent the currency for the main country\n * corresponding to a given locale. For example, '$' for `en-US`.\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The localized symbol character,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleCurrencySymbol(locale: string): string|null {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.CurrencySymbol] || null;\n}\n\n/**\n * Retrieves the name of the currency for the main country corresponding\n * to a given locale. For example, 'US Dollar' for `en-US`.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency name,\n * or `null` if the main country cannot be determined.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleCurrencyName(locale: string): string|null {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.CurrencyName] || null;\n}\n\n/**\n * Retrieves the default currency code for the given locale.\n *\n * The default is defined as the first currency which is still in use.\n *\n * @param locale The code of the locale whose currency code we want.\n * @returns The code of the default currency for the given locale.\n *\n * @publicApi\n */\nexport function getLocaleCurrencyCode(locale: string): string|null {\n  return ɵgetLocaleCurrencyCode(locale);\n}\n\n/**\n * Retrieves the currency values for a given locale.\n * @param locale A locale code for the locale format rules to use.\n * @returns The currency values.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nfunction getLocaleCurrencies(locale: string): {[code: string]: CurrenciesSymbols} {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.Currencies];\n}\n\n/**\n * @alias core/ɵgetLocalePluralCase\n * @publicApi\n */\nexport const getLocalePluralCase: (locale: string) => ((value: number) => Plural) =\n    ɵgetLocalePluralCase;\n\nfunction checkFullData(data: any) {\n  if (!data[ɵLocaleDataIndex.ExtraData]) {\n    throw new Error(`Missing extra locale data for the locale \"${\n        data[ɵLocaleDataIndex\n                 .LocaleId]}\". Use \"registerLocaleData\" to load new data. See the \"I18n guide\" on angular.io to know more.`);\n  }\n}\n\n/**\n * Retrieves locale-specific rules used to determine which day period to use\n * when more than one period is defined for a locale.\n *\n * There is a rule for each defined day period. The\n * first rule is applied to the first day period and so on.\n * Fall back to AM/PM when no rules are available.\n *\n * A rule can specify a period as time range, or as a single time value.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @returns The rules for the locale, a single time value or array of *from-time, to-time*,\n * or null if no periods are available.\n *\n * @see `getLocaleExtraDayPeriods()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleExtraDayPeriodRules(locale: string): (Time|[Time, Time])[] {\n  const data = ɵfindLocaleData(locale);\n  checkFullData(data);\n  const rules = data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodsRules] || [];\n  return rules.map((rule: string|[string, string]) => {\n    if (typeof rule === 'string') {\n      return extractTime(rule);\n    }\n    return [extractTime(rule[0]), extractTime(rule[1])];\n  });\n}\n\n/**\n * Retrieves locale-specific day periods, which indicate roughly how a day is broken up\n * in different languages.\n * For example, for `en-US`, periods are morning, noon, afternoon, evening, and midnight.\n *\n * This functionality is only available when you have loaded the full locale data.\n * See the [\"I18n guide\"](guide/i18n#i18n-pipes).\n *\n * @param locale A locale code for the locale format rules to use.\n * @param formStyle The required grammatical form.\n * @param width The required character width.\n * @returns The translated day-period strings.\n * @see `getLocaleExtraDayPeriodRules()`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getLocaleExtraDayPeriods(\n    locale: string, formStyle: FormStyle, width: TranslationWidth): string[] {\n  const data = ɵfindLocaleData(locale);\n  checkFullData(data);\n  const dayPeriodsData = <string[][][]>[\n    data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodFormats],\n    data[ɵLocaleDataIndex.ExtraData][ɵExtraLocaleDataIndex.ExtraDayPeriodStandalone]\n  ];\n  const dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n  return getLastDefinedValue(dayPeriods, width) || [];\n}\n\n/**\n * Retrieves the writing direction of a specified locale\n * @param locale A locale code for the locale format rules to use.\n * @publicApi\n * @returns 'rtl' or 'ltr'\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n */\nexport function getLocaleDirection(locale: string): 'ltr'|'rtl' {\n  const data = ɵfindLocaleData(locale);\n  return data[ɵLocaleDataIndex.Directionality];\n}\n\n/**\n * Retrieves the first value that is defined in an array, going backwards from an index position.\n *\n * To avoid repeating the same data (as when the \"format\" and \"standalone\" forms are the same)\n * add the first value to the locale data arrays, and add other values only if they are different.\n *\n * @param data The data array to retrieve from.\n * @param index A 0-based index into the array to start from.\n * @returns The value immediately before the given index position.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nfunction getLastDefinedValue<T>(data: T[], index: number): T {\n  for (let i = index; i > -1; i--) {\n    if (typeof data[i] !== 'undefined') {\n      return data[i];\n    }\n  }\n  throw new Error('Locale data API: locale data undefined');\n}\n\n/**\n * Represents a time value with hours and minutes.\n *\n * @publicApi\n */\nexport type Time = {\n  hours: number,\n  minutes: number\n};\n\n/**\n * Extracts the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time: string): Time {\n  const [h, m] = time.split(':');\n  return {hours: +h, minutes: +m};\n}\n\n\n\n/**\n * Retrieves the currency symbol for a given currency code.\n *\n * For example, for the default `en-US` locale, the code `USD` can\n * be represented by the narrow symbol `$` or the wide symbol `US$`.\n *\n * @param code The currency code.\n * @param format The format, `wide` or `narrow`.\n * @param locale A locale code for the locale format rules to use.\n *\n * @returns The symbol, or the currency code if no symbol is available.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getCurrencySymbol(code: string, format: 'wide'|'narrow', locale = 'en'): string {\n  const currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n  const symbolNarrow = currency[ɵCurrencyIndex.SymbolNarrow];\n\n  if (format === 'narrow' && typeof symbolNarrow === 'string') {\n    return symbolNarrow;\n  }\n\n  return currency[ɵCurrencyIndex.Symbol] || code;\n}\n\n// Most currencies have cents, that's why the default is 2\nconst DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n\n/**\n * Reports the number of decimal digits for a given currency.\n * The value depends upon the presence of cents in that particular currency.\n *\n * @param code The currency code.\n * @returns The number of decimal digits, typically 0 or 2.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function getNumberOfCurrencyDigits(code: string): number {\n  let digits;\n  const currency = CURRENCIES_EN[code];\n  if (currency) {\n    digits = currency[ɵCurrencyIndex.NbOfDigits];\n  }\n  return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FormatWidth, FormStyle, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleDayNames, getLocaleDayPeriods, getLocaleEraNames, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocaleId, getLocaleMonthNames, getLocaleNumberSymbol, getLocaleTimeFormat, NumberSymbol, Time, TranslationWidth} from './locale_data_api';\n\nexport const ISO8601_DATE_REGEX =\n    /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n//    1        2       3         4          5          6          7          8  9     10      11\nconst NAMED_FORMATS: {[localeId: string]: {[format: string]: string}} = {};\nconst DATE_FORMATS_SPLIT =\n    /((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\\s\\S]*)/;\n\nenum ZoneWidth {\n  Short,\n  ShortGMT,\n  Long,\n  Extended\n}\n\nenum DateType {\n  FullYear,\n  Month,\n  Date,\n  Hours,\n  Minutes,\n  Seconds,\n  FractionalSeconds,\n  Day\n}\n\nenum TranslationType {\n  DayPeriods,\n  Days,\n  Months,\n  Eras\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * @param value The date to format, as a Date, or a number (milliseconds since UTC epoch)\n * or an [ISO date-time string](https://www.w3.org/TR/NOTE-datetime).\n * @param format The date-time components to include. See `DatePipe` for details.\n * @param locale A locale code for the locale format rules to use.\n * @param timezone The time zone. A time zone offset from GMT (such as `'+0430'`),\n * or a standard UTC/GMT or continental US time zone abbreviation.\n * If not specified, uses host system settings.\n *\n * @returns The formatted date string.\n *\n * @see `DatePipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatDate(\n    value: string|number|Date, format: string, locale: string, timezone?: string): string {\n  let date = toDate(value);\n  const namedFormat = getNamedFormat(locale, format);\n  format = namedFormat || format;\n\n  let parts: string[] = [];\n  let match;\n  while (format) {\n    match = DATE_FORMATS_SPLIT.exec(format);\n    if (match) {\n      parts = parts.concat(match.slice(1));\n      const part = parts.pop();\n      if (!part) {\n        break;\n      }\n      format = part;\n    } else {\n      parts.push(format);\n      break;\n    }\n  }\n\n  let dateTimezoneOffset = date.getTimezoneOffset();\n  if (timezone) {\n    dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n    date = convertTimezoneToLocal(date, timezone, true);\n  }\n\n  let text = '';\n  parts.forEach(value => {\n    const dateFormatter = getDateFormatter(value);\n    text += dateFormatter ?\n        dateFormatter(date, locale, dateTimezoneOffset) :\n        value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n  });\n\n  return text;\n}\n\nfunction getNamedFormat(locale: string, format: string): string {\n  const localeId = getLocaleId(locale);\n  NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n\n  if (NAMED_FORMATS[localeId][format]) {\n    return NAMED_FORMATS[localeId][format];\n  }\n\n  let formatValue = '';\n  switch (format) {\n    case 'shortDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullDate':\n      formatValue = getLocaleDateFormat(locale, FormatWidth.Full);\n      break;\n    case 'shortTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Short);\n      break;\n    case 'mediumTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Medium);\n      break;\n    case 'longTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Long);\n      break;\n    case 'fullTime':\n      formatValue = getLocaleTimeFormat(locale, FormatWidth.Full);\n      break;\n    case 'short':\n      const shortTime = getNamedFormat(locale, 'shortTime');\n      const shortDate = getNamedFormat(locale, 'shortDate');\n      formatValue = formatDateTime(\n          getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n      break;\n    case 'medium':\n      const mediumTime = getNamedFormat(locale, 'mediumTime');\n      const mediumDate = getNamedFormat(locale, 'mediumDate');\n      formatValue = formatDateTime(\n          getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n      break;\n    case 'long':\n      const longTime = getNamedFormat(locale, 'longTime');\n      const longDate = getNamedFormat(locale, 'longDate');\n      formatValue =\n          formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n      break;\n    case 'full':\n      const fullTime = getNamedFormat(locale, 'fullTime');\n      const fullDate = getNamedFormat(locale, 'fullDate');\n      formatValue =\n          formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Full), [fullTime, fullDate]);\n      break;\n  }\n  if (formatValue) {\n    NAMED_FORMATS[localeId][format] = formatValue;\n  }\n  return formatValue;\n}\n\nfunction formatDateTime(str: string, opt_values: string[]) {\n  if (opt_values) {\n    str = str.replace(/\\{([^}]+)}/g, function(match, key) {\n      return (opt_values != null && key in opt_values) ? opt_values[key] : match;\n    });\n  }\n  return str;\n}\n\nfunction padNumber(\n    num: number, digits: number, minusSign = '-', trim?: boolean, negWrap?: boolean): string {\n  let neg = '';\n  if (num < 0 || (negWrap && num <= 0)) {\n    if (negWrap) {\n      num = -num + 1;\n    } else {\n      num = -num;\n      neg = minusSign;\n    }\n  }\n  let strNum = String(num);\n  while (strNum.length < digits) {\n    strNum = '0' + strNum;\n  }\n  if (trim) {\n    strNum = strNum.substr(strNum.length - digits);\n  }\n  return neg + strNum;\n}\n\nfunction formatFractionalSeconds(milliseconds: number, digits: number): string {\n  const strMs = padNumber(milliseconds, 3);\n  return strMs.substr(0, digits);\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(\n    name: DateType, size: number, offset: number = 0, trim = false,\n    negWrap = false): DateFormatter {\n  return function(date: Date, locale: string): string {\n    let part = getDatePart(name, date);\n    if (offset > 0 || part > -offset) {\n      part += offset;\n    }\n\n    if (name === DateType.Hours) {\n      if (part === 0 && offset === -12) {\n        part = 12;\n      }\n    } else if (name === DateType.FractionalSeconds) {\n      return formatFractionalSeconds(part, size);\n    }\n\n    const localeMinus = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    return padNumber(part, size, localeMinus, trim, negWrap);\n  };\n}\n\nfunction getDatePart(part: DateType, date: Date): number {\n  switch (part) {\n    case DateType.FullYear:\n      return date.getFullYear();\n    case DateType.Month:\n      return date.getMonth();\n    case DateType.Date:\n      return date.getDate();\n    case DateType.Hours:\n      return date.getHours();\n    case DateType.Minutes:\n      return date.getMinutes();\n    case DateType.Seconds:\n      return date.getSeconds();\n    case DateType.FractionalSeconds:\n      return date.getMilliseconds();\n    case DateType.Day:\n      return date.getDay();\n    default:\n      throw new Error(`Unknown DateType value \"${part}\".`);\n  }\n}\n\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(\n    name: TranslationType, width: TranslationWidth, form: FormStyle = FormStyle.Format,\n    extended = false): DateFormatter {\n  return function(date: Date, locale: string): string {\n    return getDateTranslation(date, locale, name, width, form, extended);\n  };\n}\n\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(\n    date: Date, locale: string, name: TranslationType, width: TranslationWidth, form: FormStyle,\n    extended: boolean) {\n  switch (name) {\n    case TranslationType.Months:\n      return getLocaleMonthNames(locale, form, width)[date.getMonth()];\n    case TranslationType.Days:\n      return getLocaleDayNames(locale, form, width)[date.getDay()];\n    case TranslationType.DayPeriods:\n      const currentHours = date.getHours();\n      const currentMinutes = date.getMinutes();\n      if (extended) {\n        const rules = getLocaleExtraDayPeriodRules(locale);\n        const dayPeriods = getLocaleExtraDayPeriods(locale, form, width);\n        const index = rules.findIndex(rule => {\n          if (Array.isArray(rule)) {\n            // morning, afternoon, evening, night\n            const [from, to] = rule;\n            const afterFrom = currentHours >= from.hours && currentMinutes >= from.minutes;\n            const beforeTo =\n                (currentHours < to.hours ||\n                 (currentHours === to.hours && currentMinutes < to.minutes));\n            // We must account for normal rules that span a period during the day (e.g. 6am-9am)\n            // where `from` is less (earlier) than `to`. But also rules that span midnight (e.g.\n            // 10pm - 5am) where `from` is greater (later!) than `to`.\n            //\n            // In the first case the current time must be BOTH after `from` AND before `to`\n            // (e.g. 8am is after 6am AND before 10am).\n            //\n            // In the second case the current time must be EITHER after `from` OR before `to`\n            // (e.g. 4am is before 5am but not after 10pm; and 11pm is not before 5am but it is\n            // after 10pm).\n            if (from.hours < to.hours) {\n              if (afterFrom && beforeTo) {\n                return true;\n              }\n            } else if (afterFrom || beforeTo) {\n              return true;\n            }\n          } else {  // noon or midnight\n            if (rule.hours === currentHours && rule.minutes === currentMinutes) {\n              return true;\n            }\n          }\n          return false;\n        });\n        if (index !== -1) {\n          return dayPeriods[index];\n        }\n      }\n      // if no rules for the day periods, we use am/pm by default\n      return getLocaleDayPeriods(locale, form, <TranslationWidth>width)[currentHours < 12 ? 0 : 1];\n    case TranslationType.Eras:\n      return getLocaleEraNames(locale, <TranslationWidth>width)[date.getFullYear() <= 0 ? 0 : 1];\n    default:\n      // This default case is not needed by TypeScript compiler, as the switch is exhaustive.\n      // However Closure Compiler does not understand that and reports an error in typed mode.\n      // The `throw new Error` below works around the problem, and the unexpected: never variable\n      // makes sure tsc still checks this code is unreachable.\n      const unexpected: never = name;\n      throw new Error(`unexpected translation type ${unexpected}`);\n  }\n}\n\n/**\n * Returns a date formatter that transforms a date and an offset into a timezone with ISO8601 or\n * GMT format depending on the width (eg: short = +0430, short:GMT = GMT+4, long = GMT+04:30,\n * extended = +04:30)\n */\nfunction timeZoneGetter(width: ZoneWidth): DateFormatter {\n  return function(date: Date, locale: string, offset: number) {\n    const zone = -1 * offset;\n    const minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n    const hours = zone > 0 ? Math.floor(zone / 60) : Math.ceil(zone / 60);\n    switch (width) {\n      case ZoneWidth.Short:\n        return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) +\n            padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.ShortGMT:\n        return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 1, minusSign);\n      case ZoneWidth.Long:\n        return 'GMT' + ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n            padNumber(Math.abs(zone % 60), 2, minusSign);\n      case ZoneWidth.Extended:\n        if (offset === 0) {\n          return 'Z';\n        } else {\n          return ((zone >= 0) ? '+' : '') + padNumber(hours, 2, minusSign) + ':' +\n              padNumber(Math.abs(zone % 60), 2, minusSign);\n        }\n      default:\n        throw new Error(`Unknown zone width \"${width}\"`);\n    }\n  };\n}\n\nconst JANUARY = 0;\nconst THURSDAY = 4;\nfunction getFirstThursdayOfYear(year: number) {\n  const firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();\n  return new Date(\n      year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\n\nfunction getThursdayThisWeek(datetime: Date) {\n  return new Date(\n      datetime.getFullYear(), datetime.getMonth(),\n      datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\n\nfunction weekGetter(size: number, monthBased = false): DateFormatter {\n  return function(date: Date, locale: string) {\n    let result;\n    if (monthBased) {\n      const nbDaysBefore1stDayOfMonth =\n          new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n      const today = date.getDate();\n      result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n    } else {\n      const thisThurs = getThursdayThisWeek(date);\n      // Some days of a year are part of next year according to ISO 8601.\n      // Compute the firstThurs from the year of this week's Thursday\n      const firstThurs = getFirstThursdayOfYear(thisThurs.getFullYear());\n      const diff = thisThurs.getTime() - firstThurs.getTime();\n      result = 1 + Math.round(diff / 6.048e8);  // 6.048e8 ms per week\n    }\n\n    return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  };\n}\n\ntype DateFormatter = (date: Date, locale: string, offset: number) => string;\n\nconst DATE_FORMATS: {[format: string]: DateFormatter} = {};\n\n// Based on CLDR formats:\n// See complete list: http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n// See also explanations: http://cldr.unicode.org/translation/date-time\n// TODO(ocombe): support all missing cldr formats: Y, U, Q, D, F, e, c, j, J, C, A, v, V, X, x\nfunction getDateFormatter(format: string): DateFormatter|null {\n  if (DATE_FORMATS[format]) {\n    return DATE_FORMATS[format];\n  }\n  let formatter;\n  switch (format) {\n    // Era name (AD/BC)\n    case 'G':\n    case 'GG':\n    case 'GGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Abbreviated);\n      break;\n    case 'GGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Wide);\n      break;\n    case 'GGGGG':\n      formatter = dateStrGetter(TranslationType.Eras, TranslationWidth.Narrow);\n      break;\n\n    // 1 digit representation of the year, e.g. (AD 1 => 1, AD 199 => 199)\n    case 'y':\n      formatter = dateGetter(DateType.FullYear, 1, 0, false, true);\n      break;\n    // 2 digit representation of the year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yy':\n      formatter = dateGetter(DateType.FullYear, 2, 0, true, true);\n      break;\n    // 3 digit representation of the year, padded (000-999). (e.g. AD 2001 => 01, AD 2010 => 10)\n    case 'yyy':\n      formatter = dateGetter(DateType.FullYear, 3, 0, false, true);\n      break;\n    // 4 digit representation of the year (e.g. AD 1 => 0001, AD 2010 => 2010)\n    case 'yyyy':\n      formatter = dateGetter(DateType.FullYear, 4, 0, false, true);\n      break;\n\n    // Month of the year (1-12), numeric\n    case 'M':\n    case 'L':\n      formatter = dateGetter(DateType.Month, 1, 1);\n      break;\n    case 'MM':\n    case 'LL':\n      formatter = dateGetter(DateType.Month, 2, 1);\n      break;\n\n    // Month of the year (January, ...), string, format\n    case 'MMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated);\n      break;\n    case 'MMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Wide);\n      break;\n    case 'MMMMM':\n      formatter = dateStrGetter(TranslationType.Months, TranslationWidth.Narrow);\n      break;\n\n    // Month of the year (January, ...), string, standalone\n    case 'LLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Abbreviated, FormStyle.Standalone);\n      break;\n    case 'LLLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Wide, FormStyle.Standalone);\n      break;\n    case 'LLLLL':\n      formatter =\n          dateStrGetter(TranslationType.Months, TranslationWidth.Narrow, FormStyle.Standalone);\n      break;\n\n    // Week of the year (1, ... 52)\n    case 'w':\n      formatter = weekGetter(1);\n      break;\n    case 'ww':\n      formatter = weekGetter(2);\n      break;\n\n    // Week of the month (1, ...)\n    case 'W':\n      formatter = weekGetter(1, true);\n      break;\n\n    // Day of the month (1-31)\n    case 'd':\n      formatter = dateGetter(DateType.Date, 1);\n      break;\n    case 'dd':\n      formatter = dateGetter(DateType.Date, 2);\n      break;\n\n    // Day of the Week\n    case 'E':\n    case 'EE':\n    case 'EEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Abbreviated);\n      break;\n    case 'EEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Wide);\n      break;\n    case 'EEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Narrow);\n      break;\n    case 'EEEEEE':\n      formatter = dateStrGetter(TranslationType.Days, TranslationWidth.Short);\n      break;\n\n    // Generic period of the day (am-pm)\n    case 'a':\n    case 'aa':\n    case 'aaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated);\n      break;\n    case 'aaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide);\n      break;\n    case 'aaaaa':\n      formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow);\n      break;\n\n    // Extended period of the day (midnight, at night, ...), standalone\n    case 'b':\n    case 'bb':\n    case 'bbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n      break;\n    case 'bbbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n      break;\n    case 'bbbbb':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n      break;\n\n    // Extended period of the day (midnight, night, ...), standalone\n    case 'B':\n    case 'BB':\n    case 'BBB':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Format, true);\n      break;\n    case 'BBBB':\n      formatter =\n          dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Format, true);\n      break;\n    case 'BBBBB':\n      formatter = dateStrGetter(\n          TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n      break;\n\n    // Hour in AM/PM, (1-12)\n    case 'h':\n      formatter = dateGetter(DateType.Hours, 1, -12);\n      break;\n    case 'hh':\n      formatter = dateGetter(DateType.Hours, 2, -12);\n      break;\n\n    // Hour of the day (0-23)\n    case 'H':\n      formatter = dateGetter(DateType.Hours, 1);\n      break;\n    // Hour in day, padded (00-23)\n    case 'HH':\n      formatter = dateGetter(DateType.Hours, 2);\n      break;\n\n    // Minute of the hour (0-59)\n    case 'm':\n      formatter = dateGetter(DateType.Minutes, 1);\n      break;\n    case 'mm':\n      formatter = dateGetter(DateType.Minutes, 2);\n      break;\n\n    // Second of the minute (0-59)\n    case 's':\n      formatter = dateGetter(DateType.Seconds, 1);\n      break;\n    case 'ss':\n      formatter = dateGetter(DateType.Seconds, 2);\n      break;\n\n    // Fractional second\n    case 'S':\n      formatter = dateGetter(DateType.FractionalSeconds, 1);\n      break;\n    case 'SS':\n      formatter = dateGetter(DateType.FractionalSeconds, 2);\n      break;\n    case 'SSS':\n      formatter = dateGetter(DateType.FractionalSeconds, 3);\n      break;\n\n\n    // Timezone ISO8601 short format (-0430)\n    case 'Z':\n    case 'ZZ':\n    case 'ZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Short);\n      break;\n    // Timezone ISO8601 extended format (-04:30)\n    case 'ZZZZZ':\n      formatter = timeZoneGetter(ZoneWidth.Extended);\n      break;\n\n    // Timezone GMT short format (GMT+4)\n    case 'O':\n    case 'OO':\n    case 'OOO':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'z':\n    case 'zz':\n    case 'zzz':\n      formatter = timeZoneGetter(ZoneWidth.ShortGMT);\n      break;\n    // Timezone GMT long format (GMT+0430)\n    case 'OOOO':\n    case 'ZZZZ':\n    // Should be location, but fallback to format O instead because we don't have the data yet\n    case 'zzzz':\n      formatter = timeZoneGetter(ZoneWidth.Long);\n      break;\n    default:\n      return null;\n  }\n  DATE_FORMATS[format] = formatter;\n  return formatter;\n}\n\nfunction timezoneToOffset(timezone: string, fallback: number): number {\n  // Support: IE 9-11 only, Edge 13-15+\n  // IE/Edge do not \"understand\" colon (`:`) in timezone\n  timezone = timezone.replace(/:/g, '');\n  const requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n  return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\n\nfunction addDateMinutes(date: Date, minutes: number) {\n  date = new Date(date.getTime());\n  date.setMinutes(date.getMinutes() + minutes);\n  return date;\n}\n\nfunction convertTimezoneToLocal(date: Date, timezone: string, reverse: boolean): Date {\n  const reverseValue = reverse ? -1 : 1;\n  const dateTimezoneOffset = date.getTimezoneOffset();\n  const timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n  return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\n}\n\n/**\n * Converts a value to date.\n *\n * Supported input formats:\n * - `Date`\n * - number: timestamp\n * - string: numeric (e.g. \"1234\"), ISO and date strings in a format supported by\n *   [Date.parse()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse).\n *   Note: ISO strings without time return a date without timeoffset.\n *\n * Throws if unable to convert to a date.\n */\nexport function toDate(value: string|number|Date): Date {\n  if (isDate(value)) {\n    return value;\n  }\n\n  if (typeof value === 'number' && !isNaN(value)) {\n    return new Date(value);\n  }\n\n  if (typeof value === 'string') {\n    value = value.trim();\n\n    const parsedNb = parseFloat(value);\n\n    // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n    if (!isNaN(value as any - parsedNb)) {\n      return new Date(parsedNb);\n    }\n\n    if (/^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)) {\n      /* For ISO Strings without time the day, month and year must be extracted from the ISO String\n      before Date creation to avoid time offset and errors in the new Date.\n      If we only replace '-' with ',' in the ISO String (\"2015,01,01\"), and try to create a new\n      date, some browsers (e.g. IE 9) will throw an invalid Date error.\n      If we leave the '-' (\"2015-01-01\") and try to create a new Date(\"2015-01-01\") the timeoffset\n      is applied.\n      Note: ISO months are 0 for January, 1 for February, ... */\n      const [y, m, d] = value.split('-').map((val: string) => +val);\n      return new Date(y, m - 1, d);\n    }\n\n    let match: RegExpMatchArray|null;\n    if (match = value.match(ISO8601_DATE_REGEX)) {\n      return isoStringToDate(match);\n    }\n  }\n\n  const date = new Date(value as any);\n  if (!isDate(date)) {\n    throw new Error(`Unable to convert \"${value}\" into a date`);\n  }\n  return date;\n}\n\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nexport function isoStringToDate(match: RegExpMatchArray): Date {\n  const date = new Date(0);\n  let tzHour = 0;\n  let tzMin = 0;\n\n  // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n  const dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n  const timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n  // if there is a timezone defined like \"+01:00\" or \"+0100\"\n  if (match[9]) {\n    tzHour = Number(match[9] + match[10]);\n    tzMin = Number(match[9] + match[11]);\n  }\n  dateSetter.call(date, Number(match[1]), Number(match[2]) - 1, Number(match[3]));\n  const h = Number(match[4] || 0) - tzHour;\n  const m = Number(match[5] || 0) - tzMin;\n  const s = Number(match[6] || 0);\n  const ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n  timeSetter.call(date, h, m, s, ms);\n  return date;\n}\n\nexport function isDate(value: any): value is Date {\n  return value instanceof Date && !isNaN(value.valueOf());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {getLocaleNumberFormat, getLocaleNumberSymbol, getNumberOfCurrencyDigits, NumberFormatStyle, NumberSymbol} from './locale_data_api';\n\nexport const NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nconst MAX_DIGITS = 22;\nconst DECIMAL_SEP = '.';\nconst ZERO_CHAR = '0';\nconst PATTERN_SEP = ';';\nconst GROUP_SEP = ',';\nconst DIGIT_CHAR = '#';\nconst CURRENCY_CHAR = '¤';\nconst PERCENT_CHAR = '%';\n\n/**\n * Transforms a number to a locale string based on a style and a format.\n */\nfunction formatNumberToLocaleString(\n    value: number, pattern: ParsedNumberFormat, locale: string, groupSymbol: NumberSymbol,\n    decimalSymbol: NumberSymbol, digitsInfo?: string, isPercent = false): string {\n  let formattedText = '';\n  let isZero = false;\n\n  if (!isFinite(value)) {\n    formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n  } else {\n    let parsedNumber = parseNumber(value);\n\n    if (isPercent) {\n      parsedNumber = toPercent(parsedNumber);\n    }\n\n    let minInt = pattern.minInt;\n    let minFraction = pattern.minFrac;\n    let maxFraction = pattern.maxFrac;\n\n    if (digitsInfo) {\n      const parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n      if (parts === null) {\n        throw new Error(`${digitsInfo} is not a valid digit info`);\n      }\n      const minIntPart = parts[1];\n      const minFractionPart = parts[3];\n      const maxFractionPart = parts[5];\n      if (minIntPart != null) {\n        minInt = parseIntAutoRadix(minIntPart);\n      }\n      if (minFractionPart != null) {\n        minFraction = parseIntAutoRadix(minFractionPart);\n      }\n      if (maxFractionPart != null) {\n        maxFraction = parseIntAutoRadix(maxFractionPart);\n      } else if (minFractionPart != null && minFraction > maxFraction) {\n        maxFraction = minFraction;\n      }\n    }\n\n    roundNumber(parsedNumber, minFraction, maxFraction);\n\n    let digits = parsedNumber.digits;\n    let integerLen = parsedNumber.integerLen;\n    const exponent = parsedNumber.exponent;\n    let decimals = [];\n    isZero = digits.every(d => !d);\n\n    // pad zeros for small numbers\n    for (; integerLen < minInt; integerLen++) {\n      digits.unshift(0);\n    }\n\n    // pad zeros for small numbers\n    for (; integerLen < 0; integerLen++) {\n      digits.unshift(0);\n    }\n\n    // extract decimals digits\n    if (integerLen > 0) {\n      decimals = digits.splice(integerLen, digits.length);\n    } else {\n      decimals = digits;\n      digits = [0];\n    }\n\n    // format the integer digits with grouping separators\n    const groups = [];\n    if (digits.length >= pattern.lgSize) {\n      groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n    }\n\n    while (digits.length > pattern.gSize) {\n      groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n    }\n\n    if (digits.length) {\n      groups.unshift(digits.join(''));\n    }\n\n    formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n\n    // append the decimal digits\n    if (decimals.length) {\n      formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n    }\n\n    if (exponent) {\n      formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n    }\n  }\n\n  if (value < 0 && !isZero) {\n    formattedText = pattern.negPre + formattedText + pattern.negSuf;\n  } else {\n    formattedText = pattern.posPre + formattedText + pattern.posSuf;\n  }\n\n  return formattedText;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param currency A string containing the currency symbol or its name,\n * such as \"$\" or \"Canadian Dollar\". Used in output string, but does not affect the operation\n * of the function.\n * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)\n * currency code, such as `USD` for the US dollar and `EUR` for the euro.\n * Used to determine the number of digits in the decimal part.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted currency value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatCurrency(\n    value: number, locale: string, currency: string, currencyCode?: string,\n    digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n\n  pattern.minFrac = getNumberOfCurrencyDigits(currencyCode!);\n  pattern.maxFrac = pattern.minFrac;\n\n  const res = formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n  return res\n      .replace(CURRENCY_CHAR, currency)\n      // if we have 2 time the currency character, the second one is ignored\n      .replace(CURRENCY_CHAR, '')\n      // If there is a spacing between currency character and the value and\n      // the currency character is supressed by passing an empty string, the\n      // spacing character would remain as part of the string. Then we\n      // should remove it.\n      .trim();\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted percentage value.\n *\n * @see `formatNumber()`\n * @see `DecimalPipe`\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n * @publicApi\n *\n */\nexport function formatPercent(value: number, locale: string, digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  const res = formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n  return res.replace(\n      new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text, with group sizing, separator, and other\n * parameters based on the locale.\n *\n * @param value The number to format.\n * @param locale A locale code for the locale format rules to use.\n * @param digitInfo Decimal representation options, specified by a string in the following format:\n * `{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}`. See `DecimalPipe` for more details.\n *\n * @returns The formatted text string.\n * @see [Internationalization (i18n) Guide](https://angular.io/guide/i18n)\n *\n * @publicApi\n */\nexport function formatNumber(value: number, locale: string, digitsInfo?: string): string {\n  const format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n  const pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n  return formatNumberToLocaleString(\n      value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\n\ninterface ParsedNumberFormat {\n  minInt: number;\n  // the minimum number of digits required in the fraction part of the number\n  minFrac: number;\n  // the maximum number of digits required in the fraction part of the number\n  maxFrac: number;\n  // the prefix for a positive number\n  posPre: string;\n  // the suffix for a positive number\n  posSuf: string;\n  // the prefix for a negative number (e.g. `-` or `(`))\n  negPre: string;\n  // the suffix for a negative number (e.g. `)`)\n  negSuf: string;\n  // number of digits in each group of separated digits\n  gSize: number;\n  // number of digits in the last group of digits before the decimal separator\n  lgSize: number;\n}\n\nfunction parseNumberFormat(format: string, minusSign = '-'): ParsedNumberFormat {\n  const p = {\n    minInt: 1,\n    minFrac: 0,\n    maxFrac: 0,\n    posPre: '',\n    posSuf: '',\n    negPre: '',\n    negSuf: '',\n    gSize: 0,\n    lgSize: 0\n  };\n\n  const patternParts = format.split(PATTERN_SEP);\n  const positive = patternParts[0];\n  const negative = patternParts[1];\n\n  const positiveParts = positive.indexOf(DECIMAL_SEP) !== -1 ?\n      positive.split(DECIMAL_SEP) :\n      [\n        positive.substring(0, positive.lastIndexOf(ZERO_CHAR) + 1),\n        positive.substring(positive.lastIndexOf(ZERO_CHAR) + 1)\n      ],\n        integer = positiveParts[0], fraction = positiveParts[1] || '';\n\n  p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));\n\n  for (let i = 0; i < fraction.length; i++) {\n    const ch = fraction.charAt(i);\n    if (ch === ZERO_CHAR) {\n      p.minFrac = p.maxFrac = i + 1;\n    } else if (ch === DIGIT_CHAR) {\n      p.maxFrac = i + 1;\n    } else {\n      p.posSuf += ch;\n    }\n  }\n\n  const groups = integer.split(GROUP_SEP);\n  p.gSize = groups[1] ? groups[1].length : 0;\n  p.lgSize = (groups[2] || groups[1]) ? (groups[2] || groups[1]).length : 0;\n\n  if (negative) {\n    const trunkLen = positive.length - p.posPre.length - p.posSuf.length,\n          pos = negative.indexOf(DIGIT_CHAR);\n\n    p.negPre = negative.substr(0, pos).replace(/'/g, '');\n    p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');\n  } else {\n    p.negPre = minusSign + p.posPre;\n    p.negSuf = p.posSuf;\n  }\n\n  return p;\n}\n\ninterface ParsedNumber {\n  // an array of digits containing leading zeros as necessary\n  digits: number[];\n  // the exponent for numbers that would need more than `MAX_DIGITS` digits in `d`\n  exponent: number;\n  // the number of the digits in `d` that are to the left of the decimal point\n  integerLen: number;\n}\n\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber: ParsedNumber): ParsedNumber {\n  // if the number is 0, don't do anything\n  if (parsedNumber.digits[0] === 0) {\n    return parsedNumber;\n  }\n\n  // Getting the current number of decimals\n  const fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n  if (parsedNumber.exponent) {\n    parsedNumber.exponent += 2;\n  } else {\n    if (fractionLen === 0) {\n      parsedNumber.digits.push(0, 0);\n    } else if (fractionLen === 1) {\n      parsedNumber.digits.push(0);\n    }\n    parsedNumber.integerLen += 2;\n  }\n\n  return parsedNumber;\n}\n\n/**\n * Parses a number.\n * Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/\n */\nfunction parseNumber(num: number): ParsedNumber {\n  let numStr = Math.abs(num) + '';\n  let exponent = 0, digits, integerLen;\n  let i, j, zeros;\n\n  // Decimal point?\n  if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n    numStr = numStr.replace(DECIMAL_SEP, '');\n  }\n\n  // Exponential form?\n  if ((i = numStr.search(/e/i)) > 0) {\n    // Work out the exponent.\n    if (integerLen < 0) integerLen = i;\n    integerLen += +numStr.slice(i + 1);\n    numStr = numStr.substring(0, i);\n  } else if (integerLen < 0) {\n    // There was no decimal point or exponent so it is an integer.\n    integerLen = numStr.length;\n  }\n\n  // Count the number of leading zeros.\n  for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */\n  }\n\n  if (i === (zeros = numStr.length)) {\n    // The digits are all zero.\n    digits = [0];\n    integerLen = 1;\n  } else {\n    // Count the number of trailing zeros\n    zeros--;\n    while (numStr.charAt(zeros) === ZERO_CHAR) zeros--;\n\n    // Trailing zeros are insignificant so ignore them\n    integerLen -= i;\n    digits = [];\n    // Convert string to array of digits without leading/trailing zeros.\n    for (j = 0; i <= zeros; i++, j++) {\n      digits[j] = Number(numStr.charAt(i));\n    }\n  }\n\n  // If the number overflows the maximum allowed digits then use an exponent.\n  if (integerLen > MAX_DIGITS) {\n    digits = digits.splice(0, MAX_DIGITS - 1);\n    exponent = integerLen - 1;\n    integerLen = 1;\n  }\n\n  return {digits, exponent, integerLen};\n}\n\n/**\n * Round the parsed number to the specified number of decimal places\n * This function changes the parsedNumber in-place\n */\nfunction roundNumber(parsedNumber: ParsedNumber, minFrac: number, maxFrac: number) {\n  if (minFrac > maxFrac) {\n    throw new Error(`The minimum number of digits after fraction (${\n        minFrac}) is higher than the maximum (${maxFrac}).`);\n  }\n\n  let digits = parsedNumber.digits;\n  let fractionLen = digits.length - parsedNumber.integerLen;\n  const fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n\n  // The index of the digit to where rounding is to occur\n  let roundAt = fractionSize + parsedNumber.integerLen;\n  let digit = digits[roundAt];\n\n  if (roundAt > 0) {\n    // Drop fractional digits beyond `roundAt`\n    digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n\n    // Set non-fractional digits beyond `roundAt` to 0\n    for (let j = roundAt; j < digits.length; j++) {\n      digits[j] = 0;\n    }\n  } else {\n    // We rounded to zero so reset the parsedNumber\n    fractionLen = Math.max(0, fractionLen);\n    parsedNumber.integerLen = 1;\n    digits.length = Math.max(1, roundAt = fractionSize + 1);\n    digits[0] = 0;\n    for (let i = 1; i < roundAt; i++) digits[i] = 0;\n  }\n\n  if (digit >= 5) {\n    if (roundAt - 1 < 0) {\n      for (let k = 0; k > roundAt; k--) {\n        digits.unshift(0);\n        parsedNumber.integerLen++;\n      }\n      digits.unshift(1);\n      parsedNumber.integerLen++;\n    } else {\n      digits[roundAt - 1]++;\n    }\n  }\n\n  // Pad out with zeros to get the required fraction length\n  for (; fractionLen < Math.max(0, fractionSize); fractionLen++) digits.push(0);\n\n  let dropTrailingZeros = fractionSize !== 0;\n  // Minimal length = nb of decimals required + current nb of integers\n  // Any number besides that is optional and can be removed if it's a trailing 0\n  const minLen = minFrac + parsedNumber.integerLen;\n  // Do any carrying, e.g. a digit was rounded up to 10\n  const carry = digits.reduceRight(function(carry, d, i, digits) {\n    d = d + carry;\n    digits[i] = d < 10 ? d : d - 10;  // d % 10\n    if (dropTrailingZeros) {\n      // Do not keep meaningless fractional trailing zeros (e.g. 15.52000 --> 15.52)\n      if (digits[i] === 0 && i >= minLen) {\n        digits.pop();\n      } else {\n        dropTrailingZeros = false;\n      }\n    }\n    return d >= 10 ? 1 : 0;  // Math.floor(d / 10);\n  }, 0);\n  if (carry) {\n    digits.unshift(carry);\n    parsedNumber.integerLen++;\n  }\n}\n\nexport function parseIntAutoRadix(text: string): number {\n  const result: number = parseInt(text);\n  if (isNaN(result)) {\n    throw new Error('Invalid integer literal when parsing ' + text);\n  }\n  return result;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, Injectable, LOCALE_ID} from '@angular/core';\n\nimport {getLocalePluralCase, Plural} from './locale_data_api';\n\n\n/**\n * @publicApi\n */\nexport abstract class NgLocalization {\n  abstract getPluralCategory(value: any, locale?: string): string;\n}\n\n\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nexport function getPluralCategory(\n    value: number, cases: string[], ngLocalization: NgLocalization, locale?: string): string {\n  let key = `=${value}`;\n\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n\n  key = ngLocalization.getPluralCategory(value, locale);\n\n  if (cases.indexOf(key) > -1) {\n    return key;\n  }\n\n  if (cases.indexOf('other') > -1) {\n    return 'other';\n  }\n\n  throw new Error(`No plural message found for value \"${value}\"`);\n}\n\n/**\n * Returns the plural case based on the locale\n *\n * @publicApi\n */\n@Injectable()\nexport class NgLocaleLocalization extends NgLocalization {\n  constructor(@Inject(LOCALE_ID) protected locale: string) {\n    super();\n  }\n\n  getPluralCategory(value: any, locale?: string): string {\n    const plural = getLocalePluralCase(locale || this.locale)(value);\n\n    switch (plural) {\n      case Plural.Zero:\n        return 'zero';\n      case Plural.One:\n        return 'one';\n      case Plural.Two:\n        return 'two';\n      case Plural.Few:\n        return 'few';\n      case Plural.Many:\n        return 'many';\n      default:\n        return 'other';\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵregisterLocaleData} from '@angular/core';\n\n/**\n * Register global data to be used internally by Angular. See the\n * [\"I18n guide\"](guide/i18n#i18n-pipes) to know how to import additional locale data.\n *\n * The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\n *\n * @publicApi\n */\nexport function registerLocaleData(data: any, localeId?: string|any, extraData?: any): void {\n  return ɵregisterLocaleData(data, localeId, extraData);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport function parseCookieValue(cookieStr: string, name: string): string|null {\n  name = encodeURIComponent(name);\n  for (const cookie of cookieStr.split(';')) {\n    const eqIndex = cookie.indexOf('=');\n    const [cookieName, cookieValue]: string[] =\n        eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];\n    if (cookieName.trim() === name) {\n      return decodeURIComponent(cookieValue);\n    }\n  }\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directive, DoCheck, ElementRef, Input, IterableChanges, IterableDiffer, IterableDiffers, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Renderer2, ɵisListLikeIterable as isListLikeIterable, ɵstringify as stringify} from '@angular/core';\n\ntype NgClassSupportedTypes = string[]|Set<string>|{[klass: string]: any}|null|undefined;\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n *     <some-element [ngClass]=\"'first second'\">...</some-element>\n *\n *     <some-element [ngClass]=\"['first', 'second']\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'first': true, 'second': true, 'third': false}\">...</some-element>\n *\n *     <some-element [ngClass]=\"stringExp|arrayExp|objExp\">...</some-element>\n *\n *     <some-element [ngClass]=\"{'class1 class2 class3' : true}\">...</some-element>\n * ```\n *\n * @description\n *\n * Adds and removes CSS classes on an HTML element.\n *\n * The CSS classes are updated as follows, depending on the type of the expression evaluation:\n * - `string` - the CSS classes listed in the string (space delimited) are added,\n * - `Array` - the CSS classes declared as Array elements are added,\n * - `Object` - keys are CSS classes that get added when the expression given in the value\n *              evaluates to a truthy value, otherwise they are removed.\n *\n * @publicApi\n */\n@Directive({selector: '[ngClass]'})\nexport class NgClass implements DoCheck {\n  private _iterableDiffer: IterableDiffer<string>|null = null;\n  private _keyValueDiffer: KeyValueDiffer<string, any>|null = null;\n  private _initialClasses: string[] = [];\n  private _rawClass: NgClassSupportedTypes = null;\n\n  constructor(\n      private _iterableDiffers: IterableDiffers, private _keyValueDiffers: KeyValueDiffers,\n      private _ngEl: ElementRef, private _renderer: Renderer2) {}\n\n\n  @Input('class')\n  set klass(value: string) {\n    this._removeClasses(this._initialClasses);\n    this._initialClasses = typeof value === 'string' ? value.split(/\\s+/) : [];\n    this._applyClasses(this._initialClasses);\n    this._applyClasses(this._rawClass);\n  }\n\n  @Input('ngClass')\n  set ngClass(value: string|string[]|Set<string>|{[klass: string]: any}) {\n    this._removeClasses(this._rawClass);\n    this._applyClasses(this._initialClasses);\n\n    this._iterableDiffer = null;\n    this._keyValueDiffer = null;\n\n    this._rawClass = typeof value === 'string' ? value.split(/\\s+/) : value;\n\n    if (this._rawClass) {\n      if (isListLikeIterable(this._rawClass)) {\n        this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n      } else {\n        this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n      }\n    }\n  }\n\n  ngDoCheck() {\n    if (this._iterableDiffer) {\n      const iterableChanges = this._iterableDiffer.diff(this._rawClass as string[]);\n      if (iterableChanges) {\n        this._applyIterableChanges(iterableChanges);\n      }\n    } else if (this._keyValueDiffer) {\n      const keyValueChanges = this._keyValueDiffer.diff(this._rawClass as {[k: string]: any});\n      if (keyValueChanges) {\n        this._applyKeyValueChanges(keyValueChanges);\n      }\n    }\n  }\n\n  private _applyKeyValueChanges(changes: KeyValueChanges<string, any>): void {\n    changes.forEachAddedItem((record) => this._toggleClass(record.key, record.currentValue));\n    changes.forEachChangedItem((record) => this._toggleClass(record.key, record.currentValue));\n    changes.forEachRemovedItem((record) => {\n      if (record.previousValue) {\n        this._toggleClass(record.key, false);\n      }\n    });\n  }\n\n  private _applyIterableChanges(changes: IterableChanges<string>): void {\n    changes.forEachAddedItem((record) => {\n      if (typeof record.item === 'string') {\n        this._toggleClass(record.item, true);\n      } else {\n        throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${\n            stringify(record.item)}`);\n      }\n    });\n\n    changes.forEachRemovedItem((record) => this._toggleClass(record.item, false));\n  }\n\n  /**\n   * Applies a collection of CSS classes to the DOM element.\n   *\n   * For argument of type Set and Array CSS class names contained in those collections are always\n   * added.\n   * For argument of type Map CSS class name in the map's key is toggled based on the value (added\n   * for truthy and removed for falsy).\n   */\n  private _applyClasses(rawClassVal: NgClassSupportedTypes) {\n    if (rawClassVal) {\n      if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n        (<any>rawClassVal).forEach((klass: string) => this._toggleClass(klass, true));\n      } else {\n        Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, !!rawClassVal[klass]));\n      }\n    }\n  }\n\n  /**\n   * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n   * purposes.\n   */\n  private _removeClasses(rawClassVal: NgClassSupportedTypes) {\n    if (rawClassVal) {\n      if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n        (<any>rawClassVal).forEach((klass: string) => this._toggleClass(klass, false));\n      } else {\n        Object.keys(rawClassVal).forEach(klass => this._toggleClass(klass, false));\n      }\n    }\n  }\n\n  private _toggleClass(klass: string, enabled: boolean): void {\n    klass = klass.trim();\n    if (klass) {\n      klass.split(/\\s+/g).forEach(klass => {\n        if (enabled) {\n          this._renderer.addClass(this._ngEl.nativeElement, klass);\n        } else {\n          this._renderer.removeClass(this._ngEl.nativeElement, klass);\n        }\n      });\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef, Directive, Injector, Input, NgModuleFactory, NgModuleRef, OnChanges, OnDestroy, SimpleChanges, StaticProvider, Type, ViewContainerRef} from '@angular/core';\n\n\n/**\n * Instantiates a single {@link Component} type and inserts its Host View into current View.\n * `NgComponentOutlet` provides a declarative approach for dynamic component creation.\n *\n * `NgComponentOutlet` requires a component type, if a falsy value is set the view will clear and\n * any existing component will get destroyed.\n *\n * @usageNotes\n *\n * ### Fine tune control\n *\n * You can control the component creation process by using the following optional attributes:\n *\n * * `ngComponentOutletInjector`: Optional custom {@link Injector} that will be used as parent for\n * the Component. Defaults to the injector of the current view container.\n *\n * * `ngComponentOutletContent`: Optional list of projectable nodes to insert into the content\n * section of the component, if exists.\n *\n * * `ngComponentOutletNgModuleFactory`: Optional module factory to allow dynamically loading other\n * module, then load a component from that module.\n *\n * ### Syntax\n *\n * Simple\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression\"></ng-container>\n * ```\n *\n * Customized injector/content\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   injector: injectorExpression;\n *                                   content: contentNodesExpression;\">\n * </ng-container>\n * ```\n *\n * Customized ngModuleFactory\n * ```\n * <ng-container *ngComponentOutlet=\"componentTypeExpression;\n *                                   ngModuleFactory: moduleFactory;\">\n * </ng-container>\n * ```\n *\n * ### A simple example\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='SimpleExample'}\n *\n * A more complete example with additional options:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='CompleteExample'}\n *\n * @publicApi\n * @ngModule CommonModule\n */\n@Directive({selector: '[ngComponentOutlet]'})\nexport class NgComponentOutlet implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutlet!: Type<any>;\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletInjector!: Injector;\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletContent!: any[][];\n  // TODO(issue/24571): remove '!'.\n  @Input() ngComponentOutletNgModuleFactory!: NgModuleFactory<any>;\n\n  private _componentRef: ComponentRef<any>|null = null;\n  private _moduleRef: NgModuleRef<any>|null = null;\n\n  constructor(private _viewContainerRef: ViewContainerRef) {}\n\n  ngOnChanges(changes: SimpleChanges) {\n    this._viewContainerRef.clear();\n    this._componentRef = null;\n\n    if (this.ngComponentOutlet) {\n      const elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n\n      if (changes['ngComponentOutletNgModuleFactory']) {\n        if (this._moduleRef) this._moduleRef.destroy();\n\n        if (this.ngComponentOutletNgModuleFactory) {\n          const parentModule = elInjector.get(NgModuleRef);\n          this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);\n        } else {\n          this._moduleRef = null;\n        }\n      }\n\n      const componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :\n                                                         elInjector.get(ComponentFactoryResolver);\n\n      const componentFactory =\n          componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);\n\n      this._componentRef = this._viewContainerRef.createComponent(\n          componentFactory, this._viewContainerRef.length, elInjector,\n          this.ngComponentOutletContent);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this._moduleRef) this._moduleRef.destroy();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, DoCheck, EmbeddedViewRef, Input, isDevMode, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport class NgForOfContext<T, U extends NgIterable<T> = NgIterable<T>> {\n  constructor(public $implicit: T, public ngForOf: U, public index: number, public count: number) {}\n\n  get first(): boolean {\n    return this.index === 0;\n  }\n\n  get last(): boolean {\n    return this.index === this.count - 1;\n  }\n\n  get even(): boolean {\n    return this.index % 2 === 0;\n  }\n\n  get odd(): boolean {\n    return !this.even;\n  }\n}\n\n/**\n * A [structural directive](guide/structural-directives) that renders\n * a template for each item in a collection.\n * The directive is placed on an element, which becomes the parent\n * of the cloned templates.\n *\n * The `ngForOf` directive is generally used in the\n * [shorthand form](guide/structural-directives#the-asterisk--prefix) `*ngFor`.\n * In this form, the template to be rendered for each iteration is the content\n * of an anchor element containing the directive.\n *\n * The following example shows the shorthand syntax with some options,\n * contained in an `<li>` element.\n *\n * ```\n * <li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>\n * ```\n *\n * The shorthand form expands into a long form that uses the `ngForOf` selector\n * on an `<ng-template>` element.\n * The content of the `<ng-template>` element is the `<li>` element that held the\n * short-form directive.\n *\n * Here is the expanded version of the short-form example.\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n *   <li>...</li>\n * </ng-template>\n * ```\n *\n * Angular automatically expands the shorthand syntax as it compiles the template.\n * The context for each embedded view is logically merged to the current component\n * context according to its lexical position.\n *\n * When using the shorthand syntax, Angular allows only [one structural directive\n * on an element](guide/structural-directives#one-structural-directive-per-host-element).\n * If you want to iterate conditionally, for example,\n * put the `*ngIf` on a container element that wraps the `*ngFor` element.\n * For futher discussion, see\n * [Structural Directives](guide/structural-directives#one-per-element).\n *\n * @usageNotes\n *\n * ### Local variables\n *\n * `NgForOf` provides exported values that can be aliased to local variables.\n * For example:\n *\n *  ```\n * <li *ngFor=\"let user of users; index as i; first as isFirst\">\n *    {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\n *\n * The following exported values can be aliased to local variables:\n *\n * - `$implicit: T`: The value of the individual items in the iterable (`ngForOf`).\n * - `ngForOf: NgIterable<T>`: The value of the iterable expression. Useful when the expression is\n * more complex then a property access, for example when using the async pipe (`userStreams |\n * async`).\n * - `index: number`: The index of the current item in the iterable.\n * - `count: number`: The length of the iterable.\n * - `first: boolean`: True when the item is the first item in the iterable.\n * - `last: boolean`: True when the item is the last item in the iterable.\n * - `even: boolean`: True when the item has an even index in the iterable.\n * - `odd: boolean`: True when the item has an odd index in the iterable.\n *\n * ### Change propagation\n *\n * When the contents of the iterator changes, `NgForOf` makes the corresponding changes to the DOM:\n *\n * * When an item is added, a new instance of the template is added to the DOM.\n * * When an item is removed, its template instance is removed from the DOM.\n * * When items are reordered, their respective templates are reordered in the DOM.\n *\n * Angular uses object identity to track insertions and deletions within the iterator and reproduce\n * those changes in the DOM. This has important implications for animations and any stateful\n * controls that are present, such as `<input>` elements that accept user input. Inserted rows can\n * be animated in, deleted rows can be animated out, and unchanged rows retain any unsaved state\n * such as user input.\n * For more on animations, see [Transitions and Triggers](guide/transition-and-triggers).\n *\n * The identities of elements in the iterator can change while the data does not.\n * This can happen, for example, if the iterator is produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response produces objects with\n * different identities, and Angular must tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted).\n *\n * To avoid this expensive operation, you can customize the default tracking algorithm.\n * by supplying the `trackBy` option to `NgForOf`.\n * `trackBy` takes a function that has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * @see [Structural Directives](guide/structural-directives)\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({selector: '[ngFor][ngForOf]'})\nexport class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {\n  /**\n   * The value of the iterable expression, which can be used as a\n   * [template input variable](guide/structural-directives#template-input-variable).\n   */\n  @Input()\n  set ngForOf(ngForOf: U&NgIterable<T>|undefined|null) {\n    this._ngForOf = ngForOf;\n    this._ngForOfDirty = true;\n  }\n  /**\n   * A function that defines how to track changes for items in the iterable.\n   *\n   * When items are added, moved, or removed in the iterable,\n   * the directive must re-render the appropriate DOM nodes.\n   * To minimize churn in the DOM, only nodes that have changed\n   * are re-rendered.\n   *\n   * By default, the change detector assumes that\n   * the object instance identifies the node in the iterable.\n   * When this function is supplied, the directive uses\n   * the result of calling this function to identify the item node,\n   * rather than the identity of the object itself.\n   *\n   * The function receives two inputs,\n   * the iteration index and the associated node data.\n   */\n  @Input()\n  set ngForTrackBy(fn: TrackByFunction<T>) {\n    if (isDevMode() && fn != null && typeof fn !== 'function') {\n      // TODO(vicb): use a log service once there is a public one available\n      if (<any>console && <any>console.warn) {\n        console.warn(\n            `trackBy must be a function, but received ${JSON.stringify(fn)}. ` +\n            `See https://angular.io/api/common/NgForOf#change-propagation for more information.`);\n      }\n    }\n    this._trackByFn = fn;\n  }\n\n  get ngForTrackBy(): TrackByFunction<T> {\n    return this._trackByFn;\n  }\n\n  private _ngForOf: U|undefined|null = null;\n  private _ngForOfDirty: boolean = true;\n  private _differ: IterableDiffer<T>|null = null;\n  // TODO(issue/24571): remove '!'.\n  private _trackByFn!: TrackByFunction<T>;\n\n  constructor(\n      private _viewContainer: ViewContainerRef,\n      private _template: TemplateRef<NgForOfContext<T, U>>, private _differs: IterableDiffers) {}\n\n  /**\n   * A reference to the template that is stamped out for each item in the iterable.\n   * @see [template reference variable](guide/template-reference-variables)\n   */\n  @Input()\n  set ngForTemplate(value: TemplateRef<NgForOfContext<T, U>>) {\n    // TODO(TS2.1): make TemplateRef<Partial<NgForRowOf<T>>> once we move to TS v2.1\n    // The current type is too restrictive; a template that just uses index, for example,\n    // should be acceptable.\n    if (value) {\n      this._template = value;\n    }\n  }\n\n  /**\n   * Applies the changes when needed.\n   */\n  ngDoCheck(): void {\n    if (this._ngForOfDirty) {\n      this._ngForOfDirty = false;\n      // React on ngForOf changes only once all inputs have been initialized\n      const value = this._ngForOf;\n      if (!this._differ && value) {\n        try {\n          this._differ = this._differs.find(value).create(this.ngForTrackBy);\n        } catch {\n          throw new Error(`Cannot find a differ supporting object '${value}' of type '${\n              getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);\n        }\n      }\n    }\n    if (this._differ) {\n      const changes = this._differ.diff(this._ngForOf);\n      if (changes) this._applyChanges(changes);\n    }\n  }\n\n  private _applyChanges(changes: IterableChanges<T>) {\n    const insertTuples: RecordViewTuple<T, U>[] = [];\n    changes.forEachOperation(\n        (item: IterableChangeRecord<any>, adjustedPreviousIndex: number|null,\n         currentIndex: number|null) => {\n          if (item.previousIndex == null) {\n            // NgForOf is never \"null\" or \"undefined\" here because the differ detected\n            // that a new item needs to be inserted from the iterable. This implies that\n            // there is an iterable value for \"_ngForOf\".\n            const view = this._viewContainer.createEmbeddedView(\n                this._template, new NgForOfContext<T, U>(null!, this._ngForOf!, -1, -1),\n                currentIndex === null ? undefined : currentIndex);\n            const tuple = new RecordViewTuple<T, U>(item, view);\n            insertTuples.push(tuple);\n          } else if (currentIndex == null) {\n            this._viewContainer.remove(\n                adjustedPreviousIndex === null ? undefined : adjustedPreviousIndex);\n          } else if (adjustedPreviousIndex !== null) {\n            const view = this._viewContainer.get(adjustedPreviousIndex)!;\n            this._viewContainer.move(view, currentIndex);\n            const tuple = new RecordViewTuple(item, <EmbeddedViewRef<NgForOfContext<T, U>>>view);\n            insertTuples.push(tuple);\n          }\n        });\n\n    for (let i = 0; i < insertTuples.length; i++) {\n      this._perViewChange(insertTuples[i].view, insertTuples[i].record);\n    }\n\n    for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) {\n      const viewRef = <EmbeddedViewRef<NgForOfContext<T, U>>>this._viewContainer.get(i);\n      viewRef.context.index = i;\n      viewRef.context.count = ilen;\n      viewRef.context.ngForOf = this._ngForOf!;\n    }\n\n    changes.forEachIdentityChange((record: any) => {\n      const viewRef =\n          <EmbeddedViewRef<NgForOfContext<T, U>>>this._viewContainer.get(record.currentIndex);\n      viewRef.context.$implicit = record.item;\n    });\n  }\n\n  private _perViewChange(\n      view: EmbeddedViewRef<NgForOfContext<T, U>>, record: IterableChangeRecord<any>) {\n    view.context.$implicit = record.item;\n  }\n\n  /**\n   * Asserts the correct type of the context for the template that `NgForOf` will render.\n   *\n   * The presence of this method is a signal to the Ivy template type-check compiler that the\n   * `NgForOf` structural directive renders its template with a specific context type.\n   */\n  static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any):\n      ctx is NgForOfContext<T, U> {\n    return true;\n  }\n}\n\nclass RecordViewTuple<T, U extends NgIterable<T>> {\n  constructor(public record: any, public view: EmbeddedViewRef<NgForOfContext<T, U>>) {}\n}\n\nfunction getTypeName(type: any): string {\n  return type['name'] || typeof type;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EmbeddedViewRef, Input, TemplateRef, ViewContainerRef, ɵstringify as stringify} from '@angular/core';\n\n\n/**\n * A structural directive that conditionally includes a template based on the value of\n * an expression coerced to Boolean.\n * When the expression evaluates to true, Angular renders the template\n * provided in a `then` clause, and when  false or null,\n * Angular renders the template provided in an optional `else` clause. The default\n * template for the `else` clause is blank.\n *\n * A [shorthand form](guide/structural-directives#the-asterisk--prefix) of the directive,\n * `*ngIf=\"condition\"`, is generally used, provided\n * as an attribute of the anchor element for the inserted template.\n * Angular expands this into a more explicit version, in which the anchor element\n * is contained in an `<ng-template>` element.\n *\n * Simple form with shorthand syntax:\n *\n * ```\n * <div *ngIf=\"condition\">Content to render when condition is true.</div>\n * ```\n *\n * Simple form with expanded syntax:\n *\n * ```\n * <ng-template [ngIf]=\"condition\"><div>Content to render when condition is\n * true.</div></ng-template>\n * ```\n *\n * Form with an \"else\" block:\n *\n * ```\n * <div *ngIf=\"condition; else elseBlock\">Content to render when condition is true.</div>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Shorthand form with \"then\" and \"else\" blocks:\n *\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>Content to render when condition is true.</ng-template>\n * <ng-template #elseBlock>Content to render when condition is false.</ng-template>\n * ```\n *\n * Form with storing the value locally:\n *\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>Content to render when value is null.</ng-template>\n * ```\n *\n * @usageNotes\n *\n * The `*ngIf` directive is most commonly used to conditionally show an inline template,\n * as seen in the following  example.\n * The default `else` template is blank.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ### Showing an alternative template using `else`\n *\n * To display a template when `expression` evaluates to false, use an `else` template\n * binding as shown in the following example.\n * The `else` binding points to an `<ng-template>`  element labeled `#elseBlock`.\n * The template can be defined anywhere in the component view, but is typically placed right after\n * `ngIf` for readability.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfElse'}\n *\n * ### Using an external `then` template\n *\n * In the previous example, the then-clause template is specified inline, as the content of the\n * tag that contains the `ngIf` directive. You can also specify a template that is defined\n * externally, by referencing a labeled `<ng-template>` element. When you do this, you can\n * change which template to use at runtime, as shown in the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ### Storing a conditional result in a variable\n *\n * You might want to show a set of properties from the same object. If you are waiting\n * for asynchronous data, the object can be undefined.\n * In this case, you can use `ngIf` and store the result of the condition in a local\n * variable as shown in the the following example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * This code uses only one `AsyncPipe`, so only one subscription is created.\n * The conditional statement stores the result of `userStream|async` in the local variable `user`.\n * You can then bind the local `user` repeatedly.\n *\n * The conditional displays the data only if `userStream` returns a value,\n * so you don't need to use the\n * [safe-navigation-operator](guide/template-expression-operators#safe-navigation-operator) (`?.`)\n * to guard against null values when accessing properties.\n * You can display an alternative template while waiting for the data.\n *\n * ### Shorthand syntax\n *\n * The shorthand syntax `*ngIf` expands into two separate template specifications\n * for the \"then\" and \"else\" clauses. For example, consider the following shorthand statement,\n * that is meant to show a loading page while waiting for data to be loaded.\n *\n * ```\n * <div class=\"hero-list\" *ngIf=\"heroes else loading\">\n *  ...\n * </div>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * You can see that the \"else\" clause references the `<ng-template>`\n * with the `#loading` label, and the template for the \"then\" clause\n * is provided as the content of the anchor element.\n *\n * However, when Angular expands the shorthand syntax, it creates\n * another `<ng-template>` tag, with `ngIf` and `ngIfElse` directives.\n * The anchor element containing the template for the \"then\" clause becomes\n * the content of this unlabeled `<ng-template>` tag.\n *\n * ```\n * <ng-template [ngIf]=\"heroes\" [ngIfElse]=\"loading\">\n *  <div class=\"hero-list\">\n *   ...\n *  </div>\n * </ng-template>\n *\n * <ng-template #loading>\n *  <div>Loading...</div>\n * </ng-template>\n * ```\n *\n * The presence of the implicit template object has implications for the nesting of\n * structural directives. For more on this subject, see\n * [Structural Directives](https://angular.io/guide/structural-directives#one-per-element).\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Directive({selector: '[ngIf]'})\nexport class NgIf<T = unknown> {\n  private _context: NgIfContext<T> = new NgIfContext<T>();\n  private _thenTemplateRef: TemplateRef<NgIfContext<T>>|null = null;\n  private _elseTemplateRef: TemplateRef<NgIfContext<T>>|null = null;\n  private _thenViewRef: EmbeddedViewRef<NgIfContext<T>>|null = null;\n  private _elseViewRef: EmbeddedViewRef<NgIfContext<T>>|null = null;\n\n  constructor(private _viewContainer: ViewContainerRef, templateRef: TemplateRef<NgIfContext<T>>) {\n    this._thenTemplateRef = templateRef;\n  }\n\n  /**\n   * The Boolean expression to evaluate as the condition for showing a template.\n   */\n  @Input()\n  set ngIf(condition: T) {\n    this._context.$implicit = this._context.ngIf = condition;\n    this._updateView();\n  }\n\n  /**\n   * A template to show if the condition expression evaluates to true.\n   */\n  @Input()\n  set ngIfThen(templateRef: TemplateRef<NgIfContext<T>>|null) {\n    assertTemplate('ngIfThen', templateRef);\n    this._thenTemplateRef = templateRef;\n    this._thenViewRef = null;  // clear previous view if any.\n    this._updateView();\n  }\n\n  /**\n   * A template to show if the condition expression evaluates to false.\n   */\n  @Input()\n  set ngIfElse(templateRef: TemplateRef<NgIfContext<T>>|null) {\n    assertTemplate('ngIfElse', templateRef);\n    this._elseTemplateRef = templateRef;\n    this._elseViewRef = null;  // clear previous view if any.\n    this._updateView();\n  }\n\n  private _updateView() {\n    if (this._context.$implicit) {\n      if (!this._thenViewRef) {\n        this._viewContainer.clear();\n        this._elseViewRef = null;\n        if (this._thenTemplateRef) {\n          this._thenViewRef =\n              this._viewContainer.createEmbeddedView(this._thenTemplateRef, this._context);\n        }\n      }\n    } else {\n      if (!this._elseViewRef) {\n        this._viewContainer.clear();\n        this._thenViewRef = null;\n        if (this._elseTemplateRef) {\n          this._elseViewRef =\n              this._viewContainer.createEmbeddedView(this._elseTemplateRef, this._context);\n        }\n      }\n    }\n  }\n\n  /** @internal */\n  public static ngIfUseIfTypeGuard: void;\n\n  /**\n   * Assert the correct type of the expression bound to the `ngIf` input within the template.\n   *\n   * The presence of this static field is a signal to the Ivy template type check compiler that\n   * when the `NgIf` structural directive renders its template, the type of the expression bound\n   * to `ngIf` should be narrowed in some way. For `NgIf`, the binding expression itself is used to\n   * narrow its type, which allows the strictNullChecks feature of TypeScript to work with `NgIf`.\n   */\n  static ngTemplateGuard_ngIf: 'binding';\n\n  /**\n   * Asserts the correct type of the context for the template that `NgIf` will render.\n   *\n   * The presence of this method is a signal to the Ivy template type-check compiler that the\n   * `NgIf` structural directive renders its template with a specific context type.\n   */\n  static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any):\n      ctx is NgIfContext<Exclude<T, false|0|''|null|undefined>> {\n    return true;\n  }\n}\n\n/**\n * @publicApi\n */\nexport class NgIfContext<T = unknown> {\n  public $implicit: T = null!;\n  public ngIf: T = null!;\n}\n\nfunction assertTemplate(property: string, templateRef: TemplateRef<any>|null): void {\n  const isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n  if (!isTemplateRefOrNull) {\n    throw new Error(`${property} must be a TemplateRef, but received '${stringify(templateRef)}'.`);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, DoCheck, Host, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nexport class SwitchView {\n  private _created = false;\n\n  constructor(\n      private _viewContainerRef: ViewContainerRef, private _templateRef: TemplateRef<Object>) {}\n\n  create(): void {\n    this._created = true;\n    this._viewContainerRef.createEmbeddedView(this._templateRef);\n  }\n\n  destroy(): void {\n    this._created = false;\n    this._viewContainerRef.clear();\n  }\n\n  enforceState(created: boolean) {\n    if (created && !this._created) {\n      this.create();\n    } else if (!created && this._created) {\n      this.destroy();\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n * The `[ngSwitch]` directive on a container specifies an expression to match against.\n * The expressions to match are provided by `ngSwitchCase` directives on views within the container.\n * - Every view that matches is rendered.\n * - If there are no matches, a view with the `ngSwitchDefault` directive is rendered.\n * - Elements within the `[NgSwitch]` statement but outside of any `NgSwitchCase`\n * or `ngSwitchDefault` directive are preserved at the location.\n *\n * @usageNotes\n * Define a container element for the directive, and specify the switch expression\n * to match against as an attribute:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * ```\n *\n * Within the container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *    <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * ...\n *    <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * ### Usage Examples\n *\n * The following example shows how to use more than one case to display the same view:\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <!-- the same view can be shown in more than one case -->\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *   <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *   <!--default case when there are no matches -->\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * The following example shows how cases can be nested:\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *       <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *       <some-element *ngSwitchCase=\"match_expression_2\">...</some-element>\n *       <some-other-element *ngSwitchCase=\"match_expression_3\">...</some-other-element>\n *       <ng-container *ngSwitchCase=\"match_expression_3\">\n *         <!-- use a ng-container to group multiple root nodes -->\n *         <inner-element></inner-element>\n *         <inner-other-element></inner-other-element>\n *       </ng-container>\n *       <some-element *ngSwitchDefault>...</some-element>\n *     </container-element>\n * ```\n *\n * @publicApi\n * @see `NgSwitchCase`\n * @see `NgSwitchDefault`\n * @see [Structural Directives](guide/structural-directives)\n *\n */\n@Directive({selector: '[ngSwitch]'})\nexport class NgSwitch {\n  // TODO(issue/24571): remove '!'.\n  private _defaultViews!: SwitchView[];\n  private _defaultUsed = false;\n  private _caseCount = 0;\n  private _lastCaseCheckIndex = 0;\n  private _lastCasesMatched = false;\n  private _ngSwitch: any;\n\n  @Input()\n  set ngSwitch(newValue: any) {\n    this._ngSwitch = newValue;\n    if (this._caseCount === 0) {\n      this._updateDefaultCases(true);\n    }\n  }\n\n  /** @internal */\n  _addCase(): number {\n    return this._caseCount++;\n  }\n\n  /** @internal */\n  _addDefault(view: SwitchView) {\n    if (!this._defaultViews) {\n      this._defaultViews = [];\n    }\n    this._defaultViews.push(view);\n  }\n\n  /** @internal */\n  _matchCase(value: any): boolean {\n    const matched = value == this._ngSwitch;\n    this._lastCasesMatched = this._lastCasesMatched || matched;\n    this._lastCaseCheckIndex++;\n    if (this._lastCaseCheckIndex === this._caseCount) {\n      this._updateDefaultCases(!this._lastCasesMatched);\n      this._lastCaseCheckIndex = 0;\n      this._lastCasesMatched = false;\n    }\n    return matched;\n  }\n\n  private _updateDefaultCases(useDefault: boolean) {\n    if (this._defaultViews && useDefault !== this._defaultUsed) {\n      this._defaultUsed = useDefault;\n      for (let i = 0; i < this._defaultViews.length; i++) {\n        const defaultView = this._defaultViews[i];\n        defaultView.enforceState(useDefault);\n      }\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n * Provides a switch case expression to match against an enclosing `ngSwitch` expression.\n * When the expressions match, the given `NgSwitchCase` template is rendered.\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * @usageNotes\n *\n * Within a switch container, `*ngSwitchCase` statements specify the match expressions\n * as attributes. Include `*ngSwitchDefault` as the final case.\n *\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n *   <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n *   ...\n *   <some-element *ngSwitchDefault>...</some-element>\n * </container-element>\n * ```\n *\n * Each switch-case statement contains an in-line HTML template or template reference\n * that defines the subtree to be selected if the value of the match expression\n * matches the value of the switch expression.\n *\n * Unlike JavaScript, which uses strict equality, Angular uses loose equality.\n * This means that the empty string, `\"\"` matches 0.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchDefault`\n *\n */\n@Directive({selector: '[ngSwitchCase]'})\nexport class NgSwitchCase implements DoCheck {\n  private _view: SwitchView;\n  /**\n   * Stores the HTML template to be selected on match.\n   */\n  @Input() ngSwitchCase: any;\n\n  constructor(\n      viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>,\n      @Host() private ngSwitch: NgSwitch) {\n    ngSwitch._addCase();\n    this._view = new SwitchView(viewContainer, templateRef);\n  }\n\n  /**\n   * Performs case matching. For internal use only.\n   */\n  ngDoCheck() {\n    this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase));\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that is rendered when no `NgSwitchCase` expressions\n * match the `NgSwitch` expression.\n * This statement should be the final case in an `NgSwitch`.\n *\n * @publicApi\n * @see `NgSwitch`\n * @see `NgSwitchCase`\n *\n */\n@Directive({selector: '[ngSwitchDefault]'})\nexport class NgSwitchDefault {\n  constructor(\n      viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>,\n      @Host() ngSwitch: NgSwitch) {\n    ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, Directive, Host, Input, TemplateRef, ViewContainerRef} from '@angular/core';\n\nimport {getPluralCategory, NgLocalization} from '../i18n/localization';\n\nimport {SwitchView} from './ng_switch';\n\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">there is nothing</ng-template>\n *   <ng-template ngPluralCase=\"=1\">there is one</ng-template>\n *   <ng-template ngPluralCase=\"few\">there are a few</ng-template>\n * </some-element>\n * ```\n *\n * @description\n *\n * Adds / removes DOM sub-trees based on a numeric value. Tailored for pluralization.\n *\n * Displays DOM sub-trees that match the switch expression value, or failing that, DOM sub-trees\n * that match the switch expression's pluralization category.\n *\n * To use this directive you must provide a container element that sets the `[ngPlural]` attribute\n * to a switch expression. Inner elements with a `[ngPluralCase]` will display based on their\n * expression:\n * - if `[ngPluralCase]` is set to a value starting with `=`, it will only display if the value\n *   matches the switch expression exactly,\n * - otherwise, the view will be treated as a \"category match\", and will only display if exact\n *   value matches aren't found and the value maps to its category for the defined locale.\n *\n * See http://cldr.unicode.org/index/cldr-spec/plural-rules\n *\n * @publicApi\n */\n@Directive({selector: '[ngPlural]'})\nexport class NgPlural {\n  // TODO(issue/24571): remove '!'.\n  private _switchValue!: number;\n  // TODO(issue/24571): remove '!'.\n  private _activeView!: SwitchView;\n  private _caseViews: {[k: string]: SwitchView} = {};\n\n  constructor(private _localization: NgLocalization) {}\n\n  @Input()\n  set ngPlural(value: number) {\n    this._switchValue = value;\n    this._updateView();\n  }\n\n  addCase(value: string, switchView: SwitchView): void {\n    this._caseViews[value] = switchView;\n  }\n\n  private _updateView(): void {\n    this._clearViews();\n\n    const cases = Object.keys(this._caseViews);\n    const key = getPluralCategory(this._switchValue, cases, this._localization);\n    this._activateView(this._caseViews[key]);\n  }\n\n  private _clearViews() {\n    if (this._activeView) this._activeView.destroy();\n  }\n\n  private _activateView(view: SwitchView) {\n    if (view) {\n      this._activeView = view;\n      this._activeView.create();\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgPlural} when the\n * given expression matches the plural expression according to CLDR rules.\n *\n * @usageNotes\n * ```\n * <some-element [ngPlural]=\"value\">\n *   <ng-template ngPluralCase=\"=0\">...</ng-template>\n *   <ng-template ngPluralCase=\"other\">...</ng-template>\n * </some-element>\n *```\n *\n * See {@link NgPlural} for more details and example.\n *\n * @publicApi\n */\n@Directive({selector: '[ngPluralCase]'})\nexport class NgPluralCase {\n  constructor(\n      @Attribute('ngPluralCase') public value: string, template: TemplateRef<Object>,\n      viewContainer: ViewContainerRef, @Host() ngPlural: NgPlural) {\n    const isANumber: boolean = !isNaN(Number(value));\n    ngPlural.addCase(isANumber ? `=${value}` : value, new SwitchView(viewContainer, template));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Directive, DoCheck, ElementRef, Input, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Renderer2} from '@angular/core';\n\n\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n *\n * Set the font of the containing element to the result of an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n * ```\n *\n * Set the width of the containing element to a pixel value returned by an expression.\n *\n * ```\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n * ```\n *\n * Set a collection of style values using an expression that returns key-value pairs.\n *\n * ```\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * An attribute directive that updates styles for the containing HTML element.\n * Sets one or more style properties, specified as colon-separated key-value pairs.\n * The key is a style name, with an optional `.<unit>` suffix\n * (such as 'top.px', 'font-style.em').\n * The value is an expression to be evaluated.\n * The resulting non-null value, expressed in the given unit,\n * is assigned to the given style property.\n * If the result of evaluation is null, the corresponding style is removed.\n *\n * @publicApi\n */\n@Directive({selector: '[ngStyle]'})\nexport class NgStyle implements DoCheck {\n  private _ngStyle: {[key: string]: string}|null = null;\n  private _differ: KeyValueDiffer<string, string|number>|null = null;\n\n  constructor(\n      private _ngEl: ElementRef, private _differs: KeyValueDiffers, private _renderer: Renderer2) {}\n\n  @Input('ngStyle')\n  set ngStyle(values: {[klass: string]: any}|null) {\n    this._ngStyle = values;\n    if (!this._differ && values) {\n      this._differ = this._differs.find(values).create();\n    }\n  }\n\n  ngDoCheck() {\n    if (this._differ) {\n      const changes = this._differ.diff(this._ngStyle!);\n      if (changes) {\n        this._applyChanges(changes);\n      }\n    }\n  }\n\n  private _setStyle(nameAndUnit: string, value: string|number|null|undefined): void {\n    const [name, unit] = nameAndUnit.split('.');\n    value = value != null && unit ? `${value}${unit}` : value;\n\n    if (value != null) {\n      this._renderer.setStyle(this._ngEl.nativeElement, name, value as string);\n    } else {\n      this._renderer.removeStyle(this._ngEl.nativeElement, name);\n    }\n  }\n\n  private _applyChanges(changes: KeyValueChanges<string, string|number>): void {\n    changes.forEachRemovedItem((record) => this._setStyle(record.key, null));\n    changes.forEachAddedItem((record) => this._setStyle(record.key, record.currentValue));\n    changes.forEachChangedItem((record) => this._setStyle(record.key, record.currentValue));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EmbeddedViewRef, Input, OnChanges, SimpleChange, SimpleChanges, TemplateRef, ViewContainerRef} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Inserts an embedded view from a prepared `TemplateRef`.\n *\n * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.\n * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding\n * by the local template `let` declarations.\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\n *\n * Using the key `$implicit` in the context object will set its value as default.\n *\n * ### Example\n *\n * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}\n *\n * @publicApi\n */\n@Directive({selector: '[ngTemplateOutlet]'})\nexport class NgTemplateOutlet implements OnChanges {\n  private _viewRef: EmbeddedViewRef<any>|null = null;\n\n  /**\n   * A context object to attach to the {@link EmbeddedViewRef}. This should be an\n   * object, the object's keys will be available for binding by the local template `let`\n   * declarations.\n   * Using the key `$implicit` in the context object will set its value as default.\n   */\n  @Input() public ngTemplateOutletContext: Object|null = null;\n\n  /**\n   * A string defining the template reference and optionally the context object for the template.\n   */\n  @Input() public ngTemplateOutlet: TemplateRef<any>|null = null;\n\n  constructor(private _viewContainerRef: ViewContainerRef) {}\n\n  ngOnChanges(changes: SimpleChanges) {\n    const recreateView = this._shouldRecreateView(changes);\n\n    if (recreateView) {\n      const viewContainerRef = this._viewContainerRef;\n\n      if (this._viewRef) {\n        viewContainerRef.remove(viewContainerRef.indexOf(this._viewRef));\n      }\n\n      this._viewRef = this.ngTemplateOutlet ?\n          viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext) :\n          null;\n    } else if (this._viewRef && this.ngTemplateOutletContext) {\n      this._updateExistingContext(this.ngTemplateOutletContext);\n    }\n  }\n\n  /**\n   * We need to re-create existing embedded view if:\n   * - templateRef has changed\n   * - context has changes\n   *\n   * We mark context object as changed when the corresponding object\n   * shape changes (new properties are added or existing properties are removed).\n   * In other words we consider context with the same properties as \"the same\" even\n   * if object reference changes (see https://github.com/angular/angular/issues/13407).\n   */\n  private _shouldRecreateView(changes: SimpleChanges): boolean {\n    const ctxChange = changes['ngTemplateOutletContext'];\n    return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n  }\n\n  private _hasContextShapeChanged(ctxChange: SimpleChange): boolean {\n    const prevCtxKeys = Object.keys(ctxChange.previousValue || {});\n    const currCtxKeys = Object.keys(ctxChange.currentValue || {});\n\n    if (prevCtxKeys.length === currCtxKeys.length) {\n      for (let propName of currCtxKeys) {\n        if (prevCtxKeys.indexOf(propName) === -1) {\n          return true;\n        }\n      }\n      return false;\n    }\n    return true;\n  }\n\n  private _updateExistingContext(ctx: Object): void {\n    for (let propName of Object.keys(ctx)) {\n      (<any>this._viewRef!.context)[propName] = (<any>this.ngTemplateOutletContext)[propName];\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Provider} from '@angular/core';\nimport {NgClass} from './ng_class';\nimport {NgComponentOutlet} from './ng_component_outlet';\nimport {NgForOf, NgForOfContext} from './ng_for_of';\nimport {NgIf, NgIfContext} from './ng_if';\nimport {NgPlural, NgPluralCase} from './ng_plural';\nimport {NgStyle} from './ng_style';\nimport {NgSwitch, NgSwitchCase, NgSwitchDefault} from './ng_switch';\nimport {NgTemplateOutlet} from './ng_template_outlet';\n\nexport {\n  NgClass,\n  NgComponentOutlet,\n  NgForOf,\n  NgForOfContext,\n  NgIf,\n  NgIfContext,\n  NgPlural,\n  NgPluralCase,\n  NgStyle,\n  NgSwitch,\n  NgSwitchCase,\n  NgSwitchDefault,\n  NgTemplateOutlet,\n};\n\n\n\n/**\n * A collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nexport const COMMON_DIRECTIVES: Provider[] = [\n  NgClass,\n  NgComponentOutlet,\n  NgForOf,\n  NgIf,\n  NgTemplateOutlet,\n  NgStyle,\n  NgSwitch,\n  NgSwitchCase,\n  NgSwitchDefault,\n  NgPlural,\n  NgPluralCase,\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type, ɵstringify as stringify} from '@angular/core';\n\nexport function invalidPipeArgumentError(type: Type<any>, value: Object) {\n  return Error(`InvalidPipeArgument: '${value}' for pipe '${stringify(type)}'`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ChangeDetectorRef, EventEmitter, OnDestroy, Pipe, PipeTransform, ɵisObservable, ɵisPromise} from '@angular/core';\nimport {Observable, SubscriptionLike} from 'rxjs';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\ninterface SubscriptionStrategy {\n  createSubscription(async: Observable<any>|Promise<any>, updateLatestValue: any): SubscriptionLike\n      |Promise<any>;\n  dispose(subscription: SubscriptionLike|Promise<any>): void;\n  onDestroy(subscription: SubscriptionLike|Promise<any>): void;\n}\n\nclass ObservableStrategy implements SubscriptionStrategy {\n  createSubscription(async: Observable<any>, updateLatestValue: any): SubscriptionLike {\n    return async.subscribe({\n      next: updateLatestValue,\n      error: (e: any) => {\n        throw e;\n      }\n    });\n  }\n\n  dispose(subscription: SubscriptionLike): void {\n    subscription.unsubscribe();\n  }\n\n  onDestroy(subscription: SubscriptionLike): void {\n    subscription.unsubscribe();\n  }\n}\n\nclass PromiseStrategy implements SubscriptionStrategy {\n  createSubscription(async: Promise<any>, updateLatestValue: (v: any) => any): Promise<any> {\n    return async.then(updateLatestValue, e => {\n      throw e;\n    });\n  }\n\n  dispose(subscription: Promise<any>): void {}\n\n  onDestroy(subscription: Promise<any>): void {}\n}\n\nconst _promiseStrategy = new PromiseStrategy();\nconst _observableStrategy = new ObservableStrategy();\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Unwraps a value from an asynchronous primitive.\n *\n * The `async` pipe subscribes to an `Observable` or `Promise` and returns the latest value it has\n * emitted. When a new value is emitted, the `async` pipe marks the component to be checked for\n * changes. When the component gets destroyed, the `async` pipe unsubscribes automatically to avoid\n * potential memory leaks.\n *\n * @usageNotes\n *\n * ### Examples\n *\n * This example binds a `Promise` to the view. Clicking the `Resolve` button resolves the\n * promise.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipePromise'}\n *\n * It's also possible to use `async` with Observables. The example below binds the `time` Observable\n * to the view. The Observable continuously updates the view with the current time.\n *\n * {@example common/pipes/ts/async_pipe.ts region='AsyncPipeObservable'}\n *\n * @publicApi\n */\n@Pipe({name: 'async', pure: false})\nexport class AsyncPipe implements OnDestroy, PipeTransform {\n  private _latestValue: any = null;\n\n  private _subscription: SubscriptionLike|Promise<any>|null = null;\n  private _obj: Observable<any>|Promise<any>|EventEmitter<any>|null = null;\n  private _strategy: SubscriptionStrategy = null!;\n\n  constructor(private _ref: ChangeDetectorRef) {}\n\n  ngOnDestroy(): void {\n    if (this._subscription) {\n      this._dispose();\n    }\n  }\n\n  transform<T>(obj: null): null;\n  transform<T>(obj: undefined): undefined;\n  transform<T>(obj: Observable<T>|null|undefined): T|null;\n  transform<T>(obj: Promise<T>|null|undefined): T|null;\n  transform(obj: Observable<any>|Promise<any>|null|undefined): any {\n    if (!this._obj) {\n      if (obj) {\n        this._subscribe(obj);\n      }\n      return this._latestValue;\n    }\n\n    if (obj !== this._obj) {\n      this._dispose();\n      return this.transform(obj as any);\n    }\n\n    return this._latestValue;\n  }\n\n  private _subscribe(obj: Observable<any>|Promise<any>|EventEmitter<any>): void {\n    this._obj = obj;\n    this._strategy = this._selectStrategy(obj);\n    this._subscription = this._strategy.createSubscription(\n        obj, (value: Object) => this._updateLatestValue(obj, value));\n  }\n\n  private _selectStrategy(obj: Observable<any>|Promise<any>|EventEmitter<any>): any {\n    if (ɵisPromise(obj)) {\n      return _promiseStrategy;\n    }\n\n    if (ɵisObservable(obj)) {\n      return _observableStrategy;\n    }\n\n    throw invalidPipeArgumentError(AsyncPipe, obj);\n  }\n\n  private _dispose(): void {\n    this._strategy.dispose(this._subscription!);\n    this._latestValue = null;\n    this._subscription = null;\n    this._obj = null;\n  }\n\n  private _updateLatestValue(async: any, value: Object): void {\n    if (async === this._obj) {\n      this._latestValue = value;\n      this._ref.markForCheck();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * Transforms text to all lower case.\n *\n * @see `UpperCasePipe`\n * @see `TitleCasePipe`\n * @usageNotes\n *\n * The following example defines a view that allows the user to enter\n * text, and then uses the pipe to convert the input text to all lower case.\n *\n * <code-example path=\"common/pipes/ts/lowerupper_pipe.ts\" region='LowerUpperPipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({name: 'lowercase'})\nexport class LowerCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to lower case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(LowerCasePipe, value);\n    }\n    return value.toLowerCase();\n  }\n}\n\n//\n// Regex below matches any Unicode word and compatible with ES5. In ES2018 the same result\n// can be achieved by using /\\p{L}\\S*/gu and also known as Unicode Property Escapes\n// (http://2ality.com/2017/07/regexp-unicode-property-escapes.html). Since there is no\n// transpilation of this functionality down to ES5 without external tool, the only solution is\n// to use already transpiled form. Example can be found here -\n// https://mothereff.in/regexpu#input=var+regex+%3D+/%5Cp%7BL%7D/u%3B&unicodePropertyEscape=1\n//\n\nconst unicodeWordMatch =\n    /(?:[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-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uDF33\\uDF35-\\uDF39\\uDF3D\\uDF50\\uDF5D-\\uDF61]|\\uD805[\\uDC00-\\uDC34\\uDC47-\\uDC4A\\uDC80-\\uDCAF\\uDCC4\\uDCC5\\uDCC7\\uDD80-\\uDDAE\\uDDD8-\\uDDDB\\uDE00-\\uDE2F\\uDE44\\uDE80-\\uDEAA\\uDF00-\\uDF19]|\\uD806[\\uDCA0-\\uDCDF\\uDCFF\\uDE00\\uDE0B-\\uDE32\\uDE3A\\uDE50\\uDE5C-\\uDE83\\uDE86-\\uDE89\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC2E\\uDC40\\uDC72-\\uDC8F\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD30\\uDD46]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDED0-\\uDEED\\uDF00-\\uDF2F\\uDF40-\\uDF43\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50\\uDF93-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99]|\\uD835[\\uDC00-\\uDC54\\uDC56-\\uDC9C\\uDC9E\\uDC9F\\uDCA2\\uDCA5\\uDCA6\\uDCA9-\\uDCAC\\uDCAE-\\uDCB9\\uDCBB\\uDCBD-\\uDCC3\\uDCC5-\\uDD05\\uDD07-\\uDD0A\\uDD0D-\\uDD14\\uDD16-\\uDD1C\\uDD1E-\\uDD39\\uDD3B-\\uDD3E\\uDD40-\\uDD44\\uDD46\\uDD4A-\\uDD50\\uDD52-\\uDEA5\\uDEA8-\\uDEC0\\uDEC2-\\uDEDA\\uDEDC-\\uDEFA\\uDEFC-\\uDF14\\uDF16-\\uDF34\\uDF36-\\uDF4E\\uDF50-\\uDF6E\\uDF70-\\uDF88\\uDF8A-\\uDFA8\\uDFAA-\\uDFC2\\uDFC4-\\uDFCB]|\\uD83A[\\uDC00-\\uDCC4\\uDD00-\\uDD43]|\\uD83B[\\uDE00-\\uDE03\\uDE05-\\uDE1F\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D])\\S*/g;\n\n/**\n * Transforms text to title case.\n * Capitalizes the first letter of each word and transforms the\n * rest of the word to lower case.\n * Words are delimited by any whitespace character, such as a space, tab, or line-feed character.\n *\n * @see `LowerCasePipe`\n * @see `UpperCasePipe`\n *\n * @usageNotes\n * The following example shows the result of transforming various strings into title case.\n *\n * <code-example path=\"common/pipes/ts/titlecase_pipe.ts\" region='TitleCasePipe'></code-example>\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({name: 'titlecase'})\nexport class TitleCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to title case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(TitleCasePipe, value);\n    }\n\n    return value.replace(\n        unicodeWordMatch, (txt => txt[0].toUpperCase() + txt.substr(1).toLowerCase()));\n  }\n}\n\n/**\n * Transforms text to all upper case.\n * @see `LowerCasePipe`\n * @see `TitleCasePipe`\n *\n * @ngModule CommonModule\n * @publicApi\n */\n@Pipe({name: 'uppercase'})\nexport class UpperCasePipe implements PipeTransform {\n  /**\n   * @param value The string to transform to upper case.\n   */\n  transform(value: string): string {\n    if (!value) return value;\n    if (typeof value !== 'string') {\n      throw invalidPipeArgumentError(UpperCasePipe, value);\n    }\n    return value.toUpperCase();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {formatDate} from '../i18n/format_date';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n// clang-format off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date value according to locale rules.\n *\n * Only the `en-US` locale data comes with Angular. To localize dates\n * in another language, you must import the corresponding locale data.\n * See the [I18n guide](guide/i18n#i18n-pipes) for more information.\n *\n * @see `formatDate()`\n *\n *\n * @usageNotes\n *\n * The result of this pipe is not reevaluated when the input is mutated. To avoid the need to\n * reformat the date on every change-detection cycle, treat the date as an immutable object\n * and change the reference when the pipe needs to run again.\n *\n * ### Pre-defined format options\n *\n * Examples are given in `en-US` locale.\n *\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (`6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (`Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (`June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (`Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (`6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (`Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (`June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (`Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (`9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (`9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (`9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (`9:03:01 AM GMT+01:00`).\n *\n * ### Custom format options\n *\n * You can construct a format string using symbols to specify the components\n * of a date-time value, as described in the following table.\n * Format details depend on the locale.\n * Fields marked with (*) are only available in the extra data set for the given locale.\n *\n *  | Field type         | Format      | Description                                                   | Example Value                                              |\n *  |--------------------|-------------|---------------------------------------------------------------|------------------------------------------------------------|\n *  | Era                | G, GG & GGG | Abbreviated                                                   | AD                                                         |\n *  |                    | GGGG        | Wide                                                          | Anno Domini                                                |\n *  |                    | GGGGG       | Narrow                                                        | A                                                          |\n *  | Year               | y           | Numeric: minimum digits                                       | 2, 20, 201, 2017, 20173                                    |\n *  |                    | yy          | Numeric: 2 digits + zero padded                               | 02, 20, 01, 17, 73                                         |\n *  |                    | yyy         | Numeric: 3 digits + zero padded                               | 002, 020, 201, 2017, 20173                                 |\n *  |                    | yyyy        | Numeric: 4 digits or more + zero padded                       | 0002, 0020, 0201, 2017, 20173                              |\n *  | Month              | M           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                    | MM          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                    | MMM         | Abbreviated                                                   | Sep                                                        |\n *  |                    | MMMM        | Wide                                                          | September                                                  |\n *  |                    | MMMMM       | Narrow                                                        | S                                                          |\n *  | Month standalone   | L           | Numeric: 1 digit                                              | 9, 12                                                      |\n *  |                    | LL          | Numeric: 2 digits + zero padded                               | 09, 12                                                     |\n *  |                    | LLL         | Abbreviated                                                   | Sep                                                        |\n *  |                    | LLLL        | Wide                                                          | September                                                  |\n *  |                    | LLLLL       | Narrow                                                        | S                                                          |\n *  | Week of year       | w           | Numeric: minimum digits                                       | 1... 53                                                    |\n *  |                    | ww          | Numeric: 2 digits + zero padded                               | 01... 53                                                   |\n *  | Week of month      | W           | Numeric: 1 digit                                              | 1... 5                                                     |\n *  | Day of month       | d           | Numeric: minimum digits                                       | 1                                                          |\n *  |                    | dd          | Numeric: 2 digits + zero padded                               | 01                                                          |\n *  | Week day           | E, EE & EEE | Abbreviated                                                   | Tue                                                        |\n *  |                    | EEEE        | Wide                                                          | Tuesday                                                    |\n *  |                    | EEEEE       | Narrow                                                        | T                                                          |\n *  |                    | EEEEEE      | Short                                                         | Tu                                                         |\n *  | Period             | a, aa & aaa | Abbreviated                                                   | am/pm or AM/PM                                             |\n *  |                    | aaaa        | Wide (fallback to `a` when missing)                           | ante meridiem/post meridiem                                |\n *  |                    | aaaaa       | Narrow                                                        | a/p                                                        |\n *  | Period*            | B, BB & BBB | Abbreviated                                                   | mid.                                                       |\n *  |                    | BBBB        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                    | BBBBB       | Narrow                                                        | md                                                         |\n *  | Period standalone* | b, bb & bbb | Abbreviated                                                   | mid.                                                       |\n *  |                    | bbbb        | Wide                                                          | am, pm, midnight, noon, morning, afternoon, evening, night |\n *  |                    | bbbbb       | Narrow                                                        | md                                                         |\n *  | Hour 1-12          | h           | Numeric: minimum digits                                       | 1, 12                                                      |\n *  |                    | hh          | Numeric: 2 digits + zero padded                               | 01, 12                                                     |\n *  | Hour 0-23          | H           | Numeric: minimum digits                                       | 0, 23                                                      |\n *  |                    | HH          | Numeric: 2 digits + zero padded                               | 00, 23                                                     |\n *  | Minute             | m           | Numeric: minimum digits                                       | 8, 59                                                      |\n *  |                    | mm          | Numeric: 2 digits + zero padded                               | 08, 59                                                     |\n *  | Second             | s           | Numeric: minimum digits                                       | 0... 59                                                    |\n *  |                    | ss          | Numeric: 2 digits + zero padded                               | 00... 59                                                   |\n *  | Fractional seconds | S           | Numeric: 1 digit                                              | 0... 9                                                     |\n *  |                    | SS          | Numeric: 2 digits + zero padded                               | 00... 99                                                   |\n *  |                    | SSS         | Numeric: 3 digits + zero padded (= milliseconds)              | 000... 999                                                 |\n *  | Zone               | z, zz & zzz | Short specific non location format (fallback to O)            | GMT-8                                                      |\n *  |                    | zzzz        | Long specific non location format (fallback to OOOO)          | GMT-08:00                                                  |\n *  |                    | Z, ZZ & ZZZ | ISO8601 basic format                                          | -0800                                                      |\n *  |                    | ZZZZ        | Long localized GMT format                                     | GMT-8:00                                                   |\n *  |                    | ZZZZZ       | ISO8601 extended format + Z indicator for offset 0 (= XXXXX)  | -08:00                                                     |\n *  |                    | O, OO & OOO | Short localized GMT format                                    | GMT-8                                                      |\n *  |                    | OOOO        | Long localized GMT format                                     | GMT-08:00                                                  |\n *\n * Note that timezone correction is not applied to an ISO string that has no time component, such as \"2016-09-19\"\n *\n * ### Format examples\n *\n * These examples transform a date into various formats,\n * assuming that `dateObj` is a JavaScript `Date` object for\n * year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11,\n * given in the local time for the `en-US` locale.\n *\n * ```\n * {{ dateObj | date }}               // output is 'Jun 15, 2015'\n * {{ dateObj | date:'medium' }}      // output is 'Jun 15, 2015, 9:43:11 PM'\n * {{ dateObj | date:'shortTime' }}   // output is '9:43 PM'\n * {{ dateObj | date:'mm:ss' }}       // output is '43:11'\n * ```\n *\n * ### Usage example\n *\n * The following component uses a date pipe to display the current date in different formats.\n *\n * ```\n * @Component({\n *  selector: 'date-pipe',\n *  template: `<div>\n *    <p>Today is {{today | date}}</p>\n *    <p>Or if you prefer, {{today | date:'fullDate'}}</p>\n *    <p>The time is {{today | date:'h:mm a z'}}</p>\n *  </div>`\n * })\n * // Get the current date and time as a date-time value.\n * export class DatePipeComponent {\n *   today: number = Date.now();\n * }\n * ```\n *\n * @publicApi\n */\n// clang-format on\n@Pipe({name: 'date', pure: true})\nexport class DatePipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private locale: string) {}\n\n  /**\n   * @param value The date expression: a `Date` object,  a number\n   * (milliseconds since UTC epoch), or an ISO string (https://www.w3.org/TR/NOTE-datetime).\n   * @param format The date/time components to include, using predefined options or a\n   * custom format string.\n   * @param timezone A timezone offset (such as `'+0430'`), or a standard\n   * UTC/GMT or continental US timezone abbreviation.\n   * When not supplied, uses the end-user's local system timezone.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   * @returns A date string in the desired format.\n   */\n  transform(value: any, format = 'mediumDate', timezone?: string, locale?: string): string|null {\n    if (value == null || value === '' || value !== value) return null;\n\n    try {\n      return formatDate(value, format, locale || this.locale, timezone);\n    } catch (error) {\n      throw invalidPipeArgumentError(DatePipe, error.message);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\n\nimport {getPluralCategory, NgLocalization} from '../i18n/localization';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\nconst _INTERPOLATION_REGEXP: RegExp = /#/g;\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @publicApi\n */\n@Pipe({name: 'i18nPlural', pure: true})\nexport class I18nPluralPipe implements PipeTransform {\n  constructor(private _localization: NgLocalization) {}\n\n  /**\n   * @param value the number to be formatted\n   * @param pluralMap an object that mimics the ICU format, see\n   * http://userguide.icu-project.org/formatparse/messages.\n   * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n   * default).\n   */\n  transform(value: number, pluralMap: {[count: string]: string}, locale?: string): string {\n    if (value == null) return '';\n\n    if (typeof pluralMap !== 'object' || pluralMap === null) {\n      throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n    }\n\n    const key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n\n    return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Generic selector that displays the string that matches the current value.\n *\n * If none of the keys of the `mapping` match the `value`, then the content\n * of the `other` key is returned when present, otherwise an empty string is returned.\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @publicApi\n */\n@Pipe({name: 'i18nSelect', pure: true})\nexport class I18nSelectPipe implements PipeTransform {\n  /**\n   * @param value a string to be internationalized.\n   * @param mapping an object that indicates the text that should be displayed\n   * for different values of the provided `value`.\n   */\n  transform(value: string|null|undefined, mapping: {[key: string]: string}): string {\n    if (value == null) return '';\n\n    if (typeof mapping !== 'object' || typeof value !== 'string') {\n      throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n    }\n\n    if (mapping.hasOwnProperty(value)) {\n      return mapping[value];\n    }\n\n    if (mapping.hasOwnProperty('other')) {\n      return mapping['other'];\n    }\n\n    return '';\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Converts a value into its JSON-format representation.  Useful for debugging.\n *\n * @usageNotes\n *\n * The following component uses a JSON pipe to convert an object\n * to JSON format, and displays the string in both formats for comparison.\n *\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n * @publicApi\n */\n@Pipe({name: 'json', pure: false})\nexport class JsonPipe implements PipeTransform {\n  /**\n   * @param value A value of any type to convert into a JSON-format string.\n   */\n  transform(value: any): string {\n    return JSON.stringify(value, null, 2);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {KeyValueChangeRecord, KeyValueChanges, KeyValueDiffer, KeyValueDiffers, Pipe, PipeTransform} from '@angular/core';\n\nfunction makeKeyValuePair<K, V>(key: K, value: V): KeyValue<K, V> {\n  return {key: key, value: value};\n}\n\n/**\n * A key value pair.\n * Usually used to represent the key value pairs from a Map or Object.\n *\n * @publicApi\n */\nexport interface KeyValue<K, V> {\n  key: K;\n  value: V;\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms Object or Map into an array of key value pairs.\n *\n * The output array will be ordered by keys.\n * By default the comparator will be by Unicode point value.\n * You can optionally pass a compareFn if your keys are complex types.\n *\n * @usageNotes\n * ### Examples\n *\n * This examples show how an Object or a Map can be iterated by ngFor with the use of this\n * keyvalue pipe.\n *\n * {@example common/pipes/ts/keyvalue_pipe.ts region='KeyValuePipe'}\n *\n * @publicApi\n */\n@Pipe({name: 'keyvalue', pure: false})\nexport class KeyValuePipe implements PipeTransform {\n  constructor(private readonly differs: KeyValueDiffers) {}\n\n  private differ!: KeyValueDiffer<any, any>;\n  private keyValues: Array<KeyValue<any, any>> = [];\n\n  transform<K, V>(input: null, compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): null;\n  transform<V>(\n      input: {[key: string]: V}|ReadonlyMap<string, V>,\n      compareFn?: (a: KeyValue<string, V>, b: KeyValue<string, V>) => number):\n      Array<KeyValue<string, V>>;\n  transform<V>(\n      input: {[key: string]: V}|ReadonlyMap<string, V>|null,\n      compareFn?: (a: KeyValue<string, V>, b: KeyValue<string, V>) => number):\n      Array<KeyValue<string, V>>|null;\n  transform<V>(\n      input: {[key: number]: V}|ReadonlyMap<number, V>,\n      compareFn?: (a: KeyValue<number, V>, b: KeyValue<number, V>) => number):\n      Array<KeyValue<number, V>>;\n  transform<V>(\n      input: {[key: number]: V}|ReadonlyMap<number, V>|null,\n      compareFn?: (a: KeyValue<number, V>, b: KeyValue<number, V>) => number):\n      Array<KeyValue<number, V>>|null;\n  transform<K, V>(\n      input: ReadonlyMap<K, V>,\n      compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): Array<KeyValue<K, V>>;\n  transform<K, V>(\n      input: ReadonlyMap<K, V>|null,\n      compareFn?: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number): Array<KeyValue<K, V>>|null;\n  transform<K, V>(\n      input: null|{[key: string]: V, [key: number]: V}|ReadonlyMap<K, V>,\n      compareFn: (a: KeyValue<K, V>, b: KeyValue<K, V>) => number = defaultComparator):\n      Array<KeyValue<K, V>>|null {\n    if (!input || (!(input instanceof Map) && typeof input !== 'object')) {\n      return null;\n    }\n\n    if (!this.differ) {\n      // make a differ for whatever type we've been passed in\n      this.differ = this.differs.find(input).create();\n    }\n\n    const differChanges: KeyValueChanges<K, V>|null = this.differ.diff(input as any);\n\n    if (differChanges) {\n      this.keyValues = [];\n      differChanges.forEachItem((r: KeyValueChangeRecord<K, V>) => {\n        this.keyValues.push(makeKeyValuePair(r.key, r.currentValue!));\n      });\n      this.keyValues.sort(compareFn);\n    }\n    return this.keyValues;\n  }\n}\n\nexport function defaultComparator<K, V>(\n    keyValueA: KeyValue<K, V>, keyValueB: KeyValue<K, V>): number {\n  const a = keyValueA.key;\n  const b = keyValueB.key;\n  // if same exit with 0;\n  if (a === b) return 0;\n  // make sure that undefined are at the end of the sort.\n  if (a === undefined) return 1;\n  if (b === undefined) return -1;\n  // make sure that nulls are at the end of the sort.\n  if (a === null) return 1;\n  if (b === null) return -1;\n  if (typeof a == 'string' && typeof b == 'string') {\n    return a < b ? -1 : 1;\n  }\n  if (typeof a == 'number' && typeof b == 'number') {\n    return a - b;\n  }\n  if (typeof a == 'boolean' && typeof b == 'boolean') {\n    return a < b ? -1 : 1;\n  }\n  // `a` and `b` are of different types. Compare their string values.\n  const aString = String(a);\n  const bString = String(b);\n  return aString == bString ? 0 : aString < bString ? -1 : 1;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DEFAULT_CURRENCY_CODE, Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';\nimport {formatCurrency, formatNumber, formatPercent} from '../i18n/format_number';\nimport {getCurrencySymbol} from '../i18n/locale_data_api';\n\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number into a string,\n * formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * If no parameters are specified, the function rounds off to the nearest value using this\n * [rounding method](https://en.wikibooks.org/wiki/Arithmetic/Rounding).\n * The behavior differs from that of the JavaScript ```Math.round()``` function.\n * In the following case for example, the pipe rounds down where\n * ```Math.round()``` rounds up:\n *\n * ```html\n * -2.5 | number:'1.0-0'\n * > -3\n * Math.round(-2.5)\n * > -2\n * ```\n *\n * @see `formatNumber()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * ### Example\n *\n * <code-example path=\"common/pipes/ts/number_pipe.ts\" region='NumberPipe'></code-example>\n *\n * @publicApi\n */\n@Pipe({name: 'number'})\nexport class DecimalPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  /**\n   * @param value The number to be formatted.\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `0`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `3`.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(value: any, digitsInfo?: string, locale?: string): string|null {\n    if (isEmpty(value)) return null;\n\n    locale = locale || this._locale;\n\n    try {\n      const num = strToNumber(value);\n      return formatNumber(num, locale, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(DecimalPipe, error.message);\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a percentage\n * string, formatted according to locale rules that determine group sizing and\n * separator, decimal-point character, and other locale-specific\n * configurations.\n *\n * @see `formatPercent()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/percent_pipe.ts\" region='PercentPipe'></code-example>\n *\n * @publicApi\n */\n@Pipe({name: 'percent'})\nexport class PercentPipe implements PipeTransform {\n  constructor(@Inject(LOCALE_ID) private _locale: string) {}\n\n  /**\n   *\n   * @param value The number to be formatted as a percentage.\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `0`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `0`.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(value: any, digitsInfo?: string, locale?: string): string|null {\n    if (isEmpty(value)) return null;\n    locale = locale || this._locale;\n    try {\n      const num = strToNumber(value);\n      return formatPercent(num, locale, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(PercentPipe, error.message);\n    }\n  }\n}\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Transforms a number to a currency string, formatted according to locale rules\n * that determine group sizing and separator, decimal-point character,\n * and other locale-specific configurations.\n *\n * {@a currency-code-deprecation}\n * <div class=\"alert is-helpful\">\n *\n * **Deprecation notice:**\n *\n * The default currency code is currently always `USD` but this is deprecated from v9.\n *\n * **In v11 the default currency code will be taken from the current locale identified by\n * the `LOCAL_ID` token. See the [i18n guide](guide/i18n#setting-up-the-locale-of-your-app) for\n * more information.**\n *\n * If you need the previous behavior then set it by creating a `DEFAULT_CURRENCY_CODE` provider in\n * your application `NgModule`:\n *\n * ```ts\n * {provide: DEFAULT_CURRENCY_CODE, useValue: 'USD'}\n * ```\n *\n * </div>\n *\n * @see `getCurrencySymbol()`\n * @see `formatCurrency()`\n *\n * @usageNotes\n * The following code shows how the pipe transforms numbers\n * into text strings, according to various format specifications,\n * where the caller's default locale is `en-US`.\n *\n * <code-example path=\"common/pipes/ts/currency_pipe.ts\" region='CurrencyPipe'></code-example>\n *\n * @publicApi\n */\n@Pipe({name: 'currency'})\nexport class CurrencyPipe implements PipeTransform {\n  constructor(\n      @Inject(LOCALE_ID) private _locale: string,\n      @Inject(DEFAULT_CURRENCY_CODE) private _defaultCurrencyCode: string = 'USD') {}\n\n  /**\n   *\n   * @param value The number to be formatted as currency.\n   * @param currencyCode The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code,\n   * such as `USD` for the US dollar and `EUR` for the euro. The default currency code can be\n   * configured using the `DEFAULT_CURRENCY_CODE` injection token.\n   * @param display The format for the currency indicator. One of the following:\n   *   - `code`: Show the code (such as `USD`).\n   *   - `symbol`(default): Show the symbol (such as `$`).\n   *   - `symbol-narrow`: Use the narrow symbol for locales that have two symbols for their\n   * currency.\n   * For example, the Canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`. If the\n   * locale has no narrow symbol, uses the standard symbol for the locale.\n   *   - String: Use the given string value instead of a code or a symbol.\n   * For example, an empty string will suppress the currency & symbol.\n   *   - Boolean (marked deprecated in v5): `true` for symbol and false for `code`.\n   *\n   * @param digitsInfo Decimal representation options, specified by a string\n   * in the following format:<br>\n   * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n   *   - `minIntegerDigits`: The minimum number of integer digits before the decimal point.\n   * Default is `1`.\n   *   - `minFractionDigits`: The minimum number of digits after the decimal point.\n   * Default is `2`.\n   *   - `maxFractionDigits`: The maximum number of digits after the decimal point.\n   * Default is `2`.\n   * If not provided, the number will be formatted with the proper amount of digits,\n   * depending on what the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) specifies.\n   * For example, the Canadian dollar has 2 digits, whereas the Chilean peso has none.\n   * @param locale A locale code for the locale format rules to use.\n   * When not supplied, uses the value of `LOCALE_ID`, which is `en-US` by default.\n   * See [Setting your app locale](guide/i18n#setting-up-the-locale-of-your-app).\n   */\n  transform(\n      value: any, currencyCode?: string,\n      display: 'code'|'symbol'|'symbol-narrow'|string|boolean = 'symbol', digitsInfo?: string,\n      locale?: string): string|null {\n    if (isEmpty(value)) return null;\n\n    locale = locale || this._locale;\n\n    if (typeof display === 'boolean') {\n      if (<any>console && <any>console.warn) {\n        console.warn(\n            `Warning: the currency pipe has been changed in Angular v5. The symbolDisplay option (third parameter) is now a string instead of a boolean. The accepted values are \"code\", \"symbol\" or \"symbol-narrow\".`);\n      }\n      display = display ? 'symbol' : 'code';\n    }\n\n    let currency: string = currencyCode || this._defaultCurrencyCode;\n    if (display !== 'code') {\n      if (display === 'symbol' || display === 'symbol-narrow') {\n        currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n      } else {\n        currency = display;\n      }\n    }\n\n    try {\n      const num = strToNumber(value);\n      return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n    } catch (error) {\n      throw invalidPipeArgumentError(CurrencyPipe, error.message);\n    }\n  }\n}\n\nfunction isEmpty(value: any): boolean {\n  return value == null || value === '' || value !== value;\n}\n\n/**\n * Transforms a string into a number (if needed).\n */\nfunction strToNumber(value: number|string): number {\n  // Convert strings to numbers\n  if (typeof value === 'string' && !isNaN(Number(value) - parseFloat(value))) {\n    return Number(value);\n  }\n  if (typeof value !== 'number') {\n    throw new Error(`${value} is not a number`);\n  }\n  return value;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Pipe, PipeTransform} from '@angular/core';\nimport {invalidPipeArgumentError} from './invalid_pipe_argument_error';\n\n/**\n * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\n *\n * @usageNotes\n *\n * All behavior is based on the expected behavior of the JavaScript API `Array.prototype.slice()`\n * and `String.prototype.slice()`.\n *\n * When operating on an `Array`, the returned `Array` is always a copy even when all\n * the elements are being returned.\n *\n * When operating on a blank value, the pipe returns the blank value.\n *\n * ### List Example\n *\n * This `ngFor` example:\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_list'}\n *\n * produces the following:\n *\n * ```html\n * <li>b</li>\n * <li>c</li>\n * ```\n *\n * ### String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n * @publicApi\n */\n@Pipe({name: 'slice', pure: false})\nexport class SlicePipe implements PipeTransform {\n  /**\n   * @param value a list or a string to be sliced.\n   * @param start the starting index of the subset to return:\n   *   - **a positive integer**: return the item at `start` index and all items after\n   *     in the list or string expression.\n   *   - **a negative integer**: return the item at `start` index from the end and all items after\n   *     in the list or string expression.\n   *   - **if positive and greater than the size of the expression**: return an empty list or\n   * string.\n   *   - **if negative and greater than the size of the expression**: return entire list or string.\n   * @param end the ending index of the subset to return:\n   *   - **omitted**: return all items until the end.\n   *   - **if positive**: return all items before `end` index of the list or string.\n   *   - **if negative**: return all items before `end` index from the end of the list or string.\n   */\n  transform<T>(value: ReadonlyArray<T>, start: number, end?: number): Array<T>;\n  transform(value: string, start: number, end?: number): string;\n  transform(value: null, start: number, end?: number): null;\n  transform(value: undefined, start: number, end?: number): undefined;\n  transform(value: any, start: number, end?: number): any {\n    if (value == null) return value;\n\n    if (!this.supports(value)) {\n      throw invalidPipeArgumentError(SlicePipe, value);\n    }\n\n    return value.slice(start, end);\n  }\n\n  private supports(obj: any): boolean {\n    return typeof obj === 'string' || Array.isArray(obj);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * This module provides a set of common Pipes.\n */\nimport {AsyncPipe} from './async_pipe';\nimport {LowerCasePipe, TitleCasePipe, UpperCasePipe} from './case_conversion_pipes';\nimport {DatePipe} from './date_pipe';\nimport {I18nPluralPipe} from './i18n_plural_pipe';\nimport {I18nSelectPipe} from './i18n_select_pipe';\nimport {JsonPipe} from './json_pipe';\nimport {KeyValue, KeyValuePipe} from './keyvalue_pipe';\nimport {CurrencyPipe, DecimalPipe, PercentPipe} from './number_pipe';\nimport {SlicePipe} from './slice_pipe';\n\nexport {\n  AsyncPipe,\n  CurrencyPipe,\n  DatePipe,\n  DecimalPipe,\n  I18nPluralPipe,\n  I18nSelectPipe,\n  JsonPipe,\n  KeyValue,\n  KeyValuePipe,\n  LowerCasePipe,\n  PercentPipe,\n  SlicePipe,\n  TitleCasePipe,\n  UpperCasePipe,\n};\n\n\n/**\n * A collection of Angular pipes that are likely to be used in each and every application.\n */\nexport const COMMON_PIPES = [\n  AsyncPipe,\n  UpperCasePipe,\n  LowerCasePipe,\n  JsonPipe,\n  SlicePipe,\n  DecimalPipe,\n  PercentPipe,\n  TitleCasePipe,\n  CurrencyPipe,\n  DatePipe,\n  I18nPluralPipe,\n  I18nSelectPipe,\n  KeyValuePipe,\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {COMMON_DIRECTIVES} from './directives/index';\nimport {NgLocaleLocalization, NgLocalization} from './i18n/localization';\nimport {COMMON_PIPES} from './pipes/index';\n\n\n// Note: This does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * Exports all the basic Angular directives and pipes,\n * such as `NgIf`, `NgForOf`, `DecimalPipe`, and so on.\n * Re-exported by `BrowserModule`, which is included automatically in the root\n * `AppModule` when you create a new app with the CLI `new` command.\n *\n * * The `providers` options configure the NgModule's injector to provide\n * localization dependencies to members.\n * * The `exports` options make the declared directives and pipes available for import\n * by other NgModules.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n  exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n  providers: [\n    {provide: NgLocalization, useClass: NgLocaleLocalization},\n  ],\n})\nexport class CommonModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const PLATFORM_BROWSER_ID = 'browser';\nexport const PLATFORM_SERVER_ID = 'server';\nexport const PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nexport const PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n\n/**\n * Returns whether a platform id represents a browser platform.\n * @publicApi\n */\nexport function isPlatformBrowser(platformId: Object): boolean {\n  return platformId === PLATFORM_BROWSER_ID;\n}\n\n/**\n * Returns whether a platform id represents a server platform.\n * @publicApi\n */\nexport function isPlatformServer(platformId: Object): boolean {\n  return platformId === PLATFORM_SERVER_ID;\n}\n\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @publicApi\n */\nexport function isPlatformWorkerApp(platformId: Object): boolean {\n  return platformId === PLATFORM_WORKER_APP_ID;\n}\n\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @publicApi\n */\nexport function isPlatformWorkerUi(platformId: Object): boolean {\n  return platformId === PLATFORM_WORKER_UI_ID;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('10.1.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ErrorHandler, ɵɵdefineInjectable, ɵɵinject} from '@angular/core';\n\nimport {DOCUMENT} from './dom_tokens';\n\n\n\n/**\n * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.\n *\n * @publicApi\n */\nexport abstract class ViewportScroller {\n  // De-sugared tree-shakable injection\n  // See #23917\n  /** @nocollapse */\n  static ɵprov = ɵɵdefineInjectable({\n    token: ViewportScroller,\n    providedIn: 'root',\n    factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler))\n  });\n\n  /**\n   * Configures the top offset used when scrolling to an anchor.\n   * @param offset A position in screen coordinates (a tuple with x and y values)\n   * or a function that returns the top offset position.\n   *\n   */\n  abstract setOffset(offset: [number, number]|(() => [number, number])): void;\n\n  /**\n   * Retrieves the current scroll position.\n   * @returns A position in screen coordinates (a tuple with x and y values).\n   */\n  abstract getScrollPosition(): [number, number];\n\n  /**\n   * Scrolls to a specified position.\n   * @param position A position in screen coordinates (a tuple with x and y values).\n   */\n  abstract scrollToPosition(position: [number, number]): void;\n\n  /**\n   * Scrolls to an anchor element.\n   * @param anchor The ID of the anchor element.\n   */\n  abstract scrollToAnchor(anchor: string): void;\n\n  /**\n   * Disables automatic scroll restoration provided by the browser.\n   * See also [window.history.scrollRestoration\n   * info](https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration).\n   */\n  abstract setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void;\n}\n\n/**\n * Manages the scroll position for a browser window.\n */\nexport class BrowserViewportScroller implements ViewportScroller {\n  private offset: () => [number, number] = () => [0, 0];\n\n  constructor(private document: any, private window: any, private errorHandler: ErrorHandler) {}\n\n  /**\n   * Configures the top offset used when scrolling to an anchor.\n   * @param offset A position in screen coordinates (a tuple with x and y values)\n   * or a function that returns the top offset position.\n   *\n   */\n  setOffset(offset: [number, number]|(() => [number, number])): void {\n    if (Array.isArray(offset)) {\n      this.offset = () => offset;\n    } else {\n      this.offset = offset;\n    }\n  }\n\n  /**\n   * Retrieves the current scroll position.\n   * @returns The position in screen coordinates.\n   */\n  getScrollPosition(): [number, number] {\n    if (this.supportsScrolling()) {\n      return [this.window.scrollX, this.window.scrollY];\n    } else {\n      return [0, 0];\n    }\n  }\n\n  /**\n   * Sets the scroll position.\n   * @param position The new position in screen coordinates.\n   */\n  scrollToPosition(position: [number, number]): void {\n    if (this.supportsScrolling()) {\n      this.window.scrollTo(position[0], position[1]);\n    }\n  }\n\n  /**\n   * Scrolls to an anchor element.\n   * @param anchor The ID of the anchor element.\n   */\n  scrollToAnchor(anchor: string): void {\n    if (this.supportsScrolling()) {\n      const elSelected =\n          this.document.getElementById(anchor) || this.document.getElementsByName(anchor)[0];\n      if (elSelected) {\n        this.scrollToElement(elSelected);\n      }\n    }\n  }\n\n  /**\n   * Disables automatic scroll restoration provided by the browser.\n   */\n  setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void {\n    if (this.supportScrollRestoration()) {\n      const history = this.window.history;\n      if (history && history.scrollRestoration) {\n        history.scrollRestoration = scrollRestoration;\n      }\n    }\n  }\n\n  private scrollToElement(el: any): void {\n    const rect = el.getBoundingClientRect();\n    const left = rect.left + this.window.pageXOffset;\n    const top = rect.top + this.window.pageYOffset;\n    const offset = this.offset();\n    this.window.scrollTo(left - offset[0], top - offset[1]);\n  }\n\n  /**\n   * We only support scroll restoration when we can get a hold of window.\n   * This means that we do not support this behavior when running in a web worker.\n   *\n   * Lifting this restriction right now would require more changes in the dom adapter.\n   * Since webworkers aren't widely used, we will lift it once RouterScroller is\n   * battle-tested.\n   */\n  private supportScrollRestoration(): boolean {\n    try {\n      if (!this.window || !this.window.scrollTo) {\n        return false;\n      }\n      // The `scrollRestoration` property could be on the `history` instance or its prototype.\n      const scrollRestorationDescriptor = getScrollRestorationProperty(this.window.history) ||\n          getScrollRestorationProperty(Object.getPrototypeOf(this.window.history));\n      // We can write to the `scrollRestoration` property if it is a writable data field or it has a\n      // setter function.\n      return !!scrollRestorationDescriptor &&\n          !!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);\n    } catch {\n      return false;\n    }\n  }\n\n  private supportsScrolling(): boolean {\n    try {\n      return !!this.window.scrollTo;\n    } catch {\n      return false;\n    }\n  }\n}\n\nfunction getScrollRestorationProperty(obj: any): PropertyDescriptor|undefined {\n  return Object.getOwnPropertyDescriptor(obj, 'scrollRestoration');\n}\n\n/**\n * Provides an empty implementation of the viewport scroller. This will\n * live in @angular/common as it will be used by both platform-server and platform-webworker.\n */\nexport class NullViewportScroller implements ViewportScroller {\n  /**\n   * Empty implementation\n   */\n  setOffset(offset: [number, number]|(() => [number, number])): void {}\n\n  /**\n   * Empty implementation\n   */\n  getScrollPosition(): [number, number] {\n    return [0, 0];\n  }\n\n  /**\n   * Empty implementation\n   */\n  scrollToPosition(position: [number, number]): void {}\n\n  /**\n   * Empty implementation\n   */\n  scrollToAnchor(anchor: string): void {}\n\n  /**\n   * Empty implementation\n   */\n  setHistoryScrollRestoration(scrollRestoration: 'auto'|'manual'): void {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\nexport * from './private_export';\nexport * from './location/index';\nexport {formatDate} from './i18n/format_date';\nexport {formatCurrency, formatNumber, formatPercent} from './i18n/format_number';\nexport {NgLocaleLocalization, NgLocalization} from './i18n/localization';\nexport {registerLocaleData} from './i18n/locale_data';\nexport {Plural, NumberFormatStyle, FormStyle, Time, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getNumberOfCurrencyDigits, getCurrencySymbol, getLocaleDayPeriods, getLocaleDayNames, getLocaleMonthNames, getLocaleId, getLocaleEraNames, getLocaleWeekEndRange, getLocaleFirstDayOfWeek, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocalePluralCase, getLocaleTimeFormat, getLocaleNumberSymbol, getLocaleNumberFormat, getLocaleCurrencyCode, getLocaleCurrencyName, getLocaleCurrencySymbol, getLocaleDirection} from './i18n/locale_data_api';\nexport {parseCookieValue as ɵparseCookieValue} from './cookie';\nexport {CommonModule} from './common_module';\nexport {NgClass, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet} from './directives/index';\nexport {DOCUMENT} from './dom_tokens';\nexport {AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe, KeyValuePipe, KeyValue} from './pipes/index';\nexport {PLATFORM_BROWSER_ID as ɵPLATFORM_BROWSER_ID, PLATFORM_SERVER_ID as ɵPLATFORM_SERVER_ID, PLATFORM_WORKER_APP_ID as ɵPLATFORM_WORKER_APP_ID, PLATFORM_WORKER_UI_ID as ɵPLATFORM_WORKER_UI_ID, isPlatformBrowser, isPlatformServer, isPlatformWorkerApp, isPlatformWorkerUi} from './platform_id';\nexport {VERSION} from './version';\nexport {ViewportScroller, NullViewportScroller as ɵNullViewportScroller} from './viewport_scroller';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/common';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","import { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport const subscribeTo = (result) => {\n    if (!!result && typeof result[Symbol_observable] === 'function') {\n        return subscribeToObservable(result);\n    }\n    else if (isArrayLike(result)) {\n        return subscribeToArray(result);\n    }\n    else if (isPromise(result)) {\n        return subscribeToPromise(result);\n    }\n    else if (!!result && typeof result[Symbol_iterator] === 'function') {\n        return subscribeToIterable(result);\n    }\n    else {\n        const value = isObject(result) ? 'an invalid object' : `'${result}'`;\n        const msg = `You provided ${value} where a stream was expected.`\n            + ' You can provide an Observable, Promise, Array, or Iterable.';\n        throw new TypeError(msg);\n    }\n};\n//# sourceMappingURL=subscribeTo.js.map","export function identity(x) {\n    return x;\n}\n//# sourceMappingURL=identity.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n    const hasDefaultValue = arguments.length >= 2;\n    return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _toArray(arr) {\n  return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","export default function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n    _typeof = function _typeof(obj) {\n      return typeof obj;\n    };\n  } else {\n    _typeof = function _typeof(obj) {\n      return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n    };\n  }\n\n  return _typeof(obj);\n}","import { BehaviorSubject } from '../BehaviorSubject';\nimport { multicast } from './multicast';\nexport function publishBehavior(value) {\n    return (source) => multicast(new BehaviorSubject(value))(source);\n}\n//# sourceMappingURL=publishBehavior.js.map","import { Subject } from '../Subject';\nimport { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\nexport function windowTime(windowTimeSpan) {\n    let scheduler = async;\n    let windowCreationInterval = null;\n    let maxWindowSize = Number.POSITIVE_INFINITY;\n    if (isScheduler(arguments[3])) {\n        scheduler = arguments[3];\n    }\n    if (isScheduler(arguments[2])) {\n        scheduler = arguments[2];\n    }\n    else if (isNumeric(arguments[2])) {\n        maxWindowSize = Number(arguments[2]);\n    }\n    if (isScheduler(arguments[1])) {\n        scheduler = arguments[1];\n    }\n    else if (isNumeric(arguments[1])) {\n        windowCreationInterval = Number(arguments[1]);\n    }\n    return function windowTimeOperatorFunction(source) {\n        return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));\n    };\n}\nclass WindowTimeOperator {\n    constructor(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n        this.windowTimeSpan = windowTimeSpan;\n        this.windowCreationInterval = windowCreationInterval;\n        this.maxWindowSize = maxWindowSize;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));\n    }\n}\nclass CountedSubject extends Subject {\n    constructor() {\n        super(...arguments);\n        this._numberOfNextedValues = 0;\n    }\n    next(value) {\n        this._numberOfNextedValues++;\n        super.next(value);\n    }\n    get numberOfNextedValues() {\n        return this._numberOfNextedValues;\n    }\n}\nclass WindowTimeSubscriber extends Subscriber {\n    constructor(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n        super(destination);\n        this.destination = destination;\n        this.windowTimeSpan = windowTimeSpan;\n        this.windowCreationInterval = windowCreationInterval;\n        this.maxWindowSize = maxWindowSize;\n        this.scheduler = scheduler;\n        this.windows = [];\n        const window = this.openWindow();\n        if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n            const closeState = { subscriber: this, window, context: null };\n            const creationState = { windowTimeSpan, windowCreationInterval, subscriber: this, scheduler };\n            this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));\n            this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));\n        }\n        else {\n            const timeSpanOnlyState = { subscriber: this, window, windowTimeSpan };\n            this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));\n        }\n    }\n    _next(value) {\n        const windows = this.windows;\n        const len = windows.length;\n        for (let i = 0; i < len; i++) {\n            const window = windows[i];\n            if (!window.closed) {\n                window.next(value);\n                if (window.numberOfNextedValues >= this.maxWindowSize) {\n                    this.closeWindow(window);\n                }\n            }\n        }\n    }\n    _error(err) {\n        const windows = this.windows;\n        while (windows.length > 0) {\n            windows.shift().error(err);\n        }\n        this.destination.error(err);\n    }\n    _complete() {\n        const windows = this.windows;\n        while (windows.length > 0) {\n            const window = windows.shift();\n            if (!window.closed) {\n                window.complete();\n            }\n        }\n        this.destination.complete();\n    }\n    openWindow() {\n        const window = new CountedSubject();\n        this.windows.push(window);\n        const destination = this.destination;\n        destination.next(window);\n        return window;\n    }\n    closeWindow(window) {\n        window.complete();\n        const windows = this.windows;\n        windows.splice(windows.indexOf(window), 1);\n    }\n}\nfunction dispatchWindowTimeSpanOnly(state) {\n    const { subscriber, windowTimeSpan, window } = state;\n    if (window) {\n        subscriber.closeWindow(window);\n    }\n    state.window = subscriber.openWindow();\n    this.schedule(state, windowTimeSpan);\n}\nfunction dispatchWindowCreation(state) {\n    const { windowTimeSpan, subscriber, scheduler, windowCreationInterval } = state;\n    const window = subscriber.openWindow();\n    const action = this;\n    let context = { action, subscription: null };\n    const timeSpanState = { subscriber, window, context };\n    context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);\n    action.add(context.subscription);\n    action.schedule(state, windowCreationInterval);\n}\nfunction dispatchWindowClose(state) {\n    const { subscriber, window, context } = state;\n    if (context && context.action && context.subscription) {\n        context.action.remove(context.subscription);\n    }\n    subscriber.closeWindow(window);\n}\n//# sourceMappingURL=windowTime.js.map","import { mergeMap } from './mergeMap';\nexport function mergeMapTo(innerObservable, resultSelector, concurrent = Number.POSITIVE_INFINITY) {\n    if (typeof resultSelector === 'function') {\n        return mergeMap(() => innerObservable, resultSelector, concurrent);\n    }\n    if (typeof resultSelector === 'number') {\n        concurrent = resultSelector;\n    }\n    return mergeMap(() => innerObservable, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map","import { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n    let config;\n    if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n        config = configOrBufferSize;\n    }\n    else {\n        config = {\n            bufferSize: configOrBufferSize,\n            windowTime,\n            refCount: false,\n            scheduler\n        };\n    }\n    return (source) => source.lift(shareReplayOperator(config));\n}\nfunction shareReplayOperator({ bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, refCount: useRefCount, scheduler }) {\n    let subject;\n    let refCount = 0;\n    let subscription;\n    let hasError = false;\n    let isComplete = false;\n    return function shareReplayOperation(source) {\n        refCount++;\n        let innerSub;\n        if (!subject || hasError) {\n            hasError = false;\n            subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n            innerSub = subject.subscribe(this);\n            subscription = source.subscribe({\n                next(value) { subject.next(value); },\n                error(err) {\n                    hasError = true;\n                    subject.error(err);\n                },\n                complete() {\n                    isComplete = true;\n                    subscription = undefined;\n                    subject.complete();\n                },\n            });\n        }\n        else {\n            innerSub = subject.subscribe(this);\n        }\n        this.add(() => {\n            refCount--;\n            innerSub.unsubscribe();\n            if (subscription && !isComplete && useRefCount && refCount === 0) {\n                subscription.unsubscribe();\n                subscription = undefined;\n                subject = undefined;\n            }\n        });\n    };\n}\n//# sourceMappingURL=shareReplay.js.map","import { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge(...observables) {\n    let concurrent = Number.POSITIVE_INFINITY;\n    let scheduler = null;\n    let last = observables[observables.length - 1];\n    if (isScheduler(last)) {\n        scheduler = observables.pop();\n        if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n            concurrent = observables.pop();\n        }\n    }\n    else if (typeof last === 'number') {\n        concurrent = observables.pop();\n    }\n    if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n        return observables[0];\n    }\n    return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { AsyncAction } from './AsyncAction';\nexport class AnimationFrameAction extends AsyncAction {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        if (delay !== null && delay > 0) {\n            return super.requestAsyncId(scheduler, id, delay);\n        }\n        scheduler.actions.push(this);\n        return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(() => scheduler.flush(null)));\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return super.recycleAsyncId(scheduler, id, delay);\n        }\n        if (scheduler.actions.length === 0) {\n            cancelAnimationFrame(id);\n            scheduler.scheduled = undefined;\n        }\n        return undefined;\n    }\n}\n//# sourceMappingURL=AnimationFrameAction.js.map","import { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n(function (NotificationKind) {\n    NotificationKind[\"NEXT\"] = \"N\";\n    NotificationKind[\"ERROR\"] = \"E\";\n    NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nexport class Notification {\n    constructor(kind, value, error) {\n        this.kind = kind;\n        this.value = value;\n        this.error = error;\n        this.hasValue = kind === 'N';\n    }\n    observe(observer) {\n        switch (this.kind) {\n            case 'N':\n                return observer.next && observer.next(this.value);\n            case 'E':\n                return observer.error && observer.error(this.error);\n            case 'C':\n                return observer.complete && observer.complete();\n        }\n    }\n    do(next, error, complete) {\n        const kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return next && next(this.value);\n            case 'E':\n                return error && error(this.error);\n            case 'C':\n                return complete && complete();\n        }\n    }\n    accept(nextOrObserver, error, complete) {\n        if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n            return this.observe(nextOrObserver);\n        }\n        else {\n            return this.do(nextOrObserver, error, complete);\n        }\n    }\n    toObservable() {\n        const kind = this.kind;\n        switch (kind) {\n            case 'N':\n                return of(this.value);\n            case 'E':\n                return throwError(this.error);\n            case 'C':\n                return empty();\n        }\n        throw new Error('unexpected notification kind value');\n    }\n    static createNext(value) {\n        if (typeof value !== 'undefined') {\n            return new Notification('N', value);\n        }\n        return Notification.undefinedValueNotification;\n    }\n    static createError(err) {\n        return new Notification('E', undefined, err);\n    }\n    static createComplete() {\n        return Notification.completeNotification;\n    }\n}\nNotification.completeNotification = new Notification('C');\nNotification.undefinedValueNotification = new Notification('N', undefined);\n//# sourceMappingURL=Notification.js.map","import { Observable } from '../Observable';\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {\n    let resultSelector;\n    let initialState;\n    if (arguments.length == 1) {\n        const options = initialStateOrOptions;\n        initialState = options.initialState;\n        condition = options.condition;\n        iterate = options.iterate;\n        resultSelector = options.resultSelector || identity;\n        scheduler = options.scheduler;\n    }\n    else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {\n        initialState = initialStateOrOptions;\n        resultSelector = identity;\n        scheduler = resultSelectorOrObservable;\n    }\n    else {\n        initialState = initialStateOrOptions;\n        resultSelector = resultSelectorOrObservable;\n    }\n    return new Observable(subscriber => {\n        let state = initialState;\n        if (scheduler) {\n            return scheduler.schedule(dispatch, 0, {\n                subscriber,\n                iterate,\n                condition,\n                resultSelector,\n                state\n            });\n        }\n        do {\n            if (condition) {\n                let conditionResult;\n                try {\n                    conditionResult = condition(state);\n                }\n                catch (err) {\n                    subscriber.error(err);\n                    return undefined;\n                }\n                if (!conditionResult) {\n                    subscriber.complete();\n                    break;\n                }\n            }\n            let value;\n            try {\n                value = resultSelector(state);\n            }\n            catch (err) {\n                subscriber.error(err);\n                return undefined;\n            }\n            subscriber.next(value);\n            if (subscriber.closed) {\n                break;\n            }\n            try {\n                state = iterate(state);\n            }\n            catch (err) {\n                subscriber.error(err);\n                return undefined;\n            }\n        } while (true);\n        return undefined;\n    });\n}\nfunction dispatch(state) {\n    const { subscriber, condition } = state;\n    if (subscriber.closed) {\n        return undefined;\n    }\n    if (state.needIterate) {\n        try {\n            state.state = state.iterate(state.state);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n    }\n    else {\n        state.needIterate = true;\n    }\n    if (condition) {\n        let conditionResult;\n        try {\n            conditionResult = condition(state.state);\n        }\n        catch (err) {\n            subscriber.error(err);\n            return undefined;\n        }\n        if (!conditionResult) {\n            subscriber.complete();\n            return undefined;\n        }\n        if (subscriber.closed) {\n            return undefined;\n        }\n    }\n    let value;\n    try {\n        value = state.resultSelector(state.state);\n    }\n    catch (err) {\n        subscriber.error(err);\n        return undefined;\n    }\n    if (subscriber.closed) {\n        return undefined;\n    }\n    subscriber.next(value);\n    if (subscriber.closed) {\n        return undefined;\n    }\n    return this.schedule(state);\n}\n//# sourceMappingURL=generate.js.map","import { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n    if (nextOrObserver) {\n        if (nextOrObserver instanceof Subscriber) {\n            return nextOrObserver;\n        }\n        if (nextOrObserver[rxSubscriberSymbol]) {\n            return nextOrObserver[rxSubscriberSymbol]();\n        }\n    }\n    if (!nextOrObserver && !error && !complete) {\n        return new Subscriber(emptyObserver);\n    }\n    return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map","import { EmptyError } from '../util/EmptyError';\nimport { Subscriber } from '../Subscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n    return (source) => {\n        return source.lift(new ThrowIfEmptyOperator(errorFactory));\n    };\n}\nclass ThrowIfEmptyOperator {\n    constructor(errorFactory) {\n        this.errorFactory = errorFactory;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));\n    }\n}\nclass ThrowIfEmptySubscriber extends Subscriber {\n    constructor(destination, errorFactory) {\n        super(destination);\n        this.errorFactory = errorFactory;\n        this.hasValue = false;\n    }\n    _next(value) {\n        this.hasValue = true;\n        this.destination.next(value);\n    }\n    _complete() {\n        if (!this.hasValue) {\n            let err;\n            try {\n                err = this.errorFactory();\n            }\n            catch (e) {\n                err = e;\n            }\n            this.destination.error(err);\n        }\n        else {\n            return this.destination.complete();\n        }\n    }\n}\nfunction defaultErrorFactory() {\n    return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nexport class SubjectSubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n        this.destination = destination;\n    }\n}\nexport class Subject extends Observable {\n    constructor() {\n        super();\n        this.observers = [];\n        this.closed = false;\n        this.isStopped = false;\n        this.hasError = false;\n        this.thrownError = null;\n    }\n    [rxSubscriberSymbol]() {\n        return new SubjectSubscriber(this);\n    }\n    lift(operator) {\n        const subject = new AnonymousSubject(this, this);\n        subject.operator = operator;\n        return subject;\n    }\n    next(value) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        if (!this.isStopped) {\n            const { observers } = this;\n            const len = observers.length;\n            const copy = observers.slice();\n            for (let i = 0; i < len; i++) {\n                copy[i].next(value);\n            }\n        }\n    }\n    error(err) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.hasError = true;\n        this.thrownError = err;\n        this.isStopped = true;\n        const { observers } = this;\n        const len = observers.length;\n        const copy = observers.slice();\n        for (let i = 0; i < len; i++) {\n            copy[i].error(err);\n        }\n        this.observers.length = 0;\n    }\n    complete() {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        this.isStopped = true;\n        const { observers } = this;\n        const len = observers.length;\n        const copy = observers.slice();\n        for (let i = 0; i < len; i++) {\n            copy[i].complete();\n        }\n        this.observers.length = 0;\n    }\n    unsubscribe() {\n        this.isStopped = true;\n        this.closed = true;\n        this.observers = null;\n    }\n    _trySubscribe(subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else {\n            return super._trySubscribe(subscriber);\n        }\n    }\n    _subscribe(subscriber) {\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else if (this.hasError) {\n            subscriber.error(this.thrownError);\n            return Subscription.EMPTY;\n        }\n        else if (this.isStopped) {\n            subscriber.complete();\n            return Subscription.EMPTY;\n        }\n        else {\n            this.observers.push(subscriber);\n            return new SubjectSubscription(this, subscriber);\n        }\n    }\n    asObservable() {\n        const observable = new Observable();\n        observable.source = this;\n        return observable;\n    }\n}\nSubject.create = (destination, source) => {\n    return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n    constructor(destination, source) {\n        super();\n        this.destination = destination;\n        this.source = source;\n    }\n    next(value) {\n        const { destination } = this;\n        if (destination && destination.next) {\n            destination.next(value);\n        }\n    }\n    error(err) {\n        const { destination } = this;\n        if (destination && destination.error) {\n            this.destination.error(err);\n        }\n    }\n    complete() {\n        const { destination } = this;\n        if (destination && destination.complete) {\n            this.destination.complete();\n        }\n    }\n    _subscribe(subscriber) {\n        const { source } = this;\n        if (source) {\n            return this.source.subscribe(subscriber);\n        }\n        else {\n            return Subscription.EMPTY;\n        }\n    }\n}\n//# sourceMappingURL=Subject.js.map","import getPrototypeOf from \"./getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n  while (!Object.prototype.hasOwnProperty.call(object, property)) {\n    object = getPrototypeOf(object);\n    if (object === null) break;\n  }\n\n  return object;\n}","export function isObject(x) {\n    return x !== null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function exhaustMap(project, resultSelector) {\n    if (resultSelector) {\n        return (source) => source.pipe(exhaustMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n    }\n    return (source) => source.lift(new ExhaustMapOperator(project));\n}\nclass ExhaustMapOperator {\n    constructor(project) {\n        this.project = project;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n    }\n}\nclass ExhaustMapSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project) {\n        super(destination);\n        this.project = project;\n        this.hasSubscription = false;\n        this.hasCompleted = false;\n        this.index = 0;\n    }\n    _next(value) {\n        if (!this.hasSubscription) {\n            this.tryNext(value);\n        }\n    }\n    tryNext(value) {\n        let result;\n        const index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.hasSubscription = true;\n        this._innerSub(result);\n    }\n    _innerSub(result) {\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        const innerSubscription = innerSubscribe(result, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            destination.add(innerSubscription);\n        }\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (!this.hasSubscription) {\n            this.destination.complete();\n        }\n        this.unsubscribe();\n    }\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n    notifyError(err) {\n        this.destination.error(err);\n    }\n    notifyComplete() {\n        this.hasSubscription = false;\n        if (this.hasCompleted) {\n            this.destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=exhaustMap.js.map","export class Scheduler {\n    constructor(SchedulerAction, now = Scheduler.now) {\n        this.SchedulerAction = SchedulerAction;\n        this.now = now;\n    }\n    schedule(work, delay = 0, state) {\n        return new this.SchedulerAction(this, work).schedule(state, delay);\n    }\n}\nScheduler.now = () => Date.now();\n//# sourceMappingURL=Scheduler.js.map","const TimeoutErrorImpl = (() => {\n    function TimeoutErrorImpl() {\n        Error.call(this);\n        this.message = 'Timeout has occurred';\n        this.name = 'TimeoutError';\n        return this;\n    }\n    TimeoutErrorImpl.prototype = Object.create(Error.prototype);\n    return TimeoutErrorImpl;\n})();\nexport const TimeoutError = TimeoutErrorImpl;\n//# sourceMappingURL=TimeoutError.js.map","import { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n    return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map","import { isArray } from './isArray';\nexport function isNumeric(val) {\n    return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\n//# sourceMappingURL=isNumeric.js.map","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","import { Subscription } from './Subscription';\nexport class SubjectSubscription extends Subscription {\n    constructor(subject, subscriber) {\n        super();\n        this.subject = subject;\n        this.subscriber = subscriber;\n        this.closed = false;\n    }\n    unsubscribe() {\n        if (this.closed) {\n            return;\n        }\n        this.closed = true;\n        const subject = this.subject;\n        const observers = subject.observers;\n        this.subject = null;\n        if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n            return;\n        }\n        const subscriberIndex = observers.indexOf(this.subscriber);\n        if (subscriberIndex !== -1) {\n            observers.splice(subscriberIndex, 1);\n        }\n    }\n}\n//# sourceMappingURL=SubjectSubscription.js.map","import { AsyncAction } from './AsyncAction';\nexport class QueueAction extends AsyncAction {\n    constructor(scheduler, work) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n    }\n    schedule(state, delay = 0) {\n        if (delay > 0) {\n            return super.schedule(state, delay);\n        }\n        this.delay = delay;\n        this.state = state;\n        this.scheduler.flush(this);\n        return this;\n    }\n    execute(state, delay) {\n        return (delay > 0 || this.closed) ?\n            super.execute(state, delay) :\n            this._execute(state, delay);\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n            return super.requestAsyncId(scheduler, id, delay);\n        }\n        return scheduler.flush(this);\n    }\n}\n//# sourceMappingURL=QueueAction.js.map","import { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, innerSubscriber = new InnerSubscriber(outerSubscriber, outerValue, outerIndex)) {\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    return subscribeTo(result)(innerSubscriber);\n}\n//# sourceMappingURL=subscribeToResult.js.map","import { Subscriber } from '../Subscriber';\nexport function pairwise() {\n    return (source) => source.lift(new PairwiseOperator());\n}\nclass PairwiseOperator {\n    call(subscriber, source) {\n        return source.subscribe(new PairwiseSubscriber(subscriber));\n    }\n}\nclass PairwiseSubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n        this.hasPrev = false;\n    }\n    _next(value) {\n        let pair;\n        if (this.hasPrev) {\n            pair = [this.prev, value];\n        }\n        else {\n            this.hasPrev = true;\n        }\n        this.prev = value;\n        if (pair) {\n            this.destination.next(pair);\n        }\n    }\n}\n//# sourceMappingURL=pairwise.js.map","import { Subscriber } from '../Subscriber';\nexport function sequenceEqual(compareTo, comparator) {\n    return (source) => source.lift(new SequenceEqualOperator(compareTo, comparator));\n}\nexport class SequenceEqualOperator {\n    constructor(compareTo, comparator) {\n        this.compareTo = compareTo;\n        this.comparator = comparator;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));\n    }\n}\nexport class SequenceEqualSubscriber extends Subscriber {\n    constructor(destination, compareTo, comparator) {\n        super(destination);\n        this.compareTo = compareTo;\n        this.comparator = comparator;\n        this._a = [];\n        this._b = [];\n        this._oneComplete = false;\n        this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, this)));\n    }\n    _next(value) {\n        if (this._oneComplete && this._b.length === 0) {\n            this.emit(false);\n        }\n        else {\n            this._a.push(value);\n            this.checkValues();\n        }\n    }\n    _complete() {\n        if (this._oneComplete) {\n            this.emit(this._a.length === 0 && this._b.length === 0);\n        }\n        else {\n            this._oneComplete = true;\n        }\n        this.unsubscribe();\n    }\n    checkValues() {\n        const { _a, _b, comparator } = this;\n        while (_a.length > 0 && _b.length > 0) {\n            let a = _a.shift();\n            let b = _b.shift();\n            let areEqual = false;\n            try {\n                areEqual = comparator ? comparator(a, b) : a === b;\n            }\n            catch (e) {\n                this.destination.error(e);\n            }\n            if (!areEqual) {\n                this.emit(false);\n            }\n        }\n    }\n    emit(value) {\n        const { destination } = this;\n        destination.next(value);\n        destination.complete();\n    }\n    nextB(value) {\n        if (this._oneComplete && this._a.length === 0) {\n            this.emit(false);\n        }\n        else {\n            this._b.push(value);\n            this.checkValues();\n        }\n    }\n    completeB() {\n        if (this._oneComplete) {\n            this.emit(this._a.length === 0 && this._b.length === 0);\n        }\n        else {\n            this._oneComplete = true;\n        }\n    }\n}\nclass SequenceEqualCompareToSubscriber extends Subscriber {\n    constructor(destination, parent) {\n        super(destination);\n        this.parent = parent;\n    }\n    _next(value) {\n        this.parent.nextB(value);\n    }\n    _error(err) {\n        this.parent.error(err);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.completeB();\n        this.unsubscribe();\n    }\n}\n//# sourceMappingURL=sequenceEqual.js.map","export default function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}","import { hostReportError } from './hostReportError';\nexport const subscribeToPromise = (promise) => (subscriber) => {\n    promise.then((value) => {\n        if (!subscriber.closed) {\n            subscriber.next(value);\n            subscriber.complete();\n        }\n    }, (err) => subscriber.error(err))\n        .then(null, hostReportError);\n    return subscriber;\n};\n//# sourceMappingURL=subscribeToPromise.js.map","import { switchMap } from './switchMap';\nexport function switchMapTo(innerObservable, resultSelector) {\n    return resultSelector ? switchMap(() => innerObservable, resultSelector) : switchMap(() => innerObservable);\n}\n//# sourceMappingURL=switchMapTo.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Number.POSITIVE_INFINITY) {\n    return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeMap } from './mergeMap';\nexport function concatMap(project, resultSelector) {\n    return mergeMap(project, resultSelector, 1);\n}\n//# sourceMappingURL=concatMap.js.map","export function isPromise(value) {\n    return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function sample(notifier) {\n    return (source) => source.lift(new SampleOperator(notifier));\n}\nclass SampleOperator {\n    constructor(notifier) {\n        this.notifier = notifier;\n    }\n    call(subscriber, source) {\n        const sampleSubscriber = new SampleSubscriber(subscriber);\n        const subscription = source.subscribe(sampleSubscriber);\n        subscription.add(innerSubscribe(this.notifier, new SimpleInnerSubscriber(sampleSubscriber)));\n        return subscription;\n    }\n}\nclass SampleSubscriber extends SimpleOuterSubscriber {\n    constructor() {\n        super(...arguments);\n        this.hasValue = false;\n    }\n    _next(value) {\n        this.value = value;\n        this.hasValue = true;\n    }\n    notifyNext() {\n        this.emitValue();\n    }\n    notifyComplete() {\n        this.emitValue();\n    }\n    emitValue() {\n        if (this.hasValue) {\n            this.hasValue = false;\n            this.destination.next(this.value);\n        }\n    }\n}\n//# sourceMappingURL=sample.js.map","let nextHandle = 1;\nconst RESOLVED = (() => Promise.resolve())();\nconst activeHandles = {};\nfunction findAndClearHandle(handle) {\n    if (handle in activeHandles) {\n        delete activeHandles[handle];\n        return true;\n    }\n    return false;\n}\nexport const Immediate = {\n    setImmediate(cb) {\n        const handle = nextHandle++;\n        activeHandles[handle] = true;\n        RESOLVED.then(() => findAndClearHandle(handle) && cb());\n        return handle;\n    },\n    clearImmediate(handle) {\n        findAndClearHandle(handle);\n    },\n};\nexport const TestTools = {\n    pending() {\n        return Object.keys(activeHandles).length;\n    }\n};\n//# sourceMappingURL=Immediate.js.map","import { Subscriber } from '../Subscriber';\nexport function find(predicate, thisArg) {\n    if (typeof predicate !== 'function') {\n        throw new TypeError('predicate is not a function');\n    }\n    return (source) => source.lift(new FindValueOperator(predicate, source, false, thisArg));\n}\nexport class FindValueOperator {\n    constructor(predicate, source, yieldIndex, thisArg) {\n        this.predicate = predicate;\n        this.source = source;\n        this.yieldIndex = yieldIndex;\n        this.thisArg = thisArg;\n    }\n    call(observer, source) {\n        return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));\n    }\n}\nexport class FindValueSubscriber extends Subscriber {\n    constructor(destination, predicate, source, yieldIndex, thisArg) {\n        super(destination);\n        this.predicate = predicate;\n        this.source = source;\n        this.yieldIndex = yieldIndex;\n        this.thisArg = thisArg;\n        this.index = 0;\n    }\n    notifyComplete(value) {\n        const destination = this.destination;\n        destination.next(value);\n        destination.complete();\n        this.unsubscribe();\n    }\n    _next(value) {\n        const { predicate, thisArg } = this;\n        const index = this.index++;\n        try {\n            const result = predicate.call(thisArg || this, value, index, this.source);\n            if (result) {\n                this.notifyComplete(this.yieldIndex ? index : value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    }\n    _complete() {\n        this.notifyComplete(this.yieldIndex ? -1 : undefined);\n    }\n}\n//# sourceMappingURL=find.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵDomAdapter as DomAdapter} from '@angular/common';\n\n\n\n/**\n * Provides DOM operations in any browser environment.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\nexport abstract class GenericBrowserDomAdapter extends DomAdapter {\n  constructor() {\n    super();\n  }\n\n  supportsDOMEvents(): boolean {\n    return true;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵparseCookieValue as parseCookieValue, ɵsetRootDomAdapter as setRootDomAdapter} from '@angular/common';\nimport {ɵglobal as global} from '@angular/core';\n\nimport {GenericBrowserDomAdapter} from './generic_browser_adapter';\n\nconst nodeContains: (this: Node, other: Node) => boolean = (() => {\n  if (global['Node']) {\n    return global['Node'].prototype.contains || function(this: Node, node: any) {\n      return !!(this.compareDocumentPosition(node) & 16);\n    };\n  }\n\n  return undefined as any;\n})();\n\n/**\n * A `DomAdapter` powered by full browser DOM APIs.\n *\n * @security Tread carefully! Interacting with the DOM directly is dangerous and\n * can introduce XSS risks.\n */\n/* tslint:disable:requireParameterType no-console */\nexport class BrowserDomAdapter extends GenericBrowserDomAdapter {\n  static makeCurrent() {\n    setRootDomAdapter(new BrowserDomAdapter());\n  }\n  getProperty(el: Node, name: string): any {\n    return (<any>el)[name];\n  }\n\n  log(error: string): void {\n    if (window.console) {\n      window.console.log && window.console.log(error);\n    }\n  }\n\n  logGroup(error: string): void {\n    if (window.console) {\n      window.console.group && window.console.group(error);\n    }\n  }\n\n  logGroupEnd(): void {\n    if (window.console) {\n      window.console.groupEnd && window.console.groupEnd();\n    }\n  }\n\n  onAndCancel(el: Node, evt: any, listener: any): Function {\n    el.addEventListener(evt, listener, false);\n    // Needed to follow Dart's subscription semantic, until fix of\n    // https://code.google.com/p/dart/issues/detail?id=17406\n    return () => {\n      el.removeEventListener(evt, listener, false);\n    };\n  }\n  dispatchEvent(el: Node, evt: any) {\n    el.dispatchEvent(evt);\n  }\n  remove(node: Node): Node {\n    if (node.parentNode) {\n      node.parentNode.removeChild(node);\n    }\n    return node;\n  }\n  getValue(el: any): string {\n    return el.value;\n  }\n  createElement(tagName: string, doc?: Document): HTMLElement {\n    doc = doc || this.getDefaultDocument();\n    return doc.createElement(tagName);\n  }\n  createHtmlDocument(): HTMLDocument {\n    return document.implementation.createHTMLDocument('fakeTitle');\n  }\n  getDefaultDocument(): Document {\n    return document;\n  }\n\n  isElementNode(node: Node): boolean {\n    return node.nodeType === Node.ELEMENT_NODE;\n  }\n\n  isShadowRoot(node: any): boolean {\n    return node instanceof DocumentFragment;\n  }\n\n  getGlobalEventTarget(doc: Document, target: string): EventTarget|null {\n    if (target === 'window') {\n      return window;\n    }\n    if (target === 'document') {\n      return doc;\n    }\n    if (target === 'body') {\n      return doc.body;\n    }\n    return null;\n  }\n  getHistory(): History {\n    return window.history;\n  }\n  getLocation(): Location {\n    return window.location;\n  }\n  getBaseHref(doc: Document): string|null {\n    const href = getBaseElementHref();\n    return href == null ? null : relativePath(href);\n  }\n  resetBaseElement(): void {\n    baseElement = null;\n  }\n  getUserAgent(): string {\n    return window.navigator.userAgent;\n  }\n  performanceNow(): number {\n    // performance.now() is not available in all browsers, see\n    // http://caniuse.com/#search=performance.now\n    return window.performance && window.performance.now ? window.performance.now() :\n                                                          new Date().getTime();\n  }\n\n  supportsCookies(): boolean {\n    return true;\n  }\n\n  getCookie(name: string): string|null {\n    return parseCookieValue(document.cookie, name);\n  }\n}\n\nlet baseElement: HTMLElement|null = null;\nfunction getBaseElementHref(): string|null {\n  if (!baseElement) {\n    baseElement = document.querySelector('base')!;\n    if (!baseElement) {\n      return null;\n    }\n  }\n  return baseElement.getAttribute('href');\n}\n\n// based on urlUtils.js in AngularJS 1\nlet urlParsingNode: any;\nfunction relativePath(url: any): string {\n  if (!urlParsingNode) {\n    urlParsingNode = document.createElement('a');\n  }\n  urlParsingNode.setAttribute('href', url);\n  return (urlParsingNode.pathname.charAt(0) === '/') ? urlParsingNode.pathname :\n                                                       '/' + urlParsingNode.pathname;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {APP_INITIALIZER, ApplicationInitStatus, Inject, InjectionToken, Injector, StaticProvider} from '@angular/core';\n\n/**\n * An id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nexport const TRANSITION_ID = new InjectionToken('TRANSITION_ID');\n\nexport function appInitializerFactory(transitionId: string, document: any, injector: Injector) {\n  return () => {\n    // Wait for all application initializers to be completed before removing the styles set by\n    // the server.\n    injector.get(ApplicationInitStatus).donePromise.then(() => {\n      const dom = getDOM();\n      const styles: any[] =\n          Array.prototype.slice.apply(document.querySelectorAll(`style[ng-transition]`));\n      styles.filter(el => el.getAttribute('ng-transition') === transitionId)\n          .forEach(el => dom.remove(el));\n    });\n  };\n}\n\nexport const SERVER_TRANSITION_PROVIDERS: StaticProvider[] = [\n  {\n    provide: APP_INITIALIZER,\n    useFactory: appInitializerFactory,\n    deps: [TRANSITION_ID, DOCUMENT, Injector],\n    multi: true\n  },\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {GetTestability, setTestabilityGetter, Testability, TestabilityRegistry, ɵglobal as global} from '@angular/core';\n\nexport class BrowserGetTestability implements GetTestability {\n  static init() {\n    setTestabilityGetter(new BrowserGetTestability());\n  }\n\n  addToWindow(registry: TestabilityRegistry): void {\n    global['getAngularTestability'] = (elem: any, findInAncestors: boolean = true) => {\n      const testability = registry.findTestabilityInTree(elem, findInAncestors);\n      if (testability == null) {\n        throw new Error('Could not find testability for element.');\n      }\n      return testability;\n    };\n\n    global['getAllAngularTestabilities'] = () => registry.getAllTestabilities();\n\n    global['getAllAngularRootElements'] = () => registry.getAllRootElements();\n\n    const whenAllStable = (callback: any /** TODO #9100 */) => {\n      const testabilities = global['getAllAngularTestabilities']();\n      let count = testabilities.length;\n      let didWork = false;\n      const decrement = function(didWork_: any /** TODO #9100 */) {\n        didWork = didWork || didWork_;\n        count--;\n        if (count == 0) {\n          callback(didWork);\n        }\n      };\n      testabilities.forEach(function(testability: any /** TODO #9100 */) {\n        testability.whenStable(decrement);\n      });\n    };\n\n    if (!global['frameworkStabilizers']) {\n      global['frameworkStabilizers'] = [];\n    }\n    global['frameworkStabilizers'].push(whenAllStable);\n  }\n\n  findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n      Testability|null {\n    if (elem == null) {\n      return null;\n    }\n    const t = registry.getTestability(elem);\n    if (t != null) {\n      return t;\n    } else if (!findInAncestors) {\n      return null;\n    }\n    if (getDOM().isShadowRoot(elem)) {\n      return this.findTestabilityInTree(registry, (<any>elem).host, true);\n    }\n    return this.findTestabilityInTree(registry, elem.parentElement, true);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵglobal as global} from '@angular/core';\n\nconst CAMEL_CASE_REGEXP = /([A-Z])/g;\nconst DASH_CASE_REGEXP = /-([a-z])/g;\n\n\nexport function camelCaseToDashCase(input: string): string {\n  return input.replace(CAMEL_CASE_REGEXP, (...m: string[]) => '-' + m[1].toLowerCase());\n}\n\nexport function dashCaseToCamelCase(input: string): string {\n  return input.replace(DASH_CASE_REGEXP, (...m: string[]) => m[1].toUpperCase());\n}\n\n/**\n * Exports the value under a given `name` in the global property `ng`. For example `ng.probe` if\n * `name` is `'probe'`.\n * @param name Name under which it will be exported. Keep in mind this will be a property of the\n * global `ng` object.\n * @param value The value to export.\n */\nexport function exportNgVar(name: string, value: any): void {\n  if (typeof COMPILED === 'undefined' || !COMPILED) {\n    // Note: we can't export `ng` when using closure enhanced optimization as:\n    // - closure declares globals itself for minified names, which sometimes clobber our `ng` global\n    // - we can't declare a closure extern as the namespace `ng` is already used within Google\n    //   for typings for angularJS (via `goog.provide('ng....')`).\n    const ng = global['ng'] = (global['ng'] as {[key: string]: any} | undefined) || {};\n    ng[name] = value;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_INITIALIZER, ApplicationRef, DebugNode, NgProbeToken, NgZone, Optional, Provider, ɵgetDebugNodeR2} from '@angular/core';\n\nimport {exportNgVar} from '../util';\n\nconst CORE_TOKENS = (() => ({\n                       'ApplicationRef': ApplicationRef,\n                       'NgZone': NgZone,\n                     }))();\n\nconst INSPECT_GLOBAL_NAME = 'probe';\nconst CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\n\n/**\n * Returns a {@link DebugElement} for the given native DOM element, or\n * null if the given native element does not have an Angular view associated\n * with it.\n */\nexport function inspectNativeElementR2(element: any): DebugNode|null {\n  return ɵgetDebugNodeR2(element);\n}\n\nexport function _createNgProbeR2(coreTokens: NgProbeToken[]): any {\n  exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElementR2);\n  exportNgVar(CORE_TOKENS_GLOBAL_NAME, {...CORE_TOKENS, ..._ngProbeTokensToMap(coreTokens || [])});\n  return () => inspectNativeElementR2;\n}\n\nfunction _ngProbeTokensToMap(tokens: NgProbeToken[]): {[name: string]: any} {\n  return tokens.reduce((prev: any, t: any) => (prev[t.name] = t.token, prev), {});\n}\n\n/**\n * In Ivy, we don't support NgProbe because we have our own set of testing utilities\n * with more robust functionality.\n *\n * We shouldn't bring in NgProbe because it prevents DebugNode and friends from\n * tree-shaking properly.\n */\nexport const ELEMENT_PROBE_PROVIDERS__POST_R3__ = [];\n\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nexport const ELEMENT_PROBE_PROVIDERS__PRE_R3__: Provider[] = [\n  {\n    provide: APP_INITIALIZER,\n    useFactory: _createNgProbeR2,\n    deps: [\n      [NgProbeToken, new Optional()],\n    ],\n    multi: true,\n  },\n];\n\nexport const ELEMENT_PROBE_PROVIDERS = ELEMENT_PROBE_PROVIDERS__PRE_R3__;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, NgZone} from '@angular/core';\n\n/**\n * The injection token for the event-manager plug-in service.\n *\n * @publicApi\n */\nexport const EVENT_MANAGER_PLUGINS =\n    new InjectionToken<EventManagerPlugin[]>('EventManagerPlugins');\n\n/**\n * An injectable service that provides event management for Angular\n * through a browser plug-in.\n *\n * @publicApi\n */\n@Injectable()\nexport class EventManager {\n  private _plugins: EventManagerPlugin[];\n  private _eventNameToPlugin = new Map<string, EventManagerPlugin>();\n\n  /**\n   * Initializes an instance of the event-manager service.\n   */\n  constructor(@Inject(EVENT_MANAGER_PLUGINS) plugins: EventManagerPlugin[], private _zone: NgZone) {\n    plugins.forEach(p => p.manager = this);\n    this._plugins = plugins.slice().reverse();\n  }\n\n  /**\n   * Registers a handler for a specific element and event.\n   *\n   * @param element The HTML element to receive event notifications.\n   * @param eventName The name of the event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns  A callback function that can be used to remove the handler.\n   */\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const plugin = this._findPluginFor(eventName);\n    return plugin.addEventListener(element, eventName, handler);\n  }\n\n  /**\n   * Registers a global handler for an event in a target view.\n   *\n   * @param target A target for global event notifications. One of \"window\", \"document\", or \"body\".\n   * @param eventName The name of the event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns A callback function that can be used to remove the handler.\n   */\n  addGlobalEventListener(target: string, eventName: string, handler: Function): Function {\n    const plugin = this._findPluginFor(eventName);\n    return plugin.addGlobalEventListener(target, eventName, handler);\n  }\n\n  /**\n   * Retrieves the compilation zone in which event listeners are registered.\n   */\n  getZone(): NgZone {\n    return this._zone;\n  }\n\n  /** @internal */\n  _findPluginFor(eventName: string): EventManagerPlugin {\n    const plugin = this._eventNameToPlugin.get(eventName);\n    if (plugin) {\n      return plugin;\n    }\n\n    const plugins = this._plugins;\n    for (let i = 0; i < plugins.length; i++) {\n      const plugin = plugins[i];\n      if (plugin.supports(eventName)) {\n        this._eventNameToPlugin.set(eventName, plugin);\n        return plugin;\n      }\n    }\n    throw new Error(`No event manager plugin found for event ${eventName}`);\n  }\n}\n\nexport abstract class EventManagerPlugin {\n  constructor(private _doc: any) {}\n\n  // TODO(issue/24571): remove '!'.\n  manager!: EventManager;\n\n  abstract supports(eventName: string): boolean;\n\n  abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;\n\n  addGlobalEventListener(element: string, eventName: string, handler: Function): Function {\n    const target: HTMLElement = getDOM().getGlobalEventTarget(this._doc, element);\n    if (!target) {\n      throw new Error(`Unsupported event target ${target} for event ${eventName}`);\n    }\n    return this.addEventListener(target, eventName, handler);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, OnDestroy} from '@angular/core';\n\n@Injectable()\nexport class SharedStylesHost {\n  /** @internal */\n  protected _stylesSet = new Set<string>();\n\n  addStyles(styles: string[]): void {\n    const additions = new Set<string>();\n    styles.forEach(style => {\n      if (!this._stylesSet.has(style)) {\n        this._stylesSet.add(style);\n        additions.add(style);\n      }\n    });\n    this.onStylesAdded(additions);\n  }\n\n  onStylesAdded(additions: Set<string>): void {}\n\n  getAllStyles(): string[] {\n    return Array.from(this._stylesSet);\n  }\n}\n\n@Injectable()\nexport class DomSharedStylesHost extends SharedStylesHost implements OnDestroy {\n  private _hostNodes = new Set<Node>();\n  private _styleNodes = new Set<Node>();\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    super();\n    this._hostNodes.add(_doc.head);\n  }\n\n  private _addStylesToHost(styles: Set<string>, host: Node): void {\n    styles.forEach((style: string) => {\n      const styleEl = this._doc.createElement('style');\n      styleEl.textContent = style;\n      this._styleNodes.add(host.appendChild(styleEl));\n    });\n  }\n\n  addHost(hostNode: Node): void {\n    this._addStylesToHost(this._stylesSet, hostNode);\n    this._hostNodes.add(hostNode);\n  }\n\n  removeHost(hostNode: Node): void {\n    this._hostNodes.delete(hostNode);\n  }\n\n  onStylesAdded(additions: Set<string>): void {\n    this._hostNodes.forEach(hostNode => this._addStylesToHost(additions, hostNode));\n  }\n\n  ngOnDestroy(): void {\n    this._styleNodes.forEach(styleNode => getDOM().remove(styleNode));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_ID, Inject, Injectable, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2, ViewEncapsulation} from '@angular/core';\n\nimport {EventManager} from './events/event_manager';\nimport {DomSharedStylesHost} from './shared_styles_host';\n\nexport const NAMESPACE_URIS: {[ns: string]: string} = {\n  'svg': 'http://www.w3.org/2000/svg',\n  'xhtml': 'http://www.w3.org/1999/xhtml',\n  'xlink': 'http://www.w3.org/1999/xlink',\n  'xml': 'http://www.w3.org/XML/1998/namespace',\n  'xmlns': 'http://www.w3.org/2000/xmlns/',\n};\n\nconst COMPONENT_REGEX = /%COMP%/g;\nconst NG_DEV_MODE = typeof ngDevMode === 'undefined' || !!ngDevMode;\n\nexport const COMPONENT_VARIABLE = '%COMP%';\nexport const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;\nexport const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;\n\nexport function shimContentAttribute(componentShortId: string): string {\n  return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function shimHostAttribute(componentShortId: string): string {\n  return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\n\nexport function flattenStyles(\n    compId: string, styles: Array<any|any[]>, target: string[]): string[] {\n  for (let i = 0; i < styles.length; i++) {\n    let style = styles[i];\n\n    if (Array.isArray(style)) {\n      flattenStyles(compId, style, target);\n    } else {\n      style = style.replace(COMPONENT_REGEX, compId);\n      target.push(style);\n    }\n  }\n  return target;\n}\n\nfunction decoratePreventDefault(eventHandler: Function): Function {\n  // `DebugNode.triggerEventHandler` needs to know if the listener was created with\n  // decoratePreventDefault or is a listener added outside the Angular context so it can handle the\n  // two differently. In the first case, the special '__ngUnwrap__' token is passed to the unwrap\n  // the listener (see below).\n  return (event: any) => {\n    // Ivy uses '__ngUnwrap__' as a special token that allows us to unwrap the function\n    // so that it can be invoked programmatically by `DebugNode.triggerEventHandler`. The debug_node\n    // can inspect the listener toString contents for the existence of this special token. Because\n    // the token is a string literal, it is ensured to not be modified by compiled code.\n    if (event === '__ngUnwrap__') {\n      return eventHandler;\n    }\n\n    const allowDefaultBehavior = eventHandler(event);\n    if (allowDefaultBehavior === false) {\n      // TODO(tbosch): move preventDefault into event plugins...\n      event.preventDefault();\n      event.returnValue = false;\n    }\n\n    return undefined;\n  };\n}\n\n@Injectable()\nexport class DomRendererFactory2 implements RendererFactory2 {\n  private rendererByCompId = new Map<string, Renderer2>();\n  private defaultRenderer: Renderer2;\n\n  constructor(\n      private eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost,\n      @Inject(APP_ID) private appId: string) {\n    this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n  }\n\n  createRenderer(element: any, type: RendererType2|null): Renderer2 {\n    if (!element || !type) {\n      return this.defaultRenderer;\n    }\n    switch (type.encapsulation) {\n      case ViewEncapsulation.Emulated: {\n        let renderer = this.rendererByCompId.get(type.id);\n        if (!renderer) {\n          renderer = new EmulatedEncapsulationDomRenderer2(\n              this.eventManager, this.sharedStylesHost, type, this.appId);\n          this.rendererByCompId.set(type.id, renderer);\n        }\n        (<EmulatedEncapsulationDomRenderer2>renderer).applyToHost(element);\n        return renderer;\n      }\n      case ViewEncapsulation.Native:\n      case ViewEncapsulation.ShadowDom:\n        return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n      default: {\n        if (!this.rendererByCompId.has(type.id)) {\n          const styles = flattenStyles(type.id, type.styles, []);\n          this.sharedStylesHost.addStyles(styles);\n          this.rendererByCompId.set(type.id, this.defaultRenderer);\n        }\n        return this.defaultRenderer;\n      }\n    }\n  }\n\n  begin() {}\n  end() {}\n}\n\nclass DefaultDomRenderer2 implements Renderer2 {\n  data: {[key: string]: any} = Object.create(null);\n\n  constructor(private eventManager: EventManager) {}\n\n  destroy(): void {}\n\n  destroyNode: null;\n\n  createElement(name: string, namespace?: string): any {\n    if (namespace) {\n      // In cases where Ivy (not ViewEngine) is giving us the actual namespace, the look up by key\n      // will result in undefined, so we just return the namespace here.\n      return document.createElementNS(NAMESPACE_URIS[namespace] || namespace, name);\n    }\n\n    return document.createElement(name);\n  }\n\n  createComment(value: string): any {\n    return document.createComment(value);\n  }\n\n  createText(value: string): any {\n    return document.createTextNode(value);\n  }\n\n  appendChild(parent: any, newChild: any): void {\n    parent.appendChild(newChild);\n  }\n\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    if (parent) {\n      parent.insertBefore(newChild, refChild);\n    }\n  }\n\n  removeChild(parent: any, oldChild: any): void {\n    if (parent) {\n      parent.removeChild(oldChild);\n    }\n  }\n\n  selectRootElement(selectorOrNode: string|any, preserveContent?: boolean): any {\n    let el: any = typeof selectorOrNode === 'string' ? document.querySelector(selectorOrNode) :\n                                                       selectorOrNode;\n    if (!el) {\n      throw new Error(`The selector \"${selectorOrNode}\" did not match any elements`);\n    }\n    if (!preserveContent) {\n      el.textContent = '';\n    }\n    return el;\n  }\n\n  parentNode(node: any): any {\n    return node.parentNode;\n  }\n\n  nextSibling(node: any): any {\n    return node.nextSibling;\n  }\n\n  setAttribute(el: any, name: string, value: string, namespace?: string): void {\n    if (namespace) {\n      name = namespace + ':' + name;\n      // TODO(FW-811): Ivy may cause issues here because it's passing around\n      // full URIs for namespaces, therefore this lookup will fail.\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.setAttributeNS(namespaceUri, name, value);\n      } else {\n        el.setAttribute(name, value);\n      }\n    } else {\n      el.setAttribute(name, value);\n    }\n  }\n\n  removeAttribute(el: any, name: string, namespace?: string): void {\n    if (namespace) {\n      // TODO(FW-811): Ivy may cause issues here because it's passing around\n      // full URIs for namespaces, therefore this lookup will fail.\n      const namespaceUri = NAMESPACE_URIS[namespace];\n      if (namespaceUri) {\n        el.removeAttributeNS(namespaceUri, name);\n      } else {\n        // TODO(FW-811): Since ivy is passing around full URIs for namespaces\n        // this could result in properties like `http://www.w3.org/2000/svg:cx=\"123\"`,\n        // which is wrong.\n        el.removeAttribute(`${namespace}:${name}`);\n      }\n    } else {\n      el.removeAttribute(name);\n    }\n  }\n\n  addClass(el: any, name: string): void {\n    el.classList.add(name);\n  }\n\n  removeClass(el: any, name: string): void {\n    el.classList.remove(name);\n  }\n\n  setStyle(el: any, style: string, value: any, flags: RendererStyleFlags2): void {\n    if (flags & RendererStyleFlags2.DashCase) {\n      el.style.setProperty(\n          style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');\n    } else {\n      el.style[style] = value;\n    }\n  }\n\n  removeStyle(el: any, style: string, flags: RendererStyleFlags2): void {\n    if (flags & RendererStyleFlags2.DashCase) {\n      el.style.removeProperty(style);\n    } else {\n      // IE requires '' instead of null\n      // see https://github.com/angular/angular/issues/7916\n      el.style[style] = '';\n    }\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    NG_DEV_MODE && checkNoSyntheticProp(name, 'property');\n    el[name] = value;\n  }\n\n  setValue(node: any, value: string): void {\n    node.nodeValue = value;\n  }\n\n  listen(target: 'window'|'document'|'body'|any, event: string, callback: (event: any) => boolean):\n      () => void {\n    NG_DEV_MODE && checkNoSyntheticProp(event, 'listener');\n    if (typeof target === 'string') {\n      return <() => void>this.eventManager.addGlobalEventListener(\n          target, event, decoratePreventDefault(callback));\n    }\n    return <() => void>this.eventManager.addEventListener(\n               target, event, decoratePreventDefault(callback)) as () => void;\n  }\n}\n\nconst AT_CHARCODE = (() => '@'.charCodeAt(0))();\nfunction checkNoSyntheticProp(name: string, nameKind: string) {\n  if (name.charCodeAt(0) === AT_CHARCODE) {\n    throw new Error(`Found the synthetic ${nameKind} ${\n        name}. Please include either \"BrowserAnimationsModule\" or \"NoopAnimationsModule\" in your application.`);\n  }\n}\n\nclass EmulatedEncapsulationDomRenderer2 extends DefaultDomRenderer2 {\n  private contentAttr: string;\n  private hostAttr: string;\n\n  constructor(\n      eventManager: EventManager, sharedStylesHost: DomSharedStylesHost,\n      private component: RendererType2, appId: string) {\n    super(eventManager);\n    const styles = flattenStyles(appId + '-' + component.id, component.styles, []);\n    sharedStylesHost.addStyles(styles);\n\n    this.contentAttr = shimContentAttribute(appId + '-' + component.id);\n    this.hostAttr = shimHostAttribute(appId + '-' + component.id);\n  }\n\n  applyToHost(element: any) {\n    super.setAttribute(element, this.hostAttr, '');\n  }\n\n  createElement(parent: any, name: string): Element {\n    const el = super.createElement(parent, name);\n    super.setAttribute(el, this.contentAttr, '');\n    return el;\n  }\n}\n\nclass ShadowDomRenderer extends DefaultDomRenderer2 {\n  private shadowRoot: any;\n\n  constructor(\n      eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost,\n      private hostEl: any, private component: RendererType2) {\n    super(eventManager);\n    if (component.encapsulation === ViewEncapsulation.ShadowDom) {\n      this.shadowRoot = (hostEl as any).attachShadow({mode: 'open'});\n    } else {\n      this.shadowRoot = (hostEl as any).createShadowRoot();\n    }\n    this.sharedStylesHost.addHost(this.shadowRoot);\n    const styles = flattenStyles(component.id, component.styles, []);\n    for (let i = 0; i < styles.length; i++) {\n      const styleEl = document.createElement('style');\n      styleEl.textContent = styles[i];\n      this.shadowRoot.appendChild(styleEl);\n    }\n  }\n\n  private nodeOrShadowRoot(node: any): any {\n    return node === this.hostEl ? this.shadowRoot : node;\n  }\n\n  destroy() {\n    this.sharedStylesHost.removeHost(this.shadowRoot);\n  }\n\n  appendChild(parent: any, newChild: any): void {\n    return super.appendChild(this.nodeOrShadowRoot(parent), newChild);\n  }\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    return super.insertBefore(this.nodeOrShadowRoot(parent), newChild, refChild);\n  }\n  removeChild(parent: any, oldChild: any): void {\n    return super.removeChild(this.nodeOrShadowRoot(parent), oldChild);\n  }\n  parentNode(node: any): any {\n    return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(node)));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable} from '@angular/core';\n\nimport {EventManagerPlugin} from './event_manager';\n\n@Injectable()\nexport class DomEventsPlugin extends EventManagerPlugin {\n  constructor(@Inject(DOCUMENT) doc: any) {\n    super(doc);\n  }\n\n  // This plugin should come last in the list of plugins, because it accepts all\n  // events.\n  supports(eventName: string): boolean {\n    return true;\n  }\n\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    element.addEventListener(eventName, handler as EventListener, false);\n    return () => this.removeEventListener(element, eventName, handler as EventListener);\n  }\n\n  removeEventListener(target: any, eventName: string, callback: Function): void {\n    return target.removeEventListener(eventName, callback as EventListener);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, NgModule, Optional, Provider, ɵConsole as Console} from '@angular/core';\n\nimport {EVENT_MANAGER_PLUGINS, EventManagerPlugin} from './event_manager';\n\n\n\n/**\n * Supported HammerJS recognizer event names.\n */\nconst EVENT_NAMES = {\n  // pan\n  'pan': true,\n  'panstart': true,\n  'panmove': true,\n  'panend': true,\n  'pancancel': true,\n  'panleft': true,\n  'panright': true,\n  'panup': true,\n  'pandown': true,\n  // pinch\n  'pinch': true,\n  'pinchstart': true,\n  'pinchmove': true,\n  'pinchend': true,\n  'pinchcancel': true,\n  'pinchin': true,\n  'pinchout': true,\n  // press\n  'press': true,\n  'pressup': true,\n  // rotate\n  'rotate': true,\n  'rotatestart': true,\n  'rotatemove': true,\n  'rotateend': true,\n  'rotatecancel': true,\n  // swipe\n  'swipe': true,\n  'swipeleft': true,\n  'swiperight': true,\n  'swipeup': true,\n  'swipedown': true,\n  // tap\n  'tap': true,\n};\n\n/**\n * DI token for providing [HammerJS](http://hammerjs.github.io/) support to Angular.\n * @see `HammerGestureConfig`\n *\n * @ngModule HammerModule\n * @publicApi\n */\nexport const HAMMER_GESTURE_CONFIG = new InjectionToken<HammerGestureConfig>('HammerGestureConfig');\n\n\n/**\n * Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded.\n *\n * @publicApi\n */\nexport type HammerLoader = () => Promise<void>;\n\n/**\n * Injection token used to provide a {@link HammerLoader} to Angular.\n *\n * @publicApi\n */\nexport const HAMMER_LOADER = new InjectionToken<HammerLoader>('HammerLoader');\n\nexport interface HammerInstance {\n  on(eventName: string, callback?: Function): void;\n  off(eventName: string, callback?: Function): void;\n  destroy?(): void;\n}\n\n/**\n * An injectable [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n * for gesture recognition. Configures specific event recognition.\n * @publicApi\n */\n@Injectable()\nexport class HammerGestureConfig {\n  /**\n   * A set of supported event names for gestures to be used in Angular.\n   * Angular supports all built-in recognizers, as listed in\n   * [HammerJS documentation](http://hammerjs.github.io/).\n   */\n  events: string[] = [];\n\n  /**\n   * Maps gesture event names to a set of configuration options\n   * that specify overrides to the default values for specific properties.\n   *\n   * The key is a supported event name to be configured,\n   * and the options object contains a set of properties, with override values\n   * to be applied to the named recognizer event.\n   * For example, to disable recognition of the rotate event, specify\n   *  `{\"rotate\": {\"enable\": false}}`.\n   *\n   * Properties that are not present take the HammerJS default values.\n   * For information about which properties are supported for which events,\n   * and their allowed and default values, see\n   * [HammerJS documentation](http://hammerjs.github.io/).\n   *\n   */\n  overrides: {[key: string]: Object} = {};\n\n  /**\n   * Properties whose default values can be overridden for a given event.\n   * Different sets of properties apply to different events.\n   * For information about which properties are supported for which events,\n   * and their allowed and default values, see\n   * [HammerJS documentation](http://hammerjs.github.io/).\n   */\n  options?: {\n    cssProps?: any;\n    domEvents?: boolean;\n    enable?: boolean | ((manager: any) => boolean);\n    preset?: any[];\n    touchAction?: string;\n    recognizers?: any[];\n    inputClass?: any;\n    inputTarget?: EventTarget;\n  };\n\n  /**\n   * Creates a [HammerJS Manager](http://hammerjs.github.io/api/#hammer.manager)\n   * and attaches it to a given HTML element.\n   * @param element The element that will recognize gestures.\n   * @returns A HammerJS event-manager object.\n   */\n  buildHammer(element: HTMLElement): HammerInstance {\n    const mc = new Hammer!(element, this.options);\n\n    mc.get('pinch').set({enable: true});\n    mc.get('rotate').set({enable: true});\n\n    for (const eventName in this.overrides) {\n      mc.get(eventName).set(this.overrides[eventName]);\n    }\n\n    return mc;\n  }\n}\n\n/**\n * Event plugin that adds Hammer support to an application.\n *\n * @ngModule HammerModule\n */\n@Injectable()\nexport class HammerGesturesPlugin extends EventManagerPlugin {\n  constructor(\n      @Inject(DOCUMENT) doc: any,\n      @Inject(HAMMER_GESTURE_CONFIG) private _config: HammerGestureConfig, private console: Console,\n      @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader|null) {\n    super(doc);\n  }\n\n  supports(eventName: string): boolean {\n    if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n      return false;\n    }\n\n    if (!(window as any).Hammer && !this.loader) {\n      this.console.warn(\n          `The \"${eventName}\" event cannot be bound because Hammer.JS is not ` +\n          `loaded and no custom loader has been specified.`);\n      return false;\n    }\n\n    return true;\n  }\n\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const zone = this.manager.getZone();\n    eventName = eventName.toLowerCase();\n\n    // If Hammer is not present but a loader is specified, we defer adding the event listener\n    // until Hammer is loaded.\n    if (!(window as any).Hammer && this.loader) {\n      // This `addEventListener` method returns a function to remove the added listener.\n      // Until Hammer is loaded, the returned function needs to *cancel* the registration rather\n      // than remove anything.\n      let cancelRegistration = false;\n      let deregister: Function = () => {\n        cancelRegistration = true;\n      };\n\n      this.loader()\n          .then(() => {\n            // If Hammer isn't actually loaded when the custom loader resolves, give up.\n            if (!(window as any).Hammer) {\n              this.console.warn(\n                  `The custom HAMMER_LOADER completed, but Hammer.JS is not present.`);\n              deregister = () => {};\n              return;\n            }\n\n            if (!cancelRegistration) {\n              // Now that Hammer is loaded and the listener is being loaded for real,\n              // the deregistration function changes from canceling registration to removal.\n              deregister = this.addEventListener(element, eventName, handler);\n            }\n          })\n          .catch(() => {\n            this.console.warn(\n                `The \"${eventName}\" event cannot be bound because the custom ` +\n                `Hammer.JS loader failed.`);\n            deregister = () => {};\n          });\n\n      // Return a function that *executes* `deregister` (and not `deregister` itself) so that we\n      // can change the behavior of `deregister` once the listener is added. Using a closure in\n      // this way allows us to avoid any additional data structures to track listener removal.\n      return () => {\n        deregister();\n      };\n    }\n\n    return zone.runOutsideAngular(() => {\n      // Creating the manager bind events, must be done outside of angular\n      const mc = this._config.buildHammer(element);\n      const callback = function(eventObj: HammerInput) {\n        zone.runGuarded(function() {\n          handler(eventObj);\n        });\n      };\n      mc.on(eventName, callback);\n      return () => {\n        mc.off(eventName, callback);\n        // destroy mc to prevent memory leak\n        if (typeof mc.destroy === 'function') {\n          mc.destroy();\n        }\n      };\n    });\n  }\n\n  isCustomEvent(eventName: string): boolean {\n    return this._config.events.indexOf(eventName) > -1;\n  }\n}\n\n/**\n * In Ivy, support for Hammer gestures is optional, so applications must\n * import the `HammerModule` at root to turn on support. This means that\n * Hammer-specific code can be tree-shaken away if not needed.\n */\nexport const HAMMER_PROVIDERS__POST_R3__ = [];\n\n/**\n * In View Engine, support for Hammer gestures is built-in by default.\n */\nexport const HAMMER_PROVIDERS__PRE_R3__: Provider[] = [\n  {\n    provide: EVENT_MANAGER_PLUGINS,\n    useClass: HammerGesturesPlugin,\n    multi: true,\n    deps: [DOCUMENT, HAMMER_GESTURE_CONFIG, Console, [new Optional(), HAMMER_LOADER]]\n  },\n  {provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig, deps: []},\n];\n\nexport const HAMMER_PROVIDERS = HAMMER_PROVIDERS__PRE_R3__;\n\n/**\n * Adds support for HammerJS.\n *\n * Import this module at the root of your application so that Angular can work with\n * HammerJS to detect gesture events.\n *\n * Note that applications still need to include the HammerJS script itself. This module\n * simply sets up the coordination layer between HammerJS and Angular's EventManager.\n *\n * @publicApi\n */\n@NgModule({providers: HAMMER_PROVIDERS__PRE_R3__})\nexport class HammerModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, NgZone} from '@angular/core';\nimport {EventManagerPlugin} from './event_manager';\n\n/**\n * Defines supported modifiers for key events.\n */\nconst MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\n\nconst DOM_KEY_LOCATION_NUMPAD = 3;\n\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nconst _keyMap: {[k: string]: string} = {\n  // The following values are here for cross-browser compatibility and to match the W3C standard\n  // cf http://www.w3.org/TR/DOM-Level-3-Events-key/\n  '\\b': 'Backspace',\n  '\\t': 'Tab',\n  '\\x7F': 'Delete',\n  '\\x1B': 'Escape',\n  'Del': 'Delete',\n  'Esc': 'Escape',\n  'Left': 'ArrowLeft',\n  'Right': 'ArrowRight',\n  'Up': 'ArrowUp',\n  'Down': 'ArrowDown',\n  'Menu': 'ContextMenu',\n  'Scroll': 'ScrollLock',\n  'Win': 'OS'\n};\n\n// There is a bug in Chrome for numeric keypad keys:\n// https://code.google.com/p/chromium/issues/detail?id=155654\n// 1, 2, 3 ... are reported as A, B, C ...\nconst _chromeNumKeyPadMap = {\n  'A': '1',\n  'B': '2',\n  'C': '3',\n  'D': '4',\n  'E': '5',\n  'F': '6',\n  'G': '7',\n  'H': '8',\n  'I': '9',\n  'J': '*',\n  'K': '+',\n  'M': '-',\n  'N': '.',\n  'O': '/',\n  '\\x60': '0',\n  '\\x90': 'NumLock'\n};\n\n\n/**\n * Retrieves modifiers from key-event objects.\n */\nconst MODIFIER_KEY_GETTERS: {[key: string]: (event: KeyboardEvent) => boolean} = {\n  'alt': (event: KeyboardEvent) => event.altKey,\n  'control': (event: KeyboardEvent) => event.ctrlKey,\n  'meta': (event: KeyboardEvent) => event.metaKey,\n  'shift': (event: KeyboardEvent) => event.shiftKey\n};\n\n/**\n * @publicApi\n * A browser plug-in that provides support for handling of key events in Angular.\n */\n@Injectable()\nexport class KeyEventsPlugin extends EventManagerPlugin {\n  /**\n   * Initializes an instance of the browser plug-in.\n   * @param doc The document in which key events will be detected.\n   */\n  constructor(@Inject(DOCUMENT) doc: any) {\n    super(doc);\n  }\n\n  /**\n   * Reports whether a named key event is supported.\n   * @param eventName The event name to query.\n   * @return True if the named key event is supported.\n   */\n  supports(eventName: string): boolean {\n    return KeyEventsPlugin.parseEventName(eventName) != null;\n  }\n\n  /**\n   * Registers a handler for a specific element and key event.\n   * @param element The HTML element to receive event notifications.\n   * @param eventName The name of the key event to listen for.\n   * @param handler A function to call when the notification occurs. Receives the\n   * event object as an argument.\n   * @returns The key event that was registered.\n   */\n  addEventListener(element: HTMLElement, eventName: string, handler: Function): Function {\n    const parsedEvent = KeyEventsPlugin.parseEventName(eventName)!;\n\n    const outsideHandler =\n        KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n\n    return this.manager.getZone().runOutsideAngular(() => {\n      return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n    });\n  }\n\n  static parseEventName(eventName: string): {fullKey: string, domEventName: string}|null {\n    const parts: string[] = eventName.toLowerCase().split('.');\n\n    const domEventName = parts.shift();\n    if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n      return null;\n    }\n\n    const key = KeyEventsPlugin._normalizeKey(parts.pop()!);\n\n    let fullKey = '';\n    MODIFIER_KEYS.forEach(modifierName => {\n      const index: number = parts.indexOf(modifierName);\n      if (index > -1) {\n        parts.splice(index, 1);\n        fullKey += modifierName + '.';\n      }\n    });\n    fullKey += key;\n\n    if (parts.length != 0 || key.length === 0) {\n      // returning null instead of throwing to let another plugin process the event\n      return null;\n    }\n\n    // NOTE: Please don't rewrite this as so, as it will break JSCompiler property renaming.\n    //       The code must remain in the `result['domEventName']` form.\n    // return {domEventName, fullKey};\n    const result: {fullKey: string, domEventName: string} = {} as any;\n    result['domEventName'] = domEventName;\n    result['fullKey'] = fullKey;\n    return result;\n  }\n\n  static getEventFullKey(event: KeyboardEvent): string {\n    let fullKey = '';\n    let key = getEventKey(event);\n    key = key.toLowerCase();\n    if (key === ' ') {\n      key = 'space';  // for readability\n    } else if (key === '.') {\n      key = 'dot';  // because '.' is used as a separator in event names\n    }\n    MODIFIER_KEYS.forEach(modifierName => {\n      if (modifierName != key) {\n        const modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n        if (modifierGetter(event)) {\n          fullKey += modifierName + '.';\n        }\n      }\n    });\n    fullKey += key;\n    return fullKey;\n  }\n\n  /**\n   * Configures a handler callback for a key event.\n   * @param fullKey The event name that combines all simultaneous keystrokes.\n   * @param handler The function that responds to the key event.\n   * @param zone The zone in which the event occurred.\n   * @returns A callback function.\n   */\n  static eventCallback(fullKey: any, handler: Function, zone: NgZone): Function {\n    return (event: any /** TODO #9100 */) => {\n      if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {\n        zone.runGuarded(() => handler(event));\n      }\n    };\n  }\n\n  /** @internal */\n  static _normalizeKey(keyName: string): string {\n    // TODO: switch to a Map if the mapping grows too much\n    switch (keyName) {\n      case 'esc':\n        return 'escape';\n      default:\n        return keyName;\n    }\n  }\n}\n\nfunction getEventKey(event: any): string {\n  let key = event.key;\n  if (key == null) {\n    key = event.keyIdentifier;\n    // keyIdentifier is defined in the old draft of DOM Level 3 Events implemented by Chrome and\n    // Safari cf\n    // http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/events.html#Events-KeyboardEvents-Interfaces\n    if (key == null) {\n      return 'Unidentified';\n    }\n    if (key.startsWith('U+')) {\n      key = String.fromCharCode(parseInt(key.substring(2), 16));\n      if (event.location === DOM_KEY_LOCATION_NUMPAD && _chromeNumKeyPadMap.hasOwnProperty(key)) {\n        // There is a bug in Chrome for numeric keypad keys:\n        // https://code.google.com/p/chromium/issues/detail?id=155654\n        // 1, 2, 3 ... are reported as A, B, C ...\n        key = (_chromeNumKeyPadMap as any)[key];\n      }\n    }\n  }\n\n  return _keyMap[key] || key;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {forwardRef, Inject, Injectable, Injector, Sanitizer, SecurityContext, ɵ_sanitizeHtml as _sanitizeHtml, ɵ_sanitizeUrl as _sanitizeUrl, ɵallowSanitizationBypassAndThrow as allowSanitizationBypassOrThrow, ɵbypassSanitizationTrustHtml as bypassSanitizationTrustHtml, ɵbypassSanitizationTrustResourceUrl as bypassSanitizationTrustResourceUrl, ɵbypassSanitizationTrustScript as bypassSanitizationTrustScript, ɵbypassSanitizationTrustStyle as bypassSanitizationTrustStyle, ɵbypassSanitizationTrustUrl as bypassSanitizationTrustUrl, ɵBypassType as BypassType, ɵgetSanitizationBypassType as getSanitizationBypassType, ɵunwrapSafeValue as unwrapSafeValue} from '@angular/core';\n\nexport {SecurityContext};\n\n\n\n/**\n * Marker interface for a value that's safe to use in a particular context.\n *\n * @publicApi\n */\nexport interface SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as HTML.\n *\n * @publicApi\n */\nexport interface SafeHtml extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as style (CSS).\n *\n * @publicApi\n */\nexport interface SafeStyle extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as JavaScript.\n *\n * @publicApi\n */\nexport interface SafeScript extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL linking to a document.\n *\n * @publicApi\n */\nexport interface SafeUrl extends SafeValue {}\n\n/**\n * Marker interface for a value that's safe to use as a URL to load executable code from.\n *\n * @publicApi\n */\nexport interface SafeResourceUrl extends SafeValue {}\n\n/**\n * DomSanitizer helps preventing Cross Site Scripting Security bugs (XSS) by sanitizing\n * values to be safe to use in the different DOM contexts.\n *\n * For example, when binding a URL in an `<a [href]=\"someValue\">` hyperlink, `someValue` will be\n * sanitized so that an attacker cannot inject e.g. a `javascript:` URL that would execute code on\n * the website.\n *\n * In specific situations, it might be necessary to disable sanitization, for example if the\n * application genuinely needs to produce a `javascript:` style link with a dynamic value in it.\n * Users can bypass security by constructing a value with one of the `bypassSecurityTrust...`\n * methods, and then binding to that value from the template.\n *\n * These situations should be very rare, and extraordinary care must be taken to avoid creating a\n * Cross Site Scripting (XSS) security bug!\n *\n * When using `bypassSecurityTrust...`, make sure to call the method as early as possible and as\n * close as possible to the source of the value, to make it easy to verify no security bug is\n * created by its use.\n *\n * It is not required (and not recommended) to bypass security if the value is safe, e.g. a URL that\n * does not start with a suspicious protocol, or an HTML snippet that does not contain dangerous\n * code. The sanitizer leaves safe values intact.\n *\n * @security Calling any of the `bypassSecurityTrust...` APIs disables Angular's built-in\n * sanitization for the value passed in. Carefully check and audit all values and code paths going\n * into this call. Make sure any user data is appropriately escaped for this security context.\n * For more detail, see the [Security Guide](http://g.co/ng/security).\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useExisting: forwardRef(() => DomSanitizerImpl)})\nexport abstract class DomSanitizer implements Sanitizer {\n  /**\n   * Sanitizes a value for use in the given SecurityContext.\n   *\n   * If value is trusted for the context, this method will unwrap the contained safe value and use\n   * it directly. Otherwise, value will be sanitized to be safe in the given context, for example\n   * by replacing URLs that have an unsafe protocol part (such as `javascript:`). The implementation\n   * is responsible to make sure that the value can definitely be safely used in the given context.\n   */\n  abstract sanitize(context: SecurityContext, value: SafeValue|string|null): string|null;\n\n  /**\n   * Bypass security and trust the given value to be safe HTML. Only use this when the bound HTML\n   * is unsafe (e.g. contains `<script>` tags) and the code should be executed. The sanitizer will\n   * leave safe HTML intact, so in most situations this method should not be used.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustHtml(value: string): SafeHtml;\n\n  /**\n   * Bypass security and trust the given value to be safe style value (CSS).\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustStyle(value: string): SafeStyle;\n\n  /**\n   * Bypass security and trust the given value to be safe JavaScript.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustScript(value: string): SafeScript;\n\n  /**\n   * Bypass security and trust the given value to be a safe style URL, i.e. a value that can be used\n   * in hyperlinks or `<img src>`.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustUrl(value: string): SafeUrl;\n\n  /**\n   * Bypass security and trust the given value to be a safe resource URL, i.e. a location that may\n   * be used to load executable code from, like `<script src>`, or `<iframe src>`.\n   *\n   * **WARNING:** calling this method with untrusted user data exposes your application to XSS\n   * security risks!\n   */\n  abstract bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl;\n}\n\nexport function domSanitizerImplFactory(injector: Injector) {\n  return new DomSanitizerImpl(injector.get(DOCUMENT));\n}\n\n@Injectable({providedIn: 'root', useFactory: domSanitizerImplFactory, deps: [Injector]})\nexport class DomSanitizerImpl extends DomSanitizer {\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    super();\n  }\n\n  sanitize(ctx: SecurityContext, value: SafeValue|string|null): string|null {\n    if (value == null) return null;\n    switch (ctx) {\n      case SecurityContext.NONE:\n        return value as string;\n      case SecurityContext.HTML:\n        if (allowSanitizationBypassOrThrow(value, BypassType.Html)) {\n          return unwrapSafeValue(value);\n        }\n        return _sanitizeHtml(this._doc, String(value));\n      case SecurityContext.STYLE:\n        if (allowSanitizationBypassOrThrow(value, BypassType.Style)) {\n          return unwrapSafeValue(value);\n        }\n        return value as string;\n      case SecurityContext.SCRIPT:\n        if (allowSanitizationBypassOrThrow(value, BypassType.Script)) {\n          return unwrapSafeValue(value);\n        }\n        throw new Error('unsafe value used in a script context');\n      case SecurityContext.URL:\n        const type = getSanitizationBypassType(value);\n        if (allowSanitizationBypassOrThrow(value, BypassType.Url)) {\n          return unwrapSafeValue(value);\n        }\n        return _sanitizeUrl(String(value));\n      case SecurityContext.RESOURCE_URL:\n        if (allowSanitizationBypassOrThrow(value, BypassType.ResourceUrl)) {\n          return unwrapSafeValue(value);\n        }\n        throw new Error(\n            'unsafe value used in a resource URL context (see http://g.co/ng/security#xss)');\n      default:\n        throw new Error(`Unexpected SecurityContext ${ctx} (see http://g.co/ng/security#xss)`);\n    }\n  }\n\n  bypassSecurityTrustHtml(value: string): SafeHtml {\n    return bypassSanitizationTrustHtml(value);\n  }\n  bypassSecurityTrustStyle(value: string): SafeStyle {\n    return bypassSanitizationTrustStyle(value);\n  }\n  bypassSecurityTrustScript(value: string): SafeScript {\n    return bypassSanitizationTrustScript(value);\n  }\n  bypassSecurityTrustUrl(value: string): SafeUrl {\n    return bypassSanitizationTrustUrl(value);\n  }\n  bypassSecurityTrustResourceUrl(value: string): SafeResourceUrl {\n    return bypassSanitizationTrustResourceUrl(value);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CommonModule, DOCUMENT, ɵPLATFORM_BROWSER_ID as PLATFORM_BROWSER_ID} from '@angular/common';\nimport {APP_ID, ApplicationModule, createPlatformFactory, ErrorHandler, Inject, ModuleWithProviders, NgModule, NgZone, Optional, PLATFORM_ID, PLATFORM_INITIALIZER, platformCore, PlatformRef, RendererFactory2, Sanitizer, SkipSelf, StaticProvider, Testability, ɵConsole as Console, ɵINJECTOR_SCOPE as INJECTOR_SCOPE, ɵsetDocument} from '@angular/core';\n\nimport {BrowserDomAdapter} from './browser/browser_adapter';\nimport {SERVER_TRANSITION_PROVIDERS, TRANSITION_ID} from './browser/server-transition';\nimport {BrowserGetTestability} from './browser/testability';\nimport {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';\nimport {DomRendererFactory2} from './dom/dom_renderer';\nimport {DomEventsPlugin} from './dom/events/dom_events';\nimport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nimport {HAMMER_PROVIDERS} from './dom/events/hammer_gestures';\nimport {KeyEventsPlugin} from './dom/events/key_events';\nimport {DomSharedStylesHost, SharedStylesHost} from './dom/shared_styles_host';\nimport {DomSanitizer, DomSanitizerImpl} from './security/dom_sanitization_service';\n\nexport function initDomAdapter() {\n  BrowserDomAdapter.makeCurrent();\n  BrowserGetTestability.init();\n}\n\nexport function errorHandler(): ErrorHandler {\n  return new ErrorHandler();\n}\n\nexport function _document(): any {\n  // Tell ivy about the global document\n  ɵsetDocument(document);\n  return document;\n}\n\nexport const INTERNAL_BROWSER_PLATFORM_PROVIDERS: StaticProvider[] = [\n  {provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID},\n  {provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true},\n  {provide: DOCUMENT, useFactory: _document, deps: []},\n];\n\nconst BROWSER_SANITIZATION_PROVIDERS__PRE_R3__: StaticProvider[] = [\n  {provide: Sanitizer, useExisting: DomSanitizer},\n  {provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT]},\n];\n\nexport const BROWSER_SANITIZATION_PROVIDERS__POST_R3__ = [];\n\n/**\n * @security Replacing built-in sanitization providers exposes the application to XSS risks.\n * Attacker-controlled data introduced by an unsanitized provider could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n * @publicApi\n */\nexport const BROWSER_SANITIZATION_PROVIDERS = BROWSER_SANITIZATION_PROVIDERS__PRE_R3__;\n\n/**\n * A factory function that returns a `PlatformRef` instance associated with browser service\n * providers.\n *\n * @publicApi\n */\nexport const platformBrowser: (extraProviders?: StaticProvider[]) => PlatformRef =\n    createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\n\nexport const BROWSER_MODULE_PROVIDERS: StaticProvider[] = [\n  BROWSER_SANITIZATION_PROVIDERS,\n  {provide: INJECTOR_SCOPE, useValue: 'root'},\n  {provide: ErrorHandler, useFactory: errorHandler, deps: []},\n  {\n    provide: EVENT_MANAGER_PLUGINS,\n    useClass: DomEventsPlugin,\n    multi: true,\n    deps: [DOCUMENT, NgZone, PLATFORM_ID]\n  },\n  {provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true, deps: [DOCUMENT]},\n  HAMMER_PROVIDERS,\n  {\n    provide: DomRendererFactory2,\n    useClass: DomRendererFactory2,\n    deps: [EventManager, DomSharedStylesHost, APP_ID]\n  },\n  {provide: RendererFactory2, useExisting: DomRendererFactory2},\n  {provide: SharedStylesHost, useExisting: DomSharedStylesHost},\n  {provide: DomSharedStylesHost, useClass: DomSharedStylesHost, deps: [DOCUMENT]},\n  {provide: Testability, useClass: Testability, deps: [NgZone]},\n  {provide: EventManager, useClass: EventManager, deps: [EVENT_MANAGER_PLUGINS, NgZone]},\n  ELEMENT_PROBE_PROVIDERS,\n];\n\n/**\n * Exports required infrastructure for all Angular apps.\n * Included by default in all Angular apps created with the CLI\n * `new` command.\n * Re-exports `CommonModule` and `ApplicationModule`, making their\n * exports and providers available to all apps.\n *\n * @publicApi\n */\n@NgModule({providers: BROWSER_MODULE_PROVIDERS, exports: [CommonModule, ApplicationModule]})\nexport class BrowserModule {\n  constructor(@Optional() @SkipSelf() @Inject(BrowserModule) parentModule: BrowserModule|null) {\n    if (parentModule) {\n      throw new Error(\n          `BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.`);\n    }\n  }\n\n  /**\n   * Configures a browser-based app to transition from a server-rendered app, if\n   * one is present on the page.\n   *\n   * @param params An object containing an identifier for the app to transition.\n   * The ID must match between the client and server versions of the app.\n   * @returns The reconfigured `BrowserModule` to import into the app's root `AppModule`.\n   */\n  static withServerTransition(params: {appId: string}): ModuleWithProviders<BrowserModule> {\n    return {\n      ngModule: BrowserModule,\n      providers: [\n        {provide: APP_ID, useValue: params.appId},\n        {provide: TRANSITION_ID, useExisting: APP_ID},\n        SERVER_TRANSITION_PROVIDERS,\n      ],\n    };\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵDomAdapter as DomAdapter, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, ɵɵinject} from '@angular/core';\n\n/**\n * Represents the attributes of an HTML `<meta>` element. The element itself is\n * represented by the internal `HTMLMetaElement`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see `Meta`\n *\n * @publicApi\n */\nexport type MetaDefinition = {\n  charset?: string;\n  content?: string;\n  httpEquiv?: string;\n  id?: string;\n  itemprop?: string;\n  name?: string;\n  property?: string;\n  scheme?: string;\n  url?: string;\n}&{\n  // TODO(IgorMinar): this type looks wrong\n  [prop: string]: string;\n};\n\n/**\n * Factory to create a `Meta` service instance for the current DOM document.\n */\nexport function createMeta() {\n  return new Meta(ɵɵinject(DOCUMENT));\n}\n\n/**\n * A service for managing HTML `<meta>` tags.\n *\n * Properties of the `MetaDefinition` object match the attributes of the\n * HTML `<meta>` tag. These tags define document metadata that is important for\n * things like configuring a Content Security Policy, defining browser compatibility\n * and security settings, setting HTTP Headers, defining rich content for social sharing,\n * and Search Engine Optimization (SEO).\n *\n * To identify specific `<meta>` tags in a document, use an attribute selection\n * string in the format `\"tag_attribute='value string'\"`.\n * For example, an `attrSelector` value of `\"name='description'\"` matches a tag\n * whose `name` attribute has the value `\"description\"`.\n * Selectors are used with the `querySelector()` Document method,\n * in the format `meta[{attrSelector}]`.\n *\n * @see [HTML meta tag](https://developer.mozilla.org/docs/Web/HTML/Element/meta)\n * @see [Document.querySelector()](https://developer.mozilla.org/docs/Web/API/Document/querySelector)\n *\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: createMeta, deps: []})\nexport class Meta {\n  private _dom: DomAdapter;\n  constructor(@Inject(DOCUMENT) private _doc: any) {\n    this._dom = getDOM();\n  }\n  /**\n   * Retrieves or creates a specific `<meta>` tag element in the current HTML document.\n   * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n   * values in the provided tag definition, and verifies that all other attribute values are equal.\n   * If an existing element is found, it is returned and is not modified in any way.\n   * @param tag The definition of a `<meta>` element to match or create.\n   * @param forceCreation True to create a new element without checking whether one already exists.\n   * @returns The existing element with the same attributes and values if found,\n   * the new element if no match is found, or `null` if the tag parameter is not defined.\n   */\n  addTag(tag: MetaDefinition, forceCreation: boolean = false): HTMLMetaElement|null {\n    if (!tag) return null;\n    return this._getOrCreateElement(tag, forceCreation);\n  }\n\n  /**\n   * Retrieves or creates a set of `<meta>` tag elements in the current HTML document.\n   * In searching for an existing tag, Angular attempts to match the `name` or `property` attribute\n   * values in the provided tag definition, and verifies that all other attribute values are equal.\n   * @param tags An array of tag definitions to match or create.\n   * @param forceCreation True to create new elements without checking whether they already exist.\n   * @returns The matching elements if found, or the new elements.\n   */\n  addTags(tags: MetaDefinition[], forceCreation: boolean = false): HTMLMetaElement[] {\n    if (!tags) return [];\n    return tags.reduce((result: HTMLMetaElement[], tag: MetaDefinition) => {\n      if (tag) {\n        result.push(this._getOrCreateElement(tag, forceCreation));\n      }\n      return result;\n    }, []);\n  }\n\n  /**\n   * Retrieves a `<meta>` tag element in the current HTML document.\n   * @param attrSelector The tag attribute and value to match against, in the format\n   * `\"tag_attribute='value string'\"`.\n   * @returns The matching element, if any.\n   */\n  getTag(attrSelector: string): HTMLMetaElement|null {\n    if (!attrSelector) return null;\n    return this._doc.querySelector(`meta[${attrSelector}]`) || null;\n  }\n\n  /**\n   * Retrieves a set of `<meta>` tag elements in the current HTML document.\n   * @param attrSelector The tag attribute and value to match against, in the format\n   * `\"tag_attribute='value string'\"`.\n   * @returns The matching elements, if any.\n   */\n  getTags(attrSelector: string): HTMLMetaElement[] {\n    if (!attrSelector) return [];\n    const list /*NodeList*/ = this._doc.querySelectorAll(`meta[${attrSelector}]`);\n    return list ? [].slice.call(list) : [];\n  }\n\n  /**\n   * Modifies an existing `<meta>` tag element in the current HTML document.\n   * @param tag The tag description with which to replace the existing tag content.\n   * @param selector A tag attribute and value to match against, to identify\n   * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n   * If not supplied, matches a tag with the same `name` or `property` attribute value as the\n   * replacement tag.\n   * @return The modified element.\n   */\n  updateTag(tag: MetaDefinition, selector?: string): HTMLMetaElement|null {\n    if (!tag) return null;\n    selector = selector || this._parseSelector(tag);\n    const meta: HTMLMetaElement = this.getTag(selector)!;\n    if (meta) {\n      return this._setMetaElementAttributes(tag, meta);\n    }\n    return this._getOrCreateElement(tag, true);\n  }\n\n  /**\n   * Removes an existing `<meta>` tag element from the current HTML document.\n   * @param attrSelector A tag attribute and value to match against, to identify\n   * an existing tag. A string in the format `\"tag_attribute=`value string`\"`.\n   */\n  removeTag(attrSelector: string): void {\n    this.removeTagElement(this.getTag(attrSelector)!);\n  }\n\n  /**\n   * Removes an existing `<meta>` tag element from the current HTML document.\n   * @param meta The tag definition to match against to identify an existing tag.\n   */\n  removeTagElement(meta: HTMLMetaElement): void {\n    if (meta) {\n      this._dom.remove(meta);\n    }\n  }\n\n  private _getOrCreateElement(meta: MetaDefinition, forceCreation: boolean = false):\n      HTMLMetaElement {\n    if (!forceCreation) {\n      const selector: string = this._parseSelector(meta);\n      const elem: HTMLMetaElement = this.getTag(selector)!;\n      // It's allowed to have multiple elements with the same name so it's not enough to\n      // just check that element with the same name already present on the page. We also need to\n      // check if element has tag attributes\n      if (elem && this._containsAttributes(meta, elem)) return elem;\n    }\n    const element: HTMLMetaElement = this._dom.createElement('meta') as HTMLMetaElement;\n    this._setMetaElementAttributes(meta, element);\n    const head = this._doc.getElementsByTagName('head')[0];\n    head.appendChild(element);\n    return element;\n  }\n\n  private _setMetaElementAttributes(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\n    Object.keys(tag).forEach((prop: string) => el.setAttribute(prop, tag[prop]));\n    return el;\n  }\n\n  private _parseSelector(tag: MetaDefinition): string {\n    const attr: string = tag.name ? 'name' : 'property';\n    return `${attr}=\"${tag[attr]}\"`;\n  }\n\n  private _containsAttributes(tag: MetaDefinition, elem: HTMLMetaElement): boolean {\n    return Object.keys(tag).every((key: string) => elem.getAttribute(key) === tag[key]);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT, ɵgetDOM as getDOM} from '@angular/common';\nimport {Inject, Injectable, ɵɵinject} from '@angular/core';\n\n\n/**\n * Factory to create Title service.\n */\nexport function createTitle() {\n  return new Title(ɵɵinject(DOCUMENT));\n}\n\n/**\n * A service that can be used to get and set the title of a current HTML document.\n *\n * Since an Angular application can't be bootstrapped on the entire HTML document (`<html>` tag)\n * it is not possible to bind to the `text` property of the `HTMLTitleElement` elements\n * (representing the `<title>` tag). Instead, this service can be used to set and get the current\n * title value.\n *\n * @publicApi\n */\n@Injectable({providedIn: 'root', useFactory: createTitle, deps: []})\nexport class Title {\n  constructor(@Inject(DOCUMENT) private _doc: any) {}\n  /**\n   * Get the title of the current HTML document.\n   */\n  getTitle(): string {\n    return this._doc.title;\n  }\n\n  /**\n   * Set the title of the current HTML document.\n   * @param newTitle\n   */\n  setTitle(newTitle: string) {\n    this._doc.title = newTitle || '';\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nconst win = typeof window !== 'undefined' && window || <any>{};\nexport {win as window};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {ApplicationRef, ComponentRef} from '@angular/core';\nimport {window} from './browser';\n\nexport class ChangeDetectionPerfRecord {\n  constructor(public msPerTick: number, public numTicks: number) {}\n}\n\n/**\n * Entry point for all Angular profiling-related debug tools. This object\n * corresponds to the `ng.profiler` in the dev console.\n */\nexport class AngularProfiler {\n  appRef: ApplicationRef;\n\n  constructor(ref: ComponentRef<any>) {\n    this.appRef = ref.injector.get(ApplicationRef);\n  }\n\n  // tslint:disable:no-console\n  /**\n   * Exercises change detection in a loop and then prints the average amount of\n   * time in milliseconds how long a single round of change detection takes for\n   * the current state of the UI. It runs a minimum of 5 rounds for a minimum\n   * of 500 milliseconds.\n   *\n   * Optionally, a user may pass a `config` parameter containing a map of\n   * options. Supported options are:\n   *\n   * `record` (boolean) - causes the profiler to record a CPU profile while\n   * it exercises the change detector. Example:\n   *\n   * ```\n   * ng.profiler.timeChangeDetection({record: true})\n   * ```\n   */\n  timeChangeDetection(config: any): ChangeDetectionPerfRecord {\n    const record = config && config['record'];\n    const profileName = 'Change Detection';\n    // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n    const isProfilerAvailable = window.console.profile != null;\n    if (record && isProfilerAvailable) {\n      window.console.profile(profileName);\n    }\n    const start = getDOM().performanceNow();\n    let numTicks = 0;\n    while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {\n      this.appRef.tick();\n      numTicks++;\n    }\n    const end = getDOM().performanceNow();\n    if (record && isProfilerAvailable) {\n      window.console.profileEnd(profileName);\n    }\n    const msPerTick = (end - start) / numTicks;\n    window.console.log(`ran ${numTicks} change detection cycles`);\n    window.console.log(`${msPerTick.toFixed(2)} ms per check`);\n\n    return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\nimport {exportNgVar} from '../../dom/util';\nimport {AngularProfiler} from './common_tools';\n\nconst PROFILER_GLOBAL_NAME = 'profiler';\n\n/**\n * Enabled Angular debug tools that are accessible via your browser's\n * developer console.\n *\n * Usage:\n *\n * 1. Open developer console (e.g. in Chrome Ctrl + Shift + j)\n * 1. Type `ng.` (usually the console will show auto-complete suggestion)\n * 1. Try the change detection profiler `ng.profiler.timeChangeDetection()`\n *    then hit Enter.\n *\n * @publicApi\n */\nexport function enableDebugTools<T>(ref: ComponentRef<T>): ComponentRef<T> {\n  exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n  return ref;\n}\n\n/**\n * Disables Angular tools.\n *\n * @publicApi\n */\nexport function disableDebugTools(): void {\n  exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {DOCUMENT} from '@angular/common';\nimport {APP_ID, Injectable, NgModule} from '@angular/core';\n\nexport function escapeHtml(text: string): string {\n  const escapedText: {[k: string]: string} = {\n    '&': '&a;',\n    '\"': '&q;',\n    '\\'': '&s;',\n    '<': '&l;',\n    '>': '&g;',\n  };\n  return text.replace(/[&\"'<>]/g, s => escapedText[s]);\n}\n\nexport function unescapeHtml(text: string): string {\n  const unescapedText: {[k: string]: string} = {\n    '&a;': '&',\n    '&q;': '\"',\n    '&s;': '\\'',\n    '&l;': '<',\n    '&g;': '>',\n  };\n  return text.replace(/&[^;]+;/g, s => unescapedText[s]);\n}\n\n/**\n * A type-safe key to use with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport type StateKey<T> = string&{__not_a_string: never};\n\n/**\n * Create a `StateKey<T>` that can be used to store value of type T with `TransferState`.\n *\n * Example:\n *\n * ```\n * const COUNTER_KEY = makeStateKey<number>('counter');\n * let value = 10;\n *\n * transferState.set(COUNTER_KEY, value);\n * ```\n *\n * @publicApi\n */\nexport function makeStateKey<T = void>(key: string): StateKey<T> {\n  return key as StateKey<T>;\n}\n\n/**\n * A key value store that is transferred from the application on the server side to the application\n * on the client side.\n *\n * `TransferState` will be available as an injectable token. To use it import\n * `ServerTransferStateModule` on the server and `BrowserTransferStateModule` on the client.\n *\n * The values in the store are serialized/deserialized using JSON.stringify/JSON.parse. So only\n * boolean, number, string, null and non-class objects will be serialized and deserialzied in a\n * non-lossy manner.\n *\n * @publicApi\n */\n@Injectable()\nexport class TransferState {\n  private store: {[k: string]: {}|undefined} = {};\n  private onSerializeCallbacks: {[k: string]: () => {} | undefined} = {};\n\n  /** @internal */\n  static init(initState: {}) {\n    const transferState = new TransferState();\n    transferState.store = initState;\n    return transferState;\n  }\n\n  /**\n   * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n   */\n  get<T>(key: StateKey<T>, defaultValue: T): T {\n    return this.store[key] !== undefined ? this.store[key] as T : defaultValue;\n  }\n\n  /**\n   * Set the value corresponding to a key.\n   */\n  set<T>(key: StateKey<T>, value: T): void {\n    this.store[key] = value;\n  }\n\n  /**\n   * Remove a key from the store.\n   */\n  remove<T>(key: StateKey<T>): void {\n    delete this.store[key];\n  }\n\n  /**\n   * Test whether a key exists in the store.\n   */\n  hasKey<T>(key: StateKey<T>) {\n    return this.store.hasOwnProperty(key);\n  }\n\n  /**\n   * Register a callback to provide the value for a key when `toJson` is called.\n   */\n  onSerialize<T>(key: StateKey<T>, callback: () => T): void {\n    this.onSerializeCallbacks[key] = callback;\n  }\n\n  /**\n   * Serialize the current state of the store to JSON.\n   */\n  toJson(): string {\n    // Call the onSerialize callbacks and put those values into the store.\n    for (const key in this.onSerializeCallbacks) {\n      if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n        try {\n          this.store[key] = this.onSerializeCallbacks[key]();\n        } catch (e) {\n          console.warn('Exception in onSerialize callback: ', e);\n        }\n      }\n    }\n    return JSON.stringify(this.store);\n  }\n}\n\nexport function initTransferState(doc: Document, appId: string) {\n  // Locate the script tag with the JSON data transferred from the server.\n  // The id of the script tag is set to the Angular appId + 'state'.\n  const script = doc.getElementById(appId + '-state');\n  let initialState = {};\n  if (script && script.textContent) {\n    try {\n      initialState = JSON.parse(unescapeHtml(script.textContent));\n    } catch (e) {\n      console.warn('Exception while restoring TransferState for app ' + appId, e);\n    }\n  }\n  return TransferState.init(initialState);\n}\n\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @publicApi\n */\n@NgModule({\n  providers: [{provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT, APP_ID]}],\n})\nexport class BrowserTransferStateModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {DebugElement, DebugNode, Predicate, Type} from '@angular/core';\n\n\n\n/**\n * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @publicApi\n */\nexport class By {\n  /**\n   * Match all nodes.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n   */\n  static all(): Predicate<DebugNode> {\n    return () => true;\n  }\n\n  /**\n   * Match elements by the given CSS selector.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n   */\n  static css(selector: string): Predicate<DebugElement> {\n    return (debugElement) => {\n      return debugElement.nativeElement != null ?\n          elementMatches(debugElement.nativeElement, selector) :\n          false;\n    };\n  }\n\n  /**\n   * Match nodes that have the given directive present.\n   *\n   * @usageNotes\n   * ### Example\n   *\n   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n   */\n  static directive(type: Type<any>): Predicate<DebugNode> {\n    return (debugNode) => debugNode.providerTokens!.indexOf(type) !== -1;\n  }\n}\n\nfunction elementMatches(n: any, selector: string): boolean {\n  if (getDOM().isElementNode(n)) {\n    return n.matches && n.matches(selector) ||\n        n.msMatchesSelector && n.msMatchesSelector(selector) ||\n        n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n  }\n\n  return false;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {ɵgetDOM} from '@angular/common';\nexport {BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, BROWSER_SANITIZATION_PROVIDERS__POST_R3__ as ɵBROWSER_SANITIZATION_PROVIDERS__POST_R3__, initDomAdapter as ɵinitDomAdapter, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS} from './browser';\nexport {BrowserDomAdapter as ɵBrowserDomAdapter} from './browser/browser_adapter';\nexport {TRANSITION_ID as ɵTRANSITION_ID} from './browser/server-transition';\nexport {BrowserGetTestability as ɵBrowserGetTestability} from './browser/testability';\nexport {escapeHtml as ɵescapeHtml} from './browser/transfer_state';\nexport {ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';\nexport {DomRendererFactory2 as ɵDomRendererFactory2, flattenStyles as ɵflattenStyles, NAMESPACE_URIS as ɵNAMESPACE_URIS, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute} from './dom/dom_renderer';\nexport {DomEventsPlugin as ɵDomEventsPlugin} from './dom/events/dom_events';\nexport {HammerGesturesPlugin as ɵHammerGesturesPlugin} from './dom/events/hammer_gestures';\nexport {KeyEventsPlugin as ɵKeyEventsPlugin} from './dom/events/key_events';\nexport {DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost} from './dom/shared_styles_host';\nexport {DomSanitizerImpl as ɵDomSanitizerImpl} from './security/dom_sanitization_service';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('10.1.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport {BrowserModule, platformBrowser} from './browser';\nexport {Meta, MetaDefinition} from './browser/meta';\nexport {Title} from './browser/title';\nexport {disableDebugTools, enableDebugTools} from './browser/tools/tools';\nexport {BrowserTransferStateModule, makeStateKey, StateKey, TransferState} from './browser/transfer_state';\nexport {By} from './dom/debug/by';\nexport {EVENT_MANAGER_PLUGINS, EventManager} from './dom/events/event_manager';\nexport {HAMMER_GESTURE_CONFIG, HAMMER_LOADER, HAMMER_PROVIDERS__POST_R3__ as ɵHAMMER_PROVIDERS__POST_R3__, HammerGestureConfig, HammerLoader, HammerModule} from './dom/events/hammer_gestures';\nexport {DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl, SafeValue} from './security/dom_sanitization_service';\n\nexport * from './private_export';\nexport {VERSION} from './version';\n// This must be exported so it doesn't get tree-shaken away prematurely\nexport {ELEMENT_PROBE_PROVIDERS__POST_R3__ as ɵELEMENT_PROBE_PROVIDERS__POST_R3__} from './dom/debug/ng_probe';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/platform-browser';\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","import { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n    if (subscriptionDelay) {\n        return (source) => new SubscriptionDelayObservable(source, subscriptionDelay)\n            .lift(new DelayWhenOperator(delayDurationSelector));\n    }\n    return (source) => source.lift(new DelayWhenOperator(delayDurationSelector));\n}\nclass DelayWhenOperator {\n    constructor(delayDurationSelector) {\n        this.delayDurationSelector = delayDurationSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n    }\n}\nclass DelayWhenSubscriber extends OuterSubscriber {\n    constructor(destination, delayDurationSelector) {\n        super(destination);\n        this.delayDurationSelector = delayDurationSelector;\n        this.completed = false;\n        this.delayNotifierSubscriptions = [];\n        this.index = 0;\n    }\n    notifyNext(outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n        this.destination.next(outerValue);\n        this.removeSubscription(innerSub);\n        this.tryComplete();\n    }\n    notifyError(error, innerSub) {\n        this._error(error);\n    }\n    notifyComplete(innerSub) {\n        const value = this.removeSubscription(innerSub);\n        if (value) {\n            this.destination.next(value);\n        }\n        this.tryComplete();\n    }\n    _next(value) {\n        const index = this.index++;\n        try {\n            const delayNotifier = this.delayDurationSelector(value, index);\n            if (delayNotifier) {\n                this.tryDelay(delayNotifier, value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    }\n    _complete() {\n        this.completed = true;\n        this.tryComplete();\n        this.unsubscribe();\n    }\n    removeSubscription(subscription) {\n        subscription.unsubscribe();\n        const subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n        if (subscriptionIdx !== -1) {\n            this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n        }\n        return subscription.outerValue;\n    }\n    tryDelay(delayNotifier, value) {\n        const notifierSubscription = subscribeToResult(this, delayNotifier, value);\n        if (notifierSubscription && !notifierSubscription.closed) {\n            const destination = this.destination;\n            destination.add(notifierSubscription);\n            this.delayNotifierSubscriptions.push(notifierSubscription);\n        }\n    }\n    tryComplete() {\n        if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n            this.destination.complete();\n        }\n    }\n}\nclass SubscriptionDelayObservable extends Observable {\n    constructor(source, subscriptionDelay) {\n        super();\n        this.source = source;\n        this.subscriptionDelay = subscriptionDelay;\n    }\n    _subscribe(subscriber) {\n        this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n    }\n}\nclass SubscriptionDelaySubscriber extends Subscriber {\n    constructor(parent, source) {\n        super();\n        this.parent = parent;\n        this.source = source;\n        this.sourceSubscribed = false;\n    }\n    _next(unused) {\n        this.subscribeToSource();\n    }\n    _error(err) {\n        this.unsubscribe();\n        this.parent.error(err);\n    }\n    _complete() {\n        this.unsubscribe();\n        this.subscribeToSource();\n    }\n    subscribeToSource() {\n        if (!this.sourceSubscribed) {\n            this.sourceSubscribed = true;\n            this.unsubscribe();\n            this.source.subscribe(this.parent);\n        }\n    }\n}\n//# sourceMappingURL=delayWhen.js.map","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin(...sources) {\n    if (sources.length === 1) {\n        const first = sources[0];\n        if (isArray(first)) {\n            return forkJoinInternal(first, null);\n        }\n        if (isObject(first) && Object.getPrototypeOf(first) === Object.prototype) {\n            const keys = Object.keys(first);\n            return forkJoinInternal(keys.map(key => first[key]), keys);\n        }\n    }\n    if (typeof sources[sources.length - 1] === 'function') {\n        const resultSelector = sources.pop();\n        sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n        return forkJoinInternal(sources, null).pipe(map((args) => resultSelector(...args)));\n    }\n    return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n    return new Observable(subscriber => {\n        const len = sources.length;\n        if (len === 0) {\n            subscriber.complete();\n            return;\n        }\n        const values = new Array(len);\n        let completed = 0;\n        let emitted = 0;\n        for (let i = 0; i < len; i++) {\n            const source = from(sources[i]);\n            let hasValue = false;\n            subscriber.add(source.subscribe({\n                next: value => {\n                    if (!hasValue) {\n                        hasValue = true;\n                        emitted++;\n                    }\n                    values[i] = value;\n                },\n                error: err => subscriber.error(err),\n                complete: () => {\n                    completed++;\n                    if (completed === len || !hasValue) {\n                        if (emitted === len) {\n                            subscriber.next(keys ?\n                                keys.reduce((result, key, i) => (result[key] = values[i], result), {}) :\n                                values);\n                        }\n                        subscriber.complete();\n                    }\n                }\n            }));\n        }\n    });\n}\n//# sourceMappingURL=forkJoin.js.map","import { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\nexport function single(predicate) {\n    return (source) => source.lift(new SingleOperator(predicate, source));\n}\nclass SingleOperator {\n    constructor(predicate, source) {\n        this.predicate = predicate;\n        this.source = source;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n    }\n}\nclass SingleSubscriber extends Subscriber {\n    constructor(destination, predicate, source) {\n        super(destination);\n        this.predicate = predicate;\n        this.source = source;\n        this.seenValue = false;\n        this.index = 0;\n    }\n    applySingleValue(value) {\n        if (this.seenValue) {\n            this.destination.error('Sequence contains more than one element');\n        }\n        else {\n            this.seenValue = true;\n            this.singleValue = value;\n        }\n    }\n    _next(value) {\n        const index = this.index++;\n        if (this.predicate) {\n            this.tryNext(value, index);\n        }\n        else {\n            this.applySingleValue(value);\n        }\n    }\n    tryNext(value, index) {\n        try {\n            if (this.predicate(value, index, this.source)) {\n                this.applySingleValue(value);\n            }\n        }\n        catch (err) {\n            this.destination.error(err);\n        }\n    }\n    _complete() {\n        const destination = this.destination;\n        if (this.index > 0) {\n            destination.next(this.seenValue ? this.singleValue : undefined);\n            destination.complete();\n        }\n        else {\n            destination.error(new EmptyError);\n        }\n    }\n}\n//# sourceMappingURL=single.js.map","import { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function materialize() {\n    return function materializeOperatorFunction(source) {\n        return source.lift(new MaterializeOperator());\n    };\n}\nclass MaterializeOperator {\n    call(subscriber, source) {\n        return source.subscribe(new MaterializeSubscriber(subscriber));\n    }\n}\nclass MaterializeSubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n    }\n    _next(value) {\n        this.destination.next(Notification.createNext(value));\n    }\n    _error(err) {\n        const destination = this.destination;\n        destination.next(Notification.createError(err));\n        destination.complete();\n    }\n    _complete() {\n        const destination = this.destination;\n        destination.next(Notification.createComplete());\n        destination.complete();\n    }\n}\n//# sourceMappingURL=materialize.js.map","import { map } from './map';\nimport { from } from '../observable/from';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function switchMap(project, resultSelector) {\n    if (typeof resultSelector === 'function') {\n        return (source) => source.pipe(switchMap((a, i) => from(project(a, i)).pipe(map((b, ii) => resultSelector(a, b, i, ii)))));\n    }\n    return (source) => source.lift(new SwitchMapOperator(project));\n}\nclass SwitchMapOperator {\n    constructor(project) {\n        this.project = project;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n    }\n}\nclass SwitchMapSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, project) {\n        super(destination);\n        this.project = project;\n        this.index = 0;\n    }\n    _next(value) {\n        let result;\n        const index = this.index++;\n        try {\n            result = this.project(value, index);\n        }\n        catch (error) {\n            this.destination.error(error);\n            return;\n        }\n        this._innerSub(result);\n    }\n    _innerSub(result) {\n        const innerSubscription = this.innerSubscription;\n        if (innerSubscription) {\n            innerSubscription.unsubscribe();\n        }\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        const destination = this.destination;\n        destination.add(innerSubscriber);\n        this.innerSubscription = innerSubscribe(result, innerSubscriber);\n        if (this.innerSubscription !== innerSubscriber) {\n            destination.add(this.innerSubscription);\n        }\n    }\n    _complete() {\n        const { innerSubscription } = this;\n        if (!innerSubscription || innerSubscription.closed) {\n            super._complete();\n        }\n        this.unsubscribe();\n    }\n    _unsubscribe() {\n        this.innerSubscription = undefined;\n    }\n    notifyComplete() {\n        this.innerSubscription = undefined;\n        if (this.isStopped) {\n            super._complete();\n        }\n    }\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n}\n//# sourceMappingURL=switchMap.js.map","import { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport const animationFrameScheduler = new AnimationFrameScheduler(AnimationFrameAction);\nexport const animationFrame = animationFrameScheduler;\n//# sourceMappingURL=animationFrame.js.map","import { concat as concatStatic } from '../observable/concat';\nexport function concat(...observables) {\n    return (source) => source.lift.call(concatStatic(source, ...observables));\n}\n//# sourceMappingURL=concat.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationEvent, AnimationPlayer, AUTO_STYLE, NoopAnimationPlayer, ɵAnimationGroupPlayer, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {AnimationDriver} from '../../src/render/animation_driver';\n\n// We don't include ambient node types here since @angular/animations/browser\n// is meant to target the browser so technically it should not depend on node\n// types. `process` is just declared locally here as a result.\ndeclare const process: any;\n\nexport function isBrowser(): boolean {\n  return (typeof window !== 'undefined' && typeof window.document !== 'undefined');\n}\n\nexport function isNode(): boolean {\n  // Checking only for `process` isn't enough to identify whether or not we're in a Node\n  // environment, because Webpack by default will polyfill the `process`. While we can discern\n  // that Webpack polyfilled it by looking at `process.browser`, it's very Webpack-specific and\n  // might not be future-proof. Instead we look at the stringified version of `process` which\n  // is `[object process]` in Node and `[object Object]` when polyfilled.\n  return typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n}\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n  switch (players.length) {\n    case 0:\n      return new NoopAnimationPlayer();\n    case 1:\n      return players[0];\n    default:\n      return new ɵAnimationGroupPlayer(players);\n  }\n}\n\nexport function normalizeKeyframes(\n    driver: AnimationDriver, normalizer: AnimationStyleNormalizer, element: any,\n    keyframes: ɵStyleData[], preStyles: ɵStyleData = {},\n    postStyles: ɵStyleData = {}): ɵStyleData[] {\n  const errors: string[] = [];\n  const normalizedKeyframes: ɵStyleData[] = [];\n  let previousOffset = -1;\n  let previousKeyframe: ɵStyleData|null = null;\n  keyframes.forEach(kf => {\n    const offset = kf['offset'] as number;\n    const isSameOffset = offset == previousOffset;\n    const normalizedKeyframe: ɵStyleData = (isSameOffset && previousKeyframe) || {};\n    Object.keys(kf).forEach(prop => {\n      let normalizedProp = prop;\n      let normalizedValue = kf[prop];\n      if (prop !== 'offset') {\n        normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n        switch (normalizedValue) {\n          case PRE_STYLE:\n            normalizedValue = preStyles[prop];\n            break;\n\n          case AUTO_STYLE:\n            normalizedValue = postStyles[prop];\n            break;\n\n          default:\n            normalizedValue =\n                normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n            break;\n        }\n      }\n      normalizedKeyframe[normalizedProp] = normalizedValue;\n    });\n    if (!isSameOffset) {\n      normalizedKeyframes.push(normalizedKeyframe);\n    }\n    previousKeyframe = normalizedKeyframe;\n    previousOffset = offset;\n  });\n  if (errors.length) {\n    const LINE_START = '\\n - ';\n    throw new Error(\n        `Unable to animate due to the following errors:${LINE_START}${errors.join(LINE_START)}`);\n  }\n\n  return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n    player: AnimationPlayer, eventName: string, event: AnimationEvent|undefined,\n    callback: (event: any) => any) {\n  switch (eventName) {\n    case 'start':\n      player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player)));\n      break;\n    case 'done':\n      player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player)));\n      break;\n    case 'destroy':\n      player.onDestroy(() => callback(event && copyAnimationEvent(event, 'destroy', player)));\n      break;\n  }\n}\n\nexport function copyAnimationEvent(\n    e: AnimationEvent, phaseName: string, player: AnimationPlayer): AnimationEvent {\n  const totalTime = player.totalTime;\n  const disabled = (player as any).disabled ? true : false;\n  const event = makeAnimationEvent(\n      e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName,\n      totalTime == undefined ? e.totalTime : totalTime, disabled);\n  const data = (e as any)['_data'];\n  if (data != null) {\n    (event as any)['_data'] = data;\n  }\n  return event;\n}\n\nexport function makeAnimationEvent(\n    element: any, triggerName: string, fromState: string, toState: string, phaseName: string = '',\n    totalTime: number = 0, disabled?: boolean): AnimationEvent {\n  return {element, triggerName, fromState, toState, phaseName, totalTime, disabled: !!disabled};\n}\n\nexport function getOrSetAsInMap(\n    map: Map<any, any>|{[key: string]: any}, key: any, defaultValue: any) {\n  let value: any;\n  if (map instanceof Map) {\n    value = map.get(key);\n    if (!value) {\n      map.set(key, value = defaultValue);\n    }\n  } else {\n    value = map[key];\n    if (!value) {\n      value = map[key] = defaultValue;\n    }\n  }\n  return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n  const separatorPos = command.indexOf(':');\n  const id = command.substring(1, separatorPos);\n  const action = command.substr(separatorPos + 1);\n  return [id, action];\n}\n\nlet _contains: (elm1: any, elm2: any) => boolean = (elm1: any, elm2: any) => false;\nlet _matches: (element: any, selector: string) => boolean = (element: any, selector: string) =>\n    false;\nlet _query: (element: any, selector: string, multi: boolean) => any[] =\n    (element: any, selector: string, multi: boolean) => {\n      return [];\n    };\n\n// Define utility methods for browsers and platform-server(domino) where Element\n// and utility methods exist.\nconst _isNode = isNode();\nif (_isNode || typeof Element !== 'undefined') {\n  // this is well supported in all browsers\n  _contains = (elm1: any, elm2: any) => {\n    return elm1.contains(elm2) as boolean;\n  };\n\n  _matches = (() => {\n    if (_isNode || Element.prototype.matches) {\n      return (element: any, selector: string) => element.matches(selector);\n    } else {\n      const proto = Element.prototype as any;\n      const fn = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||\n          proto.oMatchesSelector || proto.webkitMatchesSelector;\n      if (fn) {\n        return (element: any, selector: string) => fn.apply(element, [selector]);\n      } else {\n        return _matches;\n      }\n    }\n  })();\n\n  _query = (element: any, selector: string, multi: boolean): any[] => {\n    let results: any[] = [];\n    if (multi) {\n      results.push(...element.querySelectorAll(selector));\n    } else {\n      const elm = element.querySelector(selector);\n      if (elm) {\n        results.push(elm);\n      }\n    }\n    return results;\n  };\n}\n\nfunction containsVendorPrefix(prop: string): boolean {\n  // Webkit is the only real popular vendor prefix nowadays\n  // cc: http://shouldiprefix.com/\n  return prop.substring(1, 6) == 'ebkit';  // webkit or Webkit\n}\n\nlet _CACHED_BODY: {style: any}|null = null;\nlet _IS_WEBKIT = false;\nexport function validateStyleProperty(prop: string): boolean {\n  if (!_CACHED_BODY) {\n    _CACHED_BODY = getBodyNode() || {};\n    _IS_WEBKIT = _CACHED_BODY!.style ? ('WebkitAppearance' in _CACHED_BODY!.style) : false;\n  }\n\n  let result = true;\n  if (_CACHED_BODY!.style && !containsVendorPrefix(prop)) {\n    result = prop in _CACHED_BODY!.style;\n    if (!result && _IS_WEBKIT) {\n      const camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);\n      result = camelProp in _CACHED_BODY!.style;\n    }\n  }\n\n  return result;\n}\n\nexport function getBodyNode(): any|null {\n  if (typeof document != 'undefined') {\n    return document.body;\n  }\n  return null;\n}\n\nexport const matchesElement = _matches;\nexport const containsElement = _contains;\nexport const invokeQuery = _query;\n\nexport function hypenatePropsObject(object: {[key: string]: any}): {[key: string]: any} {\n  const newObj: {[key: string]: any} = {};\n  Object.keys(object).forEach(prop => {\n    const newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n    newObj[newProp] = object[prop];\n  });\n  return newObj;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, NoopAnimationPlayer} from '@angular/animations';\nimport {Injectable} from '@angular/core';\n\nimport {containsElement, invokeQuery, matchesElement, validateStyleProperty} from './shared';\n\n/**\n * @publicApi\n */\n@Injectable()\nexport class NoopAnimationDriver implements AnimationDriver {\n  validateStyleProperty(prop: string): boolean {\n    return validateStyleProperty(prop);\n  }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean {\n    return containsElement(elm1, elm2);\n  }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return defaultValue || '';\n  }\n\n  animate(\n      element: any, keyframes: {[key: string]: string|number}[], duration: number, delay: number,\n      easing: string, previousPlayers: any[] = [],\n      scrubberAccessRequested?: boolean): AnimationPlayer {\n    return new NoopAnimationPlayer(duration, delay);\n  }\n}\n\n/**\n * @publicApi\n */\nexport abstract class AnimationDriver {\n  static NOOP: AnimationDriver = new NoopAnimationDriver();\n\n  abstract validateStyleProperty(prop: string): boolean;\n\n  abstract matchesElement(element: any, selector: string): boolean;\n\n  abstract containsElement(elm1: any, elm2: any): boolean;\n\n  abstract query(element: any, selector: string, multi: boolean): any[];\n\n  abstract computeStyle(element: any, prop: string, defaultValue?: string): string;\n\n  abstract animate(\n      element: any, keyframes: {[key: string]: string|number}[], duration: number, delay: number,\n      easing?: string|null, previousPlayers?: any[], scrubberAccessRequested?: boolean): any;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimateTimings, AnimationMetadata, AnimationMetadataType, AnimationOptions, sequence, ɵStyleData} from '@angular/animations';\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\nimport {isNode} from './render/shared';\n\nexport const ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const ENTER_SELECTOR = '.ng-enter';\nexport const LEAVE_SELECTOR = '.ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string|number) {\n  if (typeof value == 'number') return value;\n\n  const matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n  if (!matches || matches.length < 2) return 0;\n\n  return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n  switch (unit) {\n    case 's':\n      return value * ONE_SECOND;\n    default:  // ms or something else\n      return value;\n  }\n}\n\nexport function resolveTiming(\n    timings: string|number|AnimateTimings, errors: any[], allowNegativeValues?: boolean) {\n  return timings.hasOwnProperty('duration') ?\n      <AnimateTimings>timings :\n      parseTimeExpression(<string|number>timings, errors, allowNegativeValues);\n}\n\nfunction parseTimeExpression(\n    exp: string|number, errors: string[], allowNegativeValues?: boolean): AnimateTimings {\n  const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n  let duration: number;\n  let delay: number = 0;\n  let easing: string = '';\n  if (typeof exp === 'string') {\n    const matches = exp.match(regex);\n    if (matches === null) {\n      errors.push(`The provided timing value \"${exp}\" is invalid.`);\n      return {duration: 0, delay: 0, easing: ''};\n    }\n\n    duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n    const delayMatch = matches[3];\n    if (delayMatch != null) {\n      delay = _convertTimeValueToMS(parseFloat(delayMatch), matches[4]);\n    }\n\n    const easingVal = matches[5];\n    if (easingVal) {\n      easing = easingVal;\n    }\n  } else {\n    duration = exp;\n  }\n\n  if (!allowNegativeValues) {\n    let containsErrors = false;\n    let startIndex = errors.length;\n    if (duration < 0) {\n      errors.push(`Duration values below 0 are not allowed for this animation step.`);\n      containsErrors = true;\n    }\n    if (delay < 0) {\n      errors.push(`Delay values below 0 are not allowed for this animation step.`);\n      containsErrors = true;\n    }\n    if (containsErrors) {\n      errors.splice(startIndex, 0, `The provided timing value \"${exp}\" is invalid.`);\n    }\n  }\n\n  return {duration, delay, easing};\n}\n\nexport function copyObj(\n    obj: {[key: string]: any}, destination: {[key: string]: any} = {}): {[key: string]: any} {\n  Object.keys(obj).forEach(prop => {\n    destination[prop] = obj[prop];\n  });\n  return destination;\n}\n\nexport function normalizeStyles(styles: ɵStyleData|ɵStyleData[]): ɵStyleData {\n  const normalizedStyles: ɵStyleData = {};\n  if (Array.isArray(styles)) {\n    styles.forEach(data => copyStyles(data, false, normalizedStyles));\n  } else {\n    copyStyles(styles, false, normalizedStyles);\n  }\n  return normalizedStyles;\n}\n\nexport function copyStyles(\n    styles: ɵStyleData, readPrototype: boolean, destination: ɵStyleData = {}): ɵStyleData {\n  if (readPrototype) {\n    // we make use of a for-in loop so that the\n    // prototypically inherited properties are\n    // revealed from the backFill map\n    for (let prop in styles) {\n      destination[prop] = styles[prop];\n    }\n  } else {\n    copyObj(styles, destination);\n  }\n  return destination;\n}\n\nfunction getStyleAttributeString(element: any, key: string, value: string) {\n  // Return the key-value pair string to be added to the style attribute for the\n  // given CSS style key.\n  if (value) {\n    return key + ':' + value + ';';\n  } else {\n    return '';\n  }\n}\n\nfunction writeStyleAttribute(element: any) {\n  // Read the style property of the element and manually reflect it to the\n  // style attribute. This is needed because Domino on platform-server doesn't\n  // understand the full set of allowed CSS properties and doesn't reflect some\n  // of them automatically.\n  let styleAttrValue = '';\n  for (let i = 0; i < element.style.length; i++) {\n    const key = element.style.item(i);\n    styleAttrValue += getStyleAttributeString(element, key, element.style.getPropertyValue(key));\n  }\n  for (const key in element.style) {\n    // Skip internal Domino properties that don't need to be reflected.\n    if (!element.style.hasOwnProperty(key) || key.startsWith('_')) {\n      continue;\n    }\n    const dashKey = camelCaseToDashCase(key);\n    styleAttrValue += getStyleAttributeString(element, dashKey, element.style[key]);\n  }\n  element.setAttribute('style', styleAttrValue);\n}\n\nexport function setStyles(element: any, styles: ɵStyleData, formerStyles?: {[key: string]: any}) {\n  if (element['style']) {\n    Object.keys(styles).forEach(prop => {\n      const camelProp = dashCaseToCamelCase(prop);\n      if (formerStyles && !formerStyles.hasOwnProperty(prop)) {\n        formerStyles[prop] = element.style[camelProp];\n      }\n      element.style[camelProp] = styles[prop];\n    });\n    // On the server set the 'style' attribute since it's not automatically reflected.\n    if (isNode()) {\n      writeStyleAttribute(element);\n    }\n  }\n}\n\nexport function eraseStyles(element: any, styles: ɵStyleData) {\n  if (element['style']) {\n    Object.keys(styles).forEach(prop => {\n      const camelProp = dashCaseToCamelCase(prop);\n      element.style[camelProp] = '';\n    });\n    // On the server set the 'style' attribute since it's not automatically reflected.\n    if (isNode()) {\n      writeStyleAttribute(element);\n    }\n  }\n}\n\nexport function normalizeAnimationEntry(steps: AnimationMetadata|\n                                        AnimationMetadata[]): AnimationMetadata {\n  if (Array.isArray(steps)) {\n    if (steps.length == 1) return steps[0];\n    return sequence(steps);\n  }\n  return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n    value: string|number, options: AnimationOptions, errors: any[]) {\n  const params = options.params || {};\n  const matches = extractStyleParams(value);\n  if (matches.length) {\n    matches.forEach(varName => {\n      if (!params.hasOwnProperty(varName)) {\n        errors.push(\n            `Unable to resolve the local animation param ${varName} in the given list of values`);\n      }\n    });\n  }\n}\n\nconst PARAM_REGEX =\n    new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nexport function extractStyleParams(value: string|number): string[] {\n  let params: string[] = [];\n  if (typeof value === 'string') {\n    let match: any;\n    while (match = PARAM_REGEX.exec(value)) {\n      params.push(match[1] as string);\n    }\n    PARAM_REGEX.lastIndex = 0;\n  }\n  return params;\n}\n\nexport function interpolateParams(\n    value: string|number, params: {[name: string]: any}, errors: any[]): string|number {\n  const original = value.toString();\n  const str = original.replace(PARAM_REGEX, (_, varName) => {\n    let localVal = params[varName];\n    // this means that the value was never overridden by the data passed in by the user\n    if (!params.hasOwnProperty(varName)) {\n      errors.push(`Please provide a value for the animation param ${varName}`);\n      localVal = '';\n    }\n    return localVal.toString();\n  });\n\n  // we do this to assert that numeric values stay as they are\n  return str == original ? value : str;\n}\n\nexport function iteratorToArray(iterator: any): any[] {\n  const arr: any[] = [];\n  let item = iterator.next();\n  while (!item.done) {\n    arr.push(item.value);\n    item = iterator.next();\n  }\n  return arr;\n}\n\nexport function mergeAnimationOptions(\n    source: AnimationOptions, destination: AnimationOptions): AnimationOptions {\n  if (source.params) {\n    const p0 = source.params;\n    if (!destination.params) {\n      destination.params = {};\n    }\n    const p1 = destination.params;\n    Object.keys(p0).forEach(param => {\n      if (!p1.hasOwnProperty(param)) {\n        p1[param] = p0[param];\n      }\n    });\n  }\n  return destination;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n  return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nfunction camelCaseToDashCase(input: string): string {\n  return input.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n  return duration === 0 || delay === 0;\n}\n\nexport function balancePreviousStylesIntoKeyframes(\n    element: any, keyframes: {[key: string]: any}[], previousStyles: {[key: string]: any}) {\n  const previousStyleProps = Object.keys(previousStyles);\n  if (previousStyleProps.length && keyframes.length) {\n    let startingKeyframe = keyframes[0];\n    let missingStyleProps: string[] = [];\n    previousStyleProps.forEach(prop => {\n      if (!startingKeyframe.hasOwnProperty(prop)) {\n        missingStyleProps.push(prop);\n      }\n      startingKeyframe[prop] = previousStyles[prop];\n    });\n\n    if (missingStyleProps.length) {\n      // tslint:disable-next-line\n      for (var i = 1; i < keyframes.length; i++) {\n        let kf = keyframes[i];\n        missingStyleProps.forEach(function(prop) {\n          kf[prop] = computeStyle(element, prop);\n        });\n      }\n    }\n  }\n  return keyframes;\n}\n\nexport function visitDslNode(\n    visitor: AnimationDslVisitor, node: AnimationMetadata, context: any): any;\nexport function visitDslNode(\n    visitor: AnimationAstVisitor, node: AnimationAst<AnimationMetadataType>, context: any): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n  switch (node.type) {\n    case AnimationMetadataType.Trigger:\n      return visitor.visitTrigger(node, context);\n    case AnimationMetadataType.State:\n      return visitor.visitState(node, context);\n    case AnimationMetadataType.Transition:\n      return visitor.visitTransition(node, context);\n    case AnimationMetadataType.Sequence:\n      return visitor.visitSequence(node, context);\n    case AnimationMetadataType.Group:\n      return visitor.visitGroup(node, context);\n    case AnimationMetadataType.Animate:\n      return visitor.visitAnimate(node, context);\n    case AnimationMetadataType.Keyframes:\n      return visitor.visitKeyframes(node, context);\n    case AnimationMetadataType.Style:\n      return visitor.visitStyle(node, context);\n    case AnimationMetadataType.Reference:\n      return visitor.visitReference(node, context);\n    case AnimationMetadataType.AnimateChild:\n      return visitor.visitAnimateChild(node, context);\n    case AnimationMetadataType.AnimateRef:\n      return visitor.visitAnimateRef(node, context);\n    case AnimationMetadataType.Query:\n      return visitor.visitQuery(node, context);\n    case AnimationMetadataType.Stagger:\n      return visitor.visitStagger(node, context);\n    default:\n      throw new Error(`Unable to resolve animation metadata node #${node.type}`);\n  }\n}\n\nexport function computeStyle(element: any, prop: string): string {\n  return (<any>window.getComputedStyle(element))[prop];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport const ANY_STATE = '*';\nexport declare type TransitionMatcherFn =\n    (fromState: any, toState: any, element: any, params: {[key: string]: any}) => boolean;\n\nexport function parseTransitionExpr(\n    transitionValue: string|TransitionMatcherFn, errors: string[]): TransitionMatcherFn[] {\n  const expressions: TransitionMatcherFn[] = [];\n  if (typeof transitionValue == 'string') {\n    transitionValue.split(/\\s*,\\s*/).forEach(\n        str => parseInnerTransitionStr(str, expressions, errors));\n  } else {\n    expressions.push(<TransitionMatcherFn>transitionValue);\n  }\n  return expressions;\n}\n\nfunction parseInnerTransitionStr(\n    eventStr: string, expressions: TransitionMatcherFn[], errors: string[]) {\n  if (eventStr[0] == ':') {\n    const result = parseAnimationAlias(eventStr, errors);\n    if (typeof result == 'function') {\n      expressions.push(result);\n      return;\n    }\n    eventStr = result;\n  }\n\n  const match = eventStr.match(/^(\\*|[-\\w]+)\\s*(<?[=-]>)\\s*(\\*|[-\\w]+)$/);\n  if (match == null || match.length < 4) {\n    errors.push(`The provided transition expression \"${eventStr}\" is not supported`);\n    return expressions;\n  }\n\n  const fromState = match[1];\n  const separator = match[2];\n  const toState = match[3];\n  expressions.push(makeLambdaFromStates(fromState, toState));\n\n  const isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n  if (separator[0] == '<' && !isFullAnyStateExpr) {\n    expressions.push(makeLambdaFromStates(toState, fromState));\n  }\n}\n\nfunction parseAnimationAlias(alias: string, errors: string[]): string|TransitionMatcherFn {\n  switch (alias) {\n    case ':enter':\n      return 'void => *';\n    case ':leave':\n      return '* => void';\n    case ':increment':\n      return (fromState: any, toState: any): boolean => parseFloat(toState) > parseFloat(fromState);\n    case ':decrement':\n      return (fromState: any, toState: any): boolean => parseFloat(toState) < parseFloat(fromState);\n    default:\n      errors.push(`The transition alias value \"${alias}\" is not supported`);\n      return '* => *';\n  }\n}\n\n// DO NOT REFACTOR ... keep the follow set instantiations\n// with the values intact (closure compiler for some reason\n// removes follow-up lines that add the values outside of\n// the constructor...\nconst TRUE_BOOLEAN_VALUES = new Set<string>(['true', '1']);\nconst FALSE_BOOLEAN_VALUES = new Set<string>(['false', '0']);\n\nfunction makeLambdaFromStates(lhs: string, rhs: string): TransitionMatcherFn {\n  const LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n  const RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n\n  return (fromState: any, toState: any): boolean => {\n    let lhsMatch = lhs == ANY_STATE || lhs == fromState;\n    let rhsMatch = rhs == ANY_STATE || rhs == toState;\n\n    if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n      lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n    }\n    if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n      rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n    }\n\n    return lhsMatch && rhsMatch;\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, AUTO_STYLE, style, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetAsInMap} from '../render/shared';\nimport {copyObj, ENTER_SELECTOR, extractStyleParams, iteratorToArray, LEAVE_SELECTOR, NG_ANIMATING_SELECTOR, NG_TRIGGER_SELECTOR, normalizeAnimationEntry, resolveTiming, SUBSTITUTION_EXPR_START, validateStyleParams, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationDslVisitor} from './animation_dsl_visitor';\nimport {parseTransitionExpr} from './animation_transition_expr';\n\nconst SELF_TOKEN = ':self';\nconst SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n\n/*\n * [Validation]\n * The visitor code below will traverse the animation AST generated by the animation verb functions\n * (the output is a tree of objects) and attempt to perform a series of validations on the data. The\n * following corner-cases will be validated:\n *\n * 1. Overlap of animations\n * Given that a CSS property cannot be animated in more than one place at the same time, it's\n * important that this behavior is detected and validated. The way in which this occurs is that\n * each time a style property is examined, a string-map containing the property will be updated with\n * the start and end times for when the property is used within an animation step.\n *\n * If there are two or more parallel animations that are currently running (these are invoked by the\n * group()) on the same element then the validator will throw an error. Since the start/end timing\n * values are collected for each property then if the current animation step is animating the same\n * property and its timing values fall anywhere into the window of time that the property is\n * currently being animated within then this is what causes an error.\n *\n * 2. Timing values\n * The validator will validate to see if a timing value of `duration delay easing` or\n * `durationNumber` is valid or not.\n *\n * (note that upon validation the code below will replace the timing data with an object containing\n * {duration,delay,easing}.\n *\n * 3. Offset Validation\n * Each of the style() calls are allowed to have an offset value when placed inside of keyframes().\n * Offsets within keyframes() are considered valid when:\n *\n *   - No offsets are used at all\n *   - Each style() entry contains an offset value\n *   - Each offset is between 0 and 1\n *   - Each offset is greater to or equal than the previous one\n *\n * Otherwise an error will be thrown.\n */\nexport function buildAnimationAst(\n    driver: AnimationDriver, metadata: AnimationMetadata|AnimationMetadata[],\n    errors: any[]): Ast<AnimationMetadataType> {\n  return new AnimationAstBuilderVisitor(driver).build(metadata, errors);\n}\n\nconst ROOT_SELECTOR = '';\n\nexport class AnimationAstBuilderVisitor implements AnimationDslVisitor {\n  constructor(private _driver: AnimationDriver) {}\n\n  build(metadata: AnimationMetadata|AnimationMetadata[], errors: any[]):\n      Ast<AnimationMetadataType> {\n    const context = new AnimationAstBuilderContext(errors);\n    this._resetContextStyleTimingState(context);\n    return <Ast<AnimationMetadataType>>visitDslNode(\n        this, normalizeAnimationEntry(metadata), context);\n  }\n\n  private _resetContextStyleTimingState(context: AnimationAstBuilderContext) {\n    context.currentQuerySelector = ROOT_SELECTOR;\n    context.collectedStyles = {};\n    context.collectedStyles[ROOT_SELECTOR] = {};\n    context.currentTime = 0;\n  }\n\n  visitTrigger(metadata: AnimationTriggerMetadata, context: AnimationAstBuilderContext):\n      TriggerAst {\n    let queryCount = context.queryCount = 0;\n    let depCount = context.depCount = 0;\n    const states: StateAst[] = [];\n    const transitions: TransitionAst[] = [];\n    if (metadata.name.charAt(0) == '@') {\n      context.errors.push(\n          'animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n    }\n\n    metadata.definitions.forEach(def => {\n      this._resetContextStyleTimingState(context);\n      if (def.type == AnimationMetadataType.State) {\n        const stateDef = def as AnimationStateMetadata;\n        const name = stateDef.name;\n        name.toString().split(/\\s*,\\s*/).forEach(n => {\n          stateDef.name = n;\n          states.push(this.visitState(stateDef, context));\n        });\n        stateDef.name = name;\n      } else if (def.type == AnimationMetadataType.Transition) {\n        const transition = this.visitTransition(def as AnimationTransitionMetadata, context);\n        queryCount += transition.queryCount;\n        depCount += transition.depCount;\n        transitions.push(transition);\n      } else {\n        context.errors.push(\n            'only state() and transition() definitions can sit inside of a trigger()');\n      }\n    });\n\n    return {\n      type: AnimationMetadataType.Trigger,\n      name: metadata.name,\n      states,\n      transitions,\n      queryCount,\n      depCount,\n      options: null\n    };\n  }\n\n  visitState(metadata: AnimationStateMetadata, context: AnimationAstBuilderContext): StateAst {\n    const styleAst = this.visitStyle(metadata.styles, context);\n    const astParams = (metadata.options && metadata.options.params) || null;\n    if (styleAst.containsDynamicStyles) {\n      const missingSubs = new Set<string>();\n      const params = astParams || {};\n      styleAst.styles.forEach(value => {\n        if (isObject(value)) {\n          const stylesObj = value as any;\n          Object.keys(stylesObj).forEach(prop => {\n            extractStyleParams(stylesObj[prop]).forEach(sub => {\n              if (!params.hasOwnProperty(sub)) {\n                missingSubs.add(sub);\n              }\n            });\n          });\n        }\n      });\n      if (missingSubs.size) {\n        const missingSubsArr = iteratorToArray(missingSubs.values());\n        context.errors.push(`state(\"${\n            metadata\n                .name}\", ...) must define default values for all the following style substitutions: ${\n            missingSubsArr.join(', ')}`);\n      }\n    }\n\n    return {\n      type: AnimationMetadataType.State,\n      name: metadata.name,\n      style: styleAst,\n      options: astParams ? {params: astParams} : null\n    };\n  }\n\n  visitTransition(metadata: AnimationTransitionMetadata, context: AnimationAstBuilderContext):\n      TransitionAst {\n    context.queryCount = 0;\n    context.depCount = 0;\n    const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n    const matchers = parseTransitionExpr(metadata.expr, context.errors);\n\n    return {\n      type: AnimationMetadataType.Transition,\n      matchers,\n      animation,\n      queryCount: context.queryCount,\n      depCount: context.depCount,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitSequence(metadata: AnimationSequenceMetadata, context: AnimationAstBuilderContext):\n      SequenceAst {\n    return {\n      type: AnimationMetadataType.Sequence,\n      steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitGroup(metadata: AnimationGroupMetadata, context: AnimationAstBuilderContext): GroupAst {\n    const currentTime = context.currentTime;\n    let furthestTime = 0;\n    const steps = metadata.steps.map(step => {\n      context.currentTime = currentTime;\n      const innerAst = visitDslNode(this, step, context);\n      furthestTime = Math.max(furthestTime, context.currentTime);\n      return innerAst;\n    });\n\n    context.currentTime = furthestTime;\n    return {\n      type: AnimationMetadataType.Group,\n      steps,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimate(metadata: AnimationAnimateMetadata, context: AnimationAstBuilderContext):\n      AnimateAst {\n    const timingAst = constructTimingAst(metadata.timings, context.errors);\n    context.currentAnimateTimings = timingAst;\n\n    let styleAst: StyleAst|KeyframesAst;\n    let styleMetadata: AnimationMetadata = metadata.styles ? metadata.styles : style({});\n    if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n      styleAst = this.visitKeyframes(styleMetadata as AnimationKeyframesSequenceMetadata, context);\n    } else {\n      let styleMetadata = metadata.styles as AnimationStyleMetadata;\n      let isEmpty = false;\n      if (!styleMetadata) {\n        isEmpty = true;\n        const newStyleData: {[prop: string]: string|number} = {};\n        if (timingAst.easing) {\n          newStyleData['easing'] = timingAst.easing;\n        }\n        styleMetadata = style(newStyleData);\n      }\n      context.currentTime += timingAst.duration + timingAst.delay;\n      const _styleAst = this.visitStyle(styleMetadata, context);\n      _styleAst.isEmptyStep = isEmpty;\n      styleAst = _styleAst;\n    }\n\n    context.currentAnimateTimings = null;\n    return {\n      type: AnimationMetadataType.Animate,\n      timings: timingAst,\n      style: styleAst,\n      options: null\n    };\n  }\n\n  visitStyle(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext): StyleAst {\n    const ast = this._makeStyleAst(metadata, context);\n    this._validateStyleAst(ast, context);\n    return ast;\n  }\n\n  private _makeStyleAst(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext):\n      StyleAst {\n    const styles: (ɵStyleData|string)[] = [];\n    if (Array.isArray(metadata.styles)) {\n      (metadata.styles as (ɵStyleData | string)[]).forEach(styleTuple => {\n        if (typeof styleTuple == 'string') {\n          if (styleTuple == AUTO_STYLE) {\n            styles.push(styleTuple);\n          } else {\n            context.errors.push(`The provided style string value ${styleTuple} is not allowed.`);\n          }\n        } else {\n          styles.push(styleTuple);\n        }\n      });\n    } else {\n      styles.push(metadata.styles);\n    }\n\n    let containsDynamicStyles = false;\n    let collectedEasing: string|null = null;\n    styles.forEach(styleData => {\n      if (isObject(styleData)) {\n        const styleMap = styleData as ɵStyleData;\n        const easing = styleMap['easing'];\n        if (easing) {\n          collectedEasing = easing as string;\n          delete styleMap['easing'];\n        }\n        if (!containsDynamicStyles) {\n          for (let prop in styleMap) {\n            const value = styleMap[prop];\n            if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n              containsDynamicStyles = true;\n              break;\n            }\n          }\n        }\n      }\n    });\n\n    return {\n      type: AnimationMetadataType.Style,\n      styles,\n      easing: collectedEasing,\n      offset: metadata.offset,\n      containsDynamicStyles,\n      options: null\n    };\n  }\n\n  private _validateStyleAst(ast: StyleAst, context: AnimationAstBuilderContext): void {\n    const timings = context.currentAnimateTimings;\n    let endTime = context.currentTime;\n    let startTime = context.currentTime;\n    if (timings && startTime > 0) {\n      startTime -= timings.duration + timings.delay;\n    }\n\n    ast.styles.forEach(tuple => {\n      if (typeof tuple == 'string') return;\n\n      Object.keys(tuple).forEach(prop => {\n        if (!this._driver.validateStyleProperty(prop)) {\n          context.errors.push(`The provided animation property \"${\n              prop}\" is not a supported CSS property for animations`);\n          return;\n        }\n\n        const collectedStyles = context.collectedStyles[context.currentQuerySelector!];\n        const collectedEntry = collectedStyles[prop];\n        let updateCollectedStyle = true;\n        if (collectedEntry) {\n          if (startTime != endTime && startTime >= collectedEntry.startTime &&\n              endTime <= collectedEntry.endTime) {\n            context.errors.push(`The CSS property \"${prop}\" that exists between the times of \"${\n                collectedEntry.startTime}ms\" and \"${\n                collectedEntry\n                    .endTime}ms\" is also being animated in a parallel animation between the times of \"${\n                startTime}ms\" and \"${endTime}ms\"`);\n            updateCollectedStyle = false;\n          }\n\n          // we always choose the smaller start time value since we\n          // want to have a record of the entire animation window where\n          // the style property is being animated in between\n          startTime = collectedEntry.startTime;\n        }\n\n        if (updateCollectedStyle) {\n          collectedStyles[prop] = {startTime, endTime};\n        }\n\n        if (context.options) {\n          validateStyleParams(tuple[prop], context.options, context.errors);\n        }\n      });\n    });\n  }\n\n  visitKeyframes(metadata: AnimationKeyframesSequenceMetadata, context: AnimationAstBuilderContext):\n      KeyframesAst {\n    const ast: KeyframesAst = {type: AnimationMetadataType.Keyframes, styles: [], options: null};\n    if (!context.currentAnimateTimings) {\n      context.errors.push(`keyframes() must be placed inside of a call to animate()`);\n      return ast;\n    }\n\n    const MAX_KEYFRAME_OFFSET = 1;\n\n    let totalKeyframesWithOffsets = 0;\n    const offsets: number[] = [];\n    let offsetsOutOfOrder = false;\n    let keyframesOutOfRange = false;\n    let previousOffset: number = 0;\n\n    const keyframes: StyleAst[] = metadata.steps.map(styles => {\n      const style = this._makeStyleAst(styles, context);\n      let offsetVal: number|null =\n          style.offset != null ? style.offset : consumeOffset(style.styles);\n      let offset: number = 0;\n      if (offsetVal != null) {\n        totalKeyframesWithOffsets++;\n        offset = style.offset = offsetVal;\n      }\n      keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n      offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n      previousOffset = offset;\n      offsets.push(offset);\n      return style;\n    });\n\n    if (keyframesOutOfRange) {\n      context.errors.push(`Please ensure that all keyframe offsets are between 0 and 1`);\n    }\n\n    if (offsetsOutOfOrder) {\n      context.errors.push(`Please ensure that all keyframe offsets are in order`);\n    }\n\n    const length = metadata.steps.length;\n    let generatedOffset = 0;\n    if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n      context.errors.push(`Not all style() steps within the declared keyframes() contain offsets`);\n    } else if (totalKeyframesWithOffsets == 0) {\n      generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n    }\n\n    const limit = length - 1;\n    const currentTime = context.currentTime;\n    const currentAnimateTimings = context.currentAnimateTimings!;\n    const animateDuration = currentAnimateTimings.duration;\n    keyframes.forEach((kf, i) => {\n      const offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n      const durationUpToThisFrame = offset * animateDuration;\n      context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n      currentAnimateTimings.duration = durationUpToThisFrame;\n      this._validateStyleAst(kf, context);\n      kf.offset = offset;\n\n      ast.styles.push(kf);\n    });\n\n    return ast;\n  }\n\n  visitReference(metadata: AnimationReferenceMetadata, context: AnimationAstBuilderContext):\n      ReferenceAst {\n    return {\n      type: AnimationMetadataType.Reference,\n      animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimateChild(metadata: AnimationAnimateChildMetadata, context: AnimationAstBuilderContext):\n      AnimateChildAst {\n    context.depCount++;\n    return {\n      type: AnimationMetadataType.AnimateChild,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitAnimateRef(metadata: AnimationAnimateRefMetadata, context: AnimationAstBuilderContext):\n      AnimateRefAst {\n    return {\n      type: AnimationMetadataType.AnimateRef,\n      animation: this.visitReference(metadata.animation, context),\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitQuery(metadata: AnimationQueryMetadata, context: AnimationAstBuilderContext): QueryAst {\n    const parentSelector = context.currentQuerySelector!;\n    const options = (metadata.options || {}) as AnimationQueryOptions;\n\n    context.queryCount++;\n    context.currentQuery = metadata;\n    const [selector, includeSelf] = normalizeSelector(metadata.selector);\n    context.currentQuerySelector =\n        parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n    getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n\n    const animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n    context.currentQuery = null;\n    context.currentQuerySelector = parentSelector;\n\n    return {\n      type: AnimationMetadataType.Query,\n      selector,\n      limit: options.limit || 0,\n      optional: !!options.optional,\n      includeSelf,\n      animation,\n      originalSelector: metadata.selector,\n      options: normalizeAnimationOptions(metadata.options)\n    };\n  }\n\n  visitStagger(metadata: AnimationStaggerMetadata, context: AnimationAstBuilderContext):\n      StaggerAst {\n    if (!context.currentQuery) {\n      context.errors.push(`stagger() can only be used inside of query()`);\n    }\n    const timings = metadata.timings === 'full' ?\n        {duration: 0, delay: 0, easing: 'full'} :\n        resolveTiming(metadata.timings, context.errors, true);\n\n    return {\n      type: AnimationMetadataType.Stagger,\n      animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n      timings,\n      options: null\n    };\n  }\n}\n\nfunction normalizeSelector(selector: string): [string, boolean] {\n  const hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n  if (hasAmpersand) {\n    selector = selector.replace(SELF_TOKEN_REGEX, '');\n  }\n\n  // the :enter and :leave selectors are filled in at runtime during timeline building\n  selector = selector.replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n                 .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.substr(1))\n                 .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n\n  return [selector, hasAmpersand];\n}\n\n\nfunction normalizeParams(obj: {[key: string]: any}|any): {[key: string]: any}|null {\n  return obj ? copyObj(obj) : null;\n}\n\nexport type StyleTimeTuple = {\n  startTime: number; endTime: number;\n};\n\nexport class AnimationAstBuilderContext {\n  public queryCount: number = 0;\n  public depCount: number = 0;\n  public currentTransition: AnimationTransitionMetadata|null = null;\n  public currentQuery: AnimationQueryMetadata|null = null;\n  public currentQuerySelector: string|null = null;\n  public currentAnimateTimings: TimingAst|null = null;\n  public currentTime: number = 0;\n  public collectedStyles: {[selectorName: string]: {[propName: string]: StyleTimeTuple}} = {};\n  public options: AnimationOptions|null = null;\n  constructor(public errors: any[]) {}\n}\n\nfunction consumeOffset(styles: ɵStyleData|string|(ɵStyleData | string)[]): number|null {\n  if (typeof styles == 'string') return null;\n\n  let offset: number|null = null;\n\n  if (Array.isArray(styles)) {\n    styles.forEach(styleTuple => {\n      if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {\n        const obj = styleTuple as ɵStyleData;\n        offset = parseFloat(obj['offset'] as string);\n        delete obj['offset'];\n      }\n    });\n  } else if (isObject(styles) && styles.hasOwnProperty('offset')) {\n    const obj = styles;\n    offset = parseFloat(obj['offset'] as string);\n    delete obj['offset'];\n  }\n  return offset;\n}\n\nfunction isObject(value: any): boolean {\n  return !Array.isArray(value) && typeof value == 'object';\n}\n\nfunction constructTimingAst(value: string|number|AnimateTimings, errors: any[]) {\n  let timings: AnimateTimings|null = null;\n  if (value.hasOwnProperty('duration')) {\n    timings = value as AnimateTimings;\n  } else if (typeof value == 'number') {\n    const duration = resolveTiming(value, errors).duration;\n    return makeTimingAst(duration, 0, '');\n  }\n\n  const strValue = value as string;\n  const isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n  if (isDynamic) {\n    const ast = makeTimingAst(0, 0, '') as any;\n    ast.dynamic = true;\n    ast.strValue = strValue;\n    return ast as DynamicTimingAst;\n  }\n\n  timings = timings || resolveTiming(strValue, errors);\n  return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\n\nfunction normalizeAnimationOptions(options: AnimationOptions|null): AnimationOptions {\n  if (options) {\n    options = copyObj(options);\n    if (options['params']) {\n      options['params'] = normalizeParams(options['params'])!;\n    }\n  } else {\n    options = {};\n  }\n  return options;\n}\n\nfunction makeTimingAst(duration: number, delay: number, easing: string|null): TimingAst {\n  return {duration, delay, easing};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ɵStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\n\nexport interface AnimationTimelineInstruction extends AnimationEngineInstruction {\n  element: any;\n  keyframes: ɵStyleData[];\n  preStyleProps: string[];\n  postStyleProps: string[];\n  duration: number;\n  delay: number;\n  totalTime: number;\n  easing: string|null;\n  stretchStartingKeyframe?: boolean;\n  subTimeline: boolean;\n}\n\nexport function createTimelineInstruction(\n    element: any, keyframes: ɵStyleData[], preStyleProps: string[], postStyleProps: string[],\n    duration: number, delay: number, easing: string|null = null,\n    subTimeline: boolean = false): AnimationTimelineInstruction {\n  return {\n    type: AnimationTransitionInstructionType.TimelineAnimation,\n    element,\n    keyframes,\n    preStyleProps,\n    postStyleProps,\n    duration,\n    delay,\n    totalTime: duration + delay,\n    easing,\n    subTimeline\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport class ElementInstructionMap {\n  private _map = new Map<any, AnimationTimelineInstruction[]>();\n\n  consume(element: any): AnimationTimelineInstruction[] {\n    let instructions = this._map.get(element);\n    if (instructions) {\n      this._map.delete(element);\n    } else {\n      instructions = [];\n    }\n    return instructions;\n  }\n\n  append(element: any, instructions: AnimationTimelineInstruction[]) {\n    let existingInstructions = this._map.get(element);\n    if (!existingInstructions) {\n      this._map.set(element, existingInstructions = []);\n    }\n    existingInstructions.push(...instructions);\n  }\n\n  has(element: any): boolean {\n    return this._map.has(element);\n  }\n\n  clear() {\n    this._map.clear();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimateChildOptions, AnimateTimings, AnimationMetadataType, AnimationOptions, AnimationQueryOptions, AUTO_STYLE, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {copyObj, copyStyles, interpolateParams, iteratorToArray, resolveTiming, resolveTimingValue, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, AstVisitor, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationTimelineInstruction, createTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst ONE_FRAME_IN_MILLISECONDS = 1;\nconst ENTER_TOKEN = ':enter';\nconst ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst LEAVE_TOKEN = ':leave';\nconst LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\n\n/*\n * The code within this file aims to generate web-animations-compatible keyframes from Angular's\n * animation DSL code.\n *\n * The code below will be converted from:\n *\n * ```\n * sequence([\n *   style({ opacity: 0 }),\n *   animate(1000, style({ opacity: 0 }))\n * ])\n * ```\n *\n * To:\n * ```\n * keyframes = [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 1 }]\n * duration = 1000\n * delay = 0\n * easing = ''\n * ```\n *\n * For this operation to cover the combination of animation verbs (style, animate, group, etc...) a\n * combination of prototypical inheritance, AST traversal and merge-sort-like algorithms are used.\n *\n * [AST Traversal]\n * Each of the animation verbs, when executed, will return an string-map object representing what\n * type of action it is (style, animate, group, etc...) and the data associated with it. This means\n * that when functional composition mix of these functions is evaluated (like in the example above)\n * then it will end up producing a tree of objects representing the animation itself.\n *\n * When this animation object tree is processed by the visitor code below it will visit each of the\n * verb statements within the visitor. And during each visit it will build the context of the\n * animation keyframes by interacting with the `TimelineBuilder`.\n *\n * [TimelineBuilder]\n * This class is responsible for tracking the styles and building a series of keyframe objects for a\n * timeline between a start and end time. The builder starts off with an initial timeline and each\n * time the AST comes across a `group()`, `keyframes()` or a combination of the two wihtin a\n * `sequence()` then it will generate a sub timeline for each step as well as a new one after\n * they are complete.\n *\n * As the AST is traversed, the timing state on each of the timelines will be incremented. If a sub\n * timeline was created (based on one of the cases above) then the parent timeline will attempt to\n * merge the styles used within the sub timelines into itself (only with group() this will happen).\n * This happens with a merge operation (much like how the merge works in mergesort) and it will only\n * copy the most recently used styles from the sub timelines into the parent timeline. This ensures\n * that if the styles are used later on in another phase of the animation then they will be the most\n * up-to-date values.\n *\n * [How Missing Styles Are Updated]\n * Each timeline has a `backFill` property which is responsible for filling in new styles into\n * already processed keyframes if a new style shows up later within the animation sequence.\n *\n * ```\n * sequence([\n *   style({ width: 0 }),\n *   animate(1000, style({ width: 100 })),\n *   animate(1000, style({ width: 200 })),\n *   animate(1000, style({ width: 300 }))\n *   animate(1000, style({ width: 400, height: 400 })) // notice how `height` doesn't exist anywhere\n * else\n * ])\n * ```\n *\n * What is happening here is that the `height` value is added later in the sequence, but is missing\n * from all previous animation steps. Therefore when a keyframe is created it would also be missing\n * from all previous keyframes up until where it is first used. For the timeline keyframe generation\n * to properly fill in the style it will place the previous value (the value from the parent\n * timeline) or a default value of `*` into the backFill object. Given that each of the keyframe\n * styles are objects that prototypically inhert from the backFill object, this means that if a\n * value is added into the backFill then it will automatically propagate any missing values to all\n * keyframes. Therefore the missing `height` value will be properly filled into the already\n * processed keyframes.\n *\n * When a sub-timeline is created it will have its own backFill property. This is done so that\n * styles present within the sub-timeline do not accidentally seep into the previous/future timeline\n * keyframes\n *\n * (For prototypically-inherited contents to be detected a `for(i in obj)` loop must be used.)\n *\n * [Validation]\n * The code in this file is not responsible for validation. That functionality happens with within\n * the `AnimationValidatorVisitor` code.\n */\nexport function buildAnimationTimelines(\n    driver: AnimationDriver, rootElement: any, ast: Ast<AnimationMetadataType>,\n    enterClassName: string, leaveClassName: string, startingStyles: ɵStyleData = {},\n    finalStyles: ɵStyleData = {}, options: AnimationOptions,\n    subInstructions?: ElementInstructionMap, errors: any[] = []): AnimationTimelineInstruction[] {\n  return new AnimationTimelineBuilderVisitor().buildKeyframes(\n      driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles,\n      options, subInstructions, errors);\n}\n\nexport class AnimationTimelineBuilderVisitor implements AstVisitor {\n  buildKeyframes(\n      driver: AnimationDriver, rootElement: any, ast: Ast<AnimationMetadataType>,\n      enterClassName: string, leaveClassName: string, startingStyles: ɵStyleData,\n      finalStyles: ɵStyleData, options: AnimationOptions, subInstructions?: ElementInstructionMap,\n      errors: any[] = []): AnimationTimelineInstruction[] {\n    subInstructions = subInstructions || new ElementInstructionMap();\n    const context = new AnimationTimelineContext(\n        driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n    context.options = options;\n    context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n\n    visitDslNode(this, ast, context);\n\n    // this checks to see if an actual animation happened\n    const timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n    if (timelines.length && Object.keys(finalStyles).length) {\n      const tl = timelines[timelines.length - 1];\n      if (!tl.allowOnlyTimelineStyles()) {\n        tl.setStyles([finalStyles], null, context.errors, options);\n      }\n    }\n\n    return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) :\n                              [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n  }\n\n  visitTrigger(ast: TriggerAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitState(ast: StateAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitTransition(ast: TransitionAst, context: AnimationTimelineContext): any {\n    // these values are not visited in this AST\n  }\n\n  visitAnimateChild(ast: AnimateChildAst, context: AnimationTimelineContext): any {\n    const elementInstructions = context.subInstructions.consume(context.element);\n    if (elementInstructions) {\n      const innerContext = context.createSubContext(ast.options);\n      const startTime = context.currentTimeline.currentTime;\n      const endTime = this._visitSubInstructions(\n          elementInstructions, innerContext, innerContext.options as AnimateChildOptions);\n      if (startTime != endTime) {\n        // we do this on the upper context because we created a sub context for\n        // the sub child animations\n        context.transformIntoNewTimeline(endTime);\n      }\n    }\n    context.previousNode = ast;\n  }\n\n  visitAnimateRef(ast: AnimateRefAst, context: AnimationTimelineContext): any {\n    const innerContext = context.createSubContext(ast.options);\n    innerContext.transformIntoNewTimeline();\n    this.visitReference(ast.animation, innerContext);\n    context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n    context.previousNode = ast;\n  }\n\n  private _visitSubInstructions(\n      instructions: AnimationTimelineInstruction[], context: AnimationTimelineContext,\n      options: AnimateChildOptions): number {\n    const startTime = context.currentTimeline.currentTime;\n    let furthestTime = startTime;\n\n    // this is a special-case for when a user wants to skip a sub\n    // animation from being fired entirely.\n    const duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n    const delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n    if (duration !== 0) {\n      instructions.forEach(instruction => {\n        const instructionTimings =\n            context.appendInstructionToTimeline(instruction, duration, delay);\n        furthestTime =\n            Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n      });\n    }\n\n    return furthestTime;\n  }\n\n  visitReference(ast: ReferenceAst, context: AnimationTimelineContext) {\n    context.updateOptions(ast.options, true);\n    visitDslNode(this, ast.animation, context);\n    context.previousNode = ast;\n  }\n\n  visitSequence(ast: SequenceAst, context: AnimationTimelineContext) {\n    const subContextCount = context.subContextCount;\n    let ctx = context;\n    const options = ast.options;\n\n    if (options && (options.params || options.delay)) {\n      ctx = context.createSubContext(options);\n      ctx.transformIntoNewTimeline();\n\n      if (options.delay != null) {\n        if (ctx.previousNode.type == AnimationMetadataType.Style) {\n          ctx.currentTimeline.snapshotCurrentStyles();\n          ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n        }\n\n        const delay = resolveTimingValue(options.delay);\n        ctx.delayNextStep(delay);\n      }\n    }\n\n    if (ast.steps.length) {\n      ast.steps.forEach(s => visitDslNode(this, s, ctx));\n\n      // this is here just incase the inner steps only contain or end with a style() call\n      ctx.currentTimeline.applyStylesToKeyframe();\n\n      // this means that some animation function within the sequence\n      // ended up creating a sub timeline (which means the current\n      // timeline cannot overlap with the contents of the sequence)\n      if (ctx.subContextCount > subContextCount) {\n        ctx.transformIntoNewTimeline();\n      }\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitGroup(ast: GroupAst, context: AnimationTimelineContext) {\n    const innerTimelines: TimelineBuilder[] = [];\n    let furthestTime = context.currentTimeline.currentTime;\n    const delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n\n    ast.steps.forEach(s => {\n      const innerContext = context.createSubContext(ast.options);\n      if (delay) {\n        innerContext.delayNextStep(delay);\n      }\n\n      visitDslNode(this, s, innerContext);\n      furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n      innerTimelines.push(innerContext.currentTimeline);\n    });\n\n    // this operation is run after the AST loop because otherwise\n    // if the parent timeline's collected styles were updated then\n    // it would pass in invalid data into the new-to-be forked items\n    innerTimelines.forEach(\n        timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n    context.transformIntoNewTimeline(furthestTime);\n    context.previousNode = ast;\n  }\n\n  private _visitTiming(ast: TimingAst, context: AnimationTimelineContext): AnimateTimings {\n    if ((ast as DynamicTimingAst).dynamic) {\n      const strValue = (ast as DynamicTimingAst).strValue;\n      const timingValue =\n          context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n      return resolveTiming(timingValue, context.errors);\n    } else {\n      return {duration: ast.duration, delay: ast.delay, easing: ast.easing};\n    }\n  }\n\n  visitAnimate(ast: AnimateAst, context: AnimationTimelineContext) {\n    const timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n    const timeline = context.currentTimeline;\n    if (timings.delay) {\n      context.incrementTime(timings.delay);\n      timeline.snapshotCurrentStyles();\n    }\n\n    const style = ast.style;\n    if (style.type == AnimationMetadataType.Keyframes) {\n      this.visitKeyframes(style, context);\n    } else {\n      context.incrementTime(timings.duration);\n      this.visitStyle(style as StyleAst, context);\n      timeline.applyStylesToKeyframe();\n    }\n\n    context.currentAnimateTimings = null;\n    context.previousNode = ast;\n  }\n\n  visitStyle(ast: StyleAst, context: AnimationTimelineContext) {\n    const timeline = context.currentTimeline;\n    const timings = context.currentAnimateTimings!;\n\n    // this is a special case for when a style() call\n    // directly follows  an animate() call (but not inside of an animate() call)\n    if (!timings && timeline.getCurrentStyleProperties().length) {\n      timeline.forwardFrame();\n    }\n\n    const easing = (timings && timings.easing) || ast.easing;\n    if (ast.isEmptyStep) {\n      timeline.applyEmptyStep(easing);\n    } else {\n      timeline.setStyles(ast.styles, easing, context.errors, context.options);\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitKeyframes(ast: KeyframesAst, context: AnimationTimelineContext) {\n    const currentAnimateTimings = context.currentAnimateTimings!;\n    const startTime = (context.currentTimeline!).duration;\n    const duration = currentAnimateTimings.duration;\n    const innerContext = context.createSubContext();\n    const innerTimeline = innerContext.currentTimeline;\n    innerTimeline.easing = currentAnimateTimings.easing;\n\n    ast.styles.forEach(step => {\n      const offset: number = step.offset || 0;\n      innerTimeline.forwardTime(offset * duration);\n      innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n      innerTimeline.applyStylesToKeyframe();\n    });\n\n    // this will ensure that the parent timeline gets all the styles from\n    // the child even if the new timeline below is not used\n    context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n\n    // we do this because the window between this timeline and the sub timeline\n    // should ensure that the styles within are exactly the same as they were before\n    context.transformIntoNewTimeline(startTime + duration);\n    context.previousNode = ast;\n  }\n\n  visitQuery(ast: QueryAst, context: AnimationTimelineContext) {\n    // in the event that the first step before this is a style step we need\n    // to ensure the styles are applied before the children are animated\n    const startTime = context.currentTimeline.currentTime;\n    const options = (ast.options || {}) as AnimationQueryOptions;\n    const delay = options.delay ? resolveTimingValue(options.delay) : 0;\n\n    if (delay &&\n        (context.previousNode.type === AnimationMetadataType.Style ||\n         (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {\n      context.currentTimeline.snapshotCurrentStyles();\n      context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n    }\n\n    let furthestTime = startTime;\n    const elms = context.invokeQuery(\n        ast.selector, ast.originalSelector, ast.limit, ast.includeSelf,\n        options.optional ? true : false, context.errors);\n\n    context.currentQueryTotal = elms.length;\n    let sameElementTimeline: TimelineBuilder|null = null;\n    elms.forEach((element, i) => {\n      context.currentQueryIndex = i;\n      const innerContext = context.createSubContext(ast.options, element);\n      if (delay) {\n        innerContext.delayNextStep(delay);\n      }\n\n      if (element === context.element) {\n        sameElementTimeline = innerContext.currentTimeline;\n      }\n\n      visitDslNode(this, ast.animation, innerContext);\n\n      // this is here just incase the inner steps only contain or end\n      // with a style() call (which is here to signal that this is a preparatory\n      // call to style an element before it is animated again)\n      innerContext.currentTimeline.applyStylesToKeyframe();\n\n      const endTime = innerContext.currentTimeline.currentTime;\n      furthestTime = Math.max(furthestTime, endTime);\n    });\n\n    context.currentQueryIndex = 0;\n    context.currentQueryTotal = 0;\n    context.transformIntoNewTimeline(furthestTime);\n\n    if (sameElementTimeline) {\n      context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n      context.currentTimeline.snapshotCurrentStyles();\n    }\n\n    context.previousNode = ast;\n  }\n\n  visitStagger(ast: StaggerAst, context: AnimationTimelineContext) {\n    const parentContext = context.parentContext!;\n    const tl = context.currentTimeline;\n    const timings = ast.timings;\n    const duration = Math.abs(timings.duration);\n    const maxTime = duration * (context.currentQueryTotal - 1);\n    let delay = duration * context.currentQueryIndex;\n\n    let staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n    switch (staggerTransformer) {\n      case 'reverse':\n        delay = maxTime - delay;\n        break;\n      case 'full':\n        delay = parentContext.currentStaggerTime;\n        break;\n    }\n\n    const timeline = context.currentTimeline;\n    if (delay) {\n      timeline.delayNextStep(delay);\n    }\n\n    const startingTime = timeline.currentTime;\n    visitDslNode(this, ast.animation, context);\n    context.previousNode = ast;\n\n    // time = duration + delay\n    // the reason why this computation is so complex is because\n    // the inner timeline may either have a delay value or a stretched\n    // keyframe depending on if a subtimeline is not used or is used.\n    parentContext.currentStaggerTime =\n        (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n  }\n}\n\nexport declare type StyleAtTime = {\n  time: number; value: string | number;\n};\n\nconst DEFAULT_NOOP_PREVIOUS_NODE = <Ast<AnimationMetadataType>>{};\nexport class AnimationTimelineContext {\n  public parentContext: AnimationTimelineContext|null = null;\n  public currentTimeline: TimelineBuilder;\n  public currentAnimateTimings: AnimateTimings|null = null;\n  public previousNode: Ast<AnimationMetadataType> = DEFAULT_NOOP_PREVIOUS_NODE;\n  public subContextCount = 0;\n  public options: AnimationOptions = {};\n  public currentQueryIndex: number = 0;\n  public currentQueryTotal: number = 0;\n  public currentStaggerTime: number = 0;\n\n  constructor(\n      private _driver: AnimationDriver, public element: any,\n      public subInstructions: ElementInstructionMap, private _enterClassName: string,\n      private _leaveClassName: string, public errors: any[], public timelines: TimelineBuilder[],\n      initialTimeline?: TimelineBuilder) {\n    this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n    timelines.push(this.currentTimeline);\n  }\n\n  get params() {\n    return this.options.params;\n  }\n\n  updateOptions(options: AnimationOptions|null, skipIfExists?: boolean) {\n    if (!options) return;\n\n    const newOptions = options as any;\n    let optionsToUpdate = this.options;\n\n    // NOTE: this will get patched up when other animation methods support duration overrides\n    if (newOptions.duration != null) {\n      (optionsToUpdate as any).duration = resolveTimingValue(newOptions.duration);\n    }\n\n    if (newOptions.delay != null) {\n      optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n    }\n\n    const newParams = newOptions.params;\n    if (newParams) {\n      let paramsToUpdate: {[name: string]: any} = optionsToUpdate.params!;\n      if (!paramsToUpdate) {\n        paramsToUpdate = this.options.params = {};\n      }\n\n      Object.keys(newParams).forEach(name => {\n        if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n          paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n        }\n      });\n    }\n  }\n\n  private _copyOptions() {\n    const options: AnimationOptions = {};\n    if (this.options) {\n      const oldParams = this.options.params;\n      if (oldParams) {\n        const params: {[name: string]: any} = options['params'] = {};\n        Object.keys(oldParams).forEach(name => {\n          params[name] = oldParams[name];\n        });\n      }\n    }\n    return options;\n  }\n\n  createSubContext(options: AnimationOptions|null = null, element?: any, newTime?: number):\n      AnimationTimelineContext {\n    const target = element || this.element;\n    const context = new AnimationTimelineContext(\n        this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName,\n        this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n    context.previousNode = this.previousNode;\n    context.currentAnimateTimings = this.currentAnimateTimings;\n\n    context.options = this._copyOptions();\n    context.updateOptions(options);\n\n    context.currentQueryIndex = this.currentQueryIndex;\n    context.currentQueryTotal = this.currentQueryTotal;\n    context.parentContext = this;\n    this.subContextCount++;\n    return context;\n  }\n\n  transformIntoNewTimeline(newTime?: number) {\n    this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n    this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n    this.timelines.push(this.currentTimeline);\n    return this.currentTimeline;\n  }\n\n  appendInstructionToTimeline(\n      instruction: AnimationTimelineInstruction, duration: number|null,\n      delay: number|null): AnimateTimings {\n    const updatedTimings: AnimateTimings = {\n      duration: duration != null ? duration : instruction.duration,\n      delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n      easing: ''\n    };\n    const builder = new SubTimelineBuilder(\n        this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps,\n        instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n    this.timelines.push(builder);\n    return updatedTimings;\n  }\n\n  incrementTime(time: number) {\n    this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n  }\n\n  delayNextStep(delay: number) {\n    // negative delays are not yet supported\n    if (delay > 0) {\n      this.currentTimeline.delayNextStep(delay);\n    }\n  }\n\n  invokeQuery(\n      selector: string, originalSelector: string, limit: number, includeSelf: boolean,\n      optional: boolean, errors: any[]): any[] {\n    let results: any[] = [];\n    if (includeSelf) {\n      results.push(this.element);\n    }\n    if (selector.length > 0) {  // if :self is only used then the selector is empty\n      selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);\n      selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);\n      const multi = limit != 1;\n      let elements = this._driver.query(this.element, selector, multi);\n      if (limit !== 0) {\n        elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :\n                               elements.slice(0, limit);\n      }\n      results.push(...elements);\n    }\n\n    if (!optional && results.length == 0) {\n      errors.push(`\\`query(\"${originalSelector}\")\\` returned zero elements. (Use \\`query(\"${\n          originalSelector}\", { optional: true })\\` if you wish to allow this.)`);\n    }\n    return results;\n  }\n}\n\n\nexport class TimelineBuilder {\n  public duration: number = 0;\n  // TODO(issue/24571): remove '!'.\n  public easing!: string|null;\n  private _previousKeyframe: ɵStyleData = {};\n  private _currentKeyframe: ɵStyleData = {};\n  private _keyframes = new Map<number, ɵStyleData>();\n  private _styleSummary: {[prop: string]: StyleAtTime} = {};\n  private _localTimelineStyles: ɵStyleData;\n  private _globalTimelineStyles: ɵStyleData;\n  private _pendingStyles: ɵStyleData = {};\n  private _backFill: ɵStyleData = {};\n  private _currentEmptyStepKeyframe: ɵStyleData|null = null;\n\n  constructor(\n      private _driver: AnimationDriver, public element: any, public startTime: number,\n      private _elementTimelineStylesLookup?: Map<any, ɵStyleData>) {\n    if (!this._elementTimelineStylesLookup) {\n      this._elementTimelineStylesLookup = new Map<any, ɵStyleData>();\n    }\n\n    this._localTimelineStyles = Object.create(this._backFill, {});\n    this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element)!;\n    if (!this._globalTimelineStyles) {\n      this._globalTimelineStyles = this._localTimelineStyles;\n      this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n    }\n    this._loadKeyframe();\n  }\n\n  containsAnimation(): boolean {\n    switch (this._keyframes.size) {\n      case 0:\n        return false;\n      case 1:\n        return this.getCurrentStyleProperties().length > 0;\n      default:\n        return true;\n    }\n  }\n\n  getCurrentStyleProperties(): string[] {\n    return Object.keys(this._currentKeyframe);\n  }\n\n  get currentTime() {\n    return this.startTime + this.duration;\n  }\n\n  delayNextStep(delay: number) {\n    // in the event that a style() step is placed right before a stagger()\n    // and that style() step is the very first style() value in the animation\n    // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n    // properly applies the style() values to work with the stagger...\n    const hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n\n    if (this.duration || hasPreStyleStep) {\n      this.forwardTime(this.currentTime + delay);\n      if (hasPreStyleStep) {\n        this.snapshotCurrentStyles();\n      }\n    } else {\n      this.startTime += delay;\n    }\n  }\n\n  fork(element: any, currentTime?: number): TimelineBuilder {\n    this.applyStylesToKeyframe();\n    return new TimelineBuilder(\n        this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n  }\n\n  private _loadKeyframe() {\n    if (this._currentKeyframe) {\n      this._previousKeyframe = this._currentKeyframe;\n    }\n    this._currentKeyframe = this._keyframes.get(this.duration)!;\n    if (!this._currentKeyframe) {\n      this._currentKeyframe = Object.create(this._backFill, {});\n      this._keyframes.set(this.duration, this._currentKeyframe);\n    }\n  }\n\n  forwardFrame() {\n    this.duration += ONE_FRAME_IN_MILLISECONDS;\n    this._loadKeyframe();\n  }\n\n  forwardTime(time: number) {\n    this.applyStylesToKeyframe();\n    this.duration = time;\n    this._loadKeyframe();\n  }\n\n  private _updateStyle(prop: string, value: string|number) {\n    this._localTimelineStyles[prop] = value;\n    this._globalTimelineStyles[prop] = value;\n    this._styleSummary[prop] = {time: this.currentTime, value};\n  }\n\n  allowOnlyTimelineStyles() {\n    return this._currentEmptyStepKeyframe !== this._currentKeyframe;\n  }\n\n  applyEmptyStep(easing: string|null) {\n    if (easing) {\n      this._previousKeyframe['easing'] = easing;\n    }\n\n    // special case for animate(duration):\n    // all missing styles are filled with a `*` value then\n    // if any destination styles are filled in later on the same\n    // keyframe then they will override the overridden styles\n    // We use `_globalTimelineStyles` here because there may be\n    // styles in previous keyframes that are not present in this timeline\n    Object.keys(this._globalTimelineStyles).forEach(prop => {\n      this._backFill[prop] = this._globalTimelineStyles[prop] || AUTO_STYLE;\n      this._currentKeyframe[prop] = AUTO_STYLE;\n    });\n    this._currentEmptyStepKeyframe = this._currentKeyframe;\n  }\n\n  setStyles(\n      input: (ɵStyleData|string)[], easing: string|null, errors: any[],\n      options?: AnimationOptions) {\n    if (easing) {\n      this._previousKeyframe['easing'] = easing;\n    }\n\n    const params = (options && options.params) || {};\n    const styles = flattenStyles(input, this._globalTimelineStyles);\n    Object.keys(styles).forEach(prop => {\n      const val = interpolateParams(styles[prop], params, errors);\n      this._pendingStyles[prop] = val;\n      if (!this._localTimelineStyles.hasOwnProperty(prop)) {\n        this._backFill[prop] = this._globalTimelineStyles.hasOwnProperty(prop) ?\n            this._globalTimelineStyles[prop] :\n            AUTO_STYLE;\n      }\n      this._updateStyle(prop, val);\n    });\n  }\n\n  applyStylesToKeyframe() {\n    const styles = this._pendingStyles;\n    const props = Object.keys(styles);\n    if (props.length == 0) return;\n\n    this._pendingStyles = {};\n\n    props.forEach(prop => {\n      const val = styles[prop];\n      this._currentKeyframe[prop] = val;\n    });\n\n    Object.keys(this._localTimelineStyles).forEach(prop => {\n      if (!this._currentKeyframe.hasOwnProperty(prop)) {\n        this._currentKeyframe[prop] = this._localTimelineStyles[prop];\n      }\n    });\n  }\n\n  snapshotCurrentStyles() {\n    Object.keys(this._localTimelineStyles).forEach(prop => {\n      const val = this._localTimelineStyles[prop];\n      this._pendingStyles[prop] = val;\n      this._updateStyle(prop, val);\n    });\n  }\n\n  getFinalKeyframe() {\n    return this._keyframes.get(this.duration);\n  }\n\n  get properties() {\n    const properties: string[] = [];\n    for (let prop in this._currentKeyframe) {\n      properties.push(prop);\n    }\n    return properties;\n  }\n\n  mergeTimelineCollectedStyles(timeline: TimelineBuilder) {\n    Object.keys(timeline._styleSummary).forEach(prop => {\n      const details0 = this._styleSummary[prop];\n      const details1 = timeline._styleSummary[prop];\n      if (!details0 || details1.time > details0.time) {\n        this._updateStyle(prop, details1.value);\n      }\n    });\n  }\n\n  buildKeyframes(): AnimationTimelineInstruction {\n    this.applyStylesToKeyframe();\n    const preStyleProps = new Set<string>();\n    const postStyleProps = new Set<string>();\n    const isEmpty = this._keyframes.size === 1 && this.duration === 0;\n\n    let finalKeyframes: ɵStyleData[] = [];\n    this._keyframes.forEach((keyframe, time) => {\n      const finalKeyframe = copyStyles(keyframe, true);\n      Object.keys(finalKeyframe).forEach(prop => {\n        const value = finalKeyframe[prop];\n        if (value == PRE_STYLE) {\n          preStyleProps.add(prop);\n        } else if (value == AUTO_STYLE) {\n          postStyleProps.add(prop);\n        }\n      });\n      if (!isEmpty) {\n        finalKeyframe['offset'] = time / this.duration;\n      }\n      finalKeyframes.push(finalKeyframe);\n    });\n\n    const preProps: string[] = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n    const postProps: string[] = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n\n    // special case for a 0-second animation (which is designed just to place styles onscreen)\n    if (isEmpty) {\n      const kf0 = finalKeyframes[0];\n      const kf1 = copyObj(kf0);\n      kf0['offset'] = 0;\n      kf1['offset'] = 1;\n      finalKeyframes = [kf0, kf1];\n    }\n\n    return createTimelineInstruction(\n        this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime,\n        this.easing, false);\n  }\n}\n\nclass SubTimelineBuilder extends TimelineBuilder {\n  public timings: AnimateTimings;\n\n  constructor(\n      driver: AnimationDriver, public element: any, public keyframes: ɵStyleData[],\n      public preStyleProps: string[], public postStyleProps: string[], timings: AnimateTimings,\n      private _stretchStartingKeyframe: boolean = false) {\n    super(driver, element, timings.delay);\n    this.timings = {duration: timings.duration, delay: timings.delay, easing: timings.easing};\n  }\n\n  containsAnimation(): boolean {\n    return this.keyframes.length > 1;\n  }\n\n  buildKeyframes(): AnimationTimelineInstruction {\n    let keyframes = this.keyframes;\n    let {delay, duration, easing} = this.timings;\n    if (this._stretchStartingKeyframe && delay) {\n      const newKeyframes: ɵStyleData[] = [];\n      const totalTime = duration + delay;\n      const startingGap = delay / totalTime;\n\n      // the original starting keyframe now starts once the delay is done\n      const newFirstKeyframe = copyStyles(keyframes[0], false);\n      newFirstKeyframe['offset'] = 0;\n      newKeyframes.push(newFirstKeyframe);\n\n      const oldFirstKeyframe = copyStyles(keyframes[0], false);\n      oldFirstKeyframe['offset'] = roundOffset(startingGap);\n      newKeyframes.push(oldFirstKeyframe);\n\n      /*\n        When the keyframe is stretched then it means that the delay before the animation\n        starts is gone. Instead the first keyframe is placed at the start of the animation\n        and it is then copied to where it starts when the original delay is over. This basically\n        means nothing animates during that delay, but the styles are still renderered. For this\n        to work the original offset values that exist in the original keyframes must be \"warped\"\n        so that they can take the new keyframe + delay into account.\n\n        delay=1000, duration=1000, keyframes = 0 .5 1\n\n        turns into\n\n        delay=0, duration=2000, keyframes = 0 .33 .66 1\n       */\n\n      // offsets between 1 ... n -1 are all warped by the keyframe stretch\n      const limit = keyframes.length - 1;\n      for (let i = 1; i <= limit; i++) {\n        let kf = copyStyles(keyframes[i], false);\n        const oldOffset = kf['offset'] as number;\n        const timeAtKeyframe = delay + oldOffset * duration;\n        kf['offset'] = roundOffset(timeAtKeyframe / totalTime);\n        newKeyframes.push(kf);\n      }\n\n      // the new starting keyframe should be added at the start\n      duration = totalTime;\n      delay = 0;\n      easing = '';\n\n      keyframes = newKeyframes;\n    }\n\n    return createTimelineInstruction(\n        this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing,\n        true);\n  }\n}\n\nfunction roundOffset(offset: number, decimalPoints = 3): number {\n  const mult = Math.pow(10, decimalPoints - 1);\n  return Math.round(offset * mult) / mult;\n}\n\nfunction flattenStyles(input: (ɵStyleData|string)[], allStyles: ɵStyleData) {\n  const styles: ɵStyleData = {};\n  let allProperties: string[];\n  input.forEach(token => {\n    if (token === '*') {\n      allProperties = allProperties || Object.keys(allStyles);\n      allProperties.forEach(prop => {\n        styles[prop] = AUTO_STYLE;\n      });\n    } else {\n      copyStyles(token as ɵStyleData, false, styles);\n    }\n  });\n  return styles;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationMetadataType, AnimationOptions, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME, normalizeStyles} from '../util';\n\nimport {Ast} from './animation_ast';\nimport {buildAnimationAst} from './animation_ast_builder';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nexport class Animation {\n  private _animationAst: Ast<AnimationMetadataType>;\n  constructor(private _driver: AnimationDriver, input: AnimationMetadata|AnimationMetadata[]) {\n    const errors: any[] = [];\n    const ast = buildAnimationAst(_driver, input, errors);\n    if (errors.length) {\n      const errorMessage = `animation validation failed:\\n${errors.join('\\n')}`;\n      throw new Error(errorMessage);\n    }\n    this._animationAst = ast;\n  }\n\n  buildTimelines(\n      element: any, startingStyles: ɵStyleData|ɵStyleData[],\n      destinationStyles: ɵStyleData|ɵStyleData[], options: AnimationOptions,\n      subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[] {\n    const start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n                                                  <ɵStyleData>startingStyles;\n    const dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n                                                    <ɵStyleData>destinationStyles;\n    const errors: any = [];\n    subInstructions = subInstructions || new ElementInstructionMap();\n    const result = buildAnimationTimelines(\n        this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest,\n        options, subInstructions, errors);\n    if (errors.length) {\n      const errorMessage = `animation building failed:\\n${errors.join('\\n')}`;\n      throw new Error(errorMessage);\n    }\n    return result;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @publicApi\n */\nexport abstract class AnimationStyleNormalizer {\n  abstract normalizePropertyName(propertyName: string, errors: string[]): string;\n  abstract normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string;\n}\n\n/**\n * @publicApi\n */\nexport class NoopAnimationStyleNormalizer {\n  normalizePropertyName(propertyName: string, errors: string[]): string {\n    return propertyName;\n  }\n\n  normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string {\n    return <any>value;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {dashCaseToCamelCase} from '../../util';\n\nimport {AnimationStyleNormalizer} from './animation_style_normalizer';\n\nexport class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n  normalizePropertyName(propertyName: string, errors: string[]): string {\n    return dashCaseToCamelCase(propertyName);\n  }\n\n  normalizeStyleValue(\n      userProvidedProperty: string, normalizedProperty: string, value: string|number,\n      errors: string[]): string {\n    let unit: string = '';\n    const strVal = value.toString().trim();\n\n    if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {\n      if (typeof value === 'number') {\n        unit = 'px';\n      } else {\n        const valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n        if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n          errors.push(`Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n        }\n      }\n    }\n    return strVal + unit;\n  }\n}\n\nconst DIMENSIONAL_PROP_MAP =\n    (() => makeBooleanMap(\n         'width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective'\n             .split(',')))();\n\nfunction makeBooleanMap(keys: string[]): {[key: string]: boolean} {\n  const map: {[key: string]: boolean} = {};\n  keys.forEach(key => map[key] = true);\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {ɵStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport interface AnimationTransitionInstruction extends AnimationEngineInstruction {\n  element: any;\n  triggerName: string;\n  isRemovalTransition: boolean;\n  fromState: string;\n  fromStyles: ɵStyleData;\n  toState: string;\n  toStyles: ɵStyleData;\n  timelines: AnimationTimelineInstruction[];\n  queriedElements: any[];\n  preStyleProps: Map<any, {[prop: string]: boolean}>;\n  postStyleProps: Map<any, {[prop: string]: boolean}>;\n  totalTime: number;\n  errors?: any[];\n}\n\nexport function createTransitionInstruction(\n    element: any, triggerName: string, fromState: string, toState: string,\n    isRemovalTransition: boolean, fromStyles: ɵStyleData, toStyles: ɵStyleData,\n    timelines: AnimationTimelineInstruction[], queriedElements: any[],\n    preStyleProps: Map<any, {[prop: string]: boolean}>,\n    postStyleProps: Map<any, {[prop: string]: boolean}>, totalTime: number,\n    errors?: any[]): AnimationTransitionInstruction {\n  return {\n    type: AnimationTransitionInstructionType.TransitionAnimation,\n    element,\n    triggerName,\n    isRemovalTransition,\n    fromState,\n    fromStyles,\n    toState,\n    toStyles,\n    timelines,\n    queriedElements,\n    preStyleProps,\n    postStyleProps,\n    totalTime,\n    errors\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationOptions, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetAsInMap} from '../render/shared';\nimport {copyObj, interpolateParams, iteratorToArray, mergeAnimationOptions} from '../util';\n\nimport {StyleAst, TransitionAst} from './animation_ast';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {TransitionMatcherFn} from './animation_transition_expr';\nimport {AnimationTransitionInstruction, createTransitionInstruction} from './animation_transition_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst EMPTY_OBJECT = {};\n\nexport class AnimationTransitionFactory {\n  constructor(\n      private _triggerName: string, public ast: TransitionAst,\n      private _stateStyles: {[stateName: string]: AnimationStateStyles}) {}\n\n  match(currentState: any, nextState: any, element: any, params: {[key: string]: any}): boolean {\n    return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n  }\n\n  buildStyles(stateName: string, params: {[key: string]: any}, errors: any[]) {\n    const backupStateStyler = this._stateStyles['*'];\n    const stateStyler = this._stateStyles[stateName];\n    const backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};\n    return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;\n  }\n\n  build(\n      driver: AnimationDriver, element: any, currentState: any, nextState: any,\n      enterClassName: string, leaveClassName: string, currentOptions?: AnimationOptions,\n      nextOptions?: AnimationOptions, subInstructions?: ElementInstructionMap,\n      skipAstBuild?: boolean): AnimationTransitionInstruction {\n    const errors: any[] = [];\n\n    const transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n    const currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n    const currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n    const nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n    const nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n\n    const queriedElements = new Set<any>();\n    const preStyleMap = new Map<any, {[prop: string]: boolean}>();\n    const postStyleMap = new Map<any, {[prop: string]: boolean}>();\n    const isRemoval = nextState === 'void';\n\n    const animationOptions = {params: {...transitionAnimationParams, ...nextAnimationParams}};\n\n    const timelines = skipAstBuild ?\n        [] :\n        buildAnimationTimelines(\n            driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles,\n            nextStateStyles, animationOptions, subInstructions, errors);\n\n    let totalTime = 0;\n    timelines.forEach(tl => {\n      totalTime = Math.max(tl.duration + tl.delay, totalTime);\n    });\n\n    if (errors.length) {\n      return createTransitionInstruction(\n          element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n          nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n    }\n\n    timelines.forEach(tl => {\n      const elm = tl.element;\n      const preProps = getOrSetAsInMap(preStyleMap, elm, {});\n      tl.preStyleProps.forEach(prop => preProps[prop] = true);\n\n      const postProps = getOrSetAsInMap(postStyleMap, elm, {});\n      tl.postStyleProps.forEach(prop => postProps[prop] = true);\n\n      if (elm !== element) {\n        queriedElements.add(elm);\n      }\n    });\n\n    const queriedElementsList = iteratorToArray(queriedElements.values());\n    return createTransitionInstruction(\n        element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n        nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n  }\n}\n\nfunction oneOrMoreTransitionsMatch(\n    matchFns: TransitionMatcherFn[], currentState: any, nextState: any, element: any,\n    params: {[key: string]: any}): boolean {\n  return matchFns.some(fn => fn(currentState, nextState, element, params));\n}\n\nexport class AnimationStateStyles {\n  constructor(private styles: StyleAst, private defaultParams: {[key: string]: any}) {}\n\n  buildStyles(params: {[key: string]: any}, errors: string[]): ɵStyleData {\n    const finalStyles: ɵStyleData = {};\n    const combinedParams = copyObj(this.defaultParams);\n    Object.keys(params).forEach(key => {\n      const value = params[key];\n      if (value != null) {\n        combinedParams[key] = value;\n      }\n    });\n    this.styles.styles.forEach(value => {\n      if (typeof value !== 'string') {\n        const styleObj = value as any;\n        Object.keys(styleObj).forEach(prop => {\n          let val = styleObj[prop];\n          if (val.length > 1) {\n            val = interpolateParams(val, combinedParams, errors);\n          }\n          finalStyles[prop] = val;\n        });\n      }\n    });\n    return finalStyles;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadataType, ɵStyleData} from '@angular/animations';\n\nimport {copyStyles, interpolateParams} from '../util';\n\nimport {SequenceAst, StyleAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationStateStyles, AnimationTransitionFactory} from './animation_transition_factory';\n\n\n\n/**\n * @publicApi\n */\nexport function buildTrigger(name: string, ast: TriggerAst): AnimationTrigger {\n  return new AnimationTrigger(name, ast);\n}\n\n/**\n * @publicApi\n */\nexport class AnimationTrigger {\n  public transitionFactories: AnimationTransitionFactory[] = [];\n  public fallbackTransition: AnimationTransitionFactory;\n  public states: {[stateName: string]: AnimationStateStyles} = {};\n\n  constructor(public name: string, public ast: TriggerAst) {\n    ast.states.forEach(ast => {\n      const defaultParams = (ast.options && ast.options.params) || {};\n      this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);\n    });\n\n    balanceProperties(this.states, 'true', '1');\n    balanceProperties(this.states, 'false', '0');\n\n    ast.transitions.forEach(ast => {\n      this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n    });\n\n    this.fallbackTransition = createFallbackTransition(name, this.states);\n  }\n\n  get containsQueries() {\n    return this.ast.queryCount > 0;\n  }\n\n  matchTransition(currentState: any, nextState: any, element: any, params: {[key: string]: any}):\n      AnimationTransitionFactory|null {\n    const entry =\n        this.transitionFactories.find(f => f.match(currentState, nextState, element, params));\n    return entry || null;\n  }\n\n  matchStyles(currentState: any, params: {[key: string]: any}, errors: any[]): ɵStyleData {\n    return this.fallbackTransition.buildStyles(currentState, params, errors);\n  }\n}\n\nfunction createFallbackTransition(\n    triggerName: string,\n    states: {[stateName: string]: AnimationStateStyles}): AnimationTransitionFactory {\n  const matchers = [(fromState: any, toState: any) => true];\n  const animation: SequenceAst = {type: AnimationMetadataType.Sequence, steps: [], options: null};\n  const transition: TransitionAst = {\n    type: AnimationMetadataType.Transition,\n    animation,\n    matchers,\n    options: null,\n    queryCount: 0,\n    depCount: 0\n  };\n  return new AnimationTransitionFactory(triggerName, transition, states);\n}\n\nfunction balanceProperties(obj: {[key: string]: any}, key1: string, key2: string) {\n  if (obj.hasOwnProperty(key1)) {\n    if (!obj.hasOwnProperty(key2)) {\n      obj[key2] = obj[key1];\n    }\n  } else if (obj.hasOwnProperty(key2)) {\n    obj[key1] = obj[key2];\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationPlayer, AUTO_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {Ast} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {buildAnimationTimelines} from '../dsl/animation_timeline_builder';\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\n\nexport class TimelineAnimationEngine {\n  private _animations: {[id: string]: Ast<AnimationMetadataType>} = {};\n  private _playersById: {[id: string]: AnimationPlayer} = {};\n  public players: AnimationPlayer[] = [];\n\n  constructor(\n      public bodyNode: any, private _driver: AnimationDriver,\n      private _normalizer: AnimationStyleNormalizer) {}\n\n  register(id: string, metadata: AnimationMetadata|AnimationMetadata[]) {\n    const errors: any[] = [];\n    const ast = buildAnimationAst(this._driver, metadata, errors);\n    if (errors.length) {\n      throw new Error(\n          `Unable to build the animation due to the following errors: ${errors.join('\\n')}`);\n    } else {\n      this._animations[id] = ast;\n    }\n  }\n\n  private _buildPlayer(\n      i: AnimationTimelineInstruction, preStyles: ɵStyleData,\n      postStyles?: ɵStyleData): AnimationPlayer {\n    const element = i.element;\n    const keyframes = normalizeKeyframes(\n        this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n    return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, [], true);\n  }\n\n  create(id: string, element: any, options: AnimationOptions = {}): AnimationPlayer {\n    const errors: any[] = [];\n    const ast = this._animations[id];\n    let instructions: AnimationTimelineInstruction[];\n\n    const autoStylesMap = new Map<any, ɵStyleData>();\n\n    if (ast) {\n      instructions = buildAnimationTimelines(\n          this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options,\n          EMPTY_INSTRUCTION_MAP, errors);\n      instructions.forEach(inst => {\n        const styles = getOrSetAsInMap(autoStylesMap, inst.element, {});\n        inst.postStyleProps.forEach(prop => styles[prop] = null);\n      });\n    } else {\n      errors.push('The requested animation doesn\\'t exist or has already been destroyed');\n      instructions = [];\n    }\n\n    if (errors.length) {\n      throw new Error(\n          `Unable to create the animation due to the following errors: ${errors.join('\\n')}`);\n    }\n\n    autoStylesMap.forEach((styles, element) => {\n      Object.keys(styles).forEach(prop => {\n        styles[prop] = this._driver.computeStyle(element, prop, AUTO_STYLE);\n      });\n    });\n\n    const players = instructions.map(i => {\n      const styles = autoStylesMap.get(i.element);\n      return this._buildPlayer(i, {}, styles);\n    });\n    const player = optimizeGroupPlayer(players);\n    this._playersById[id] = player;\n    player.onDestroy(() => this.destroy(id));\n\n    this.players.push(player);\n    return player;\n  }\n\n  destroy(id: string) {\n    const player = this._getPlayer(id);\n    player.destroy();\n    delete this._playersById[id];\n    const index = this.players.indexOf(player);\n    if (index >= 0) {\n      this.players.splice(index, 1);\n    }\n  }\n\n  private _getPlayer(id: string): AnimationPlayer {\n    const player = this._playersById[id];\n    if (!player) {\n      throw new Error(`Unable to find the timeline player referenced by ${id}`);\n    }\n    return player;\n  }\n\n  listen(id: string, element: string, eventName: string, callback: (event: any) => any):\n      () => void {\n    // triggerName, fromState, toState are all ignored for timeline animations\n    const baseEvent = makeAnimationEvent(element, '', '', '');\n    listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n    return () => {};\n  }\n\n  command(id: string, element: any, command: string, args: any[]): void {\n    if (command == 'register') {\n      this.register(id, args[0] as AnimationMetadata | AnimationMetadata[]);\n      return;\n    }\n\n    if (command == 'create') {\n      const options = (args[0] || {}) as AnimationOptions;\n      this.create(id, element, options);\n      return;\n    }\n\n    const player = this._getPlayer(id);\n    switch (command) {\n      case 'play':\n        player.play();\n        break;\n      case 'pause':\n        player.pause();\n        break;\n      case 'reset':\n        player.reset();\n        break;\n      case 'restart':\n        player.restart();\n        break;\n      case 'finish':\n        player.finish();\n        break;\n      case 'init':\n        player.init();\n        break;\n      case 'setPosition':\n        player.setPosition(parseFloat(args[0] as string));\n        break;\n      case 'destroy':\n        this.destroy(id);\n        break;\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationOptions, AnimationPlayer, AUTO_STYLE, NoopAnimationPlayer, ɵAnimationGroupPlayer as AnimationGroupPlayer, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {AnimationTransitionFactory} from '../dsl/animation_transition_factory';\nimport {AnimationTransitionInstruction} from '../dsl/animation_transition_instruction';\nimport {AnimationTrigger} from '../dsl/animation_trigger';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {copyObj, ENTER_CLASSNAME, eraseStyles, iteratorToArray, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, setStyles} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst QUEUED_CLASSNAME = 'ng-animate-queued';\nconst QUEUED_SELECTOR = '.ng-animate-queued';\nconst DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst DISABLED_SELECTOR = '.ng-animate-disabled';\nconst STAR_CLASSNAME = 'ng-star-inserted';\nconst STAR_SELECTOR = '.ng-star-inserted';\n\nconst EMPTY_PLAYER_ARRAY: TransitionAnimationPlayer[] = [];\nconst NULL_REMOVAL_STATE: ElementAnimationState = {\n  namespaceId: '',\n  setForRemoval: false,\n  setForMove: false,\n  hasAnimation: false,\n  removedBeforeQueried: false\n};\nconst NULL_REMOVED_QUERIED_STATE: ElementAnimationState = {\n  namespaceId: '',\n  setForMove: false,\n  setForRemoval: false,\n  hasAnimation: false,\n  removedBeforeQueried: true\n};\n\ninterface TriggerListener {\n  name: string;\n  phase: string;\n  callback: (event: any) => any;\n}\n\nexport interface QueueInstruction {\n  element: any;\n  triggerName: string;\n  fromState: StateValue;\n  toState: StateValue;\n  transition: AnimationTransitionFactory;\n  player: TransitionAnimationPlayer;\n  isFallbackTransition: boolean;\n}\n\nexport const REMOVAL_FLAG = '__ng_removed';\n\nexport interface ElementAnimationState {\n  setForRemoval: boolean;\n  setForMove: boolean;\n  hasAnimation: boolean;\n  namespaceId: string;\n  removedBeforeQueried: boolean;\n}\n\nexport class StateValue {\n  public value: string;\n  public options: AnimationOptions;\n\n  get params(): {[key: string]: any} {\n    return this.options.params as {[key: string]: any};\n  }\n\n  constructor(input: any, public namespaceId: string = '') {\n    const isObj = input && input.hasOwnProperty('value');\n    const value = isObj ? input['value'] : input;\n    this.value = normalizeTriggerValue(value);\n    if (isObj) {\n      const options = copyObj(input as any);\n      delete options['value'];\n      this.options = options as AnimationOptions;\n    } else {\n      this.options = {};\n    }\n    if (!this.options.params) {\n      this.options.params = {};\n    }\n  }\n\n  absorbOptions(options: AnimationOptions) {\n    const newParams = options.params;\n    if (newParams) {\n      const oldParams = this.options.params!;\n      Object.keys(newParams).forEach(prop => {\n        if (oldParams[prop] == null) {\n          oldParams[prop] = newParams[prop];\n        }\n      });\n    }\n  }\n}\n\nexport const VOID_VALUE = 'void';\nexport const DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\n\nexport class AnimationTransitionNamespace {\n  public players: TransitionAnimationPlayer[] = [];\n\n  private _triggers: {[triggerName: string]: AnimationTrigger} = {};\n  private _queue: QueueInstruction[] = [];\n\n  private _elementListeners = new Map<any, TriggerListener[]>();\n\n  private _hostClassName: string;\n\n  constructor(\n      public id: string, public hostElement: any, private _engine: TransitionAnimationEngine) {\n    this._hostClassName = 'ng-tns-' + id;\n    addClass(hostElement, this._hostClassName);\n  }\n\n  listen(element: any, name: string, phase: string, callback: (event: any) => boolean): () => any {\n    if (!this._triggers.hasOwnProperty(name)) {\n      throw new Error(`Unable to listen on the animation trigger event \"${\n          phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n    }\n\n    if (phase == null || phase.length == 0) {\n      throw new Error(`Unable to listen on the animation trigger \"${\n          name}\" because the provided event is undefined!`);\n    }\n\n    if (!isTriggerEventValid(phase)) {\n      throw new Error(`The provided animation trigger event \"${phase}\" for the animation trigger \"${\n          name}\" is not supported!`);\n    }\n\n    const listeners = getOrSetAsInMap(this._elementListeners, element, []);\n    const data = {name, phase, callback};\n    listeners.push(data);\n\n    const triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {});\n    if (!triggersWithStates.hasOwnProperty(name)) {\n      addClass(element, NG_TRIGGER_CLASSNAME);\n      addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n      triggersWithStates[name] = DEFAULT_STATE_VALUE;\n    }\n\n    return () => {\n      // the event listener is removed AFTER the flush has occurred such\n      // that leave animations callbacks can fire (otherwise if the node\n      // is removed in between then the listeners would be deregistered)\n      this._engine.afterFlush(() => {\n        const index = listeners.indexOf(data);\n        if (index >= 0) {\n          listeners.splice(index, 1);\n        }\n\n        if (!this._triggers[name]) {\n          delete triggersWithStates[name];\n        }\n      });\n    };\n  }\n\n  register(name: string, ast: AnimationTrigger): boolean {\n    if (this._triggers[name]) {\n      // throw\n      return false;\n    } else {\n      this._triggers[name] = ast;\n      return true;\n    }\n  }\n\n  private _getTrigger(name: string) {\n    const trigger = this._triggers[name];\n    if (!trigger) {\n      throw new Error(`The provided animation trigger \"${name}\" has not been registered!`);\n    }\n    return trigger;\n  }\n\n  trigger(element: any, triggerName: string, value: any, defaultToFallback: boolean = true):\n      TransitionAnimationPlayer|undefined {\n    const trigger = this._getTrigger(triggerName);\n    const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n    let triggersWithStates = this._engine.statesByElement.get(element);\n    if (!triggersWithStates) {\n      addClass(element, NG_TRIGGER_CLASSNAME);\n      addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n      this._engine.statesByElement.set(element, triggersWithStates = {});\n    }\n\n    let fromState = triggersWithStates[triggerName];\n    const toState = new StateValue(value, this.id);\n\n    const isObj = value && value.hasOwnProperty('value');\n    if (!isObj && fromState) {\n      toState.absorbOptions(fromState.options);\n    }\n\n    triggersWithStates[triggerName] = toState;\n\n    if (!fromState) {\n      fromState = DEFAULT_STATE_VALUE;\n    }\n\n    const isRemoval = toState.value === VOID_VALUE;\n\n    // normally this isn't reached by here, however, if an object expression\n    // is passed in then it may be a new object each time. Comparing the value\n    // is important since that will stay the same despite there being a new object.\n    // The removal arc here is special cased because the same element is triggered\n    // twice in the event that it contains animations on the outer/inner portions\n    // of the host container\n    if (!isRemoval && fromState.value === toState.value) {\n      // this means that despite the value not changing, some inner params\n      // have changed which means that the animation final styles need to be applied\n      if (!objEquals(fromState.params, toState.params)) {\n        const errors: any[] = [];\n        const fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n        const toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n        if (errors.length) {\n          this._engine.reportError(errors);\n        } else {\n          this._engine.afterFlush(() => {\n            eraseStyles(element, fromStyles);\n            setStyles(element, toStyles);\n          });\n        }\n      }\n      return;\n    }\n\n    const playersOnElement: TransitionAnimationPlayer[] =\n        getOrSetAsInMap(this._engine.playersByElement, element, []);\n    playersOnElement.forEach(player => {\n      // only remove the player if it is queued on the EXACT same trigger/namespace\n      // we only also deal with queued players here because if the animation has\n      // started then we want to keep the player alive until the flush happens\n      // (which is where the previousPlayers are passed into the new palyer)\n      if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n        player.destroy();\n      }\n    });\n\n    let transition =\n        trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n    let isFallbackTransition = false;\n    if (!transition) {\n      if (!defaultToFallback) return;\n      transition = trigger.fallbackTransition;\n      isFallbackTransition = true;\n    }\n\n    this._engine.totalQueuedPlayers++;\n    this._queue.push(\n        {element, triggerName, transition, fromState, toState, player, isFallbackTransition});\n\n    if (!isFallbackTransition) {\n      addClass(element, QUEUED_CLASSNAME);\n      player.onStart(() => {\n        removeClass(element, QUEUED_CLASSNAME);\n      });\n    }\n\n    player.onDone(() => {\n      let index = this.players.indexOf(player);\n      if (index >= 0) {\n        this.players.splice(index, 1);\n      }\n\n      const players = this._engine.playersByElement.get(element);\n      if (players) {\n        let index = players.indexOf(player);\n        if (index >= 0) {\n          players.splice(index, 1);\n        }\n      }\n    });\n\n    this.players.push(player);\n    playersOnElement.push(player);\n\n    return player;\n  }\n\n  deregister(name: string) {\n    delete this._triggers[name];\n\n    this._engine.statesByElement.forEach((stateMap, element) => {\n      delete stateMap[name];\n    });\n\n    this._elementListeners.forEach((listeners, element) => {\n      this._elementListeners.set(element, listeners.filter(entry => {\n        return entry.name != name;\n      }));\n    });\n  }\n\n  clearElementCache(element: any) {\n    this._engine.statesByElement.delete(element);\n    this._elementListeners.delete(element);\n    const elementPlayers = this._engine.playersByElement.get(element);\n    if (elementPlayers) {\n      elementPlayers.forEach(player => player.destroy());\n      this._engine.playersByElement.delete(element);\n    }\n  }\n\n  private _signalRemovalForInnerTriggers(rootElement: any, context: any) {\n    const elements = this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true);\n\n    // emulate a leave animation for all inner nodes within this node.\n    // If there are no animations found for any of the nodes then clear the cache\n    // for the element.\n    elements.forEach(elm => {\n      // this means that an inner remove() operation has already kicked off\n      // the animation on this element...\n      if (elm[REMOVAL_FLAG]) return;\n\n      const namespaces = this._engine.fetchNamespacesByElement(elm);\n      if (namespaces.size) {\n        namespaces.forEach(ns => ns.triggerLeaveAnimation(elm, context, false, true));\n      } else {\n        this.clearElementCache(elm);\n      }\n    });\n\n    // If the child elements were removed along with the parent, their animations might not\n    // have completed. Clear all the elements from the cache so we don't end up with a memory leak.\n    this._engine.afterFlushAnimationsDone(\n        () => elements.forEach(elm => this.clearElementCache(elm)));\n  }\n\n  triggerLeaveAnimation(\n      element: any, context: any, destroyAfterComplete?: boolean,\n      defaultToFallback?: boolean): boolean {\n    const triggerStates = this._engine.statesByElement.get(element);\n    if (triggerStates) {\n      const players: TransitionAnimationPlayer[] = [];\n      Object.keys(triggerStates).forEach(triggerName => {\n        // this check is here in the event that an element is removed\n        // twice (both on the host level and the component level)\n        if (this._triggers[triggerName]) {\n          const player = this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n          if (player) {\n            players.push(player);\n          }\n        }\n      });\n\n      if (players.length) {\n        this._engine.markElementAsRemoved(this.id, element, true, context);\n        if (destroyAfterComplete) {\n          optimizeGroupPlayer(players).onDone(() => this._engine.processLeaveNode(element));\n        }\n        return true;\n      }\n    }\n    return false;\n  }\n\n  prepareLeaveAnimationListeners(element: any) {\n    const listeners = this._elementListeners.get(element);\n    if (listeners) {\n      const visitedTriggers = new Set<string>();\n      listeners.forEach(listener => {\n        const triggerName = listener.name;\n        if (visitedTriggers.has(triggerName)) return;\n        visitedTriggers.add(triggerName);\n\n        const trigger = this._triggers[triggerName];\n        const transition = trigger.fallbackTransition;\n        const elementStates = this._engine.statesByElement.get(element)!;\n        const fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;\n        const toState = new StateValue(VOID_VALUE);\n        const player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n        this._engine.totalQueuedPlayers++;\n        this._queue.push({\n          element,\n          triggerName,\n          transition,\n          fromState,\n          toState,\n          player,\n          isFallbackTransition: true\n        });\n      });\n    }\n  }\n\n  removeNode(element: any, context: any): void {\n    const engine = this._engine;\n\n    if (element.childElementCount) {\n      this._signalRemovalForInnerTriggers(element, context);\n    }\n\n    // this means that a * => VOID animation was detected and kicked off\n    if (this.triggerLeaveAnimation(element, context, true)) return;\n\n    // find the player that is animating and make sure that the\n    // removal is delayed until that player has completed\n    let containsPotentialParentTransition = false;\n    if (engine.totalAnimations) {\n      const currentPlayers =\n          engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n\n      // when this `if statement` does not continue forward it means that\n      // a previous animation query has selected the current element and\n      // is animating it. In this situation want to continue forwards and\n      // allow the element to be queued up for animation later.\n      if (currentPlayers && currentPlayers.length) {\n        containsPotentialParentTransition = true;\n      } else {\n        let parent = element;\n        while (parent = parent.parentNode) {\n          const triggers = engine.statesByElement.get(parent);\n          if (triggers) {\n            containsPotentialParentTransition = true;\n            break;\n          }\n        }\n      }\n    }\n\n    // at this stage we know that the element will either get removed\n    // during flush or will be picked up by a parent query. Either way\n    // we need to fire the listeners for this element when it DOES get\n    // removed (once the query parent animation is done or after flush)\n    this.prepareLeaveAnimationListeners(element);\n\n    // whether or not a parent has an animation we need to delay the deferral of the leave\n    // operation until we have more information (which we do after flush() has been called)\n    if (containsPotentialParentTransition) {\n      engine.markElementAsRemoved(this.id, element, false, context);\n    } else {\n      const removalFlag = element[REMOVAL_FLAG];\n      if (!removalFlag || removalFlag === NULL_REMOVAL_STATE) {\n        // we do this after the flush has occurred such\n        // that the callbacks can be fired\n        engine.afterFlush(() => this.clearElementCache(element));\n        engine.destroyInnerAnimations(element);\n        engine._onRemovalComplete(element, context);\n      }\n    }\n  }\n\n  insertNode(element: any, parent: any): void {\n    addClass(element, this._hostClassName);\n  }\n\n  drainQueuedTransitions(microtaskId: number): QueueInstruction[] {\n    const instructions: QueueInstruction[] = [];\n    this._queue.forEach(entry => {\n      const player = entry.player;\n      if (player.destroyed) return;\n\n      const element = entry.element;\n      const listeners = this._elementListeners.get(element);\n      if (listeners) {\n        listeners.forEach((listener: TriggerListener) => {\n          if (listener.name == entry.triggerName) {\n            const baseEvent = makeAnimationEvent(\n                element, entry.triggerName, entry.fromState.value, entry.toState.value);\n            (baseEvent as any)['_data'] = microtaskId;\n            listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n          }\n        });\n      }\n\n      if (player.markedForDestroy) {\n        this._engine.afterFlush(() => {\n          // now we can destroy the element properly since the event listeners have\n          // been bound to the player\n          player.destroy();\n        });\n      } else {\n        instructions.push(entry);\n      }\n    });\n\n    this._queue = [];\n\n    return instructions.sort((a, b) => {\n      // if depCount == 0 them move to front\n      // otherwise if a contains b then move back\n      const d0 = a.transition.ast.depCount;\n      const d1 = b.transition.ast.depCount;\n      if (d0 == 0 || d1 == 0) {\n        return d0 - d1;\n      }\n      return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n    });\n  }\n\n  destroy(context: any) {\n    this.players.forEach(p => p.destroy());\n    this._signalRemovalForInnerTriggers(this.hostElement, context);\n  }\n\n  elementContainsData(element: any): boolean {\n    let containsData = false;\n    if (this._elementListeners.has(element)) containsData = true;\n    containsData =\n        (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n    return containsData;\n  }\n}\n\nexport interface QueuedTransition {\n  element: any;\n  instruction: AnimationTransitionInstruction;\n  player: TransitionAnimationPlayer;\n}\n\nexport class TransitionAnimationEngine {\n  public players: TransitionAnimationPlayer[] = [];\n  public newHostElements = new Map<any, AnimationTransitionNamespace>();\n  public playersByElement = new Map<any, TransitionAnimationPlayer[]>();\n  public playersByQueriedElement = new Map<any, TransitionAnimationPlayer[]>();\n  public statesByElement = new Map<any, {[triggerName: string]: StateValue}>();\n  public disabledNodes = new Set<any>();\n\n  public totalAnimations = 0;\n  public totalQueuedPlayers = 0;\n\n  private _namespaceLookup: {[id: string]: AnimationTransitionNamespace} = {};\n  private _namespaceList: AnimationTransitionNamespace[] = [];\n  private _flushFns: (() => any)[] = [];\n  private _whenQuietFns: (() => any)[] = [];\n\n  public namespacesByHostElement = new Map<any, AnimationTransitionNamespace>();\n  public collectedEnterElements: any[] = [];\n  public collectedLeaveElements: any[] = [];\n\n  // this method is designed to be overridden by the code that uses this engine\n  public onRemovalComplete = (element: any, context: any) => {};\n\n  /** @internal */\n  _onRemovalComplete(element: any, context: any) {\n    this.onRemovalComplete(element, context);\n  }\n\n  constructor(\n      public bodyNode: any, public driver: AnimationDriver,\n      private _normalizer: AnimationStyleNormalizer) {}\n\n  get queuedPlayers(): TransitionAnimationPlayer[] {\n    const players: TransitionAnimationPlayer[] = [];\n    this._namespaceList.forEach(ns => {\n      ns.players.forEach(player => {\n        if (player.queued) {\n          players.push(player);\n        }\n      });\n    });\n    return players;\n  }\n\n  createNamespace(namespaceId: string, hostElement: any) {\n    const ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n    if (hostElement.parentNode) {\n      this._balanceNamespaceList(ns, hostElement);\n    } else {\n      // defer this later until flush during when the host element has\n      // been inserted so that we know exactly where to place it in\n      // the namespace list\n      this.newHostElements.set(hostElement, ns);\n\n      // given that this host element is apart of the animation code, it\n      // may or may not be inserted by a parent node that is an of an\n      // animation renderer type. If this happens then we can still have\n      // access to this item when we query for :enter nodes. If the parent\n      // is a renderer then the set data-structure will normalize the entry\n      this.collectEnterElement(hostElement);\n    }\n    return this._namespaceLookup[namespaceId] = ns;\n  }\n\n  private _balanceNamespaceList(ns: AnimationTransitionNamespace, hostElement: any) {\n    const limit = this._namespaceList.length - 1;\n    if (limit >= 0) {\n      let found = false;\n      for (let i = limit; i >= 0; i--) {\n        const nextNamespace = this._namespaceList[i];\n        if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {\n          this._namespaceList.splice(i + 1, 0, ns);\n          found = true;\n          break;\n        }\n      }\n      if (!found) {\n        this._namespaceList.splice(0, 0, ns);\n      }\n    } else {\n      this._namespaceList.push(ns);\n    }\n\n    this.namespacesByHostElement.set(hostElement, ns);\n    return ns;\n  }\n\n  register(namespaceId: string, hostElement: any) {\n    let ns = this._namespaceLookup[namespaceId];\n    if (!ns) {\n      ns = this.createNamespace(namespaceId, hostElement);\n    }\n    return ns;\n  }\n\n  registerTrigger(namespaceId: string, name: string, trigger: AnimationTrigger) {\n    let ns = this._namespaceLookup[namespaceId];\n    if (ns && ns.register(name, trigger)) {\n      this.totalAnimations++;\n    }\n  }\n\n  destroy(namespaceId: string, context: any) {\n    if (!namespaceId) return;\n\n    const ns = this._fetchNamespace(namespaceId);\n\n    this.afterFlush(() => {\n      this.namespacesByHostElement.delete(ns.hostElement);\n      delete this._namespaceLookup[namespaceId];\n      const index = this._namespaceList.indexOf(ns);\n      if (index >= 0) {\n        this._namespaceList.splice(index, 1);\n      }\n    });\n\n    this.afterFlushAnimationsDone(() => ns.destroy(context));\n  }\n\n  private _fetchNamespace(id: string) {\n    return this._namespaceLookup[id];\n  }\n\n  fetchNamespacesByElement(element: any): Set<AnimationTransitionNamespace> {\n    // normally there should only be one namespace per element, however\n    // if @triggers are placed on both the component element and then\n    // its host element (within the component code) then there will be\n    // two namespaces returned. We use a set here to simply the dedupe\n    // of namespaces incase there are multiple triggers both the elm and host\n    const namespaces = new Set<AnimationTransitionNamespace>();\n    const elementStates = this.statesByElement.get(element);\n    if (elementStates) {\n      const keys = Object.keys(elementStates);\n      for (let i = 0; i < keys.length; i++) {\n        const nsId = elementStates[keys[i]].namespaceId;\n        if (nsId) {\n          const ns = this._fetchNamespace(nsId);\n          if (ns) {\n            namespaces.add(ns);\n          }\n        }\n      }\n    }\n    return namespaces;\n  }\n\n  trigger(namespaceId: string, element: any, name: string, value: any): boolean {\n    if (isElementNode(element)) {\n      const ns = this._fetchNamespace(namespaceId);\n      if (ns) {\n        ns.trigger(element, name, value);\n        return true;\n      }\n    }\n    return false;\n  }\n\n  insertNode(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n    if (!isElementNode(element)) return;\n\n    // special case for when an element is removed and reinserted (move operation)\n    // when this occurs we do not want to use the element for deletion later\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) {\n      details.setForRemoval = false;\n      details.setForMove = true;\n      const index = this.collectedLeaveElements.indexOf(element);\n      if (index >= 0) {\n        this.collectedLeaveElements.splice(index, 1);\n      }\n    }\n\n    // in the event that the namespaceId is blank then the caller\n    // code does not contain any animation code in it, but it is\n    // just being called so that the node is marked as being inserted\n    if (namespaceId) {\n      const ns = this._fetchNamespace(namespaceId);\n      // This if-statement is a workaround for router issue #21947.\n      // The router sometimes hits a race condition where while a route\n      // is being instantiated a new navigation arrives, triggering leave\n      // animation of DOM that has not been fully initialized, until this\n      // is resolved, we need to handle the scenario when DOM is not in a\n      // consistent state during the animation.\n      if (ns) {\n        ns.insertNode(element, parent);\n      }\n    }\n\n    // only *directives and host elements are inserted before\n    if (insertBefore) {\n      this.collectEnterElement(element);\n    }\n  }\n\n  collectEnterElement(element: any) {\n    this.collectedEnterElements.push(element);\n  }\n\n  markElementAsDisabled(element: any, value: boolean) {\n    if (value) {\n      if (!this.disabledNodes.has(element)) {\n        this.disabledNodes.add(element);\n        addClass(element, DISABLED_CLASSNAME);\n      }\n    } else if (this.disabledNodes.has(element)) {\n      this.disabledNodes.delete(element);\n      removeClass(element, DISABLED_CLASSNAME);\n    }\n  }\n\n  removeNode(namespaceId: string, element: any, isHostElement: boolean, context: any): void {\n    if (isElementNode(element)) {\n      const ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n      if (ns) {\n        ns.removeNode(element, context);\n      } else {\n        this.markElementAsRemoved(namespaceId, element, false, context);\n      }\n\n      if (isHostElement) {\n        const hostNS = this.namespacesByHostElement.get(element);\n        if (hostNS && hostNS.id !== namespaceId) {\n          hostNS.removeNode(element, context);\n        }\n      }\n    } else {\n      this._onRemovalComplete(element, context);\n    }\n  }\n\n  markElementAsRemoved(namespaceId: string, element: any, hasAnimation?: boolean, context?: any) {\n    this.collectedLeaveElements.push(element);\n    element[REMOVAL_FLAG] =\n        {namespaceId, setForRemoval: context, hasAnimation, removedBeforeQueried: false};\n  }\n\n  listen(\n      namespaceId: string, element: any, name: string, phase: string,\n      callback: (event: any) => boolean): () => any {\n    if (isElementNode(element)) {\n      return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n    }\n    return () => {};\n  }\n\n  private _buildInstruction(\n      entry: QueueInstruction, subTimelines: ElementInstructionMap, enterClassName: string,\n      leaveClassName: string, skipBuildAst?: boolean) {\n    return entry.transition.build(\n        this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName,\n        leaveClassName, entry.fromState.options, entry.toState.options, subTimelines, skipBuildAst);\n  }\n\n  destroyInnerAnimations(containerElement: any) {\n    let elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n    elements.forEach(element => this.destroyActiveAnimationsForElement(element));\n\n    if (this.playersByQueriedElement.size == 0) return;\n\n    elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n    elements.forEach(element => this.finishActiveQueriedAnimationOnElement(element));\n  }\n\n  destroyActiveAnimationsForElement(element: any) {\n    const players = this.playersByElement.get(element);\n    if (players) {\n      players.forEach(player => {\n        // special case for when an element is set for destruction, but hasn't started.\n        // in this situation we want to delay the destruction until the flush occurs\n        // so that any event listeners attached to the player are triggered.\n        if (player.queued) {\n          player.markedForDestroy = true;\n        } else {\n          player.destroy();\n        }\n      });\n    }\n  }\n\n  finishActiveQueriedAnimationOnElement(element: any) {\n    const players = this.playersByQueriedElement.get(element);\n    if (players) {\n      players.forEach(player => player.finish());\n    }\n  }\n\n  whenRenderingDone(): Promise<any> {\n    return new Promise(resolve => {\n      if (this.players.length) {\n        return optimizeGroupPlayer(this.players).onDone(() => resolve());\n      } else {\n        resolve();\n      }\n    });\n  }\n\n  processLeaveNode(element: any) {\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) {\n      // this will prevent it from removing it twice\n      element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n      if (details.namespaceId) {\n        this.destroyInnerAnimations(element);\n        const ns = this._fetchNamespace(details.namespaceId);\n        if (ns) {\n          ns.clearElementCache(element);\n        }\n      }\n      this._onRemovalComplete(element, details.setForRemoval);\n    }\n\n    if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {\n      this.markElementAsDisabled(element, false);\n    }\n\n    this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n      this.markElementAsDisabled(node, false);\n    });\n  }\n\n  flush(microtaskId: number = -1) {\n    let players: AnimationPlayer[] = [];\n    if (this.newHostElements.size) {\n      this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n      this.newHostElements.clear();\n    }\n\n    if (this.totalAnimations && this.collectedEnterElements.length) {\n      for (let i = 0; i < this.collectedEnterElements.length; i++) {\n        const elm = this.collectedEnterElements[i];\n        addClass(elm, STAR_CLASSNAME);\n      }\n    }\n\n    if (this._namespaceList.length &&\n        (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n      const cleanupFns: Function[] = [];\n      try {\n        players = this._flushAnimations(cleanupFns, microtaskId);\n      } finally {\n        for (let i = 0; i < cleanupFns.length; i++) {\n          cleanupFns[i]();\n        }\n      }\n    } else {\n      for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n        const element = this.collectedLeaveElements[i];\n        this.processLeaveNode(element);\n      }\n    }\n\n    this.totalQueuedPlayers = 0;\n    this.collectedEnterElements.length = 0;\n    this.collectedLeaveElements.length = 0;\n    this._flushFns.forEach(fn => fn());\n    this._flushFns = [];\n\n    if (this._whenQuietFns.length) {\n      // we move these over to a variable so that\n      // if any new callbacks are registered in another\n      // flush they do not populate the existing set\n      const quietFns = this._whenQuietFns;\n      this._whenQuietFns = [];\n\n      if (players.length) {\n        optimizeGroupPlayer(players).onDone(() => {\n          quietFns.forEach(fn => fn());\n        });\n      } else {\n        quietFns.forEach(fn => fn());\n      }\n    }\n  }\n\n  reportError(errors: string[]) {\n    throw new Error(\n        `Unable to process animations due to the following failed trigger transitions\\n ${\n            errors.join('\\n')}`);\n  }\n\n  private _flushAnimations(cleanupFns: Function[], microtaskId: number):\n      TransitionAnimationPlayer[] {\n    const subTimelines = new ElementInstructionMap();\n    const skippedPlayers: TransitionAnimationPlayer[] = [];\n    const skippedPlayersMap = new Map<any, AnimationPlayer[]>();\n    const queuedInstructions: QueuedTransition[] = [];\n    const queriedElements = new Map<any, TransitionAnimationPlayer[]>();\n    const allPreStyleElements = new Map<any, Set<string>>();\n    const allPostStyleElements = new Map<any, Set<string>>();\n\n    const disabledElementsSet = new Set<any>();\n    this.disabledNodes.forEach(node => {\n      disabledElementsSet.add(node);\n      const nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n      for (let i = 0; i < nodesThatAreDisabled.length; i++) {\n        disabledElementsSet.add(nodesThatAreDisabled[i]);\n      }\n    });\n\n    const bodyNode = this.bodyNode;\n    const allTriggerElements = Array.from(this.statesByElement.keys());\n    const enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\n\n    // this must occur before the instructions are built below such that\n    // the :enter queries match the elements (since the timeline queries\n    // are fired during instruction building).\n    const enterNodeMapIds = new Map<any, string>();\n    let i = 0;\n    enterNodeMap.forEach((nodes, root) => {\n      const className = ENTER_CLASSNAME + i++;\n      enterNodeMapIds.set(root, className);\n      nodes.forEach(node => addClass(node, className));\n    });\n\n    const allLeaveNodes: any[] = [];\n    const mergedLeaveNodes = new Set<any>();\n    const leaveNodesWithoutAnimations = new Set<any>();\n    for (let i = 0; i < this.collectedLeaveElements.length; i++) {\n      const element = this.collectedLeaveElements[i];\n      const details = element[REMOVAL_FLAG] as ElementAnimationState;\n      if (details && details.setForRemoval) {\n        allLeaveNodes.push(element);\n        mergedLeaveNodes.add(element);\n        if (details.hasAnimation) {\n          this.driver.query(element, STAR_SELECTOR, true).forEach(elm => mergedLeaveNodes.add(elm));\n        } else {\n          leaveNodesWithoutAnimations.add(element);\n        }\n      }\n    }\n\n    const leaveNodeMapIds = new Map<any, string>();\n    const leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n    leaveNodeMap.forEach((nodes, root) => {\n      const className = LEAVE_CLASSNAME + i++;\n      leaveNodeMapIds.set(root, className);\n      nodes.forEach(node => addClass(node, className));\n    });\n\n    cleanupFns.push(() => {\n      enterNodeMap.forEach((nodes, root) => {\n        const className = enterNodeMapIds.get(root)!;\n        nodes.forEach(node => removeClass(node, className));\n      });\n\n      leaveNodeMap.forEach((nodes, root) => {\n        const className = leaveNodeMapIds.get(root)!;\n        nodes.forEach(node => removeClass(node, className));\n      });\n\n      allLeaveNodes.forEach(element => {\n        this.processLeaveNode(element);\n      });\n    });\n\n    const allPlayers: TransitionAnimationPlayer[] = [];\n    const erroneousTransitions: AnimationTransitionInstruction[] = [];\n    for (let i = this._namespaceList.length - 1; i >= 0; i--) {\n      const ns = this._namespaceList[i];\n      ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n        const player = entry.player;\n        const element = entry.element;\n        allPlayers.push(player);\n\n        if (this.collectedEnterElements.length) {\n          const details = element[REMOVAL_FLAG] as ElementAnimationState;\n          // move animations are currently not supported...\n          if (details && details.setForMove) {\n            player.destroy();\n            return;\n          }\n        }\n\n        const nodeIsOrphaned = !bodyNode || !this.driver.containsElement(bodyNode, element);\n        const leaveClassName = leaveNodeMapIds.get(element)!;\n        const enterClassName = enterNodeMapIds.get(element)!;\n        const instruction = this._buildInstruction(\n            entry, subTimelines, enterClassName, leaveClassName, nodeIsOrphaned)!;\n        if (instruction.errors && instruction.errors.length) {\n          erroneousTransitions.push(instruction);\n          return;\n        }\n\n        // even though the element may not be apart of the DOM, it may\n        // still be added at a later point (due to the mechanics of content\n        // projection and/or dynamic component insertion) therefore it's\n        // important we still style the element.\n        if (nodeIsOrphaned) {\n          player.onStart(() => eraseStyles(element, instruction.fromStyles));\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // if a unmatched transition is queued to go then it SHOULD NOT render\n        // an animation and cancel the previously running animations.\n        if (entry.isFallbackTransition) {\n          player.onStart(() => eraseStyles(element, instruction.fromStyles));\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // this means that if a parent animation uses this animation as a sub trigger\n        // then it will instruct the timeline builder to not add a player delay, but\n        // instead stretch the first keyframe gap up until the animation starts. The\n        // reason this is important is to prevent extra initialization styles from being\n        // required by the user in the animation.\n        instruction.timelines.forEach(tl => tl.stretchStartingKeyframe = true);\n\n        subTimelines.append(element, instruction.timelines);\n\n        const tuple = {instruction, player, element};\n\n        queuedInstructions.push(tuple);\n\n        instruction.queriedElements.forEach(\n            element => getOrSetAsInMap(queriedElements, element, []).push(player));\n\n        instruction.preStyleProps.forEach((stringMap, element) => {\n          const props = Object.keys(stringMap);\n          if (props.length) {\n            let setVal: Set<string> = allPreStyleElements.get(element)!;\n            if (!setVal) {\n              allPreStyleElements.set(element, setVal = new Set<string>());\n            }\n            props.forEach(prop => setVal.add(prop));\n          }\n        });\n\n        instruction.postStyleProps.forEach((stringMap, element) => {\n          const props = Object.keys(stringMap);\n          let setVal: Set<string> = allPostStyleElements.get(element)!;\n          if (!setVal) {\n            allPostStyleElements.set(element, setVal = new Set<string>());\n          }\n          props.forEach(prop => setVal.add(prop));\n        });\n      });\n    }\n\n    if (erroneousTransitions.length) {\n      const errors: string[] = [];\n      erroneousTransitions.forEach(instruction => {\n        errors.push(`@${instruction.triggerName} has failed due to:\\n`);\n        instruction.errors!.forEach(error => errors.push(`- ${error}\\n`));\n      });\n\n      allPlayers.forEach(player => player.destroy());\n      this.reportError(errors);\n    }\n\n    const allPreviousPlayersMap = new Map<any, TransitionAnimationPlayer[]>();\n    // this map works to tell which element in the DOM tree is contained by\n    // which animation. Further down below this map will get populated once\n    // the players are built and in doing so it can efficiently figure out\n    // if a sub player is skipped due to a parent player having priority.\n    const animationElementMap = new Map<any, any>();\n    queuedInstructions.forEach(entry => {\n      const element = entry.element;\n      if (subTimelines.has(element)) {\n        animationElementMap.set(element, element);\n        this._beforeAnimationBuild(\n            entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n      }\n    });\n\n    skippedPlayers.forEach(player => {\n      const element = player.element;\n      const previousPlayers =\n          this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n      previousPlayers.forEach(prevPlayer => {\n        getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);\n        prevPlayer.destroy();\n      });\n    });\n\n    // this is a special case for nodes that will be removed (either by)\n    // having their own leave animations or by being queried in a container\n    // that will be removed once a parent animation is complete. The idea\n    // here is that * styles must be identical to ! styles because of\n    // backwards compatibility (* is also filled in by default in many places).\n    // Otherwise * styles will return an empty value or auto since the element\n    // that is being getComputedStyle'd will not be visible (since * = destination)\n    const replaceNodes = allLeaveNodes.filter(node => {\n      return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n    });\n\n    // POST STAGE: fill the * styles\n    const postStylesMap = new Map<any, ɵStyleData>();\n    const allLeaveQueriedNodes = cloakAndComputeStyles(\n        postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n\n    allLeaveQueriedNodes.forEach(node => {\n      if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n        replaceNodes.push(node);\n      }\n    });\n\n    // PRE STAGE: fill the ! styles\n    const preStylesMap = new Map<any, ɵStyleData>();\n    enterNodeMap.forEach((nodes, root) => {\n      cloakAndComputeStyles(\n          preStylesMap, this.driver, new Set(nodes), allPreStyleElements, PRE_STYLE);\n    });\n\n    replaceNodes.forEach(node => {\n      const post = postStylesMap.get(node);\n      const pre = preStylesMap.get(node);\n      postStylesMap.set(node, {...post, ...pre} as any);\n    });\n\n    const rootPlayers: TransitionAnimationPlayer[] = [];\n    const subPlayers: TransitionAnimationPlayer[] = [];\n    const NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n    queuedInstructions.forEach(entry => {\n      const {element, player, instruction} = entry;\n      // this means that it was never consumed by a parent animation which\n      // means that it is independent and therefore should be set for animation\n      if (subTimelines.has(element)) {\n        if (disabledElementsSet.has(element)) {\n          player.onDestroy(() => setStyles(element, instruction.toStyles));\n          player.disabled = true;\n          player.overrideTotalTime(instruction.totalTime);\n          skippedPlayers.push(player);\n          return;\n        }\n\n        // this will flow up the DOM and query the map to figure out\n        // if a parent animation has priority over it. In the situation\n        // that a parent is detected then it will cancel the loop. If\n        // nothing is detected, or it takes a few hops to find a parent,\n        // then it will fill in the missing nodes and signal them as having\n        // a detected parent (or a NO_PARENT value via a special constant).\n        let parentWithAnimation: any = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n        if (animationElementMap.size > 1) {\n          let elm = element;\n          const parentsToAdd: any[] = [];\n          while (elm = elm.parentNode) {\n            const detectedParent = animationElementMap.get(elm);\n            if (detectedParent) {\n              parentWithAnimation = detectedParent;\n              break;\n            }\n            parentsToAdd.push(elm);\n          }\n          parentsToAdd.forEach(parent => animationElementMap.set(parent, parentWithAnimation));\n        }\n\n        const innerPlayer = this._buildAnimation(\n            player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap,\n            postStylesMap);\n\n        player.setRealPlayer(innerPlayer);\n\n        if (parentWithAnimation === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n          rootPlayers.push(player);\n        } else {\n          const parentPlayers = this.playersByElement.get(parentWithAnimation);\n          if (parentPlayers && parentPlayers.length) {\n            player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n          }\n          skippedPlayers.push(player);\n        }\n      } else {\n        eraseStyles(element, instruction.fromStyles);\n        player.onDestroy(() => setStyles(element, instruction.toStyles));\n        // there still might be a ancestor player animating this\n        // element therefore we will still add it as a sub player\n        // even if its animation may be disabled\n        subPlayers.push(player);\n        if (disabledElementsSet.has(element)) {\n          skippedPlayers.push(player);\n        }\n      }\n    });\n\n    // find all of the sub players' corresponding inner animation player\n    subPlayers.forEach(player => {\n      // even if any players are not found for a sub animation then it\n      // will still complete itself after the next tick since it's Noop\n      const playersForElement = skippedPlayersMap.get(player.element);\n      if (playersForElement && playersForElement.length) {\n        const innerPlayer = optimizeGroupPlayer(playersForElement);\n        player.setRealPlayer(innerPlayer);\n      }\n    });\n\n    // the reason why we don't actually play the animation is\n    // because all that a skipped player is designed to do is to\n    // fire the start/done transition callback events\n    skippedPlayers.forEach(player => {\n      if (player.parentPlayer) {\n        player.syncPlayerEvents(player.parentPlayer);\n      } else {\n        player.destroy();\n      }\n    });\n\n    // run through all of the queued removals and see if they\n    // were picked up by a query. If not then perform the removal\n    // operation right away unless a parent animation is ongoing.\n    for (let i = 0; i < allLeaveNodes.length; i++) {\n      const element = allLeaveNodes[i];\n      const details = element[REMOVAL_FLAG] as ElementAnimationState;\n      removeClass(element, LEAVE_CLASSNAME);\n\n      // this means the element has a removal animation that is being\n      // taken care of and therefore the inner elements will hang around\n      // until that animation is over (or the parent queried animation)\n      if (details && details.hasAnimation) continue;\n\n      let players: TransitionAnimationPlayer[] = [];\n\n      // if this element is queried or if it contains queried children\n      // then we want for the element not to be removed from the page\n      // until the queried animations have finished\n      if (queriedElements.size) {\n        let queriedPlayerResults = queriedElements.get(element);\n        if (queriedPlayerResults && queriedPlayerResults.length) {\n          players.push(...queriedPlayerResults);\n        }\n\n        let queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n        for (let j = 0; j < queriedInnerElements.length; j++) {\n          let queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n          if (queriedPlayers && queriedPlayers.length) {\n            players.push(...queriedPlayers);\n          }\n        }\n      }\n\n      const activePlayers = players.filter(p => !p.destroyed);\n      if (activePlayers.length) {\n        removeNodesAfterAnimationDone(this, element, activePlayers);\n      } else {\n        this.processLeaveNode(element);\n      }\n    }\n\n    // this is required so the cleanup method doesn't remove them\n    allLeaveNodes.length = 0;\n\n    rootPlayers.forEach(player => {\n      this.players.push(player);\n      player.onDone(() => {\n        player.destroy();\n\n        const index = this.players.indexOf(player);\n        this.players.splice(index, 1);\n      });\n      player.play();\n    });\n\n    return rootPlayers;\n  }\n\n  elementContainsData(namespaceId: string, element: any) {\n    let containsData = false;\n    const details = element[REMOVAL_FLAG] as ElementAnimationState;\n    if (details && details.setForRemoval) containsData = true;\n    if (this.playersByElement.has(element)) containsData = true;\n    if (this.playersByQueriedElement.has(element)) containsData = true;\n    if (this.statesByElement.has(element)) containsData = true;\n    return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n  }\n\n  afterFlush(callback: () => any) {\n    this._flushFns.push(callback);\n  }\n\n  afterFlushAnimationsDone(callback: () => any) {\n    this._whenQuietFns.push(callback);\n  }\n\n  private _getPreviousPlayers(\n      element: string, isQueriedElement: boolean, namespaceId?: string, triggerName?: string,\n      toStateValue?: any): TransitionAnimationPlayer[] {\n    let players: TransitionAnimationPlayer[] = [];\n    if (isQueriedElement) {\n      const queriedElementPlayers = this.playersByQueriedElement.get(element);\n      if (queriedElementPlayers) {\n        players = queriedElementPlayers;\n      }\n    } else {\n      const elementPlayers = this.playersByElement.get(element);\n      if (elementPlayers) {\n        const isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n        elementPlayers.forEach(player => {\n          if (player.queued) return;\n          if (!isRemovalAnimation && player.triggerName != triggerName) return;\n          players.push(player);\n        });\n      }\n    }\n    if (namespaceId || triggerName) {\n      players = players.filter(player => {\n        if (namespaceId && namespaceId != player.namespaceId) return false;\n        if (triggerName && triggerName != player.triggerName) return false;\n        return true;\n      });\n    }\n    return players;\n  }\n\n  private _beforeAnimationBuild(\n      namespaceId: string, instruction: AnimationTransitionInstruction,\n      allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>) {\n    const triggerName = instruction.triggerName;\n    const rootElement = instruction.element;\n\n    // when a removal animation occurs, ALL previous players are collected\n    // and destroyed (even if they are outside of the current namespace)\n    const targetNameSpaceId: string|undefined =\n        instruction.isRemovalTransition ? undefined : namespaceId;\n    const targetTriggerName: string|undefined =\n        instruction.isRemovalTransition ? undefined : triggerName;\n\n    for (const timelineInstruction of instruction.timelines) {\n      const element = timelineInstruction.element;\n      const isQueriedElement = element !== rootElement;\n      const players = getOrSetAsInMap(allPreviousPlayersMap, element, []);\n      const previousPlayers = this._getPreviousPlayers(\n          element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n      previousPlayers.forEach(player => {\n        const realPlayer = (player as TransitionAnimationPlayer).getRealPlayer() as any;\n        if (realPlayer.beforeDestroy) {\n          realPlayer.beforeDestroy();\n        }\n        player.destroy();\n        players.push(player);\n      });\n    }\n\n    // this needs to be done so that the PRE/POST styles can be\n    // computed properly without interfering with the previous animation\n    eraseStyles(rootElement, instruction.fromStyles);\n  }\n\n  private _buildAnimation(\n      namespaceId: string, instruction: AnimationTransitionInstruction,\n      allPreviousPlayersMap: Map<any, TransitionAnimationPlayer[]>,\n      skippedPlayersMap: Map<any, AnimationPlayer[]>, preStylesMap: Map<any, ɵStyleData>,\n      postStylesMap: Map<any, ɵStyleData>): AnimationPlayer {\n    const triggerName = instruction.triggerName;\n    const rootElement = instruction.element;\n\n    // we first run this so that the previous animation player\n    // data can be passed into the successive animation players\n    const allQueriedPlayers: TransitionAnimationPlayer[] = [];\n    const allConsumedElements = new Set<any>();\n    const allSubElements = new Set<any>();\n    const allNewPlayers = instruction.timelines.map(timelineInstruction => {\n      const element = timelineInstruction.element;\n      allConsumedElements.add(element);\n\n      // FIXME (matsko): make sure to-be-removed animations are removed properly\n      const details = element[REMOVAL_FLAG];\n      if (details && details.removedBeforeQueried)\n        return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n\n      const isQueriedElement = element !== rootElement;\n      const previousPlayers =\n          flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n                                  .map(p => p.getRealPlayer()))\n              .filter(p => {\n                // the `element` is not apart of the AnimationPlayer definition, but\n                // Mock/WebAnimations\n                // use the element within their implementation. This will be added in Angular5 to\n                // AnimationPlayer\n                const pp = p as any;\n                return pp.element ? pp.element === element : false;\n              });\n\n      const preStyles = preStylesMap.get(element);\n      const postStyles = postStylesMap.get(element);\n      const keyframes = normalizeKeyframes(\n          this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles,\n          postStyles);\n      const player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n\n      // this means that this particular player belongs to a sub trigger. It is\n      // important that we match this player up with the corresponding (@trigger.listener)\n      if (timelineInstruction.subTimeline && skippedPlayersMap) {\n        allSubElements.add(element);\n      }\n\n      if (isQueriedElement) {\n        const wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n        wrappedPlayer.setRealPlayer(player);\n        allQueriedPlayers.push(wrappedPlayer);\n      }\n\n      return player;\n    });\n\n    allQueriedPlayers.forEach(player => {\n      getOrSetAsInMap(this.playersByQueriedElement, player.element, []).push(player);\n      player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n    });\n\n    allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n    const player = optimizeGroupPlayer(allNewPlayers);\n    player.onDestroy(() => {\n      allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n      setStyles(rootElement, instruction.toStyles);\n    });\n\n    // this basically makes all of the callbacks for sub element animations\n    // be dependent on the upper players for when they finish\n    allSubElements.forEach(element => {\n      getOrSetAsInMap(skippedPlayersMap, element, []).push(player);\n    });\n\n    return player;\n  }\n\n  private _buildPlayer(\n      instruction: AnimationTimelineInstruction, keyframes: ɵStyleData[],\n      previousPlayers: AnimationPlayer[]): AnimationPlayer {\n    if (keyframes.length > 0) {\n      return this.driver.animate(\n          instruction.element, keyframes, instruction.duration, instruction.delay,\n          instruction.easing, previousPlayers);\n    }\n\n    // special case for when an empty transition|definition is provided\n    // ... there is no point in rendering an empty animation\n    return new NoopAnimationPlayer(instruction.duration, instruction.delay);\n  }\n}\n\nexport class TransitionAnimationPlayer implements AnimationPlayer {\n  private _player: AnimationPlayer = new NoopAnimationPlayer();\n  private _containsRealPlayer = false;\n\n  private _queuedCallbacks: {[name: string]: (() => any)[]} = {};\n  public readonly destroyed = false;\n  // TODO(issue/24571): remove '!'.\n  public parentPlayer!: AnimationPlayer;\n\n  public markedForDestroy: boolean = false;\n  public disabled = false;\n\n  readonly queued: boolean = true;\n  public readonly totalTime: number = 0;\n\n  constructor(public namespaceId: string, public triggerName: string, public element: any) {}\n\n  setRealPlayer(player: AnimationPlayer) {\n    if (this._containsRealPlayer) return;\n\n    this._player = player;\n    Object.keys(this._queuedCallbacks).forEach(phase => {\n      this._queuedCallbacks[phase].forEach(\n          callback => listenOnPlayer(player, phase, undefined, callback));\n    });\n    this._queuedCallbacks = {};\n    this._containsRealPlayer = true;\n    this.overrideTotalTime(player.totalTime);\n    (this as {queued: boolean}).queued = false;\n  }\n\n  getRealPlayer() {\n    return this._player;\n  }\n\n  overrideTotalTime(totalTime: number) {\n    (this as any).totalTime = totalTime;\n  }\n\n  syncPlayerEvents(player: AnimationPlayer) {\n    const p = this._player as any;\n    if (p.triggerCallback) {\n      player.onStart(() => p.triggerCallback!('start'));\n    }\n    player.onDone(() => this.finish());\n    player.onDestroy(() => this.destroy());\n  }\n\n  private _queueEvent(name: string, callback: (event: any) => any): void {\n    getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);\n  }\n\n  onDone(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('done', fn);\n    }\n    this._player.onDone(fn);\n  }\n\n  onStart(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('start', fn);\n    }\n    this._player.onStart(fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    if (this.queued) {\n      this._queueEvent('destroy', fn);\n    }\n    this._player.onDestroy(fn);\n  }\n\n  init(): void {\n    this._player.init();\n  }\n\n  hasStarted(): boolean {\n    return this.queued ? false : this._player.hasStarted();\n  }\n\n  play(): void {\n    !this.queued && this._player.play();\n  }\n\n  pause(): void {\n    !this.queued && this._player.pause();\n  }\n\n  restart(): void {\n    !this.queued && this._player.restart();\n  }\n\n  finish(): void {\n    this._player.finish();\n  }\n\n  destroy(): void {\n    (this as {destroyed: boolean}).destroyed = true;\n    this._player.destroy();\n  }\n\n  reset(): void {\n    !this.queued && this._player.reset();\n  }\n\n  setPosition(p: any): void {\n    if (!this.queued) {\n      this._player.setPosition(p);\n    }\n  }\n\n  getPosition(): number {\n    return this.queued ? 0 : this._player.getPosition();\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const p = this._player as any;\n    if (p.triggerCallback) {\n      p.triggerCallback(phaseName);\n    }\n  }\n}\n\nfunction deleteOrUnsetInMap(map: Map<any, any[]>|{[key: string]: any}, key: any, value: any) {\n  let currentValues: any[]|null|undefined;\n  if (map instanceof Map) {\n    currentValues = map.get(key);\n    if (currentValues) {\n      if (currentValues.length) {\n        const index = currentValues.indexOf(value);\n        currentValues.splice(index, 1);\n      }\n      if (currentValues.length == 0) {\n        map.delete(key);\n      }\n    }\n  } else {\n    currentValues = map[key];\n    if (currentValues) {\n      if (currentValues.length) {\n        const index = currentValues.indexOf(value);\n        currentValues.splice(index, 1);\n      }\n      if (currentValues.length == 0) {\n        delete map[key];\n      }\n    }\n  }\n  return currentValues;\n}\n\nfunction normalizeTriggerValue(value: any): any {\n  // we use `!= null` here because it's the most simple\n  // way to test against a \"falsy\" value without mixing\n  // in empty strings or a zero value. DO NOT OPTIMIZE.\n  return value != null ? value : null;\n}\n\nfunction isElementNode(node: any) {\n  return node && node['nodeType'] === 1;\n}\n\nfunction isTriggerEventValid(eventName: string): boolean {\n  return eventName == 'start' || eventName == 'done';\n}\n\nfunction cloakElement(element: any, value?: string) {\n  const oldValue = element.style.display;\n  element.style.display = value != null ? value : 'none';\n  return oldValue;\n}\n\nfunction cloakAndComputeStyles(\n    valuesMap: Map<any, ɵStyleData>, driver: AnimationDriver, elements: Set<any>,\n    elementPropsMap: Map<any, Set<string>>, defaultStyle: string): any[] {\n  const cloakVals: string[] = [];\n  elements.forEach(element => cloakVals.push(cloakElement(element)));\n\n  const failedElements: any[] = [];\n\n  elementPropsMap.forEach((props: Set<string>, element: any) => {\n    const styles: ɵStyleData = {};\n    props.forEach(prop => {\n      const value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);\n\n      // there is no easy way to detect this because a sub element could be removed\n      // by a parent animation element being detached.\n      if (!value || value.length == 0) {\n        element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n        failedElements.push(element);\n      }\n    });\n    valuesMap.set(element, styles);\n  });\n\n  // we use a index variable here since Set.forEach(a, i) does not return\n  // an index value for the closure (but instead just the value)\n  let i = 0;\n  elements.forEach(element => cloakElement(element, cloakVals[i++]));\n\n  return failedElements;\n}\n\n/*\nSince the Angular renderer code will return a collection of inserted\nnodes in all areas of a DOM tree, it's up to this algorithm to figure\nout which nodes are roots for each animation @trigger.\n\nBy placing each inserted node into a Set and traversing upwards, it\nis possible to find the @trigger elements and well any direct *star\ninsertion nodes, if a @trigger root is found then the enter element\nis placed into the Map[@trigger] spot.\n */\nfunction buildRootMap(roots: any[], nodes: any[]): Map<any, any[]> {\n  const rootMap = new Map<any, any[]>();\n  roots.forEach(root => rootMap.set(root, []));\n\n  if (nodes.length == 0) return rootMap;\n\n  const NULL_NODE = 1;\n  const nodeSet = new Set(nodes);\n  const localRootMap = new Map<any, any>();\n\n  function getRoot(node: any): any {\n    if (!node) return NULL_NODE;\n\n    let root = localRootMap.get(node);\n    if (root) return root;\n\n    const parent = node.parentNode;\n    if (rootMap.has(parent)) {  // ngIf inside @trigger\n      root = parent;\n    } else if (nodeSet.has(parent)) {  // ngIf inside ngIf\n      root = NULL_NODE;\n    } else {  // recurse upwards\n      root = getRoot(parent);\n    }\n\n    localRootMap.set(node, root);\n    return root;\n  }\n\n  nodes.forEach(node => {\n    const root = getRoot(node);\n    if (root !== NULL_NODE) {\n      rootMap.get(root)!.push(node);\n    }\n  });\n\n  return rootMap;\n}\n\nconst CLASSES_CACHE_KEY = '$$classes';\nfunction containsClass(element: any, className: string): boolean {\n  if (element.classList) {\n    return element.classList.contains(className);\n  } else {\n    const classes = element[CLASSES_CACHE_KEY];\n    return classes && classes[className];\n  }\n}\n\nfunction addClass(element: any, className: string) {\n  if (element.classList) {\n    element.classList.add(className);\n  } else {\n    let classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n    if (!classes) {\n      classes = element[CLASSES_CACHE_KEY] = {};\n    }\n    classes[className] = true;\n  }\n}\n\nfunction removeClass(element: any, className: string) {\n  if (element.classList) {\n    element.classList.remove(className);\n  } else {\n    let classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n    if (classes) {\n      delete classes[className];\n    }\n  }\n}\n\nfunction removeNodesAfterAnimationDone(\n    engine: TransitionAnimationEngine, element: any, players: AnimationPlayer[]) {\n  optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\n\nfunction flattenGroupPlayers(players: AnimationPlayer[]): AnimationPlayer[] {\n  const finalPlayers: AnimationPlayer[] = [];\n  _flattenGroupPlayersRecur(players, finalPlayers);\n  return finalPlayers;\n}\n\nfunction _flattenGroupPlayersRecur(players: AnimationPlayer[], finalPlayers: AnimationPlayer[]) {\n  for (let i = 0; i < players.length; i++) {\n    const player = players[i];\n    if (player instanceof AnimationGroupPlayer) {\n      _flattenGroupPlayersRecur(player.players, finalPlayers);\n    } else {\n      finalPlayers.push(player);\n    }\n  }\n}\n\nfunction objEquals(a: {[key: string]: any}, b: {[key: string]: any}): boolean {\n  const k1 = Object.keys(a);\n  const k2 = Object.keys(b);\n  if (k1.length != k2.length) return false;\n  for (let i = 0; i < k1.length; i++) {\n    const prop = k1[i];\n    if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n  }\n  return true;\n}\n\nfunction replacePostStylesAsPre(\n    element: any, allPreStyleElements: Map<any, Set<string>>,\n    allPostStyleElements: Map<any, Set<string>>): boolean {\n  const postEntry = allPostStyleElements.get(element);\n  if (!postEntry) return false;\n\n  let preEntry = allPreStyleElements.get(element);\n  if (preEntry) {\n    postEntry.forEach(data => preEntry!.add(data));\n  } else {\n    allPreStyleElements.set(element, postEntry);\n  }\n\n  allPostStyleElements.delete(element);\n  return true;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationMetadata, AnimationPlayer, AnimationTriggerMetadata} from '@angular/animations';\nimport {TriggerAst} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {AnimationTrigger, buildTrigger} from '../dsl/animation_trigger';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\n\nimport {AnimationDriver} from './animation_driver';\nimport {parseTimelineCommand} from './shared';\nimport {TimelineAnimationEngine} from './timeline_animation_engine';\nimport {TransitionAnimationEngine} from './transition_animation_engine';\n\nexport class AnimationEngine {\n  private _transitionEngine: TransitionAnimationEngine;\n  private _timelineEngine: TimelineAnimationEngine;\n\n  private _triggerCache: {[key: string]: AnimationTrigger} = {};\n\n  // this method is designed to be overridden by the code that uses this engine\n  public onRemovalComplete = (element: any, context: any) => {};\n\n  constructor(\n      private bodyNode: any, private _driver: AnimationDriver,\n      normalizer: AnimationStyleNormalizer) {\n    this._transitionEngine = new TransitionAnimationEngine(bodyNode, _driver, normalizer);\n    this._timelineEngine = new TimelineAnimationEngine(bodyNode, _driver, normalizer);\n\n    this._transitionEngine.onRemovalComplete = (element: any, context: any) =>\n        this.onRemovalComplete(element, context);\n  }\n\n  registerTrigger(\n      componentId: string, namespaceId: string, hostElement: any, name: string,\n      metadata: AnimationTriggerMetadata): void {\n    const cacheKey = componentId + '-' + name;\n    let trigger = this._triggerCache[cacheKey];\n    if (!trigger) {\n      const errors: any[] = [];\n      const ast =\n          buildAnimationAst(this._driver, metadata as AnimationMetadata, errors) as TriggerAst;\n      if (errors.length) {\n        throw new Error(`The animation trigger \"${\n            name}\" has failed to build due to the following errors:\\n - ${errors.join('\\n - ')}`);\n      }\n      trigger = buildTrigger(name, ast);\n      this._triggerCache[cacheKey] = trigger;\n    }\n    this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n  }\n\n  register(namespaceId: string, hostElement: any) {\n    this._transitionEngine.register(namespaceId, hostElement);\n  }\n\n  destroy(namespaceId: string, context: any) {\n    this._transitionEngine.destroy(namespaceId, context);\n  }\n\n  onInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n    this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n  }\n\n  onRemove(namespaceId: string, element: any, context: any, isHostElement?: boolean): void {\n    this._transitionEngine.removeNode(namespaceId, element, isHostElement || false, context);\n  }\n\n  disableAnimations(element: any, disable: boolean) {\n    this._transitionEngine.markElementAsDisabled(element, disable);\n  }\n\n  process(namespaceId: string, element: any, property: string, value: any) {\n    if (property.charAt(0) == '@') {\n      const [id, action] = parseTimelineCommand(property);\n      const args = value as any[];\n      this._timelineEngine.command(id, element, action, args);\n    } else {\n      this._transitionEngine.trigger(namespaceId, element, property, value);\n    }\n  }\n\n  listen(\n      namespaceId: string, element: any, eventName: string, eventPhase: string,\n      callback: (event: any) => any): () => any {\n    // @@listen\n    if (eventName.charAt(0) == '@') {\n      const [id, action] = parseTimelineCommand(eventName);\n      return this._timelineEngine.listen(id, element, action, callback);\n    }\n    return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n  }\n\n  flush(microtaskId: number = -1): void {\n    this._transitionEngine.flush(microtaskId);\n  }\n\n  get players(): AnimationPlayer[] {\n    return (this._transitionEngine.players as AnimationPlayer[])\n        .concat(this._timelineEngine.players as AnimationPlayer[]);\n  }\n\n  whenRenderingDone(): Promise<any> {\n    return this._transitionEngine.whenRenderingDone();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {eraseStyles, setStyles} from '../util';\n\n/**\n * Returns an instance of `SpecialCasedStyles` if and when any special (non animateable) styles are\n * detected.\n *\n * In CSS there exist properties that cannot be animated within a keyframe animation\n * (whether it be via CSS keyframes or web-animations) and the animation implementation\n * will ignore them. This function is designed to detect those special cased styles and\n * return a container that will be executed at the start and end of the animation.\n *\n * @returns an instance of `SpecialCasedStyles` if any special styles are detected otherwise `null`\n */\nexport function packageNonAnimatableStyles(\n    element: any, styles: {[key: string]: any}|{[key: string]: any}[]): SpecialCasedStyles|null {\n  let startStyles: {[key: string]: any}|null = null;\n  let endStyles: {[key: string]: any}|null = null;\n  if (Array.isArray(styles) && styles.length) {\n    startStyles = filterNonAnimatableStyles(styles[0]);\n    if (styles.length > 1) {\n      endStyles = filterNonAnimatableStyles(styles[styles.length - 1]);\n    }\n  } else if (styles) {\n    startStyles = filterNonAnimatableStyles(styles);\n  }\n\n  return (startStyles || endStyles) ? new SpecialCasedStyles(element, startStyles, endStyles) :\n                                      null;\n}\n\n/**\n * Designed to be executed during a keyframe-based animation to apply any special-cased styles.\n *\n * When started (when the `start()` method is run) then the provided `startStyles`\n * will be applied. When finished (when the `finish()` method is called) the\n * `endStyles` will be applied as well any any starting styles. Finally when\n * `destroy()` is called then all styles will be removed.\n */\nexport class SpecialCasedStyles {\n  static initialStylesByElement = new WeakMap<any, {[key: string]: any}>();\n\n  private _state = SpecialCasedStylesState.Pending;\n  private _initialStyles!: {[key: string]: any};\n\n  constructor(\n      private _element: any, private _startStyles: {[key: string]: any}|null,\n      private _endStyles: {[key: string]: any}|null) {\n    let initialStyles = SpecialCasedStyles.initialStylesByElement.get(_element);\n    if (!initialStyles) {\n      SpecialCasedStyles.initialStylesByElement.set(_element, initialStyles = {});\n    }\n    this._initialStyles = initialStyles;\n  }\n\n  start() {\n    if (this._state < SpecialCasedStylesState.Started) {\n      if (this._startStyles) {\n        setStyles(this._element, this._startStyles, this._initialStyles);\n      }\n      this._state = SpecialCasedStylesState.Started;\n    }\n  }\n\n  finish() {\n    this.start();\n    if (this._state < SpecialCasedStylesState.Finished) {\n      setStyles(this._element, this._initialStyles);\n      if (this._endStyles) {\n        setStyles(this._element, this._endStyles);\n        this._endStyles = null;\n      }\n      this._state = SpecialCasedStylesState.Started;\n    }\n  }\n\n  destroy() {\n    this.finish();\n    if (this._state < SpecialCasedStylesState.Destroyed) {\n      SpecialCasedStyles.initialStylesByElement.delete(this._element);\n      if (this._startStyles) {\n        eraseStyles(this._element, this._startStyles);\n        this._endStyles = null;\n      }\n      if (this._endStyles) {\n        eraseStyles(this._element, this._endStyles);\n        this._endStyles = null;\n      }\n      setStyles(this._element, this._initialStyles);\n      this._state = SpecialCasedStylesState.Destroyed;\n    }\n  }\n}\n\n/**\n * An enum of states reflective of what the status of `SpecialCasedStyles` is.\n *\n * Depending on how `SpecialCasedStyles` is interacted with, the start and end\n * styles may not be applied in the same way. This enum ensures that if and when\n * the ending styles are applied then the starting styles are applied. It is\n * also used to reflect what the current status of the special cased styles are\n * which helps prevent the starting/ending styles not be applied twice. It is\n * also used to cleanup the styles once `SpecialCasedStyles` is destroyed.\n */\nconst enum SpecialCasedStylesState {\n  Pending = 0,\n  Started = 1,\n  Finished = 2,\n  Destroyed = 3,\n}\n\nfunction filterNonAnimatableStyles(styles: {[key: string]: any}) {\n  let result: {[key: string]: any}|null = null;\n  const props = Object.keys(styles);\n  for (let i = 0; i < props.length; i++) {\n    const prop = props[i];\n    if (isNonAnimatableStyle(prop)) {\n      result = result || {};\n      result[prop] = styles[prop];\n    }\n  }\n  return result;\n}\n\nfunction isNonAnimatableStyle(prop: string) {\n  return prop === 'display' || prop === 'position';\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nconst ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nconst ANIMATION_PROP = 'animation';\nconst ANIMATIONEND_EVENT = 'animationend';\nconst ONE_SECOND = 1000;\n\nexport class ElementAnimationStyleHandler {\n  private readonly _eventFn: (e: any) => any;\n  private _finished = false;\n  private _destroyed = false;\n  private _startTime = 0;\n  private _position = 0;\n\n  constructor(\n      private readonly _element: any, private readonly _name: string,\n      private readonly _duration: number, private readonly _delay: number,\n      private readonly _easing: string, private readonly _fillMode: ''|'both'|'forwards',\n      private readonly _onDoneFn: () => any) {\n    this._eventFn = (e) => this._handleCallback(e);\n  }\n\n  apply() {\n    applyKeyframeAnimation(\n        this._element,\n        `${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${\n            this._name}`);\n    addRemoveAnimationEvent(this._element, this._eventFn, false);\n    this._startTime = Date.now();\n  }\n\n  pause() {\n    playPauseAnimation(this._element, this._name, 'paused');\n  }\n\n  resume() {\n    playPauseAnimation(this._element, this._name, 'running');\n  }\n\n  setPosition(position: number) {\n    const index = findIndexForAnimation(this._element, this._name);\n    this._position = position * this._duration;\n    setAnimationStyle(this._element, 'Delay', `-${this._position}ms`, index);\n  }\n\n  getPosition() {\n    return this._position;\n  }\n\n  private _handleCallback(event: any) {\n    const timestamp = event._ngTestManualTimestamp || Date.now();\n    const elapsedTime =\n        parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND;\n    if (event.animationName == this._name &&\n        Math.max(timestamp - this._startTime, 0) >= this._delay && elapsedTime >= this._duration) {\n      this.finish();\n    }\n  }\n\n  finish() {\n    if (this._finished) return;\n    this._finished = true;\n    this._onDoneFn();\n    addRemoveAnimationEvent(this._element, this._eventFn, true);\n  }\n\n  destroy() {\n    if (this._destroyed) return;\n    this._destroyed = true;\n    this.finish();\n    removeKeyframeAnimation(this._element, this._name);\n  }\n}\n\nfunction playPauseAnimation(element: any, name: string, status: 'running'|'paused') {\n  const index = findIndexForAnimation(element, name);\n  setAnimationStyle(element, 'PlayState', status, index);\n}\n\nfunction applyKeyframeAnimation(element: any, value: string): number {\n  const anim = getAnimationStyle(element, '').trim();\n  let index = 0;\n  if (anim.length) {\n    index = countChars(anim, ',') + 1;\n    value = `${anim}, ${value}`;\n  }\n  setAnimationStyle(element, '', value);\n  return index;\n}\n\nfunction removeKeyframeAnimation(element: any, name: string) {\n  const anim = getAnimationStyle(element, '');\n  const tokens = anim.split(',');\n  const index = findMatchingTokenIndex(tokens, name);\n  if (index >= 0) {\n    tokens.splice(index, 1);\n    const newValue = tokens.join(',');\n    setAnimationStyle(element, '', newValue);\n  }\n}\n\nfunction findIndexForAnimation(element: any, value: string) {\n  const anim = getAnimationStyle(element, '');\n  if (anim.indexOf(',') > 0) {\n    const tokens = anim.split(',');\n    return findMatchingTokenIndex(tokens, value);\n  }\n  return findMatchingTokenIndex([anim], value);\n}\n\nfunction findMatchingTokenIndex(tokens: string[], searchToken: string): number {\n  for (let i = 0; i < tokens.length; i++) {\n    if (tokens[i].indexOf(searchToken) >= 0) {\n      return i;\n    }\n  }\n  return -1;\n}\n\nfunction addRemoveAnimationEvent(element: any, fn: (e: any) => any, doRemove: boolean) {\n  doRemove ? element.removeEventListener(ANIMATIONEND_EVENT, fn) :\n             element.addEventListener(ANIMATIONEND_EVENT, fn);\n}\n\nfunction setAnimationStyle(element: any, name: string, value: string, index?: number) {\n  const prop = ANIMATION_PROP + name;\n  if (index != null) {\n    const oldValue = element.style[prop];\n    if (oldValue.length) {\n      const tokens = oldValue.split(',');\n      tokens[index] = value;\n      value = tokens.join(',');\n    }\n  }\n  element.style[prop] = value;\n}\n\nfunction getAnimationStyle(element: any, name: string) {\n  return element.style[ANIMATION_PROP + name];\n}\n\nfunction countChars(value: string, char: string): number {\n  let count = 0;\n  for (let i = 0; i < value.length; i++) {\n    const c = value.charAt(i);\n    if (c === char) count++;\n  }\n  return count;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer} from '@angular/animations';\n\nimport {computeStyle} from '../../util';\nimport {SpecialCasedStyles} from '../special_cased_styles';\nimport {ElementAnimationStyleHandler} from './element_animation_style_handler';\n\nconst DEFAULT_FILL_MODE = 'forwards';\nconst DEFAULT_EASING = 'linear';\n\nexport const enum AnimatorControlState {\n  INITIALIZED = 1,\n  STARTED = 2,\n  FINISHED = 3,\n  DESTROYED = 4\n}\n\nexport class CssKeyframesPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n\n  private _started = false;\n  // TODO(issue/24571): remove '!'.\n  private _styler!: ElementAnimationStyleHandler;\n\n  // TODO(issue/24571): remove '!'.\n  public parentPlayer!: AnimationPlayer;\n  public readonly totalTime: number;\n  public readonly easing: string;\n  public currentSnapshot: {[key: string]: string} = {};\n\n  private _state: AnimatorControlState = 0;\n\n  constructor(\n      public readonly element: any, public readonly keyframes: {[key: string]: string|number}[],\n      public readonly animationName: string, private readonly _duration: number,\n      private readonly _delay: number, easing: string,\n      private readonly _finalStyles: {[key: string]: any},\n      private readonly _specialStyles?: SpecialCasedStyles|null) {\n    this.easing = easing || DEFAULT_EASING;\n    this.totalTime = _duration + _delay;\n    this._buildStyler();\n  }\n\n  onStart(fn: () => void): void {\n    this._onStartFns.push(fn);\n  }\n\n  onDone(fn: () => void): void {\n    this._onDoneFns.push(fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    this._onDestroyFns.push(fn);\n  }\n\n  destroy() {\n    this.init();\n    if (this._state >= AnimatorControlState.DESTROYED) return;\n    this._state = AnimatorControlState.DESTROYED;\n    this._styler.destroy();\n    this._flushStartFns();\n    this._flushDoneFns();\n    if (this._specialStyles) {\n      this._specialStyles.destroy();\n    }\n    this._onDestroyFns.forEach(fn => fn());\n    this._onDestroyFns = [];\n  }\n\n  private _flushDoneFns() {\n    this._onDoneFns.forEach(fn => fn());\n    this._onDoneFns = [];\n  }\n\n  private _flushStartFns() {\n    this._onStartFns.forEach(fn => fn());\n    this._onStartFns = [];\n  }\n\n  finish() {\n    this.init();\n    if (this._state >= AnimatorControlState.FINISHED) return;\n    this._state = AnimatorControlState.FINISHED;\n    this._styler.finish();\n    this._flushStartFns();\n    if (this._specialStyles) {\n      this._specialStyles.finish();\n    }\n    this._flushDoneFns();\n  }\n\n  setPosition(value: number) {\n    this._styler.setPosition(value);\n  }\n\n  getPosition(): number {\n    return this._styler.getPosition();\n  }\n\n  hasStarted(): boolean {\n    return this._state >= AnimatorControlState.STARTED;\n  }\n  init(): void {\n    if (this._state >= AnimatorControlState.INITIALIZED) return;\n    this._state = AnimatorControlState.INITIALIZED;\n    const elm = this.element;\n    this._styler.apply();\n    if (this._delay) {\n      this._styler.pause();\n    }\n  }\n\n  play(): void {\n    this.init();\n    if (!this.hasStarted()) {\n      this._flushStartFns();\n      this._state = AnimatorControlState.STARTED;\n      if (this._specialStyles) {\n        this._specialStyles.start();\n      }\n    }\n    this._styler.resume();\n  }\n\n  pause(): void {\n    this.init();\n    this._styler.pause();\n  }\n  restart(): void {\n    this.reset();\n    this.play();\n  }\n  reset(): void {\n    this._styler.destroy();\n    this._buildStyler();\n    this._styler.apply();\n  }\n\n  private _buildStyler() {\n    this._styler = new ElementAnimationStyleHandler(\n        this.element, this.animationName, this._duration, this._delay, this.easing,\n        DEFAULT_FILL_MODE, () => this.finish());\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n\n  beforeDestroy() {\n    this.init();\n    const styles: {[key: string]: string} = {};\n    if (this.hasStarted()) {\n      const finished = this._state >= AnimatorControlState.FINISHED;\n      Object.keys(this._finalStyles).forEach(prop => {\n        if (prop != 'offset') {\n          styles[prop] = finished ? this._finalStyles[prop] : computeStyle(this.element, prop);\n        }\n      });\n    }\n    this.currentSnapshot = styles;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NoopAnimationPlayer} from '@angular/animations';\nimport {hypenatePropsObject} from '../shared';\n\nexport class DirectStylePlayer extends NoopAnimationPlayer {\n  private _startingStyles: {[key: string]: any}|null = {};\n  private __initialized = false;\n  private _styles: {[key: string]: any};\n\n  constructor(public element: any, styles: {[key: string]: any}) {\n    super();\n    this._styles = hypenatePropsObject(styles);\n  }\n\n  init() {\n    if (this.__initialized || !this._startingStyles) return;\n    this.__initialized = true;\n    Object.keys(this._styles).forEach(prop => {\n      this._startingStyles![prop] = this.element.style[prop];\n    });\n    super.init();\n  }\n\n  play() {\n    if (!this._startingStyles) return;\n    this.init();\n    Object.keys(this._styles)\n        .forEach(prop => this.element.style.setProperty(prop, this._styles[prop]));\n    super.play();\n  }\n\n  destroy() {\n    if (!this._startingStyles) return;\n    Object.keys(this._startingStyles).forEach(prop => {\n      const value = this._startingStyles![prop];\n      if (value) {\n        this.element.style.setProperty(prop, value);\n      } else {\n        this.element.style.removeProperty(prop);\n      }\n    });\n    this._startingStyles = null;\n    super.destroy();\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, ɵStyleData} from '@angular/animations';\n\nimport {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, computeStyle} from '../../util';\nimport {AnimationDriver} from '../animation_driver';\nimport {containsElement, hypenatePropsObject, invokeQuery, matchesElement, validateStyleProperty} from '../shared';\nimport {packageNonAnimatableStyles} from '../special_cased_styles';\n\nimport {CssKeyframesPlayer} from './css_keyframes_player';\nimport {DirectStylePlayer} from './direct_style_player';\n\nconst KEYFRAMES_NAME_PREFIX = 'gen_css_kf_';\nconst TAB_SPACE = ' ';\n\nexport class CssKeyframesDriver implements AnimationDriver {\n  private _count = 0;\n  private readonly _head: any = document.querySelector('head');\n  private _warningIssued = false;\n\n  validateStyleProperty(prop: string): boolean {\n    return validateStyleProperty(prop);\n  }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean {\n    return containsElement(elm1, elm2);\n  }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return (window.getComputedStyle(element) as any)[prop] as string;\n  }\n\n  buildKeyframeElement(element: any, name: string, keyframes: {[key: string]: any}[]): any {\n    keyframes = keyframes.map(kf => hypenatePropsObject(kf));\n    let keyframeStr = `@keyframes ${name} {\\n`;\n    let tab = '';\n    keyframes.forEach(kf => {\n      tab = TAB_SPACE;\n      const offset = parseFloat(kf['offset']);\n      keyframeStr += `${tab}${offset * 100}% {\\n`;\n      tab += TAB_SPACE;\n      Object.keys(kf).forEach(prop => {\n        const value = kf[prop];\n        switch (prop) {\n          case 'offset':\n            return;\n          case 'easing':\n            if (value) {\n              keyframeStr += `${tab}animation-timing-function: ${value};\\n`;\n            }\n            return;\n          default:\n            keyframeStr += `${tab}${prop}: ${value};\\n`;\n            return;\n        }\n      });\n      keyframeStr += `${tab}}\\n`;\n    });\n    keyframeStr += `}\\n`;\n\n    const kfElm = document.createElement('style');\n    kfElm.innerHTML = keyframeStr;\n    return kfElm;\n  }\n\n  animate(\n      element: any, keyframes: ɵStyleData[], duration: number, delay: number, easing: string,\n      previousPlayers: AnimationPlayer[] = [], scrubberAccessRequested?: boolean): AnimationPlayer {\n    if (scrubberAccessRequested) {\n      this._notifyFaultyScrubber();\n    }\n\n    const previousCssKeyframePlayers = <CssKeyframesPlayer[]>previousPlayers.filter(\n        player => player instanceof CssKeyframesPlayer);\n\n    const previousStyles: {[key: string]: any} = {};\n\n    if (allowPreviousPlayerStylesMerge(duration, delay)) {\n      previousCssKeyframePlayers.forEach(player => {\n        let styles = player.currentSnapshot;\n        Object.keys(styles).forEach(prop => previousStyles[prop] = styles[prop]);\n      });\n    }\n\n    keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n    const finalStyles = flattenKeyframesIntoStyles(keyframes);\n\n    // if there is no animation then there is no point in applying\n    // styles and waiting for an event to get fired. This causes lag.\n    // It's better to just directly apply the styles to the element\n    // via the direct styling animation player.\n    if (duration == 0) {\n      return new DirectStylePlayer(element, finalStyles);\n    }\n\n    const animationName = `${KEYFRAMES_NAME_PREFIX}${this._count++}`;\n    const kfElm = this.buildKeyframeElement(element, animationName, keyframes);\n    document.querySelector('head')!.appendChild(kfElm);\n\n    const specialStyles = packageNonAnimatableStyles(element, keyframes);\n    const player = new CssKeyframesPlayer(\n        element, keyframes, animationName, duration, delay, easing, finalStyles, specialStyles);\n\n    player.onDestroy(() => removeElement(kfElm));\n    return player;\n  }\n\n  private _notifyFaultyScrubber() {\n    if (!this._warningIssued) {\n      console.warn(\n          '@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\\n',\n          '  visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill.');\n      this._warningIssued = true;\n    }\n  }\n}\n\nfunction flattenKeyframesIntoStyles(keyframes: null|{[key: string]: any}|\n                                    {[key: string]: any}[]): {[key: string]: any} {\n  let flatKeyframes: {[key: string]: any} = {};\n  if (keyframes) {\n    const kfs = Array.isArray(keyframes) ? keyframes : [keyframes];\n    kfs.forEach(kf => {\n      Object.keys(kf).forEach(prop => {\n        if (prop == 'offset' || prop == 'easing') return;\n        flatKeyframes[prop] = kf[prop];\n      });\n    });\n  }\n  return flatKeyframes;\n}\n\nfunction removeElement(node: any) {\n  node.parentNode.removeChild(node);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer} from '@angular/animations';\n\nimport {computeStyle} from '../../util';\nimport {SpecialCasedStyles} from '../special_cased_styles';\n\nimport {DOMAnimation} from './dom_animation';\n\nexport class WebAnimationsPlayer implements AnimationPlayer {\n  private _onDoneFns: Function[] = [];\n  private _onStartFns: Function[] = [];\n  private _onDestroyFns: Function[] = [];\n  private _duration: number;\n  private _delay: number;\n  private _initialized = false;\n  private _finished = false;\n  private _started = false;\n  private _destroyed = false;\n  // TODO(issue/24571): remove '!'.\n  private _finalKeyframe!: {[key: string]: string|number};\n\n  // TODO(issue/24571): remove '!'.\n  public readonly domPlayer!: DOMAnimation;\n  public time = 0;\n\n  public parentPlayer: AnimationPlayer|null = null;\n  public currentSnapshot: {[styleName: string]: string|number} = {};\n\n  constructor(\n      public element: any, public keyframes: {[key: string]: string|number}[],\n      public options: {[key: string]: string|number},\n      private _specialStyles?: SpecialCasedStyles|null) {\n    this._duration = <number>options['duration'];\n    this._delay = <number>options['delay'] || 0;\n    this.time = this._duration + this._delay;\n  }\n\n  private _onFinish() {\n    if (!this._finished) {\n      this._finished = true;\n      this._onDoneFns.forEach(fn => fn());\n      this._onDoneFns = [];\n    }\n  }\n\n  init(): void {\n    this._buildPlayer();\n    this._preparePlayerBeforeStart();\n  }\n\n  private _buildPlayer(): void {\n    if (this._initialized) return;\n    this._initialized = true;\n\n    const keyframes = this.keyframes;\n    (this as {domPlayer: DOMAnimation}).domPlayer =\n        this._triggerWebAnimation(this.element, keyframes, this.options);\n    this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};\n    this.domPlayer.addEventListener('finish', () => this._onFinish());\n  }\n\n  private _preparePlayerBeforeStart() {\n    // this is required so that the player doesn't start to animate right away\n    if (this._delay) {\n      this._resetDomPlayerState();\n    } else {\n      this.domPlayer.pause();\n    }\n  }\n\n  /** @internal */\n  _triggerWebAnimation(element: any, keyframes: any[], options: any): DOMAnimation {\n    // jscompiler doesn't seem to know animate is a native property because it's not fully\n    // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n    return element['animate'](keyframes, options) as DOMAnimation;\n  }\n\n  onStart(fn: () => void): void {\n    this._onStartFns.push(fn);\n  }\n\n  onDone(fn: () => void): void {\n    this._onDoneFns.push(fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    this._onDestroyFns.push(fn);\n  }\n\n  play(): void {\n    this._buildPlayer();\n    if (!this.hasStarted()) {\n      this._onStartFns.forEach(fn => fn());\n      this._onStartFns = [];\n      this._started = true;\n      if (this._specialStyles) {\n        this._specialStyles.start();\n      }\n    }\n    this.domPlayer.play();\n  }\n\n  pause(): void {\n    this.init();\n    this.domPlayer.pause();\n  }\n\n  finish(): void {\n    this.init();\n    if (this._specialStyles) {\n      this._specialStyles.finish();\n    }\n    this._onFinish();\n    this.domPlayer.finish();\n  }\n\n  reset(): void {\n    this._resetDomPlayerState();\n    this._destroyed = false;\n    this._finished = false;\n    this._started = false;\n  }\n\n  private _resetDomPlayerState() {\n    if (this.domPlayer) {\n      this.domPlayer.cancel();\n    }\n  }\n\n  restart(): void {\n    this.reset();\n    this.play();\n  }\n\n  hasStarted(): boolean {\n    return this._started;\n  }\n\n  destroy(): void {\n    if (!this._destroyed) {\n      this._destroyed = true;\n      this._resetDomPlayerState();\n      this._onFinish();\n      if (this._specialStyles) {\n        this._specialStyles.destroy();\n      }\n      this._onDestroyFns.forEach(fn => fn());\n      this._onDestroyFns = [];\n    }\n  }\n\n  setPosition(p: number): void {\n    this.domPlayer.currentTime = p * this.time;\n  }\n\n  getPosition(): number {\n    return this.domPlayer.currentTime / this.time;\n  }\n\n  get totalTime(): number {\n    return this._delay + this._duration;\n  }\n\n  beforeDestroy() {\n    const styles: {[key: string]: string|number} = {};\n    if (this.hasStarted()) {\n      Object.keys(this._finalKeyframe).forEach(prop => {\n        if (prop != 'offset') {\n          styles[prop] =\n              this._finished ? this._finalKeyframe[prop] : computeStyle(this.element, prop);\n        }\n      });\n    }\n    this.currentSnapshot = styles;\n  }\n\n  /** @internal */\n  triggerCallback(phaseName: string): void {\n    const methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n    methods.forEach(fn => fn());\n    methods.length = 0;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, ɵStyleData} from '@angular/animations';\n\nimport {allowPreviousPlayerStylesMerge, balancePreviousStylesIntoKeyframes, copyStyles} from '../../util';\nimport {AnimationDriver} from '../animation_driver';\nimport {CssKeyframesDriver} from '../css_keyframes/css_keyframes_driver';\nimport {containsElement, invokeQuery, isBrowser, matchesElement, validateStyleProperty} from '../shared';\nimport {packageNonAnimatableStyles} from '../special_cased_styles';\n\nimport {WebAnimationsPlayer} from './web_animations_player';\n\nexport class WebAnimationsDriver implements AnimationDriver {\n  private _isNativeImpl = /\\{\\s*\\[native\\s+code\\]\\s*\\}/.test(getElementAnimateFn().toString());\n  private _cssKeyframesDriver = new CssKeyframesDriver();\n\n  validateStyleProperty(prop: string): boolean {\n    return validateStyleProperty(prop);\n  }\n\n  matchesElement(element: any, selector: string): boolean {\n    return matchesElement(element, selector);\n  }\n\n  containsElement(elm1: any, elm2: any): boolean {\n    return containsElement(elm1, elm2);\n  }\n\n  query(element: any, selector: string, multi: boolean): any[] {\n    return invokeQuery(element, selector, multi);\n  }\n\n  computeStyle(element: any, prop: string, defaultValue?: string): string {\n    return (window.getComputedStyle(element) as any)[prop] as string;\n  }\n\n  overrideWebAnimationsSupport(supported: boolean) {\n    this._isNativeImpl = supported;\n  }\n\n  animate(\n      element: any, keyframes: ɵStyleData[], duration: number, delay: number, easing: string,\n      previousPlayers: AnimationPlayer[] = [], scrubberAccessRequested?: boolean): AnimationPlayer {\n    const useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;\n    if (useKeyframes) {\n      return this._cssKeyframesDriver.animate(\n          element, keyframes, duration, delay, easing, previousPlayers);\n    }\n\n    const fill = delay == 0 ? 'both' : 'forwards';\n    const playerOptions: {[key: string]: string|number} = {duration, delay, fill};\n    // we check for this to avoid having a null|undefined value be present\n    // for the easing (which results in an error for certain browsers #9752)\n    if (easing) {\n      playerOptions['easing'] = easing;\n    }\n\n    const previousStyles: {[key: string]: any} = {};\n    const previousWebAnimationPlayers = <WebAnimationsPlayer[]>previousPlayers.filter(\n        player => player instanceof WebAnimationsPlayer);\n\n    if (allowPreviousPlayerStylesMerge(duration, delay)) {\n      previousWebAnimationPlayers.forEach(player => {\n        let styles = player.currentSnapshot;\n        Object.keys(styles).forEach(prop => previousStyles[prop] = styles[prop]);\n      });\n    }\n\n    keyframes = keyframes.map(styles => copyStyles(styles, false));\n    keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n    const specialStyles = packageNonAnimatableStyles(element, keyframes);\n    return new WebAnimationsPlayer(element, keyframes, playerOptions, specialStyles);\n  }\n}\n\nexport function supportsWebAnimations() {\n  return typeof getElementAnimateFn() === 'function';\n}\n\nfunction getElementAnimateFn(): any {\n  return (isBrowser() && (<any>Element).prototype['animate']) || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {Animation as ɵAnimation} from './dsl/animation';\nexport {AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer} from './dsl/style_normalization/animation_style_normalizer';\nexport {WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer} from './dsl/style_normalization/web_animations_style_normalizer';\nexport {NoopAnimationDriver as ɵNoopAnimationDriver} from './render/animation_driver';\nexport {AnimationEngine as ɵAnimationEngine} from './render/animation_engine_next';\nexport {CssKeyframesDriver as ɵCssKeyframesDriver} from './render/css_keyframes/css_keyframes_driver';\nexport {CssKeyframesPlayer as ɵCssKeyframesPlayer} from './render/css_keyframes/css_keyframes_player';\nexport {containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, matchesElement as ɵmatchesElement, validateStyleProperty as ɵvalidateStyleProperty} from './render/shared';\nexport {supportsWebAnimations as ɵsupportsWebAnimations, WebAnimationsDriver as ɵWebAnimationsDriver} from './render/web_animations/web_animations_driver';\nexport {WebAnimationsPlayer as ɵWebAnimationsPlayer} from './render/web_animations/web_animations_player';\nexport {allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge} from './util';\n","import { isArray } from '../util/isArray';\nimport { CombineLatestOperator } from '../observable/combineLatest';\nimport { from } from '../observable/from';\nconst none = {};\nexport function combineLatest(...observables) {\n    let project = null;\n    if (typeof observables[observables.length - 1] === 'function') {\n        project = observables.pop();\n    }\n    if (observables.length === 1 && isArray(observables[0])) {\n        observables = observables[0].slice();\n    }\n    return (source) => source.lift.call(from([source, ...observables]), new CombineLatestOperator(project));\n}\n//# sourceMappingURL=combineLatest.js.map","export default function _getPrototypeOf(o) {\n  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  };\n  return _getPrototypeOf(o);\n}","import { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport const empty = {\n    closed: true,\n    next(value) { },\n    error(err) {\n        if (config.useDeprecatedSynchronousErrorHandling) {\n            throw err;\n        }\n        else {\n            hostReportError(err);\n        }\n    },\n    complete() { }\n};\n//# sourceMappingURL=Observer.js.map","import { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { defaultThrottleConfig } from './throttle';\nexport function throttleTime(duration, scheduler = async, config = defaultThrottleConfig) {\n    return (source) => source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing));\n}\nclass ThrottleTimeOperator {\n    constructor(duration, scheduler, leading, trailing) {\n        this.duration = duration;\n        this.scheduler = scheduler;\n        this.leading = leading;\n        this.trailing = trailing;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n    }\n}\nclass ThrottleTimeSubscriber extends Subscriber {\n    constructor(destination, duration, scheduler, leading, trailing) {\n        super(destination);\n        this.duration = duration;\n        this.scheduler = scheduler;\n        this.leading = leading;\n        this.trailing = trailing;\n        this._hasTrailingValue = false;\n        this._trailingValue = null;\n    }\n    _next(value) {\n        if (this.throttled) {\n            if (this.trailing) {\n                this._trailingValue = value;\n                this._hasTrailingValue = true;\n            }\n        }\n        else {\n            this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));\n            if (this.leading) {\n                this.destination.next(value);\n            }\n            else if (this.trailing) {\n                this._trailingValue = value;\n                this._hasTrailingValue = true;\n            }\n        }\n    }\n    _complete() {\n        if (this._hasTrailingValue) {\n            this.destination.next(this._trailingValue);\n            this.destination.complete();\n        }\n        else {\n            this.destination.complete();\n        }\n    }\n    clearThrottle() {\n        const throttled = this.throttled;\n        if (throttled) {\n            if (this.trailing && this._hasTrailingValue) {\n                this.destination.next(this._trailingValue);\n                this._trailingValue = null;\n                this._hasTrailingValue = false;\n            }\n            throttled.unsubscribe();\n            this.remove(throttled);\n            this.throttled = null;\n        }\n    }\n}\nfunction dispatchNext(arg) {\n    const { subscriber } = arg;\n    subscriber.clearThrottle();\n}\n//# sourceMappingURL=throttleTime.js.map","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function pairs(obj, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscriber => {\n            const keys = Object.keys(obj);\n            for (let i = 0; i < keys.length && !subscriber.closed; i++) {\n                const key = keys[i];\n                if (obj.hasOwnProperty(key)) {\n                    subscriber.next([key, obj[key]]);\n                }\n            }\n            subscriber.complete();\n        });\n    }\n    else {\n        return new Observable(subscriber => {\n            const keys = Object.keys(obj);\n            const subscription = new Subscription();\n            subscription.add(scheduler.schedule(dispatch, 0, { keys, index: 0, subscriber, subscription, obj }));\n            return subscription;\n        });\n    }\n}\nexport function dispatch(state) {\n    const { keys, index, subscriber, subscription, obj } = state;\n    if (!subscriber.closed) {\n        if (index < keys.length) {\n            const key = keys[index];\n            subscriber.next([key, obj[key]]);\n            subscription.add(this.schedule({ keys, index: index + 1, subscriber, subscription, obj }));\n        }\n        else {\n            subscriber.complete();\n        }\n    }\n}\n//# sourceMappingURL=pairs.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route} from './config';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from './router_state';\n\n/**\n * Identifies the call or event that triggered a navigation.\n *\n * * 'imperative': Triggered by `router.navigateByUrl()` or `router.navigate()`.\n * * 'popstate' : Triggered by a `popstate` event.\n * * 'hashchange'-: Triggered by a `hashchange` event.\n *\n * @publicApi\n */\nexport type NavigationTrigger = 'imperative'|'popstate'|'hashchange';\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * class MyService {\n *   constructor(public router: Router, logger: Logger) {\n *     router.events.pipe(\n *        filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n *     ).subscribe((e: RouterEvent) => {\n *       logger.log(e.id, e.url);\n *     });\n *   }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router#router-events)\n * @publicApi\n */\nexport class RouterEvent {\n  constructor(\n      /** A unique ID that the router assigns to every router navigation. */\n      public id: number,\n      /** The URL that is the destination for this navigation. */\n      public url: string) {}\n}\n\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nexport class NavigationStart extends RouterEvent {\n  /**\n   * Identifies the call or event that triggered the navigation.\n   * An `imperative` trigger is a call to `router.navigateByUrl()` or `router.navigate()`.\n   *\n   * @see `NavigationEnd`\n   * @see `NavigationCancel`\n   * @see `NavigationError`\n   */\n  navigationTrigger?: 'imperative'|'popstate'|'hashchange';\n\n  /**\n   * The navigation state that was previously supplied to the `pushState` call,\n   * when the navigation is triggered by a `popstate` event. Otherwise null.\n   *\n   * The state object is defined by `NavigationExtras`, and contains any\n   * developer-defined state value, as well as a unique ID that\n   * the router assigns to every router transition/navigation.\n   *\n   * From the perspective of the router, the router never \"goes back\".\n   * When the user clicks on the back button in the browser,\n   * a new navigation ID is created.\n   *\n   * Use the ID in this previous-state object to differentiate between a newly created\n   * state and one returned to by a `popstate` event, so that you can restore some\n   * remembered state, such as scroll position.\n   *\n   */\n  restoredState?: {[k: string]: any, navigationId: number}|null;\n\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      navigationTrigger: 'imperative'|'popstate'|'hashchange' = 'imperative',\n      /** @docsNotRequired */\n      restoredState: {[k: string]: any, navigationId: number}|null = null) {\n    super(id, url);\n    this.navigationTrigger = navigationTrigger;\n    this.restoredState = restoredState;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\nexport class NavigationCancel extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public reason: string) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n  }\n}\n\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationCancel`\n *\n * @publicApi\n */\nexport class NavigationError extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public error: any) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n  }\n}\n\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nexport class RoutesRecognized extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see `GuardsCheckEnd`\n *\n * @publicApi\n */\nexport class GuardsCheckStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see `GuardsCheckStart`\n *\n * @publicApi\n */\nexport class GuardsCheckEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot,\n      /** @docsNotRequired */\n      public shouldActivate: boolean) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n  }\n}\n\n/**\n * An event triggered at the the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see `ResolveEnd`\n *\n * @publicApi\n */\nexport class ResolveStart extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see `ResolveStart`.\n *\n * @publicApi\n */\nexport class ResolveEnd extends RouterEvent {\n  constructor(\n      /** @docsNotRequired */\n      id: number,\n      /** @docsNotRequired */\n      url: string,\n      /** @docsNotRequired */\n      public urlAfterRedirects: string,\n      /** @docsNotRequired */\n      public state: RouterStateSnapshot) {\n    super(id, url);\n  }\n\n  toString(): string {\n    return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${\n        this.urlAfterRedirects}', state: ${this.state})`;\n  }\n}\n\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see `RouteConfigLoadEnd`\n *\n * @publicApi\n */\nexport class RouteConfigLoadStart {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadStart(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see `RouteConfigLoadStart`\n *\n * @publicApi\n */\nexport class RouteConfigLoadEnd {\n  constructor(\n      /** @docsNotRequired */\n      public route: Route) {}\n  toString(): string {\n    return `RouteConfigLoadEnd(path: ${this.route.path})`;\n  }\n}\n\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see  `ChildActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ChildActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see `ChildActivationStart`\n * @see `ResolveStart`\n * @publicApi\n */\nexport class ChildActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ChildActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationEnd`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationStart {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationStart(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see `ActivationStart`\n * @see `ResolveStart`\n *\n * @publicApi\n */\nexport class ActivationEnd {\n  constructor(\n      /** @docsNotRequired */\n      public snapshot: ActivatedRouteSnapshot) {}\n  toString(): string {\n    const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n    return `ActivationEnd(path: '${path}')`;\n  }\n}\n\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nexport class Scroll {\n  constructor(\n      /** @docsNotRequired */\n      readonly routerEvent: NavigationEnd,\n\n      /** @docsNotRequired */\n      readonly position: [number, number]|null,\n\n      /** @docsNotRequired */\n      readonly anchor: string|null) {}\n\n  toString(): string {\n    const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n    return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n  }\n}\n\n/**\n * Router events that allow you to track the lifecycle of the router.\n *\n * The events occur in the following sequence:\n *\n * * [NavigationStart](api/router/NavigationStart): Navigation starts.\n * * [RouteConfigLoadStart](api/router/RouteConfigLoadStart): Before\n * the router [lazy loads](/guide/router#lazy-loading) a route configuration.\n * * [RouteConfigLoadEnd](api/router/RouteConfigLoadEnd): After a route has been lazy loaded.\n * * [RoutesRecognized](api/router/RoutesRecognized): When the router parses the URL\n * and the routes are recognized.\n * * [GuardsCheckStart](api/router/GuardsCheckStart): When the router begins the *guards*\n * phase of routing.\n * * [ChildActivationStart](api/router/ChildActivationStart): When the router\n * begins activating a route's children.\n * * [ActivationStart](api/router/ActivationStart): When the router begins activating a route.\n * * [GuardsCheckEnd](api/router/GuardsCheckEnd): When the router finishes the *guards*\n * phase of routing successfully.\n * * [ResolveStart](api/router/ResolveStart): When the router begins the *resolve*\n * phase of routing.\n * * [ResolveEnd](api/router/ResolveEnd): When the router finishes the *resolve*\n * phase of routing successfuly.\n * * [ChildActivationEnd](api/router/ChildActivationEnd): When the router finishes\n * activating a route's children.\n * * [ActivationEnd](api/router/ActivationStart): When the router finishes activating a route.\n * * [NavigationEnd](api/router/NavigationEnd): When navigation ends successfully.\n * * [NavigationCancel](api/router/NavigationCancel): When navigation is canceled.\n * * [NavigationError](api/router/NavigationError): When navigation fails\n * due to an unexpected error.\n * * [Scroll](api/router/Scroll): When the user scrolls.\n *\n * @publicApi\n */\nexport type Event = RouterEvent|RouteConfigLoadStart|RouteConfigLoadEnd|ChildActivationStart|\n    ChildActivationEnd|ActivationStart|ActivationEnd|Scroll;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Route, UrlMatchResult} from './config';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nexport const PRIMARY_OUTLET = 'primary';\n\n/**\n * A collection of matrix and query URL parameters.\n * @see `convertToParamMap()`\n * @see `ParamMap`\n *\n * @publicApi\n */\nexport type Params = {\n  [key: string]: any;\n};\n\n/**\n * A map that provides access to the required and optional parameters\n * specific to a route.\n * The map supports retrieving a single value with `get()`\n * or multiple values with `getAll()`.\n *\n * @see [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n *\n * @publicApi\n */\nexport interface ParamMap {\n  /**\n   * Reports whether the map contains a given parameter.\n   * @param name The parameter name.\n   * @returns True if the map contains the given parameter, false otherwise.\n   */\n  has(name: string): boolean;\n  /**\n   * Retrieves a single value for a parameter.\n   * @param name The parameter name.\n   * @return The parameter's single value,\n   * or the first value if the parameter has multiple values,\n   * or `null` when there is no such parameter.\n   */\n  get(name: string): string|null;\n  /**\n   * Retrieves multiple values for a parameter.\n   * @param name The parameter name.\n   * @return An array containing one or more values,\n   * or an empty array if there is no such parameter.\n   *\n   */\n  getAll(name: string): string[];\n\n  /** Names of the parameters in the map. */\n  readonly keys: string[];\n}\n\nclass ParamsAsMap implements ParamMap {\n  private params: Params;\n\n  constructor(params: Params) {\n    this.params = params || {};\n  }\n\n  has(name: string): boolean {\n    return Object.prototype.hasOwnProperty.call(this.params, name);\n  }\n\n  get(name: string): string|null {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v[0] : v;\n    }\n\n    return null;\n  }\n\n  getAll(name: string): string[] {\n    if (this.has(name)) {\n      const v = this.params[name];\n      return Array.isArray(v) ? v : [v];\n    }\n\n    return [];\n  }\n\n  get keys(): string[] {\n    return Object.keys(this.params);\n  }\n}\n\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nexport function convertToParamMap(params: Params): ParamMap {\n  return new ParamsAsMap(params);\n}\n\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\n\nexport function navigationCancelingError(message: string) {\n  const error = Error('NavigationCancelingError: ' + message);\n  (error as any)[NAVIGATION_CANCELING_ERROR] = true;\n  return error;\n}\n\nexport function isNavigationCancelingError(error: Error) {\n  return error && (error as any)[NAVIGATION_CANCELING_ERROR];\n}\n\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nexport function defaultUrlMatcher(\n    segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route): UrlMatchResult|null {\n  const parts = route.path!.split('/');\n\n  if (parts.length > segments.length) {\n    // The actual URL is shorter than the config, no match\n    return null;\n  }\n\n  if (route.pathMatch === 'full' &&\n      (segmentGroup.hasChildren() || parts.length < segments.length)) {\n    // The config is longer than the actual URL but we are looking for a full match, return null\n    return null;\n  }\n\n  const posParams: {[key: string]: UrlSegment} = {};\n\n  // Check each config part against the actual URL\n  for (let index = 0; index < parts.length; index++) {\n    const part = parts[index];\n    const segment = segments[index];\n    const isParameter = part.startsWith(':');\n    if (isParameter) {\n      posParams[part.substring(1)] = segment;\n    } else if (part !== segment.path) {\n      // The actual URL part does not match the config, no match\n      return null;\n    }\n  }\n\n  return {consumed: segments.slice(0, parts.length), posParams};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\nimport {concatAll, last as lastValue, map} from 'rxjs/operators';\n\nimport {Params, PRIMARY_OUTLET} from '../shared';\n\nexport function shallowEqualArrays(a: any[], b: any[]): boolean {\n  if (a.length !== b.length) return false;\n  for (let i = 0; i < a.length; ++i) {\n    if (!shallowEqual(a[i], b[i])) return false;\n  }\n  return true;\n}\n\nexport function shallowEqual(a: Params, b: Params): boolean {\n  // Casting Object.keys return values to include `undefined` as there are some cases\n  // in IE 11 where this can happen. Cannot provide a test because the behavior only\n  // exists in certain circumstances in IE 11, therefore doing this cast ensures the\n  // logic is correct for when this edge case is hit.\n  const k1 = Object.keys(a) as string[] | undefined;\n  const k2 = Object.keys(b) as string[] | undefined;\n  if (!k1 || !k2 || k1.length != k2.length) {\n    return false;\n  }\n  let key: string;\n  for (let i = 0; i < k1.length; i++) {\n    key = k1[i];\n    if (!equalArraysOrString(a[key], b[key])) {\n      return false;\n    }\n  }\n  return true;\n}\n\n/**\n * Test equality for arrays of strings or a string.\n */\nexport function equalArraysOrString(a: string|string[], b: string|string[]) {\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    const aSorted = [...a].sort();\n    const bSorted = [...b].sort();\n    return aSorted.every((val, index) => bSorted[index] === val);\n  } else {\n    return a === b;\n  }\n}\n\n/**\n * Flattens single-level nested arrays.\n */\nexport function flatten<T>(arr: T[][]): T[] {\n  return Array.prototype.concat.apply([], arr);\n}\n\n/**\n * Return the last element of an array.\n */\nexport function last<T>(a: T[]): T|null {\n  return a.length > 0 ? a[a.length - 1] : null;\n}\n\n/**\n * Verifys all booleans in an array are `true`.\n */\nexport function and(bools: boolean[]): boolean {\n  return !bools.some(v => !v);\n}\n\nexport function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {\n  for (const prop in map) {\n    if (map.hasOwnProperty(prop)) {\n      callback(map[prop], prop);\n    }\n  }\n}\n\nexport function waitForMap<A, B>(\n    obj: {[k: string]: A}, fn: (k: string, a: A) => Observable<B>): Observable<{[k: string]: B}> {\n  if (Object.keys(obj).length === 0) {\n    return of({});\n  }\n\n  const waitHead: Observable<B>[] = [];\n  const waitTail: Observable<B>[] = [];\n  const res: {[k: string]: B} = {};\n\n  forEach(obj, (a: A, k: string) => {\n    const mapped = fn(k, a).pipe(map((r: B) => res[k] = r));\n    if (k === PRIMARY_OUTLET) {\n      waitHead.push(mapped);\n    } else {\n      waitTail.push(mapped);\n    }\n  });\n\n  // Closure compiler has problem with using spread operator here. So we use \"Array.concat\".\n  // Note that we also need to cast the new promise because TypeScript cannot infer the type\n  // when calling the \"of\" function through \"Function.apply\"\n  return (of.apply(null, waitHead.concat(waitTail)) as Observable<Observable<B>>)\n      .pipe(concatAll(), lastValue(), map(() => res));\n}\n\nexport function wrapIntoObservable<T>(value: T|Promise<T>|Observable<T>): Observable<T> {\n  if (isObservable(value)) {\n    return value;\n  }\n\n  if (isPromise(value)) {\n    // Use `Promise.resolve()` to wrap promise-like instances.\n    // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n    // change detection.\n    return from(Promise.resolve(value));\n  }\n\n  return of(value);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalArraysOrString, forEach, shallowEqual} from './utils/collection';\n\nexport function createEmptyUrlTree() {\n  return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\n\nexport function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean {\n  if (exact) {\n    return equalQueryParams(container.queryParams, containee.queryParams) &&\n        equalSegmentGroups(container.root, containee.root);\n  }\n\n  return containsQueryParams(container.queryParams, containee.queryParams) &&\n      containsSegmentGroup(container.root, containee.root);\n}\n\nfunction equalQueryParams(container: Params, containee: Params): boolean {\n  // TODO: This does not handle array params correctly.\n  return shallowEqual(container, containee);\n}\n\nfunction equalSegmentGroups(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n  if (!equalPath(container.segments, containee.segments)) return false;\n  if (container.numberOfChildren !== containee.numberOfChildren) return false;\n  for (const c in containee.children) {\n    if (!container.children[c]) return false;\n    if (!equalSegmentGroups(container.children[c], containee.children[c])) return false;\n  }\n  return true;\n}\n\nfunction containsQueryParams(container: Params, containee: Params): boolean {\n  return Object.keys(containee).length <= Object.keys(container).length &&\n      Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\n\nfunction containsSegmentGroup(container: UrlSegmentGroup, containee: UrlSegmentGroup): boolean {\n  return containsSegmentGroupHelper(container, containee, containee.segments);\n}\n\nfunction containsSegmentGroupHelper(\n    container: UrlSegmentGroup, containee: UrlSegmentGroup, containeePaths: UrlSegment[]): boolean {\n  if (container.segments.length > containeePaths.length) {\n    const current = container.segments.slice(0, containeePaths.length);\n    if (!equalPath(current, containeePaths)) return false;\n    if (containee.hasChildren()) return false;\n    return true;\n\n  } else if (container.segments.length === containeePaths.length) {\n    if (!equalPath(container.segments, containeePaths)) return false;\n    for (const c in containee.children) {\n      if (!container.children[c]) return false;\n      if (!containsSegmentGroup(container.children[c], containee.children[c])) return false;\n    }\n    return true;\n\n  } else {\n    const current = containeePaths.slice(0, container.segments.length);\n    const next = containeePaths.slice(container.segments.length);\n    if (!equalPath(container.segments, current)) return false;\n    if (!container.children[PRIMARY_OUTLET]) return false;\n    return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree =\n *       router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n *     const f = tree.fragment; // return 'fragment'\n *     const q = tree.queryParams; // returns {debug: 'true'}\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n *     g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n *     g.children['support'].segments; // return 1 segment 'help'\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlTree {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The root segment group of the URL tree */\n      public root: UrlSegmentGroup,\n      /** The query params of the URL */\n      public queryParams: Params,\n      /** The fragment of the URL */\n      public fragment: string|null) {}\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return DEFAULT_SERIALIZER.serialize(this);\n  }\n}\n\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nexport class UrlSegmentGroup {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _sourceSegment!: UrlSegmentGroup;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _segmentIndexShift!: number;\n  /** The parent node in the url tree */\n  parent: UrlSegmentGroup|null = null;\n\n  constructor(\n      /** The URL segments of this group. See `UrlSegment` for more information */\n      public segments: UrlSegment[],\n      /** The list of children of this group */\n      public children: {[key: string]: UrlSegmentGroup}) {\n    forEach(children, (v: any, k: any) => v.parent = this);\n  }\n\n  /** Whether the segment has child segments */\n  hasChildren(): boolean {\n    return this.numberOfChildren > 0;\n  }\n\n  /** Number of child segments */\n  get numberOfChildren(): number {\n    return Object.keys(this.children).length;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePaths(this);\n  }\n}\n\n\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const tree: UrlTree = router.parseUrl('/team;id=33');\n *     const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n *     const s: UrlSegment[] = g.segments;\n *     s[0].path; // returns 'team'\n *     s[0].parameters; // returns {id: 33}\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class UrlSegment {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _parameterMap!: ParamMap;\n\n  constructor(\n      /** The path part of a URL segment */\n      public path: string,\n\n      /** The matrix parameters associated with a segment */\n      public parameters: {[name: string]: string}) {}\n\n  get parameterMap() {\n    if (!this._parameterMap) {\n      this._parameterMap = convertToParamMap(this.parameters);\n    }\n    return this._parameterMap;\n  }\n\n  /** @docsNotRequired */\n  toString(): string {\n    return serializePath(this);\n  }\n}\n\nexport function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\n\nexport function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean {\n  if (as.length !== bs.length) return false;\n  return as.every((a, i) => a.path === bs[i].path);\n}\n\nexport function mapChildrenIntoArray<T>(\n    segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[] {\n  let res: T[] = [];\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet === PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  forEach(segment.children, (child: UrlSegmentGroup, childOutlet: string) => {\n    if (childOutlet !== PRIMARY_OUTLET) {\n      res = res.concat(fn(child, childOutlet));\n    }\n  });\n  return res;\n}\n\n\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nexport abstract class UrlSerializer {\n  /** Parse a url into a `UrlTree` */\n  abstract parse(url: string): UrlTree;\n\n  /** Converts a `UrlTree` into a url */\n  abstract serialize(tree: UrlTree): string;\n}\n\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nexport class DefaultUrlSerializer implements UrlSerializer {\n  /** Parses a url into a `UrlTree` */\n  parse(url: string): UrlTree {\n    const p = new UrlParser(url);\n    return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n  }\n\n  /** Converts a `UrlTree` into a url */\n  serialize(tree: UrlTree): string {\n    const segment = `/${serializeSegment(tree.root, true)}`;\n    const query = serializeQueryParams(tree.queryParams);\n    const fragment =\n        typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment!)}` : '';\n\n    return `${segment}${query}${fragment}`;\n  }\n}\n\nconst DEFAULT_SERIALIZER = new DefaultUrlSerializer();\n\nexport function serializePaths(segment: UrlSegmentGroup): string {\n  return segment.segments.map(p => serializePath(p)).join('/');\n}\n\nfunction serializeSegment(segment: UrlSegmentGroup, root: boolean): string {\n  if (!segment.hasChildren()) {\n    return serializePaths(segment);\n  }\n\n  if (root) {\n    const primary = segment.children[PRIMARY_OUTLET] ?\n        serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n        '';\n    const children: string[] = [];\n\n    forEach(segment.children, (v: UrlSegmentGroup, k: string) => {\n      if (k !== PRIMARY_OUTLET) {\n        children.push(`${k}:${serializeSegment(v, false)}`);\n      }\n    });\n\n    return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n\n  } else {\n    const children = mapChildrenIntoArray(segment, (v: UrlSegmentGroup, k: string) => {\n      if (k === PRIMARY_OUTLET) {\n        return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n      }\n\n      return [`${k}:${serializeSegment(v, false)}`];\n    });\n\n    // use no parenthesis if the only child is a primary outlet route\n    if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n      return `${serializePaths(segment)}/${children[0]}`;\n    }\n\n    return `${serializePaths(segment)}/(${children.join('//')})`;\n  }\n}\n\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s: string): string {\n  return encodeURIComponent(s)\n      .replace(/%40/g, '@')\n      .replace(/%3A/gi, ':')\n      .replace(/%24/g, '$')\n      .replace(/%2C/gi, ',');\n}\n\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriQuery(s: string): string {\n  return encodeUriString(s).replace(/%3B/gi, ';');\n}\n\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriFragment(s: string): string {\n  return encodeURI(s);\n}\n\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nexport function encodeUriSegment(s: string): string {\n  return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\n\nexport function decode(s: string): string {\n  return decodeURIComponent(s);\n}\n\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nexport function decodeQuery(s: string): string {\n  return decode(s.replace(/\\+/g, '%20'));\n}\n\nexport function serializePath(path: UrlSegment): string {\n  return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\n\nfunction serializeMatrixParams(params: {[key: string]: string}): string {\n  return Object.keys(params)\n      .map(key => `;${encodeUriSegment(key)}=${encodeUriSegment(params[key])}`)\n      .join('');\n}\n\nfunction serializeQueryParams(params: {[key: string]: any}): string {\n  const strParams: string[] = Object.keys(params).map((name) => {\n    const value = params[name];\n    return Array.isArray(value) ?\n        value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') :\n        `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n  });\n\n  return strParams.length ? `?${strParams.join('&')}` : '';\n}\n\nconst SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchSegments(str: string): string {\n  const match = str.match(SEGMENT_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str: string): string {\n  const match = str.match(QUERY_PARAM_RE);\n  return match ? match[0] : '';\n}\n\nconst QUERY_PARAM_VALUE_RE = /^[^?&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str: string): string {\n  const match = str.match(QUERY_PARAM_VALUE_RE);\n  return match ? match[0] : '';\n}\n\nclass UrlParser {\n  private remaining: string;\n\n  constructor(private url: string) {\n    this.remaining = url;\n  }\n\n  parseRootSegment(): UrlSegmentGroup {\n    this.consumeOptional('/');\n\n    if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n      return new UrlSegmentGroup([], {});\n    }\n\n    // The root segment group never has segments\n    return new UrlSegmentGroup([], this.parseChildren());\n  }\n\n  parseQueryParams(): Params {\n    const params: Params = {};\n    if (this.consumeOptional('?')) {\n      do {\n        this.parseQueryParam(params);\n      } while (this.consumeOptional('&'));\n    }\n    return params;\n  }\n\n  parseFragment(): string|null {\n    return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n  }\n\n  private parseChildren(): {[outlet: string]: UrlSegmentGroup} {\n    if (this.remaining === '') {\n      return {};\n    }\n\n    this.consumeOptional('/');\n\n    const segments: UrlSegment[] = [];\n    if (!this.peekStartsWith('(')) {\n      segments.push(this.parseSegment());\n    }\n\n    while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n      this.capture('/');\n      segments.push(this.parseSegment());\n    }\n\n    let children: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('/(')) {\n      this.capture('/');\n      children = this.parseParens(true);\n    }\n\n    let res: {[outlet: string]: UrlSegmentGroup} = {};\n    if (this.peekStartsWith('(')) {\n      res = this.parseParens(false);\n    }\n\n    if (segments.length > 0 || Object.keys(children).length > 0) {\n      res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n    }\n\n    return res;\n  }\n\n  // parse a segment with its matrix parameters\n  // ie `name;k1=v1;k2`\n  private parseSegment(): UrlSegment {\n    const path = matchSegments(this.remaining);\n    if (path === '' && this.peekStartsWith(';')) {\n      throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);\n    }\n\n    this.capture(path);\n    return new UrlSegment(decode(path), this.parseMatrixParams());\n  }\n\n  private parseMatrixParams(): {[key: string]: any} {\n    const params: {[key: string]: any} = {};\n    while (this.consumeOptional(';')) {\n      this.parseParam(params);\n    }\n    return params;\n  }\n\n  private parseParam(params: {[key: string]: any}): void {\n    const key = matchSegments(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchSegments(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    params[decode(key)] = decode(value);\n  }\n\n  // Parse a single query parameter `name[=value]`\n  private parseQueryParam(params: Params): void {\n    const key = matchQueryParams(this.remaining);\n    if (!key) {\n      return;\n    }\n    this.capture(key);\n    let value: any = '';\n    if (this.consumeOptional('=')) {\n      const valueMatch = matchUrlQueryParamValue(this.remaining);\n      if (valueMatch) {\n        value = valueMatch;\n        this.capture(value);\n      }\n    }\n\n    const decodedKey = decodeQuery(key);\n    const decodedVal = decodeQuery(value);\n\n    if (params.hasOwnProperty(decodedKey)) {\n      // Append to existing values\n      let currentVal = params[decodedKey];\n      if (!Array.isArray(currentVal)) {\n        currentVal = [currentVal];\n        params[decodedKey] = currentVal;\n      }\n      currentVal.push(decodedVal);\n    } else {\n      // Create a new value\n      params[decodedKey] = decodedVal;\n    }\n  }\n\n  // parse `(a/b//outlet_name:c/d)`\n  private parseParens(allowPrimary: boolean): {[outlet: string]: UrlSegmentGroup} {\n    const segments: {[key: string]: UrlSegmentGroup} = {};\n    this.capture('(');\n\n    while (!this.consumeOptional(')') && this.remaining.length > 0) {\n      const path = matchSegments(this.remaining);\n\n      const next = this.remaining[path.length];\n\n      // if is is not one of these characters, then the segment was unescaped\n      // or the group was not closed\n      if (next !== '/' && next !== ')' && next !== ';') {\n        throw new Error(`Cannot parse url '${this.url}'`);\n      }\n\n      let outletName: string = undefined!;\n      if (path.indexOf(':') > -1) {\n        outletName = path.substr(0, path.indexOf(':'));\n        this.capture(outletName);\n        this.capture(':');\n      } else if (allowPrimary) {\n        outletName = PRIMARY_OUTLET;\n      }\n\n      const children = this.parseChildren();\n      segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n                                                                  new UrlSegmentGroup([], children);\n      this.consumeOptional('//');\n    }\n\n    return segments;\n  }\n\n  private peekStartsWith(str: string): boolean {\n    return this.remaining.startsWith(str);\n  }\n\n  // Consumes the prefix when it is present and returns whether it has been consumed\n  private consumeOptional(str: string): boolean {\n    if (this.peekStartsWith(str)) {\n      this.remaining = this.remaining.substring(str.length);\n      return true;\n    }\n    return false;\n  }\n\n  private capture(str: string): void {\n    if (!this.consumeOptional(str)) {\n      throw new Error(`Expected \"${str}\".`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport class Tree<T> {\n  /** @internal */\n  _root: TreeNode<T>;\n\n  constructor(root: TreeNode<T>) {\n    this._root = root;\n  }\n\n  get root(): T {\n    return this._root.value;\n  }\n\n  /**\n   * @internal\n   */\n  parent(t: T): T|null {\n    const p = this.pathFromRoot(t);\n    return p.length > 1 ? p[p.length - 2] : null;\n  }\n\n  /**\n   * @internal\n   */\n  children(t: T): T[] {\n    const n = findNode(t, this._root);\n    return n ? n.children.map(t => t.value) : [];\n  }\n\n  /**\n   * @internal\n   */\n  firstChild(t: T): T|null {\n    const n = findNode(t, this._root);\n    return n && n.children.length > 0 ? n.children[0].value : null;\n  }\n\n  /**\n   * @internal\n   */\n  siblings(t: T): T[] {\n    const p = findPath(t, this._root);\n    if (p.length < 2) return [];\n\n    const c = p[p.length - 2].children.map(c => c.value);\n    return c.filter(cc => cc !== t);\n  }\n\n  /**\n   * @internal\n   */\n  pathFromRoot(t: T): T[] {\n    return findPath(t, this._root).map(s => s.value);\n  }\n}\n\n\n// DFS for the node matching the value\nfunction findNode<T>(value: T, node: TreeNode<T>): TreeNode<T>|null {\n  if (value === node.value) return node;\n\n  for (const child of node.children) {\n    const node = findNode(value, child);\n    if (node) return node;\n  }\n\n  return null;\n}\n\n// Return the path to the node with the given value using DFS\nfunction findPath<T>(value: T, node: TreeNode<T>): TreeNode<T>[] {\n  if (value === node.value) return [node];\n\n  for (const child of node.children) {\n    const path = findPath(value, child);\n    if (path.length) {\n      path.unshift(node);\n      return path;\n    }\n  }\n\n  return [];\n}\n\nexport class TreeNode<T> {\n  constructor(public value: T, public children: TreeNode<T>[]) {}\n\n  toString(): string {\n    return `TreeNode(${this.value})`;\n  }\n}\n\n// Return the list of T indexed by outlet name\nexport function nodeChildrenAsMap<T extends {outlet: string}>(node: TreeNode<T>|null) {\n  const map: {[outlet: string]: TreeNode<T>} = {};\n\n  if (node) {\n    node.children.forEach(child => map[child.value.outlet] = child);\n  }\n\n  return map;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {BehaviorSubject, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {Data, ResolveData, Route} from './config';\nimport {convertToParamMap, ParamMap, Params, PRIMARY_OUTLET} from './shared';\nimport {equalSegments, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {shallowEqual, shallowEqualArrays} from './utils/collection';\nimport {Tree, TreeNode} from './utils/tree';\n\n\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const root: ActivatedRoute = state.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @see `ActivatedRoute`\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class RouterState extends Tree<ActivatedRoute> {\n  /** @internal */\n  constructor(\n      root: TreeNode<ActivatedRoute>,\n      /** The current snapshot of the router state */\n      public snapshot: RouterStateSnapshot) {\n    super(root);\n    setRouterState(<RouterState>this, root);\n  }\n\n  toString(): string {\n    return this.snapshot.toString();\n  }\n}\n\nexport function createEmptyState(urlTree: UrlTree, rootComponent: Type<any>|null): RouterState {\n  const snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n  const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n  const emptyParams = new BehaviorSubject({});\n  const emptyData = new BehaviorSubject({});\n  const emptyQueryParams = new BehaviorSubject({});\n  const fragment = new BehaviorSubject('');\n  const activated = new ActivatedRoute(\n      emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent,\n      snapshot.root);\n  activated.snapshot = snapshot.root;\n  return new RouterState(new TreeNode<ActivatedRoute>(activated, []), snapshot);\n}\n\nexport function createEmptyStateSnapshot(\n    urlTree: UrlTree, rootComponent: Type<any>|null): RouterStateSnapshot {\n  const emptyParams = {};\n  const emptyData = {};\n  const emptyQueryParams = {};\n  const fragment = '';\n  const activated = new ActivatedRouteSnapshot(\n      [], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null,\n      urlTree.root, -1, {});\n  return new RouterStateSnapshot('', new TreeNode<ActivatedRouteSnapshot>(activated, []));\n}\n\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n *     header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/router#getting-route-information)\n *\n * @publicApi\n */\nexport class ActivatedRoute {\n  /** The current snapshot of this route */\n  snapshot!: ActivatedRouteSnapshot;\n  /** @internal */\n  _futureSnapshot: ActivatedRouteSnapshot;\n  /** @internal */\n  _routerState!: RouterState;\n  /** @internal */\n  _paramMap!: Observable<ParamMap>;\n  /** @internal */\n  _queryParamMap!: Observable<ParamMap>;\n\n  /** @internal */\n  constructor(\n      /** An observable of the URL segments matched by this route. */\n      public url: Observable<UrlSegment[]>,\n      /** An observable of the matrix parameters scoped to this route. */\n      public params: Observable<Params>,\n      /** An observable of the query parameters shared by all the routes. */\n      public queryParams: Observable<Params>,\n      /** An observable of the URL fragment shared by all the routes. */\n      public fragment: Observable<string>,\n      /** An observable of the static and resolved data of this route. */\n      public data: Observable<Data>,\n      /** The outlet name of the route, a constant. */\n      public outlet: string,\n      /** The component of the route, a constant. */\n      // TODO(vsavkin): remove |string\n      public component: Type<any>|string|null, futureSnapshot: ActivatedRouteSnapshot) {\n    this._futureSnapshot = futureSnapshot;\n  }\n\n  /** The configuration used to match this route. */\n  get routeConfig(): Route|null {\n    return this._futureSnapshot.routeConfig;\n  }\n\n  /** The root of the router state. */\n  get root(): ActivatedRoute {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree. */\n  get parent(): ActivatedRoute|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree. */\n  get firstChild(): ActivatedRoute|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree. */\n  get children(): ActivatedRoute[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route. */\n  get pathFromRoot(): ActivatedRoute[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  /**\n   * An Observable that contains a map of the required and optional parameters\n   * specific to the route.\n   * The map supports retrieving single and multiple values from the same parameter.\n   */\n  get paramMap(): Observable<ParamMap> {\n    if (!this._paramMap) {\n      this._paramMap = this.params.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._paramMap;\n  }\n\n  /**\n   * An Observable that contains a map of the query parameters available to all routes.\n   * The map supports retrieving single and multiple values from the query parameter.\n   */\n  get queryParamMap(): Observable<ParamMap> {\n    if (!this._queryParamMap) {\n      this._queryParamMap =\n          this.queryParams.pipe(map((p: Params): ParamMap => convertToParamMap(p)));\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n  }\n}\n\nexport type ParamsInheritanceStrategy = 'emptyOnly'|'always';\n\n/** @internal */\nexport type Inherited = {\n  params: Params,\n  data: Data,\n  resolve: Data,\n};\n\n/**\n * Returns the inherited params, data, and resolve for a given route.\n * By default, this only inherits values up to the nearest path-less or component-less route.\n * @internal\n */\nexport function inheritedParamsDataResolve(\n    route: ActivatedRouteSnapshot,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly'): Inherited {\n  const pathFromRoot = route.pathFromRoot;\n\n  let inheritingStartingFrom = 0;\n  if (paramsInheritanceStrategy !== 'always') {\n    inheritingStartingFrom = pathFromRoot.length - 1;\n\n    while (inheritingStartingFrom >= 1) {\n      const current = pathFromRoot[inheritingStartingFrom];\n      const parent = pathFromRoot[inheritingStartingFrom - 1];\n      // current route is an empty path => inherits its parent's params and data\n      if (current.routeConfig && current.routeConfig.path === '') {\n        inheritingStartingFrom--;\n\n        // parent is componentless => current route should inherit its params and data\n      } else if (!parent.component) {\n        inheritingStartingFrom--;\n\n      } else {\n        break;\n      }\n    }\n  }\n\n  return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n\n/** @internal */\nfunction flattenInherited(pathFromRoot: ActivatedRouteSnapshot[]): Inherited {\n  return pathFromRoot.reduce((res, curr) => {\n    const params = {...res.params, ...curr.params};\n    const data = {...res.data, ...curr.data};\n    const resolve = {...res.resolve, ...curr._resolvedData};\n    return {params, data, resolve};\n  }, <any>{params: {}, data: {}, resolve: {}});\n}\n\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n *   constructor(route: ActivatedRoute) {\n *     const id: string = route.snapshot.params.id;\n *     const url: string = route.snapshot.url.join('');\n *     const user = route.snapshot.data.user;\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class ActivatedRouteSnapshot {\n  /** The configuration used to match this route **/\n  public readonly routeConfig: Route|null;\n  /** @internal **/\n  _urlSegment: UrlSegmentGroup;\n  /** @internal */\n  _lastPathIndex: number;\n  /** @internal */\n  _resolve: ResolveData;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _resolvedData!: Data;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _routerState!: RouterStateSnapshot;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _paramMap!: ParamMap;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _queryParamMap!: ParamMap;\n\n  /** @internal */\n  constructor(\n      /** The URL segments matched by this route */\n      public url: UrlSegment[],\n      /** The matrix parameters scoped to this route */\n      public params: Params,\n      /** The query parameters shared by all the routes */\n      public queryParams: Params,\n      /** The URL fragment shared by all the routes */\n      public fragment: string,\n      /** The static and resolved data of this route */\n      public data: Data,\n      /** The outlet name of the route */\n      public outlet: string,\n      /** The component of the route */\n      public component: Type<any>|string|null, routeConfig: Route|null, urlSegment: UrlSegmentGroup,\n      lastPathIndex: number, resolve: ResolveData) {\n    this.routeConfig = routeConfig;\n    this._urlSegment = urlSegment;\n    this._lastPathIndex = lastPathIndex;\n    this._resolve = resolve;\n  }\n\n  /** The root of the router state */\n  get root(): ActivatedRouteSnapshot {\n    return this._routerState.root;\n  }\n\n  /** The parent of this route in the router state tree */\n  get parent(): ActivatedRouteSnapshot|null {\n    return this._routerState.parent(this);\n  }\n\n  /** The first child of this route in the router state tree */\n  get firstChild(): ActivatedRouteSnapshot|null {\n    return this._routerState.firstChild(this);\n  }\n\n  /** The children of this route in the router state tree */\n  get children(): ActivatedRouteSnapshot[] {\n    return this._routerState.children(this);\n  }\n\n  /** The path from the root of the router state tree to this route */\n  get pathFromRoot(): ActivatedRouteSnapshot[] {\n    return this._routerState.pathFromRoot(this);\n  }\n\n  get paramMap(): ParamMap {\n    if (!this._paramMap) {\n      this._paramMap = convertToParamMap(this.params);\n    }\n    return this._paramMap;\n  }\n\n  get queryParamMap(): ParamMap {\n    if (!this._queryParamMap) {\n      this._queryParamMap = convertToParamMap(this.queryParams);\n    }\n    return this._queryParamMap;\n  }\n\n  toString(): string {\n    const url = this.url.map(segment => segment.toString()).join('/');\n    const matched = this.routeConfig ? this.routeConfig.path : '';\n    return `Route(url:'${url}', path:'${matched}')`;\n  }\n}\n\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n *   constructor(router: Router) {\n *     const state: RouterState = router.routerState;\n *     const snapshot: RouterStateSnapshot = state.snapshot;\n *     const root: ActivatedRouteSnapshot = snapshot.root;\n *     const child = root.firstChild;\n *     const id: Observable<string> = child.params.map(p => p.id);\n *     //...\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport class RouterStateSnapshot extends Tree<ActivatedRouteSnapshot> {\n  /** @internal */\n  constructor(\n      /** The url from which this snapshot was created */\n      public url: string, root: TreeNode<ActivatedRouteSnapshot>) {\n    super(root);\n    setRouterState(<RouterStateSnapshot>this, root);\n  }\n\n  toString(): string {\n    return serializeNode(this._root);\n  }\n}\n\nfunction setRouterState<U, T extends {_routerState: U}>(state: U, node: TreeNode<T>): void {\n  node.value._routerState = state;\n  node.children.forEach(c => setRouterState(state, c));\n}\n\nfunction serializeNode(node: TreeNode<ActivatedRouteSnapshot>): string {\n  const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n  return `${node.value}${c}`;\n}\n\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nexport function advanceActivatedRoute(route: ActivatedRoute): void {\n  if (route.snapshot) {\n    const currentSnapshot = route.snapshot;\n    const nextSnapshot = route._futureSnapshot;\n    route.snapshot = nextSnapshot;\n    if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n      (<any>route.queryParams).next(nextSnapshot.queryParams);\n    }\n    if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n      (<any>route.fragment).next(nextSnapshot.fragment);\n    }\n    if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n      (<any>route.params).next(nextSnapshot.params);\n    }\n    if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n      (<any>route.url).next(nextSnapshot.url);\n    }\n    if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n      (<any>route.data).next(nextSnapshot.data);\n    }\n  } else {\n    route.snapshot = route._futureSnapshot;\n\n    // this is for resolved data\n    (<any>route.data).next(route._futureSnapshot.data);\n  }\n}\n\n\nexport function equalParamsAndUrlSegments(\n    a: ActivatedRouteSnapshot, b: ActivatedRouteSnapshot): boolean {\n  const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n  const parentsMismatch = !a.parent !== !b.parent;\n\n  return equalUrlParams && !parentsMismatch &&\n      (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent!));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BehaviorSubject} from 'rxjs';\n\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from './route_reuse_strategy';\nimport {ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\nexport function createRouterState(\n    routeReuseStrategy: RouteReuseStrategy, curr: RouterStateSnapshot,\n    prevState: RouterState): RouterState {\n  const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n  return new RouterState(root, curr);\n}\n\nfunction createNode(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState?: TreeNode<ActivatedRoute>): TreeNode<ActivatedRoute> {\n  // reuse an activated route that is currently displayed on the screen\n  if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n    const value = prevState.value;\n    value._futureSnapshot = curr.value;\n    const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n    return new TreeNode<ActivatedRoute>(value, children);\n\n    // retrieve an activated route that is used to be displayed, but is not currently displayed\n  } else {\n    const detachedRouteHandle =\n        <DetachedRouteHandleInternal>routeReuseStrategy.retrieve(curr.value);\n    if (detachedRouteHandle) {\n      const tree: TreeNode<ActivatedRoute> = detachedRouteHandle.route;\n      setFutureSnapshotsOfActivatedRoutes(curr, tree);\n      return tree;\n\n    } else {\n      const value = createActivatedRoute(curr.value);\n      const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n      return new TreeNode<ActivatedRoute>(value, children);\n    }\n  }\n}\n\nfunction setFutureSnapshotsOfActivatedRoutes(\n    curr: TreeNode<ActivatedRouteSnapshot>, result: TreeNode<ActivatedRoute>): void {\n  if (curr.value.routeConfig !== result.value.routeConfig) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot created from a different route');\n  }\n  if (curr.children.length !== result.children.length) {\n    throw new Error('Cannot reattach ActivatedRouteSnapshot with a different number of children');\n  }\n  result.value._futureSnapshot = curr.value;\n  for (let i = 0; i < curr.children.length; ++i) {\n    setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n  }\n}\n\nfunction createOrReuseChildren(\n    routeReuseStrategy: RouteReuseStrategy, curr: TreeNode<ActivatedRouteSnapshot>,\n    prevState: TreeNode<ActivatedRoute>) {\n  return curr.children.map(child => {\n    for (const p of prevState.children) {\n      if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n        return createNode(routeReuseStrategy, child, p);\n      }\n    }\n    return createNode(routeReuseStrategy, child);\n  });\n}\n\nfunction createActivatedRoute(c: ActivatedRouteSnapshot) {\n  return new ActivatedRoute(\n      new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams),\n      new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ActivatedRoute} from './router_state';\nimport {Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last, shallowEqual} from './utils/collection';\n\nexport function createUrlTree(\n    route: ActivatedRoute, urlTree: UrlTree, commands: any[], queryParams: Params,\n    fragment: string): UrlTree {\n  if (commands.length === 0) {\n    return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n  }\n\n  const nav = computeNavigation(commands);\n\n  if (nav.toRoot()) {\n    return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n  }\n\n  const startingPosition = findStartingPosition(nav, urlTree, route);\n\n  const segmentGroup = startingPosition.processChildren ?\n      updateSegmentGroupChildren(\n          startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n      updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n  return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\n\nfunction isMatrixParams(command: any): boolean {\n  return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n\nfunction tree(\n    oldSegmentGroup: UrlSegmentGroup, newSegmentGroup: UrlSegmentGroup, urlTree: UrlTree,\n    queryParams: Params, fragment: string): UrlTree {\n  let qp: any = {};\n  if (queryParams) {\n    forEach(queryParams, (value: any, name: any) => {\n      qp[name] = Array.isArray(value) ? value.map((v: any) => `${v}`) : `${value}`;\n    });\n  }\n\n  if (urlTree.root === oldSegmentGroup) {\n    return new UrlTree(newSegmentGroup, qp, fragment);\n  }\n\n  return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\n\nfunction replaceSegment(\n    current: UrlSegmentGroup, oldSegment: UrlSegmentGroup,\n    newSegment: UrlSegmentGroup): UrlSegmentGroup {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(current.children, (c: UrlSegmentGroup, outletName: string) => {\n    if (c === oldSegment) {\n      children[outletName] = newSegment;\n    } else {\n      children[outletName] = replaceSegment(c, oldSegment, newSegment);\n    }\n  });\n  return new UrlSegmentGroup(current.segments, children);\n}\n\nclass Navigation {\n  constructor(\n      public isAbsolute: boolean, public numberOfDoubleDots: number, public commands: any[]) {\n    if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n      throw new Error('Root segment cannot have matrix parameters');\n    }\n\n    const cmdWithOutlet = commands.find(c => typeof c === 'object' && c != null && c.outlets);\n    if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n      throw new Error('{outlets:{}} has to be the last command');\n    }\n  }\n\n  public toRoot(): boolean {\n    return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n  }\n}\n\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands: any[]): Navigation {\n  if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n    return new Navigation(true, 0, commands);\n  }\n\n  let numberOfDoubleDots = 0;\n  let isAbsolute = false;\n\n  const res: any[] = commands.reduce((res, cmd, cmdIdx) => {\n    if (typeof cmd === 'object' && cmd != null) {\n      if (cmd.outlets) {\n        const outlets: {[k: string]: any} = {};\n        forEach(cmd.outlets, (commands: any, name: string) => {\n          outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n        });\n        return [...res, {outlets}];\n      }\n\n      if (cmd.segmentPath) {\n        return [...res, cmd.segmentPath];\n      }\n    }\n\n    if (!(typeof cmd === 'string')) {\n      return [...res, cmd];\n    }\n\n    if (cmdIdx === 0) {\n      cmd.split('/').forEach((urlPart, partIndex) => {\n        if (partIndex == 0 && urlPart === '.') {\n          // skip './a'\n        } else if (partIndex == 0 && urlPart === '') {  //  '/a'\n          isAbsolute = true;\n        } else if (urlPart === '..') {  //  '../a'\n          numberOfDoubleDots++;\n        } else if (urlPart != '') {\n          res.push(urlPart);\n        }\n      });\n\n      return res;\n    }\n\n    return [...res, cmd];\n  }, []);\n\n  return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\n\nclass Position {\n  constructor(\n      public segmentGroup: UrlSegmentGroup, public processChildren: boolean, public index: number) {\n  }\n}\n\nfunction findStartingPosition(nav: Navigation, tree: UrlTree, route: ActivatedRoute): Position {\n  if (nav.isAbsolute) {\n    return new Position(tree.root, true, 0);\n  }\n\n  if (route.snapshot._lastPathIndex === -1) {\n    const segmentGroup = route.snapshot._urlSegment;\n    // Pathless ActivatedRoute has _lastPathIndex === -1 but should not process children\n    // see issue #26224, #13011, #35687\n    // However, if the ActivatedRoute is the root we should process children like above.\n    const processChildren = segmentGroup === tree.root;\n    return new Position(segmentGroup, processChildren, 0);\n  }\n\n  const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n  const index = route.snapshot._lastPathIndex + modifier;\n  return createPositionApplyingDoubleDots(\n      route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\n\nfunction createPositionApplyingDoubleDots(\n    group: UrlSegmentGroup, index: number, numberOfDoubleDots: number): Position {\n  let g = group;\n  let ci = index;\n  let dd = numberOfDoubleDots;\n  while (dd > ci) {\n    dd -= ci;\n    g = g.parent!;\n    if (!g) {\n      throw new Error('Invalid number of \\'../\\'');\n    }\n    ci = g.segments.length;\n  }\n  return new Position(g, false, ci - dd);\n}\n\nfunction getPath(command: any): any {\n  if (typeof command === 'object' && command != null && command.outlets) {\n    return command.outlets[PRIMARY_OUTLET];\n  }\n  return `${command}`;\n}\n\nfunction getOutlets(commands: any[]): {[k: string]: any[]} {\n  if (typeof commands[0] === 'object' && commands[0] !== null && commands[0].outlets) {\n    return commands[0].outlets;\n  }\n\n  return {[PRIMARY_OUTLET]: commands};\n}\n\nfunction updateSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (!segmentGroup) {\n    segmentGroup = new UrlSegmentGroup([], {});\n  }\n  if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n    return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n  }\n\n  const m = prefixedWith(segmentGroup, startIndex, commands);\n  const slicedCommands = commands.slice(m.commandIndex);\n  if (m.match && m.pathIndex < segmentGroup.segments.length) {\n    const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n    g.children[PRIMARY_OUTLET] =\n        new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n    return updateSegmentGroupChildren(g, 0, slicedCommands);\n  } else if (m.match && slicedCommands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else if (m.match && !segmentGroup.hasChildren()) {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  } else if (m.match) {\n    return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n  } else {\n    return createNewSegmentGroup(segmentGroup, startIndex, commands);\n  }\n}\n\nfunction updateSegmentGroupChildren(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  if (commands.length === 0) {\n    return new UrlSegmentGroup(segmentGroup.segments, {});\n  } else {\n    const outlets = getOutlets(commands);\n    const children: {[key: string]: UrlSegmentGroup} = {};\n\n    forEach(outlets, (commands: any, outlet: string) => {\n      if (commands !== null) {\n        children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n      }\n    });\n\n    forEach(segmentGroup.children, (child: UrlSegmentGroup, childOutlet: string) => {\n      if (outlets[childOutlet] === undefined) {\n        children[childOutlet] = child;\n      }\n    });\n    return new UrlSegmentGroup(segmentGroup.segments, children);\n  }\n}\n\nfunction prefixedWith(segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]) {\n  let currentCommandIndex = 0;\n  let currentPathIndex = startIndex;\n\n  const noMatch = {match: false, pathIndex: 0, commandIndex: 0};\n  while (currentPathIndex < segmentGroup.segments.length) {\n    if (currentCommandIndex >= commands.length) return noMatch;\n    const path = segmentGroup.segments[currentPathIndex];\n    const curr = getPath(commands[currentCommandIndex]);\n    const next =\n        currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n\n    if (currentPathIndex > 0 && curr === undefined) break;\n\n    if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n      if (!compare(curr, next, path)) return noMatch;\n      currentCommandIndex += 2;\n    } else {\n      if (!compare(curr, {}, path)) return noMatch;\n      currentCommandIndex++;\n    }\n    currentPathIndex++;\n  }\n\n  return {match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex};\n}\n\nfunction createNewSegmentGroup(\n    segmentGroup: UrlSegmentGroup, startIndex: number, commands: any[]): UrlSegmentGroup {\n  const paths = segmentGroup.segments.slice(0, startIndex);\n\n  let i = 0;\n  while (i < commands.length) {\n    if (typeof commands[i] === 'object' && commands[i] !== null &&\n        commands[i].outlets !== undefined) {\n      const children = createNewSegmentChildren(commands[i].outlets);\n      return new UrlSegmentGroup(paths, children);\n    }\n\n    // if we start with an object literal, we need to reuse the path part from the segment\n    if (i === 0 && isMatrixParams(commands[0])) {\n      const p = segmentGroup.segments[startIndex];\n      paths.push(new UrlSegment(p.path, commands[0]));\n      i++;\n      continue;\n    }\n\n    const curr = getPath(commands[i]);\n    const next = (i < commands.length - 1) ? commands[i + 1] : null;\n    if (curr && next && isMatrixParams(next)) {\n      paths.push(new UrlSegment(curr, stringify(next)));\n      i += 2;\n    } else {\n      paths.push(new UrlSegment(curr, {}));\n      i++;\n    }\n  }\n  return new UrlSegmentGroup(paths, {});\n}\n\nfunction createNewSegmentChildren(outlets: {[name: string]: any}): any {\n  const children: {[key: string]: UrlSegmentGroup} = {};\n  forEach(outlets, (commands: any, outlet: string) => {\n    if (commands !== null) {\n      children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n    }\n  });\n  return children;\n}\n\nfunction stringify(params: {[key: string]: any}): {[key: string]: string} {\n  const res: {[key: string]: string} = {};\n  forEach(params, (v: any, k: string) => res[k] = `${v}`);\n  return res;\n}\n\nfunction compare(path: string, params: {[key: string]: any}, segment: UrlSegment): boolean {\n  return path == segment.path && shallowEqual(params, segment.parameters);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {LoadedRouterConfig} from '../config';\nimport {ActivationEnd, ChildActivationEnd, Event} from '../events';\nimport {DetachedRouteHandleInternal, RouteReuseStrategy} from '../route_reuse_strategy';\nimport {NavigationTransition} from '../router';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot, advanceActivatedRoute, RouterState} from '../router_state';\nimport {forEach} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport const activateRoutes =\n    (rootContexts: ChildrenOutletContexts, routeReuseStrategy: RouteReuseStrategy,\n     forwardEvent: (evt: Event) => void): MonoTypeOperatorFunction<NavigationTransition> =>\n        map(t => {\n          new ActivateRoutes(\n              routeReuseStrategy, t.targetRouterState!, t.currentRouterState, forwardEvent)\n              .activate(rootContexts);\n          return t;\n        });\n\nexport class ActivateRoutes {\n  constructor(\n      private routeReuseStrategy: RouteReuseStrategy, private futureState: RouterState,\n      private currState: RouterState, private forwardEvent: (evt: Event) => void) {}\n\n  activate(parentContexts: ChildrenOutletContexts): void {\n    const futureRoot = this.futureState._root;\n    const currRoot = this.currState ? this.currState._root : null;\n\n    this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n    advanceActivatedRoute(this.futureState.root);\n    this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n  }\n\n  // De-activate the child route that are not re-used for the future state\n  private deactivateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outletName: string]: TreeNode<ActivatedRoute>} = nodeChildrenAsMap(currNode);\n\n    // Recurse on the routes active in the future state to de-activate deeper children\n    futureNode.children.forEach(futureChild => {\n      const childOutletName = futureChild.value.outlet;\n      this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n      delete children[childOutletName];\n    });\n\n    // De-activate the routes that will not be re-used\n    forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {\n      this.deactivateRouteAndItsChildren(v, contexts);\n    });\n  }\n\n  private deactivateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContext: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    if (future === curr) {\n      // Reusing the node, check to see if the children need to be de-activated\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContext.getContext(future.outlet);\n        if (context) {\n          this.deactivateChildRoutes(futureNode, currNode, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.deactivateChildRoutes(futureNode, currNode, parentContext);\n      }\n    } else {\n      if (curr) {\n        // Deactivate the current route which will not be re-used\n        this.deactivateRouteAndItsChildren(currNode, parentContext);\n      }\n    }\n  }\n\n  private deactivateRouteAndItsChildren(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n      this.detachAndStoreRouteSubtree(route, parentContexts);\n    } else {\n      this.deactivateRouteAndOutlet(route, parentContexts);\n    }\n  }\n\n  private detachAndStoreRouteSubtree(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n    if (context && context.outlet) {\n      const componentRef = context.outlet.detach();\n      const contexts = context.children.onOutletDeactivated();\n      this.routeReuseStrategy.store(route.value.snapshot, {componentRef, route, contexts});\n    }\n  }\n\n  private deactivateRouteAndOutlet(\n      route: TreeNode<ActivatedRoute>, parentContexts: ChildrenOutletContexts): void {\n    const context = parentContexts.getContext(route.value.outlet);\n\n    if (context) {\n      const children: {[outletName: string]: any} = nodeChildrenAsMap(route);\n      const contexts = route.value.component ? context.children : parentContexts;\n\n      forEach(children, (v: any, k: string) => this.deactivateRouteAndItsChildren(v, contexts));\n\n      if (context.outlet) {\n        // Destroy the component\n        context.outlet.deactivate();\n        // Destroy the contexts for all the outlets that were in the component\n        context.children.onOutletDeactivated();\n      }\n    }\n  }\n\n  private activateChildRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>|null,\n      contexts: ChildrenOutletContexts): void {\n    const children: {[outlet: string]: any} = nodeChildrenAsMap(currNode);\n    futureNode.children.forEach(c => {\n      this.activateRoutes(c, children[c.value.outlet], contexts);\n      this.forwardEvent(new ActivationEnd(c.value.snapshot));\n    });\n    if (futureNode.children.length) {\n      this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n    }\n  }\n\n  private activateRoutes(\n      futureNode: TreeNode<ActivatedRoute>, currNode: TreeNode<ActivatedRoute>,\n      parentContexts: ChildrenOutletContexts): void {\n    const future = futureNode.value;\n    const curr = currNode ? currNode.value : null;\n\n    advanceActivatedRoute(future);\n\n    // reusing the node\n    if (future === curr) {\n      if (future.component) {\n        // If we have a normal route, we need to go through an outlet.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n        this.activateChildRoutes(futureNode, currNode, context.children);\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, currNode, parentContexts);\n      }\n    } else {\n      if (future.component) {\n        // if we have a normal route, we need to place the component into the outlet and recurse.\n        const context = parentContexts.getOrCreateContext(future.outlet);\n\n        if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n          const stored =\n              (<DetachedRouteHandleInternal>this.routeReuseStrategy.retrieve(future.snapshot));\n          this.routeReuseStrategy.store(future.snapshot, null);\n          context.children.onOutletReAttached(stored.contexts);\n          context.attachRef = stored.componentRef;\n          context.route = stored.route.value;\n          if (context.outlet) {\n            // Attach right away when the outlet has already been instantiated\n            // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n            context.outlet.attach(stored.componentRef, stored.route.value);\n          }\n          advanceActivatedRouteNodeAndItsChildren(stored.route);\n        } else {\n          const config = parentLoadedConfig(future.snapshot);\n          const cmpFactoryResolver = config ? config.module.componentFactoryResolver : null;\n\n          context.attachRef = null;\n          context.route = future;\n          context.resolver = cmpFactoryResolver;\n          if (context.outlet) {\n            // Activate the outlet when it has already been instantiated\n            // Otherwise it will get activated from its `ngOnInit` when instantiated\n            context.outlet.activateWith(future, cmpFactoryResolver);\n          } else if (isDevMode() && console && console.warn) {\n            console.warn(\n                `A router outlet has not been instantiated during routes activation. URL Segment: '${\n                    future.snapshot._urlSegment}'`);\n          }\n\n          this.activateChildRoutes(futureNode, null, context.children);\n        }\n      } else {\n        // if we have a componentless route, we recurse but keep the same outlet map.\n        this.activateChildRoutes(futureNode, null, parentContexts);\n      }\n    }\n  }\n}\n\nfunction advanceActivatedRouteNodeAndItsChildren(node: TreeNode<ActivatedRoute>): void {\n  advanceActivatedRoute(node.value);\n  node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\n\nfunction parentLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n    if (route && route.component) return null;\n  }\n\n  return null;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModuleFactory, NgModuleRef, Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {ActivatedRouteSnapshot} from './router_state';\nimport {UrlSegment, UrlSegmentGroup} from './url_tree';\n\n\n/**\n * Represents a route configuration for the Router service.\n * An array of `Route` objects, used in `Router.config` and for nested route configurations\n * in `Route.children`.\n *\n * @see `Route`\n * @see `Router`\n * @see [Router configuration guide](guide/router#configuration)\n * @publicApi\n */\nexport type Routes = Route[];\n\n/**\n * Represents the result of matching URLs with a custom matching function.\n *\n * * `consumed` is an array of the consumed URL segments.\n * * `posParams` is a map of positional parameters.\n *\n * @see `UrlMatcher()`\n * @publicApi\n */\nexport type UrlMatchResult = {\n  consumed: UrlSegment[];\n  posParams?: {[name: string]: UrlSegment};\n};\n\n/**\n * A function for matching a route against URLs. Implement a custom URL matcher\n * for `Route.matcher` when a combination of `path` and `pathMatch`\n * is not expressive enough. Cannot be used together with `path` and `pathMatch`.\n *\n * The function takes the following arguments and returns a `UrlMatchResult` object.\n * * *segments* : An array of URL segments.\n * * *group* : A segment group.\n * * *route* : The route to match against.\n *\n * The following example implementation matches HTML files.\n *\n * ```\n * export function htmlFiles(url: UrlSegment[]) {\n *   return url.length === 1 && url[0].path.endsWith('.html') ? ({consumed: url}) : null;\n * }\n *\n * export const routes = [{ matcher: htmlFiles, component: AnyComponent }];\n * ```\n *\n * @publicApi\n */\nexport type UrlMatcher = (segments: UrlSegment[], group: UrlSegmentGroup, route: Route) =>\n    UrlMatchResult|null;\n\n/**\n *\n * Represents static data associated with a particular route.\n *\n * @see `Route#data`\n *\n * @publicApi\n */\nexport type Data = {\n  [name: string]: any\n};\n\n/**\n *\n * Represents the resolved data associated with a particular route.\n *\n * @see `Route#resolve`.\n *\n * @publicApi\n */\nexport type ResolveData = {\n  [name: string]: any\n};\n\n/**\n *\n * A function that is called to resolve a collection of lazy-loaded routes.\n * Must be an arrow function of the following form:\n * `() => import('...').then(mod => mod.MODULE)`\n *\n * For example:\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @see [Route.loadChildren](api/router/Route#loadChildren)\n * @publicApi\n */\nexport type LoadChildrenCallback = () => Type<any>|NgModuleFactory<any>|Observable<Type<any>>|\n    Promise<NgModuleFactory<any>|Type<any>|any>;\n\n/**\n *\n * A function that returns a set of routes to load.\n *\n * The string form of `LoadChildren` is deprecated (see `DeprecatedLoadChildren`). The function\n * form (`LoadChildrenCallback`) should be used instead.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n */\nexport type LoadChildren = LoadChildrenCallback|DeprecatedLoadChildren;\n\n/**\n * A string of the form `path/to/file#exportName` that acts as a URL for a set of routes to load.\n *\n * @see `loadChildrenCallback`\n * @publicApi\n * @deprecated The `string` form of `loadChildren` is deprecated in favor of the\n * `LoadChildrenCallback` function which uses the ES dynamic `import()` expression.\n * This offers a more natural and standards-based mechanism to dynamically\n * load an ES module at runtime.\n */\nexport type DeprecatedLoadChildren = string;\n\n/**\n *\n * How to handle query parameters in a router link.\n * One of:\n * - `merge` : Merge new with current parameters.\n * - `preserve` : Preserve current parameters.\n *\n * @see `NavigationExtras#queryParamsHandling`\n * @see `RouterLink`\n * @publicApi\n */\nexport type QueryParamsHandling = 'merge'|'preserve'|'';\n\n/**\n *\n * A policy for when to run guards and resolvers on a route.\n *\n * @see [Route.runGuardsAndResolvers](api/router/Route#runGuardsAndResolvers)\n * @publicApi\n */\nexport type RunGuardsAndResolvers =\n    'pathParamsChange'|'pathParamsOrQueryParamsChange'|'paramsChange'|'paramsOrQueryParamsChange'|\n    'always'|((from: ActivatedRouteSnapshot, to: ActivatedRouteSnapshot) => boolean);\n\n/**\n * A configuration object that defines a single route.\n * A set of routes are collected in a `Routes` array to define a `Router` configuration.\n * The router attempts to match segments of a given URL against each route,\n * using the configuration options defined in this object.\n *\n * Supports static, parameterized, redirect, and wildcard routes, as well as\n * custom route data and resolve methods.\n *\n * For detailed usage information, see the [Routing Guide](guide/router).\n *\n * @usageNotes\n *\n * ### Simple Configuration\n *\n * The following route specifies that when navigating to, for example,\n * `/team/11/user/bob`, the router creates the 'Team' component\n * with the 'User' child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n  *  component: Team,\n *   children: [{\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * ### Multiple Outlets\n *\n * The following route creates sibling components with multiple outlets.\n * When navigating to `/team/11(aux:chat/jim)`, the router creates the 'Team' component next to\n * the 'Chat' component. The 'Chat' component is placed into the 'aux' outlet.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team\n * }, {\n *   path: 'chat/:user',\n *   component: Chat\n *   outlet: 'aux'\n * }]\n * ```\n *\n * ### Wild Cards\n *\n * The following route uses wild-card notation to specify a component\n * that is always instantiated regardless of where you navigate to.\n *\n * ```\n * [{\n *   path: '**',\n *   component: WildcardComponent\n * }]\n * ```\n *\n * ### Redirects\n *\n * The following route uses the `redirectTo` property to ignore a segment of\n * a given URL when looking for a child path.\n *\n * When navigating to '/team/11/legacy/user/jim', the router changes the URL segment\n * '/team/11/legacy/user/jim' to '/team/11/user/jim', and then instantiates\n * the Team component with the User child component in it.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: 'legacy/user/:name',\n *     redirectTo: 'user/:name'\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * The redirect path can be relative, as shown in this example, or absolute.\n * If we change the `redirectTo` value in the example to the absolute URL segment '/user/:name',\n * the result URL is also absolute, '/user/jim'.\n\n * ### Empty Path\n *\n * Empty-path route configurations can be used to instantiate components that do not 'consume'\n * any URL segments.\n *\n * In the following configuration, when navigating to\n * `/team/11`, the router instantiates the 'AllUsers' component.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: AllUsers\n *   }, {\n *     path: 'user/:name',\n *     component: User\n *   }]\n * }]\n * ```\n *\n * Empty-path routes can have children. In the following example, when navigating\n * to `/team/11/user/jim`, the router instantiates the wrapper component with\n * the user component in it.\n *\n * Note that an empty path route inherits its parent's parameters and data.\n *\n * ```\n * [{\n *   path: 'team/:id',\n *   component: Team,\n *   children: [{\n *     path: '',\n *     component: WrapperCmp,\n *     children: [{\n *       path: 'user/:name',\n *       component: User\n *     }]\n *   }]\n * }]\n * ```\n *\n * ### Matching Strategy\n *\n * The default path-match strategy is 'prefix', which means that the router\n * checks URL elements from the left to see if the URL matches a specified path.\n * For example, '/team/11/user' matches 'team/:id'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'prefix', //default\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * You can specify the path-match strategy 'full' to make sure that the path\n * covers the whole unconsumed URL. It is important to do this when redirecting\n * empty-path routes. Otherwise, because an empty path is a prefix of any URL,\n * the router would apply the redirect even when navigating to the redirect destination,\n * creating an endless loop.\n *\n * In the following example, supplying the 'full' `pathMatch` strategy ensures\n * that the router applies the redirect if and only if navigating to '/'.\n *\n * ```\n * [{\n *   path: '',\n *   pathMatch: 'full',\n *   redirectTo: 'main'\n * }, {\n *   path: 'main',\n *   component: Main\n * }]\n * ```\n *\n * ### Componentless Routes\n *\n * You can share parameters between sibling components.\n * For example, suppose that two sibling components should go next to each other,\n * and both of them require an ID parameter. You can accomplish this using a route\n * that does not specify a component at the top level.\n *\n * In the following example, 'MainChild' and 'AuxChild' are siblings.\n * When navigating to 'parent/10/(a//aux:b)', the route instantiates\n * the main child and aux child components next to each other.\n * For this to work, the application component must have the primary and aux outlets defined.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: 'a', component: MainChild },\n *      { path: 'b', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * The router merges the parameters, data, and resolve of the componentless\n * parent into the parameters, data, and resolve of the children.\n *\n * This is especially useful when child components are defined\n * with an empty path string, as in the following example.\n * With this configuration, navigating to '/parent/10' creates\n * the main child and aux components.\n *\n * ```\n * [{\n *    path: 'parent/:id',\n *    children: [\n *      { path: '', component: MainChild },\n *      { path: '', component: AuxChild, outlet: 'aux' }\n *    ]\n * }]\n * ```\n *\n * ### Lazy Loading\n *\n * Lazy loading speeds up application load time by splitting the application\n * into multiple bundles and loading them on demand.\n * To use lazy loading, provide the `loadChildren` property in the `Route` object,\n * instead of the `children` property.\n *\n * Given the following example route, the router will lazy load\n * the associated module on demand using the browser native import system.\n *\n * ```\n * [{\n *   path: 'lazy',\n *   loadChildren: () => import('./lazy-route/lazy.module').then(mod => mod.LazyModule),\n * }];\n * ```\n *\n * @publicApi\n */\nexport interface Route {\n  /**\n   * The path to match against. Cannot be used together with a custom `matcher` function.\n   * A URL string that uses router matching notation.\n   * Can be a wild card (`**`) that matches any URL (see Usage Notes below).\n   * Default is \"/\" (the root path).\n   *\n   */\n  path?: string;\n  /**\n   * The path-matching strategy, one of 'prefix' or 'full'.\n   * Default is 'prefix'.\n   *\n   * By default, the router checks URL elements from the left to see if the URL\n   * matches a given  path, and stops when there is a match. For example,\n   * '/team/11/user' matches 'team/:id'.\n   *\n   * The path-match strategy 'full' matches against the entire URL.\n   * It is important to do this when redirecting empty-path routes.\n   * Otherwise, because an empty path is a prefix of any URL,\n   * the router would apply the redirect even when navigating\n   * to the redirect destination, creating an endless loop.\n   *\n   */\n  pathMatch?: string;\n  /**\n   * A custom URL-matching function. Cannot be used together with `path`.\n   */\n  matcher?: UrlMatcher;\n  /**\n   * The component to instantiate when the path matches.\n   * Can be empty if child routes specify components.\n   */\n  component?: Type<any>;\n  /**\n   * A URL to redirect to when the path matches.\n   * Absolute if the URL begins with a slash (/), otherwise relative to the path URL.\n   * When not present, router does not redirect.\n   */\n  redirectTo?: string;\n  /**\n   * Name of a `RouterOutlet` object where the component can be placed\n   * when the path matches.\n   */\n  outlet?: string;\n  /**\n   * An array of dependency-injection tokens used to look up `CanActivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * activate the component. By default, any user can activate.\n   */\n  canActivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanActivateChild()` handlers,\n   * in order to determine if the current user is allowed to activate\n   * a child of the component. By default, any user can activate a child.\n   */\n  canActivateChild?: any[];\n  /**\n   * An array of DI tokens used to look up `CanDeactivate()`\n   * handlers, in order to determine if the current user is allowed to\n   * deactivate the component. By default, any user can deactivate.\n   *\n   */\n  canDeactivate?: any[];\n  /**\n   * An array of DI tokens used to look up `CanLoad()`\n   * handlers, in order to determine if the current user is allowed to\n   * load the component. By default, any user can load.\n   */\n  canLoad?: any[];\n  /**\n   * Additional developer-defined data provided to the component via\n   * `ActivatedRoute`. By default, no additional data is passed.\n   */\n  data?: Data;\n  /**\n   * A map of DI tokens used to look up data resolvers. See `Resolve`.\n   */\n  resolve?: ResolveData;\n  /**\n   * An array of child `Route` objects that specifies a nested route\n   * configuration.\n   */\n  children?: Routes;\n  /**\n   * An object specifying lazy-loaded child routes.\n   */\n  loadChildren?: LoadChildren;\n  /**\n   * Defines when guards and resolvers will be run. One of\n   * - `paramsOrQueryParamsChange` : Run when query parameters change.\n   * - `always` : Run on every execution.\n   * By default, guards and resolvers run only when the matrix\n   * parameters of the route change.\n   */\n  runGuardsAndResolvers?: RunGuardsAndResolvers;\n  /**\n   * Filled for routes with `loadChildren` once the module has been loaded\n   * @internal\n   */\n  _loadedConfig?: LoadedRouterConfig;\n}\n\nexport class LoadedRouterConfig {\n  constructor(public routes: Route[], public module: NgModuleRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {CanActivate, CanActivateChild, CanDeactivate, CanLoad} from '../interfaces';\nimport {UrlTree} from '../url_tree';\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n *   return a * b;\n * }\n *\n * if (isFunction<product>(fn)) {\n *   return fn(1, 2);\n * } else {\n *   throw \"Must provide the `product` function\";\n * }\n */\nexport function isFunction<T>(v: any): v is T {\n  return typeof v === 'function';\n}\n\nexport function isBoolean(v: any): v is boolean {\n  return typeof v === 'boolean';\n}\n\nexport function isUrlTree(v: any): v is UrlTree {\n  return v instanceof UrlTree;\n}\n\nexport function isCanLoad(guard: any): guard is CanLoad {\n  return guard && isFunction<CanLoad>(guard.canLoad);\n}\n\nexport function isCanActivate(guard: any): guard is CanActivate {\n  return guard && isFunction<CanActivate>(guard.canActivate);\n}\n\nexport function isCanActivateChild(guard: any): guard is CanActivateChild {\n  return guard && isFunction<CanActivateChild>(guard.canActivateChild);\n}\n\nexport function isCanDeactivate<T>(guard: any): guard is CanDeactivate<T> {\n  return guard && isFunction<CanDeactivate<T>>(guard.canDeactivate);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {combineLatest, Observable, OperatorFunction} from 'rxjs';\nimport {filter, map, scan, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {UrlTree} from '../url_tree';\nimport {isUrlTree} from '../utils/type_guards';\n\nconst INITIAL_VALUE = Symbol('INITIAL_VALUE');\ndeclare type INTERIM_VALUES = typeof INITIAL_VALUE | boolean | UrlTree;\n\nexport function prioritizedGuardValue():\n    OperatorFunction<Observable<boolean|UrlTree>[], boolean|UrlTree> {\n  return switchMap(obs => {\n    return combineLatest(\n               ...obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE as INTERIM_VALUES))))\n               .pipe(\n                   scan(\n                       (acc: INTERIM_VALUES, list: INTERIM_VALUES[]) => {\n                         let isPending = false;\n                         return list.reduce((innerAcc, val, i: number) => {\n                           if (innerAcc !== INITIAL_VALUE) return innerAcc;\n\n                           // Toggle pending flag if any values haven't been set yet\n                           if (val === INITIAL_VALUE) isPending = true;\n\n                           // Any other return values are only valid if we haven't yet hit a pending\n                           // call. This guarantees that in the case of a guard at the bottom of the\n                           // tree that returns a redirect, we will wait for the higher priority\n                           // guard at the top to finish before performing the redirect.\n                           if (!isPending) {\n                             // Early return when we hit a `false` value as that should always\n                             // cancel navigation\n                             if (val === false) return val;\n\n                             if (i === list.length - 1 || isUrlTree(val)) {\n                               return val;\n                             }\n                           }\n\n                           return innerAcc;\n                         }, acc);\n                       },\n                       INITIAL_VALUE),\n                   filter(item => item !== INITIAL_VALUE),\n                   map(item => isUrlTree(item) ? item : item === true),  //\n                   take(1)) as Observable<boolean|UrlTree>;\n  });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector, NgModuleRef} from '@angular/core';\nimport {defer, EmptyError, Observable, Observer, of} from 'rxjs';\nimport {catchError, concatAll, first, map, mergeMap, tap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {CanLoadFn} from './interfaces';\nimport {prioritizedGuardValue} from './operators/prioritized_guard_value';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {defaultUrlMatcher, navigationCancelingError, Params, PRIMARY_OUTLET} from './shared';\nimport {UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';\nimport {forEach, waitForMap, wrapIntoObservable} from './utils/collection';\nimport {isCanLoad, isFunction, isUrlTree} from './utils/type_guards';\n\nclass NoMatch {\n  public segmentGroup: UrlSegmentGroup|null;\n\n  constructor(segmentGroup?: UrlSegmentGroup) {\n    this.segmentGroup = segmentGroup || null;\n  }\n}\n\nclass AbsoluteRedirect {\n  constructor(public urlTree: UrlTree) {}\n}\n\nfunction noMatch(segmentGroup: UrlSegmentGroup): Observable<UrlSegmentGroup> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new NoMatch(segmentGroup)));\n}\n\nfunction absoluteRedirect(newTree: UrlTree): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new AbsoluteRedirect(newTree)));\n}\n\nfunction namedOutletsRedirect(redirectTo: string): Observable<any> {\n  return new Observable<UrlSegmentGroup>(\n      (obs: Observer<UrlSegmentGroup>) => obs.error(new Error(\n          `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`)));\n}\n\nfunction canLoadFails(route: Route): Observable<LoadedRouterConfig> {\n  return new Observable<LoadedRouterConfig>(\n      (obs: Observer<LoadedRouterConfig>) => obs.error(\n          navigationCancelingError(`Cannot load children because the guard of the route \"path: '${\n              route.path}'\" returned false`)));\n}\n\n/**\n * Returns the `UrlTree` with the redirection applied.\n *\n * Lazy modules are loaded along the way.\n */\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    urlTree: UrlTree, config: Routes): Observable<UrlTree> {\n  return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\n\nclass ApplyRedirects {\n  private allowRedirects: boolean = true;\n  private ngModule: NgModuleRef<any>;\n\n  constructor(\n      moduleInjector: Injector, private configLoader: RouterConfigLoader,\n      private urlSerializer: UrlSerializer, private urlTree: UrlTree, private config: Routes) {\n    this.ngModule = moduleInjector.get(NgModuleRef);\n  }\n\n  apply(): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n    const urlTrees$ = expanded$.pipe(\n        map((rootSegmentGroup: UrlSegmentGroup) => this.createUrlTree(\n                rootSegmentGroup, this.urlTree.queryParams, this.urlTree.fragment!)));\n    return urlTrees$.pipe(catchError((e: any) => {\n      if (e instanceof AbsoluteRedirect) {\n        // after an absolute redirect we do not apply any more redirects!\n        this.allowRedirects = false;\n        // we need to run matching, so we can fetch all lazy-loaded modules\n        return this.match(e.urlTree);\n      }\n\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private match(tree: UrlTree): Observable<UrlTree> {\n    const expanded$ =\n        this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n    const mapped$ = expanded$.pipe(\n        map((rootSegmentGroup: UrlSegmentGroup) =>\n                this.createUrlTree(rootSegmentGroup, tree.queryParams, tree.fragment!)));\n    return mapped$.pipe(catchError((e: any): Observable<UrlTree> => {\n      if (e instanceof NoMatch) {\n        throw this.noMatchError(e);\n      }\n\n      throw e;\n    }));\n  }\n\n  private noMatchError(e: NoMatch): any {\n    return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`);\n  }\n\n  private createUrlTree(rootCandidate: UrlSegmentGroup, queryParams: Params, fragment: string):\n      UrlTree {\n    const root = rootCandidate.segments.length > 0 ?\n        new UrlSegmentGroup([], {[PRIMARY_OUTLET]: rootCandidate}) :\n        rootCandidate;\n    return new UrlTree(root, queryParams, fragment);\n  }\n\n  private expandSegmentGroup(\n      ngModule: NgModuleRef<any>, routes: Route[], segmentGroup: UrlSegmentGroup,\n      outlet: string): Observable<UrlSegmentGroup> {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.expandChildren(ngModule, routes, segmentGroup)\n          .pipe(map((children: any) => new UrlSegmentGroup([], children)));\n    }\n\n    return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n  }\n\n  // Recursively expand segment groups for all the child outlets\n  private expandChildren(\n      ngModule: NgModuleRef<any>, routes: Route[],\n      segmentGroup: UrlSegmentGroup): Observable<{[name: string]: UrlSegmentGroup}> {\n    return waitForMap(\n        segmentGroup.children,\n        (childOutlet, child) => this.expandSegmentGroup(ngModule, routes, child, childOutlet));\n  }\n\n  private expandSegment(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[],\n      segments: UrlSegment[], outlet: string,\n      allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    return of(...routes).pipe(\n        map((r: any) => {\n          const expanded$ = this.expandSegmentAgainstRoute(\n              ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n          return expanded$.pipe(catchError((e: any) => {\n            if (e instanceof NoMatch) {\n              // TODO(i): this return type doesn't match the declared Observable<UrlSegmentGroup> -\n              // talk to Jason\n              return of(null) as any;\n            }\n            throw e;\n          }));\n        }),\n        concatAll(), first((s: any) => !!s), catchError((e: any, _: any) => {\n          if (e instanceof EmptyError || e.name === 'EmptyError') {\n            if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n              return of(new UrlSegmentGroup([], {}));\n            }\n            throw new NoMatch(segmentGroup);\n          }\n          throw e;\n        }));\n  }\n\n  private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n      boolean {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n  }\n\n  private expandSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      paths: UrlSegment[], outlet: string, allowRedirects: boolean): Observable<UrlSegmentGroup> {\n    if (getOutlet(route) !== outlet) {\n      return noMatch(segmentGroup);\n    }\n\n    if (route.redirectTo === undefined) {\n      return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n    }\n\n    if (allowRedirects && this.allowRedirects) {\n      return this.expandSegmentAgainstRouteUsingRedirect(\n          ngModule, segmentGroup, routes, route, paths, outlet);\n    }\n\n    return noMatch(segmentGroup);\n  }\n\n  private expandSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      return this.expandWildCardWithParamsAgainstRouteUsingRedirect(\n          ngModule, routes, route, outlet);\n    }\n\n    return this.expandRegularSegmentAgainstRouteUsingRedirect(\n        ngModule, segmentGroup, routes, route, segments, outlet);\n  }\n\n  private expandWildCardWithParamsAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, routes: Route[], route: Route,\n      outlet: string): Observable<UrlSegmentGroup> {\n    const newTree = this.applyRedirectCommands([], route.redirectTo!, {});\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      const group = new UrlSegmentGroup(newSegments, {});\n      return this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n    }));\n  }\n\n  private expandRegularSegmentAgainstRouteUsingRedirect(\n      ngModule: NgModuleRef<any>, segmentGroup: UrlSegmentGroup, routes: Route[], route: Route,\n      segments: UrlSegment[], outlet: string): Observable<UrlSegmentGroup> {\n    const {matched, consumedSegments, lastChild, positionalParamSegments} =\n        match(segmentGroup, route, segments);\n    if (!matched) return noMatch(segmentGroup);\n\n    const newTree = this.applyRedirectCommands(\n        consumedSegments, route.redirectTo!, <any>positionalParamSegments);\n    if (route.redirectTo!.startsWith('/')) {\n      return absoluteRedirect(newTree);\n    }\n\n    return this.lineralizeSegments(route, newTree).pipe(mergeMap((newSegments: UrlSegment[]) => {\n      return this.expandSegment(\n          ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet,\n          false);\n    }));\n  }\n\n  private matchSegmentAgainstRoute(\n      ngModule: NgModuleRef<any>, rawSegmentGroup: UrlSegmentGroup, route: Route,\n      segments: UrlSegment[]): Observable<UrlSegmentGroup> {\n    if (route.path === '**') {\n      if (route.loadChildren) {\n        return defer(\n            () => this.configLoader.load(ngModule.injector, route)\n                      .pipe(map((cfg: LoadedRouterConfig) => {\n                        route._loadedConfig = cfg;\n                        return new UrlSegmentGroup(segments, {});\n                      })));\n      }\n\n      return of(new UrlSegmentGroup(segments, {}));\n    }\n\n    const {matched, consumedSegments, lastChild} = match(rawSegmentGroup, route, segments);\n    if (!matched) return noMatch(rawSegmentGroup);\n\n    const rawSlicedSegments = segments.slice(lastChild);\n    const childConfig$ = this.getChildConfig(ngModule, route, segments);\n\n    return childConfig$.pipe(mergeMap((routerConfig: LoadedRouterConfig) => {\n      const childModule = routerConfig.module;\n      const childConfig = routerConfig.routes;\n\n      const {segmentGroup, slicedSegments} =\n          split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig);\n\n      if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n        const expanded$ = this.expandChildren(childModule, childConfig, segmentGroup);\n        return expanded$.pipe(\n            map((children: any) => new UrlSegmentGroup(consumedSegments, children)));\n      }\n\n      if (childConfig.length === 0 && slicedSegments.length === 0) {\n        return of(new UrlSegmentGroup(consumedSegments, {}));\n      }\n\n      const expanded$ = this.expandSegment(\n          childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n      return expanded$.pipe(\n          map((cs: UrlSegmentGroup) =>\n                  new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children)));\n    }));\n  }\n\n  private getChildConfig(ngModule: NgModuleRef<any>, route: Route, segments: UrlSegment[]):\n      Observable<LoadedRouterConfig> {\n    if (route.children) {\n      // The children belong to the same module\n      return of(new LoadedRouterConfig(route.children, ngModule));\n    }\n\n    if (route.loadChildren) {\n      // lazy children belong to the loaded module\n      if (route._loadedConfig !== undefined) {\n        return of(route._loadedConfig);\n      }\n\n      return this.runCanLoadGuards(ngModule.injector, route, segments)\n          .pipe(mergeMap((shouldLoadResult: boolean) => {\n            if (shouldLoadResult) {\n              return this.configLoader.load(ngModule.injector, route)\n                  .pipe(map((cfg: LoadedRouterConfig) => {\n                    route._loadedConfig = cfg;\n                    return cfg;\n                  }));\n            }\n            return canLoadFails(route);\n          }));\n    }\n\n    return of(new LoadedRouterConfig([], ngModule));\n  }\n\n  private runCanLoadGuards(moduleInjector: Injector, route: Route, segments: UrlSegment[]):\n      Observable<boolean> {\n    const canLoad = route.canLoad;\n    if (!canLoad || canLoad.length === 0) return of(true);\n\n    const canLoadObservables = canLoad.map((injectionToken: any) => {\n      const guard = moduleInjector.get(injectionToken);\n      let guardVal;\n      if (isCanLoad(guard)) {\n        guardVal = guard.canLoad(route, segments);\n      } else if (isFunction<CanLoadFn>(guard)) {\n        guardVal = guard(route, segments);\n      } else {\n        throw new Error('Invalid CanLoad guard');\n      }\n      return wrapIntoObservable(guardVal);\n    });\n\n    return of(canLoadObservables)\n        .pipe(\n            prioritizedGuardValue(),\n            tap((result: UrlTree|boolean) => {\n              if (!isUrlTree(result)) return;\n\n              const error: Error&{url?: UrlTree} = navigationCancelingError(\n                  `Redirecting to \"${this.urlSerializer.serialize(result)}\"`);\n              error.url = result;\n              throw error;\n            }),\n            map(result => result === true),\n        );\n  }\n\n  private lineralizeSegments(route: Route, urlTree: UrlTree): Observable<UrlSegment[]> {\n    let res: UrlSegment[] = [];\n    let c = urlTree.root;\n    while (true) {\n      res = res.concat(c.segments);\n      if (c.numberOfChildren === 0) {\n        return of(res);\n      }\n\n      if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n        return namedOutletsRedirect(route.redirectTo!);\n      }\n\n      c = c.children[PRIMARY_OUTLET];\n    }\n  }\n\n  private applyRedirectCommands(\n      segments: UrlSegment[], redirectTo: string, posParams: {[k: string]: UrlSegment}): UrlTree {\n    return this.applyRedirectCreatreUrlTree(\n        redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n  }\n\n  private applyRedirectCreatreUrlTree(\n      redirectTo: string, urlTree: UrlTree, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlTree {\n    const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n    return new UrlTree(\n        newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams),\n        urlTree.fragment);\n  }\n\n  private createQueryParams(redirectToParams: Params, actualParams: Params): Params {\n    const res: Params = {};\n    forEach(redirectToParams, (v: any, k: string) => {\n      const copySourceValue = typeof v === 'string' && v.startsWith(':');\n      if (copySourceValue) {\n        const sourceName = v.substring(1);\n        res[k] = actualParams[sourceName];\n      } else {\n        res[k] = v;\n      }\n    });\n    return res;\n  }\n\n  private createSegmentGroup(\n      redirectTo: string, group: UrlSegmentGroup, segments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegmentGroup {\n    const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n\n    let children: {[n: string]: UrlSegmentGroup} = {};\n    forEach(group.children, (child: UrlSegmentGroup, name: string) => {\n      children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n    });\n\n    return new UrlSegmentGroup(updatedSegments, children);\n  }\n\n  private createSegments(\n      redirectTo: string, redirectToSegments: UrlSegment[], actualSegments: UrlSegment[],\n      posParams: {[k: string]: UrlSegment}): UrlSegment[] {\n    return redirectToSegments.map(\n        s => s.path.startsWith(':') ? this.findPosParam(redirectTo, s, posParams) :\n                                      this.findOrReturn(s, actualSegments));\n  }\n\n  private findPosParam(\n      redirectTo: string, redirectToUrlSegment: UrlSegment,\n      posParams: {[k: string]: UrlSegment}): UrlSegment {\n    const pos = posParams[redirectToUrlSegment.path.substring(1)];\n    if (!pos)\n      throw new Error(\n          `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n    return pos;\n  }\n\n  private findOrReturn(redirectToUrlSegment: UrlSegment, actualSegments: UrlSegment[]): UrlSegment {\n    let idx = 0;\n    for (const s of actualSegments) {\n      if (s.path === redirectToUrlSegment.path) {\n        actualSegments.splice(idx);\n        return s;\n      }\n      idx++;\n    }\n    return redirectToUrlSegment;\n  }\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): {\n  matched: boolean,\n  consumedSegments: UrlSegment[],\n  lastChild: number,\n  positionalParamSegments: {[k: string]: UrlSegment}\n} {\n  if (route.path === '') {\n    if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n      return {matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n    }\n\n    return {matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {}};\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n\n  if (!res) {\n    return {\n      matched: false,\n      consumedSegments: <any[]>[],\n      lastChild: 0,\n      positionalParamSegments: {},\n    };\n  }\n\n  return {\n    matched: true,\n    consumedSegments: res.consumed!,\n    lastChild: res.consumed.length!,\n    positionalParamSegments: res.posParams!,\n  };\n}\n\nfunction split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[]) {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptySegments(\n            config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    return {segmentGroup: mergeTrivialChildren(s), slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptySegmentsToChildrenIfNeeded(\n            segmentGroup, slicedSegments, config, segmentGroup.children));\n    return {segmentGroup: mergeTrivialChildren(s), slicedSegments};\n  }\n\n  return {segmentGroup, slicedSegments};\n}\n\nfunction mergeTrivialChildren(s: UrlSegmentGroup): UrlSegmentGroup {\n  if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n    const c = s.children[PRIMARY_OUTLET];\n    return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n  }\n\n  return s;\n}\n\nfunction addEmptySegmentsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[],\n    children: {[name: string]: UrlSegmentGroup}): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      res[getOutlet(r)] = new UrlSegmentGroup([], {});\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptySegments(\n    routes: Route[], primarySegmentGroup: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegmentGroup;\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      res[getOutlet(r)] = new UrlSegmentGroup([], {});\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathRedirectsWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathRedirects(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => isEmptyPathRedirect(segmentGroup, segments, r));\n}\n\nfunction isEmptyPathRedirect(\n    segmentGroup: UrlSegmentGroup, segments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '' && r.redirectTo !== undefined;\n}\n\nfunction getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\nimport {applyRedirects as applyRedirectsFn} from '../apply_redirects';\nimport {Routes} from '../config';\nimport {NavigationTransition} from '../router';\nimport {RouterConfigLoader} from '../router_config_loader';\nimport {UrlSerializer} from '../url_tree';\n\nexport function applyRedirects(\n    moduleInjector: Injector, configLoader: RouterConfigLoader, urlSerializer: UrlSerializer,\n    config: Routes): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(switchMap(\n        t => applyRedirectsFn(moduleInjector, configLoader, urlSerializer, t.extractedUrl, config)\n                 .pipe(map(urlAfterRedirects => ({...t, urlAfterRedirects})))));\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\n\nimport {LoadedRouterConfig, RunGuardsAndResolvers} from '../config';\nimport {ChildrenOutletContexts, OutletContext} from '../router_outlet_context';\nimport {ActivatedRouteSnapshot, equalParamsAndUrlSegments, RouterStateSnapshot} from '../router_state';\nimport {equalPath} from '../url_tree';\nimport {forEach, shallowEqual} from '../utils/collection';\nimport {nodeChildrenAsMap, TreeNode} from '../utils/tree';\n\nexport class CanActivate {\n  readonly route: ActivatedRouteSnapshot;\n  constructor(public path: ActivatedRouteSnapshot[]) {\n    this.route = this.path[this.path.length - 1];\n  }\n}\n\nexport class CanDeactivate {\n  constructor(public component: Object|null, public route: ActivatedRouteSnapshot) {}\n}\n\nexport declare type Checks = {\n  canDeactivateChecks: CanDeactivate[],\n  canActivateChecks: CanActivate[],\n};\n\nexport function getAllRouteGuards(\n    future: RouterStateSnapshot, curr: RouterStateSnapshot,\n    parentContexts: ChildrenOutletContexts) {\n  const futureRoot = future._root;\n  const currRoot = curr ? curr._root : null;\n\n  return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\n\nexport function getCanActivateChild(p: ActivatedRouteSnapshot):\n    {node: ActivatedRouteSnapshot, guards: any[]}|null {\n  const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n  if (!canActivateChild || canActivateChild.length === 0) return null;\n  return {node: p, guards: canActivateChild};\n}\n\nexport function getToken(\n    token: any, snapshot: ActivatedRouteSnapshot, moduleInjector: Injector): any {\n  const config = getClosestLoadedConfig(snapshot);\n  const injector = config ? config.module.injector : moduleInjector;\n  return injector.get(token);\n}\n\nfunction getClosestLoadedConfig(snapshot: ActivatedRouteSnapshot): LoadedRouterConfig|null {\n  if (!snapshot) return null;\n\n  for (let s = snapshot.parent; s; s = s.parent) {\n    const route = s.routeConfig;\n    if (route && route._loadedConfig) return route._loadedConfig;\n  }\n\n  return null;\n}\n\nfunction getChildRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>|null,\n    contexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[], checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const prevChildren = nodeChildrenAsMap(currNode);\n\n  // Process the children of the future route\n  futureNode.children.forEach(c => {\n    getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n    delete prevChildren[c.value.outlet];\n  });\n\n  // Process any children left from the current route (not active for the future route)\n  forEach(\n      prevChildren,\n      (v: TreeNode<ActivatedRouteSnapshot>, k: string) =>\n          deactivateRouteAndItsChildren(v, contexts!.getContext(k), checks));\n\n  return checks;\n}\n\nfunction getRouteGuards(\n    futureNode: TreeNode<ActivatedRouteSnapshot>, currNode: TreeNode<ActivatedRouteSnapshot>,\n    parentContexts: ChildrenOutletContexts|null, futurePath: ActivatedRouteSnapshot[],\n    checks: Checks = {\n      canDeactivateChecks: [],\n      canActivateChecks: []\n    }): Checks {\n  const future = futureNode.value;\n  const curr = currNode ? currNode.value : null;\n  const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n\n  // reusing the node\n  if (curr && future.routeConfig === curr.routeConfig) {\n    const shouldRun =\n        shouldRunGuardsAndResolvers(curr, future, future.routeConfig!.runGuardsAndResolvers);\n    if (shouldRun) {\n      checks.canActivateChecks.push(new CanActivate(futurePath));\n    } else {\n      // we need to set the data\n      future.data = curr.data;\n      future._resolvedData = curr._resolvedData;\n    }\n\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(\n          futureNode, currNode, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n    }\n\n    if (shouldRun) {\n      const component = context && context.outlet && context.outlet.component || null;\n      checks.canDeactivateChecks.push(new CanDeactivate(component, curr));\n    }\n  } else {\n    if (curr) {\n      deactivateRouteAndItsChildren(currNode, context, checks);\n    }\n\n    checks.canActivateChecks.push(new CanActivate(futurePath));\n    // If we have a component, we need to go through an outlet.\n    if (future.component) {\n      getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n\n      // if we have a componentless route, we recurse but keep the same outlet map.\n    } else {\n      getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n    }\n  }\n\n  return checks;\n}\n\nfunction shouldRunGuardsAndResolvers(\n    curr: ActivatedRouteSnapshot, future: ActivatedRouteSnapshot,\n    mode: RunGuardsAndResolvers|undefined): boolean {\n  if (typeof mode === 'function') {\n    return mode(curr, future);\n  }\n  switch (mode) {\n    case 'pathParamsChange':\n      return !equalPath(curr.url, future.url);\n\n    case 'pathParamsOrQueryParamsChange':\n      return !equalPath(curr.url, future.url) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'always':\n      return true;\n\n    case 'paramsOrQueryParamsChange':\n      return !equalParamsAndUrlSegments(curr, future) ||\n          !shallowEqual(curr.queryParams, future.queryParams);\n\n    case 'paramsChange':\n    default:\n      return !equalParamsAndUrlSegments(curr, future);\n  }\n}\n\nfunction deactivateRouteAndItsChildren(\n    route: TreeNode<ActivatedRouteSnapshot>, context: OutletContext|null, checks: Checks): void {\n  const children = nodeChildrenAsMap(route);\n  const r = route.value;\n\n  forEach(children, (node: TreeNode<ActivatedRouteSnapshot>, childName: string) => {\n    if (!r.component) {\n      deactivateRouteAndItsChildren(node, context, checks);\n    } else if (context) {\n      deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n    } else {\n      deactivateRouteAndItsChildren(node, null, checks);\n    }\n  });\n\n  if (!r.component) {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  } else if (context && context.outlet && context.outlet.isActivated) {\n    checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n  } else {\n    checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {defer, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatAll, concatMap, first, map, mergeMap} from 'rxjs/operators';\n\nimport {ActivationStart, ChildActivationStart, Event} from '../events';\nimport {CanActivateChildFn, CanActivateFn, CanDeactivateFn} from '../interfaces';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, RouterStateSnapshot} from '../router_state';\nimport {UrlTree} from '../url_tree';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {CanActivate, CanDeactivate, getCanActivateChild, getToken} from '../utils/preactivation';\nimport {isBoolean, isCanActivate, isCanActivateChild, isCanDeactivate, isFunction} from '../utils/type_guards';\n\nimport {prioritizedGuardValue} from './prioritized_guard_value';\n\nexport function checkGuards(moduleInjector: Injector, forwardEvent?: (evt: Event) => void):\n    MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(mergeMap(t => {\n      const {targetSnapshot, currentSnapshot, guards: {canActivateChecks, canDeactivateChecks}} = t;\n      if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n        return of({...t, guardsResult: true});\n      }\n\n      return runCanDeactivateChecks(\n                 canDeactivateChecks, targetSnapshot!, currentSnapshot, moduleInjector)\n          .pipe(\n              mergeMap(canDeactivate => {\n                return canDeactivate && isBoolean(canDeactivate) ?\n                    runCanActivateChecks(\n                        targetSnapshot!, canActivateChecks, moduleInjector, forwardEvent) :\n                    of(canDeactivate);\n              }),\n              map(guardsResult => ({...t, guardsResult})));\n    }));\n  };\n}\n\nfunction runCanDeactivateChecks(\n    checks: CanDeactivate[], futureRSS: RouterStateSnapshot, currRSS: RouterStateSnapshot,\n    moduleInjector: Injector) {\n  return from(checks).pipe(\n      mergeMap(\n          check =>\n              runCanDeactivate(check.component, check.route, currRSS, futureRSS, moduleInjector)),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\nfunction runCanActivateChecks(\n    futureSnapshot: RouterStateSnapshot, checks: CanActivate[], moduleInjector: Injector,\n    forwardEvent?: (evt: Event) => void) {\n  return from(checks).pipe(\n      concatMap((check: CanActivate) => {\n        return from([\n                 fireChildActivationStart(check.route.parent, forwardEvent),\n                 fireActivationStart(check.route, forwardEvent),\n                 runCanActivateChild(futureSnapshot, check.path, moduleInjector),\n                 runCanActivate(futureSnapshot, check.route, moduleInjector)\n               ])\n            .pipe(concatAll(), first(result => {\n                    return result !== true;\n                  }, true as boolean | UrlTree));\n      }),\n      first(result => {\n        return result !== true;\n      }, true as boolean | UrlTree));\n}\n\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ActivationStart(snapshot));\n  }\n  return of(true);\n}\n\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(\n    snapshot: ActivatedRouteSnapshot|null,\n    forwardEvent?: (evt: Event) => void): Observable<boolean> {\n  if (snapshot !== null && forwardEvent) {\n    forwardEvent(new ChildActivationStart(snapshot));\n  }\n  return of(true);\n}\n\nfunction runCanActivate(\n    futureRSS: RouterStateSnapshot, futureARS: ActivatedRouteSnapshot,\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n  if (!canActivate || canActivate.length === 0) return of(true);\n\n  const canActivateObservables = canActivate.map((c: any) => {\n    return defer(() => {\n      const guard = getToken(c, futureARS, moduleInjector);\n      let observable;\n      if (isCanActivate(guard)) {\n        observable = wrapIntoObservable(guard.canActivate(futureARS, futureRSS));\n      } else if (isFunction<CanActivateFn>(guard)) {\n        observable = wrapIntoObservable(guard(futureARS, futureRSS));\n      } else {\n        throw new Error('Invalid CanActivate guard');\n      }\n      return observable.pipe(first());\n    });\n  });\n  return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\n\nfunction runCanActivateChild(\n    futureRSS: RouterStateSnapshot, path: ActivatedRouteSnapshot[],\n    moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const futureARS = path[path.length - 1];\n\n  const canActivateChildGuards = path.slice(0, path.length - 1)\n                                     .reverse()\n                                     .map(p => getCanActivateChild(p))\n                                     .filter(_ => _ !== null);\n\n  const canActivateChildGuardsMapped = canActivateChildGuards.map((d: any) => {\n    return defer(() => {\n      const guardsMapped = d.guards.map((c: any) => {\n        const guard = getToken(c, d.node, moduleInjector);\n        let observable;\n        if (isCanActivateChild(guard)) {\n          observable = wrapIntoObservable(guard.canActivateChild(futureARS, futureRSS));\n        } else if (isFunction<CanActivateChildFn>(guard)) {\n          observable = wrapIntoObservable(guard(futureARS, futureRSS));\n        } else {\n          throw new Error('Invalid CanActivateChild guard');\n        }\n        return observable.pipe(first());\n      });\n      return of(guardsMapped).pipe(prioritizedGuardValue());\n    });\n  });\n  return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\n\nfunction runCanDeactivate(\n    component: Object|null, currARS: ActivatedRouteSnapshot, currRSS: RouterStateSnapshot,\n    futureRSS: RouterStateSnapshot, moduleInjector: Injector): Observable<boolean|UrlTree> {\n  const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n  if (!canDeactivate || canDeactivate.length === 0) return of(true);\n  const canDeactivateObservables = canDeactivate.map((c: any) => {\n    const guard = getToken(c, currARS, moduleInjector);\n    let observable;\n    if (isCanDeactivate(guard)) {\n      observable = wrapIntoObservable(guard.canDeactivate(component!, currARS, currRSS, futureRSS));\n    } else if (isFunction<CanDeactivateFn<any>>(guard)) {\n      observable = wrapIntoObservable(guard(component, currARS, currRSS, futureRSS));\n    } else {\n      throw new Error('Invalid CanDeactivate guard');\n    }\n    return observable.pipe(first());\n  });\n  return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {Observable, Observer, of} from 'rxjs';\n\nimport {Data, ResolveData, Route, Routes} from './config';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, ParamsInheritanceStrategy, RouterStateSnapshot} from './router_state';\nimport {defaultUrlMatcher, PRIMARY_OUTLET} from './shared';\nimport {mapChildrenIntoArray, UrlSegment, UrlSegmentGroup, UrlTree} from './url_tree';\nimport {forEach, last} from './utils/collection';\nimport {TreeNode} from './utils/tree';\n\nclass NoMatch {}\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Routes, urlTree: UrlTree, url: string,\n    paramsInheritanceStrategy: ParamsInheritanceStrategy = 'emptyOnly',\n    relativeLinkResolution: 'legacy'|'corrected' = 'legacy'): Observable<RouterStateSnapshot> {\n  return new Recognizer(\n             rootComponentType, config, urlTree, url, paramsInheritanceStrategy,\n             relativeLinkResolution)\n      .recognize();\n}\n\nclass Recognizer {\n  constructor(\n      private rootComponentType: Type<any>|null, private config: Routes, private urlTree: UrlTree,\n      private url: string, private paramsInheritanceStrategy: ParamsInheritanceStrategy,\n      private relativeLinkResolution: 'legacy'|'corrected') {}\n\n  recognize(): Observable<RouterStateSnapshot> {\n    try {\n      const rootSegmentGroup =\n          split(this.urlTree.root, [], [], this.config, this.relativeLinkResolution).segmentGroup;\n\n      const children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n\n      const root = new ActivatedRouteSnapshot(\n          [], Object.freeze({}), Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment!, {}, PRIMARY_OUTLET, this.rootComponentType, null,\n          this.urlTree.root, -1, {});\n\n      const rootNode = new TreeNode<ActivatedRouteSnapshot>(root, children);\n      const routeState = new RouterStateSnapshot(this.url, rootNode);\n      this.inheritParamsAndData(routeState._root);\n      return of(routeState);\n\n    } catch (e) {\n      return new Observable<RouterStateSnapshot>(\n          (obs: Observer<RouterStateSnapshot>) => obs.error(e));\n    }\n  }\n\n  inheritParamsAndData(routeNode: TreeNode<ActivatedRouteSnapshot>): void {\n    const route = routeNode.value;\n\n    const i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n    route.params = Object.freeze(i.params);\n    route.data = Object.freeze(i.data);\n\n    routeNode.children.forEach(n => this.inheritParamsAndData(n));\n  }\n\n  processSegmentGroup(config: Route[], segmentGroup: UrlSegmentGroup, outlet: string):\n      TreeNode<ActivatedRouteSnapshot>[] {\n    if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n      return this.processChildren(config, segmentGroup);\n    }\n\n    return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n  }\n\n  processChildren(config: Route[], segmentGroup: UrlSegmentGroup):\n      TreeNode<ActivatedRouteSnapshot>[] {\n    const children = mapChildrenIntoArray(\n        segmentGroup, (child, childOutlet) => this.processSegmentGroup(config, child, childOutlet));\n    checkOutletNameUniqueness(children);\n    sortActivatedRouteSnapshots(children);\n    return children;\n  }\n\n  processSegment(\n      config: Route[], segmentGroup: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n    for (const r of config) {\n      try {\n        return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n      } catch (e) {\n        if (!(e instanceof NoMatch)) throw e;\n      }\n    }\n    if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n      return [];\n    }\n\n    throw new NoMatch();\n  }\n\n  private noLeftoversInUrl(segmentGroup: UrlSegmentGroup, segments: UrlSegment[], outlet: string):\n      boolean {\n    return segments.length === 0 && !segmentGroup.children[outlet];\n  }\n\n  processSegmentAgainstRoute(\n      route: Route, rawSegment: UrlSegmentGroup, segments: UrlSegment[],\n      outlet: string): TreeNode<ActivatedRouteSnapshot>[] {\n    if (route.redirectTo) throw new NoMatch();\n\n    if ((route.outlet || PRIMARY_OUTLET) !== outlet) throw new NoMatch();\n\n    let snapshot: ActivatedRouteSnapshot;\n    let consumedSegments: UrlSegment[] = [];\n    let rawSlicedSegments: UrlSegment[] = [];\n\n    if (route.path === '**') {\n      const params = segments.length > 0 ? last(segments)!.parameters : {};\n      snapshot = new ActivatedRouteSnapshot(\n          segments, params, Object.freeze({...this.urlTree.queryParams}), this.urlTree.fragment!,\n          getData(route), outlet, route.component!, route, getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n    } else {\n      const result: MatchResult = match(rawSegment, route, segments);\n      consumedSegments = result.consumedSegments;\n      rawSlicedSegments = segments.slice(result.lastChild);\n\n      snapshot = new ActivatedRouteSnapshot(\n          consumedSegments, result.parameters, Object.freeze({...this.urlTree.queryParams}),\n          this.urlTree.fragment!, getData(route), outlet, route.component!, route,\n          getSourceSegmentGroup(rawSegment),\n          getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n    }\n\n    const childConfig: Route[] = getChildConfig(route);\n\n    const {segmentGroup, slicedSegments} = split(\n        rawSegment, consumedSegments, rawSlicedSegments, childConfig, this.relativeLinkResolution);\n\n    if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n      const children = this.processChildren(childConfig, segmentGroup);\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n    }\n\n    if (childConfig.length === 0 && slicedSegments.length === 0) {\n      return [new TreeNode<ActivatedRouteSnapshot>(snapshot, [])];\n    }\n\n    const children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n    return [new TreeNode<ActivatedRouteSnapshot>(snapshot, children)];\n  }\n}\n\nfunction sortActivatedRouteSnapshots(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  nodes.sort((a, b) => {\n    if (a.value.outlet === PRIMARY_OUTLET) return -1;\n    if (b.value.outlet === PRIMARY_OUTLET) return 1;\n    return a.value.outlet.localeCompare(b.value.outlet);\n  });\n}\n\nfunction getChildConfig(route: Route): Route[] {\n  if (route.children) {\n    return route.children;\n  }\n\n  if (route.loadChildren) {\n    return route._loadedConfig!.routes;\n  }\n\n  return [];\n}\n\ninterface MatchResult {\n  consumedSegments: UrlSegment[];\n  lastChild: number;\n  parameters: any;\n}\n\nfunction match(segmentGroup: UrlSegmentGroup, route: Route, segments: UrlSegment[]): MatchResult {\n  if (route.path === '') {\n    if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n      throw new NoMatch();\n    }\n\n    return {consumedSegments: [], lastChild: 0, parameters: {}};\n  }\n\n  const matcher = route.matcher || defaultUrlMatcher;\n  const res = matcher(segments, segmentGroup, route);\n  if (!res) throw new NoMatch();\n\n  const posParams: {[n: string]: string} = {};\n  forEach(res.posParams!, (v: UrlSegment, k: string) => {\n    posParams[k] = v.path;\n  });\n  const parameters = res.consumed.length > 0 ?\n      {...posParams, ...res.consumed[res.consumed.length - 1].parameters} :\n      posParams;\n\n  return {consumedSegments: res.consumed, lastChild: res.consumed.length, parameters};\n}\n\nfunction checkOutletNameUniqueness(nodes: TreeNode<ActivatedRouteSnapshot>[]): void {\n  const names: {[k: string]: ActivatedRouteSnapshot} = {};\n  nodes.forEach(n => {\n    const routeWithSameOutletName = names[n.value.outlet];\n    if (routeWithSameOutletName) {\n      const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n      const c = n.value.url.map(s => s.toString()).join('/');\n      throw new Error(`Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n    }\n    names[n.value.outlet] = n.value;\n  });\n}\n\nfunction getSourceSegmentGroup(segmentGroup: UrlSegmentGroup): UrlSegmentGroup {\n  let s = segmentGroup;\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n  }\n  return s;\n}\n\nfunction getPathIndexShift(segmentGroup: UrlSegmentGroup): number {\n  let s = segmentGroup;\n  let res = (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  while (s._sourceSegment) {\n    s = s._sourceSegment;\n    res += (s._segmentIndexShift ? s._segmentIndexShift : 0);\n  }\n  return res - 1;\n}\n\nfunction split(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    config: Route[], relativeLinkResolution: 'legacy'|'corrected') {\n  if (slicedSegments.length > 0 &&\n      containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        consumedSegments,\n        createChildrenForEmptyPaths(\n            segmentGroup, consumedSegments, config,\n            new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments: []};\n  }\n\n  if (slicedSegments.length === 0 &&\n      containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n    const s = new UrlSegmentGroup(\n        segmentGroup.segments,\n        addEmptyPathsToChildrenIfNeeded(\n            segmentGroup, consumedSegments, slicedSegments, config, segmentGroup.children,\n            relativeLinkResolution));\n    s._sourceSegment = segmentGroup;\n    s._segmentIndexShift = consumedSegments.length;\n    return {segmentGroup: s, slicedSegments};\n  }\n\n  const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n  s._sourceSegment = segmentGroup;\n  s._segmentIndexShift = consumedSegments.length;\n  return {segmentGroup: s, slicedSegments};\n}\n\nfunction addEmptyPathsToChildrenIfNeeded(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], slicedSegments: UrlSegment[],\n    routes: Route[], children: {[name: string]: UrlSegmentGroup},\n    relativeLinkResolution: 'legacy'|'corrected'): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  for (const r of routes) {\n    if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      if (relativeLinkResolution === 'legacy') {\n        s._segmentIndexShift = segmentGroup.segments.length;\n      } else {\n        s._segmentIndexShift = consumedSegments.length;\n      }\n      res[getOutlet(r)] = s;\n    }\n  }\n  return {...children, ...res};\n}\n\nfunction createChildrenForEmptyPaths(\n    segmentGroup: UrlSegmentGroup, consumedSegments: UrlSegment[], routes: Route[],\n    primarySegment: UrlSegmentGroup): {[name: string]: UrlSegmentGroup} {\n  const res: {[name: string]: UrlSegmentGroup} = {};\n  res[PRIMARY_OUTLET] = primarySegment;\n  primarySegment._sourceSegment = segmentGroup;\n  primarySegment._segmentIndexShift = consumedSegments.length;\n\n  for (const r of routes) {\n    if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n      const s = new UrlSegmentGroup([], {});\n      s._sourceSegment = segmentGroup;\n      s._segmentIndexShift = consumedSegments.length;\n      res[getOutlet(r)] = s;\n    }\n  }\n  return res;\n}\n\nfunction containsEmptyPathMatchesWithNamedOutlets(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(\n      r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\n\nfunction containsEmptyPathMatches(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], routes: Route[]): boolean {\n  return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\n\nfunction emptyPathMatch(\n    segmentGroup: UrlSegmentGroup, slicedSegments: UrlSegment[], r: Route): boolean {\n  if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n    return false;\n  }\n\n  return r.path === '' && r.redirectTo === undefined;\n}\n\nfunction getOutlet(route: Route): string {\n  return route.outlet || PRIMARY_OUTLET;\n}\n\nfunction getData(route: Route): Data {\n  return route.data || {};\n}\n\nfunction getResolve(route: Route): ResolveData {\n  return route.resolve || {};\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Type} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {Route} from '../config';\nimport {recognize as recognizeFn} from '../recognize';\nimport {NavigationTransition} from '../router';\nimport {UrlTree} from '../url_tree';\n\nexport function recognize(\n    rootComponentType: Type<any>|null, config: Route[], serializer: (url: UrlTree) => string,\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    relativeLinkResolution: 'legacy'|'corrected'): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(mergeMap(\n        t => recognizeFn(\n                 rootComponentType, config, t.urlAfterRedirects, serializer(t.urlAfterRedirects),\n                 paramsInheritanceStrategy, relativeLinkResolution)\n                 .pipe(map(targetSnapshot => ({...t, targetSnapshot})))));\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injector} from '@angular/core';\nimport {EMPTY, from, MonoTypeOperatorFunction, Observable, of} from 'rxjs';\nimport {concatMap, map, mergeMap, takeLast, tap} from 'rxjs/operators';\n\nimport {ResolveData} from '../config';\nimport {NavigationTransition} from '../router';\nimport {ActivatedRouteSnapshot, inheritedParamsDataResolve, RouterStateSnapshot} from '../router_state';\nimport {wrapIntoObservable} from '../utils/collection';\nimport {getToken} from '../utils/preactivation';\n\nexport function resolveData(\n    paramsInheritanceStrategy: 'emptyOnly'|'always',\n    moduleInjector: Injector): MonoTypeOperatorFunction<NavigationTransition> {\n  return function(source: Observable<NavigationTransition>) {\n    return source.pipe(mergeMap(t => {\n      const {targetSnapshot, guards: {canActivateChecks}} = t;\n\n      if (!canActivateChecks.length) {\n        return of(t);\n      }\n      let canActivateChecksResolved = 0;\n      return from(canActivateChecks)\n          .pipe(\n              concatMap(\n                  check => runResolve(\n                      check.route, targetSnapshot!, paramsInheritanceStrategy, moduleInjector)),\n              tap(() => canActivateChecksResolved++),\n              takeLast(1),\n              mergeMap(_ => canActivateChecksResolved === canActivateChecks.length ? of(t) : EMPTY),\n          );\n    }));\n  };\n}\n\nfunction runResolve(\n    futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    paramsInheritanceStrategy: 'emptyOnly'|'always', moduleInjector: Injector) {\n  const resolve = futureARS._resolve;\n  return resolveNode(resolve, futureARS, futureRSS, moduleInjector)\n      .pipe(map((resolvedData: any) => {\n        futureARS._resolvedData = resolvedData;\n        futureARS.data = {\n          ...futureARS.data,\n          ...inheritedParamsDataResolve(futureARS, paramsInheritanceStrategy).resolve\n        };\n        return null;\n      }));\n}\n\nfunction resolveNode(\n    resolve: ResolveData, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const keys = Object.keys(resolve);\n  if (keys.length === 0) {\n    return of({});\n  }\n  const data: {[k: string]: any} = {};\n  return from(keys).pipe(\n      mergeMap(\n          (key: string) => getResolver(resolve[key], futureARS, futureRSS, moduleInjector)\n                               .pipe(tap((value: any) => {\n                                 data[key] = value;\n                               }))),\n      takeLast(1),\n      mergeMap(() => {\n        // Ensure all resolvers returned values, otherwise don't emit any \"next\" and just complete\n        // the chain which will cancel navigation\n        if (Object.keys(data).length === keys.length) {\n          return of(data);\n        }\n        return EMPTY;\n      }),\n  );\n}\n\nfunction getResolver(\n    injectionToken: any, futureARS: ActivatedRouteSnapshot, futureRSS: RouterStateSnapshot,\n    moduleInjector: Injector): Observable<any> {\n  const resolver = getToken(injectionToken, futureARS, moduleInjector);\n  return resolver.resolve ? wrapIntoObservable(resolver.resolve(futureARS, futureRSS)) :\n                            wrapIntoObservable(resolver(futureARS, futureRSS));\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {from, MonoTypeOperatorFunction, ObservableInput} from 'rxjs';\nimport {map, switchMap} from 'rxjs/operators';\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nexport function switchTap<T>(next: (x: T) => void|ObservableInput<any>):\n    MonoTypeOperatorFunction<T> {\n  return function(source) {\n    return source.pipe(switchMap(v => {\n      const nextResult = next(v);\n      if (nextResult) {\n        return from(nextResult).pipe(map(() => v));\n      }\n      return from([v]);\n    }));\n  };\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentRef} from '@angular/core';\n\nimport {OutletContext} from './router_outlet_context';\nimport {ActivatedRoute, ActivatedRouteSnapshot} from './router_state';\nimport {TreeNode} from './utils/tree';\n\n/**\n * @description\n *\n * Represents the detached route tree.\n *\n * This is an opaque value the router will give to a custom route reuse strategy\n * to store and retrieve later on.\n *\n * @publicApi\n */\nexport type DetachedRouteHandle = {};\n\n/** @internal */\nexport type DetachedRouteHandleInternal = {\n  contexts: Map<string, OutletContext>,\n  componentRef: ComponentRef<any>,\n  route: TreeNode<ActivatedRoute>,\n};\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nexport abstract class RouteReuseStrategy {\n  /** Determines if this route (and its subtree) should be detached to be reused later */\n  abstract shouldDetach(route: ActivatedRouteSnapshot): boolean;\n\n  /**\n   * Stores the detached route.\n   *\n   * Storing a `null` value should erase the previously stored value.\n   */\n  abstract store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle|null): void;\n\n  /** Determines if this route (and its subtree) should be reattached */\n  abstract shouldAttach(route: ActivatedRouteSnapshot): boolean;\n\n  /** Retrieves the previously stored route */\n  abstract retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null;\n\n  /** Determines if a route should be reused */\n  abstract shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;\n}\n\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the fragment or query parameters change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nexport abstract class BaseRouteReuseStrategy implements RouteReuseStrategy {\n  /**\n   * Whether the given route should detach for later reuse.\n   * Always returns false for `BaseRouteReuseStrategy`.\n   * */\n  shouldDetach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /**\n   * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n   */\n  store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle): void {}\n\n  /** Returns `false`, meaning the route (and its subtree) is never reattached */\n  shouldAttach(route: ActivatedRouteSnapshot): boolean {\n    return false;\n  }\n\n  /** Returns `null` because this strategy does not store routes for later re-use. */\n  retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle|null {\n    return null;\n  }\n\n  /**\n   * Determines if a route should be reused.\n   * This strategy returns `true` when the future route config and current route config are\n   * identical.\n   */\n  shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n    return future.routeConfig === curr.routeConfig;\n  }\n}\n\nexport class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Component} from '@angular/core';\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\n@Component({template: `<router-outlet></router-outlet>`})\nexport class ɵEmptyOutletComponent {\n}\n\nexport {ɵEmptyOutletComponent as EmptyOutletComponent};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EmptyOutletComponent} from '../components/empty_outlet';\nimport {Route, Routes} from '../config';\nimport {PRIMARY_OUTLET} from '../shared';\n\nexport function validateConfig(config: Routes, parentPath: string = ''): void {\n  // forEach doesn't iterate undefined values\n  for (let i = 0; i < config.length; i++) {\n    const route: Route = config[i];\n    const fullPath: string = getFullPath(parentPath, route);\n    validateNode(route, fullPath);\n  }\n}\n\nfunction validateNode(route: Route, fullPath: string): void {\n  if (!route) {\n    throw new Error(`\n      Invalid configuration of route '${fullPath}': Encountered undefined route.\n      The reason might be an extra comma.\n\n      Example:\n      const routes: Routes = [\n        { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n        { path: 'dashboard',  component: DashboardComponent },, << two commas\n        { path: 'detail/:id', component: HeroDetailComponent }\n      ];\n    `);\n  }\n  if (Array.isArray(route)) {\n    throw new Error(`Invalid configuration of route '${fullPath}': Array cannot be specified`);\n  }\n  if (!route.component && !route.children && !route.loadChildren &&\n      (route.outlet && route.outlet !== PRIMARY_OUTLET)) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n  }\n  if (route.redirectTo && route.children) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': redirectTo and children cannot be used together`);\n  }\n  if (route.redirectTo && route.loadChildren) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': redirectTo and loadChildren cannot be used together`);\n  }\n  if (route.children && route.loadChildren) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': children and loadChildren cannot be used together`);\n  }\n  if (route.redirectTo && route.component) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': redirectTo and component cannot be used together`);\n  }\n  if (route.path && route.matcher) {\n    throw new Error(\n        `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n  }\n  if (route.redirectTo === void 0 && !route.component && !route.children && !route.loadChildren) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}'. One of the following must be provided: component, redirectTo, children or loadChildren`);\n  }\n  if (route.path === void 0 && route.matcher === void 0) {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': routes must have either a path or a matcher specified`);\n  }\n  if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n    throw new Error(`Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n  }\n  if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n    const exp =\n        `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n    throw new Error(`Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${\n        route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n  }\n  if (route.pathMatch !== void 0 && route.pathMatch !== 'full' && route.pathMatch !== 'prefix') {\n    throw new Error(`Invalid configuration of route '${\n        fullPath}': pathMatch can only be set to 'prefix' or 'full'`);\n  }\n  if (route.children) {\n    validateConfig(route.children, fullPath);\n  }\n}\n\nfunction getFullPath(parentPath: string, currentRoute: Route): string {\n  if (!currentRoute) {\n    return parentPath;\n  }\n  if (!parentPath && !currentRoute.path) {\n    return '';\n  } else if (parentPath && !currentRoute.path) {\n    return `${parentPath}/`;\n  } else if (!parentPath && currentRoute.path) {\n    return currentRoute.path;\n  } else {\n    return `${parentPath}/${currentRoute.path}`;\n  }\n}\n\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nexport function standardizeConfig(r: Route): Route {\n  const children = r.children && r.children.map(standardizeConfig);\n  const c = children ? {...r, children} : {...r};\n  if (!c.component && (children || c.loadChildren) && (c.outlet && c.outlet !== PRIMARY_OUTLET)) {\n    c.component = EmptyOutletComponent;\n  }\n  return c;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, InjectionToken, Injector, NgModuleFactory, NgModuleFactoryLoader} from '@angular/core';\nimport {from, Observable, of} from 'rxjs';\nimport {map, mergeMap} from 'rxjs/operators';\n\nimport {LoadChildren, LoadedRouterConfig, Route} from './config';\nimport {flatten, wrapIntoObservable} from './utils/collection';\nimport {standardizeConfig} from './utils/config';\n\n/**\n * The [DI token](guide/glossary/#di-token) for a router configuration.\n * @see `ROUTES`\n * @publicApi\n */\nexport const ROUTES = new InjectionToken<Route[][]>('ROUTES');\n\nexport class RouterConfigLoader {\n  constructor(\n      private loader: NgModuleFactoryLoader, private compiler: Compiler,\n      private onLoadStartListener?: (r: Route) => void,\n      private onLoadEndListener?: (r: Route) => void) {}\n\n  load(parentInjector: Injector, route: Route): Observable<LoadedRouterConfig> {\n    if (this.onLoadStartListener) {\n      this.onLoadStartListener(route);\n    }\n\n    const moduleFactory$ = this.loadModuleFactory(route.loadChildren!);\n\n    return moduleFactory$.pipe(map((factory: NgModuleFactory<any>) => {\n      if (this.onLoadEndListener) {\n        this.onLoadEndListener(route);\n      }\n\n      const module = factory.create(parentInjector);\n\n      return new LoadedRouterConfig(\n          flatten(module.injector.get(ROUTES)).map(standardizeConfig), module);\n    }));\n  }\n\n  private loadModuleFactory(loadChildren: LoadChildren): Observable<NgModuleFactory<any>> {\n    if (typeof loadChildren === 'string') {\n      return from(this.loader.load(loadChildren));\n    } else {\n      return wrapIntoObservable(loadChildren()).pipe(mergeMap((t: any) => {\n        if (t instanceof NgModuleFactory) {\n          return of(t);\n        } else {\n          return from(this.compiler.compileModuleAsync(t));\n        }\n      }));\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ComponentFactoryResolver, ComponentRef} from '@angular/core';\n\nimport {RouterOutlet} from './directives/router_outlet';\nimport {ActivatedRoute} from './router_state';\n\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nexport class OutletContext {\n  outlet: RouterOutlet|null = null;\n  route: ActivatedRoute|null = null;\n  resolver: ComponentFactoryResolver|null = null;\n  children = new ChildrenOutletContexts();\n  attachRef: ComponentRef<any>|null = null;\n}\n\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nexport class ChildrenOutletContexts {\n  // contexts for child outlets, by name.\n  private contexts = new Map<string, OutletContext>();\n\n  /** Called when a `RouterOutlet` directive is instantiated */\n  onChildOutletCreated(childName: string, outlet: RouterOutlet): void {\n    const context = this.getOrCreateContext(childName);\n    context.outlet = outlet;\n    this.contexts.set(childName, context);\n  }\n\n  /**\n   * Called when a `RouterOutlet` directive is destroyed.\n   * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n   * re-created later.\n   */\n  onChildOutletDestroyed(childName: string): void {\n    const context = this.getContext(childName);\n    if (context) {\n      context.outlet = null;\n    }\n  }\n\n  /**\n   * Called when the corresponding route is deactivated during navigation.\n   * Because the component get destroyed, all children outlet are destroyed.\n   */\n  onOutletDeactivated(): Map<string, OutletContext> {\n    const contexts = this.contexts;\n    this.contexts = new Map();\n    return contexts;\n  }\n\n  onOutletReAttached(contexts: Map<string, OutletContext>) {\n    this.contexts = contexts;\n  }\n\n  getOrCreateContext(childName: string): OutletContext {\n    let context = this.getContext(childName);\n\n    if (!context) {\n      context = new OutletContext();\n      this.contexts.set(childName, context);\n    }\n\n    return context;\n  }\n\n  getContext(childName: string): OutletContext|null {\n    return this.contexts.get(childName) || null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {UrlTree} from './url_tree';\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nexport abstract class UrlHandlingStrategy {\n  /**\n   * Tells the router if this URL should be processed.\n   *\n   * When it returns true, the router will execute the regular navigation.\n   * When it returns false, the router will set the router state to an empty state.\n   * As a result, all the active components will be destroyed.\n   *\n   */\n  abstract shouldProcessUrl(url: UrlTree): boolean;\n\n  /**\n   * Extracts the part of the URL that should be handled by the router.\n   * The rest of the URL will remain untouched.\n   */\n  abstract extract(url: UrlTree): UrlTree;\n\n  /**\n   * Merges the URL fragment with the rest of the URL.\n   */\n  abstract merge(newUrlPart: UrlTree, rawUrl: UrlTree): UrlTree;\n}\n\n/**\n * @publicApi\n */\nexport class DefaultUrlHandlingStrategy implements UrlHandlingStrategy {\n  shouldProcessUrl(url: UrlTree): boolean {\n    return true;\n  }\n  extract(url: UrlTree): UrlTree {\n    return url;\n  }\n  merge(newUrlPart: UrlTree, wholeUrl: UrlTree): UrlTree {\n    return newUrlPart;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Location, PopStateEvent} from '@angular/common';\nimport {Compiler, Injectable, Injector, isDevMode, NgModuleFactoryLoader, NgModuleRef, NgZone, Type, ɵConsole as Console} from '@angular/core';\nimport {BehaviorSubject, EMPTY, Observable, of, Subject, SubscriptionLike} from 'rxjs';\nimport {catchError, filter, finalize, map, switchMap, tap} from 'rxjs/operators';\n\nimport {QueryParamsHandling, Route, Routes} from './config';\nimport {createRouterState} from './create_router_state';\nimport {createUrlTree} from './create_url_tree';\nimport {Event, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, NavigationTrigger, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RoutesRecognized} from './events';\nimport {activateRoutes} from './operators/activate_routes';\nimport {applyRedirects} from './operators/apply_redirects';\nimport {checkGuards} from './operators/check_guards';\nimport {recognize} from './operators/recognize';\nimport {resolveData} from './operators/resolve_data';\nimport {switchTap} from './operators/switch_tap';\nimport {DefaultRouteReuseStrategy, RouteReuseStrategy} from './route_reuse_strategy';\nimport {RouterConfigLoader} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {ActivatedRoute, createEmptyState, RouterState, RouterStateSnapshot} from './router_state';\nimport {isNavigationCancelingError, navigationCancelingError, Params} from './shared';\nimport {DefaultUrlHandlingStrategy, UrlHandlingStrategy} from './url_handling_strategy';\nimport {containsTree, createEmptyUrlTree, UrlSerializer, UrlTree} from './url_tree';\nimport {standardizeConfig, validateConfig} from './utils/config';\nimport {Checks, getAllRouteGuards} from './utils/preactivation';\nimport {isUrlTree} from './utils/type_guards';\n\n\n/**\n * @description\n *\n * Options that modify the `Router` navigation strategy.\n * Supply an object containing any of these properties to a `Router` navigation function to\n * control how the target URL should be constructed or interpreted.\n *\n * @see [Router.navigate() method](api/router/Router#navigate)\n * @see [Router.navigateByUrl() method](api/router/Router#navigatebyurl)\n * @see [Router.createUrlTree() method](api/router/Router#createurltree)\n * @see [Routing and Navigation guide](guide/router)\n *\n * @publicApi\n */\nexport interface NavigationExtras {\n  /**\n   * Specifies a root URI to use for relative navigation.\n   *\n   * For example, consider the following route configuration where the parent route\n   * has two children.\n   *\n   * ```\n   * [{\n   *   path: 'parent',\n   *   component: ParentComponent,\n   *   children: [{\n   *     path: 'list',\n   *     component: ListComponent\n   *   },{\n   *     path: 'child',\n   *     component: ChildComponent\n   *   }]\n   * }]\n   * ```\n   *\n   * The following `go()` function navigates to the `list` route by\n   * interpreting the destination URI as relative to the activated `child`  route\n   *\n   * ```\n   *  @Component({...})\n   *  class ChildComponent {\n   *    constructor(private router: Router, private route: ActivatedRoute) {}\n   *\n   *    go() {\n   *      this.router.navigate(['../list'], { relativeTo: this.route });\n   *    }\n   *  }\n   * ```\n   */\n  relativeTo?: ActivatedRoute|null;\n\n  /**\n   * Sets query parameters to the URL.\n   *\n   * ```\n   * // Navigate to /results?page=1\n   * this.router.navigate(['/results'], { queryParams: { page: 1 } });\n   * ```\n   */\n  queryParams?: Params|null;\n\n  /**\n   * Sets the hash fragment for the URL.\n   *\n   * ```\n   * // Navigate to /results#top\n   * this.router.navigate(['/results'], { fragment: 'top' });\n   * ```\n   */\n  fragment?: string;\n\n  /**\n   * **DEPRECATED**: Use `queryParamsHandling: \"preserve\"` instead to preserve\n   * query parameters for the next navigation.\n   *\n   * @deprecated since v4\n   */\n  preserveQueryParams?: boolean;\n\n  /**\n   * How to handle query parameters in the router link for the next navigation.\n   * One of:\n   * * `preserve` : Preserve current parameters.\n   * * `merge` : Merge new with current parameters.\n   *\n   * The \"preserve\" option discards any new query params:\n   * ```\n   * // from /view1?page=1 to/view2?page=1\n   * this.router.navigate(['/view2'], { queryParams: { page: 2 },  queryParamsHandling: \"preserve\"\n   * });\n   * ```\n   * The \"merge\" option appends new query params to the params from the current URL:\n   * ```\n   * // from /view1?page=1 to/view2?page=1&otherKey=2\n   * this.router.navigate(['/view2'], { queryParams: { otherKey: 2 },  queryParamsHandling: \"merge\"\n   * });\n   * ```\n   * In case of a key collision between current parameters and those in the `queryParams` object,\n   * the new value is used.\n   *\n   */\n  queryParamsHandling?: QueryParamsHandling|null;\n  /**\n   * When true, preserves the URL fragment for the next navigation\n   *\n   * ```\n   * // Preserve fragment from /results#top to /view#top\n   * this.router.navigate(['/view'], { preserveFragment: true });\n   * ```\n   */\n  preserveFragment?: boolean;\n  /**\n   * When true, navigates without pushing a new state into history.\n   *\n   * ```\n   * // Navigate silently to /view\n   * this.router.navigate(['/view'], { skipLocationChange: true });\n   * ```\n   */\n  skipLocationChange?: boolean;\n  /**\n   * When true, navigates while replacing the current state in history.\n   *\n   * ```\n   * // Navigate to /view\n   * this.router.navigate(['/view'], { replaceUrl: true });\n   * ```\n   */\n  replaceUrl?: boolean;\n  /**\n   * Developer-defined state that can be passed to any navigation.\n   * Access this value through the `Navigation.extras` object\n   * returned from the [Router.getCurrentNavigation()\n   * method](api/router/Router#getcurrentnavigation) while a navigation is executing.\n   *\n   * After a navigation completes, the router writes an object containing this\n   * value together with a `navigationId` to `history.state`.\n   * The value is written when `location.go()` or `location.replaceState()`\n   * is called before activating this route.\n   *\n   * Note that `history.state` does not pass an object equality test because\n   * the router adds the `navigationId` on each navigation.\n   *\n   */\n  state?: {[k: string]: any};\n}\n\n/**\n * Error handler that is invoked when a navigation error occurs.\n *\n * If the handler returns a value, the navigation Promise is resolved with this value.\n * If the handler throws an exception, the navigation Promise is rejected with\n * the exception.\n *\n * @publicApi\n */\nexport type ErrorHandler = (error: any) => any;\n\nfunction defaultErrorHandler(error: any): any {\n  throw error;\n}\n\nfunction defaultMalformedUriErrorHandler(\n    error: URIError, urlSerializer: UrlSerializer, url: string): UrlTree {\n  return urlSerializer.parse('/');\n}\n\nexport type RestoredState = {\n  [k: string]: any; navigationId: number;\n};\n\n/**\n * Information about a navigation operation.\n * Retrieve the most recent navigation object with the\n * [Router.getCurrentNavigation() method](api/router/Router#getcurrentnavigation) .\n *\n * * *id* : The unique identifier of the current navigation.\n * * *initialUrl* : The target URL passed into the `Router#navigateByUrl()` call before navigation.\n * This is the value before the router has parsed or applied redirects to it.\n * * *extractedUrl* : The initial target URL after being parsed with `UrlSerializer.extract()`.\n * * *finalUrl* : The extracted URL after redirects have been applied.\n * This URL may not be available immediately, therefore this property can be `undefined`.\n * It is guaranteed to be set after the `RoutesRecognized` event fires.\n * * *trigger* : Identifies how this navigation was triggered.\n * -- 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n * -- 'popstate'--Triggered by a popstate event.\n * -- 'hashchange'--Triggered by a hashchange event.\n * * *extras* : A `NavigationExtras` options object that controlled the strategy used for this\n * navigation.\n * * *previousNavigation* : The previously successful `Navigation` object. Only one previous\n * navigation is available, therefore this previous `Navigation` object has a `null` value for its\n * own `previousNavigation`.\n *\n * @publicApi\n */\nexport type Navigation = {\n  /**\n   * The unique identifier of the current navigation.\n   */\n  id: number;\n  /**\n   * The target URL passed into the `Router#navigateByUrl()` call before navigation. This is\n   * the value before the router has parsed or applied redirects to it.\n   */\n  initialUrl: string | UrlTree;\n  /**\n   * The initial target URL after being parsed with `UrlSerializer.extract()`.\n   */\n  extractedUrl: UrlTree;\n  /**\n   * The extracted URL after redirects have been applied.\n   * This URL may not be available immediately, therefore this property can be `undefined`.\n   * It is guaranteed to be set after the `RoutesRecognized` event fires.\n   */\n  finalUrl?: UrlTree;\n  /**\n   * Identifies how this navigation was triggered.\n   *\n   * * 'imperative'--Triggered by `router.navigateByUrl` or `router.navigate`.\n   * * 'popstate'--Triggered by a popstate event.\n   * * 'hashchange'--Triggered by a hashchange event.\n   */\n  trigger: 'imperative' | 'popstate' | 'hashchange';\n  /**\n   * Options that controlled the strategy used for this navigation.\n   * See `NavigationExtras`.\n   */\n  extras: NavigationExtras;\n  /**\n   * The previously successful `Navigation` object. Only one previous navigation\n   * is available, therefore this previous `Navigation` object has a `null` value\n   * for its own `previousNavigation`.\n   */\n  previousNavigation: Navigation | null;\n};\n\nexport type NavigationTransition = {\n  id: number,\n  currentUrlTree: UrlTree,\n  currentRawUrl: UrlTree,\n  extractedUrl: UrlTree,\n  urlAfterRedirects: UrlTree,\n  rawUrl: UrlTree,\n  extras: NavigationExtras,\n  resolve: any,\n  reject: any,\n  promise: Promise<boolean>,\n  source: NavigationTrigger,\n  restoredState: RestoredState|null,\n  currentSnapshot: RouterStateSnapshot,\n  targetSnapshot: RouterStateSnapshot|null,\n  currentRouterState: RouterState,\n  targetRouterState: RouterState|null,\n  guards: Checks,\n  guardsResult: boolean|UrlTree|null,\n};\n\n/**\n * @internal\n */\nexport type RouterHook = (snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}) => Observable<void>;\n\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot: RouterStateSnapshot, runExtras: {\n  appliedUrlTree: UrlTree,\n  rawUrlTree: UrlTree,\n  skipLocationChange: boolean,\n  replaceUrl: boolean,\n  navigationId: number\n}): Observable<void> {\n  return of(null) as any;\n}\n\n/**\n * Information related to a location change, necessary for scheduling follow-up Router navigations.\n */\ntype LocationChangeInfo = {\n  source: 'popstate'|'hashchange',\n  urlTree: UrlTree,\n  state: RestoredState|null,\n  transitionId: number\n};\n\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see `Route`.\n * @see [Routing and Navigation Guide](guide/router).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Injectable()\nexport class Router {\n  private currentUrlTree: UrlTree;\n  private rawUrlTree: UrlTree;\n  private browserUrlTree: UrlTree;\n  private readonly transitions: BehaviorSubject<NavigationTransition>;\n  private navigations: Observable<NavigationTransition>;\n  private lastSuccessfulNavigation: Navigation|null = null;\n  private currentNavigation: Navigation|null = null;\n\n  private locationSubscription?: SubscriptionLike;\n  /**\n   * Tracks the previously seen location change from the location subscription so we can compare\n   * the two latest to see if they are duplicates. See setUpLocationChangeListener.\n   */\n  private lastLocationChangeInfo: LocationChangeInfo|null = null;\n  private navigationId: number = 0;\n  private configLoader: RouterConfigLoader;\n  private ngModule: NgModuleRef<any>;\n  private console: Console;\n  private isNgZoneEnabled: boolean = false;\n\n  /**\n   * An event stream for routing events in this NgModule.\n   */\n  public readonly events: Observable<Event> = new Subject<Event>();\n  /**\n   * The current state of routing in this NgModule.\n   */\n  public readonly routerState: RouterState;\n\n  /**\n   * A handler for navigation errors in this NgModule.\n   */\n  errorHandler: ErrorHandler = defaultErrorHandler;\n\n  /**\n   * A handler for errors thrown by `Router.parseUrl(url)`\n   * when `url` contains an invalid character.\n   * The most common case is a `%` sign\n   * that's not encoded and is not part of a percent encoded sequence.\n   */\n  malformedUriErrorHandler:\n      (error: URIError, urlSerializer: UrlSerializer,\n       url: string) => UrlTree = defaultMalformedUriErrorHandler;\n\n  /**\n   * True if at least one navigation event has occurred,\n   * false otherwise.\n   */\n  navigated: boolean = false;\n  private lastSuccessfulId: number = -1;\n\n  /**\n   * Hooks that enable you to pause navigation,\n   * either before or after the preactivation phase.\n   * Used by `RouterModule`.\n   *\n   * @internal\n   */\n  hooks: {\n    beforePreactivation: RouterHook,\n    afterPreactivation: RouterHook\n  } = {beforePreactivation: defaultRouterHook, afterPreactivation: defaultRouterHook};\n\n  /**\n   * A strategy for extracting and merging URLs.\n   * Used for AngularJS to Angular migrations.\n   */\n  urlHandlingStrategy: UrlHandlingStrategy = new DefaultUrlHandlingStrategy();\n\n  /**\n   * A strategy for re-using routes.\n   */\n  routeReuseStrategy: RouteReuseStrategy = new DefaultRouteReuseStrategy();\n\n  /**\n   * How to handle a navigation request to the current URL. One of:\n   * - `'ignore'` :  The router ignores the request.\n   * - `'reload'` : The router reloads the URL. Use to implement a \"refresh\" feature.\n   */\n  onSameUrlNavigation: 'reload'|'ignore' = 'ignore';\n\n  /**\n   * How to merge parameters, data, and resolved data from parent to child\n   * routes. One of:\n   *\n   * - `'emptyOnly'` : Inherit parent parameters, data, and resolved data\n   * for path-less or component-less routes.\n   * - `'always'` : Inherit parent parameters, data, and resolved data\n   * for all child routes.\n   */\n  paramsInheritanceStrategy: 'emptyOnly'|'always' = 'emptyOnly';\n\n  /**\n   * Determines when the router updates the browser URL.\n   * By default (`\"deferred\"`), updates the browser URL after navigation has finished.\n   * Set to `'eager'` to update the browser URL at the beginning of navigation.\n   * You can choose to update early so that, if navigation fails,\n   * you can show an error message with the URL that failed.\n   */\n  urlUpdateStrategy: 'deferred'|'eager' = 'deferred';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * @see `RouterModule`\n   */\n  relativeLinkResolution: 'legacy'|'corrected' = 'legacy';\n\n  /**\n   * Creates the router service.\n   */\n  // TODO: vsavkin make internal after the final is out.\n  constructor(\n      private rootComponentType: Type<any>|null, private urlSerializer: UrlSerializer,\n      private rootContexts: ChildrenOutletContexts, private location: Location, injector: Injector,\n      loader: NgModuleFactoryLoader, compiler: Compiler, public config: Routes) {\n    const onLoadStart = (r: Route) => this.triggerEvent(new RouteConfigLoadStart(r));\n    const onLoadEnd = (r: Route) => this.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.ngModule = injector.get(NgModuleRef);\n    this.console = injector.get(Console);\n    const ngZone = injector.get(NgZone);\n    this.isNgZoneEnabled = ngZone instanceof NgZone;\n\n    this.resetConfig(config);\n    this.currentUrlTree = createEmptyUrlTree();\n    this.rawUrlTree = this.currentUrlTree;\n    this.browserUrlTree = this.currentUrlTree;\n\n    this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n    this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n\n    this.transitions = new BehaviorSubject<NavigationTransition>({\n      id: 0,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.currentUrlTree,\n      extractedUrl: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      urlAfterRedirects: this.urlHandlingStrategy.extract(this.currentUrlTree),\n      rawUrl: this.currentUrlTree,\n      extras: {},\n      resolve: null,\n      reject: null,\n      promise: Promise.resolve(true),\n      source: 'imperative',\n      restoredState: null,\n      currentSnapshot: this.routerState.snapshot,\n      targetSnapshot: null,\n      currentRouterState: this.routerState,\n      targetRouterState: null,\n      guards: {canActivateChecks: [], canDeactivateChecks: []},\n      guardsResult: null,\n    });\n    this.navigations = this.setupNavigations(this.transitions);\n\n    this.processNavigations();\n  }\n\n  private setupNavigations(transitions: Observable<NavigationTransition>):\n      Observable<NavigationTransition> {\n    const eventsSubject = (this.events as Subject<Event>);\n    return transitions.pipe(\n               filter(t => t.id !== 0),\n\n               // Extract URL\n               map(t =>\n                       ({...t, extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)} as\n                        NavigationTransition)),\n\n               // Using switchMap so we cancel executing navigations when a new one comes in\n               switchMap(t => {\n                 let completed = false;\n                 let errored = false;\n                 return of(t).pipe(\n                     // Store the Navigation object\n                     tap(t => {\n                       this.currentNavigation = {\n                         id: t.id,\n                         initialUrl: t.currentRawUrl,\n                         extractedUrl: t.extractedUrl,\n                         trigger: t.source,\n                         extras: t.extras,\n                         previousNavigation: this.lastSuccessfulNavigation ?\n                             {...this.lastSuccessfulNavigation, previousNavigation: null} :\n                             null\n                       };\n                     }),\n                     switchMap(t => {\n                       const urlTransition = !this.navigated ||\n                           t.extractedUrl.toString() !== this.browserUrlTree.toString();\n                       const processCurrentUrl =\n                           (this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n                           this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl);\n\n                       if (processCurrentUrl) {\n                         return of(t).pipe(\n                             // Fire NavigationStart event\n                             switchMap(t => {\n                               const transition = this.transitions.getValue();\n                               eventsSubject.next(new NavigationStart(\n                                   t.id, this.serializeUrl(t.extractedUrl), t.source,\n                                   t.restoredState));\n                               if (transition !== this.transitions.getValue()) {\n                                 return EMPTY;\n                               }\n                               return [t];\n                             }),\n\n                             // This delay is required to match old behavior that forced navigation\n                             // to always be async\n                             switchMap(t => Promise.resolve(t)),\n\n                             // ApplyRedirects\n                             applyRedirects(\n                                 this.ngModule.injector, this.configLoader, this.urlSerializer,\n                                 this.config),\n\n                             // Update the currentNavigation\n                             tap(t => {\n                               this.currentNavigation = {\n                                 ...this.currentNavigation!,\n                                 finalUrl: t.urlAfterRedirects\n                               };\n                             }),\n\n                             // Recognize\n                             recognize(\n                                 this.rootComponentType, this.config,\n                                 (url) => this.serializeUrl(url), this.paramsInheritanceStrategy,\n                                 this.relativeLinkResolution),\n\n                             // Update URL if in `eager` update mode\n                             tap(t => {\n                               if (this.urlUpdateStrategy === 'eager') {\n                                 if (!t.extras.skipLocationChange) {\n                                   this.setBrowserUrl(\n                                       t.urlAfterRedirects, !!t.extras.replaceUrl, t.id,\n                                       t.extras.state);\n                                 }\n                                 this.browserUrlTree = t.urlAfterRedirects;\n                               }\n                             }),\n\n                             // Fire RoutesRecognized\n                             tap(t => {\n                               const routesRecognized = new RoutesRecognized(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               eventsSubject.next(routesRecognized);\n                             }));\n                       } else {\n                         const processPreviousUrl = urlTransition && this.rawUrlTree &&\n                             this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree);\n                         /* When the current URL shouldn't be processed, but the previous one was,\n                          * we handle this \"error condition\" by navigating to the previously\n                          * successful URL, but leaving the URL intact.*/\n                         if (processPreviousUrl) {\n                           const {id, extractedUrl, source, restoredState, extras} = t;\n                           const navStart = new NavigationStart(\n                               id, this.serializeUrl(extractedUrl), source, restoredState);\n                           eventsSubject.next(navStart);\n                           const targetSnapshot =\n                               createEmptyState(extractedUrl, this.rootComponentType).snapshot;\n\n                           return of({\n                             ...t,\n                             targetSnapshot,\n                             urlAfterRedirects: extractedUrl,\n                             extras: {...extras, skipLocationChange: false, replaceUrl: false},\n                           });\n                         } else {\n                           /* When neither the current or previous URL can be processed, do nothing\n                            * other than update router's internal reference to the current \"settled\"\n                            * URL. This way the next navigation will be coming from the current URL\n                            * in the browser.\n                            */\n                           this.rawUrlTree = t.rawUrl;\n                           this.browserUrlTree = t.urlAfterRedirects;\n                           t.resolve(null);\n                           return EMPTY;\n                         }\n                       }\n                     }),\n\n                     // Before Preactivation\n                     switchTap(t => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.beforePreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     // --- GUARDS ---\n                     tap(t => {\n                       const guardsStart = new GuardsCheckStart(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                       this.triggerEvent(guardsStart);\n                     }),\n\n                     map(t => ({\n                           ...t,\n                           guards: getAllRouteGuards(\n                               t.targetSnapshot!, t.currentSnapshot, this.rootContexts)\n                         })),\n\n                     checkGuards(this.ngModule.injector, (evt: Event) => this.triggerEvent(evt)),\n                     tap(t => {\n                       if (isUrlTree(t.guardsResult)) {\n                         const error: Error&{url?: UrlTree} = navigationCancelingError(\n                             `Redirecting to \"${this.serializeUrl(t.guardsResult)}\"`);\n                         error.url = t.guardsResult;\n                         throw error;\n                       }\n                     }),\n\n                     tap(t => {\n                       const guardsEnd = new GuardsCheckEnd(\n                           t.id, this.serializeUrl(t.extractedUrl),\n                           this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!,\n                           !!t.guardsResult);\n                       this.triggerEvent(guardsEnd);\n                     }),\n\n                     filter(t => {\n                       if (!t.guardsResult) {\n                         this.resetUrlToCurrentUrlTree();\n                         const navCancel =\n                             new NavigationCancel(t.id, this.serializeUrl(t.extractedUrl), '');\n                         eventsSubject.next(navCancel);\n                         t.resolve(false);\n                         return false;\n                       }\n                       return true;\n                     }),\n\n                     // --- RESOLVE ---\n                     switchTap(t => {\n                       if (t.guards.canActivateChecks.length) {\n                         return of(t).pipe(\n                             tap(t => {\n                               const resolveStart = new ResolveStart(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveStart);\n                             }),\n                             switchMap(t => {\n                               let dataResolved = false;\n                               return of(t).pipe(\n                                   resolveData(\n                                       this.paramsInheritanceStrategy, this.ngModule.injector),\n                                   tap({\n                                     next: () => dataResolved = true,\n                                     complete: () => {\n                                       if (!dataResolved) {\n                                         const navCancel = new NavigationCancel(\n                                             t.id, this.serializeUrl(t.extractedUrl),\n                                             `At least one route resolver didn't emit any value.`);\n                                         eventsSubject.next(navCancel);\n                                         t.resolve(false);\n                                       }\n                                     }\n                                   }),\n                               );\n                             }),\n                             tap(t => {\n                               const resolveEnd = new ResolveEnd(\n                                   t.id, this.serializeUrl(t.extractedUrl),\n                                   this.serializeUrl(t.urlAfterRedirects), t.targetSnapshot!);\n                               this.triggerEvent(resolveEnd);\n                             }));\n                       }\n                       return undefined;\n                     }),\n\n                     // --- AFTER PREACTIVATION ---\n                     switchTap((t: NavigationTransition) => {\n                       const {\n                         targetSnapshot,\n                         id: navigationId,\n                         extractedUrl: appliedUrlTree,\n                         rawUrl: rawUrlTree,\n                         extras: {skipLocationChange, replaceUrl}\n                       } = t;\n                       return this.hooks.afterPreactivation(targetSnapshot!, {\n                         navigationId,\n                         appliedUrlTree,\n                         rawUrlTree,\n                         skipLocationChange: !!skipLocationChange,\n                         replaceUrl: !!replaceUrl,\n                       });\n                     }),\n\n                     map((t: NavigationTransition) => {\n                       const targetRouterState = createRouterState(\n                           this.routeReuseStrategy, t.targetSnapshot!, t.currentRouterState);\n                       return ({...t, targetRouterState});\n                     }),\n\n                     /* Once here, we are about to activate syncronously. The assumption is this\n                        will succeed, and user code may read from the Router service. Therefore\n                        before activation, we need to update router properties storing the current\n                        URL and the RouterState, as well as updated the browser URL. All this should\n                        happen *before* activating. */\n                     tap((t: NavigationTransition) => {\n                       this.currentUrlTree = t.urlAfterRedirects;\n                       this.rawUrlTree =\n                           this.urlHandlingStrategy.merge(this.currentUrlTree, t.rawUrl);\n\n                       (this as {routerState: RouterState}).routerState = t.targetRouterState!;\n\n                       if (this.urlUpdateStrategy === 'deferred') {\n                         if (!t.extras.skipLocationChange) {\n                           this.setBrowserUrl(\n                               this.rawUrlTree, !!t.extras.replaceUrl, t.id, t.extras.state);\n                         }\n                         this.browserUrlTree = t.urlAfterRedirects;\n                       }\n                     }),\n\n                     activateRoutes(\n                         this.rootContexts, this.routeReuseStrategy,\n                         (evt: Event) => this.triggerEvent(evt)),\n\n                     tap({\n                       next() {\n                         completed = true;\n                       },\n                       complete() {\n                         completed = true;\n                       }\n                     }),\n                     finalize(() => {\n                       /* When the navigation stream finishes either through error or success, we\n                        * set the `completed` or `errored` flag. However, there are some situations\n                        * where we could get here without either of those being set. For instance, a\n                        * redirect during NavigationStart. Therefore, this is a catch-all to make\n                        * sure the NavigationCancel\n                        * event is fired when a navigation gets cancelled but not caught by other\n                        * means. */\n                       if (!completed && !errored) {\n                         // Must reset to current URL tree here to ensure history.state is set. On a\n                         // fresh page load, if a new navigation comes in before a successful\n                         // navigation completes, there will be nothing in\n                         // history.state.navigationId. This can cause sync problems with AngularJS\n                         // sync code which looks for a value here in order to determine whether or\n                         // not to handle a given popstate event or to leave it to the Angualr\n                         // router.\n                         this.resetUrlToCurrentUrlTree();\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl),\n                             `Navigation ID ${t.id} is not equal to the current navigation id ${\n                                 this.navigationId}`);\n                         eventsSubject.next(navCancel);\n                         t.resolve(false);\n                       }\n                       // currentNavigation should always be reset to null here. If navigation was\n                       // successful, lastSuccessfulTransition will have already been set. Therefore\n                       // we can safely set currentNavigation to null here.\n                       this.currentNavigation = null;\n                     }),\n                     catchError((e) => {\n                       errored = true;\n                       /* This error type is issued during Redirect, and is handled as a\n                        * cancellation rather than an error. */\n                       if (isNavigationCancelingError(e)) {\n                         const redirecting = isUrlTree(e.url);\n                         if (!redirecting) {\n                           // Set property only if we're not redirecting. If we landed on a page and\n                           // redirect to `/` route, the new navigation is going to see the `/`\n                           // isn't a change from the default currentUrlTree and won't navigate.\n                           // This is only applicable with initial navigation, so setting\n                           // `navigated` only when not redirecting resolves this scenario.\n                           this.navigated = true;\n                           this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n                         }\n                         const navCancel = new NavigationCancel(\n                             t.id, this.serializeUrl(t.extractedUrl), e.message);\n                         eventsSubject.next(navCancel);\n\n                         // When redirecting, we need to delay resolving the navigation\n                         // promise and push it to the redirect navigation\n                         if (!redirecting) {\n                           t.resolve(false);\n                         } else {\n                           // setTimeout is required so this navigation finishes with\n                           // the return EMPTY below. If it isn't allowed to finish\n                           // processing, there can be multiple navigations to the same\n                           // URL.\n                           setTimeout(() => {\n                             const mergedTree =\n                                 this.urlHandlingStrategy.merge(e.url, this.rawUrlTree);\n                             const extras = {\n                               skipLocationChange: t.extras.skipLocationChange,\n                               replaceUrl: this.urlUpdateStrategy === 'eager'\n                             };\n\n                             return this.scheduleNavigation(\n                                 mergedTree, 'imperative', null, extras,\n                                 {resolve: t.resolve, reject: t.reject, promise: t.promise});\n                           }, 0);\n                         }\n\n                         /* All other errors should reset to the router's internal URL reference to\n                          * the pre-error state. */\n                       } else {\n                         this.resetStateAndUrl(t.currentRouterState, t.currentUrlTree, t.rawUrl);\n                         const navError =\n                             new NavigationError(t.id, this.serializeUrl(t.extractedUrl), e);\n                         eventsSubject.next(navError);\n                         try {\n                           t.resolve(this.errorHandler(e));\n                         } catch (ee) {\n                           t.reject(ee);\n                         }\n                       }\n                       return EMPTY;\n                     }));\n                 // TODO(jasonaden): remove cast once g3 is on updated TypeScript\n               })) as any as Observable<NavigationTransition>;\n  }\n\n  /**\n   * @internal\n   * TODO: this should be removed once the constructor of the router made internal\n   */\n  resetRootComponentType(rootComponentType: Type<any>): void {\n    this.rootComponentType = rootComponentType;\n    // TODO: vsavkin router 4.0 should make the root component set to null\n    // this will simplify the lifecycle of the router.\n    this.routerState.root.component = this.rootComponentType;\n  }\n\n  private getTransition(): NavigationTransition {\n    const transition = this.transitions.value;\n    // This value needs to be set. Other values such as extractedUrl are set on initial navigation\n    // but the urlAfterRedirects may not get set if we aren't processing the new URL *and* not\n    // processing the previous URL.\n    transition.urlAfterRedirects = this.browserUrlTree;\n    return transition;\n  }\n\n  private setTransition(t: Partial<NavigationTransition>): void {\n    this.transitions.next({...this.getTransition(), ...t});\n  }\n\n  /**\n   * Sets up the location change listener and performs the initial navigation.\n   */\n  initialNavigation(): void {\n    this.setUpLocationChangeListener();\n    if (this.navigationId === 0) {\n      this.navigateByUrl(this.location.path(true), {replaceUrl: true});\n    }\n  }\n\n  /**\n   * Sets up the location change listener. This listener detects navigations triggered from outside\n   * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n   * navigation so that the correct events, guards, etc. are triggered.\n   */\n  setUpLocationChangeListener(): void {\n    // Don't need to use Zone.wrap any more, because zone.js\n    // already patch onPopState, so location change callback will\n    // run into ngZone\n    if (!this.locationSubscription) {\n      this.locationSubscription = this.location.subscribe(event => {\n        const currentChange = this.extractLocationChangeInfoFromEvent(event);\n        if (this.shouldScheduleNavigation(this.lastLocationChangeInfo, currentChange)) {\n          // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n          // hybrid apps.\n          setTimeout(() => {\n            const {source, state, urlTree} = currentChange;\n            const extras: NavigationExtras = {replaceUrl: true};\n            if (state) {\n              const stateCopy = {...state} as Partial<RestoredState>;\n              delete stateCopy.navigationId;\n              if (Object.keys(stateCopy).length !== 0) {\n                extras.state = stateCopy;\n              }\n            }\n            this.scheduleNavigation(urlTree, source, state, extras);\n          }, 0);\n        }\n        this.lastLocationChangeInfo = currentChange;\n      });\n    }\n  }\n\n  /** Extracts router-related information from a `PopStateEvent`. */\n  private extractLocationChangeInfoFromEvent(change: PopStateEvent): LocationChangeInfo {\n    return {\n      source: change['type'] === 'popstate' ? 'popstate' : 'hashchange',\n      urlTree: this.parseUrl(change['url']!),\n      // Navigations coming from Angular router have a navigationId state\n      // property. When this exists, restore the state.\n      state: change.state?.navigationId ? change.state : null,\n      transitionId: this.getTransition().id\n    } as const;\n  }\n\n  /**\n   * Determines whether two events triggered by the Location subscription are due to the same\n   * navigation. The location subscription can fire two events (popstate and hashchange) for a\n   * single navigation. The second one should be ignored, that is, we should not schedule another\n   * navigation in the Router.\n   */\n  private shouldScheduleNavigation(previous: LocationChangeInfo|null, current: LocationChangeInfo):\n      boolean {\n    if (!previous) return true;\n\n    const sameDestination = current.urlTree.toString() === previous.urlTree.toString();\n    const eventsOccurredAtSameTime = current.transitionId === previous.transitionId;\n    if (!eventsOccurredAtSameTime || !sameDestination) {\n      return true;\n    }\n\n    if ((current.source === 'hashchange' && previous.source === 'popstate') ||\n        (current.source === 'popstate' && previous.source === 'hashchange')) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /** The current URL. */\n  get url(): string {\n    return this.serializeUrl(this.currentUrlTree);\n  }\n\n  /** The current Navigation object if one exists */\n  getCurrentNavigation(): Navigation|null {\n    return this.currentNavigation;\n  }\n\n  /** @internal */\n  triggerEvent(event: Event): void {\n    (this.events as Subject<Event>).next(event);\n  }\n\n  /**\n   * Resets the route configuration used for navigation and generating links.\n   *\n   * @param config The route array for the new configuration.\n   *\n   * @usageNotes\n   *\n   * ```\n   * router.resetConfig([\n   *  { path: 'team/:id', component: TeamCmp, children: [\n   *    { path: 'simple', component: SimpleCmp },\n   *    { path: 'user/:name', component: UserCmp }\n   *  ]}\n   * ]);\n   * ```\n   */\n  resetConfig(config: Routes): void {\n    validateConfig(config);\n    this.config = config.map(standardizeConfig);\n    this.navigated = false;\n    this.lastSuccessfulId = -1;\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.dispose();\n  }\n\n  /** Disposes of the router. */\n  dispose(): void {\n    if (this.locationSubscription) {\n      this.locationSubscription.unsubscribe();\n      this.locationSubscription = undefined;\n    }\n  }\n\n  /**\n   * Appends URL segments to the current URL tree to create a new URL tree.\n   *\n   * @param commands An array of URL fragments with which to construct the new URL tree.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL tree or the one provided  in the `relativeTo`\n   * property of the options object, if supplied.\n   * @param navigationExtras Options that control the navigation strategy. This function\n   * only uses properties in `NavigationExtras` that would change the provided URL.\n   * @returns The new URL tree.\n   *\n   * @usageNotes\n   *\n   * ```\n   * // create /team/33/user/11\n   * router.createUrlTree(['/team', 33, 'user', 11]);\n   *\n   * // create /team/33;expand=true/user/11\n   * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n   *\n   * // you can collapse static segments like this (this works only with the first passed-in value):\n   * router.createUrlTree(['/team/33/user', userId]);\n   *\n   * // If the first segment can contain slashes, and you do not want the router to split it,\n   * // you can do the following:\n   * router.createUrlTree([{segmentPath: '/one/two'}]);\n   *\n   * // create /team/33/(user/11//right:chat)\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n   *\n   * // remove the right secondary node\n   * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n   *\n   * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n   *\n   * // navigate to /team/33/user/11/details\n   * router.createUrlTree(['details'], {relativeTo: route});\n   *\n   * // navigate to /team/33/user/22\n   * router.createUrlTree(['../22'], {relativeTo: route});\n   *\n   * // navigate to /team/44/user/22\n   * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n   * ```\n   */\n  createUrlTree(commands: any[], navigationExtras: NavigationExtras = {}): UrlTree {\n    const {\n      relativeTo,\n      queryParams,\n      fragment,\n      preserveQueryParams,\n      queryParamsHandling,\n      preserveFragment\n    } = navigationExtras;\n    if (isDevMode() && preserveQueryParams && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n    }\n    const a = relativeTo || this.routerState.root;\n    const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n    let q: Params|null = null;\n    if (queryParamsHandling) {\n      switch (queryParamsHandling) {\n        case 'merge':\n          q = {...this.currentUrlTree.queryParams, ...queryParams};\n          break;\n        case 'preserve':\n          q = this.currentUrlTree.queryParams;\n          break;\n        default:\n          q = queryParams || null;\n      }\n    } else {\n      q = preserveQueryParams ? this.currentUrlTree.queryParams : queryParams || null;\n    }\n    if (q !== null) {\n      q = this.removeEmptyProps(q);\n    }\n    return createUrlTree(a, this.currentUrlTree, commands, q!, f!);\n  }\n\n  /**\n   * Navigates to a view using an absolute route path.\n   *\n   * @param url An absolute path for a defined route. The function does not apply any delta to the\n   *     current URL.\n   * @param extras An object containing properties that modify the navigation strategy.\n   * The function ignores any properties in the `NavigationExtras` that would change the\n   * provided URL.\n   *\n   * @returns A Promise that resolves to 'true' when navigation succeeds,\n   * to 'false' when navigation fails, or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to an absolute path.\n   *\n   * ```\n   * router.navigateByUrl(\"/team/33/user/11\");\n   *\n   * // Navigate without updating the URL\n   * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigateByUrl(url: string|UrlTree, extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    if (isDevMode() && this.isNgZoneEnabled && !NgZone.isInAngularZone()) {\n      this.console.warn(\n          `Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?`);\n    }\n\n    const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n    const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n\n    return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\n  }\n\n  /**\n   * Navigate based on the provided array of commands and a starting point.\n   * If no starting route is provided, the navigation is absolute.\n   *\n   * @param commands An array of URL fragments with which to construct the target URL.\n   * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n   * segments, followed by the parameters for each segment.\n   * The fragments are applied to the current URL or the one provided  in the `relativeTo` property\n   * of the options object, if supplied.\n   * @param extras An options object that determines how the URL should be constructed or\n   *     interpreted.\n   *\n   * @returns A Promise that resolves to `true` when navigation succeeds, to `false` when navigation\n   *     fails,\n   * or is rejected on error.\n   *\n   * @usageNotes\n   *\n   * The following calls request navigation to a dynamic route path relative to the current URL.\n   *\n   * ```\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n   *\n   * // Navigate without updating the URL, overriding the default behavior\n   * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n   * ```\n   *\n   * @see [Routing and Navigation guide](guide/router)\n   *\n   */\n  navigate(commands: any[], extras: NavigationExtras = {skipLocationChange: false}):\n      Promise<boolean> {\n    validateCommands(commands);\n    return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n  }\n\n  /** Serializes a `UrlTree` into a string */\n  serializeUrl(url: UrlTree): string {\n    return this.urlSerializer.serialize(url);\n  }\n\n  /** Parses a string into a `UrlTree` */\n  parseUrl(url: string): UrlTree {\n    let urlTree: UrlTree;\n    try {\n      urlTree = this.urlSerializer.parse(url);\n    } catch (e) {\n      urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n    }\n    return urlTree;\n  }\n\n  /** Returns whether the url is activated */\n  isActive(url: string|UrlTree, exact: boolean): boolean {\n    if (isUrlTree(url)) {\n      return containsTree(this.currentUrlTree, url, exact);\n    }\n\n    const urlTree = this.parseUrl(url);\n    return containsTree(this.currentUrlTree, urlTree, exact);\n  }\n\n  private removeEmptyProps(params: Params): Params {\n    return Object.keys(params).reduce((result: Params, key: string) => {\n      const value: any = params[key];\n      if (value !== null && value !== undefined) {\n        result[key] = value;\n      }\n      return result;\n    }, {});\n  }\n\n  private processNavigations(): void {\n    this.navigations.subscribe(\n        t => {\n          this.navigated = true;\n          this.lastSuccessfulId = t.id;\n          (this.events as Subject<Event>)\n              .next(new NavigationEnd(\n                  t.id, this.serializeUrl(t.extractedUrl), this.serializeUrl(this.currentUrlTree)));\n          this.lastSuccessfulNavigation = this.currentNavigation;\n          this.currentNavigation = null;\n          t.resolve(true);\n        },\n        e => {\n          this.console.warn(`Unhandled Navigation Error: `);\n        });\n  }\n\n  private scheduleNavigation(\n      rawUrl: UrlTree, source: NavigationTrigger, restoredState: RestoredState|null,\n      extras: NavigationExtras,\n      priorPromise?: {resolve: any, reject: any, promise: Promise<boolean>}): Promise<boolean> {\n    // * Imperative navigations (router.navigate) might trigger additional navigations to the same\n    //   URL via a popstate event and the locationChangeListener. We should skip these duplicate\n    //   navs. Duplicates may also be triggered by attempts to sync AngularJS and Angular router\n    //   states.\n    // * Imperative navigations can be cancelled by router guards, meaning the URL won't change. If\n    //   the user follows that with a navigation using the back/forward button or manual URL change,\n    //   the destination may be the same as the previous imperative attempt. We should not skip\n    //   these navigations because it's a separate case from the one above -- it's not a duplicate\n    //   navigation.\n    const lastNavigation = this.getTransition();\n    // We don't want to skip duplicate successful navs if they're imperative because\n    // onSameUrlNavigation could be 'reload' (so the duplicate is intended).\n    const browserNavPrecededByRouterNav =\n        source !== 'imperative' && lastNavigation?.source === 'imperative';\n    const lastNavigationSucceeded = this.lastSuccessfulId === lastNavigation.id;\n    // If the last navigation succeeded or is in flight, we can use the rawUrl as the comparison.\n    // However, if it failed, we should compare to the final result (urlAfterRedirects).\n    const lastNavigationUrl = (lastNavigationSucceeded || this.currentNavigation) ?\n        lastNavigation.rawUrl :\n        lastNavigation.urlAfterRedirects;\n    const duplicateNav = lastNavigationUrl.toString() === rawUrl.toString();\n    if (browserNavPrecededByRouterNav && duplicateNav) {\n      return Promise.resolve(true);  // return value is not used\n    }\n\n    let resolve: any;\n    let reject: any;\n    let promise: Promise<boolean>;\n    if (priorPromise) {\n      resolve = priorPromise.resolve;\n      reject = priorPromise.reject;\n      promise = priorPromise.promise;\n\n    } else {\n      promise = new Promise<boolean>((res, rej) => {\n        resolve = res;\n        reject = rej;\n      });\n    }\n\n    const id = ++this.navigationId;\n    this.setTransition({\n      id,\n      source,\n      restoredState,\n      currentUrlTree: this.currentUrlTree,\n      currentRawUrl: this.rawUrlTree,\n      rawUrl,\n      extras,\n      resolve,\n      reject,\n      promise,\n      currentSnapshot: this.routerState.snapshot,\n      currentRouterState: this.routerState\n    });\n\n    // Make sure that the error is propagated even though `processNavigations` catch\n    // handler does not rethrow\n    return promise.catch((e: any) => {\n      return Promise.reject(e);\n    });\n  }\n\n  private setBrowserUrl(\n      url: UrlTree, replaceUrl: boolean, id: number, state?: {[key: string]: any}) {\n    const path = this.urlSerializer.serialize(url);\n    state = state || {};\n    if (this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n      // TODO(jasonaden): Remove first `navigationId` and rely on `ng` namespace.\n      this.location.replaceState(path, '', {...state, navigationId: id});\n    } else {\n      this.location.go(path, '', {...state, navigationId: id});\n    }\n  }\n\n  private resetStateAndUrl(storedState: RouterState, storedUrl: UrlTree, rawUrl: UrlTree): void {\n    (this as {routerState: RouterState}).routerState = storedState;\n    this.currentUrlTree = storedUrl;\n    this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n    this.resetUrlToCurrentUrlTree();\n  }\n\n  private resetUrlToCurrentUrlTree(): void {\n    this.location.replaceState(\n        this.urlSerializer.serialize(this.rawUrlTree), '', {navigationId: this.lastSuccessfulId});\n  }\n}\n\nfunction validateCommands(commands: string[]): void {\n  for (let i = 0; i < commands.length; i++) {\n    const cmd = commands[i];\n    if (cmd == null) {\n      throw new Error(`The requested path contains ${cmd} segment at index ${i}`);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {LocationStrategy} from '@angular/common';\nimport {Attribute, Directive, ElementRef, HostBinding, HostListener, Input, isDevMode, OnChanges, OnDestroy, Renderer2, SimpleChanges} from '@angular/core';\nimport {Subject, Subscription} from 'rxjs';\n\nimport {QueryParamsHandling} from '../config';\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\nimport {ActivatedRoute} from '../router_state';\nimport {UrlTree} from '../url_tree';\n\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `<router-outlet>` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segements.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `<a [routerLink]=\"['/user/jim']\">Jim</a>` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n *   app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n *   looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n *   link to user component\n * </a>\n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n *  - `'merge'`: Merge the given `queryParams` into the current query params.\n *  - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n *   link to user component\n * </a>\n * ```\n *\n * See {@link NavigationExtras.queryParamsHandling NavigationExtras#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [state]=\"{tracingId: 123}\">\n *   link to user component\n * </a>\n * ```\n *\n * Use {@link Router.getCurrentNavigation() Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n *   const navigation = router.getCurrentNavigation();\n *   tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: ':not(a):not(area)[routerLink]'})\nexport class RouterLink implements OnChanges {\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#queryParams NavigationExtras#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParams!: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#fragment NavigationExtras#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() fragment!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#queryParamsHandling NavigationExtras#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParamsHandling!: QueryParamsHandling;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#preserveFragment NavigationExtras#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#skipLocationChange NavigationExtras#skipLocationChange}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#replaceUrl NavigationExtras#replaceUrl}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#state NavigationExtras#state}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() state?: {[k: string]: any};\n  private commands: any[] = [];\n  private preserve!: boolean;\n\n  /** @internal */\n  onChanges = new Subject<RouterLink>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      @Attribute('tabindex') tabIndex: string, renderer: Renderer2, el: ElementRef) {\n    if (tabIndex == null) {\n      renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n    }\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n    // to the RouterLinks it's tracking.\n    this.onChanges.next(this);\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /**\n   * @deprecated As of Angular v4.0 use `queryParamsHandling` instead.\n   */\n  @Input()\n  set preserveQueryParams(value: boolean) {\n    if (isDevMode() && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n    }\n    this.preserve = value;\n  }\n\n  /** @nodoc */\n  @HostListener('click')\n  onClick(): boolean {\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state,\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return true;\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      relativeTo: this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      preserveQueryParams: attrBoolValue(this.preserve),\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\n/**\n * @description\n *\n * Lets you link to specific routes in your app.\n *\n * See `RouterLink` for more information.\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'a[routerLink],area[routerLink]'})\nexport class RouterLinkWithHref implements OnChanges, OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  @HostBinding('attr.target') @Input() target!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#queryParams NavigationExtras#queryParams}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParams!: {[k: string]: any};\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#fragment NavigationExtras#fragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() fragment!: string;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#queryParamsHandling NavigationExtras#queryParamsHandling}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() queryParamsHandling!: QueryParamsHandling;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#preserveFragment NavigationExtras#preserveFragment}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() preserveFragment!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#skipLocationChange NavigationExtras#skipLocationChange}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() skipLocationChange!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#replaceUrl NavigationExtras#replaceUrl}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() replaceUrl!: boolean;\n  /**\n   * Passed to {@link Router#createUrlTree Router#createUrlTree} as part of the `NavigationExtras`.\n   * @see {@link NavigationExtras#state NavigationExtras#state}\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input() state?: {[k: string]: any};\n  private commands: any[] = [];\n  private subscription: Subscription;\n  // TODO(issue/24571): remove '!'.\n  private preserve!: boolean;\n\n  // the url displayed on the anchor element.\n  // TODO(issue/24571): remove '!'.\n  @HostBinding() href!: string;\n\n  /** @internal */\n  onChanges = new Subject<RouterLinkWithHref>();\n\n  constructor(\n      private router: Router, private route: ActivatedRoute,\n      private locationStrategy: LocationStrategy) {\n    this.subscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.updateTargetUrlAndHref();\n      }\n    });\n  }\n\n  /**\n   * Commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **array**: commands to pass to {@link Router#createUrlTree Router#createUrlTree}.\n   *   - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n   *   - **null|undefined**: shorthand for an empty array of commands, i.e. `[]`\n   * @see {@link Router#createUrlTree Router#createUrlTree}\n   */\n  @Input()\n  set routerLink(commands: any[]|string|null|undefined) {\n    if (commands != null) {\n      this.commands = Array.isArray(commands) ? commands : [commands];\n    } else {\n      this.commands = [];\n    }\n  }\n\n  /**\n   * @deprecated As of Angular v4.0 use `queryParamsHandling` instead.\n   */\n  @Input()\n  set preserveQueryParams(value: boolean) {\n    if (isDevMode() && <any>console && <any>console.warn) {\n      console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n    }\n    this.preserve = value;\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): any {\n    this.updateTargetUrlAndHref();\n    this.onChanges.next(this);\n  }\n  /** @nodoc */\n  ngOnDestroy(): any {\n    this.subscription.unsubscribe();\n  }\n\n  /** @nodoc */\n  @HostListener(\n      'click',\n      ['$event.button', '$event.ctrlKey', '$event.shiftKey', '$event.altKey', '$event.metaKey'])\n  onClick(button: number, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean):\n      boolean {\n    if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n      return true;\n    }\n\n    if (typeof this.target === 'string' && this.target != '_self') {\n      return true;\n    }\n\n    const extras = {\n      skipLocationChange: attrBoolValue(this.skipLocationChange),\n      replaceUrl: attrBoolValue(this.replaceUrl),\n      state: this.state\n    };\n    this.router.navigateByUrl(this.urlTree, extras);\n    return false;\n  }\n\n  private updateTargetUrlAndHref(): void {\n    this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n  }\n\n  get urlTree(): UrlTree {\n    return this.router.createUrlTree(this.commands, {\n      relativeTo: this.route,\n      queryParams: this.queryParams,\n      fragment: this.fragment,\n      preserveQueryParams: attrBoolValue(this.preserve),\n      queryParamsHandling: this.queryParamsHandling,\n      preserveFragment: attrBoolValue(this.preserveFragment),\n    });\n  }\n}\n\nfunction attrBoolValue(s: any): boolean {\n  return s === '' || !!s;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterContentInit, ChangeDetectorRef, ContentChildren, Directive, ElementRef, Input, OnChanges, OnDestroy, Optional, QueryList, Renderer2, SimpleChanges} from '@angular/core';\nimport {from, of, Subscription} from 'rxjs';\nimport {mergeAll} from 'rxjs/operators';\n\nimport {Event, NavigationEnd} from '../events';\nimport {Router} from '../router';\n\nimport {RouterLink, RouterLinkWithHref} from './router_link';\n\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the the router\n * activates the associated route:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"class1 class2\">Bob</a>\n * <a routerLink=\"/user/bob\" [routerLinkActive]=\"['class1', 'class2']\">Bob</a>\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n *   Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `<div>`  parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n * <div routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact: true}\">\n *   <a routerLink=\"/user/jim\">Jim</a>\n *   <a routerLink=\"/user/bob\">Bob</a>\n * </div>\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({\n  selector: '[routerLinkActive]',\n  exportAs: 'routerLinkActive',\n})\nexport class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit {\n  @ContentChildren(RouterLink, {descendants: true}) links!: QueryList<RouterLink>;\n  @ContentChildren(RouterLinkWithHref, {descendants: true})\n  linksWithHrefs!: QueryList<RouterLinkWithHref>;\n\n  private classes: string[] = [];\n  private routerEventsSubscription: Subscription;\n  private linkInputChangesSubscription?: Subscription;\n  public readonly isActive: boolean = false;\n\n  @Input() routerLinkActiveOptions: {exact: boolean} = {exact: false};\n\n  constructor(\n      private router: Router, private element: ElementRef, private renderer: Renderer2,\n      private readonly cdr: ChangeDetectorRef, @Optional() private link?: RouterLink,\n      @Optional() private linkWithHref?: RouterLinkWithHref) {\n    this.routerEventsSubscription = router.events.subscribe((s: Event) => {\n      if (s instanceof NavigationEnd) {\n        this.update();\n      }\n    });\n  }\n\n  /** @nodoc */\n  ngAfterContentInit(): void {\n    // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n    from([this.links.changes, this.linksWithHrefs.changes, of(null)])\n        .pipe(mergeAll())\n        .subscribe(_ => {\n          this.update();\n          this.subscribeToEachLinkOnChanges();\n        });\n  }\n\n  private subscribeToEachLinkOnChanges() {\n    this.linkInputChangesSubscription?.unsubscribe();\n    const allLinkChanges =\n        [...this.links.toArray(), ...this.linksWithHrefs.toArray(), this.link, this.linkWithHref]\n            .filter((link): link is RouterLink|RouterLinkWithHref => !!link)\n            .map(link => link.onChanges);\n    this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n      if (this.isActive !== this.isLinkActive(this.router)(link)) {\n        this.update();\n      }\n    });\n  }\n\n  @Input()\n  set routerLinkActive(data: string[]|string) {\n    const classes = Array.isArray(data) ? data : data.split(' ');\n    this.classes = classes.filter(c => !!c);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this.update();\n  }\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.routerEventsSubscription.unsubscribe();\n    this.linkInputChangesSubscription?.unsubscribe();\n  }\n\n  private update(): void {\n    if (!this.links || !this.linksWithHrefs || !this.router.navigated) return;\n    Promise.resolve().then(() => {\n      const hasActiveLinks = this.hasActiveLinks();\n      if (this.isActive !== hasActiveLinks) {\n        (this as any).isActive = hasActiveLinks;\n        this.cdr.markForCheck();\n        this.classes.forEach((c) => {\n          if (hasActiveLinks) {\n            this.renderer.addClass(this.element.nativeElement, c);\n          } else {\n            this.renderer.removeClass(this.element.nativeElement, c);\n          }\n        });\n      }\n    });\n  }\n\n  private isLinkActive(router: Router): (link: (RouterLink|RouterLinkWithHref)) => boolean {\n    return (link: RouterLink|RouterLinkWithHref) =>\n               router.isActive(link.urlTree, this.routerLinkActiveOptions.exact);\n  }\n\n  private hasActiveLinks(): boolean {\n    const isActiveCheckFn = this.isLinkActive(this.router);\n    return this.link && isActiveCheckFn(this.link) ||\n        this.linkWithHref && isActiveCheckFn(this.linkWithHref) ||\n        this.links.some(isActiveCheckFn) || this.linksWithHrefs.some(isActiveCheckFn);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Attribute, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Injector, OnDestroy, OnInit, Output, ViewContainerRef} from '@angular/core';\n\nimport {Data} from '../config';\nimport {ChildrenOutletContexts} from '../router_outlet_context';\nimport {ActivatedRoute} from '../router_state';\nimport {PRIMARY_OUTLET} from '../shared';\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: <base-path>, component: <component>, outlet: <target_outlet_name>}`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * and a deactivate event when a component is destroyed.\n *\n * ```\n * <router-outlet\n *   (activate)='onActivate($event)'\n *   (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n *\n * @see [Routing tutorial](guide/router-tutorial-toh#named-outlets \"Example of a named\n * outlet and secondary route configuration\").\n * @see `RouterLink`\n * @see `Route`\n * @ngModule RouterModule\n *\n * @publicApi\n */\n@Directive({selector: 'router-outlet', exportAs: 'outlet'})\nexport class RouterOutlet implements OnDestroy, OnInit {\n  private activated: ComponentRef<any>|null = null;\n  private _activatedRoute: ActivatedRoute|null = null;\n  private name: string;\n\n  @Output('activate') activateEvents = new EventEmitter<any>();\n  @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n  constructor(\n      private parentContexts: ChildrenOutletContexts, private location: ViewContainerRef,\n      private resolver: ComponentFactoryResolver, @Attribute('name') name: string,\n      private changeDetector: ChangeDetectorRef) {\n    this.name = name || PRIMARY_OUTLET;\n    parentContexts.onChildOutletCreated(this.name, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.parentContexts.onChildOutletDestroyed(this.name);\n  }\n\n  /** @nodoc */\n  ngOnInit(): void {\n    if (!this.activated) {\n      // If the outlet was not instantiated at the time the route got activated we need to populate\n      // the outlet when it is initialized (ie inside a NgIf)\n      const context = this.parentContexts.getContext(this.name);\n      if (context && context.route) {\n        if (context.attachRef) {\n          // `attachRef` is populated when there is an existing component to mount\n          this.attach(context.attachRef, context.route);\n        } else {\n          // otherwise the component defined in the configuration is created\n          this.activateWith(context.route, context.resolver || null);\n        }\n      }\n    }\n  }\n\n  get isActivated(): boolean {\n    return !!this.activated;\n  }\n\n  get component(): Object {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this.activated.instance;\n  }\n\n  get activatedRoute(): ActivatedRoute {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    return this._activatedRoute as ActivatedRoute;\n  }\n\n  get activatedRouteData(): Data {\n    if (this._activatedRoute) {\n      return this._activatedRoute.snapshot.data;\n    }\n    return {};\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to detach the subtree\n   */\n  detach(): ComponentRef<any> {\n    if (!this.activated) throw new Error('Outlet is not activated');\n    this.location.detach();\n    const cmp = this.activated;\n    this.activated = null;\n    this._activatedRoute = null;\n    return cmp;\n  }\n\n  /**\n   * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n   */\n  attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute) {\n    this.activated = ref;\n    this._activatedRoute = activatedRoute;\n    this.location.insert(ref.hostView);\n  }\n\n  deactivate(): void {\n    if (this.activated) {\n      const c = this.component;\n      this.activated.destroy();\n      this.activated = null;\n      this._activatedRoute = null;\n      this.deactivateEvents.emit(c);\n    }\n  }\n\n  activateWith(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver|null) {\n    if (this.isActivated) {\n      throw new Error('Cannot activate an already activated outlet');\n    }\n    this._activatedRoute = activatedRoute;\n    const snapshot = activatedRoute._futureSnapshot;\n    const component = <any>snapshot.routeConfig!.component;\n    resolver = resolver || this.resolver;\n    const factory = resolver.resolveComponentFactory(component);\n    const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n    const injector = new OutletInjector(activatedRoute, childContexts, this.location.injector);\n    this.activated = this.location.createComponent(factory, this.location.length, injector);\n    // Calling `markForCheck` to make sure we will run the change detection when the\n    // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n    this.changeDetector.markForCheck();\n    this.activateEvents.emit(this.activated.instance);\n  }\n}\n\nclass OutletInjector implements Injector {\n  constructor(\n      private route: ActivatedRoute, private childContexts: ChildrenOutletContexts,\n      private parent: Injector) {}\n\n  get(token: any, notFoundValue?: any): any {\n    if (token === ActivatedRoute) {\n      return this.route;\n    }\n\n    if (token === ChildrenOutletContexts) {\n      return this.childContexts;\n    }\n\n    return this.parent.get(token, notFoundValue);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Compiler, Injectable, Injector, NgModuleFactoryLoader, NgModuleRef, OnDestroy} from '@angular/core';\nimport {from, Observable, of, Subscription} from 'rxjs';\nimport {catchError, concatMap, filter, map, mergeAll, mergeMap} from 'rxjs/operators';\n\nimport {LoadedRouterConfig, Route, Routes} from './config';\nimport {Event, NavigationEnd, RouteConfigLoadEnd, RouteConfigLoadStart} from './events';\nimport {Router} from './router';\nimport {RouterConfigLoader} from './router_config_loader';\n\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nexport abstract class PreloadingStrategy {\n  abstract preload(route: Route, fn: () => Observable<any>): Observable<any>;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nexport class PreloadAllModules implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return fn().pipe(catchError(() => of(null)));\n  }\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nexport class NoPreloading implements PreloadingStrategy {\n  preload(route: Route, fn: () => Observable<any>): Observable<any> {\n    return of(null);\n  }\n}\n\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\n@Injectable()\nexport class RouterPreloader implements OnDestroy {\n  private loader: RouterConfigLoader;\n  private subscription?: Subscription;\n\n  constructor(\n      private router: Router, moduleLoader: NgModuleFactoryLoader, compiler: Compiler,\n      private injector: Injector, private preloadingStrategy: PreloadingStrategy) {\n    const onStartLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadStart(r));\n    const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));\n\n    this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n  }\n\n  setUpPreloading(): void {\n    this.subscription =\n        this.router.events\n            .pipe(filter((e: Event) => e instanceof NavigationEnd), concatMap(() => this.preload()))\n            .subscribe(() => {});\n  }\n\n  preload(): Observable<any> {\n    const ngModule = this.injector.get(NgModuleRef);\n    return this.processRoutes(ngModule, this.router.config);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private processRoutes(ngModule: NgModuleRef<any>, routes: Routes): Observable<void> {\n    const res: Observable<any>[] = [];\n    for (const route of routes) {\n      // we already have the config loaded, just recurse\n      if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n        const childConfig = route._loadedConfig;\n        res.push(this.processRoutes(childConfig.module, childConfig.routes));\n\n        // no config loaded, fetch the config\n      } else if (route.loadChildren && !route.canLoad) {\n        res.push(this.preloadConfig(ngModule, route));\n\n        // recurse into children\n      } else if (route.children) {\n        res.push(this.processRoutes(ngModule, route.children));\n      }\n    }\n    return from(res).pipe(mergeAll(), map((_) => void 0));\n  }\n\n  private preloadConfig(ngModule: NgModuleRef<any>, route: Route): Observable<void> {\n    return this.preloadingStrategy.preload(route, () => {\n      const loaded$ = this.loader.load(ngModule.injector, route);\n      return loaded$.pipe(mergeMap((config: LoadedRouterConfig) => {\n        route._loadedConfig = config;\n        return this.processRoutes(config.module, config.routes);\n      }));\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ViewportScroller} from '@angular/common';\nimport {Injectable, OnDestroy} from '@angular/core';\nimport {Unsubscribable} from 'rxjs';\n\nimport {NavigationEnd, NavigationStart, Scroll} from './events';\nimport {Router} from './router';\n\n@Injectable()\nexport class RouterScroller implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  private routerEventsSubscription!: Unsubscribable;\n  // TODO(issue/24571): remove '!'.\n  private scrollEventsSubscription!: Unsubscribable;\n\n  private lastId = 0;\n  private lastSource: 'imperative'|'popstate'|'hashchange'|undefined = 'imperative';\n  private restoredId = 0;\n  private store: {[key: string]: [number, number]} = {};\n\n  constructor(\n      private router: Router,\n      /** @docsNotRequired */ public readonly viewportScroller: ViewportScroller, private options: {\n        scrollPositionRestoration?: 'disabled'|'enabled'|'top',\n        anchorScrolling?: 'disabled'|'enabled'\n      } = {}) {\n    // Default both options to 'disabled'\n    options.scrollPositionRestoration = options.scrollPositionRestoration || 'disabled';\n    options.anchorScrolling = options.anchorScrolling || 'disabled';\n  }\n\n  init(): void {\n    // we want to disable the automatic scrolling because having two places\n    // responsible for scrolling results race conditions, especially given\n    // that browser don't implement this behavior consistently\n    if (this.options.scrollPositionRestoration !== 'disabled') {\n      this.viewportScroller.setHistoryScrollRestoration('manual');\n    }\n    this.routerEventsSubscription = this.createScrollEvents();\n    this.scrollEventsSubscription = this.consumeScrollEvents();\n  }\n\n  private createScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (e instanceof NavigationStart) {\n        // store the scroll position of the current stable navigations.\n        this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n        this.lastSource = e.navigationTrigger;\n        this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n      } else if (e instanceof NavigationEnd) {\n        this.lastId = e.id;\n        this.scheduleScrollEvent(e, this.router.parseUrl(e.urlAfterRedirects).fragment);\n      }\n    });\n  }\n\n  private consumeScrollEvents() {\n    return this.router.events.subscribe(e => {\n      if (!(e instanceof Scroll)) return;\n      // a popstate event. The pop state event will always ignore anchor scrolling.\n      if (e.position) {\n        if (this.options.scrollPositionRestoration === 'top') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        } else if (this.options.scrollPositionRestoration === 'enabled') {\n          this.viewportScroller.scrollToPosition(e.position);\n        }\n        // imperative navigation \"forward\"\n      } else {\n        if (e.anchor && this.options.anchorScrolling === 'enabled') {\n          this.viewportScroller.scrollToAnchor(e.anchor);\n        } else if (this.options.scrollPositionRestoration !== 'disabled') {\n          this.viewportScroller.scrollToPosition([0, 0]);\n        }\n      }\n    });\n  }\n\n  private scheduleScrollEvent(routerEvent: NavigationEnd, anchor: string|null): void {\n    this.router.triggerEvent(new Scroll(\n        routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n  }\n\n  /** @nodoc */\n  ngOnDestroy() {\n    if (this.routerEventsSubscription) {\n      this.routerEventsSubscription.unsubscribe();\n    }\n    if (this.scrollEventsSubscription) {\n      this.scrollEventsSubscription.unsubscribe();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {APP_BASE_HREF, HashLocationStrategy, Location, LOCATION_INITIALIZED, LocationStrategy, PathLocationStrategy, PlatformLocation, ViewportScroller, ɵgetDOM as getDOM} from '@angular/common';\nimport {ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Compiler, ComponentRef, Inject, Injectable, InjectionToken, Injector, ModuleWithProviders, NgModule, NgModuleFactoryLoader, NgProbeToken, Optional, Provider, SkipSelf, SystemJsNgModuleLoader} from '@angular/core';\nimport {of, Subject} from 'rxjs';\n\nimport {EmptyOutletComponent} from './components/empty_outlet';\nimport {Route, Routes} from './config';\nimport {RouterLink, RouterLinkWithHref} from './directives/router_link';\nimport {RouterLinkActive} from './directives/router_link_active';\nimport {RouterOutlet} from './directives/router_outlet';\nimport {Event} from './events';\nimport {RouteReuseStrategy} from './route_reuse_strategy';\nimport {ErrorHandler, Router} from './router';\nimport {ROUTES} from './router_config_loader';\nimport {ChildrenOutletContexts} from './router_outlet_context';\nimport {NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader} from './router_preloader';\nimport {RouterScroller} from './router_scroller';\nimport {ActivatedRoute} from './router_state';\nimport {UrlHandlingStrategy} from './url_handling_strategy';\nimport {DefaultUrlSerializer, UrlSerializer, UrlTree} from './url_tree';\nimport {flatten} from './utils/collection';\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES =\n    [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive, EmptyOutletComponent];\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router service.\n *\n * @publicApi\n */\nexport const ROUTER_CONFIGURATION = new InjectionToken<ExtraOptions>('ROUTER_CONFIGURATION');\n\n/**\n * @docsNotRequired\n */\nexport const ROUTER_FORROOT_GUARD = new InjectionToken<void>('ROUTER_FORROOT_GUARD');\n\nexport const ROUTER_PROVIDERS: Provider[] = [\n  Location,\n  {provide: UrlSerializer, useClass: DefaultUrlSerializer},\n  {\n    provide: Router,\n    useFactory: setupRouter,\n    deps: [\n      UrlSerializer, ChildrenOutletContexts, Location, Injector, NgModuleFactoryLoader, Compiler,\n      ROUTES, ROUTER_CONFIGURATION, [UrlHandlingStrategy, new Optional()],\n      [RouteReuseStrategy, new Optional()]\n    ]\n  },\n  ChildrenOutletContexts,\n  {provide: ActivatedRoute, useFactory: rootRoute, deps: [Router]},\n  {provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader},\n  RouterPreloader,\n  NoPreloading,\n  PreloadAllModules,\n  {provide: ROUTER_CONFIGURATION, useValue: {enableTracing: false}},\n];\n\nexport function routerNgProbeToken() {\n  return new NgProbeToken('Router', Router);\n}\n\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/router) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\n@NgModule({\n  declarations: ROUTER_DIRECTIVES,\n  exports: ROUTER_DIRECTIVES,\n  entryComponents: [EmptyOutletComponent]\n})\nexport class RouterModule {\n  // Note: We are injecting the Router so it gets created eagerly...\n  constructor(@Optional() @Inject(ROUTER_FORROOT_GUARD) guard: any, @Optional() router: Router) {}\n\n  /**\n   * Creates and configures a module with all the router providers and directives.\n   * Optionally sets up an application listener to perform an initial navigation.\n   *\n   * When registering the NgModule at the root, import as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forRoot(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the application.\n   * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n   * @return The new `NgModule`.\n   *\n   */\n  static forRoot(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterModule> {\n    return {\n      ngModule: RouterModule,\n      providers: [\n        ROUTER_PROVIDERS,\n        provideRoutes(routes),\n        {\n          provide: ROUTER_FORROOT_GUARD,\n          useFactory: provideForRootGuard,\n          deps: [[Router, new Optional(), new SkipSelf()]]\n        },\n        {provide: ROUTER_CONFIGURATION, useValue: config ? config : {}},\n        {\n          provide: LocationStrategy,\n          useFactory: provideLocationStrategy,\n          deps:\n              [PlatformLocation, [new Inject(APP_BASE_HREF), new Optional()], ROUTER_CONFIGURATION]\n        },\n        {\n          provide: RouterScroller,\n          useFactory: createRouterScroller,\n          deps: [Router, ViewportScroller, ROUTER_CONFIGURATION]\n        },\n        {\n          provide: PreloadingStrategy,\n          useExisting: config && config.preloadingStrategy ? config.preloadingStrategy :\n                                                             NoPreloading\n        },\n        {provide: NgProbeToken, multi: true, useFactory: routerNgProbeToken},\n        provideRouterInitializer(),\n      ],\n    };\n  }\n\n  /**\n   * Creates a module with all the router directives and a provider registering routes,\n   * without creating a new Router service.\n   * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n   *\n   * ```\n   * @NgModule({\n   *   imports: [RouterModule.forChild(ROUTES)]\n   * })\n   * class MyNgModule {}\n   * ```\n   *\n   * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n   * @return The new NgModule.\n   *\n   */\n  static forChild(routes: Routes): ModuleWithProviders<RouterModule> {\n    return {ngModule: RouterModule, providers: [provideRoutes(routes)]};\n  }\n}\n\nexport function createRouterScroller(\n    router: Router, viewportScroller: ViewportScroller, config: ExtraOptions): RouterScroller {\n  if (config.scrollOffset) {\n    viewportScroller.setOffset(config.scrollOffset);\n  }\n  return new RouterScroller(router, viewportScroller, config);\n}\n\nexport function provideLocationStrategy(\n    platformLocationStrategy: PlatformLocation, baseHref: string, options: ExtraOptions = {}) {\n  return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n                           new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\n\nexport function provideForRootGuard(router: Router): any {\n  if (router) {\n    throw new Error(\n        `RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.`);\n  }\n  return 'guarded';\n}\n\n/**\n * Registers a [DI provider](guide/glossary#provider) for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n *   imports: [RouterModule.forChild(ROUTES)],\n *   providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @publicApi\n */\nexport function provideRoutes(routes: Routes): any {\n  return [\n    {provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes},\n    {provide: ROUTES, multi: true, useValue: routes},\n  ];\n}\n\n/**\n * Allowed values in an `ExtraOptions` object that configure\n * when the router performs the initial navigation operation.\n *\n * * 'enabled' - The initial navigation starts before the root component is created.\n * The bootstrap is blocked until the initial navigation is complete. This value is required\n * for [server-side rendering](guide/universal) to work.\n * * 'disabled' - The initial navigation is not performed. The location listener is set up before\n * the root component gets created. Use if there is a reason to have\n * more control over when the router starts its initial navigation due to some complex\n * initialization logic.\n *\n * The following values have been [deprecated](guide/releases#deprecation-practices) since v4,\n * and should not be used for new applications.\n *\n * * 'legacy_enabled'- (Default, for compatibility.) The initial navigation starts after the root\n * component has been created. The bootstrap is not blocked until the initial navigation is\n * complete.\n * * 'legacy_disabled'- The initial navigation is not performed. The location listener is set up\n * after the root component gets created.\n * * `true` - same as 'legacy_enabled'.\n * * `false` - same as 'legacy_disabled'.\n *\n * The 'legacy_enabled' and 'legacy_disabled' should not be used for new applications.\n *\n * @see `forRoot()`\n *\n * @publicApi\n */\nexport type InitialNavigation = true|false|'enabled'|'disabled'|'legacy_enabled'|'legacy_disabled';\n\n/**\n * A set of configuration options for a router module, provided in the\n * `forRoot()` method.\n *\n * @see `forRoot()`\n *\n *\n * @publicApi\n */\nexport interface ExtraOptions {\n  /**\n   * When true, log all internal navigation events to the console.\n   * Use for debugging.\n   */\n  enableTracing?: boolean;\n\n  /**\n   * When true, enable the location strategy that uses the URL fragment\n   * instead of the history API.\n   */\n  useHash?: boolean;\n\n  /**\n   * One of `enabled` or `disabled`.\n   * When set to `enabled`, the initial navigation starts before the root component is created.\n   * The bootstrap is blocked until the initial navigation is complete. This value is required for\n   * [server-side rendering](guide/universal) to work.\n   * When set to `disabled`, the initial navigation is not performed.\n   * The location listener is set up before the root component gets created.\n   * Use if there is a reason to have more control over when the router\n   * starts its initial navigation due to some complex initialization logic.\n   *\n   * Legacy values are deprecated since v4 and should not be used for new applications:\n   *\n   * * `legacy_enabled` - Default for compatibility.\n   * The initial navigation starts after the root component has been created,\n   * but the bootstrap is not blocked until the initial navigation is complete.\n   * * `legacy_disabled` - The initial navigation is not performed.\n   * The location listener is set up after the root component gets created.\n   * * `true` - same as `legacy_enabled`.\n   * * `false` - same as `legacy_disabled`.\n   */\n  initialNavigation?: InitialNavigation;\n\n  /**\n   * A custom error handler for failed navigations.\n   * If the handler returns a value, the navigation Promise is resolved with this value.\n   * If the handler throws an exception, the navigation Promise is rejected with the exception.\n   *\n   */\n  errorHandler?: ErrorHandler;\n\n  /**\n   * Configures a preloading strategy.\n   * One of `PreloadAllModules` or `NoPreloading` (the default).\n   */\n  preloadingStrategy?: any;\n\n  /**\n   * Define what the router should do if it receives a navigation request to the current URL.\n   * Default is `ignore`, which causes the router ignores the navigation.\n   * This can disable features such as a \"refresh\" button.\n   * Use this option to configure the behavior when navigating to the\n   * current URL. Default is 'ignore'.\n   */\n  onSameUrlNavigation?: 'reload'|'ignore';\n\n  /**\n   * Configures if the scroll position needs to be restored when navigating back.\n   *\n   * * 'disabled'- (Default) Does nothing. Scroll position is maintained on navigation.\n   * * 'top'- Sets the scroll position to x = 0, y = 0 on all navigation.\n   * * 'enabled'- Restores the previous scroll position on backward navigation, else sets the\n   * position to the anchor if one is provided, or sets the scroll position to [0, 0] (forward\n   * navigation). This option will be the default in the future.\n   *\n   * You can implement custom scroll restoration behavior by adapting the enabled behavior as\n   * in the following example.\n   *\n   * ```typescript\n   * class AppModule {\n   *   constructor(router: Router, viewportScroller: ViewportScroller) {\n   *     router.events.pipe(\n   *       filter((e: Event): e is Scroll => e instanceof Scroll)\n   *     ).subscribe(e => {\n   *       if (e.position) {\n   *         // backward navigation\n   *         viewportScroller.scrollToPosition(e.position);\n   *       } else if (e.anchor) {\n   *         // anchor navigation\n   *         viewportScroller.scrollToAnchor(e.anchor);\n   *       } else {\n   *         // forward navigation\n   *         viewportScroller.scrollToPosition([0, 0]);\n   *       }\n   *     });\n   *   }\n   * }\n   * ```\n   */\n  scrollPositionRestoration?: 'disabled'|'enabled'|'top';\n\n  /**\n   * When set to 'enabled', scrolls to the anchor element when the URL has a fragment.\n   * Anchor scrolling is disabled by default.\n   *\n   * Anchor scrolling does not happen on 'popstate'. Instead, we restore the position\n   * that we stored or scroll to the top.\n   */\n  anchorScrolling?: 'disabled'|'enabled';\n\n  /**\n   * Configures the scroll offset the router will use when scrolling to an element.\n   *\n   * When given a tuple with x and y position value,\n   * the router uses that offset each time it scrolls.\n   * When given a function, the router invokes the function every time\n   * it restores scroll position.\n   */\n  scrollOffset?: [number, number]|(() => [number, number]);\n\n  /**\n   * Defines how the router merges parameters, data, and resolved data from parent to child\n   * routes. By default ('emptyOnly'), inherits parent parameters only for\n   * path-less or component-less routes.\n   * Set to 'always' to enable unconditional inheritance of parent parameters.\n   */\n  paramsInheritanceStrategy?: 'emptyOnly'|'always';\n\n  /**\n   * A custom handler for malformed URI errors. The handler is invoked when `encodedURI` contains\n   * invalid character sequences.\n   * The default implementation is to redirect to the root URL, dropping\n   * any path or parameter information. The function takes three parameters:\n   *\n   * - `'URIError'` - Error thrown when parsing a bad URL.\n   * - `'UrlSerializer'` - UrlSerializer that’s configured with the router.\n   * - `'url'` -  The malformed URL that caused the URIError\n   * */\n  malformedUriErrorHandler?:\n      (error: URIError, urlSerializer: UrlSerializer, url: string) => UrlTree;\n\n  /**\n   * Defines when the router updates the browser URL. By default ('deferred'),\n   * update after successful navigation.\n   * Set to 'eager' if prefer to update the URL at the beginning of navigation.\n   * Updating the URL early allows you to handle a failure of navigation by\n   * showing an error message with the URL that failed.\n   */\n  urlUpdateStrategy?: 'deferred'|'eager';\n\n  /**\n   * Enables a bug fix that corrects relative link resolution in components with empty paths.\n   * Example:\n   *\n   * ```\n   * const routes = [\n   *   {\n   *     path: '',\n   *     component: ContainerComponent,\n   *     children: [\n   *       { path: 'a', component: AComponent },\n   *       { path: 'b', component: BComponent },\n   *     ]\n   *   }\n   * ];\n   * ```\n   *\n   * From the `ContainerComponent`, this will not work:\n   *\n   * `<a [routerLink]=\"['./a']\">Link to A</a>`\n   *\n   * However, this will work:\n   *\n   * `<a [routerLink]=\"['../a']\">Link to A</a>`\n   *\n   * In other words, you're required to use `../` rather than `./`. This is currently the default\n   * behavior. Setting this option to `corrected` enables the fix.\n   */\n  relativeLinkResolution?: 'legacy'|'corrected';\n}\n\nexport function setupRouter(\n    urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location,\n    injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler, config: Route[][],\n    opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,\n    routeReuseStrategy?: RouteReuseStrategy) {\n  const router = new Router(\n      null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n\n  if (urlHandlingStrategy) {\n    router.urlHandlingStrategy = urlHandlingStrategy;\n  }\n\n  if (routeReuseStrategy) {\n    router.routeReuseStrategy = routeReuseStrategy;\n  }\n\n  if (opts.errorHandler) {\n    router.errorHandler = opts.errorHandler;\n  }\n\n  if (opts.malformedUriErrorHandler) {\n    router.malformedUriErrorHandler = opts.malformedUriErrorHandler;\n  }\n\n  if (opts.enableTracing) {\n    const dom = getDOM();\n    router.events.subscribe((e: Event) => {\n      dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);\n      dom.log(e.toString());\n      dom.log(e);\n      dom.logGroupEnd();\n    });\n  }\n\n  if (opts.onSameUrlNavigation) {\n    router.onSameUrlNavigation = opts.onSameUrlNavigation;\n  }\n\n  if (opts.paramsInheritanceStrategy) {\n    router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n  }\n\n  if (opts.urlUpdateStrategy) {\n    router.urlUpdateStrategy = opts.urlUpdateStrategy;\n  }\n\n  if (opts.relativeLinkResolution) {\n    router.relativeLinkResolution = opts.relativeLinkResolution;\n  }\n\n  return router;\n}\n\nexport function rootRoute(router: Router): ActivatedRoute {\n  return router.routerState.root;\n}\n\n/**\n * Router initialization requires two steps:\n *\n * First, we start the navigation in a `APP_INITIALIZER` to block the bootstrap if\n * a resolver or a guard executes asynchronously.\n *\n * Next, we actually run activation in a `BOOTSTRAP_LISTENER`, using the\n * `afterPreactivation` hook provided by the router.\n * The router navigation starts, reaches the point when preactivation is done, and then\n * pauses. It waits for the hook to be resolved. We then resolve it only in a bootstrap listener.\n */\n@Injectable()\nexport class RouterInitializer {\n  private initNavigation: boolean = false;\n  private resultOfPreactivationDone = new Subject<void>();\n\n  constructor(private injector: Injector) {}\n\n  appInitializer(): Promise<any> {\n    const p: Promise<any> = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n    return p.then(() => {\n      let resolve: Function = null!;\n      const res = new Promise(r => resolve = r);\n      const router = this.injector.get(Router);\n      const opts = this.injector.get(ROUTER_CONFIGURATION);\n\n      if (this.isLegacyDisabled(opts) || this.isLegacyEnabled(opts)) {\n        resolve(true);\n\n      } else if (opts.initialNavigation === 'disabled') {\n        router.setUpLocationChangeListener();\n        resolve(true);\n\n      } else if (opts.initialNavigation === 'enabled') {\n        router.hooks.afterPreactivation = () => {\n          // only the initial navigation should be delayed\n          if (!this.initNavigation) {\n            this.initNavigation = true;\n            resolve(true);\n            return this.resultOfPreactivationDone;\n\n            // subsequent navigations should not be delayed\n          } else {\n            return of(null) as any;\n          }\n        };\n        router.initialNavigation();\n\n      } else {\n        throw new Error(`Invalid initialNavigation options: '${opts.initialNavigation}'`);\n      }\n\n      return res;\n    });\n  }\n\n  bootstrapListener(bootstrappedComponentRef: ComponentRef<any>): void {\n    const opts = this.injector.get(ROUTER_CONFIGURATION);\n    const preloader = this.injector.get(RouterPreloader);\n    const routerScroller = this.injector.get(RouterScroller);\n    const router = this.injector.get(Router);\n    const ref = this.injector.get<ApplicationRef>(ApplicationRef);\n\n    if (bootstrappedComponentRef !== ref.components[0]) {\n      return;\n    }\n\n    if (this.isLegacyEnabled(opts)) {\n      router.initialNavigation();\n    } else if (this.isLegacyDisabled(opts)) {\n      router.setUpLocationChangeListener();\n    }\n\n    preloader.setUpPreloading();\n    routerScroller.init();\n    router.resetRootComponentType(ref.componentTypes[0]);\n    this.resultOfPreactivationDone.next(null!);\n    this.resultOfPreactivationDone.complete();\n  }\n\n  private isLegacyEnabled(opts: ExtraOptions): boolean {\n    return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n        opts.initialNavigation === undefined;\n  }\n\n  private isLegacyDisabled(opts: ExtraOptions): boolean {\n    return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n  }\n}\n\nexport function getAppInitializer(r: RouterInitializer) {\n  return r.appInitializer.bind(r);\n}\n\nexport function getBootstrapListener(r: RouterInitializer) {\n  return r.bootstrapListener.bind(r);\n}\n\n/**\n * A [DI token](guide/glossary/#di-token) for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nexport const ROUTER_INITIALIZER =\n    new InjectionToken<(compRef: ComponentRef<any>) => void>('Router Initializer');\n\nexport function provideRouterInitializer() {\n  return [\n    RouterInitializer,\n    {\n      provide: APP_INITIALIZER,\n      multi: true,\n      useFactory: getAppInitializer,\n      deps: [RouterInitializer]\n    },\n    {provide: ROUTER_INITIALIZER, useFactory: getBootstrapListener, deps: [RouterInitializer]},\n    {provide: APP_BOOTSTRAP_LISTENER, multi: true, useExisting: ROUTER_INITIALIZER},\n  ];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('10.1.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nexport {ɵEmptyOutletComponent} from './components/empty_outlet';\nexport {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';\nexport {flatten as ɵflatten} from './utils/collection';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/index';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport class VirtualTimeScheduler extends AsyncScheduler {\n    constructor(SchedulerAction = VirtualAction, maxFrames = Number.POSITIVE_INFINITY) {\n        super(SchedulerAction, () => this.frame);\n        this.maxFrames = maxFrames;\n        this.frame = 0;\n        this.index = -1;\n    }\n    flush() {\n        const { actions, maxFrames } = this;\n        let error, action;\n        while ((action = actions[0]) && action.delay <= maxFrames) {\n            actions.shift();\n            this.frame = action.delay;\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        }\n        if (error) {\n            while (action = actions.shift()) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\nVirtualTimeScheduler.frameTimeFactor = 10;\nexport class VirtualAction extends AsyncAction {\n    constructor(scheduler, work, index = scheduler.index += 1) {\n        super(scheduler, work);\n        this.scheduler = scheduler;\n        this.work = work;\n        this.index = index;\n        this.active = true;\n        this.index = scheduler.index = index;\n    }\n    schedule(state, delay = 0) {\n        if (!this.id) {\n            return super.schedule(state, delay);\n        }\n        this.active = false;\n        const action = new VirtualAction(this.scheduler, this.work);\n        this.add(action);\n        return action.schedule(state, delay);\n    }\n    requestAsyncId(scheduler, id, delay = 0) {\n        this.delay = scheduler.frame + delay;\n        const { actions } = scheduler;\n        actions.push(this);\n        actions.sort(VirtualAction.sortActions);\n        return true;\n    }\n    recycleAsyncId(scheduler, id, delay = 0) {\n        return undefined;\n    }\n    _execute(state, delay) {\n        if (this.active === true) {\n            return super._execute(state, delay);\n        }\n    }\n    static sortActions(a, b) {\n        if (a.delay === b.delay) {\n            if (a.index === b.index) {\n                return 0;\n            }\n            else if (a.index > b.index) {\n                return 1;\n            }\n            else {\n                return -1;\n            }\n        }\n        else if (a.delay > b.delay) {\n            return 1;\n        }\n        else {\n            return -1;\n        }\n    }\n}\n//# sourceMappingURL=VirtualTimeScheduler.js.map","import { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nconst NONE = {};\nexport function combineLatest(...observables) {\n    let resultSelector = undefined;\n    let scheduler = undefined;\n    if (isScheduler(observables[observables.length - 1])) {\n        scheduler = observables.pop();\n    }\n    if (typeof observables[observables.length - 1] === 'function') {\n        resultSelector = observables.pop();\n    }\n    if (observables.length === 1 && isArray(observables[0])) {\n        observables = observables[0];\n    }\n    return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nexport class CombineLatestOperator {\n    constructor(resultSelector) {\n        this.resultSelector = resultSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n    }\n}\nexport class CombineLatestSubscriber extends OuterSubscriber {\n    constructor(destination, resultSelector) {\n        super(destination);\n        this.resultSelector = resultSelector;\n        this.active = 0;\n        this.values = [];\n        this.observables = [];\n    }\n    _next(observable) {\n        this.values.push(NONE);\n        this.observables.push(observable);\n    }\n    _complete() {\n        const observables = this.observables;\n        const len = observables.length;\n        if (len === 0) {\n            this.destination.complete();\n        }\n        else {\n            this.active = len;\n            this.toRespond = len;\n            for (let i = 0; i < len; i++) {\n                const observable = observables[i];\n                this.add(subscribeToResult(this, observable, undefined, i));\n            }\n        }\n    }\n    notifyComplete(unused) {\n        if ((this.active -= 1) === 0) {\n            this.destination.complete();\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        const values = this.values;\n        const oldVal = values[outerIndex];\n        const toRespond = !this.toRespond\n            ? 0\n            : oldVal === NONE ? --this.toRespond : this.toRespond;\n        values[outerIndex] = innerValue;\n        if (toRespond === 0) {\n            if (this.resultSelector) {\n                this._tryResultSelector(values);\n            }\n            else {\n                this.destination.next(values.slice());\n            }\n        }\n    }\n    _tryResultSelector(values) {\n        let result;\n        try {\n            result = this.resultSelector.apply(this, values);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n//# sourceMappingURL=combineLatest.js.map","import { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n    return new Observable(subscriber => {\n        const sub = new Subscription();\n        let i = 0;\n        sub.add(scheduler.schedule(function () {\n            if (i === input.length) {\n                subscriber.complete();\n                return;\n            }\n            subscriber.next(input[i++]);\n            if (!subscriber.closed) {\n                sub.add(this.schedule());\n            }\n        }));\n        return sub;\n    });\n}\n//# sourceMappingURL=scheduleArray.js.map","import { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nexport class ReplaySubject extends Subject {\n    constructor(bufferSize = Number.POSITIVE_INFINITY, windowTime = Number.POSITIVE_INFINITY, scheduler) {\n        super();\n        this.scheduler = scheduler;\n        this._events = [];\n        this._infiniteTimeWindow = false;\n        this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n        this._windowTime = windowTime < 1 ? 1 : windowTime;\n        if (windowTime === Number.POSITIVE_INFINITY) {\n            this._infiniteTimeWindow = true;\n            this.next = this.nextInfiniteTimeWindow;\n        }\n        else {\n            this.next = this.nextTimeWindow;\n        }\n    }\n    nextInfiniteTimeWindow(value) {\n        if (!this.isStopped) {\n            const _events = this._events;\n            _events.push(value);\n            if (_events.length > this._bufferSize) {\n                _events.shift();\n            }\n        }\n        super.next(value);\n    }\n    nextTimeWindow(value) {\n        if (!this.isStopped) {\n            this._events.push(new ReplayEvent(this._getNow(), value));\n            this._trimBufferThenGetEvents();\n        }\n        super.next(value);\n    }\n    _subscribe(subscriber) {\n        const _infiniteTimeWindow = this._infiniteTimeWindow;\n        const _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n        const scheduler = this.scheduler;\n        const len = _events.length;\n        let subscription;\n        if (this.closed) {\n            throw new ObjectUnsubscribedError();\n        }\n        else if (this.isStopped || this.hasError) {\n            subscription = Subscription.EMPTY;\n        }\n        else {\n            this.observers.push(subscriber);\n            subscription = new SubjectSubscription(this, subscriber);\n        }\n        if (scheduler) {\n            subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n        }\n        if (_infiniteTimeWindow) {\n            for (let i = 0; i < len && !subscriber.closed; i++) {\n                subscriber.next(_events[i]);\n            }\n        }\n        else {\n            for (let i = 0; i < len && !subscriber.closed; i++) {\n                subscriber.next(_events[i].value);\n            }\n        }\n        if (this.hasError) {\n            subscriber.error(this.thrownError);\n        }\n        else if (this.isStopped) {\n            subscriber.complete();\n        }\n        return subscription;\n    }\n    _getNow() {\n        return (this.scheduler || queue).now();\n    }\n    _trimBufferThenGetEvents() {\n        const now = this._getNow();\n        const _bufferSize = this._bufferSize;\n        const _windowTime = this._windowTime;\n        const _events = this._events;\n        const eventsCount = _events.length;\n        let spliceCount = 0;\n        while (spliceCount < eventsCount) {\n            if ((now - _events[spliceCount].time) < _windowTime) {\n                break;\n            }\n            spliceCount++;\n        }\n        if (eventsCount > _bufferSize) {\n            spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n        }\n        if (spliceCount > 0) {\n            _events.splice(0, spliceCount);\n        }\n        return _events;\n    }\n}\nclass ReplayEvent {\n    constructor(time, value) {\n        this.time = time;\n        this.value = value;\n    }\n}\n//# sourceMappingURL=ReplaySubject.js.map","export const observable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n//# sourceMappingURL=observable.js.map","export { audit } from '../internal/operators/audit';\nexport { auditTime } from '../internal/operators/auditTime';\nexport { buffer } from '../internal/operators/buffer';\nexport { bufferCount } from '../internal/operators/bufferCount';\nexport { bufferTime } from '../internal/operators/bufferTime';\nexport { bufferToggle } from '../internal/operators/bufferToggle';\nexport { bufferWhen } from '../internal/operators/bufferWhen';\nexport { catchError } from '../internal/operators/catchError';\nexport { combineAll } from '../internal/operators/combineAll';\nexport { combineLatest } from '../internal/operators/combineLatest';\nexport { concat } from '../internal/operators/concat';\nexport { concatAll } from '../internal/operators/concatAll';\nexport { concatMap } from '../internal/operators/concatMap';\nexport { concatMapTo } from '../internal/operators/concatMapTo';\nexport { count } from '../internal/operators/count';\nexport { debounce } from '../internal/operators/debounce';\nexport { debounceTime } from '../internal/operators/debounceTime';\nexport { defaultIfEmpty } from '../internal/operators/defaultIfEmpty';\nexport { delay } from '../internal/operators/delay';\nexport { delayWhen } from '../internal/operators/delayWhen';\nexport { dematerialize } from '../internal/operators/dematerialize';\nexport { distinct } from '../internal/operators/distinct';\nexport { distinctUntilChanged } from '../internal/operators/distinctUntilChanged';\nexport { distinctUntilKeyChanged } from '../internal/operators/distinctUntilKeyChanged';\nexport { elementAt } from '../internal/operators/elementAt';\nexport { endWith } from '../internal/operators/endWith';\nexport { every } from '../internal/operators/every';\nexport { exhaust } from '../internal/operators/exhaust';\nexport { exhaustMap } from '../internal/operators/exhaustMap';\nexport { expand } from '../internal/operators/expand';\nexport { filter } from '../internal/operators/filter';\nexport { finalize } from '../internal/operators/finalize';\nexport { find } from '../internal/operators/find';\nexport { findIndex } from '../internal/operators/findIndex';\nexport { first } from '../internal/operators/first';\nexport { groupBy } from '../internal/operators/groupBy';\nexport { ignoreElements } from '../internal/operators/ignoreElements';\nexport { isEmpty } from '../internal/operators/isEmpty';\nexport { last } from '../internal/operators/last';\nexport { map } from '../internal/operators/map';\nexport { mapTo } from '../internal/operators/mapTo';\nexport { materialize } from '../internal/operators/materialize';\nexport { max } from '../internal/operators/max';\nexport { merge } from '../internal/operators/merge';\nexport { mergeAll } from '../internal/operators/mergeAll';\nexport { mergeMap, flatMap } from '../internal/operators/mergeMap';\nexport { mergeMapTo } from '../internal/operators/mergeMapTo';\nexport { mergeScan } from '../internal/operators/mergeScan';\nexport { min } from '../internal/operators/min';\nexport { multicast } from '../internal/operators/multicast';\nexport { observeOn } from '../internal/operators/observeOn';\nexport { onErrorResumeNext } from '../internal/operators/onErrorResumeNext';\nexport { pairwise } from '../internal/operators/pairwise';\nexport { partition } from '../internal/operators/partition';\nexport { pluck } from '../internal/operators/pluck';\nexport { publish } from '../internal/operators/publish';\nexport { publishBehavior } from '../internal/operators/publishBehavior';\nexport { publishLast } from '../internal/operators/publishLast';\nexport { publishReplay } from '../internal/operators/publishReplay';\nexport { race } from '../internal/operators/race';\nexport { reduce } from '../internal/operators/reduce';\nexport { repeat } from '../internal/operators/repeat';\nexport { repeatWhen } from '../internal/operators/repeatWhen';\nexport { retry } from '../internal/operators/retry';\nexport { retryWhen } from '../internal/operators/retryWhen';\nexport { refCount } from '../internal/operators/refCount';\nexport { sample } from '../internal/operators/sample';\nexport { sampleTime } from '../internal/operators/sampleTime';\nexport { scan } from '../internal/operators/scan';\nexport { sequenceEqual } from '../internal/operators/sequenceEqual';\nexport { share } from '../internal/operators/share';\nexport { shareReplay } from '../internal/operators/shareReplay';\nexport { single } from '../internal/operators/single';\nexport { skip } from '../internal/operators/skip';\nexport { skipLast } from '../internal/operators/skipLast';\nexport { skipUntil } from '../internal/operators/skipUntil';\nexport { skipWhile } from '../internal/operators/skipWhile';\nexport { startWith } from '../internal/operators/startWith';\nexport { subscribeOn } from '../internal/operators/subscribeOn';\nexport { switchAll } from '../internal/operators/switchAll';\nexport { switchMap } from '../internal/operators/switchMap';\nexport { switchMapTo } from '../internal/operators/switchMapTo';\nexport { take } from '../internal/operators/take';\nexport { takeLast } from '../internal/operators/takeLast';\nexport { takeUntil } from '../internal/operators/takeUntil';\nexport { takeWhile } from '../internal/operators/takeWhile';\nexport { tap } from '../internal/operators/tap';\nexport { throttle } from '../internal/operators/throttle';\nexport { throttleTime } from '../internal/operators/throttleTime';\nexport { throwIfEmpty } from '../internal/operators/throwIfEmpty';\nexport { timeInterval } from '../internal/operators/timeInterval';\nexport { timeout } from '../internal/operators/timeout';\nexport { timeoutWith } from '../internal/operators/timeoutWith';\nexport { timestamp } from '../internal/operators/timestamp';\nexport { toArray } from '../internal/operators/toArray';\nexport { window } from '../internal/operators/window';\nexport { windowCount } from '../internal/operators/windowCount';\nexport { windowTime } from '../internal/operators/windowTime';\nexport { windowToggle } from '../internal/operators/windowToggle';\nexport { windowWhen } from '../internal/operators/windowWhen';\nexport { withLatestFrom } from '../internal/operators/withLatestFrom';\nexport { zip } from '../internal/operators/zip';\nexport { zipAll } from '../internal/operators/zipAll';\n//# sourceMappingURL=index.js.map","import { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nexport function skipLast(count) {\n    return (source) => source.lift(new SkipLastOperator(count));\n}\nclass SkipLastOperator {\n    constructor(_skipCount) {\n        this._skipCount = _skipCount;\n        if (this._skipCount < 0) {\n            throw new ArgumentOutOfRangeError;\n        }\n    }\n    call(subscriber, source) {\n        if (this._skipCount === 0) {\n            return source.subscribe(new Subscriber(subscriber));\n        }\n        else {\n            return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n        }\n    }\n}\nclass SkipLastSubscriber extends Subscriber {\n    constructor(destination, _skipCount) {\n        super(destination);\n        this._skipCount = _skipCount;\n        this._count = 0;\n        this._ring = new Array(_skipCount);\n    }\n    _next(value) {\n        const skipCount = this._skipCount;\n        const count = this._count++;\n        if (count < skipCount) {\n            this._ring[count] = value;\n        }\n        else {\n            const currentIndex = count % skipCount;\n            const ring = this._ring;\n            const oldValue = ring[currentIndex];\n            ring[currentIndex] = value;\n            this.destination.next(oldValue);\n        }\n    }\n}\n//# sourceMappingURL=skipLast.js.map","import { Subscriber } from '../Subscriber';\nexport function dematerialize() {\n    return function dematerializeOperatorFunction(source) {\n        return source.lift(new DeMaterializeOperator());\n    };\n}\nclass DeMaterializeOperator {\n    call(subscriber, source) {\n        return source.subscribe(new DeMaterializeSubscriber(subscriber));\n    }\n}\nclass DeMaterializeSubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n    }\n    _next(value) {\n        value.observe(this.destination);\n    }\n}\n//# sourceMappingURL=dematerialize.js.map","import { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nexport function interval(period = 0, scheduler = async) {\n    if (!isNumeric(period) || period < 0) {\n        period = 0;\n    }\n    if (!scheduler || typeof scheduler.schedule !== 'function') {\n        scheduler = async;\n    }\n    return new Observable(subscriber => {\n        subscriber.add(scheduler.schedule(dispatch, period, { subscriber, counter: 0, period }));\n        return subscriber;\n    });\n}\nfunction dispatch(state) {\n    const { subscriber, counter, period } = state;\n    subscriber.next(counter);\n    this.schedule({ subscriber, counter: counter + 1, period }, period);\n}\n//# sourceMappingURL=interval.js.map","import { Subscriber } from './Subscriber';\nexport class OuterSubscriber extends Subscriber {\n    notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n        this.destination.next(innerValue);\n    }\n    notifyError(error, innerSub) {\n        this.destination.error(error);\n    }\n    notifyComplete(innerSub) {\n        this.destination.complete();\n    }\n}\n//# sourceMappingURL=OuterSubscriber.js.map","import { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n    return function mapOperation(source) {\n        if (typeof project !== 'function') {\n            throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n        }\n        return source.lift(new MapOperator(project, thisArg));\n    };\n}\nexport class MapOperator {\n    constructor(project, thisArg) {\n        this.project = project;\n        this.thisArg = thisArg;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n    }\n}\nclass MapSubscriber extends Subscriber {\n    constructor(destination, project, thisArg) {\n        super(destination);\n        this.project = project;\n        this.count = 0;\n        this.thisArg = thisArg || this;\n    }\n    _next(value) {\n        let result;\n        try {\n            result = this.project.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n//# sourceMappingURL=map.js.map","import { Subscriber } from '../Subscriber';\nimport { Subject } from '../Subject';\nexport function windowCount(windowSize, startWindowEvery = 0) {\n    return function windowCountOperatorFunction(source) {\n        return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n    };\n}\nclass WindowCountOperator {\n    constructor(windowSize, startWindowEvery) {\n        this.windowSize = windowSize;\n        this.startWindowEvery = startWindowEvery;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n    }\n}\nclass WindowCountSubscriber extends Subscriber {\n    constructor(destination, windowSize, startWindowEvery) {\n        super(destination);\n        this.destination = destination;\n        this.windowSize = windowSize;\n        this.startWindowEvery = startWindowEvery;\n        this.windows = [new Subject()];\n        this.count = 0;\n        destination.next(this.windows[0]);\n    }\n    _next(value) {\n        const startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;\n        const destination = this.destination;\n        const windowSize = this.windowSize;\n        const windows = this.windows;\n        const len = windows.length;\n        for (let i = 0; i < len && !this.closed; i++) {\n            windows[i].next(value);\n        }\n        const c = this.count - windowSize + 1;\n        if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {\n            windows.shift().complete();\n        }\n        if (++this.count % startWindowEvery === 0 && !this.closed) {\n            const window = new Subject();\n            windows.push(window);\n            destination.next(window);\n        }\n    }\n    _error(err) {\n        const windows = this.windows;\n        if (windows) {\n            while (windows.length > 0 && !this.closed) {\n                windows.shift().error(err);\n            }\n        }\n        this.destination.error(err);\n    }\n    _complete() {\n        const windows = this.windows;\n        if (windows) {\n            while (windows.length > 0 && !this.closed) {\n                windows.shift().complete();\n            }\n        }\n        this.destination.complete();\n    }\n    _unsubscribe() {\n        this.count = 0;\n        this.windows = null;\n    }\n}\n//# sourceMappingURL=windowCount.js.map","import { Subscriber } from '../Subscriber';\nexport function isEmpty() {\n    return (source) => source.lift(new IsEmptyOperator());\n}\nclass IsEmptyOperator {\n    call(observer, source) {\n        return source.subscribe(new IsEmptySubscriber(observer));\n    }\n}\nclass IsEmptySubscriber extends Subscriber {\n    constructor(destination) {\n        super(destination);\n    }\n    notifyComplete(isEmpty) {\n        const destination = this.destination;\n        destination.next(isEmpty);\n        destination.complete();\n    }\n    _next(value) {\n        this.notifyComplete(false);\n    }\n    _complete() {\n        this.notifyComplete(true);\n    }\n}\n//# sourceMappingURL=isEmpty.js.map","import { identity } from './identity';\nexport function pipe(...fns) {\n    return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n    if (fns.length === 0) {\n        return identity;\n    }\n    if (fns.length === 1) {\n        return fns[0];\n    }\n    return function piped(input) {\n        return fns.reduce((prev, fn) => fn(prev), input);\n    };\n}\n//# sourceMappingURL=pipe.js.map","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  }\n\n  return assertThisInitialized(self);\n}","import { Subject } from '../Subject';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function window(windowBoundaries) {\n    return function windowOperatorFunction(source) {\n        return source.lift(new WindowOperator(windowBoundaries));\n    };\n}\nclass WindowOperator {\n    constructor(windowBoundaries) {\n        this.windowBoundaries = windowBoundaries;\n    }\n    call(subscriber, source) {\n        const windowSubscriber = new WindowSubscriber(subscriber);\n        const sourceSubscription = source.subscribe(windowSubscriber);\n        if (!sourceSubscription.closed) {\n            windowSubscriber.add(innerSubscribe(this.windowBoundaries, new SimpleInnerSubscriber(windowSubscriber)));\n        }\n        return sourceSubscription;\n    }\n}\nclass WindowSubscriber extends SimpleOuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.window = new Subject();\n        destination.next(this.window);\n    }\n    notifyNext() {\n        this.openWindow();\n    }\n    notifyError(error) {\n        this._error(error);\n    }\n    notifyComplete() {\n        this._complete();\n    }\n    _next(value) {\n        this.window.next(value);\n    }\n    _error(err) {\n        this.window.error(err);\n        this.destination.error(err);\n    }\n    _complete() {\n        this.window.complete();\n        this.destination.complete();\n    }\n    _unsubscribe() {\n        this.window = null;\n    }\n    openWindow() {\n        const prevWindow = this.window;\n        if (prevWindow) {\n            prevWindow.complete();\n        }\n        const destination = this.destination;\n        const newWindow = this.window = new Subject();\n        destination.next(newWindow);\n    }\n}\n//# sourceMappingURL=window.js.map","export function isDate(value) {\n    return value instanceof Date && !isNaN(+value);\n}\n//# sourceMappingURL=isDate.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\n            if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n};\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\n    return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to get private field on non-instance\");\r\n    }\r\n    return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to set private field on non-instance\");\r\n    }\r\n    privateMap.set(receiver, value);\r\n    return value;\r\n}\r\n","export function isFunction(x) {\n    return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","import { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n    return (source) => source.lift(new FinallyOperator(callback));\n}\nclass FinallyOperator {\n    constructor(callback) {\n        this.callback = callback;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n    }\n}\nclass FinallySubscriber extends Subscriber {\n    constructor(destination, callback) {\n        super(destination);\n        this.add(new Subscription(callback));\n    }\n}\n//# sourceMappingURL=finalize.js.map","export const subscribeToArray = (array) => (subscriber) => {\n    for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n        subscriber.next(array[i]);\n    }\n    subscriber.complete();\n};\n//# sourceMappingURL=subscribeToArray.js.map","import { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n    return function multicastOperatorFunction(source) {\n        let subjectFactory;\n        if (typeof subjectOrSubjectFactory === 'function') {\n            subjectFactory = subjectOrSubjectFactory;\n        }\n        else {\n            subjectFactory = function subjectFactory() {\n                return subjectOrSubjectFactory;\n            };\n        }\n        if (typeof selector === 'function') {\n            return source.lift(new MulticastOperator(subjectFactory, selector));\n        }\n        const connectable = Object.create(source, connectableObservableDescriptor);\n        connectable.source = source;\n        connectable.subjectFactory = subjectFactory;\n        return connectable;\n    };\n}\nexport class MulticastOperator {\n    constructor(subjectFactory, selector) {\n        this.subjectFactory = subjectFactory;\n        this.selector = selector;\n    }\n    call(subscriber, source) {\n        const { selector } = this;\n        const subject = this.subjectFactory();\n        const subscription = selector(subject).subscribe(subscriber);\n        subscription.add(source.subscribe(subject));\n        return subscription;\n    }\n}\n//# sourceMappingURL=multicast.js.map","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationBuilder, AnimationFactory, AnimationMetadata, AnimationOptions, AnimationPlayer, sequence} from '@angular/animations';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, RendererFactory2, RendererType2, ViewEncapsulation} from '@angular/core';\n\nimport {AnimationRenderer} from './animation_renderer';\n\n@Injectable()\nexport class BrowserAnimationBuilder extends AnimationBuilder {\n  private _nextAnimationId = 0;\n  private _renderer: AnimationRenderer;\n\n  constructor(rootRenderer: RendererFactory2, @Inject(DOCUMENT) doc: any) {\n    super();\n    const typeData =\n        {id: '0', encapsulation: ViewEncapsulation.None, styles: [], data: {animation: []}} as\n        RendererType2;\n    this._renderer = rootRenderer.createRenderer(doc.body, typeData) as AnimationRenderer;\n  }\n\n  build(animation: AnimationMetadata|AnimationMetadata[]): AnimationFactory {\n    const id = this._nextAnimationId.toString();\n    this._nextAnimationId++;\n    const entry = Array.isArray(animation) ? sequence(animation) : animation;\n    issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n    return new BrowserAnimationFactory(id, this._renderer);\n  }\n}\n\nexport class BrowserAnimationFactory extends AnimationFactory {\n  constructor(private _id: string, private _renderer: AnimationRenderer) {\n    super();\n  }\n\n  create(element: any, options?: AnimationOptions): AnimationPlayer {\n    return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n  }\n}\n\nexport class RendererAnimationPlayer implements AnimationPlayer {\n  public parentPlayer: AnimationPlayer|null = null;\n  private _started = false;\n\n  constructor(\n      public id: string, public element: any, options: AnimationOptions,\n      private _renderer: AnimationRenderer) {\n    this._command('create', options);\n  }\n\n  private _listen(eventName: string, callback: (event: any) => any): () => void {\n    return this._renderer.listen(this.element, `@@${this.id}:${eventName}`, callback);\n  }\n\n  private _command(command: string, ...args: any[]) {\n    return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n  }\n\n  onDone(fn: () => void): void {\n    this._listen('done', fn);\n  }\n\n  onStart(fn: () => void): void {\n    this._listen('start', fn);\n  }\n\n  onDestroy(fn: () => void): void {\n    this._listen('destroy', fn);\n  }\n\n  init(): void {\n    this._command('init');\n  }\n\n  hasStarted(): boolean {\n    return this._started;\n  }\n\n  play(): void {\n    this._command('play');\n    this._started = true;\n  }\n\n  pause(): void {\n    this._command('pause');\n  }\n\n  restart(): void {\n    this._command('restart');\n  }\n\n  finish(): void {\n    this._command('finish');\n  }\n\n  destroy(): void {\n    this._command('destroy');\n  }\n\n  reset(): void {\n    this._command('reset');\n  }\n\n  setPosition(p: number): void {\n    this._command('setPosition', p);\n  }\n\n  getPosition(): number {\n    return 0;\n  }\n\n  public totalTime = 0;\n}\n\nfunction issueAnimationCommand(\n    renderer: AnimationRenderer, element: any, id: string, command: string, args: any[]): any {\n  return renderer.setProperty(element, `@@${id}:${command}`, args);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationTriggerMetadata} from '@angular/animations';\nimport {ɵAnimationEngine as AnimationEngine} from '@angular/animations/browser';\nimport {Injectable, NgZone, Renderer2, RendererFactory2, RendererStyleFlags2, RendererType2} from '@angular/core';\n\nconst ANIMATION_PREFIX = '@';\nconst DISABLE_ANIMATIONS_FLAG = '@.disabled';\n\n// Define a recursive type to allow for nested arrays of `AnimationTriggerMetadata`. Note that an\n// interface declaration is used as TypeScript prior to 3.7 does not support recursive type\n// references, see https://github.com/microsoft/TypeScript/pull/33050 for details.\ntype NestedAnimationTriggerMetadata = AnimationTriggerMetadata|RecursiveAnimationTriggerMetadata;\ninterface RecursiveAnimationTriggerMetadata extends Array<NestedAnimationTriggerMetadata> {}\n\n@Injectable()\nexport class AnimationRendererFactory implements RendererFactory2 {\n  private _currentId: number = 0;\n  private _microtaskId: number = 1;\n  private _animationCallbacksBuffer: [(e: any) => any, any][] = [];\n  private _rendererCache = new Map<Renderer2, BaseAnimationRenderer>();\n  private _cdRecurDepth = 0;\n  private promise: Promise<any> = Promise.resolve(0);\n\n  constructor(\n      private delegate: RendererFactory2, private engine: AnimationEngine, private _zone: NgZone) {\n    engine.onRemovalComplete = (element: any, delegate: Renderer2) => {\n      // Note: if an component element has a leave animation, and the component\n      // a host leave animation, the view engine will call `removeChild` for the parent\n      // component renderer as well as for the child component renderer.\n      // Therefore, we need to check if we already removed the element.\n      if (delegate && delegate.parentNode(element)) {\n        delegate.removeChild(element.parentNode, element);\n      }\n    };\n  }\n\n  createRenderer(hostElement: any, type: RendererType2): Renderer2 {\n    const EMPTY_NAMESPACE_ID = '';\n\n    // cache the delegates to find out which cached delegate can\n    // be used by which cached renderer\n    const delegate = this.delegate.createRenderer(hostElement, type);\n    if (!hostElement || !type || !type.data || !type.data['animation']) {\n      let renderer: BaseAnimationRenderer|undefined = this._rendererCache.get(delegate);\n      if (!renderer) {\n        renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);\n        // only cache this result when the base renderer is used\n        this._rendererCache.set(delegate, renderer);\n      }\n      return renderer;\n    }\n\n    const componentId = type.id;\n    const namespaceId = type.id + '-' + this._currentId;\n    this._currentId++;\n\n    this.engine.register(namespaceId, hostElement);\n\n    const registerTrigger = (trigger: NestedAnimationTriggerMetadata) => {\n      if (Array.isArray(trigger)) {\n        trigger.forEach(registerTrigger);\n      } else {\n        this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n      }\n    };\n    const animationTriggers = type.data['animation'] as NestedAnimationTriggerMetadata[];\n    animationTriggers.forEach(registerTrigger);\n\n    return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n  }\n\n  begin() {\n    this._cdRecurDepth++;\n    if (this.delegate.begin) {\n      this.delegate.begin();\n    }\n  }\n\n  private _scheduleCountTask() {\n    // always use promise to schedule microtask instead of use Zone\n    this.promise.then(() => {\n      this._microtaskId++;\n    });\n  }\n\n  /** @internal */\n  scheduleListenerCallback(count: number, fn: (e: any) => any, data: any) {\n    if (count >= 0 && count < this._microtaskId) {\n      this._zone.run(() => fn(data));\n      return;\n    }\n\n    if (this._animationCallbacksBuffer.length == 0) {\n      Promise.resolve(null).then(() => {\n        this._zone.run(() => {\n          this._animationCallbacksBuffer.forEach(tuple => {\n            const [fn, data] = tuple;\n            fn(data);\n          });\n          this._animationCallbacksBuffer = [];\n        });\n      });\n    }\n\n    this._animationCallbacksBuffer.push([fn, data]);\n  }\n\n  end() {\n    this._cdRecurDepth--;\n\n    // this is to prevent animations from running twice when an inner\n    // component does CD when a parent component instead has inserted it\n    if (this._cdRecurDepth == 0) {\n      this._zone.runOutsideAngular(() => {\n        this._scheduleCountTask();\n        this.engine.flush(this._microtaskId);\n      });\n    }\n    if (this.delegate.end) {\n      this.delegate.end();\n    }\n  }\n\n  whenRenderingDone(): Promise<any> {\n    return this.engine.whenRenderingDone();\n  }\n}\n\nexport class BaseAnimationRenderer implements Renderer2 {\n  constructor(\n      protected namespaceId: string, public delegate: Renderer2, public engine: AnimationEngine) {\n    this.destroyNode = this.delegate.destroyNode ? (n) => delegate.destroyNode!(n) : null;\n  }\n\n  get data() {\n    return this.delegate.data;\n  }\n\n  destroyNode: ((n: any) => void)|null;\n\n  destroy(): void {\n    this.engine.destroy(this.namespaceId, this.delegate);\n    this.delegate.destroy();\n  }\n\n  createElement(name: string, namespace?: string|null|undefined) {\n    return this.delegate.createElement(name, namespace);\n  }\n\n  createComment(value: string) {\n    return this.delegate.createComment(value);\n  }\n\n  createText(value: string) {\n    return this.delegate.createText(value);\n  }\n\n  appendChild(parent: any, newChild: any): void {\n    this.delegate.appendChild(parent, newChild);\n    this.engine.onInsert(this.namespaceId, newChild, parent, false);\n  }\n\n  insertBefore(parent: any, newChild: any, refChild: any): void {\n    this.delegate.insertBefore(parent, newChild, refChild);\n    this.engine.onInsert(this.namespaceId, newChild, parent, true);\n  }\n\n  removeChild(parent: any, oldChild: any, isHostElement: boolean): void {\n    this.engine.onRemove(this.namespaceId, oldChild, this.delegate, isHostElement);\n  }\n\n  selectRootElement(selectorOrNode: any, preserveContent?: boolean) {\n    return this.delegate.selectRootElement(selectorOrNode, preserveContent);\n  }\n\n  parentNode(node: any) {\n    return this.delegate.parentNode(node);\n  }\n\n  nextSibling(node: any) {\n    return this.delegate.nextSibling(node);\n  }\n\n  setAttribute(el: any, name: string, value: string, namespace?: string|null|undefined): void {\n    this.delegate.setAttribute(el, name, value, namespace);\n  }\n\n  removeAttribute(el: any, name: string, namespace?: string|null|undefined): void {\n    this.delegate.removeAttribute(el, name, namespace);\n  }\n\n  addClass(el: any, name: string): void {\n    this.delegate.addClass(el, name);\n  }\n\n  removeClass(el: any, name: string): void {\n    this.delegate.removeClass(el, name);\n  }\n\n  setStyle(el: any, style: string, value: any, flags?: RendererStyleFlags2|undefined): void {\n    this.delegate.setStyle(el, style, value, flags);\n  }\n\n  removeStyle(el: any, style: string, flags?: RendererStyleFlags2|undefined): void {\n    this.delegate.removeStyle(el, style, flags);\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n      this.disableAnimations(el, !!value);\n    } else {\n      this.delegate.setProperty(el, name, value);\n    }\n  }\n\n  setValue(node: any, value: string): void {\n    this.delegate.setValue(node, value);\n  }\n\n  listen(target: any, eventName: string, callback: (event: any) => boolean | void): () => void {\n    return this.delegate.listen(target, eventName, callback);\n  }\n\n  protected disableAnimations(element: any, value: boolean) {\n    this.engine.disableAnimations(element, value);\n  }\n}\n\nexport class AnimationRenderer extends BaseAnimationRenderer implements Renderer2 {\n  constructor(\n      public factory: AnimationRendererFactory, namespaceId: string, delegate: Renderer2,\n      engine: AnimationEngine) {\n    super(namespaceId, delegate, engine);\n    this.namespaceId = namespaceId;\n  }\n\n  setProperty(el: any, name: string, value: any): void {\n    if (name.charAt(0) == ANIMATION_PREFIX) {\n      if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {\n        value = value === undefined ? true : !!value;\n        this.disableAnimations(el, value as boolean);\n      } else {\n        this.engine.process(this.namespaceId, el, name.substr(1), value);\n      }\n    } else {\n      this.delegate.setProperty(el, name, value);\n    }\n  }\n\n  listen(target: 'window'|'document'|'body'|any, eventName: string, callback: (event: any) => any):\n      () => void {\n    if (eventName.charAt(0) == ANIMATION_PREFIX) {\n      const element = resolveElementFromTarget(target);\n      let name = eventName.substr(1);\n      let phase = '';\n      // @listener.phase is for trigger animation callbacks\n      // @@listener is for animation builder callbacks\n      if (name.charAt(0) != ANIMATION_PREFIX) {\n        [name, phase] = parseTriggerCallbackName(name);\n      }\n      return this.engine.listen(this.namespaceId, element, name, phase, event => {\n        const countId = (event as any)['_data'] || -1;\n        this.factory.scheduleListenerCallback(countId, callback, event);\n      });\n    }\n    return this.delegate.listen(target, eventName, callback);\n  }\n}\n\nfunction resolveElementFromTarget(target: 'window'|'document'|'body'|any): any {\n  switch (target) {\n    case 'body':\n      return document.body;\n    case 'document':\n      return document;\n    case 'window':\n      return window;\n    default:\n      return target;\n  }\n}\n\nfunction parseTriggerCallbackName(triggerName: string) {\n  const dotIndex = triggerName.indexOf('.');\n  const trigger = triggerName.substring(0, dotIndex);\n  const phase = triggerName.substr(dotIndex + 1);\n  return [trigger, phase];\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationBuilder} from '@angular/animations';\nimport {AnimationDriver, ɵAnimationEngine as AnimationEngine, ɵAnimationStyleNormalizer as AnimationStyleNormalizer, ɵCssKeyframesDriver as CssKeyframesDriver, ɵNoopAnimationDriver as NoopAnimationDriver, ɵsupportsWebAnimations as supportsWebAnimations, ɵWebAnimationsDriver as WebAnimationsDriver, ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer} from '@angular/animations/browser';\nimport {DOCUMENT} from '@angular/common';\nimport {Inject, Injectable, InjectionToken, NgZone, Provider, RendererFactory2} from '@angular/core';\nimport {ɵDomRendererFactory2 as DomRendererFactory2} from '@angular/platform-browser';\n\nimport {BrowserAnimationBuilder} from './animation_builder';\nimport {AnimationRendererFactory} from './animation_renderer';\n\n@Injectable()\nexport class InjectableAnimationEngine extends AnimationEngine {\n  constructor(\n      @Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {\n    super(doc.body, driver, normalizer);\n  }\n}\n\nexport function instantiateSupportedAnimationDriver() {\n  return supportsWebAnimations() ? new WebAnimationsDriver() : new CssKeyframesDriver();\n}\n\nexport function instantiateDefaultStyleNormalizer() {\n  return new WebAnimationsStyleNormalizer();\n}\n\nexport function instantiateRendererFactory(\n    renderer: DomRendererFactory2, engine: AnimationEngine, zone: NgZone) {\n  return new AnimationRendererFactory(renderer, engine, zone);\n}\n\n/**\n * @publicApi\n */\nexport const ANIMATION_MODULE_TYPE =\n    new InjectionToken<'NoopAnimations'|'BrowserAnimations'>('AnimationModuleType');\n\nconst SHARED_ANIMATION_PROVIDERS: Provider[] = [\n  {provide: AnimationBuilder, useClass: BrowserAnimationBuilder},\n  {provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},\n  {provide: AnimationEngine, useClass: InjectableAnimationEngine}, {\n    provide: RendererFactory2,\n    useFactory: instantiateRendererFactory,\n    deps: [DomRendererFactory2, AnimationEngine, NgZone]\n  }\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nexport const BROWSER_ANIMATIONS_PROVIDERS: Provider[] = [\n  {provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver},\n  {provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n\n/**\n * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserTestingModule.\n */\nexport const BROWSER_NOOP_ANIMATIONS_PROVIDERS: Provider[] = [\n  {provide: AnimationDriver, useClass: NoopAnimationDriver},\n  {provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations'}, ...SHARED_ANIMATION_PROVIDERS\n];\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {NgModule} from '@angular/core';\nimport {BrowserModule} from '@angular/platform-browser';\n\nimport {BROWSER_ANIMATIONS_PROVIDERS, BROWSER_NOOP_ANIMATIONS_PROVIDERS} from './providers';\n\n/**\n * Exports `BrowserModule` with additional [dependency-injection providers](guide/glossary#provider)\n * for use with animations. See [Animations](guide/animations).\n * @publicApi\n */\n@NgModule({\n  exports: [BrowserModule],\n  providers: BROWSER_ANIMATIONS_PROVIDERS,\n})\nexport class BrowserAnimationsModule {\n}\n\n/**\n * A null player that must be imported to allow disabling of animations.\n * @publicApi\n */\n@NgModule({\n  exports: [BrowserModule],\n  providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n})\nexport class NoopAnimationsModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport {BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory} from './animation_builder';\nexport {AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory} from './animation_renderer';\nexport {InjectableAnimationEngine as ɵInjectableAnimationEngine} from './providers';\n","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function buffer(closingNotifier) {\n    return function bufferOperatorFunction(source) {\n        return source.lift(new BufferOperator(closingNotifier));\n    };\n}\nclass BufferOperator {\n    constructor(closingNotifier) {\n        this.closingNotifier = closingNotifier;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n    }\n}\nclass BufferSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, closingNotifier) {\n        super(destination);\n        this.buffer = [];\n        this.add(innerSubscribe(closingNotifier, new SimpleInnerSubscriber(this)));\n    }\n    _next(value) {\n        this.buffer.push(value);\n    }\n    notifyNext() {\n        const buffer = this.buffer;\n        this.buffer = [];\n        this.destination.next(buffer);\n    }\n}\n//# sourceMappingURL=buffer.js.map","import { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n    return function filterOperatorFunction(source) {\n        return source.lift(new FilterOperator(predicate, thisArg));\n    };\n}\nclass FilterOperator {\n    constructor(predicate, thisArg) {\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n    }\n}\nclass FilterSubscriber extends Subscriber {\n    constructor(destination, predicate, thisArg) {\n        super(destination);\n        this.predicate = predicate;\n        this.thisArg = thisArg;\n        this.count = 0;\n    }\n    _next(value) {\n        let result;\n        try {\n            result = this.predicate.call(this.thisArg, value, this.count++);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        if (result) {\n            this.destination.next(value);\n        }\n    }\n}\n//# sourceMappingURL=filter.js.map","import { iterator as Symbol_iterator } from '../symbol/iterator';\nexport const subscribeToIterable = (iterable) => (subscriber) => {\n    const iterator = iterable[Symbol_iterator]();\n    do {\n        let item;\n        try {\n            item = iterator.next();\n        }\n        catch (err) {\n            subscriber.error(err);\n            return subscriber;\n        }\n        if (item.done) {\n            subscriber.complete();\n            break;\n        }\n        subscriber.next(item.value);\n        if (subscriber.closed) {\n            break;\n        }\n    } while (true);\n    if (typeof iterator.return === 'function') {\n        subscriber.add(() => {\n            if (iterator.return) {\n                iterator.return();\n            }\n        });\n    }\n    return subscriber;\n};\n//# sourceMappingURL=subscribeToIterable.js.map","<router-outlet></router-outlet>","import { Subject } from '../Subject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function windowWhen(closingSelector) {\n    return function windowWhenOperatorFunction(source) {\n        return source.lift(new WindowOperator(closingSelector));\n    };\n}\nclass WindowOperator {\n    constructor(closingSelector) {\n        this.closingSelector = closingSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));\n    }\n}\nclass WindowSubscriber extends OuterSubscriber {\n    constructor(destination, closingSelector) {\n        super(destination);\n        this.destination = destination;\n        this.closingSelector = closingSelector;\n        this.openWindow();\n    }\n    notifyNext(_outerValue, _innerValue, _outerIndex, _innerIndex, innerSub) {\n        this.openWindow(innerSub);\n    }\n    notifyError(error) {\n        this._error(error);\n    }\n    notifyComplete(innerSub) {\n        this.openWindow(innerSub);\n    }\n    _next(value) {\n        this.window.next(value);\n    }\n    _error(err) {\n        this.window.error(err);\n        this.destination.error(err);\n        this.unsubscribeClosingNotification();\n    }\n    _complete() {\n        this.window.complete();\n        this.destination.complete();\n        this.unsubscribeClosingNotification();\n    }\n    unsubscribeClosingNotification() {\n        if (this.closingNotification) {\n            this.closingNotification.unsubscribe();\n        }\n    }\n    openWindow(innerSub = null) {\n        if (innerSub) {\n            this.remove(innerSub);\n            innerSub.unsubscribe();\n        }\n        const prevWindow = this.window;\n        if (prevWindow) {\n            prevWindow.complete();\n        }\n        const window = this.window = new Subject();\n        this.destination.next(window);\n        let closingNotifier;\n        try {\n            const { closingSelector } = this;\n            closingNotifier = closingSelector();\n        }\n        catch (e) {\n            this.destination.error(e);\n            this.window.error(e);\n            return;\n        }\n        this.add(this.closingNotification = subscribeToResult(this, closingNotifier));\n    }\n}\n//# sourceMappingURL=windowWhen.js.map","const UnsubscriptionErrorImpl = (() => {\n    function UnsubscriptionErrorImpl(errors) {\n        Error.call(this);\n        this.message = errors ?\n            `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n  ')}` : '';\n        this.name = 'UnsubscriptionError';\n        this.errors = errors;\n        return this;\n    }\n    UnsubscriptionErrorImpl.prototype = Object.create(Error.prototype);\n    return UnsubscriptionErrorImpl;\n})();\nexport const UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map","import { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function observeOn(scheduler, delay = 0) {\n    return function observeOnOperatorFunction(source) {\n        return source.lift(new ObserveOnOperator(scheduler, delay));\n    };\n}\nexport class ObserveOnOperator {\n    constructor(scheduler, delay = 0) {\n        this.scheduler = scheduler;\n        this.delay = delay;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n    }\n}\nexport class ObserveOnSubscriber extends Subscriber {\n    constructor(destination, scheduler, delay = 0) {\n        super(destination);\n        this.scheduler = scheduler;\n        this.delay = delay;\n    }\n    static dispatch(arg) {\n        const { notification, destination } = arg;\n        notification.observe(destination);\n        this.unsubscribe();\n    }\n    scheduleMessage(notification) {\n        const destination = this.destination;\n        destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n    }\n    _next(value) {\n        this.scheduleMessage(Notification.createNext(value));\n    }\n    _error(err) {\n        this.scheduleMessage(Notification.createError(err));\n        this.unsubscribe();\n    }\n    _complete() {\n        this.scheduleMessage(Notification.createComplete());\n        this.unsubscribe();\n    }\n}\nexport class ObserveOnMessage {\n    constructor(notification, destination) {\n        this.notification = notification;\n        this.destination = destination;\n    }\n}\n//# sourceMappingURL=observeOn.js.map","import { concatMap } from './concatMap';\nexport function concatMapTo(innerObservable, resultSelector) {\n    return concatMap(() => innerObservable, resultSelector);\n}\n//# sourceMappingURL=concatMapTo.js.map","import { merge as mergeStatic } from '../observable/merge';\nexport function merge(...observables) {\n    return (source) => source.lift.call(mergeStatic(source, ...observables));\n}\n//# sourceMappingURL=merge.js.map","export { Observable } from './internal/Observable';\nexport { ConnectableObservable } from './internal/observable/ConnectableObservable';\nexport { GroupedObservable } from './internal/operators/groupBy';\nexport { observable } from './internal/symbol/observable';\nexport { Subject } from './internal/Subject';\nexport { BehaviorSubject } from './internal/BehaviorSubject';\nexport { ReplaySubject } from './internal/ReplaySubject';\nexport { AsyncSubject } from './internal/AsyncSubject';\nexport { asap, asapScheduler } from './internal/scheduler/asap';\nexport { async, asyncScheduler } from './internal/scheduler/async';\nexport { queue, queueScheduler } from './internal/scheduler/queue';\nexport { animationFrame, animationFrameScheduler } from './internal/scheduler/animationFrame';\nexport { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';\nexport { Scheduler } from './internal/Scheduler';\nexport { Subscription } from './internal/Subscription';\nexport { Subscriber } from './internal/Subscriber';\nexport { Notification, NotificationKind } from './internal/Notification';\nexport { pipe } from './internal/util/pipe';\nexport { noop } from './internal/util/noop';\nexport { identity } from './internal/util/identity';\nexport { isObservable } from './internal/util/isObservable';\nexport { ArgumentOutOfRangeError } from './internal/util/ArgumentOutOfRangeError';\nexport { EmptyError } from './internal/util/EmptyError';\nexport { ObjectUnsubscribedError } from './internal/util/ObjectUnsubscribedError';\nexport { UnsubscriptionError } from './internal/util/UnsubscriptionError';\nexport { TimeoutError } from './internal/util/TimeoutError';\nexport { bindCallback } from './internal/observable/bindCallback';\nexport { bindNodeCallback } from './internal/observable/bindNodeCallback';\nexport { combineLatest } from './internal/observable/combineLatest';\nexport { concat } from './internal/observable/concat';\nexport { defer } from './internal/observable/defer';\nexport { empty } from './internal/observable/empty';\nexport { forkJoin } from './internal/observable/forkJoin';\nexport { from } from './internal/observable/from';\nexport { fromEvent } from './internal/observable/fromEvent';\nexport { fromEventPattern } from './internal/observable/fromEventPattern';\nexport { generate } from './internal/observable/generate';\nexport { iif } from './internal/observable/iif';\nexport { interval } from './internal/observable/interval';\nexport { merge } from './internal/observable/merge';\nexport { never } from './internal/observable/never';\nexport { of } from './internal/observable/of';\nexport { onErrorResumeNext } from './internal/observable/onErrorResumeNext';\nexport { pairs } from './internal/observable/pairs';\nexport { partition } from './internal/observable/partition';\nexport { race } from './internal/observable/race';\nexport { range } from './internal/observable/range';\nexport { throwError } from './internal/observable/throwError';\nexport { timer } from './internal/observable/timer';\nexport { using } from './internal/observable/using';\nexport { zip } from './internal/observable/zip';\nexport { scheduled } from './internal/scheduled/scheduled';\nexport { EMPTY } from './internal/observable/empty';\nexport { NEVER } from './internal/observable/never';\nexport { config } from './internal/config';\n//# sourceMappingURL=index.js.map","import { AsyncSubject } from '../AsyncSubject';\nimport { multicast } from './multicast';\nexport function publishLast() {\n    return (source) => multicast(new AsyncSubject())(source);\n}\n//# sourceMappingURL=publishLast.js.map","import { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport const queueScheduler = new QueueScheduler(QueueAction);\nexport const queue = queueScheduler;\n//# sourceMappingURL=queue.js.map","import { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nexport class Subscription {\n    constructor(unsubscribe) {\n        this.closed = false;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (unsubscribe) {\n            this._ctorUnsubscribe = true;\n            this._unsubscribe = unsubscribe;\n        }\n    }\n    unsubscribe() {\n        let errors;\n        if (this.closed) {\n            return;\n        }\n        let { _parentOrParents, _ctorUnsubscribe, _unsubscribe, _subscriptions } = this;\n        this.closed = true;\n        this._parentOrParents = null;\n        this._subscriptions = null;\n        if (_parentOrParents instanceof Subscription) {\n            _parentOrParents.remove(this);\n        }\n        else if (_parentOrParents !== null) {\n            for (let index = 0; index < _parentOrParents.length; ++index) {\n                const parent = _parentOrParents[index];\n                parent.remove(this);\n            }\n        }\n        if (isFunction(_unsubscribe)) {\n            if (_ctorUnsubscribe) {\n                this._unsubscribe = undefined;\n            }\n            try {\n                _unsubscribe.call(this);\n            }\n            catch (e) {\n                errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n            }\n        }\n        if (isArray(_subscriptions)) {\n            let index = -1;\n            let len = _subscriptions.length;\n            while (++index < len) {\n                const sub = _subscriptions[index];\n                if (isObject(sub)) {\n                    try {\n                        sub.unsubscribe();\n                    }\n                    catch (e) {\n                        errors = errors || [];\n                        if (e instanceof UnsubscriptionError) {\n                            errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n                        }\n                        else {\n                            errors.push(e);\n                        }\n                    }\n                }\n            }\n        }\n        if (errors) {\n            throw new UnsubscriptionError(errors);\n        }\n    }\n    add(teardown) {\n        let subscription = teardown;\n        if (!teardown) {\n            return Subscription.EMPTY;\n        }\n        switch (typeof teardown) {\n            case 'function':\n                subscription = new Subscription(teardown);\n            case 'object':\n                if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n                    return subscription;\n                }\n                else if (this.closed) {\n                    subscription.unsubscribe();\n                    return subscription;\n                }\n                else if (!(subscription instanceof Subscription)) {\n                    const tmp = subscription;\n                    subscription = new Subscription();\n                    subscription._subscriptions = [tmp];\n                }\n                break;\n            default: {\n                throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n            }\n        }\n        let { _parentOrParents } = subscription;\n        if (_parentOrParents === null) {\n            subscription._parentOrParents = this;\n        }\n        else if (_parentOrParents instanceof Subscription) {\n            if (_parentOrParents === this) {\n                return subscription;\n            }\n            subscription._parentOrParents = [_parentOrParents, this];\n        }\n        else if (_parentOrParents.indexOf(this) === -1) {\n            _parentOrParents.push(this);\n        }\n        else {\n            return subscription;\n        }\n        const subscriptions = this._subscriptions;\n        if (subscriptions === null) {\n            this._subscriptions = [subscription];\n        }\n        else {\n            subscriptions.push(subscription);\n        }\n        return subscription;\n    }\n    remove(subscription) {\n        const subscriptions = this._subscriptions;\n        if (subscriptions) {\n            const subscriptionIndex = subscriptions.indexOf(subscription);\n            if (subscriptionIndex !== -1) {\n                subscriptions.splice(subscriptionIndex, 1);\n            }\n        }\n    }\n}\nSubscription.EMPTY = (function (empty) {\n    empty.closed = true;\n    return empty;\n}(new Subscription()));\nfunction flattenUnsubscriptionErrors(errors) {\n    return errors.reduce((errs, err) => errs.concat((err instanceof UnsubscriptionError) ? err.errors : err), []);\n}\n//# sourceMappingURL=Subscription.js.map","import { async } from '../scheduler/async';\nimport { map } from './map';\nexport function timestamp(scheduler = async) {\n    return map((value) => new Timestamp(value, scheduler.now()));\n}\nexport class Timestamp {\n    constructor(value, timestamp) {\n        this.value = value;\n        this.timestamp = timestamp;\n    }\n}\n//# sourceMappingURL=timestamp.js.map","import { defer } from './defer';\nimport { EMPTY } from './empty';\nexport function iif(condition, trueResult = EMPTY, falseResult = EMPTY) {\n    return defer(() => condition() ? trueResult : falseResult);\n}\n//# sourceMappingURL=iif.js.map","export default function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * @description\n * Defines an interface that acts as a bridge between the Angular forms API and a\n * native element in the DOM.\n *\n * Implement this interface to create a custom form control directive\n * that integrates with Angular forms.\n *\n * @see DefaultValueAccessor\n *\n * @publicApi\n */\nexport interface ControlValueAccessor {\n  /**\n   * @description\n   * Writes a new value to the element.\n   *\n   * This method is called by the forms API to write to the view when programmatic\n   * changes from model to view are requested.\n   *\n   * @usageNotes\n   * ### Write a value to the element\n   *\n   * The following example writes a value to the native DOM element.\n   *\n   * ```ts\n   * writeValue(value: any): void {\n   *   this._renderer.setProperty(this._elementRef.nativeElement, 'value', value);\n   * }\n   * ```\n   *\n   * @param obj The new value for the element\n   */\n  writeValue(obj: any): void;\n\n  /**\n   * @description\n   * Registers a callback function that is called when the control's value\n   * changes in the UI.\n   *\n   * This method is called by the forms API on initialization to update the form\n   * model when values propagate from the view to the model.\n   *\n   * When implementing the `registerOnChange` method in your own value accessor,\n   * save the given function so your class calls it at the appropriate time.\n   *\n   * @usageNotes\n   * ### Store the change function\n   *\n   * The following example stores the provided function as an internal method.\n   *\n   * ```ts\n   * registerOnChange(fn: (_: any) => void): void {\n   *   this._onChange = fn;\n   * }\n   * ```\n   *\n   * When the value changes in the UI, call the registered\n   * function to allow the forms API to update itself:\n   *\n   * ```ts\n   * host: {\n   *    '(change)': '_onChange($event.target.value)'\n   * }\n   * ```\n   *\n   * @param fn The callback function to register\n   */\n  registerOnChange(fn: any): void;\n\n  /**\n   * @description\n   * Registers a callback function that is called by the forms API on initialization\n   * to update the form model on blur.\n   *\n   * When implementing `registerOnTouched` in your own value accessor, save the given\n   * function so your class calls it when the control should be considered\n   * blurred or \"touched\".\n   *\n   * @usageNotes\n   * ### Store the callback function\n   *\n   * The following example stores the provided function as an internal method.\n   *\n   * ```ts\n   * registerOnTouched(fn: any): void {\n   *   this._onTouched = fn;\n   * }\n   * ```\n   *\n   * On blur (or equivalent), your class should call the registered function to allow\n   * the forms API to update itself:\n   *\n   * ```ts\n   * host: {\n   *    '(blur)': '_onTouched()'\n   * }\n   * ```\n   *\n   * @param fn The callback function to register\n   */\n  registerOnTouched(fn: any): void;\n\n  /**\n   * @description\n   * Function that is called by the forms API when the control status changes to\n   * or from 'DISABLED'. Depending on the status, it enables or disables the\n   * appropriate DOM element.\n   *\n   * @usageNotes\n   * The following is an example of writing the disabled property to a native DOM element:\n   *\n   * ```ts\n   * setDisabledState(isDisabled: boolean): void {\n   *   this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n   * }\n   * ```\n   *\n   * @param isDisabled The disabled status to set on the element\n   */\n  setDisabledState?(isDisabled: boolean): void;\n}\n\n/**\n * Used to provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n * @publicApi\n */\nexport const NG_VALUE_ACCESSOR = new InjectionToken<ControlValueAccessor>('NgValueAccessor');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Renderer2} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const CHECKBOX_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => CheckboxControlValueAccessor),\n  multi: true,\n};\n\n/**\n * @description\n * A `ControlValueAccessor` for writing a value and listening to changes on a checkbox input\n * element.\n *\n * @usageNotes\n *\n * ### Using a checkbox with a reactive form.\n *\n * The following example shows how to use a checkbox with a reactive form.\n *\n * ```ts\n * const rememberLoginControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"checkbox\" [formControl]=\"rememberLoginControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]',\n  host: {'(change)': 'onChange($event.target.checked)', '(blur)': 'onTouched()'},\n  providers: [CHECKBOX_VALUE_ACCESSOR]\n})\nexport class CheckboxControlValueAccessor implements ControlValueAccessor {\n  /**\n   * The registered callback function called when a change event occurs on the input element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"checked\" property on the input element.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (_: any) => {}): void {\n    this.onChange = fn;\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵgetDOM as getDOM} from '@angular/common';\nimport {Directive, ElementRef, forwardRef, Inject, InjectionToken, Optional, Renderer2} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const DEFAULT_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => DefaultValueAccessor),\n  multi: true\n};\n\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid(): boolean {\n  const userAgent = getDOM() ? getDOM().getUserAgent() : '';\n  return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n\n/**\n * @description\n * Provide this token to control if form directives buffer IME input until\n * the \"compositionend\" event occurs.\n * @publicApi\n */\nexport const COMPOSITION_BUFFER_MODE = new InjectionToken<boolean>('CompositionEventMode');\n\n/**\n * @description\n * The default `ControlValueAccessor` for writing a value and listening to changes on input\n * elements. The accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using the default value accessor\n *\n * The following example shows how to use an input element that activates the default value accessor\n * (in this case, a text field).\n *\n * ```ts\n * const firstNameControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"text\" [formControl]=\"firstNameControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]',\n  // TODO: vsavkin replace the above selector with the one below it once\n  // https://github.com/angular/angular/issues/3011 is implemented\n  // selector: '[ngModel],[formControl],[formControlName]',\n  host: {\n    '(input)': '$any(this)._handleInput($event.target.value)',\n    '(blur)': 'onTouched()',\n    '(compositionstart)': '$any(this)._compositionStart()',\n    '(compositionend)': '$any(this)._compositionEnd($event.target.value)'\n  },\n  providers: [DEFAULT_VALUE_ACCESSOR]\n})\nexport class DefaultValueAccessor implements ControlValueAccessor {\n  /**\n   * The registered callback function called when an input event occurs on the input element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  /** Whether the user is creating a composition string (IME events). */\n  private _composing = false;\n\n  constructor(\n      private _renderer: Renderer2, private _elementRef: ElementRef,\n      @Optional() @Inject(COMPOSITION_BUFFER_MODE) private _compositionMode: boolean) {\n    if (this._compositionMode == null) {\n      this._compositionMode = !_isAndroid();\n    }\n  }\n\n  /**\n   * Sets the \"value\" property on the input element.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    const normalizedValue = value == null ? '' : value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (_: any) => void): void {\n    this.onChange = fn;\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _handleInput(value: any): void {\n    if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n      this.onChange(value);\n    }\n  }\n\n  /** @internal */\n  _compositionStart(): void {\n    this._composing = true;\n  }\n\n  /** @internal */\n  _compositionEnd(value: any): void {\n    this._composing = false;\n    this._compositionMode && this.onChange(value);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Observable} from 'rxjs';\nimport {AbstractControl} from '../model';\nimport {ValidationErrors} from './validators';\n\n/**\n * @description\n * Base class for control directives.\n *\n * This class is only used internally in the `ReactiveFormsModule` and the `FormsModule`.\n *\n * @publicApi\n */\nexport abstract class AbstractControlDirective {\n  /**\n   * @description\n   * A reference to the underlying control.\n   *\n   * @returns the control that backs this directive. Most properties fall through to that instance.\n   */\n  abstract get control(): AbstractControl|null;\n\n  /**\n   * @description\n   * Reports the value of the control if it is present, otherwise null.\n   */\n  get value(): any {\n    return this.control ? this.control.value : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is valid. A control is considered valid if no\n   * validation errors exist with the current value.\n   * If the control is not present, null is returned.\n   */\n  get valid(): boolean|null {\n    return this.control ? this.control.valid : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is invalid, meaning that an error exists in the input value.\n   * If the control is not present, null is returned.\n   */\n  get invalid(): boolean|null {\n    return this.control ? this.control.invalid : null;\n  }\n\n  /**\n   * @description\n   * Reports whether a control is pending, meaning that that async validation is occurring and\n   * errors are not yet available for the input value. If the control is not present, null is\n   * returned.\n   */\n  get pending(): boolean|null {\n    return this.control ? this.control.pending : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is disabled, meaning that the control is disabled\n   * in the UI and is exempt from validation checks and excluded from aggregate\n   * values of ancestor controls. If the control is not present, null is returned.\n   */\n  get disabled(): boolean|null {\n    return this.control ? this.control.disabled : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is enabled, meaning that the control is included in ancestor\n   * calculations of validity or value. If the control is not present, null is returned.\n   */\n  get enabled(): boolean|null {\n    return this.control ? this.control.enabled : null;\n  }\n\n  /**\n   * @description\n   * Reports the control's validation errors. If the control is not present, null is returned.\n   */\n  get errors(): ValidationErrors|null {\n    return this.control ? this.control.errors : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is pristine, meaning that the user has not yet changed\n   * the value in the UI. If the control is not present, null is returned.\n   */\n  get pristine(): boolean|null {\n    return this.control ? this.control.pristine : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is dirty, meaning that the user has changed\n   * the value in the UI. If the control is not present, null is returned.\n   */\n  get dirty(): boolean|null {\n    return this.control ? this.control.dirty : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is touched, meaning that the user has triggered\n   * a `blur` event on it. If the control is not present, null is returned.\n   */\n  get touched(): boolean|null {\n    return this.control ? this.control.touched : null;\n  }\n\n  /**\n   * @description\n   * Reports the validation status of the control. Possible values include:\n   * 'VALID', 'INVALID', 'DISABLED', and 'PENDING'.\n   * If the control is not present, null is returned.\n   */\n  get status(): string|null {\n    return this.control ? this.control.status : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control is untouched, meaning that the user has not yet triggered\n   * a `blur` event on it. If the control is not present, null is returned.\n   */\n  get untouched(): boolean|null {\n    return this.control ? this.control.untouched : null;\n  }\n\n  /**\n   * @description\n   * Returns a multicasting observable that emits a validation status whenever it is\n   * calculated for the control. If the control is not present, null is returned.\n   */\n  get statusChanges(): Observable<any>|null {\n    return this.control ? this.control.statusChanges : null;\n  }\n\n  /**\n   * @description\n   * Returns a multicasting observable of value changes for the control that emits every time the\n   * value of the control changes in the UI or programmatically.\n   * If the control is not present, null is returned.\n   */\n  get valueChanges(): Observable<any>|null {\n    return this.control ? this.control.valueChanges : null;\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[]|null {\n    return null;\n  }\n\n  /**\n   * @description\n   * Resets the control with the provided value if the control is present.\n   */\n  reset(value: any = undefined): void {\n    if (this.control) this.control.reset(value);\n  }\n\n  /**\n   * @description\n   * Reports whether the control with the given path has the error specified.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * If no path is given, this method checks for the error on the current control.\n   *\n   * @returns whether the given error is present in the control at the given path.\n   *\n   * If the control is not present, false is returned.\n   */\n  hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n    return this.control ? this.control.hasError(errorCode, path) : false;\n  }\n\n  /**\n   * @description\n   * Reports error data for the control with the given path.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * @returns error data for that particular error. If the control or error is not present,\n   * null is returned.\n   */\n  getError(errorCode: string, path?: Array<string|number>|string): any {\n    return this.control ? this.control.getError(errorCode, path) : null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {Form} from './form_interface';\n\n\n/**\n * @description\n * A base class for directives that contain multiple registered instances of `NgControl`.\n * Only used by the forms module.\n *\n * @publicApi\n */\nexport abstract class ControlContainer extends AbstractControlDirective {\n  /**\n   * @description\n   * The name for the control\n   */\n  // TODO(issue/24571): remove '!'.\n  name!: string|number|null;\n\n  /**\n   * @description\n   * The top-level form directive for the control.\n   */\n  get formDirective(): Form|null {\n    return null;\n  }\n\n  /**\n   * @description\n   * The path to this group.\n   */\n  get path(): string[]|null {\n    return null;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nfunction unimplemented(): any {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    throw new Error('unimplemented');\n  }\n}\n\n/**\n * @description\n * A base class that all `FormControl`-based directives extend. It binds a `FormControl`\n * object to a DOM element.\n *\n * @publicApi\n */\nexport abstract class NgControl extends AbstractControlDirective {\n  /**\n   * @description\n   * The parent form for the control.\n   *\n   * @internal\n   */\n  _parent: ControlContainer|null = null;\n\n  /**\n   * @description\n   * The name for the control\n   */\n  name: string|number|null = null;\n\n  /**\n   * @description\n   * The value accessor for the control\n   */\n  valueAccessor: ControlValueAccessor|null = null;\n\n  /**\n   * @description\n   * The uncomposed array of synchronous validators for the control\n   *\n   * @internal\n   */\n  _rawValidators: Array<Validator|ValidatorFn> = [];\n\n  /**\n   * @description\n   * The uncomposed array of async validators for the control\n   *\n   * @internal\n   */\n  _rawAsyncValidators: Array<AsyncValidator|AsyncValidatorFn> = [];\n\n  /**\n   * @description\n   * The registered synchronous validator function for the control\n   *\n   * @throws An exception that this method is not implemented\n   */\n  get validator(): ValidatorFn|null {\n    return <ValidatorFn>unimplemented();\n  }\n\n  /**\n   * @description\n   * The registered async validator function for the control\n   *\n   * @throws An exception that this method is not implemented\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return <AsyncValidatorFn>unimplemented();\n  }\n\n  /**\n   * @description\n   * The callback method to update the model from the view when requested\n   *\n   * @param newValue The new value for the view\n   */\n  abstract viewToModelUpdate(newValue: any): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, Self} from '@angular/core';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {ControlContainer} from './control_container';\nimport {NgControl} from './ng_control';\n\nexport class AbstractControlStatus {\n  private _cd: AbstractControlDirective;\n\n  constructor(cd: AbstractControlDirective) {\n    this._cd = cd;\n  }\n\n  get ngClassUntouched(): boolean {\n    return this._cd.control ? this._cd.control.untouched : false;\n  }\n  get ngClassTouched(): boolean {\n    return this._cd.control ? this._cd.control.touched : false;\n  }\n  get ngClassPristine(): boolean {\n    return this._cd.control ? this._cd.control.pristine : false;\n  }\n  get ngClassDirty(): boolean {\n    return this._cd.control ? this._cd.control.dirty : false;\n  }\n  get ngClassValid(): boolean {\n    return this._cd.control ? this._cd.control.valid : false;\n  }\n  get ngClassInvalid(): boolean {\n    return this._cd.control ? this._cd.control.invalid : false;\n  }\n  get ngClassPending(): boolean {\n    return this._cd.control ? this._cd.control.pending : false;\n  }\n}\n\nexport const ngControlStatusHost = {\n  '[class.ng-untouched]': 'ngClassUntouched',\n  '[class.ng-touched]': 'ngClassTouched',\n  '[class.ng-pristine]': 'ngClassPristine',\n  '[class.ng-dirty]': 'ngClassDirty',\n  '[class.ng-valid]': 'ngClassValid',\n  '[class.ng-invalid]': 'ngClassInvalid',\n  '[class.ng-pending]': 'ngClassPending',\n};\n\n/**\n * @description\n * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status.\n *\n * @usageNotes\n *\n * ### CSS classes applied\n *\n * The following classes are applied as the properties become true:\n *\n * * ng-valid\n * * ng-invalid\n * * ng-pending\n * * ng-pristine\n * * ng-dirty\n * * ng-untouched\n * * ng-touched\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})\nexport class NgControlStatus extends AbstractControlStatus {\n  constructor(@Self() cd: NgControl) {\n    super(cd);\n  }\n}\n\n/**\n * @description\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc).\n *\n * @see `NgControlStatus`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n  host: ngControlStatusHost\n})\nexport class NgControlStatusGroup extends AbstractControlStatus {\n  constructor(@Self() cd: ControlContainer) {\n    super(cd);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken, ɵisObservable as isObservable, ɵisPromise as isPromise} from '@angular/core';\nimport {forkJoin, from, Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {AsyncValidator, AsyncValidatorFn, ValidationErrors, Validator, ValidatorFn} from './directives/validators';\nimport {AbstractControl} from './model';\n\nfunction isEmptyInputValue(value: any): boolean {\n  // we don't check for string here so it also works with arrays\n  return value == null || value.length === 0;\n}\n\nfunction hasValidLength(value: any): boolean {\n  // non-strict comparison is intentional, to check for both `null` and `undefined` values\n  return value != null && typeof value.length === 'number';\n}\n\n/**\n * @description\n * An `InjectionToken` for registering additional synchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_ASYNC_VALIDATORS`\n *\n * @usageNotes\n *\n * ### Providing a custom validator\n *\n * The following example registers a custom validator directive. Adding the validator to the\n * existing collection of validators requires the `multi: true` option.\n *\n * ```typescript\n * @Directive({\n *   selector: '[customValidator]',\n *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n *   validate(control: AbstractControl): ValidationErrors | null {\n *     return { 'custom': true };\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport const NG_VALIDATORS = new InjectionToken<Array<Validator|Function>>('NgValidators');\n\n/**\n * @description\n * An `InjectionToken` for registering additional asynchronous validators used with\n * `AbstractControl`s.\n *\n * @see `NG_VALIDATORS`\n *\n * @publicApi\n */\nexport const NG_ASYNC_VALIDATORS =\n    new InjectionToken<Array<Validator|Function>>('NgAsyncValidators');\n\n/**\n * A regular expression that matches valid e-mail addresses.\n *\n * At a high level, this regexp matches e-mail addresses of the format `local-part@tld`, where:\n * - `local-part` consists of one or more of the allowed characters (alphanumeric and some\n *   punctuation symbols).\n * - `local-part` cannot begin or end with a period (`.`).\n * - `local-part` cannot be longer than 64 characters.\n * - `tld` consists of one or more `labels` separated by periods (`.`). For example `localhost` or\n *   `foo.com`.\n * - A `label` consists of one or more of the allowed characters (alphanumeric, dashes (`-`) and\n *   periods (`.`)).\n * - A `label` cannot begin or end with a dash (`-`) or a period (`.`).\n * - A `label` cannot be longer than 63 characters.\n * - The whole address cannot be longer than 254 characters.\n *\n * ## Implementation background\n *\n * This regexp was ported over from AngularJS (see there for git history):\n * https://github.com/angular/angular.js/blob/c133ef836/src/ng/directive/input.js#L27\n * It is based on the\n * [WHATWG version](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n * lengths of different parts of the address). The main differences from the WHATWG version are:\n *   - Disallow `local-part` to begin or end with a period (`.`).\n *   - Disallow `local-part` length to exceed 64 characters.\n *   - Disallow total address length to exceed 254 characters.\n *\n * See [this commit](https://github.com/angular/angular.js/commit/f3f5cf72e) for more details.\n */\nconst EMAIL_REGEXP =\n    /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\n/**\n * @description\n * Provides a set of built-in validators that can be used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns an error map or null. A null map means that validation has passed.\n *\n * @see [Form Validation](/guide/form-validation)\n *\n * @publicApi\n */\nexport class Validators {\n  /**\n   * @description\n   * Validator that requires the control's value to be greater than or equal to the provided number.\n   * The validator exists only as a function and not as a directive.\n   *\n   * @usageNotes\n   *\n   * ### Validate against a minimum of 3\n   *\n   * ```typescript\n   * const control = new FormControl(2, Validators.min(3));\n   *\n   * console.log(control.errors); // {min: {min: 3, actual: 2}}\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `min` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static min(min: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value = parseFloat(control.value);\n      // Controls with NaN values after parsing should be treated as not having a\n      // minimum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-min\n      return !isNaN(value) && value < min ? {'min': {'min': min, 'actual': control.value}} : null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value to be less than or equal to the provided number.\n   * The validator exists only as a function and not as a directive.\n   *\n   * @usageNotes\n   *\n   * ### Validate against a maximum of 15\n   *\n   * ```typescript\n   * const control = new FormControl(16, Validators.max(15));\n   *\n   * console.log(control.errors); // {max: {max: 15, actual: 16}}\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `max` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static max(max: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value = parseFloat(control.value);\n      // Controls with NaN values after parsing should be treated as not having a\n      // maximum, per the HTML forms spec: https://www.w3.org/TR/html5/forms.html#attr-input-max\n      return !isNaN(value) && value > max ? {'max': {'max': max, 'actual': control.value}} : null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control have a non-empty value.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field is non-empty\n   *\n   * ```typescript\n   * const control = new FormControl('', Validators.required);\n   *\n   * console.log(control.errors); // {required: true}\n   * ```\n   *\n   * @returns An error map with the `required` property\n   * if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static required(control: AbstractControl): ValidationErrors|null {\n    return isEmptyInputValue(control.value) ? {'required': true} : null;\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value be true. This validator is commonly\n   * used for required checkboxes.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field value is true\n   *\n   * ```typescript\n   * const control = new FormControl('', Validators.requiredTrue);\n   *\n   * console.log(control.errors); // {required: true}\n   * ```\n   *\n   * @returns An error map that contains the `required` property\n   * set to `true` if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static requiredTrue(control: AbstractControl): ValidationErrors|null {\n    return control.value === true ? null : {'required': true};\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value pass an email validation test.\n   *\n   * Tests the value using a [regular\n   * expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)\n   * pattern suitable for common usecases. The pattern is based on the definition of a valid email\n   * address in the [WHATWG HTML\n   * specification](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) with\n   * some enhancements to incorporate more RFC rules (such as rules related to domain names and the\n   * lengths of different parts of the address).\n   *\n   * The differences from the WHATWG version include:\n   * - Disallow `local-part` (the part before the `@` symbol) to begin or end with a period (`.`).\n   * - Disallow `local-part` to be longer than 64 characters.\n   * - Disallow the whole address to be longer than 254 characters.\n   *\n   * If this pattern does not satisfy your business needs, you can use `Validators.pattern()` to\n   * validate the value against a different pattern.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field matches a valid email pattern\n   *\n   * ```typescript\n   * const control = new FormControl('bad@', Validators.email);\n   *\n   * console.log(control.errors); // {email: true}\n   * ```\n   *\n   * @returns An error map with the `email` property\n   * if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static email(control: AbstractControl): ValidationErrors|null {\n    if (isEmptyInputValue(control.value)) {\n      return null;  // don't validate empty values to allow optional controls\n    }\n    return EMAIL_REGEXP.test(control.value) ? null : {'email': true};\n  }\n\n  /**\n   * @description\n   * Validator that requires the length of the control's value to be greater than or equal\n   * to the provided minimum length. This validator is also provided by default if you use the\n   * the HTML5 `minlength` attribute. Note that the `minLength` validator is intended to be used\n   * only for types that have a numeric `length` property, such as strings or arrays. The\n   * `minLength` validator logic is also not invoked for values when their `length` property is 0\n   * (for example in case of an empty string or an empty array), to support optional controls. You\n   * can use the standard `required` validator if empty values should not be considered valid.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field has a minimum of 3 characters\n   *\n   * ```typescript\n   * const control = new FormControl('ng', Validators.minLength(3));\n   *\n   * console.log(control.errors); // {minlength: {requiredLength: 3, actualLength: 2}}\n   * ```\n   *\n   * ```html\n   * <input minlength=\"5\">\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `minlength` if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static minLength(minLength: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (isEmptyInputValue(control.value) || !hasValidLength(control.value)) {\n        // don't validate empty values to allow optional controls\n        // don't validate values without `length` property\n        return null;\n      }\n\n      return control.value.length < minLength ?\n          {'minlength': {'requiredLength': minLength, 'actualLength': control.value.length}} :\n          null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the length of the control's value to be less than or equal\n   * to the provided maximum length. This validator is also provided by default if you use the\n   * the HTML5 `maxlength` attribute. Note that the `maxLength` validator is intended to be used\n   * only for types that have a numeric `length` property, such as strings or arrays.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field has maximum of 5 characters\n   *\n   * ```typescript\n   * const control = new FormControl('Angular', Validators.maxLength(5));\n   *\n   * console.log(control.errors); // {maxlength: {requiredLength: 5, actualLength: 7}}\n   * ```\n   *\n   * ```html\n   * <input maxlength=\"5\">\n   * ```\n   *\n   * @returns A validator function that returns an error map with the\n   * `maxlength` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static maxLength(maxLength: number): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors|null => {\n      return hasValidLength(control.value) && control.value.length > maxLength ?\n          {'maxlength': {'requiredLength': maxLength, 'actualLength': control.value.length}} :\n          null;\n    };\n  }\n\n  /**\n   * @description\n   * Validator that requires the control's value to match a regex pattern. This validator is also\n   * provided by default if you use the HTML5 `pattern` attribute.\n   *\n   * @usageNotes\n   *\n   * ### Validate that the field only contains letters or spaces\n   *\n   * ```typescript\n   * const control = new FormControl('1', Validators.pattern('[a-zA-Z ]*'));\n   *\n   * console.log(control.errors); // {pattern: {requiredPattern: '^[a-zA-Z ]*$', actualValue: '1'}}\n   * ```\n   *\n   * ```html\n   * <input pattern=\"[a-zA-Z ]*\">\n   * ```\n   *\n   * @param pattern A regular expression to be used as is to test the values, or a string.\n   * If a string is passed, the `^` character is prepended and the `$` character is\n   * appended to the provided string (if not already present), and the resulting regular\n   * expression is used to test the values.\n   *\n   * @returns A validator function that returns an error map with the\n   * `pattern` property if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static pattern(pattern: string|RegExp): ValidatorFn {\n    if (!pattern) return Validators.nullValidator;\n    let regex: RegExp;\n    let regexStr: string;\n    if (typeof pattern === 'string') {\n      regexStr = '';\n\n      if (pattern.charAt(0) !== '^') regexStr += '^';\n\n      regexStr += pattern;\n\n      if (pattern.charAt(pattern.length - 1) !== '$') regexStr += '$';\n\n      regex = new RegExp(regexStr);\n    } else {\n      regexStr = pattern.toString();\n      regex = pattern;\n    }\n    return (control: AbstractControl): ValidationErrors|null => {\n      if (isEmptyInputValue(control.value)) {\n        return null;  // don't validate empty values to allow optional controls\n      }\n      const value: string = control.value;\n      return regex.test(value) ? null :\n                                 {'pattern': {'requiredPattern': regexStr, 'actualValue': value}};\n    };\n  }\n\n  /**\n   * @description\n   * Validator that performs no operation.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static nullValidator(control: AbstractControl): ValidationErrors|null {\n    return null;\n  }\n\n  /**\n   * @description\n   * Compose multiple validators into a single function that returns the union\n   * of the individual error maps for the provided control.\n   *\n   * @returns A validator function that returns an error map with the\n   * merged error maps of the validators if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static compose(validators: null): null;\n  static compose(validators: (ValidatorFn|null|undefined)[]): ValidatorFn|null;\n  static compose(validators: (ValidatorFn|null|undefined)[]|null): ValidatorFn|null {\n    if (!validators) return null;\n    const presentValidators: ValidatorFn[] = validators.filter(isPresent) as any;\n    if (presentValidators.length == 0) return null;\n\n    return function(control: AbstractControl) {\n      return mergeErrors(executeValidators<ValidatorFn>(control, presentValidators));\n    };\n  }\n\n  /**\n   * @description\n   * Compose multiple async validators into a single function that returns the union\n   * of the individual error objects for the provided control.\n   *\n   * @returns A validator function that returns an error map with the\n   * merged error objects of the async validators if the validation check fails, otherwise `null`.\n   *\n   * @see `updateValueAndValidity()`\n   *\n   */\n  static composeAsync(validators: (AsyncValidatorFn|null)[]): AsyncValidatorFn|null {\n    if (!validators) return null;\n    const presentValidators: AsyncValidatorFn[] = validators.filter(isPresent) as any;\n    if (presentValidators.length == 0) return null;\n\n    return function(control: AbstractControl) {\n      const observables =\n          executeValidators<AsyncValidatorFn>(control, presentValidators).map(toObservable);\n      return forkJoin(observables).pipe(map(mergeErrors));\n    };\n  }\n}\n\nfunction isPresent(o: any): boolean {\n  return o != null;\n}\n\nexport function toObservable(r: any): Observable<any> {\n  const obs = isPromise(r) ? from(r) : r;\n  if (!(isObservable(obs)) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n    throw new Error(`Expected validator to return Promise or Observable.`);\n  }\n  return obs;\n}\n\nfunction mergeErrors(arrayOfErrors: (ValidationErrors|null)[]): ValidationErrors|null {\n  let res: {[key: string]: any} = {};\n\n  // Not using Array.reduce here due to a Chrome 80 bug\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n  arrayOfErrors.forEach((errors: ValidationErrors|null) => {\n    res = errors != null ? {...res!, ...errors} : res!;\n  });\n\n  return Object.keys(res).length === 0 ? null : res;\n}\n\ntype GenericValidatorFn = (control: AbstractControl) => any;\n\nfunction executeValidators<V extends GenericValidatorFn>(\n    control: AbstractControl, validators: V[]): ReturnType<V>[] {\n  return validators.map(validator => validator(control));\n}\n\nfunction isValidatorFn<V>(validator: V|Validator|AsyncValidator): validator is V {\n  return !(validator as Validator).validate;\n}\n\n/**\n * Given the list of validators that may contain both functions as well as classes, return the list\n * of validator functions (convert validator classes into validator functions). This is needed to\n * have consistent structure in validators list before composing them.\n *\n * @param validators The set of validators that may contain validators both in plain function form\n *     as well as represented as a validator class.\n */\nexport function normalizeValidators<V>(validators: (V|Validator|AsyncValidator)[]): V[] {\n  return validators.map(validator => {\n    return isValidatorFn<V>(validator) ?\n        validator :\n        ((c: AbstractControl) => validator.validate(c)) as unknown as V;\n  });\n}","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Renderer2} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const NUMBER_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => NumberValueAccessor),\n  multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a number value and listening to number input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a number input with a reactive form.\n *\n * The following example shows how to use a number input with a reactive form.\n *\n * ```ts\n * const totalCountControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"number\" [formControl]=\"totalCountControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n  host: {'(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},\n  providers: [NUMBER_VALUE_ACCESSOR]\n})\nexport class NumberValueAccessor implements ControlValueAccessor {\n  /**\n   * The registered callback function called when a change or input event occurs on the input\n   * element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element.\n   * @nodoc\n   */\n  writeValue(value: number): void {\n    // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n    const normalizedValue = value == null ? '' : value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (_: number|null) => void): void {\n    this.onChange = (value) => {\n      fn(value == '' ? null : parseFloat(value));\n    };\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Injectable, Injector, Input, OnDestroy, OnInit, Renderer2} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\n\nexport const RADIO_VALUE_ACCESSOR: any = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => RadioControlValueAccessor),\n  multi: true\n};\n\nfunction throwNameError() {\n  throw new Error(`\n      If you define both a name and a formControlName attribute on your radio button, their values\n      must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n    `);\n}\n\n/**\n * @description\n * Class used by Angular to track radio buttons. For internal use only.\n */\n@Injectable()\nexport class RadioControlRegistry {\n  private _accessors: any[] = [];\n\n  /**\n   * @description\n   * Adds a control to the internal registry. For internal use only.\n   */\n  add(control: NgControl, accessor: RadioControlValueAccessor) {\n    this._accessors.push([control, accessor]);\n  }\n\n  /**\n   * @description\n   * Removes a control from the internal registry. For internal use only.\n   */\n  remove(accessor: RadioControlValueAccessor) {\n    for (let i = this._accessors.length - 1; i >= 0; --i) {\n      if (this._accessors[i][1] === accessor) {\n        this._accessors.splice(i, 1);\n        return;\n      }\n    }\n  }\n\n  /**\n   * @description\n   * Selects a radio button. For internal use only.\n   */\n  select(accessor: RadioControlValueAccessor) {\n    this._accessors.forEach((c) => {\n      if (this._isSameGroup(c, accessor) && c[1] !== accessor) {\n        c[1].fireUncheck(accessor.value);\n      }\n    });\n  }\n\n  private _isSameGroup(\n      controlPair: [NgControl, RadioControlValueAccessor],\n      accessor: RadioControlValueAccessor): boolean {\n    if (!controlPair[0].control) return false;\n    return controlPair[0]._parent === accessor._control._parent &&\n        controlPair[1].name === accessor.name;\n  }\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing radio control values and listening to radio control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using radio buttons with reactive form directives\n *\n * The follow example shows how to use radio buttons in a reactive form. When using radio buttons in\n * a reactive form, radio buttons in the same group should have the same `formControlName`.\n * Providing a `name` attribute is optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n  host: {'(change)': 'onChange()', '(blur)': 'onTouched()'},\n  providers: [RADIO_VALUE_ACCESSOR]\n})\nexport class RadioControlValueAccessor implements ControlValueAccessor, OnDestroy, OnInit {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _state!: boolean;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _control!: NgControl;\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _fn!: Function;\n\n  /**\n   * The registered callback function called when a change event occurs on the input element.\n   * @nodoc\n   */\n  onChange = () => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the name of the radio input element.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() name!: string;\n\n  /**\n   * @description\n   * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() formControlName!: string;\n\n  /**\n   * @description\n   * Tracks the value of the radio input element\n   */\n  @Input() value: any;\n\n  constructor(\n      private _renderer: Renderer2, private _elementRef: ElementRef,\n      private _registry: RadioControlRegistry, private _injector: Injector) {}\n\n  /** @nodoc */\n  ngOnInit(): void {\n    this._control = this._injector.get(NgControl);\n    this._checkName();\n    this._registry.add(this._control, this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this._registry.remove(this);\n  }\n\n  /**\n   * Sets the \"checked\" property value on the radio input element.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    this._state = value === this.value;\n    this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (_: any) => {}): void {\n    this._fn = fn;\n    this.onChange = () => {\n      fn(this.value);\n      this._registry.select(this);\n    };\n  }\n\n  /**\n   * Sets the \"value\" on the radio input element and unchecks it.\n   *\n   * @param value\n   */\n  fireUncheck(value: any): void {\n    this.writeValue(value);\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => {}): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  private _checkName(): void {\n    if (this.name && this.formControlName && this.name !== this.formControlName &&\n        (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throwNameError();\n    }\n    if (!this.name && this.formControlName) this.name = this.formControlName;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Renderer2, StaticProvider} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const RANGE_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => RangeValueAccessor),\n  multi: true\n};\n\n/**\n * @description\n * The `ControlValueAccessor` for writing a range value and listening to range input changes.\n * The value accessor is used by the `FormControlDirective`, `FormControlName`, and  `NgModel`\n * directives.\n *\n * @usageNotes\n *\n * ### Using a range input with a reactive form\n *\n * The following example shows how to use a range input with a reactive form.\n *\n * ```ts\n * const ageControl = new FormControl();\n * ```\n *\n * ```\n * <input type=\"range\" [formControl]=\"ageControl\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]',\n  host: {\n    '(change)': 'onChange($event.target.value)',\n    '(input)': 'onChange($event.target.value)',\n    '(blur)': 'onTouched()'\n  },\n  providers: [RANGE_VALUE_ACCESSOR]\n})\nexport class RangeValueAccessor implements ControlValueAccessor {\n  /**\n   * The registered callback function called when a change or input event occurs on the input\n   * element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (_: number|null) => void): void {\n    this.onChange = (value) => {\n      fn(value == '' ? null : parseFloat(value));\n    };\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the range input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport const FormErrorExamples = {\n  formControlName: `\n    <div [formGroup]=\"myGroup\">\n      <input formControlName=\"firstName\">\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       firstName: new FormControl()\n    });`,\n\n  formGroupName: `\n    <div [formGroup]=\"myGroup\">\n       <div formGroupName=\"person\">\n          <input formControlName=\"firstName\">\n       </div>\n    </div>\n\n    In your class:\n\n    this.myGroup = new FormGroup({\n       person: new FormGroup({ firstName: new FormControl() })\n    });`,\n\n  formArrayName: `\n    <div [formGroup]=\"myGroup\">\n      <div formArrayName=\"cities\">\n        <div *ngFor=\"let city of cityArray.controls; index as i\">\n          <input [formControlName]=\"i\">\n        </div>\n      </div>\n    </div>\n\n    In your class:\n\n    this.cityArray = new FormArray([new FormControl('SF')]);\n    this.myGroup = new FormGroup({\n      cities: this.cityArray\n    });`,\n\n  ngModelGroup: `\n    <form>\n       <div ngModelGroup=\"person\">\n          <input [(ngModel)]=\"person.name\" name=\"firstName\">\n       </div>\n    </form>`,\n\n  ngModelWithFormGroup: `\n    <div [formGroup]=\"myGroup\">\n       <input formControlName=\"firstName\">\n       <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n    </div>\n  `\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class ReactiveErrors {\n  static controlParentException(): void {\n    throw new Error(\n        `formControlName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ${Examples.formControlName}`);\n  }\n\n  static ngModelGroupException(): void {\n    throw new Error(\n        `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n       that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n       Option 1:  Update the parent to be formGroupName (reactive form strategy)\n\n        ${Examples.formGroupName}\n\n        Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n        ${Examples.ngModelGroup}`);\n  }\n\n  static missingFormException(): void {\n    throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n       Example:\n\n       ${Examples.formControlName}`);\n  }\n\n  static groupParentException(): void {\n    throw new Error(\n        `formGroupName must be used with a parent formGroup directive.  You'll want to add a formGroup\n      directive and pass it an existing FormGroup instance (you can create one in your class).\n\n      Example:\n\n      ${Examples.formGroupName}`);\n  }\n\n  static arrayParentException(): void {\n    throw new Error(\n        `formArrayName must be used with a parent formGroup directive.  You'll want to add a formGroup\n       directive and pass it an existing FormGroup instance (you can create one in your class).\n\n        Example:\n\n        ${Examples.formArrayName}`);\n  }\n\n  static disabledAttrWarning(): void {\n    console.warn(`\n      It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n      when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n      you. We recommend using this approach to avoid 'changed after checked' errors.\n\n      Example:\n      form = new FormGroup({\n        first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n        last: new FormControl('Drew', Validators.required)\n      });\n    `);\n  }\n\n  static ngModelWarning(directiveName: string): void {\n    console.warn(`\n    It looks like you're using ngModel on the same form field as ${directiveName}.\n    Support for using the ngModel input property and ngModelChange event with\n    reactive form directives has been deprecated in Angular v6 and will be removed\n    in a future version of Angular.\n\n    For more information on this, see our API docs here:\n    https://angular.io/api/forms/${\n        directiveName === 'formControl' ? 'FormControlDirective' :\n                                          'FormControlName'}#use-with-ngmodel\n    `);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => SelectControlValueAccessor),\n  multi: true\n};\n\nfunction _buildValueString(id: string|null, value: any): string {\n  if (id == null) return `${value}`;\n  if (value && typeof value === 'object') value = 'Object';\n  return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n  return valueString.split(':')[0];\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing select control values and listening to select control\n * changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @usageNotes\n *\n * ### Using select controls in a reactive form\n *\n * The following examples show how to use a select control in a reactive form.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Using select controls in a template-driven form\n *\n * To use a select in a template-driven form, simply add an `ngModel` and a `name`\n * attribute to the main `<select>` tag.\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * ### Customizing option selection\n *\n * Angular uses object identity to select option. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects option by the return value of the function.\n *\n * ```ts\n * const selectedCountriesControl = new FormControl();\n * ```\n *\n * ```\n * <select [compareWith]=\"compareFn\"  [formControl]=\"selectedCountriesControl\">\n *     <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *         {{country.name}}\n *     </option>\n * </select>\n *\n * compareFn(c1: Country, c2: Country): boolean {\n *     return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n *\n * **Note:** We listen to the 'change' event because 'input' events aren't fired\n * for selects in Firefox and IE:\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350\n * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]',\n  host: {'(change)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},\n  providers: [SELECT_VALUE_ACCESSOR]\n})\nexport class SelectControlValueAccessor implements ControlValueAccessor {\n  /** @nodoc */\n  value: any;\n\n  /** @internal */\n  _optionMap: Map<string, any> = new Map<string, any>();\n\n  /** @internal */\n  _idCounter: number = 0;\n\n  /**\n   * The registered callback function called when a change event occurs on the input element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the option comparison algorithm for tracking identities when\n   * checking for changes.\n   */\n  @Input()\n  set compareWith(fn: (o1: any, o2: any) => boolean) {\n    if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n    }\n    this._compareWith = fn;\n  }\n\n  private _compareWith: (o1: any, o2: any) => boolean = Object.is;\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on the input element. The \"selectedIndex\"\n   * property is also set if an ID is provided on the option element.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    this.value = value;\n    const id: string|null = this._getOptionId(value);\n    if (id == null) {\n      this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);\n    }\n    const valueString = _buildValueString(id, value);\n    this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);\n  }\n\n  /**\n   * Registers a function called when the control value changes.\n   * @nodoc\n   */\n  registerOnChange(fn: (value: any) => any): void {\n    this.onChange = (valueString: string) => {\n      this.value = this._getOptionValue(valueString);\n      fn(this.value);\n    };\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => any): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the select input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _registerOption(): string {\n    return (this._idCounter++).toString();\n  }\n\n  /** @internal */\n  _getOptionId(value: any): string|null {\n    for (const id of Array.from(this._optionMap.keys())) {\n      if (this._compareWith(this._optionMap.get(id), value)) return id;\n    }\n    return null;\n  }\n\n  /** @internal */\n  _getOptionValue(valueString: string): any {\n    const id: string = _extractId(valueString);\n    return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n  }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class NgSelectOption implements OnDestroy {\n  /**\n   * @description\n   * ID of the option element\n   */\n  // TODO(issue/24571): remove '!'.\n  id!: string;\n\n  constructor(\n      private _element: ElementRef, private _renderer: Renderer2,\n      @Optional() @Host() private _select: SelectControlValueAccessor) {\n    if (this._select) this.id = this._select._registerOption();\n  }\n\n  /**\n   * @description\n   * Tracks the value bound to the option element. Unlike the value binding,\n   * ngValue supports binding to objects.\n   */\n  @Input('ngValue')\n  set ngValue(value: any) {\n    if (this._select == null) return;\n    this._select._optionMap.set(this.id, value);\n    this._setElementValue(_buildValueString(this.id, value));\n    this._select.writeValue(this._select.value);\n  }\n\n  /**\n   * @description\n   * Tracks simple string values bound to the option element.\n   * For objects, use the `ngValue` input binding.\n   */\n  @Input('value')\n  set value(value: any) {\n    this._setElementValue(value);\n    if (this._select) this._select.writeValue(this._select.value);\n  }\n\n  /** @internal */\n  _setElementValue(value: string): void {\n    this._renderer.setProperty(this._element.nativeElement, 'value', value);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this._select) {\n      this._select._optionMap.delete(this.id);\n      this._select.writeValue(this._select.value);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef, forwardRef, Host, Input, OnDestroy, Optional, Renderer2, StaticProvider} from '@angular/core';\n\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const SELECT_MULTIPLE_VALUE_ACCESSOR: StaticProvider = {\n  provide: NG_VALUE_ACCESSOR,\n  useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n  multi: true\n};\n\nfunction _buildValueString(id: string, value: any): string {\n  if (id == null) return `${value}`;\n  if (typeof value === 'string') value = `'${value}'`;\n  if (value && typeof value === 'object') value = 'Object';\n  return `${id}: ${value}`.slice(0, 50);\n}\n\nfunction _extractId(valueString: string): string {\n  return valueString.split(':')[0];\n}\n\n/** Mock interface for HTML Options */\ninterface HTMLOption {\n  value: string;\n  selected: boolean;\n}\n\n/** Mock interface for HTMLCollection */\nabstract class HTMLCollection {\n  // TODO(issue/24571): remove '!'.\n  length!: number;\n  abstract item(_: number): HTMLOption;\n}\n\n/**\n * @description\n * The `ControlValueAccessor` for writing multi-select control values and listening to multi-select\n * control changes. The value accessor is used by the `FormControlDirective`, `FormControlName`, and\n * `NgModel` directives.\n *\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using a multi-select control\n *\n * The follow example shows you how to use a multi-select control with a reactive form.\n *\n * ```ts\n * const countryControl = new FormControl();\n * ```\n *\n * ```\n * <select multiple name=\"countries\" [formControl]=\"countryControl\">\n *   <option *ngFor=\"let country of countries\" [ngValue]=\"country\">\n *     {{ country.name }}\n *   </option>\n * </select>\n * ```\n *\n * ### Customizing option selection\n *\n * To customize the default option comparison algorithm, `<select>` supports `compareWith` input.\n * See the `SelectControlValueAccessor` for usage.\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n  host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'},\n  providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n})\nexport class SelectMultipleControlValueAccessor implements ControlValueAccessor {\n  /**\n   * The current value.\n   * @nodoc\n   */\n  value: any;\n\n  /** @internal */\n  _optionMap: Map<string, ɵNgSelectMultipleOption> = new Map<string, ɵNgSelectMultipleOption>();\n\n  /** @internal */\n  _idCounter: number = 0;\n\n  /**\n   * The registered callback function called when a change event occurs on the input element.\n   * @nodoc\n   */\n  onChange = (_: any) => {};\n\n  /**\n   * The registered callback function called when a blur event occurs on the input element.\n   * @nodoc\n   */\n  onTouched = () => {};\n\n  /**\n   * @description\n   * Tracks the option comparison algorithm for tracking identities when\n   * checking for changes.\n   */\n  @Input()\n  set compareWith(fn: (o1: any, o2: any) => boolean) {\n    if (typeof fn !== 'function' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n    }\n    this._compareWith = fn;\n  }\n\n  private _compareWith: (o1: any, o2: any) => boolean = Object.is;\n\n  constructor(private _renderer: Renderer2, private _elementRef: ElementRef) {}\n\n  /**\n   * Sets the \"value\" property on one or of more of the select's options.\n   * @nodoc\n   */\n  writeValue(value: any): void {\n    this.value = value;\n    let optionSelectedStateSetter: (opt: ɵNgSelectMultipleOption, o: any) => void;\n    if (Array.isArray(value)) {\n      // convert values to ids\n      const ids = value.map((v) => this._getOptionId(v));\n      optionSelectedStateSetter = (opt, o) => {\n        opt._setSelected(ids.indexOf(o.toString()) > -1);\n      };\n    } else {\n      optionSelectedStateSetter = (opt, o) => {\n        opt._setSelected(false);\n      };\n    }\n    this._optionMap.forEach(optionSelectedStateSetter);\n  }\n\n  /**\n   * Registers a function called when the control value changes\n   * and writes an array of the selected options.\n   * @nodoc\n   */\n  registerOnChange(fn: (value: any) => any): void {\n    this.onChange = (_: any) => {\n      const selected: Array<any> = [];\n      if (_.selectedOptions !== undefined) {\n        const options: HTMLCollection = _.selectedOptions;\n        for (let i = 0; i < options.length; i++) {\n          const opt: any = options.item(i);\n          const val: any = this._getOptionValue(opt.value);\n          selected.push(val);\n        }\n      }\n      // Degrade on IE\n      else {\n        const options: HTMLCollection = <HTMLCollection>_.options;\n        for (let i = 0; i < options.length; i++) {\n          const opt: HTMLOption = options.item(i);\n          if (opt.selected) {\n            const val: any = this._getOptionValue(opt.value);\n            selected.push(val);\n          }\n        }\n      }\n      this.value = selected;\n      fn(selected);\n    };\n  }\n\n  /**\n   * Registers a function called when the control is touched.\n   * @nodoc\n   */\n  registerOnTouched(fn: () => any): void {\n    this.onTouched = fn;\n  }\n\n  /**\n   * Sets the \"disabled\" property on the select input element.\n   * @nodoc\n   */\n  setDisabledState(isDisabled: boolean): void {\n    this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n  }\n\n  /** @internal */\n  _registerOption(value: ɵNgSelectMultipleOption): string {\n    const id: string = (this._idCounter++).toString();\n    this._optionMap.set(id, value);\n    return id;\n  }\n\n  /** @internal */\n  _getOptionId(value: any): string|null {\n    for (const id of Array.from(this._optionMap.keys())) {\n      if (this._compareWith(this._optionMap.get(id)!._value, value)) return id;\n    }\n    return null;\n  }\n\n  /** @internal */\n  _getOptionValue(valueString: string): any {\n    const id: string = _extractId(valueString);\n    return this._optionMap.has(id) ? this._optionMap.get(id)!._value : valueString;\n  }\n}\n\n/**\n * @description\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * @see `SelectMultipleControlValueAccessor`\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: 'option'})\nexport class ɵNgSelectMultipleOption implements OnDestroy {\n  // TODO(issue/24571): remove '!'.\n  id!: string;\n  /** @internal */\n  _value: any;\n\n  constructor(\n      private _element: ElementRef, private _renderer: Renderer2,\n      @Optional() @Host() private _select: SelectMultipleControlValueAccessor) {\n    if (this._select) {\n      this.id = this._select._registerOption(this);\n    }\n  }\n\n  /**\n   * @description\n   * Tracks the value bound to the option element. Unlike the value binding,\n   * ngValue supports binding to objects.\n   */\n  @Input('ngValue')\n  set ngValue(value: any) {\n    if (this._select == null) return;\n    this._value = value;\n    this._setElementValue(_buildValueString(this.id, value));\n    this._select.writeValue(this._select.value);\n  }\n\n  /**\n   * @description\n   * Tracks simple string values bound to the option element.\n   * For objects, use the `ngValue` input binding.\n   */\n  @Input('value')\n  set value(value: any) {\n    if (this._select) {\n      this._value = value;\n      this._setElementValue(_buildValueString(this.id, value));\n      this._select.writeValue(this._select.value);\n    } else {\n      this._setElementValue(value);\n    }\n  }\n\n  /** @internal */\n  _setElementValue(value: string): void {\n    this._renderer.setProperty(this._element.nativeElement, 'value', value);\n  }\n\n  /** @internal */\n  _setSelected(selected: boolean) {\n    this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this._select) {\n      this._select._optionMap.delete(this.id);\n      this._select.writeValue(this._select.value);\n    }\n  }\n}\n\nexport {ɵNgSelectMultipleOption as NgSelectMultipleOption};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {isDevMode} from '@angular/core';\n\nimport {FormArray, FormControl, FormGroup} from '../model';\nimport {normalizeValidators, Validators} from '../validators';\n\nimport {AbstractControlDirective} from './abstract_control_directive';\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {CheckboxControlValueAccessor} from './checkbox_value_accessor';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor} from './control_value_accessor';\nimport {DefaultValueAccessor} from './default_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NumberValueAccessor} from './number_value_accessor';\nimport {RadioControlValueAccessor} from './radio_control_value_accessor';\nimport {RangeValueAccessor} from './range_value_accessor';\nimport {FormArrayName} from './reactive_directives/form_group_name';\nimport {ReactiveErrors} from './reactive_errors';\nimport {SelectControlValueAccessor} from './select_control_value_accessor';\nimport {SelectMultipleControlValueAccessor} from './select_multiple_control_value_accessor';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\n\nexport function controlPath(name: string|null, parent: ControlContainer): string[] {\n  return [...parent.path!, name!];\n}\n\nexport function setUpControl(control: FormControl, dir: NgControl): void {\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    if (!control) _throwError(dir, 'Cannot find control with');\n    if (!dir.valueAccessor) _throwError(dir, 'No value accessor for form control with');\n  }\n\n  control.validator = Validators.compose([control.validator!, dir.validator]);\n  control.asyncValidator = Validators.composeAsync([control.asyncValidator!, dir.asyncValidator]);\n  dir.valueAccessor!.writeValue(control.value);\n\n  setUpViewChangePipeline(control, dir);\n  setUpModelChangePipeline(control, dir);\n\n  setUpBlurPipeline(control, dir);\n\n  if (dir.valueAccessor!.setDisabledState) {\n    control.registerOnDisabledChange((isDisabled: boolean) => {\n      dir.valueAccessor!.setDisabledState!(isDisabled);\n    });\n  }\n\n  // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n  dir._rawValidators.forEach((validator: Validator|ValidatorFn) => {\n    if ((<Validator>validator).registerOnValidatorChange)\n      (<Validator>validator).registerOnValidatorChange!(() => control.updateValueAndValidity());\n  });\n\n  dir._rawAsyncValidators.forEach((validator: AsyncValidator|AsyncValidatorFn) => {\n    if ((<Validator>validator).registerOnValidatorChange)\n      (<Validator>validator).registerOnValidatorChange!(() => control.updateValueAndValidity());\n  });\n}\n\nexport function cleanUpControl(control: FormControl, dir: NgControl) {\n  const noop = () => {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      _noControlError(dir);\n    }\n  };\n\n  dir.valueAccessor!.registerOnChange(noop);\n  dir.valueAccessor!.registerOnTouched(noop);\n\n  dir._rawValidators.forEach((validator: any) => {\n    if (validator.registerOnValidatorChange) {\n      validator.registerOnValidatorChange(null);\n    }\n  });\n\n  dir._rawAsyncValidators.forEach((validator: any) => {\n    if (validator.registerOnValidatorChange) {\n      validator.registerOnValidatorChange(null);\n    }\n  });\n\n  if (control) control._clearChangeFns();\n}\n\nfunction setUpViewChangePipeline(control: FormControl, dir: NgControl): void {\n  dir.valueAccessor!.registerOnChange((newValue: any) => {\n    control._pendingValue = newValue;\n    control._pendingChange = true;\n    control._pendingDirty = true;\n\n    if (control.updateOn === 'change') updateControl(control, dir);\n  });\n}\n\nfunction setUpBlurPipeline(control: FormControl, dir: NgControl): void {\n  dir.valueAccessor!.registerOnTouched(() => {\n    control._pendingTouched = true;\n\n    if (control.updateOn === 'blur' && control._pendingChange) updateControl(control, dir);\n    if (control.updateOn !== 'submit') control.markAsTouched();\n  });\n}\n\nfunction updateControl(control: FormControl, dir: NgControl): void {\n  if (control._pendingDirty) control.markAsDirty();\n  control.setValue(control._pendingValue, {emitModelToViewChange: false});\n  dir.viewToModelUpdate(control._pendingValue);\n  control._pendingChange = false;\n}\n\nfunction setUpModelChangePipeline(control: FormControl, dir: NgControl): void {\n  control.registerOnChange((newValue: any, emitModelEvent: boolean) => {\n    // control -> view\n    dir.valueAccessor!.writeValue(newValue);\n\n    // control -> ngModel\n    if (emitModelEvent) dir.viewToModelUpdate(newValue);\n  });\n}\n\nexport function setUpFormContainer(\n    control: FormGroup|FormArray, dir: AbstractFormGroupDirective|FormArrayName) {\n  if (control == null && (typeof ngDevMode === 'undefined' || ngDevMode))\n    _throwError(dir, 'Cannot find control with');\n  control.validator = Validators.compose([control.validator, dir.validator]);\n  control.asyncValidator = Validators.composeAsync([control.asyncValidator, dir.asyncValidator]);\n}\n\nfunction _noControlError(dir: NgControl) {\n  return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\n\nfunction _throwError(dir: AbstractControlDirective, message: string): void {\n  let messageEnd: string;\n  if (dir.path!.length > 1) {\n    messageEnd = `path: '${dir.path!.join(' -> ')}'`;\n  } else if (dir.path![0]) {\n    messageEnd = `name: '${dir.path}'`;\n  } else {\n    messageEnd = 'unspecified name attribute';\n  }\n  throw new Error(`${message} ${messageEnd}`);\n}\n\nexport function composeValidators(validators: Array<Validator|ValidatorFn>): ValidatorFn|null {\n  return validators != null ? Validators.compose(normalizeValidators<ValidatorFn>(validators)) :\n                              null;\n}\n\nexport function composeAsyncValidators(validators: Array<AsyncValidator|AsyncValidatorFn>):\n    AsyncValidatorFn|null {\n  return validators != null ?\n      Validators.composeAsync(normalizeValidators<AsyncValidatorFn>(validators)) :\n      null;\n}\n\nexport function isPropertyUpdated(changes: {[key: string]: any}, viewModel: any): boolean {\n  if (!changes.hasOwnProperty('model')) return false;\n  const change = changes['model'];\n\n  if (change.isFirstChange()) return true;\n  return !Object.is(viewModel, change.currentValue);\n}\n\nconst BUILTIN_ACCESSORS = [\n  CheckboxControlValueAccessor,\n  RangeValueAccessor,\n  NumberValueAccessor,\n  SelectControlValueAccessor,\n  SelectMultipleControlValueAccessor,\n  RadioControlValueAccessor,\n];\n\nexport function isBuiltInAccessor(valueAccessor: ControlValueAccessor): boolean {\n  return BUILTIN_ACCESSORS.some(a => valueAccessor.constructor === a);\n}\n\nexport function syncPendingControls(form: FormGroup, directives: NgControl[]): void {\n  form._syncPendingControls();\n  directives.forEach(dir => {\n    const control = dir.control as FormControl;\n    if (control.updateOn === 'submit' && control._pendingChange) {\n      dir.viewToModelUpdate(control._pendingValue);\n      control._pendingChange = false;\n    }\n  });\n}\n\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nexport function selectValueAccessor(\n    dir: NgControl, valueAccessors: ControlValueAccessor[]): ControlValueAccessor|null {\n  if (!valueAccessors) return null;\n\n  if (!Array.isArray(valueAccessors) && (typeof ngDevMode === 'undefined' || ngDevMode))\n    _throwError(dir, 'Value accessor was not provided as an array for form control with');\n\n  let defaultAccessor: ControlValueAccessor|undefined = undefined;\n  let builtinAccessor: ControlValueAccessor|undefined = undefined;\n  let customAccessor: ControlValueAccessor|undefined = undefined;\n\n  valueAccessors.forEach((v: ControlValueAccessor) => {\n    if (v.constructor === DefaultValueAccessor) {\n      defaultAccessor = v;\n\n    } else if (isBuiltInAccessor(v)) {\n      if (builtinAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwError(dir, 'More than one built-in value accessor matches form control with');\n      builtinAccessor = v;\n\n    } else {\n      if (customAccessor && (typeof ngDevMode === 'undefined' || ngDevMode))\n        _throwError(dir, 'More than one custom value accessor matches form control with');\n      customAccessor = v;\n    }\n  });\n\n  if (customAccessor) return customAccessor;\n  if (builtinAccessor) return builtinAccessor;\n  if (defaultAccessor) return defaultAccessor;\n\n  if (typeof ngDevMode === 'undefined' || ngDevMode) {\n    _throwError(dir, 'No valid value accessor for form control with');\n  }\n  return null;\n}\n\nexport function removeDir<T>(list: T[], el: T): void {\n  const index = list.indexOf(el);\n  if (index > -1) list.splice(index, 1);\n}\n\n// TODO(kara): remove after deprecation period\nexport function _ngModelWarning(\n    name: string, type: {_ngModelWarningSentOnce: boolean},\n    instance: {_ngModelWarningSent: boolean}, warningConfig: string|null) {\n  if (!isDevMode() || warningConfig === 'never') return;\n\n  if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n      (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      ReactiveErrors.ngModelWarning(name);\n    }\n    type._ngModelWarningSentOnce = true;\n    instance._ngModelWarningSent = true;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {EventEmitter} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {composeAsyncValidators, composeValidators} from './directives/shared';\nimport {AsyncValidatorFn, ValidationErrors, ValidatorFn} from './directives/validators';\nimport {toObservable} from './validators';\n\n/**\n * Reports that a FormControl is valid, meaning that no errors exist in the input value.\n *\n * @see `status`\n */\nexport const VALID = 'VALID';\n\n/**\n * Reports that a FormControl is invalid, meaning that an error exists in the input value.\n *\n * @see `status`\n */\nexport const INVALID = 'INVALID';\n\n/**\n * Reports that a FormControl is pending, meaning that that async validation is occurring and\n * errors are not yet available for the input value.\n *\n * @see `markAsPending`\n * @see `status`\n */\nexport const PENDING = 'PENDING';\n\n/**\n * Reports that a FormControl is disabled, meaning that the control is exempt from ancestor\n * calculations of validity or value.\n *\n * @see `markAsDisabled`\n * @see `status`\n */\nexport const DISABLED = 'DISABLED';\n\nfunction _find(control: AbstractControl, path: Array<string|number>|string, delimiter: string) {\n  if (path == null) return null;\n\n  if (!Array.isArray(path)) {\n    path = path.split(delimiter);\n  }\n  if (Array.isArray(path) && path.length === 0) return null;\n\n  // Not using Array.reduce here due to a Chrome 80 bug\n  // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\n  let controlToFind: AbstractControl|null = control;\n  path.forEach((name: string|number) => {\n    if (controlToFind instanceof FormGroup) {\n      controlToFind = controlToFind.controls.hasOwnProperty(name as string) ?\n          controlToFind.controls[name] :\n          null;\n    } else if (controlToFind instanceof FormArray) {\n      controlToFind = controlToFind.at(<number>name) || null;\n    } else {\n      controlToFind = null;\n    }\n  });\n  return controlToFind;\n}\n\n/**\n * Gets validators from either an options object or given validators.\n */\nfunction pickValidators(validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|\n                        null): ValidatorFn|ValidatorFn[]|null {\n  return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;\n}\n\n/**\n * Creates validator function by combining provided validators.\n */\nfunction coerceToValidator(validator: ValidatorFn|ValidatorFn[]|null): ValidatorFn|null {\n  return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n\n/**\n * Gets async validators from either an options object or given validators.\n */\nfunction pickAsyncValidators(\n    asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null,\n    validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null): AsyncValidatorFn|\n    AsyncValidatorFn[]|null {\n  return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;\n}\n\n/**\n * Creates async validator function by combining provided async validators.\n */\nfunction coerceToAsyncValidator(asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|\n                                null): AsyncValidatorFn|null {\n  return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) :\n                                         asyncValidator || null;\n}\n\nexport type FormHooks = 'change'|'blur'|'submit';\n\n/**\n * Interface for options provided to an `AbstractControl`.\n *\n * @publicApi\n */\nexport interface AbstractControlOptions {\n  /**\n   * @description\n   * The list of validators applied to a control.\n   */\n  validators?: ValidatorFn|ValidatorFn[]|null;\n  /**\n   * @description\n   * The list of async validators applied to control.\n   */\n  asyncValidators?: AsyncValidatorFn|AsyncValidatorFn[]|null;\n  /**\n   * @description\n   * The event name for control to update upon.\n   */\n  updateOn?: 'change'|'blur'|'submit';\n}\n\n\nfunction isOptionsObj(validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|\n                      null): validatorOrOpts is AbstractControlOptions {\n  return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n      typeof validatorOrOpts === 'object';\n}\n\n\n/**\n * This is the base class for `FormControl`, `FormGroup`, and `FormArray`.\n *\n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n *\n * @see [Forms Guide](/guide/forms)\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n * @see [Dynamic Forms Guide](/guide/dynamic-form)\n *\n * @publicApi\n */\nexport abstract class AbstractControl {\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _pendingDirty!: boolean;\n\n  /**\n   * Indicates that a control has its own pending asynchronous validation in progress.\n   *\n   * @internal\n   */\n  _hasOwnPendingAsyncValidator = false;\n\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _pendingTouched!: boolean;\n\n  /** @internal */\n  _onCollectionChange = () => {};\n\n  /** @internal */\n  // TODO(issue/24571): remove '!'.\n  _updateOn!: FormHooks;\n\n  // TODO(issue/24571): remove '!'.\n  private _parent!: FormGroup|FormArray;\n  private _asyncValidationSubscription: any;\n\n  /**\n   * Contains the result of merging synchronous validators into a single validator function\n   * (combined using `Validators.compose`).\n   *\n   * @internal\n   */\n  private _composedValidatorFn: ValidatorFn|null;\n\n  /**\n   * Contains the result of merging asynchronous validators into a single validator function\n   * (combined using `Validators.composeAsync`).\n   *\n   * @internal\n   */\n  private _composedAsyncValidatorFn: AsyncValidatorFn|null;\n\n  /**\n   * Synchronous validators as they were provided:\n   *  - in `AbstractControl` constructor\n   *  - as an argument while calling `setValidators` function\n   *  - while calling the setter on the `validator` field (e.g. `control.validator = validatorFn`)\n   *\n   * @internal\n   */\n  private _rawValidators: ValidatorFn|ValidatorFn[]|null;\n\n  /**\n   * Asynchronous validators as they were provided:\n   *  - in `AbstractControl` constructor\n   *  - as an argument while calling `setAsyncValidators` function\n   *  - while calling the setter on the `asyncValidator` field (e.g. `control.asyncValidator =\n   * asyncValidatorFn`)\n   *\n   * @internal\n   */\n  private _rawAsyncValidators: AsyncValidatorFn|AsyncValidatorFn[]|null;\n\n  /**\n   * The current value of the control.\n   *\n   * * For a `FormControl`, the current value.\n   * * For an enabled `FormGroup`, the values of enabled controls as an object\n   * with a key-value pair for each member of the group.\n   * * For a disabled `FormGroup`, the values of all controls as an object\n   * with a key-value pair for each member of the group.\n   * * For a `FormArray`, the values of enabled controls as an array.\n   *\n   */\n  public readonly value: any;\n\n  /**\n   * Initialize the AbstractControl instance.\n   *\n   * @param validators The function or array of functions that is used to determine the validity of\n   *     this control synchronously.\n   * @param asyncValidators The function or array of functions that is used to determine validity of\n   *     this control asynchronously.\n   */\n  constructor(\n      validators: ValidatorFn|ValidatorFn[]|null,\n      asyncValidators: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    this._rawValidators = validators;\n    this._rawAsyncValidators = asyncValidators;\n    this._composedValidatorFn = coerceToValidator(this._rawValidators);\n    this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);\n  }\n\n  /**\n   * The function that is used to determine the validity of this control synchronously.\n   */\n  get validator(): ValidatorFn|null {\n    return this._composedValidatorFn;\n  }\n  set validator(validatorFn: ValidatorFn|null) {\n    this._rawValidators = this._composedValidatorFn = validatorFn;\n  }\n\n  /**\n   * The function that is used to determine the validity of this control asynchronously.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return this._composedAsyncValidatorFn;\n  }\n  set asyncValidator(asyncValidatorFn: AsyncValidatorFn|null) {\n    this._rawAsyncValidators = this._composedAsyncValidatorFn = asyncValidatorFn;\n  }\n\n  /**\n   * The parent control.\n   */\n  get parent(): FormGroup|FormArray {\n    return this._parent;\n  }\n\n  /**\n   * The validation status of the control. There are four possible\n   * validation status values:\n   *\n   * * **VALID**: This control has passed all validation checks.\n   * * **INVALID**: This control has failed at least one validation check.\n   * * **PENDING**: This control is in the midst of conducting a validation check.\n   * * **DISABLED**: This control is exempt from validation checks.\n   *\n   * These status values are mutually exclusive, so a control cannot be\n   * both valid AND invalid or invalid AND disabled.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly status!: string;\n\n  /**\n   * A control is `valid` when its `status` is `VALID`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if the control has passed all of its validation tests,\n   * false otherwise.\n   */\n  get valid(): boolean {\n    return this.status === VALID;\n  }\n\n  /**\n   * A control is `invalid` when its `status` is `INVALID`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if this control has failed one or more of its validation checks,\n   * false otherwise.\n   */\n  get invalid(): boolean {\n    return this.status === INVALID;\n  }\n\n  /**\n   * A control is `pending` when its `status` is `PENDING`.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if this control is in the process of conducting a validation check,\n   * false otherwise.\n   */\n  get pending(): boolean {\n    return this.status == PENDING;\n  }\n\n  /**\n   * A control is `disabled` when its `status` is `DISABLED`.\n   *\n   * Disabled controls are exempt from validation checks and\n   * are not included in the aggregate value of their ancestor\n   * controls.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @returns True if the control is disabled, false otherwise.\n   */\n  get disabled(): boolean {\n    return this.status === DISABLED;\n  }\n\n  /**\n   * A control is `enabled` as long as its `status` is not `DISABLED`.\n   *\n   * @returns True if the control has any status other than 'DISABLED',\n   * false if the status is 'DISABLED'.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   */\n  get enabled(): boolean {\n    return this.status !== DISABLED;\n  }\n\n  /**\n   * An object containing any errors generated by failing validation,\n   * or null if there are no errors.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly errors!: ValidationErrors|null;\n\n  /**\n   * A control is `pristine` if the user has not yet changed\n   * the value in the UI.\n   *\n   * @returns True if the user has not yet changed the value in the UI; compare `dirty`.\n   * Programmatic changes to a control's value do not mark it dirty.\n   */\n  public readonly pristine: boolean = true;\n\n  /**\n   * A control is `dirty` if the user has changed the value\n   * in the UI.\n   *\n   * @returns True if the user has changed the value of this control in the UI; compare `pristine`.\n   * Programmatic changes to a control's value do not mark it dirty.\n   */\n  get dirty(): boolean {\n    return !this.pristine;\n  }\n\n  /**\n   * True if the control is marked as `touched`.\n   *\n   * A control is marked `touched` once the user has triggered\n   * a `blur` event on it.\n   */\n  public readonly touched: boolean = false;\n\n  /**\n   * True if the control has not been marked as touched\n   *\n   * A control is `untouched` if the user has not yet triggered\n   * a `blur` event on it.\n   */\n  get untouched(): boolean {\n    return !this.touched;\n  }\n\n  /**\n   * A multicasting observable that emits an event every time the value of the control changes, in\n   * the UI or programmatically. It also emits an event each time you call enable() or disable()\n   * without passing along {emitEvent: false} as a function argument.\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly valueChanges!: Observable<any>;\n\n  /**\n   * A multicasting observable that emits an event every time the validation `status` of the control\n   * recalculates.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  public readonly statusChanges!: Observable<any>;\n\n  /**\n   * Reports the update strategy of the `AbstractControl` (meaning\n   * the event on which the control updates itself).\n   * Possible values: `'change'` | `'blur'` | `'submit'`\n   * Default value: `'change'`\n   */\n  get updateOn(): FormHooks {\n    return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n  }\n\n  /**\n   * Sets the synchronous validators that are active on this control.  Calling\n   * this overwrites any existing sync validators.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  setValidators(newValidator: ValidatorFn|ValidatorFn[]|null): void {\n    this._rawValidators = newValidator;\n    this._composedValidatorFn = coerceToValidator(newValidator);\n  }\n\n  /**\n   * Sets the async validators that are active on this control. Calling this\n   * overwrites any existing async validators.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]|null): void {\n    this._rawAsyncValidators = newValidator;\n    this._composedAsyncValidatorFn = coerceToAsyncValidator(newValidator);\n  }\n\n  /**\n   * Empties out the sync validator list.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  clearValidators(): void {\n    this.validator = null;\n  }\n\n  /**\n   * Empties out the async validator list.\n   *\n   * When you add or remove a validator at run time, you must call\n   * `updateValueAndValidity()` for the new validation to take effect.\n   *\n   */\n  clearAsyncValidators(): void {\n    this.asyncValidator = null;\n  }\n\n  /**\n   * Marks the control as `touched`. A control is touched by focus and\n   * blur events that do not change the value.\n   *\n   * @see `markAsUntouched()`\n   * @see `markAsDirty()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsTouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as {touched: boolean}).touched = true;\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsTouched(opts);\n    }\n  }\n\n  /**\n   * Marks the control and all its descendant controls as `touched`.\n   * @see `markAsTouched()`\n   */\n  markAllAsTouched(): void {\n    this.markAsTouched({onlySelf: true});\n\n    this._forEachChild((control: AbstractControl) => control.markAllAsTouched());\n  }\n\n  /**\n   * Marks the control as `untouched`.\n   *\n   * If the control has any children, also marks all children as `untouched`\n   * and recalculates the `touched` status of all parent controls.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsDirty()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events after the marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsUntouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as {touched: boolean}).touched = false;\n    this._pendingTouched = false;\n\n    this._forEachChild((control: AbstractControl) => {\n      control.markAsUntouched({onlySelf: true});\n    });\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updateTouched(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `dirty`. A control becomes dirty when\n   * the control's value is changed through the UI; compare `markAsTouched`.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsUntouched()`\n   * @see `markAsPristine()`\n   *\n   * @param opts Configuration options that determine how the control propagates changes\n   * and emits events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsDirty(opts: {onlySelf?: boolean} = {}): void {\n    (this as {pristine: boolean}).pristine = false;\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsDirty(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `pristine`.\n   *\n   * If the control has any children, marks all children as `pristine`,\n   * and recalculates the `pristine` status of all parent\n   * controls.\n   *\n   * @see `markAsTouched()`\n   * @see `markAsUntouched()`\n   * @see `markAsDirty()`\n   *\n   * @param opts Configuration options that determine how the control emits events after\n   * marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   */\n  markAsPristine(opts: {onlySelf?: boolean} = {}): void {\n    (this as {pristine: boolean}).pristine = true;\n    this._pendingDirty = false;\n\n    this._forEachChild((control: AbstractControl) => {\n      control.markAsPristine({onlySelf: true});\n    });\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updatePristine(opts);\n    }\n  }\n\n  /**\n   * Marks the control as `pending`.\n   *\n   * A control is pending while the control performs async validation.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configuration options that determine how the control propagates changes and\n   * emits events after marking is applied.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   * * `emitEvent`: When true or not supplied (the default), the `statusChanges`\n   * observable emits an event with the latest status the control is marked pending.\n   * When false, no events are emitted.\n   *\n   */\n  markAsPending(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    (this as {status: string}).status = PENDING;\n\n    if (opts.emitEvent !== false) {\n      (this.statusChanges as EventEmitter<any>).emit(this.status);\n    }\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.markAsPending(opts);\n    }\n  }\n\n  /**\n   * Disables the control. This means the control is exempt from validation checks and\n   * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n   *\n   * If the control has children, all children are also disabled.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configuration options that determine how the control propagates\n   * changes and emits events after the control is disabled.\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is disabled.\n   * When false, no events are emitted.\n   */\n  disable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    // If parent has been marked artificially dirty we don't want to re-calculate the\n    // parent's dirtiness based on the children.\n    const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n    (this as {status: string}).status = DISABLED;\n    (this as {errors: ValidationErrors | null}).errors = null;\n    this._forEachChild((control: AbstractControl) => {\n      control.disable({...opts, onlySelf: true});\n    });\n    this._updateValue();\n\n    if (opts.emitEvent !== false) {\n      (this.valueChanges as EventEmitter<any>).emit(this.value);\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    this._updateAncestors({...opts, skipPristineCheck});\n    this._onDisabledChange.forEach((changeFn) => changeFn(true));\n  }\n\n  /**\n   * Enables the control. This means the control is included in validation checks and\n   * the aggregate value of its parent. Its status recalculates based on its value and\n   * its validators.\n   *\n   * By default, if the control has children, all children are enabled.\n   *\n   * @see {@link AbstractControl.status}\n   *\n   * @param opts Configure options that control how the control propagates changes and\n   * emits events when marked as untouched\n   * * `onlySelf`: When true, mark only this control. When false or not supplied,\n   * marks all direct ancestors. Default is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is enabled.\n   * When false, no events are emitted.\n   */\n  enable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    // If parent has been marked artificially dirty we don't want to re-calculate the\n    // parent's dirtiness based on the children.\n    const skipPristineCheck = this._parentMarkedDirty(opts.onlySelf);\n\n    (this as {status: string}).status = VALID;\n    this._forEachChild((control: AbstractControl) => {\n      control.enable({...opts, onlySelf: true});\n    });\n    this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n\n    this._updateAncestors({...opts, skipPristineCheck});\n    this._onDisabledChange.forEach((changeFn) => changeFn(false));\n  }\n\n  private _updateAncestors(\n      opts: {onlySelf?: boolean, emitEvent?: boolean, skipPristineCheck?: boolean}) {\n    if (this._parent && !opts.onlySelf) {\n      this._parent.updateValueAndValidity(opts);\n      if (!opts.skipPristineCheck) {\n        this._parent._updatePristine();\n      }\n      this._parent._updateTouched();\n    }\n  }\n\n  /**\n   * @param parent Sets the parent of the control\n   */\n  setParent(parent: FormGroup|FormArray): void {\n    this._parent = parent;\n  }\n\n  /**\n   * Sets the value of the control. Abstract method (implemented in sub-classes).\n   */\n  abstract setValue(value: any, options?: Object): void;\n\n  /**\n   * Patches the value of the control. Abstract method (implemented in sub-classes).\n   */\n  abstract patchValue(value: any, options?: Object): void;\n\n  /**\n   * Resets the control. Abstract method (implemented in sub-classes).\n   */\n  abstract reset(value?: any, options?: Object): void;\n\n  /**\n   * Recalculates the value and validation status of the control.\n   *\n   * By default, it also updates the value and validity of its ancestors.\n   *\n   * @param opts Configuration options determine how the control propagates changes and emits events\n   * after updates and validity checks are applied.\n   * * `onlySelf`: When true, only update this control. When false or not supplied,\n   * update all direct ancestors. Default is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is updated.\n   * When false, no events are emitted.\n   */\n  updateValueAndValidity(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._setInitialStatus();\n    this._updateValue();\n\n    if (this.enabled) {\n      this._cancelExistingSubscription();\n      (this as {errors: ValidationErrors | null}).errors = this._runValidator();\n      (this as {status: string}).status = this._calculateStatus();\n\n      if (this.status === VALID || this.status === PENDING) {\n        this._runAsyncValidator(opts.emitEvent);\n      }\n    }\n\n    if (opts.emitEvent !== false) {\n      (this.valueChanges as EventEmitter<any>).emit(this.value);\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent.updateValueAndValidity(opts);\n    }\n  }\n\n  /** @internal */\n  _updateTreeValidity(opts: {emitEvent?: boolean} = {emitEvent: true}) {\n    this._forEachChild((ctrl: AbstractControl) => ctrl._updateTreeValidity(opts));\n    this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n  }\n\n  private _setInitialStatus() {\n    (this as {status: string}).status = this._allControlsDisabled() ? DISABLED : VALID;\n  }\n\n  private _runValidator(): ValidationErrors|null {\n    return this.validator ? this.validator(this) : null;\n  }\n\n  private _runAsyncValidator(emitEvent?: boolean): void {\n    if (this.asyncValidator) {\n      (this as {status: string}).status = PENDING;\n      this._hasOwnPendingAsyncValidator = true;\n      const obs = toObservable(this.asyncValidator(this));\n      this._asyncValidationSubscription = obs.subscribe((errors: ValidationErrors|null) => {\n        this._hasOwnPendingAsyncValidator = false;\n        // This will trigger the recalculation of the validation status, which depends on\n        // the state of the asynchronous validation (whether it is in progress or not). So, it is\n        // necessary that we have updated the `_hasOwnPendingAsyncValidator` boolean flag first.\n        this.setErrors(errors, {emitEvent});\n      });\n    }\n  }\n\n  private _cancelExistingSubscription(): void {\n    if (this._asyncValidationSubscription) {\n      this._asyncValidationSubscription.unsubscribe();\n      this._hasOwnPendingAsyncValidator = false;\n    }\n  }\n\n  /**\n   * Sets errors on a form control when running validations manually, rather than automatically.\n   *\n   * Calling `setErrors` also updates the validity of the parent control.\n   *\n   * @usageNotes\n   *\n   * ### Manually set the errors for a control\n   *\n   * ```\n   * const login = new FormControl('someLogin');\n   * login.setErrors({\n   *   notUnique: true\n   * });\n   *\n   * expect(login.valid).toEqual(false);\n   * expect(login.errors).toEqual({ notUnique: true });\n   *\n   * login.setValue('someOtherLogin');\n   *\n   * expect(login.valid).toEqual(true);\n   * ```\n   */\n  setErrors(errors: ValidationErrors|null, opts: {emitEvent?: boolean} = {}): void {\n    (this as {errors: ValidationErrors | null}).errors = errors;\n    this._updateControlsErrors(opts.emitEvent !== false);\n  }\n\n  /**\n   * Retrieves a child control given the control's name or path.\n   *\n   * @param path A dot-delimited string or array of string/number values that define the path to the\n   * control.\n   *\n   * @usageNotes\n   * ### Retrieve a nested control\n   *\n   * For example, to get a `name` control nested within a `person` sub-group:\n   *\n   * * `this.form.get('person.name');`\n   *\n   * -OR-\n   *\n   * * `this.form.get(['person', 'name']);`\n   */\n  get(path: Array<string|number>|string): AbstractControl|null {\n    return _find(this, path, '.');\n  }\n\n  /**\n   * @description\n   * Reports error data for the control with the given path.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * @returns error data for that particular error. If the control or error is not present,\n   * null is returned.\n   */\n  getError(errorCode: string, path?: Array<string|number>|string): any {\n    const control = path ? this.get(path) : this;\n    return control && control.errors ? control.errors[errorCode] : null;\n  }\n\n  /**\n   * @description\n   * Reports whether the control with the given path has the error specified.\n   *\n   * @param errorCode The code of the error to check\n   * @param path A list of control names that designates how to move from the current control\n   * to the control that should be queried for errors.\n   *\n   * @usageNotes\n   * For example, for the following `FormGroup`:\n   *\n   * ```\n   * form = new FormGroup({\n   *   address: new FormGroup({ street: new FormControl() })\n   * });\n   * ```\n   *\n   * The path to the 'street' control from the root form would be 'address' -> 'street'.\n   *\n   * It can be provided to this method in one of two formats:\n   *\n   * 1. An array of string control names, e.g. `['address', 'street']`\n   * 1. A period-delimited list of control names in one string, e.g. `'address.street'`\n   *\n   * If no path is given, this method checks for the error on the current control.\n   *\n   * @returns whether the given error is present in the control at the given path.\n   *\n   * If the control is not present, false is returned.\n   */\n  hasError(errorCode: string, path?: Array<string|number>|string): boolean {\n    return !!this.getError(errorCode, path);\n  }\n\n  /**\n   * Retrieves the top-level ancestor of this control.\n   */\n  get root(): AbstractControl {\n    let x: AbstractControl = this;\n\n    while (x._parent) {\n      x = x._parent;\n    }\n\n    return x;\n  }\n\n  /** @internal */\n  _updateControlsErrors(emitEvent: boolean): void {\n    (this as {status: string}).status = this._calculateStatus();\n\n    if (emitEvent) {\n      (this.statusChanges as EventEmitter<string>).emit(this.status);\n    }\n\n    if (this._parent) {\n      this._parent._updateControlsErrors(emitEvent);\n    }\n  }\n\n  /** @internal */\n  _initObservables() {\n    (this as {valueChanges: Observable<any>}).valueChanges = new EventEmitter();\n    (this as {statusChanges: Observable<any>}).statusChanges = new EventEmitter();\n  }\n\n\n  private _calculateStatus(): string {\n    if (this._allControlsDisabled()) return DISABLED;\n    if (this.errors) return INVALID;\n    if (this._hasOwnPendingAsyncValidator || this._anyControlsHaveStatus(PENDING)) return PENDING;\n    if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n    return VALID;\n  }\n\n  /** @internal */\n  abstract _updateValue(): void;\n\n  /** @internal */\n  abstract _forEachChild(cb: Function): void;\n\n  /** @internal */\n  abstract _anyControls(condition: Function): boolean;\n\n  /** @internal */\n  abstract _allControlsDisabled(): boolean;\n\n  /** @internal */\n  abstract _syncPendingControls(): boolean;\n\n  /** @internal */\n  _anyControlsHaveStatus(status: string): boolean {\n    return this._anyControls((control: AbstractControl) => control.status === status);\n  }\n\n  /** @internal */\n  _anyControlsDirty(): boolean {\n    return this._anyControls((control: AbstractControl) => control.dirty);\n  }\n\n  /** @internal */\n  _anyControlsTouched(): boolean {\n    return this._anyControls((control: AbstractControl) => control.touched);\n  }\n\n  /** @internal */\n  _updatePristine(opts: {onlySelf?: boolean} = {}): void {\n    (this as {pristine: boolean}).pristine = !this._anyControlsDirty();\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updatePristine(opts);\n    }\n  }\n\n  /** @internal */\n  _updateTouched(opts: {onlySelf?: boolean} = {}): void {\n    (this as {touched: boolean}).touched = this._anyControlsTouched();\n\n    if (this._parent && !opts.onlySelf) {\n      this._parent._updateTouched(opts);\n    }\n  }\n\n  /** @internal */\n  _onDisabledChange: Function[] = [];\n\n  /** @internal */\n  _isBoxedValue(formState: any): boolean {\n    return typeof formState === 'object' && formState !== null &&\n        Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n  }\n\n  /** @internal */\n  _registerOnCollectionChange(fn: () => void): void {\n    this._onCollectionChange = fn;\n  }\n\n  /** @internal */\n  _setUpdateStrategy(opts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null): void {\n    if (isOptionsObj(opts) && opts.updateOn != null) {\n      this._updateOn = opts.updateOn!;\n    }\n  }\n\n  /**\n   * Check to see if parent has been marked artificially dirty.\n   *\n   * @internal\n   */\n  private _parentMarkedDirty(onlySelf?: boolean): boolean {\n    const parentDirty = this._parent && this._parent.dirty;\n    return !onlySelf && parentDirty && !this._parent._anyControlsDirty();\n  }\n}\n\n/**\n * Tracks the value and validation status of an individual form control.\n *\n * This is one of the three fundamental building blocks of Angular forms, along with\n * `FormGroup` and `FormArray`. It extends the `AbstractControl` class that\n * implements most of the base functionality for accessing the value, validation status,\n * user interactions and events. See [usage examples below](#usage-notes).\n *\n * @see `AbstractControl`\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see [Usage Notes](#usage-notes)\n *\n * @usageNotes\n *\n * ### Initializing Form Controls\n *\n * Instantiate a `FormControl`, with an initial value.\n *\n * ```ts\n * const control = new FormControl('some value');\n * console.log(control.value);     // 'some value'\n *```\n *\n * The following example initializes the control with a form state object. The `value`\n * and `disabled` keys are required in this case.\n *\n * ```ts\n * const control = new FormControl({ value: 'n/a', disabled: true });\n * console.log(control.value);     // 'n/a'\n * console.log(control.status);    // 'DISABLED'\n * ```\n *\n * The following example initializes the control with a sync validator.\n *\n * ```ts\n * const control = new FormControl('', Validators.required);\n * console.log(control.value);      // ''\n * console.log(control.status);     // 'INVALID'\n * ```\n *\n * The following example initializes the control using an options object.\n *\n * ```ts\n * const control = new FormControl('', {\n *    validators: Validators.required,\n *    asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * ### Configure the control to update on a blur event\n *\n * Set the `updateOn` option to `'blur'` to update on the blur `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * ### Configure the control to update on a submit event\n *\n * Set the `updateOn` option to `'submit'` to update on a submit `event`.\n *\n * ```ts\n * const control = new FormControl('', { updateOn: 'submit' });\n * ```\n *\n * ### Reset the control back to an initial value\n *\n * You reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n *\n * ```ts\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n *\n * control.reset('Drew');\n *\n * console.log(control.value); // 'Drew'\n * ```\n *\n * ### Reset the control back to an initial value and disabled\n *\n * ```\n * const control = new FormControl('Nancy');\n *\n * console.log(control.value); // 'Nancy'\n * console.log(control.status); // 'VALID'\n *\n * control.reset({ value: 'Drew', disabled: true });\n *\n * console.log(control.value); // 'Drew'\n * console.log(control.status); // 'DISABLED'\n * ```\n *\n * @publicApi\n */\nexport class FormControl extends AbstractControl {\n  /** @internal */\n  _onChange: Function[] = [];\n\n  /** @internal */\n  _pendingValue: any;\n\n  /** @internal */\n  _pendingChange: any;\n\n  /**\n   * Creates a new `FormControl` instance.\n   *\n   * @param formState Initializes the control with an initial value,\n   * or an object that defines the initial value and disabled state.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains validation functions\n   * and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator functions\n   *\n   */\n  constructor(\n      formState: any = null,\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    this._applyFormState(formState);\n    this._setUpdateStrategy(validatorOrOpts);\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n    this._initObservables();\n  }\n\n  /**\n   * Sets a new value for the form control.\n   *\n   * @param value The new value for the control.\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events when the value changes.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * * `emitModelToViewChange`: When true or not supplied  (the default), each change triggers an\n   * `onChange` event to\n   * update the view.\n   * * `emitViewToModelChange`: When true or not supplied (the default), each change triggers an\n   * `ngModelChange`\n   * event to update the model.\n   *\n   */\n  setValue(value: any, options: {\n    onlySelf?: boolean,\n    emitEvent?: boolean,\n    emitModelToViewChange?: boolean,\n    emitViewToModelChange?: boolean\n  } = {}): void {\n    (this as {value: any}).value = this._pendingValue = value;\n    if (this._onChange.length && options.emitModelToViewChange !== false) {\n      this._onChange.forEach(\n          (changeFn) => changeFn(this.value, options.emitViewToModelChange !== false));\n    }\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of a control.\n   *\n   * This function is functionally the same as {@link FormControl#setValue setValue} at this level.\n   * It exists for symmetry with {@link FormGroup#patchValue patchValue} on `FormGroups` and\n   * `FormArrays`, where it does behave differently.\n   *\n   * @see `setValue` for options\n   */\n  patchValue(value: any, options: {\n    onlySelf?: boolean,\n    emitEvent?: boolean,\n    emitModelToViewChange?: boolean,\n    emitViewToModelChange?: boolean\n  } = {}): void {\n    this.setValue(value, options);\n  }\n\n  /**\n   * Resets the form control, marking it `pristine` and `untouched`, and setting\n   * the value to null.\n   *\n   * @param formState Resets the control with an initial value,\n   * or an object that defines the initial value and disabled state.\n   *\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events after the value changes.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   *\n   */\n  reset(formState: any = null, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._applyFormState(formState);\n    this.markAsPristine(options);\n    this.markAsUntouched(options);\n    this.setValue(this.value, options);\n    this._pendingChange = false;\n  }\n\n  /**\n   * @internal\n   */\n  _updateValue() {}\n\n  /**\n   * @internal\n   */\n  _anyControls(condition: Function): boolean {\n    return false;\n  }\n\n  /**\n   * @internal\n   */\n  _allControlsDisabled(): boolean {\n    return this.disabled;\n  }\n\n  /**\n   * Register a listener for change events.\n   *\n   * @param fn The method that is called when the value changes\n   */\n  registerOnChange(fn: Function): void {\n    this._onChange.push(fn);\n  }\n\n  /**\n   * @internal\n   */\n  _clearChangeFns(): void {\n    this._onChange = [];\n    this._onDisabledChange = [];\n    this._onCollectionChange = () => {};\n  }\n\n  /**\n   * Register a listener for disabled events.\n   *\n   * @param fn The method that is called when the disabled status changes.\n   */\n  registerOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n    this._onDisabledChange.push(fn);\n  }\n\n  /**\n   * @internal\n   */\n  _forEachChild(cb: Function): void {}\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    if (this.updateOn === 'submit') {\n      if (this._pendingDirty) this.markAsDirty();\n      if (this._pendingTouched) this.markAsTouched();\n      if (this._pendingChange) {\n        this.setValue(this._pendingValue, {onlySelf: true, emitModelToViewChange: false});\n        return true;\n      }\n    }\n    return false;\n  }\n\n  private _applyFormState(formState: any) {\n    if (this._isBoxedValue(formState)) {\n      (this as {value: any}).value = this._pendingValue = formState.value;\n      formState.disabled ? this.disable({onlySelf: true, emitEvent: false}) :\n                           this.enable({onlySelf: true, emitEvent: false});\n    } else {\n      (this as {value: any}).value = this._pendingValue = formState;\n    }\n  }\n}\n\n/**\n * Tracks the value and validity state of a group of `FormControl` instances.\n *\n * A `FormGroup` aggregates the values of each child `FormControl` into one object,\n * with each control name as the key.  It calculates its status by reducing the status values\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n *\n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormArray`.\n *\n * When instantiating a `FormGroup`, pass in a collection of child controls as the first\n * argument. The key for each child registers the name for the control.\n *\n * @usageNotes\n *\n * ### Create a form group with 2 controls\n *\n * ```\n * const form = new FormGroup({\n *   first: new FormControl('Nancy', Validators.minLength(2)),\n *   last: new FormControl('Drew'),\n * });\n *\n * console.log(form.value);   // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status);  // 'VALID'\n * ```\n *\n * ### Create a form group with a group-level validator\n *\n * You include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('', Validators.minLength(2)),\n *   passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n *\n *\n * function passwordMatchValidator(g: FormGroup) {\n *    return g.get('password').value === g.get('passwordConfirm').value\n *       ? null : {'mismatch': true};\n * }\n * ```\n *\n * Like `FormControl` instances, you choose to pass in\n * validators and async validators as part of an options object.\n *\n * ```\n * const form = new FormGroup({\n *   password: new FormControl('')\n *   passwordConfirm: new FormControl('')\n * }, { validators: passwordMatchValidator, asyncValidators: otherValidator });\n * ```\n *\n * ### Set the updateOn property for all controls in a form group\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * group level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormGroup({\n *   one: new FormControl()\n * }, { updateOn: 'blur' });\n * ```\n *\n * @publicApi\n */\nexport class FormGroup extends AbstractControl {\n  /**\n   * Creates a new `FormGroup` instance.\n   *\n   * @param controls A collection of child controls. The key for each child is the name\n   * under which it is registered.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains validation functions\n   * and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator functions\n   *\n   */\n  constructor(\n      public controls: {[key: string]: AbstractControl},\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    this._initObservables();\n    this._setUpdateStrategy(validatorOrOpts);\n    this._setUpControls();\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n  }\n\n  /**\n   * Registers a control with the group's list of controls.\n   *\n   * This method does not update the value or validity of the control.\n   * Use {@link FormGroup#addControl addControl} instead.\n   *\n   * @param name The control name to register in the collection\n   * @param control Provides the control for the given name\n   */\n  registerControl(name: string, control: AbstractControl): AbstractControl {\n    if (this.controls[name]) return this.controls[name];\n    this.controls[name] = control;\n    control.setParent(this);\n    control._registerOnCollectionChange(this._onCollectionChange);\n    return control;\n  }\n\n  /**\n   * Add a control to this group.\n   *\n   * This method also updates the value and validity of the control.\n   *\n   * @param name The control name to add to the collection\n   * @param control Provides the control for the given name\n   */\n  addControl(name: string, control: AbstractControl): void {\n    this.registerControl(name, control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Remove a control from this group.\n   *\n   * @param name The control name to remove from the collection\n   */\n  removeControl(name: string): void {\n    if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n    delete (this.controls[name]);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Replace an existing control.\n   *\n   * @param name The control name to replace in the collection\n   * @param control Provides the control for the given name\n   */\n  setControl(name: string, control: AbstractControl): void {\n    if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n    delete (this.controls[name]);\n    if (control) this.registerControl(name, control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Check whether there is an enabled control with the given name in the group.\n   *\n   * Reports false for disabled controls. If you'd like to check for existence in the group\n   * only, use {@link AbstractControl#get get} instead.\n   *\n   * @param controlName The control name to check for existence in the collection\n   *\n   * @returns false for disabled controls, true otherwise.\n   */\n  contains(controlName: string): boolean {\n    return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n  }\n\n  /**\n   * Sets the value of the `FormGroup`. It accepts an object that matches\n   * the structure of the group, with control names as keys.\n   *\n   * @usageNotes\n   * ### Set the complete value for the form group\n   *\n   * ```\n   * const form = new FormGroup({\n   *   first: new FormControl(),\n   *   last: new FormControl()\n   * });\n   *\n   * console.log(form.value);   // {first: null, last: null}\n   *\n   * form.setValue({first: 'Nancy', last: 'Drew'});\n   * console.log(form.value);   // {first: 'Nancy', last: 'Drew'}\n   * ```\n   *\n   * @throws When strict checks fail, such as setting the value of a control\n   * that doesn't exist or if you exclude a value of a control that does exist.\n   *\n   * @param value The new value for the control that matches the structure of the group.\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events after the value changes.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   */\n  setValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n      void {\n    this._checkAllValuesPresent(value);\n    Object.keys(value).forEach(name => {\n      this._throwIfControlMissing(name);\n      this.controls[name].setValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of the `FormGroup`. It accepts an object with control\n   * names as keys, and does its best to match the values to the correct controls\n   * in the group.\n   *\n   * It accepts both super-sets and sub-sets of the group without throwing an error.\n   *\n   * @usageNotes\n   * ### Patch the value for a form group\n   *\n   * ```\n   * const form = new FormGroup({\n   *    first: new FormControl(),\n   *    last: new FormControl()\n   * });\n   * console.log(form.value);   // {first: null, last: null}\n   *\n   * form.patchValue({first: 'Nancy'});\n   * console.log(form.value);   // {first: 'Nancy', last: null}\n   * ```\n   *\n   * @param value The object that matches the structure of the group.\n   * @param options Configuration options that determine how the control propagates changes and\n   * emits events after the value is patched.\n   * * `onlySelf`: When true, each change only affects this control and not its parent. Default is\n   * true.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  patchValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n      void {\n    Object.keys(value).forEach(name => {\n      if (this.controls[name]) {\n        this.controls[name].patchValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n      }\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Resets the `FormGroup`, marks all descendants are marked `pristine` and `untouched`, and\n   * the value of all descendants to null.\n   *\n   * You reset to a specific form state by passing in a map of states\n   * that matches the structure of your form, with control names as keys. The state\n   * is a standalone value or a form state object with both a value and a disabled\n   * status.\n   *\n   * @param value Resets the control with an initial value,\n   * or an object that defines the initial value and disabled state.\n   *\n   * @param options Configuration options that determine how the control propagates changes\n   * and emits events when the group is reset.\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default is\n   * false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   *\n   * @usageNotes\n   *\n   * ### Reset the form group values\n   *\n   * ```ts\n   * const form = new FormGroup({\n   *   first: new FormControl('first name'),\n   *   last: new FormControl('last name')\n   * });\n   *\n   * console.log(form.value);  // {first: 'first name', last: 'last name'}\n   *\n   * form.reset({ first: 'name', last: 'last name' });\n   *\n   * console.log(form.value);  // {first: 'name', last: 'last name'}\n   * ```\n   *\n   * ### Reset the form group values and disabled status\n   *\n   * ```\n   * const form = new FormGroup({\n   *   first: new FormControl('first name'),\n   *   last: new FormControl('last name')\n   * });\n   *\n   * form.reset({\n   *   first: {value: 'name', disabled: true},\n   *   last: 'last'\n   * });\n   *\n   * console.log(this.form.value);  // {first: 'name', last: 'last name'}\n   * console.log(this.form.get('first').status);  // 'DISABLED'\n   * ```\n   */\n  reset(value: any = {}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._forEachChild((control: AbstractControl, name: string) => {\n      control.reset(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this._updatePristine(options);\n    this._updateTouched(options);\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * The aggregate value of the `FormGroup`, including any disabled controls.\n   *\n   * Retrieves all values regardless of disabled status.\n   * The `value` property is the best way to get the value of the group, because\n   * it excludes disabled controls in the `FormGroup`.\n   */\n  getRawValue(): any {\n    return this._reduceChildren(\n        {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n          acc[name] = control instanceof FormControl ? control.value : (<any>control).getRawValue();\n          return acc;\n        });\n  }\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    let subtreeUpdated = this._reduceChildren(false, (updated: boolean, child: AbstractControl) => {\n      return child._syncPendingControls() ? true : updated;\n    });\n    if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n    return subtreeUpdated;\n  }\n\n  /** @internal */\n  _throwIfControlMissing(name: string): void {\n    if (!Object.keys(this.controls).length) {\n      throw new Error(`\n        There are no form controls registered with this group yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n    }\n    if (!this.controls[name]) {\n      throw new Error(`Cannot find form control with name: ${name}.`);\n    }\n  }\n\n  /** @internal */\n  _forEachChild(cb: (v: any, k: string) => void): void {\n    Object.keys(this.controls).forEach(k => cb(this.controls[k], k));\n  }\n\n  /** @internal */\n  _setUpControls(): void {\n    this._forEachChild((control: AbstractControl) => {\n      control.setParent(this);\n      control._registerOnCollectionChange(this._onCollectionChange);\n    });\n  }\n\n  /** @internal */\n  _updateValue(): void {\n    (this as {value: any}).value = this._reduceValue();\n  }\n\n  /** @internal */\n  _anyControls(condition: Function): boolean {\n    for (const controlName of Object.keys(this.controls)) {\n      const control = this.controls[controlName];\n      if (this.contains(controlName) && condition(control)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /** @internal */\n  _reduceValue() {\n    return this._reduceChildren(\n        {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n          if (control.enabled || this.disabled) {\n            acc[name] = control.value;\n          }\n          return acc;\n        });\n  }\n\n  /** @internal */\n  _reduceChildren(initValue: any, fn: Function) {\n    let res = initValue;\n    this._forEachChild((control: AbstractControl, name: string) => {\n      res = fn(res, control, name);\n    });\n    return res;\n  }\n\n  /** @internal */\n  _allControlsDisabled(): boolean {\n    for (const controlName of Object.keys(this.controls)) {\n      if (this.controls[controlName].enabled) {\n        return false;\n      }\n    }\n    return Object.keys(this.controls).length > 0 || this.disabled;\n  }\n\n  /** @internal */\n  _checkAllValuesPresent(value: any): void {\n    this._forEachChild((control: AbstractControl, name: string) => {\n      if (value[name] === undefined) {\n        throw new Error(`Must supply a value for form control with name: '${name}'.`);\n      }\n    });\n  }\n}\n\n/**\n * Tracks the value and validity state of an array of `FormControl`,\n * `FormGroup` or `FormArray` instances.\n *\n * A `FormArray` aggregates the values of each child `FormControl` into an array.\n * It calculates its status by reducing the status values of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n *\n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with `FormControl` and `FormGroup`.\n *\n * @usageNotes\n *\n * ### Create an array of form controls\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy', Validators.minLength(2)),\n *   new FormControl('Drew'),\n * ]);\n *\n * console.log(arr.value);   // ['Nancy', 'Drew']\n * console.log(arr.status);  // 'VALID'\n * ```\n *\n * ### Create a form array with array-level validators\n *\n * You include array-level validators and async validators. These come in handy\n * when you want to perform validation that considers the value of more than one child\n * control.\n *\n * The two types of validators are passed in separately as the second and third arg\n * respectively, or together as part of an options object.\n *\n * ```\n * const arr = new FormArray([\n *   new FormControl('Nancy'),\n *   new FormControl('Drew')\n * ], {validators: myValidator, asyncValidators: myAsyncValidator});\n * ```\n *\n * ### Set the updateOn property for all controls in a form array\n *\n * The options object is used to set a default value for each child\n * control's `updateOn` property. If you set `updateOn` to `'blur'` at the\n * array level, all child controls default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const arr = new FormArray([\n *    new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls from a form array\n *\n * To change the controls in the array, use the `push`, `insert`, `removeAt` or `clear` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that result in strange and unexpected behavior such\n * as broken change detection.\n *\n * @publicApi\n */\nexport class FormArray extends AbstractControl {\n  /**\n   * Creates a new `FormArray` instance.\n   *\n   * @param controls An array of child controls. Each child control is given an index\n   * where it is registered.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains validation functions\n   * and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator functions\n   *\n   */\n  constructor(\n      public controls: AbstractControl[],\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n    super(pickValidators(validatorOrOpts), pickAsyncValidators(asyncValidator, validatorOrOpts));\n    this._initObservables();\n    this._setUpdateStrategy(validatorOrOpts);\n    this._setUpControls();\n    this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n  }\n\n  /**\n   * Get the `AbstractControl` at the given `index` in the array.\n   *\n   * @param index Index in the array to retrieve the control\n   */\n  at(index: number): AbstractControl {\n    return this.controls[index];\n  }\n\n  /**\n   * Insert a new `AbstractControl` at the end of the array.\n   *\n   * @param control Form control to be inserted\n   */\n  push(control: AbstractControl): void {\n    this.controls.push(control);\n    this._registerControl(control);\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Insert a new `AbstractControl` at the given `index` in the array.\n   *\n   * @param index Index in the array to insert the control\n   * @param control Form control to be inserted\n   */\n  insert(index: number, control: AbstractControl): void {\n    this.controls.splice(index, 0, control);\n\n    this._registerControl(control);\n    this.updateValueAndValidity();\n  }\n\n  /**\n   * Remove the control at the given `index` in the array.\n   *\n   * @param index Index in the array to remove the control\n   */\n  removeAt(index: number): void {\n    if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n    this.controls.splice(index, 1);\n    this.updateValueAndValidity();\n  }\n\n  /**\n   * Replace an existing control.\n   *\n   * @param index Index in the array to replace the control\n   * @param control The `AbstractControl` control to replace the existing control\n   */\n  setControl(index: number, control: AbstractControl): void {\n    if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n    this.controls.splice(index, 1);\n\n    if (control) {\n      this.controls.splice(index, 0, control);\n      this._registerControl(control);\n    }\n\n    this.updateValueAndValidity();\n    this._onCollectionChange();\n  }\n\n  /**\n   * Length of the control array.\n   */\n  get length(): number {\n    return this.controls.length;\n  }\n\n  /**\n   * Sets the value of the `FormArray`. It accepts an array that matches\n   * the structure of the control.\n   *\n   * This method performs strict checks, and throws an error if you try\n   * to set the value of a control that doesn't exist or if you exclude the\n   * value of a control.\n   *\n   * @usageNotes\n   * ### Set the values for the controls in the form array\n   *\n   * ```\n   * const arr = new FormArray([\n   *   new FormControl(),\n   *   new FormControl()\n   * ]);\n   * console.log(arr.value);   // [null, null]\n   *\n   * arr.setValue(['Nancy', 'Drew']);\n   * console.log(arr.value);   // ['Nancy', 'Drew']\n   * ```\n   *\n   * @param value Array of values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  setValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._checkAllValuesPresent(value);\n    value.forEach((newValue: any, index: number) => {\n      this._throwIfControlMissing(index);\n      this.at(index).setValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Patches the value of the `FormArray`. It accepts an array that matches the\n   * structure of the control, and does its best to match the values to the correct\n   * controls in the group.\n   *\n   * It accepts both super-sets and sub-sets of the array without throwing an error.\n   *\n   * @usageNotes\n   * ### Patch the values for controls in a form array\n   *\n   * ```\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * console.log(arr.value);   // [null, null]\n   *\n   * arr.patchValue(['Nancy']);\n   * console.log(arr.value);   // ['Nancy', null]\n   * ```\n   *\n   * @param value Array of latest values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control value is updated.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  patchValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    value.forEach((newValue: any, index: number) => {\n      if (this.at(index)) {\n        this.at(index).patchValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n      }\n    });\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * Resets the `FormArray` and all descendants are marked `pristine` and `untouched`, and the\n   * value of all descendants to null or null maps.\n   *\n   * You reset to a specific form state by passing in an array of states\n   * that matches the structure of the control. The state is a standalone value\n   * or a form state object with both a value and a disabled status.\n   *\n   * @usageNotes\n   * ### Reset the values in a form array\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * arr.reset(['name', 'last name']);\n   *\n   * console.log(this.arr.value);  // ['name', 'last name']\n   * ```\n   *\n   * ### Reset the values in a form array and the disabled status for the first control\n   *\n   * ```\n   * this.arr.reset([\n   *   {value: 'name', disabled: true},\n   *   'last'\n   * ]);\n   *\n   * console.log(this.arr.value);  // ['name', 'last name']\n   * console.log(this.arr.get(0).status);  // 'DISABLED'\n   * ```\n   *\n   * @param value Array of values for the controls\n   * @param options Configure options that determine how the control propagates changes and\n   * emits events after the value changes\n   *\n   * * `onlySelf`: When true, each change only affects this control, and not its parent. Default\n   * is false.\n   * * `emitEvent`: When true or not supplied (the default), both the `statusChanges` and\n   * `valueChanges`\n   * observables emit events with the latest status and value when the control is reset.\n   * When false, no events are emitted.\n   * The configuration options are passed to the {@link AbstractControl#updateValueAndValidity\n   * updateValueAndValidity} method.\n   */\n  reset(value: any = [], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n    this._forEachChild((control: AbstractControl, index: number) => {\n      control.reset(value[index], {onlySelf: true, emitEvent: options.emitEvent});\n    });\n    this._updatePristine(options);\n    this._updateTouched(options);\n    this.updateValueAndValidity(options);\n  }\n\n  /**\n   * The aggregate value of the array, including any disabled controls.\n   *\n   * Reports all values regardless of disabled status.\n   * For enabled controls only, the `value` property is the best way to get the value of the array.\n   */\n  getRawValue(): any[] {\n    return this.controls.map((control: AbstractControl) => {\n      return control instanceof FormControl ? control.value : (<any>control).getRawValue();\n    });\n  }\n\n  /**\n   * Remove all controls in the `FormArray`.\n   *\n   * @usageNotes\n   * ### Remove all elements from a FormArray\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   * console.log(arr.length);  // 2\n   *\n   * arr.clear();\n   * console.log(arr.length);  // 0\n   * ```\n   *\n   * It's a simpler and more efficient alternative to removing all elements one by one:\n   *\n   * ```ts\n   * const arr = new FormArray([\n   *    new FormControl(),\n   *    new FormControl()\n   * ]);\n   *\n   * while (arr.length) {\n   *    arr.removeAt(0);\n   * }\n   * ```\n   */\n  clear(): void {\n    if (this.controls.length < 1) return;\n    this._forEachChild((control: AbstractControl) => control._registerOnCollectionChange(() => {}));\n    this.controls.splice(0);\n    this.updateValueAndValidity();\n  }\n\n  /** @internal */\n  _syncPendingControls(): boolean {\n    let subtreeUpdated = this.controls.reduce((updated: boolean, child: AbstractControl) => {\n      return child._syncPendingControls() ? true : updated;\n    }, false);\n    if (subtreeUpdated) this.updateValueAndValidity({onlySelf: true});\n    return subtreeUpdated;\n  }\n\n  /** @internal */\n  _throwIfControlMissing(index: number): void {\n    if (!this.controls.length) {\n      throw new Error(`\n        There are no form controls registered with this array yet. If you're using ngModel,\n        you may want to check next tick (e.g. use setTimeout).\n      `);\n    }\n    if (!this.at(index)) {\n      throw new Error(`Cannot find form control at index ${index}`);\n    }\n  }\n\n  /** @internal */\n  _forEachChild(cb: Function): void {\n    this.controls.forEach((control: AbstractControl, index: number) => {\n      cb(control, index);\n    });\n  }\n\n  /** @internal */\n  _updateValue(): void {\n    (this as {value: any}).value =\n        this.controls.filter((control) => control.enabled || this.disabled)\n            .map((control) => control.value);\n  }\n\n  /** @internal */\n  _anyControls(condition: Function): boolean {\n    return this.controls.some((control: AbstractControl) => control.enabled && condition(control));\n  }\n\n  /** @internal */\n  _setUpControls(): void {\n    this._forEachChild((control: AbstractControl) => this._registerControl(control));\n  }\n\n  /** @internal */\n  _checkAllValuesPresent(value: any): void {\n    this._forEachChild((control: AbstractControl, i: number) => {\n      if (value[i] === undefined) {\n        throw new Error(`Must supply a value for form control at index: ${i}.`);\n      }\n    });\n  }\n\n  /** @internal */\n  _allControlsDisabled(): boolean {\n    for (const control of this.controls) {\n      if (control.enabled) return false;\n    }\n    return this.controls.length > 0 || this.disabled;\n  }\n\n  private _registerControl(control: AbstractControl) {\n    control.setParent(this);\n    control._registerOnCollectionChange(this._onCollectionChange);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AfterViewInit, Directive, EventEmitter, forwardRef, Inject, Input, Optional, Self} from '@angular/core';\n\nimport {AbstractControl, FormControl, FormGroup, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {NgControl} from './ng_control';\nimport {NgModel} from './ng_model';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from './shared';\n\nexport const formDirectiveProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => NgForm)\n};\n\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a top-level `FormGroup` instance and binds it to a form\n * to track aggregate form value and validation status.\n *\n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `<form>` tags.  You don't need to add a special selector.\n *\n * You optionally export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful.  Many properties from the underlying\n * `FormGroup` instance are duplicated on the directive itself, so a reference to it\n * gives you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n *\n * To register child controls with the form, use `NgModel` with a `name`\n * attribute. You may use `NgModelGroup` to create sub-groups within the form.\n *\n * If necessary, listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event emits the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * To import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, add the `ngNoForm` and the `<form>`\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `<form>` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n *\n * @usageNotes\n *\n * ### Listening for form submission\n *\n * The following example shows how to capture the form values from the \"ngSubmit\" event.\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Setting the update options\n *\n * The following example shows you how to change the \"updateOn\" option from its default using\n * ngFormOptions.\n *\n * ```html\n * <form [ngFormOptions]=\"{updateOn: 'blur'}\">\n *    <input name=\"one\" ngModel>  <!-- this ngModel will update on blur -->\n * </form>\n * ```\n *\n * ### Native DOM validation UI\n *\n * In order to prevent the native DOM form validation UI from interfering with Angular's form\n * validation, Angular automatically adds the `novalidate` attribute on any `<form>` whenever\n * `FormModule` or `ReactiveFormModule` are imported into the application.\n * If you want to explicitly enable native DOM validation UI with Angular forms, you can add the\n * `ngNativeValidate` attribute to the `<form>` element:\n *\n * ```html\n * <form ngNativeValidate>\n *   ...\n * </form>\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: 'form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]',\n  providers: [formDirectiveProvider],\n  host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n  outputs: ['ngSubmit'],\n  exportAs: 'ngForm'\n})\nexport class NgForm extends ControlContainer implements Form, AfterViewInit {\n  /**\n   * @description\n   * Returns whether the form submission has been triggered.\n   */\n  public readonly submitted: boolean = false;\n\n  private _directives: NgModel[] = [];\n\n  /**\n   * @description\n   * The `FormGroup` instance created for this form.\n   */\n  form: FormGroup;\n\n  /**\n   * @description\n   * Event emitter for the \"ngSubmit\" event\n   */\n  ngSubmit = new EventEmitter();\n\n  /**\n   * @description\n   * Tracks options for the `NgForm` instance.\n   *\n   * **updateOn**: Sets the default `updateOn` value for all child `NgModels` below it\n   * unless explicitly set by a child `NgModel` using `ngModelOptions`). Defaults to 'change'.\n   * Possible values: `'change'` | `'blur'` | `'submit'`.\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngFormOptions') options!: {updateOn?: FormHooks};\n\n  constructor(\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this.form =\n        new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n  }\n\n  /** @nodoc */\n  ngAfterViewInit() {\n    this._setUpdateStrategy();\n  }\n\n  /**\n   * @description\n   * The directive instance.\n   */\n  get formDirective(): Form {\n    return this;\n  }\n\n  /**\n   * @description\n   * The internal `FormGroup` instance.\n   */\n  get control(): FormGroup {\n    return this.form;\n  }\n\n  /**\n   * @description\n   * Returns an array representing the path to this group. Because this directive\n   * always lives at the top level of a form, it is always an empty array.\n   */\n  get path(): string[] {\n    return [];\n  }\n\n  /**\n   * @description\n   * Returns a map of the controls in this group.\n   */\n  get controls(): {[key: string]: AbstractControl} {\n    return this.form.controls;\n  }\n\n  /**\n   * @description\n   * Method that sets up the control directive in this group, re-calculates its value\n   * and validity, and adds the instance to the internal list of directives.\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  addControl(dir: NgModel): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      (dir as {control: FormControl}).control =\n          <FormControl>container.registerControl(dir.name, dir.control);\n      setUpControl(dir.control, dir);\n      dir.control.updateValueAndValidity({emitEvent: false});\n      this._directives.push(dir);\n    });\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormControl` instance from the provided `NgModel` directive.\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  getControl(dir: NgModel): FormControl {\n    return <FormControl>this.form.get(dir.path);\n  }\n\n  /**\n   * @description\n   * Removes the `NgModel` instance from the internal list of directives\n   *\n   * @param dir The `NgModel` directive instance.\n   */\n  removeControl(dir: NgModel): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      if (container) {\n        container.removeControl(dir.name);\n      }\n      removeDir<NgModel>(this._directives, dir);\n    });\n  }\n\n  /**\n   * @description\n   * Adds a new `NgModelGroup` directive instance to the form.\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  addFormGroup(dir: NgModelGroup): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      const group = new FormGroup({});\n      setUpFormContainer(group, dir);\n      container.registerControl(dir.name, group);\n      group.updateValueAndValidity({emitEvent: false});\n    });\n  }\n\n  /**\n   * @description\n   * Removes the `NgModelGroup` directive instance from the form.\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  removeFormGroup(dir: NgModelGroup): void {\n    resolvedPromise.then(() => {\n      const container = this._findContainer(dir.path);\n      if (container) {\n        container.removeControl(dir.name);\n      }\n    });\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormGroup` for a provided `NgModelGroup` directive instance\n   *\n   * @param dir The `NgModelGroup` directive instance.\n   */\n  getFormGroup(dir: NgModelGroup): FormGroup {\n    return <FormGroup>this.form.get(dir.path);\n  }\n\n  /**\n   * Sets the new value for the provided `NgControl` directive.\n   *\n   * @param dir The `NgControl` directive instance.\n   * @param value The new value for the directive's control.\n   */\n  updateModel(dir: NgControl, value: any): void {\n    resolvedPromise.then(() => {\n      const ctrl = <FormControl>this.form.get(dir.path!);\n      ctrl.setValue(value);\n    });\n  }\n\n  /**\n   * @description\n   * Sets the value for this `FormGroup`.\n   *\n   * @param value The new value\n   */\n  setValue(value: {[key: string]: any}): void {\n    this.control.setValue(value);\n  }\n\n  /**\n   * @description\n   * Method called when the \"submit\" event is triggered on the form.\n   * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n   *\n   * @param $event The \"submit\" event object\n   */\n  onSubmit($event: Event): boolean {\n    (this as {submitted: boolean}).submitted = true;\n    syncPendingControls(this.form, this._directives);\n    this.ngSubmit.emit($event);\n    return false;\n  }\n\n  /**\n   * @description\n   * Method called when the \"reset\" event is triggered on the form.\n   */\n  onReset(): void {\n    this.resetForm();\n  }\n\n  /**\n   * @description\n   * Resets the form to an initial value and resets its submitted status.\n   *\n   * @param value The new value for the form.\n   */\n  resetForm(value: any = undefined): void {\n    this.form.reset(value);\n    (this as {submitted: boolean}).submitted = false;\n  }\n\n  private _setUpdateStrategy() {\n    if (this.options && this.options.updateOn != null) {\n      this.form._updateOn = this.options.updateOn;\n    }\n  }\n\n  /** @internal */\n  _findContainer(path: string[]): FormGroup {\n    path.pop();\n    return path.length ? <FormGroup>this.form.get(path) : this.form;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, OnDestroy, OnInit} from '@angular/core';\n\nimport {FormGroup} from '../model';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {composeAsyncValidators, composeValidators, controlPath} from './shared';\nimport {AsyncValidatorFn, ValidatorFn} from './validators';\n\n\n\n/**\n * @description\n * A base class for code shared between the `NgModelGroup` and `FormGroupName` directives.\n *\n * @publicApi\n */\n@Directive()\nexport class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {\n  /**\n   * @description\n   * The parent control for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _parent!: ControlContainer;\n\n  /**\n   * @description\n   * An array of synchronous validators for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _validators!: any[];\n\n  /**\n   * @description\n   * An array of async validators for the group\n   *\n   * @internal\n   */\n  // TODO(issue/24571): remove '!'.\n  _asyncValidators!: any[];\n\n  /** @nodoc */\n  ngOnInit(): void {\n    this._checkParentType();\n    // Register the group with its parent group.\n    this.formDirective!.addFormGroup(this);\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      // Remove the group from its parent group.\n      this.formDirective.removeFormGroup(this);\n    }\n  }\n\n  /**\n   * @description\n   * The `FormGroup` bound to this directive.\n   */\n  get control(): FormGroup {\n    return this.formDirective!.getFormGroup(this);\n  }\n\n  /**\n   * @description\n   * The path to this group from the top-level directive.\n   */\n  get path(): string[] {\n    return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n  }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): Form|null {\n    return this._parent ? this._parent.formDirective : null;\n  }\n\n  /**\n   * @description\n   * The synchronous validators registered with this group.\n   */\n  get validator(): ValidatorFn|null {\n    return composeValidators(this._validators);\n  }\n\n  /**\n   * @description\n   * The async validators registered with this group.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._asyncValidators);\n  }\n\n  /** @internal */\n  _checkParentType(): void {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FormErrorExamples as Examples} from './error_examples';\n\nexport class TemplateDrivenErrors {\n  static modelParentException(): void {\n    throw new Error(`\n      ngModel cannot be used to register form controls with a parent formGroup directive.  Try using\n      formGroup's partner directive \"formControlName\" instead.  Example:\n\n      ${Examples.formControlName}\n\n      Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n      Example:\n\n      ${Examples.ngModelWithFormGroup}`);\n  }\n\n  static formGroupNameException(): void {\n    throw new Error(`\n      ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n      Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n      ${Examples.formGroupName}\n\n      Option 2:  Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n      ${Examples.ngModelGroup}`);\n  }\n\n  static missingNameException() {\n    throw new Error(\n        `If ngModel is used within a form tag, either the name attribute must be set or the form\n      control must be defined as 'standalone' in ngModelOptions.\n\n      Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n      Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">`);\n  }\n\n  static modelGroupParentException() {\n    throw new Error(`\n      ngModelGroup cannot be used with a parent formGroup directive.\n\n      Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n      ${Examples.formGroupName}\n\n      Option 2:  Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n      ${Examples.ngModelGroup}`);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, forwardRef, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf} from '@angular/core';\n\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {NgForm} from './ng_form';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\nexport const modelGroupProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => NgModelGroup)\n};\n\n/**\n * @description\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (within `<form>` tags).\n *\n * Use this directive to validate a sub-group of your form separately from the\n * rest of your form, or if some values in your domain model make more sense\n * to consume together in a nested object.\n *\n * Provide a name for the sub-group and it will become the key\n * for the sub-group in the form's full value. If you need direct access, export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * @usageNotes\n *\n * ### Consuming controls in a grouping\n *\n * The following example shows you how to combine controls together in a sub-group\n * of the form.\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'})\nexport class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n  /**\n   * @description\n   * Tracks the name of the `NgModelGroup` bound to the directive. The name corresponds\n   * to a key in the parent `NgForm`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngModelGroup') name!: string;\n\n  constructor(\n      @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /** @internal */\n  _checkParentType(): void {\n    if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm) &&\n        (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      TemplateDrivenErrors.modelGroupParentException();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, forwardRef, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges} from '@angular/core';\n\nimport {FormControl, FormHooks} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NgForm} from './ng_form';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared';\nimport {TemplateDrivenErrors} from './template_driven_errors';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport const formControlBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => NgModel)\n};\n\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n * <div>{{myModel.valid}}</div>\n * <input [(ngModel)]=\"myValue\" #myModel=\"ngModel\">\n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have and old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n *\n * Notes:\n * - this is just one extra run no matter how many `ngModel` have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = (() => Promise.resolve(null))();\n\n/**\n * @description\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance tracks the value, user interaction, and\n * validation status of the control and keeps the view synced with the model. If used\n * within a parent form, the directive also registers itself with the form as a child\n * control.\n *\n * This directive is used by itself or as part of a larger form. Use the\n * `ngModel` selector to activate it.\n *\n * It accepts a domain model as an optional `Input`. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the value of the domain model in the component\n * class sets the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-box syntax'), the value in the UI always syncs back to\n * the domain model in your class.\n *\n * To inspect the properties of the associated `FormControl` (like validity state),\n * export the directive into a local template variable using `ngModel` as the key (ex:\n * `#myVar=\"ngModel\"`). You then access the control using the directive's `control` property, but\n * most properties used (like `valid` and `dirty`) fall through to the control anyway for direct\n * access. See a full list of properties directly available in `AbstractControlDirective`.\n *\n * @see `RadioControlValueAccessor`\n * @see `SelectControlValueAccessor`\n *\n * @usageNotes\n *\n * ### Using ngModel on a standalone control\n *\n * The following examples show a simple standalone control using `ngModel`:\n *\n * {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n *\n * When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n *\n * In the context of a parent form, it's often unnecessary to include one-way or two-way binding,\n * as the parent form syncs the value for you. You access its properties by exporting it into a\n * local template variable using `ngForm` such as (`#f=\"ngForm\"`). Use the variable where\n * needed on form submission.\n *\n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n *\n * ### Using ngModel within a form\n *\n * The following example shows controls using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * ### Using a standalone ngModel within a group\n *\n * The following example shows you how to use a standalone ngModel control\n * within a form. This controls the display of the form, but doesn't contain form data.\n *\n * ```html\n * <form>\n *   <input name=\"login\" ngModel placeholder=\"Login\">\n *   <input type=\"checkbox\" ngModel [ngModelOptions]=\"{standalone: true}\"> Show more options?\n * </form>\n * <!-- form value: {login: ''} -->\n * ```\n *\n * ### Setting the ngModel name attribute through options\n *\n * The following example shows you an alternate way to set the name attribute. The name attribute is\n * used within a custom form component, and the name `@Input` property serves a different purpose.\n *\n * ```html\n * <form>\n *   <my-person-control name=\"Nancy\" ngModel [ngModelOptions]=\"{name: 'user'}\">\n *   </my-person-control>\n * </form>\n * <!-- form value: {user: ''} -->\n * ```\n *\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[ngModel]:not([formControlName]):not([formControl])',\n  providers: [formControlBinding],\n  exportAs: 'ngModel'\n})\nexport class NgModel extends NgControl implements OnChanges, OnDestroy {\n  public readonly control: FormControl = new FormControl();\n\n  // At runtime we coerce arbitrary values assigned to the \"disabled\" input to a \"boolean\".\n  // This is not reflected in the type of the property because outside of templates, consumers\n  // should only deal with booleans. In templates, a string is allowed for convenience and to\n  // match the native \"disabled attribute\" semantics which can be observed on input elements.\n  // This static member tells the compiler that values of type \"string\" can also be assigned\n  // to the input in a template.\n  /** @nodoc */\n  static ngAcceptInputType_isDisabled: boolean|string;\n\n  /** @internal */\n  _registered = false;\n\n  /**\n   * Internal reference to the view model value.\n   * @nodoc\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the name bound to the directive. The parent form\n   * uses this name as a key to retrieve this control's value.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input() name!: string;\n\n  /**\n   * @description\n   * Tracks whether the control is disabled.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('disabled') isDisabled!: boolean;\n\n  /**\n   * @description\n   * Tracks the value bound to this directive.\n   */\n  @Input('ngModel') model: any;\n\n  /**\n   * @description\n   * Tracks the configuration options for this `ngModel` instance.\n   *\n   * **name**: An alternative to setting the name attribute on the form control element. See\n   * the [example](api/forms/NgModel#using-ngmodel-on-a-standalone-control) for using `NgModel`\n   * as a standalone control.\n   *\n   * **standalone**: When set to true, the `ngModel` will not register itself with its parent form,\n   * and acts as if it's not in the form. Defaults to false.\n   *\n   * **updateOn**: Defines the event upon which the form control value and validity update.\n   * Defaults to 'change'. Possible values: `'change'` | `'blur'` | `'submit'`.\n   *\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('ngModelOptions') options!: {name?: string, standalone?: boolean, updateOn?: FormHooks};\n\n  /**\n   * @description\n   * Event emitter for producing the `ngModelChange` event after\n   * the view model updates.\n   */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  constructor(\n      @Optional() @Host() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators:\n          Array<AsyncValidator|AsyncValidatorFn>,\n      @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[]) {\n    super();\n    this._parent = parent;\n    this._rawValidators = validators || [];\n    this._rawAsyncValidators = asyncValidators || [];\n    this.valueAccessor = selectValueAccessor(this, valueAccessors);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    this._checkForErrors();\n    if (!this._registered) this._setUpControl();\n    if ('isDisabled' in changes) {\n      this._updateDisabled(changes);\n    }\n\n    if (isPropertyUpdated(changes, this.viewModel)) {\n      this._updateValue(this.model);\n      this.viewModel = this.model;\n    }\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    this.formDirective && this.formDirective.removeControl(this);\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] {\n    return this._parent ? controlPath(this.name, this._parent) : [this.name];\n  }\n\n  /**\n   * @description\n   * The top-level directive for this control if present, otherwise null.\n   */\n  get formDirective(): any {\n    return this._parent ? this._parent.formDirective : null;\n  }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators\n   * registered with this directive.\n   */\n  get validator(): ValidatorFn|null {\n    return composeValidators(this._rawValidators);\n  }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this\n   * directive.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._rawAsyncValidators);\n  }\n\n  /**\n   * @description\n   * Sets the new value for the view model and emits an `ngModelChange` event.\n   *\n   * @param newValue The new value emitted by `ngModelChange`.\n   */\n  viewToModelUpdate(newValue: any): void {\n    this.viewModel = newValue;\n    this.update.emit(newValue);\n  }\n\n  private _setUpControl(): void {\n    this._setUpdateStrategy();\n    this._isStandalone() ? this._setUpStandalone() : this.formDirective.addControl(this);\n    this._registered = true;\n  }\n\n  private _setUpdateStrategy(): void {\n    if (this.options && this.options.updateOn != null) {\n      this.control._updateOn = this.options.updateOn;\n    }\n  }\n\n  private _isStandalone(): boolean {\n    return !this._parent || !!(this.options && this.options.standalone);\n  }\n\n  private _setUpStandalone(): void {\n    setUpControl(this.control, this);\n    this.control.updateValueAndValidity({emitEvent: false});\n  }\n\n  private _checkForErrors(): void {\n    if (!this._isStandalone()) {\n      this._checkParentType();\n    }\n    this._checkName();\n  }\n\n  private _checkParentType(): void {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      if (!(this._parent instanceof NgModelGroup) &&\n          this._parent instanceof AbstractFormGroupDirective) {\n        TemplateDrivenErrors.formGroupNameException();\n      } else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n        TemplateDrivenErrors.modelParentException();\n      }\n    }\n  }\n\n  private _checkName(): void {\n    if (this.options && this.options.name) this.name = this.options.name;\n\n    if (!this._isStandalone() && !this.name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      TemplateDrivenErrors.missingNameException();\n    }\n  }\n\n  private _updateValue(value: any): void {\n    resolvedPromise.then(() => {\n      this.control.setValue(value, {emitViewToModelChange: false});\n    });\n  }\n\n  private _updateDisabled(changes: SimpleChanges) {\n    const disabledValue = changes['isDisabled'].currentValue;\n\n    const isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');\n\n    resolvedPromise.then(() => {\n      if (isDisabled && !this.control.disabled) {\n        this.control.disable();\n      } else if (!isDisabled && this.control.disabled) {\n        this.control.enable();\n      }\n    });\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive} from '@angular/core';\n\n/**\n * @description\n *\n * Adds `novalidate` attribute to all forms by default.\n *\n * `novalidate` is used to disable browser's native form validation.\n *\n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n *\n * ```\n * <form ngNativeValidate></form>\n * ```\n *\n * @publicApi\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n */\n@Directive({\n  selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n  host: {'novalidate': ''},\n})\nexport class ɵNgNoValidate {\n}\n\nexport {ɵNgNoValidate as NgNoValidate};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, forwardRef, Inject, InjectionToken, Input, OnChanges, Optional, Output, Self, SimpleChanges} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\n\n/**\n * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nexport const NG_MODEL_WITH_FORM_CONTROL_WARNING =\n    new InjectionToken('NgModelWithFormControlWarning');\n\nexport const formControlBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => FormControlDirective)\n};\n\n/**\n * @description\n * Synchronizes a standalone `FormControl` instance to a form control element.\n *\n * Note that support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives was deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * The following example shows how to register a standalone control and set its value.\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})\n\nexport class FormControlDirective extends NgControl implements OnChanges {\n  /**\n   * Internal reference to the view model value.\n   * @nodoc\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the `FormControl` instance bound to the directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formControl') form!: FormControl;\n\n  /**\n   * @description\n   * Triggers a warning in dev mode that this input should not be used with reactive forms.\n   */\n  @Input('disabled')\n  set isDisabled(isDisabled: boolean) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      ReactiveErrors.disabledAttrWarning();\n    }\n  }\n\n  // TODO(kara): remove next 4 properties once deprecation period is over\n\n  /** @deprecated as of v6 */\n  @Input('ngModel') model: any;\n\n  /** @deprecated as of v6 */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  /**\n   * @description\n   * Static property used to track whether any ngModel warnings have been sent across\n   * all instances of FormControlDirective. Used to support warning config of \"once\".\n   *\n   * @internal\n   */\n  static _ngModelWarningSentOnce = false;\n\n  /**\n   * @description\n   * Instance property used to track whether an ngModel warning has been sent out for this\n   * particular `FormControlDirective` instance. Used to support warning config of \"always\".\n   *\n   * @internal\n   */\n  _ngModelWarningSent = false;\n\n  constructor(\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators:\n          Array<AsyncValidator|AsyncValidatorFn>,\n      @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n      @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|\n      null) {\n    super();\n    this._rawValidators = validators || [];\n    this._rawAsyncValidators = asyncValidators || [];\n    this.valueAccessor = selectValueAccessor(this, valueAccessors);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    if (this._isControlChanged(changes)) {\n      setUpControl(this.form, this);\n      if (this.control.disabled && this.valueAccessor!.setDisabledState) {\n        this.valueAccessor!.setDisabledState!(true);\n      }\n      this.form.updateValueAndValidity({emitEvent: false});\n    }\n    if (isPropertyUpdated(changes, this.viewModel)) {\n      _ngModelWarning('formControl', FormControlDirective, this, this._ngModelWarningConfig);\n      this.form.setValue(this.model);\n      this.viewModel = this.model;\n    }\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] {\n    return [];\n  }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators\n   * registered with this directive.\n   */\n  get validator(): ValidatorFn|null {\n    return composeValidators(this._rawValidators);\n  }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this\n   * directive.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._rawAsyncValidators);\n  }\n\n  /**\n   * @description\n   * The `FormControl` bound to this directive.\n   */\n  get control(): FormControl {\n    return this.form;\n  }\n\n  /**\n   * @description\n   * Sets the new value for the view model and emits an `ngModelChange` event.\n   *\n   * @param newValue The new value for the view model.\n   */\n  viewToModelUpdate(newValue: any): void {\n    this.viewModel = newValue;\n    this.update.emit(newValue);\n  }\n\n  private _isControlChanged(changes: {[key: string]: any}): boolean {\n    return changes.hasOwnProperty('form');\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, forwardRef, Inject, Input, OnChanges, Optional, Output, Self, SimpleChanges} from '@angular/core';\n\nimport {FormArray, FormControl, FormGroup} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from '../../validators';\nimport {ControlContainer} from '../control_container';\nimport {Form} from '../form_interface';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {cleanUpControl, composeAsyncValidators, composeValidators, removeDir, setUpControl, setUpFormContainer, syncPendingControls} from '../shared';\n\nimport {FormControlName} from './form_control_name';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const formDirectiveProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormGroupDirective)\n};\n\n/**\n * @description\n *\n * Binds an existing `FormGroup` to a DOM element.\n *\n * This directive accepts an existing `FormGroup` instance. It will then use this\n * `FormGroup` instance to match any child `FormControl`, `FormGroup`,\n * and `FormArray` instances to child `FormControlName`, `FormGroupName`,\n * and `FormArrayName` directives.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * ### Register Form Group\n *\n * The following example registers a `FormGroup` with first name and last name controls,\n * and listens for the *ngSubmit* event when the button is clicked.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[formGroup]',\n  providers: [formDirectiveProvider],\n  host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n  exportAs: 'ngForm'\n})\nexport class FormGroupDirective extends ControlContainer implements Form, OnChanges {\n  /**\n   * @description\n   * Reports whether the form submission has been triggered.\n   */\n  public readonly submitted: boolean = false;\n\n  // TODO(issue/24571): remove '!'.\n  private _oldForm!: FormGroup;\n\n  /**\n   * @description\n   * Tracks the list of added `FormControlName` instances\n   */\n  directives: FormControlName[] = [];\n\n  /**\n   * @description\n   * Tracks the `FormGroup` bound to this directive.\n   */\n  @Input('formGroup') form: FormGroup = null!;\n\n  /**\n   * @description\n   * Emits an event when the form submission has been triggered.\n   */\n  @Output() ngSubmit = new EventEmitter();\n\n  constructor(\n      @Optional() @Self() @Inject(NG_VALIDATORS) private _validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) private _asyncValidators: any[]) {\n    super();\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    this._checkFormPresent();\n    if (changes.hasOwnProperty('form')) {\n      this._updateValidators();\n      this._updateDomValue();\n      this._updateRegistrations();\n    }\n  }\n\n  /**\n   * @description\n   * Returns this directive's instance.\n   */\n  get formDirective(): Form {\n    return this;\n  }\n\n  /**\n   * @description\n   * Returns the `FormGroup` bound to this directive.\n   */\n  get control(): FormGroup {\n    return this.form;\n  }\n\n  /**\n   * @description\n   * Returns an array representing the path to this group. Because this directive\n   * always lives at the top level of a form, it always an empty array.\n   */\n  get path(): string[] {\n    return [];\n  }\n\n  /**\n   * @description\n   * Method that sets up the control directive in this group, re-calculates its value\n   * and validity, and adds the instance to the internal list of directives.\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  addControl(dir: FormControlName): FormControl {\n    const ctrl: any = this.form.get(dir.path);\n    setUpControl(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n    this.directives.push(dir);\n    return ctrl;\n  }\n\n  /**\n   * @description\n   * Retrieves the `FormControl` instance from the provided `FormControlName` directive\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  getControl(dir: FormControlName): FormControl {\n    return <FormControl>this.form.get(dir.path);\n  }\n\n  /**\n   * @description\n   * Removes the `FormControlName` instance from the internal list of directives\n   *\n   * @param dir The `FormControlName` directive instance.\n   */\n  removeControl(dir: FormControlName): void {\n    removeDir<FormControlName>(this.directives, dir);\n  }\n\n  /**\n   * Adds a new `FormGroupName` directive instance to the form.\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  addFormGroup(dir: FormGroupName): void {\n    const ctrl: any = this.form.get(dir.path);\n    setUpFormContainer(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n  }\n\n  /**\n   * No-op method to remove the form group.\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  removeFormGroup(dir: FormGroupName): void {}\n\n  /**\n   * @description\n   * Retrieves the `FormGroup` for a provided `FormGroupName` directive instance\n   *\n   * @param dir The `FormGroupName` directive instance.\n   */\n  getFormGroup(dir: FormGroupName): FormGroup {\n    return <FormGroup>this.form.get(dir.path);\n  }\n\n  /**\n   * Adds a new `FormArrayName` directive instance to the form.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  addFormArray(dir: FormArrayName): void {\n    const ctrl: any = this.form.get(dir.path);\n    setUpFormContainer(ctrl, dir);\n    ctrl.updateValueAndValidity({emitEvent: false});\n  }\n\n  /**\n   * No-op method to remove the form array.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  removeFormArray(dir: FormArrayName): void {}\n\n  /**\n   * @description\n   * Retrieves the `FormArray` for a provided `FormArrayName` directive instance.\n   *\n   * @param dir The `FormArrayName` directive instance.\n   */\n  getFormArray(dir: FormArrayName): FormArray {\n    return <FormArray>this.form.get(dir.path);\n  }\n\n  /**\n   * Sets the new value for the provided `FormControlName` directive.\n   *\n   * @param dir The `FormControlName` directive instance.\n   * @param value The new value for the directive's control.\n   */\n  updateModel(dir: FormControlName, value: any): void {\n    const ctrl  = <FormControl>this.form.get(dir.path);\n    ctrl.setValue(value);\n  }\n\n  /**\n   * @description\n   * Method called with the \"submit\" event is triggered on the form.\n   * Triggers the `ngSubmit` emitter to emit the \"submit\" event as its payload.\n   *\n   * @param $event The \"submit\" event object\n   */\n  onSubmit($event: Event): boolean {\n    (this as {submitted: boolean}).submitted = true;\n    syncPendingControls(this.form, this.directives);\n    this.ngSubmit.emit($event);\n    return false;\n  }\n\n  /**\n   * @description\n   * Method called when the \"reset\" event is triggered on the form.\n   */\n  onReset(): void {\n    this.resetForm();\n  }\n\n  /**\n   * @description\n   * Resets the form to an initial value and resets its submitted status.\n   *\n   * @param value The new value for the form.\n   */\n  resetForm(value: any = undefined): void {\n    this.form.reset(value);\n    (this as {submitted: boolean}).submitted = false;\n  }\n\n\n  /** @internal */\n  _updateDomValue() {\n    this.directives.forEach(dir => {\n      const newCtrl: any = this.form.get(dir.path);\n      if (dir.control !== newCtrl) {\n        cleanUpControl(dir.control, dir);\n        if (newCtrl) setUpControl(newCtrl, dir);\n        (dir as {control: FormControl}).control = newCtrl;\n      }\n    });\n\n    this.form._updateTreeValidity({emitEvent: false});\n  }\n\n  private _updateRegistrations() {\n    this.form._registerOnCollectionChange(() => this._updateDomValue());\n    if (this._oldForm) this._oldForm._registerOnCollectionChange(() => {});\n    this._oldForm = this.form;\n  }\n\n  private _updateValidators() {\n    const sync = composeValidators(this._validators);\n    this.form.validator = Validators.compose([this.form.validator!, sync!]);\n\n    const async = composeAsyncValidators(this._asyncValidators);\n    this.form.asyncValidator = Validators.composeAsync([this.form.asyncValidator!, async!]);\n  }\n\n  private _checkFormPresent() {\n    if (!this.form && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      ReactiveErrors.missingFormException();\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, forwardRef, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf} from '@angular/core';\n\nimport {FormArray} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, controlPath} from '../shared';\nimport {AsyncValidatorFn, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\n\nexport const formGroupNameProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormGroupName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormGroup` to a DOM element.\n *\n * This directive can only be used with a parent `FormGroupDirective`.\n *\n * It accepts the string name of the nested `FormGroup` to link, and\n * looks for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Use nested form groups to validate a sub-group of a\n * form separately from the rest or to group the values of certain\n * controls into their own nested object.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @usageNotes\n *\n * ### Access the group by name\n *\n * The following example uses the {@link AbstractControl#get get} method to access the\n * associated `FormGroup`\n *\n * ```ts\n *   this.form.get('name');\n * ```\n *\n * ### Access individual controls in the group\n *\n * The following example uses the {@link AbstractControl#get get} method to access\n * individual controls within the group using dot syntax.\n *\n * ```ts\n *   this.form.get('name.first');\n * ```\n *\n * ### Register a nested `FormGroup`.\n *\n * The following example registers a nested *name* `FormGroup` within an existing `FormGroup`,\n * and provides methods to retrieve the nested `FormGroup` and individual controls.\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})\nexport class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n  /**\n   * @description\n   * Tracks the name of the `FormGroup` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   * Accepts a name as a string or a number.\n   * The name in the form of a string is useful for individual forms,\n   * while the numerical form allows for form groups to be bound\n   * to indices when iterating over groups in a `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formGroupName') name!: string|number|null;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /** @internal */\n  _checkParentType(): void {\n    if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      ReactiveErrors.groupParentException();\n    }\n  }\n}\n\nexport const formArrayNameProvider: any = {\n  provide: ControlContainer,\n  useExisting: forwardRef(() => FormArrayName)\n};\n\n/**\n * @description\n *\n * Syncs a nested `FormArray` to a DOM element.\n *\n * This directive is designed to be used with a parent `FormGroupDirective` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormArray` you want to link, and\n * will look for a `FormArray` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})\nexport class FormArrayName extends ControlContainer implements OnInit, OnDestroy {\n  /** @internal */\n  _parent: ControlContainer;\n\n  /** @internal */\n  _validators: any[];\n\n  /** @internal */\n  _asyncValidators: any[];\n\n  /**\n   * @description\n   * Tracks the name of the `FormArray` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   * Accepts a name as a string or a number.\n   * The name in the form of a string is useful for individual forms,\n   * while the numerical form allows for form arrays to be bound\n   * to indices when iterating over arrays in a `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formArrayName') name!: string|number|null;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: any[],\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators: any[]) {\n    super();\n    this._parent = parent;\n    this._validators = validators;\n    this._asyncValidators = asyncValidators;\n  }\n\n  /**\n   * A lifecycle method called when the directive's inputs are initialized. For internal use only.\n   * @throws If the directive does not have a valid parent.\n   * @nodoc\n   */\n  ngOnInit(): void {\n    this._checkParentType();\n    this.formDirective!.addFormArray(this);\n  }\n\n  /**\n   * A lifecycle method called before the directive's instance is destroyed. For internal use only.\n   * @nodoc\n   */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      this.formDirective.removeFormArray(this);\n    }\n  }\n\n  /**\n   * @description\n   * The `FormArray` bound to this directive.\n   */\n  get control(): FormArray {\n    return this.formDirective!.getFormArray(this);\n  }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): FormGroupDirective|null {\n    return this._parent ? <FormGroupDirective>this._parent.formDirective : null;\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] {\n    return controlPath(this.name == null ? this.name : this.name.toString(), this._parent);\n  }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators registered with this\n   * directive.\n   */\n  get validator(): ValidatorFn|null {\n    return composeValidators(this._validators);\n  }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this directive.\n   */\n  get asyncValidator(): AsyncValidatorFn|null {\n    return composeAsyncValidators(this._asyncValidators);\n  }\n\n  private _checkParentType(): void {\n    if (_hasInvalidParent(this._parent) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      ReactiveErrors.arrayParentException();\n    }\n  }\n}\n\nfunction _hasInvalidParent(parent: ControlContainer): boolean {\n  return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n      !(parent instanceof FormArrayName);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, EventEmitter, forwardRef, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, SkipSelf} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {_ngModelWarning, composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {NG_MODEL_WITH_FORM_CONTROL_WARNING} from './form_control_directive';\nimport {FormGroupDirective} from './form_group_directive';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const controlNameBinding: any = {\n  provide: NgControl,\n  useExisting: forwardRef(() => FormControlName)\n};\n\n/**\n * @description\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * @see [Reactive Forms Guide](guide/reactive-forms)\n * @see `FormControl`\n * @see `AbstractControl`\n *\n * @usageNotes\n *\n * ### Register `FormControl` within a group\n *\n * The following example shows how to register multiple form controls within a form group\n * and set their value.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * To see `formControlName` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * ### Use with ngModel is deprecated\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and is scheduled for removal in\n * a future version of Angular.\n *\n * For details, see [Deprecated features](guide/deprecations#ngmodel-with-reactive-forms).\n *\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({selector: '[formControlName]', providers: [controlNameBinding]})\nexport class FormControlName extends NgControl implements OnChanges, OnDestroy {\n  private _added = false;\n  /**\n   * Internal reference to the view model value.\n   * @internal\n   */\n  viewModel: any;\n\n  /**\n   * @description\n   * Tracks the `FormControl` instance bound to the directive.\n   */\n  // TODO(issue/24571): remove '!'.\n  readonly control!: FormControl;\n\n  /**\n   * @description\n   * Tracks the name of the `FormControl` bound to the directive. The name corresponds\n   * to a key in the parent `FormGroup` or `FormArray`.\n   * Accepts a name as a string or a number.\n   * The name in the form of a string is useful for individual forms,\n   * while the numerical form allows for form controls to be bound\n   * to indices when iterating over controls in a `FormArray`.\n   */\n  // TODO(issue/24571): remove '!'.\n  @Input('formControlName') name!: string|number|null;\n\n  /**\n   * @description\n   * Triggers a warning in dev mode that this input should not be used with reactive forms.\n   */\n  @Input('disabled')\n  set isDisabled(isDisabled: boolean) {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      ReactiveErrors.disabledAttrWarning();\n    }\n  }\n\n  // TODO(kara): remove next 4 properties once deprecation period is over\n\n  /** @deprecated as of v6 */\n  @Input('ngModel') model: any;\n\n  /** @deprecated as of v6 */\n  @Output('ngModelChange') update = new EventEmitter();\n\n  /**\n   * @description\n   * Static property used to track whether any ngModel warnings have been sent across\n   * all instances of FormControlName. Used to support warning config of \"once\".\n   *\n   * @internal\n   */\n  static _ngModelWarningSentOnce = false;\n\n  /**\n   * @description\n   * Instance property used to track whether an ngModel warning has been sent out for this\n   * particular FormControlName instance. Used to support warning config of \"always\".\n   *\n   * @internal\n   */\n  _ngModelWarningSent = false;\n\n  constructor(\n      @Optional() @Host() @SkipSelf() parent: ControlContainer,\n      @Optional() @Self() @Inject(NG_VALIDATORS) validators: Array<Validator|ValidatorFn>,\n      @Optional() @Self() @Inject(NG_ASYNC_VALIDATORS) asyncValidators:\n          Array<AsyncValidator|AsyncValidatorFn>,\n      @Optional() @Self() @Inject(NG_VALUE_ACCESSOR) valueAccessors: ControlValueAccessor[],\n      @Optional() @Inject(NG_MODEL_WITH_FORM_CONTROL_WARNING) private _ngModelWarningConfig: string|\n      null) {\n    super();\n    this._parent = parent;\n    this._rawValidators = validators || [];\n    this._rawAsyncValidators = asyncValidators || [];\n    this.valueAccessor = selectValueAccessor(this, valueAccessors);\n  }\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges) {\n    if (!this._added) this._setUpControl();\n    if (isPropertyUpdated(changes, this.viewModel)) {\n      _ngModelWarning('formControlName', FormControlName, this, this._ngModelWarningConfig);\n      this.viewModel = this.model;\n      this.formDirective.updateModel(this, this.model);\n    }\n  }\n\n  /** @nodoc */\n  ngOnDestroy(): void {\n    if (this.formDirective) {\n      this.formDirective.removeControl(this);\n    }\n  }\n\n  /**\n   * @description\n   * Sets the new value for the view model and emits an `ngModelChange` event.\n   *\n   * @param newValue The new value for the view model.\n   */\n  viewToModelUpdate(newValue: any): void {\n    this.viewModel = newValue;\n    this.update.emit(newValue);\n  }\n\n  /**\n   * @description\n   * Returns an array that represents the path from the top-level form to this control.\n   * Each index is the string name of the control on that level.\n   */\n  get path(): string[] {\n    return controlPath(this.name == null ? this.name : this.name.toString(), this._parent!);\n  }\n\n  /**\n   * @description\n   * The top-level directive for this group if present, otherwise null.\n   */\n  get formDirective(): any {\n    return this._parent ? this._parent.formDirective : null;\n  }\n\n  /**\n   * @description\n   * Synchronous validator function composed of all the synchronous validators\n   * registered with this directive.\n   */\n  get validator(): ValidatorFn|null {\n    return composeValidators(this._rawValidators);\n  }\n\n  /**\n   * @description\n   * Async validator function composed of all the async validators registered with this\n   * directive.\n   */\n  get asyncValidator(): AsyncValidatorFn {\n    return composeAsyncValidators(this._rawAsyncValidators)!;\n  }\n\n  private _checkParentType(): void {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      if (!(this._parent instanceof FormGroupName) &&\n          this._parent instanceof AbstractFormGroupDirective) {\n        ReactiveErrors.ngModelGroupException();\n      } else if (\n          !(this._parent instanceof FormGroupName) &&\n          !(this._parent instanceof FormGroupDirective) &&\n          !(this._parent instanceof FormArrayName)) {\n        ReactiveErrors.controlParentException();\n      }\n    }\n  }\n\n  private _setUpControl() {\n    this._checkParentType();\n    (this as {control: FormControl}).control = this.formDirective.addControl(this);\n    if (this.control.disabled && this.valueAccessor!.setDisabledState) {\n      this.valueAccessor!.setDisabledState!(true);\n    }\n    this._added = true;\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, forwardRef, Input, OnChanges, SimpleChanges, StaticProvider} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nimport {AbstractControl} from '../model';\nimport {NG_VALIDATORS, Validators} from '../validators';\n\n\n/**\n * @description\n * Defines the map of errors returned from failed validation checks.\n *\n * @publicApi\n */\nexport type ValidationErrors = {\n  [key: string]: any\n};\n\n/**\n * @description\n * An interface implemented by classes that perform synchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom validator\n *\n * The following example implements the `Validator` interface to create a\n * validator directive with a custom error key.\n *\n * ```typescript\n * @Directive({\n *   selector: '[customValidator]',\n *   providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n *   validate(control: AbstractControl): ValidationErrors|null {\n *     return {'custom': true};\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface Validator {\n  /**\n   * @description\n   * Method that performs synchronous validation against the provided control.\n   *\n   * @param control The control to validate against.\n   *\n   * @returns A map of validation errors if validation fails,\n   * otherwise null.\n   */\n  validate(control: AbstractControl): ValidationErrors|null;\n\n  /**\n   * @description\n   * Registers a callback function to call when the validator inputs change.\n   *\n   * @param fn The callback function\n   */\n  registerOnValidatorChange?(fn: () => void): void;\n}\n\n/**\n * @description\n * An interface implemented by classes that perform asynchronous validation.\n *\n * @usageNotes\n *\n * ### Provide a custom async validator directive\n *\n * The following example implements the `AsyncValidator` interface to create an\n * async validator directive with a custom error key.\n *\n * ```typescript\n * import { of } from 'rxjs';\n *\n * @Directive({\n *   selector: '[customAsyncValidator]',\n *   providers: [{provide: NG_ASYNC_VALIDATORS, useExisting: CustomAsyncValidatorDirective, multi:\n * true}]\n * })\n * class CustomAsyncValidatorDirective implements AsyncValidator {\n *   validate(control: AbstractControl): Observable<ValidationErrors|null> {\n *     return of({'custom': true});\n *   }\n * }\n * ```\n *\n * @publicApi\n */\nexport interface AsyncValidator extends Validator {\n  /**\n   * @description\n   * Method that performs async validation against the provided control.\n   *\n   * @param control The control to validate against.\n   *\n   * @returns A promise or observable that resolves a map of validation errors\n   * if validation fails, otherwise null.\n   */\n  validate(control: AbstractControl):\n      Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `RequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const REQUIRED_VALIDATOR: StaticProvider = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => RequiredValidator),\n  multi: true\n};\n\n/**\n * @description\n * Provider which adds `CheckboxRequiredValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const CHECKBOX_REQUIRED_VALIDATOR: StaticProvider = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => CheckboxRequiredValidator),\n  multi: true\n};\n\n\n/**\n * @description\n * A directive that adds the `required` validator to any controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required validator using template-driven forms\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n * @publicApi\n */\n@Directive({\n  selector:\n      ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n  providers: [REQUIRED_VALIDATOR],\n  host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class RequiredValidator implements Validator {\n  private _required = false;\n  private _onChange?: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the required attribute bound to this directive.\n   */\n  @Input()\n  get required(): boolean|string {\n    return this._required;\n  }\n\n  set required(value: boolean|string) {\n    this._required = value != null && value !== false && `${value}` !== 'false';\n    if (this._onChange) this._onChange();\n  }\n\n  /**\n   * Method that validates whether the control is empty.\n   * Returns the validation result if enabled, otherwise null.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.required ? Validators.required(control) : null;\n  }\n\n  /**\n   * Registers a callback function to call when the validator inputs change.\n   * @nodoc\n   */\n  registerOnValidatorChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n}\n\n\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a required checkbox validator using template-driven forms\n *\n * The following example shows how to add a checkbox required validator to an input attached to an\n * ngModel binding.\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n  selector:\n      'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n  providers: [CHECKBOX_REQUIRED_VALIDATOR],\n  host: {'[attr.required]': 'required ? \"\" : null'}\n})\nexport class CheckboxRequiredValidator extends RequiredValidator {\n  /**\n   * Method that validates whether or not the checkbox has been checked.\n   * Returns the validation result if enabled, otherwise null.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.required ? Validators.requiredTrue(control) : null;\n  }\n}\n\n/**\n * @description\n * Provider which adds `EmailValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const EMAIL_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => EmailValidator),\n  multi: true\n};\n\n/**\n * A directive that adds the `email` validator to controls marked with the\n * `email` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding an email validator\n *\n * The following example shows how to add an email validator to an input attached to an ngModel\n * binding.\n *\n * ```\n * <input type=\"email\" name=\"email\" ngModel email>\n * <input type=\"email\" name=\"email\" ngModel email=\"true\">\n * <input type=\"email\" name=\"email\" ngModel [email]=\"true\">\n * ```\n *\n * @publicApi\n * @ngModule FormsModule\n * @ngModule ReactiveFormsModule\n */\n@Directive({\n  selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n  providers: [EMAIL_VALIDATOR]\n})\nexport class EmailValidator implements Validator {\n  private _enabled = false;\n  private _onChange?: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the email attribute bound to this directive.\n   */\n  @Input()\n  set email(value: boolean|string) {\n    this._enabled = value === '' || value === true || value === 'true';\n    if (this._onChange) this._onChange();\n  }\n\n  /**\n   * Method that validates whether an email address is valid.\n   * Returns the validation result if enabled, otherwise null.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this._enabled ? Validators.email(control) : null;\n  }\n\n  /**\n   * Registers a callback function to call when the validator inputs change.\n   * @nodoc\n   */\n  registerOnValidatorChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n}\n\n/**\n * @description\n * A function that receives a control and synchronously returns a map of\n * validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface ValidatorFn {\n  (control: AbstractControl): ValidationErrors|null;\n}\n\n/**\n * @description\n * A function that receives a control and returns a Promise or observable\n * that emits validation errors if present, otherwise null.\n *\n * @publicApi\n */\nexport interface AsyncValidatorFn {\n  (control: AbstractControl): Promise<ValidationErrors|null>|Observable<ValidationErrors|null>;\n}\n\n/**\n * @description\n * Provider which adds `MinLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MIN_LENGTH_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => MinLengthValidator),\n  multi: true\n};\n\n/**\n * A directive that adds minimum length validation to controls marked with the\n * `minlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a minimum length validator\n *\n * The following example shows how to add a minimum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel minlength=\"4\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n  providers: [MIN_LENGTH_VALIDATOR],\n  host: {'[attr.minlength]': 'minlength ? minlength : null'}\n})\nexport class MinLengthValidator implements Validator, OnChanges {\n  private _validator: ValidatorFn = Validators.nullValidator;\n  private _onChange?: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the the minimum length bound to this directive.\n   */\n  @Input()\n  minlength!: string|number;  // This input is always defined, since the name matches selector.\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('minlength' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * Method that validates whether the value meets a minimum length requirement.\n   * Returns the validation result if enabled, otherwise null.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.minlength == null ? null : this._validator(control);\n  }\n\n  /**\n   * Registers a callback function to call when the validator inputs change.\n   * @nodoc\n   */\n  registerOnValidatorChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n\n  private _createValidator(): void {\n    this._validator = Validators.minLength(\n        typeof this.minlength === 'number' ? this.minlength : parseInt(this.minlength, 10));\n  }\n}\n\n/**\n * @description\n * Provider which adds `MaxLengthValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const MAX_LENGTH_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => MaxLengthValidator),\n  multi: true\n};\n\n/**\n * A directive that adds max length validation to controls marked with the\n * `maxlength` attribute. The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a maximum length validator\n *\n * The following example shows how to add a maximum length validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel maxlength=\"25\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n  providers: [MAX_LENGTH_VALIDATOR],\n  host: {'[attr.maxlength]': 'maxlength ? maxlength : null'}\n})\nexport class MaxLengthValidator implements Validator, OnChanges {\n  private _validator: ValidatorFn = Validators.nullValidator;\n  private _onChange?: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the the maximum length bound to this directive.\n   */\n  @Input()\n  maxlength!: string|number;  // This input is always defined, since the name matches selector.\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('maxlength' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * Method that validates whether the value exceeds the maximum length requirement.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this.maxlength != null ? this._validator(control) : null;\n  }\n\n  /**\n   * Registers a callback function to call when the validator inputs change.\n   * @nodoc\n   */\n  registerOnValidatorChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n\n  private _createValidator(): void {\n    this._validator = Validators.maxLength(\n        typeof this.maxlength === 'number' ? this.maxlength : parseInt(this.maxlength, 10));\n  }\n}\n\n/**\n * @description\n * Provider which adds `PatternValidator` to the `NG_VALIDATORS` multi-provider list.\n */\nexport const PATTERN_VALIDATOR: any = {\n  provide: NG_VALIDATORS,\n  useExisting: forwardRef(() => PatternValidator),\n  multi: true\n};\n\n\n/**\n * @description\n * A directive that adds regex pattern validation to controls marked with the\n * `pattern` attribute. The regex must match the entire control value.\n * The directive is provided with the `NG_VALIDATORS` multi-provider list.\n *\n * @see [Form Validation](guide/form-validation)\n *\n * @usageNotes\n *\n * ### Adding a pattern validator\n *\n * The following example shows how to add a pattern validator to an input attached to an\n * ngModel binding.\n *\n * ```html\n * <input name=\"firstName\" ngModel pattern=\"[a-zA-Z ]*\">\n * ```\n *\n * @ngModule ReactiveFormsModule\n * @ngModule FormsModule\n * @publicApi\n */\n@Directive({\n  selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n  providers: [PATTERN_VALIDATOR],\n  host: {'[attr.pattern]': 'pattern ? pattern : null'}\n})\nexport class PatternValidator implements Validator, OnChanges {\n  private _validator: ValidatorFn = Validators.nullValidator;\n  private _onChange?: () => void;\n\n  /**\n   * @description\n   * Tracks changes to the pattern bound to this directive.\n   */\n  @Input()\n  pattern!: string|RegExp;  // This input is always defined, since the name matches selector.\n\n  /** @nodoc */\n  ngOnChanges(changes: SimpleChanges): void {\n    if ('pattern' in changes) {\n      this._createValidator();\n      if (this._onChange) this._onChange();\n    }\n  }\n\n  /**\n   * Method that validates whether the value matches the the pattern requirement.\n   * @nodoc\n   */\n  validate(control: AbstractControl): ValidationErrors|null {\n    return this._validator(control);\n  }\n\n  /**\n   * Registers a callback function to call when the validator inputs change.\n   * @nodoc\n   */\n  registerOnValidatorChange(fn: () => void): void {\n    this._onChange = fn;\n  }\n\n  private _createValidator(): void {\n    this._validator = Validators.pattern(this.pattern);\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule, Type} from '@angular/core';\n\nimport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nimport {DefaultValueAccessor} from './directives/default_value_accessor';\nimport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nimport {NgForm} from './directives/ng_form';\nimport {NgModel} from './directives/ng_model';\nimport {NgModelGroup} from './directives/ng_model_group';\nimport {NgNoValidate} from './directives/ng_no_validate_directive';\nimport {NumberValueAccessor} from './directives/number_value_accessor';\nimport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nimport {RangeValueAccessor} from './directives/range_value_accessor';\nimport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nimport {FormControlName} from './directives/reactive_directives/form_control_name';\nimport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nimport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nimport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nimport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nimport {CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator} from './directives/validators';\n\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlValueAccessor} from './directives/control_value_accessor';\nexport {DefaultValueAccessor} from './directives/default_value_accessor';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective, NG_MODEL_WITH_FORM_CONTROL_WARNING} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\n\nexport const SHARED_FORM_DIRECTIVES: Type<any>[] = [\n  NgNoValidate,\n  NgSelectOption,\n  NgSelectMultipleOption,\n  DefaultValueAccessor,\n  NumberValueAccessor,\n  RangeValueAccessor,\n  CheckboxControlValueAccessor,\n  SelectControlValueAccessor,\n  SelectMultipleControlValueAccessor,\n  RadioControlValueAccessor,\n  NgControlStatus,\n  NgControlStatusGroup,\n  RequiredValidator,\n  MinLengthValidator,\n  MaxLengthValidator,\n  PatternValidator,\n  CheckboxRequiredValidator,\n  EmailValidator,\n];\n\nexport const TEMPLATE_DRIVEN_DIRECTIVES: Type<any>[] = [NgModel, NgModelGroup, NgForm];\n\nexport const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] =\n    [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\n@NgModule({\n  declarations: SHARED_FORM_DIRECTIVES,\n  exports: SHARED_FORM_DIRECTIVES,\n})\nexport class ɵInternalFormsSharedModule {\n}\n\nexport {ɵInternalFormsSharedModule as InternalFormsSharedModule};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Injectable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from './directives/validators';\nimport {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup, FormHooks} from './model';\n\nfunction isAbstractControlOptions(options: AbstractControlOptions|\n                                  {[key: string]: any}): options is AbstractControlOptions {\n  return (<AbstractControlOptions>options).asyncValidators !== undefined ||\n      (<AbstractControlOptions>options).validators !== undefined ||\n      (<AbstractControlOptions>options).updateOn !== undefined;\n}\n\n/**\n * @description\n * Creates an `AbstractControl` from a user-specified configuration.\n *\n * The `FormBuilder` provides syntactic sugar that shortens creating instances of a `FormControl`,\n * `FormGroup`, or `FormArray`. It reduces the amount of boilerplate needed to build complex\n * forms.\n *\n * @see [Reactive Forms Guide](/guide/reactive-forms)\n *\n * @publicApi\n */\n@Injectable()\nexport class FormBuilder {\n  /**\n   * @description\n   * Construct a new `FormGroup` instance.\n   *\n   * @param controlsConfig A collection of child controls. The key for each child is the name\n   * under which it is registered.\n   *\n   * @param options Configuration options object for the `FormGroup`. The object can\n   * have two shapes:\n   *\n   * 1) `AbstractControlOptions` object (preferred), which consists of:\n   * * `validators`: A synchronous validator function, or an array of validator functions\n   * * `asyncValidators`: A single async validator or array of async validator functions\n   * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' |\n   * submit')\n   *\n   * 2) Legacy configuration object, which consists of:\n   * * `validator`: A synchronous validator function, or an array of validator functions\n   * * `asyncValidator`: A single async validator or array of async validator functions\n   *\n   */\n  group(\n      controlsConfig: {[key: string]: any},\n      options: AbstractControlOptions|{[key: string]: any}|null = null): FormGroup {\n    const controls = this._reduceControls(controlsConfig);\n\n    let validators: ValidatorFn|ValidatorFn[]|null = null;\n    let asyncValidators: AsyncValidatorFn|AsyncValidatorFn[]|null = null;\n    let updateOn: FormHooks|undefined = undefined;\n\n    if (options != null) {\n      if (isAbstractControlOptions(options)) {\n        // `options` are `AbstractControlOptions`\n        validators = options.validators != null ? options.validators : null;\n        asyncValidators = options.asyncValidators != null ? options.asyncValidators : null;\n        updateOn = options.updateOn != null ? options.updateOn : undefined;\n      } else {\n        // `options` are legacy form group options\n        validators = options['validator'] != null ? options['validator'] : null;\n        asyncValidators = options['asyncValidator'] != null ? options['asyncValidator'] : null;\n      }\n    }\n\n    return new FormGroup(controls, {asyncValidators, updateOn, validators});\n  }\n\n  /**\n   * @description\n   * Construct a new `FormControl` with the given state, validators and options.\n   *\n   * @param formState Initializes the control with an initial state value, or\n   * with an object that contains both a value and a disabled status.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains\n   * validation functions and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator\n   * functions.\n   *\n   * @usageNotes\n   *\n   * ### Initialize a control as disabled\n   *\n   * The following example returns a control with an initial value in a disabled state.\n   *\n   * <code-example path=\"forms/ts/formBuilder/form_builder_example.ts\" region=\"disabled-control\">\n   * </code-example>\n   */\n  control(\n      formState: any, validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormControl {\n    return new FormControl(formState, validatorOrOpts, asyncValidator);\n  }\n\n  /**\n   * Constructs a new `FormArray` from the given array of configurations,\n   * validators and options.\n   *\n   * @param controlsConfig An array of child controls or control configs. Each\n   * child control is given an index when it is registered.\n   *\n   * @param validatorOrOpts A synchronous validator function, or an array of\n   * such functions, or an `AbstractControlOptions` object that contains\n   * validation functions and a validation trigger.\n   *\n   * @param asyncValidator A single async validator or array of async validator\n   * functions.\n   */\n  array(\n      controlsConfig: any[],\n      validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null,\n      asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormArray {\n    const controls = controlsConfig.map(c => this._createControl(c));\n    return new FormArray(controls, validatorOrOpts, asyncValidator);\n  }\n\n  /** @internal */\n  _reduceControls(controlsConfig: {[k: string]: any}): {[key: string]: AbstractControl} {\n    const controls: {[key: string]: AbstractControl} = {};\n    Object.keys(controlsConfig).forEach(controlName => {\n      controls[controlName] = this._createControl(controlsConfig[controlName]);\n    });\n    return controls;\n  }\n\n  /** @internal */\n  _createControl(controlConfig: any): AbstractControl {\n    if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n        controlConfig instanceof FormArray) {\n      return controlConfig;\n\n    } else if (Array.isArray(controlConfig)) {\n      const value = controlConfig[0];\n      const validator: ValidatorFn = controlConfig.length > 1 ? controlConfig[1] : null;\n      const asyncValidator: AsyncValidatorFn = controlConfig.length > 2 ? controlConfig[2] : null;\n      return this.control(value, validator, asyncValidator);\n\n    } else {\n      return this.control(controlConfig);\n    }\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n\nimport {Version} from '@angular/core';\n\n/**\n * @publicApi\n */\nexport const VERSION = new Version('10.1.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\nimport {InternalFormsSharedModule, NG_MODEL_WITH_FORM_CONTROL_WARNING, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';\nimport {RadioControlRegistry} from './directives/radio_control_value_accessor';\nimport {FormBuilder} from './form_builder';\n\n/**\n * Exports the required providers and directives for template-driven forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](/guide/forms-overview)\n * @see [Template-driven Forms Guide](/guide/forms)\n *\n * @publicApi\n */\n@NgModule({\n  declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n  providers: [RadioControlRegistry],\n  exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n})\nexport class FormsModule {\n}\n\n/**\n * Exports the required infrastructure and directives for reactive forms,\n * making them available for import by NgModules that import this module.\n *\n * @see [Forms Overview](guide/forms-overview)\n * @see [Reactive Forms Guide](guide/reactive-forms)\n *\n * @publicApi\n */\n@NgModule({\n  declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n  providers: [FormBuilder, RadioControlRegistry],\n  exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n})\nexport class ReactiveFormsModule {\n  /**\n   * @description\n   * Provides options for configuring the reactive forms module.\n   *\n   * @param opts An object of configuration options\n   * * `warnOnNgModelWithFormControl` Configures when to emit a warning when an `ngModel`\n   * binding is used with reactive form directives.\n   */\n  static withConfig(opts: {\n    /** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never'|'once'|'always'\n  }): ModuleWithProviders<ReactiveFormsModule> {\n    return {\n      ngModule: ReactiveFormsModule,\n      providers: [\n        {provide: NG_MODEL_WITH_FORM_CONTROL_WARNING, useValue: opts.warnOnNgModelWithFormControl}\n      ]\n    };\n  }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * This module is used for handling user input, by defining and building a `FormGroup` that\n * consists of `FormControl` objects, and mapping them onto the DOM. `FormControl`\n * objects can then be used to read information from the form DOM elements.\n *\n * Forms providers are not included in default providers; you must import these providers\n * explicitly.\n */\n\n\nexport {ɵInternalFormsSharedModule} from './directives';\nexport {AbstractControlDirective} from './directives/abstract_control_directive';\nexport {AbstractFormGroupDirective} from './directives/abstract_form_group_directive';\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlContainer} from './directives/control_container';\nexport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './directives/control_value_accessor';\nexport {COMPOSITION_BUFFER_MODE, DefaultValueAccessor} from './directives/default_value_accessor';\nexport {Form} from './directives/form_interface';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {ɵNgNoValidate} from './directives/ng_no_validate_directive';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName} from './directives/reactive_directives/form_group_name';\nexport {FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nexport {ɵNgSelectMultipleOption} from './directives/select_multiple_control_value_accessor';\nexport {AsyncValidator, AsyncValidatorFn, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, ValidationErrors, Validator, ValidatorFn} from './directives/validators';\nexport {FormBuilder} from './form_builder';\nexport {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup} from './model';\nexport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from './validators';\nexport {VERSION} from './version';\n\nexport * from './form_providers';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\nexport * from './src/forms';\n\n// This file only reexports content of the `src` folder. Keep it that way.\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n// This file is not used to build this module. It is only used during editing\n// by the TypeScript language service and during build for verification. `ngc`\n// replaces this file with production index.ts when it rewrites private symbol\n// names.\n\nexport * from './public_api';\n","import { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function windowToggle(openings, closingSelector) {\n    return (source) => source.lift(new WindowToggleOperator(openings, closingSelector));\n}\nclass WindowToggleOperator {\n    constructor(openings, closingSelector) {\n        this.openings = openings;\n        this.closingSelector = closingSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));\n    }\n}\nclass WindowToggleSubscriber extends OuterSubscriber {\n    constructor(destination, openings, closingSelector) {\n        super(destination);\n        this.openings = openings;\n        this.closingSelector = closingSelector;\n        this.contexts = [];\n        this.add(this.openSubscription = subscribeToResult(this, openings, openings));\n    }\n    _next(value) {\n        const { contexts } = this;\n        if (contexts) {\n            const len = contexts.length;\n            for (let i = 0; i < len; i++) {\n                contexts[i].window.next(value);\n            }\n        }\n    }\n    _error(err) {\n        const { contexts } = this;\n        this.contexts = null;\n        if (contexts) {\n            const len = contexts.length;\n            let index = -1;\n            while (++index < len) {\n                const context = contexts[index];\n                context.window.error(err);\n                context.subscription.unsubscribe();\n            }\n        }\n        super._error(err);\n    }\n    _complete() {\n        const { contexts } = this;\n        this.contexts = null;\n        if (contexts) {\n            const len = contexts.length;\n            let index = -1;\n            while (++index < len) {\n                const context = contexts[index];\n                context.window.complete();\n                context.subscription.unsubscribe();\n            }\n        }\n        super._complete();\n    }\n    _unsubscribe() {\n        const { contexts } = this;\n        this.contexts = null;\n        if (contexts) {\n            const len = contexts.length;\n            let index = -1;\n            while (++index < len) {\n                const context = contexts[index];\n                context.window.unsubscribe();\n                context.subscription.unsubscribe();\n            }\n        }\n    }\n    notifyNext(outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n        if (outerValue === this.openings) {\n            let closingNotifier;\n            try {\n                const { closingSelector } = this;\n                closingNotifier = closingSelector(innerValue);\n            }\n            catch (e) {\n                return this.error(e);\n            }\n            const window = new Subject();\n            const subscription = new Subscription();\n            const context = { window, subscription };\n            this.contexts.push(context);\n            const innerSubscription = subscribeToResult(this, closingNotifier, context);\n            if (innerSubscription.closed) {\n                this.closeWindow(this.contexts.length - 1);\n            }\n            else {\n                innerSubscription.context = context;\n                subscription.add(innerSubscription);\n            }\n            this.destination.next(window);\n        }\n        else {\n            this.closeWindow(this.contexts.indexOf(outerValue));\n        }\n    }\n    notifyError(err) {\n        this.error(err);\n    }\n    notifyComplete(inner) {\n        if (inner !== this.openSubscription) {\n            this.closeWindow(this.contexts.indexOf(inner.context));\n        }\n    }\n    closeWindow(index) {\n        if (index === -1) {\n            return;\n        }\n        const { contexts } = this;\n        const context = contexts[index];\n        const { window, subscription } = context;\n        contexts.splice(index, 1);\n        window.complete();\n        subscription.unsubscribe();\n    }\n}\n//# sourceMappingURL=windowToggle.js.map","const EmptyErrorImpl = (() => {\n    function EmptyErrorImpl() {\n        Error.call(this);\n        this.message = 'no elements in sequence';\n        this.name = 'EmptyError';\n        return this;\n    }\n    EmptyErrorImpl.prototype = Object.create(Error.prototype);\n    return EmptyErrorImpl;\n})();\nexport const EmptyError = EmptyErrorImpl;\n//# sourceMappingURL=EmptyError.js.map","import { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function timeoutWith(due, withObservable, scheduler = async) {\n    return (source) => {\n        let absoluteTimeout = isDate(due);\n        let waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);\n        return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n    };\n}\nclass TimeoutWithOperator {\n    constructor(waitFor, absoluteTimeout, withObservable, scheduler) {\n        this.waitFor = waitFor;\n        this.absoluteTimeout = absoluteTimeout;\n        this.withObservable = withObservable;\n        this.scheduler = scheduler;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n    }\n}\nclass TimeoutWithSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n        super(destination);\n        this.absoluteTimeout = absoluteTimeout;\n        this.waitFor = waitFor;\n        this.withObservable = withObservable;\n        this.scheduler = scheduler;\n        this.scheduleTimeout();\n    }\n    static dispatchTimeout(subscriber) {\n        const { withObservable } = subscriber;\n        subscriber._unsubscribeAndRecycle();\n        subscriber.add(innerSubscribe(withObservable, new SimpleInnerSubscriber(subscriber)));\n    }\n    scheduleTimeout() {\n        const { action } = this;\n        if (action) {\n            this.action = action.schedule(this, this.waitFor);\n        }\n        else {\n            this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));\n        }\n    }\n    _next(value) {\n        if (!this.absoluteTimeout) {\n            this.scheduleTimeout();\n        }\n        super._next(value);\n    }\n    _unsubscribe() {\n        this.action = undefined;\n        this.scheduler = null;\n        this.withObservable = null;\n    }\n}\n//# sourceMappingURL=timeoutWith.js.map","import { async } from '../scheduler/async';\nimport { TimeoutError } from '../util/TimeoutError';\nimport { timeoutWith } from './timeoutWith';\nimport { throwError } from '../observable/throwError';\nexport function timeout(due, scheduler = async) {\n    return timeoutWith(due, throwError(new TimeoutError()), scheduler);\n}\n//# sourceMappingURL=timeout.js.map","import { SubscribeOnObservable } from '../observable/SubscribeOnObservable';\nexport function subscribeOn(scheduler, delay = 0) {\n    return function subscribeOnOperatorFunction(source) {\n        return source.lift(new SubscribeOnOperator(scheduler, delay));\n    };\n}\nclass SubscribeOnOperator {\n    constructor(scheduler, delay) {\n        this.scheduler = scheduler;\n        this.delay = delay;\n    }\n    call(subscriber, source) {\n        return new SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);\n    }\n}\n//# sourceMappingURL=subscribeOn.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function audit(durationSelector) {\n    return function auditOperatorFunction(source) {\n        return source.lift(new AuditOperator(durationSelector));\n    };\n}\nclass AuditOperator {\n    constructor(durationSelector) {\n        this.durationSelector = durationSelector;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n    }\n}\nclass AuditSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, durationSelector) {\n        super(destination);\n        this.durationSelector = durationSelector;\n        this.hasValue = false;\n    }\n    _next(value) {\n        this.value = value;\n        this.hasValue = true;\n        if (!this.throttled) {\n            let duration;\n            try {\n                const { durationSelector } = this;\n                duration = durationSelector(value);\n            }\n            catch (err) {\n                return this.destination.error(err);\n            }\n            const innerSubscription = innerSubscribe(duration, new SimpleInnerSubscriber(this));\n            if (!innerSubscription || innerSubscription.closed) {\n                this.clearThrottle();\n            }\n            else {\n                this.add(this.throttled = innerSubscription);\n            }\n        }\n    }\n    clearThrottle() {\n        const { value, hasValue, throttled } = this;\n        if (throttled) {\n            this.remove(throttled);\n            this.throttled = undefined;\n            throttled.unsubscribe();\n        }\n        if (hasValue) {\n            this.value = undefined;\n            this.hasValue = false;\n            this.destination.next(value);\n        }\n    }\n    notifyNext() {\n        this.clearThrottle();\n    }\n    notifyComplete() {\n        this.clearThrottle();\n    }\n}\n//# sourceMappingURL=audit.js.map","import { from } from '../observable/from';\nimport { isArray } from '../util/isArray';\nimport { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function onErrorResumeNext(...nextSources) {\n    if (nextSources.length === 1 && isArray(nextSources[0])) {\n        nextSources = nextSources[0];\n    }\n    return (source) => source.lift(new OnErrorResumeNextOperator(nextSources));\n}\nexport function onErrorResumeNextStatic(...nextSources) {\n    let source = undefined;\n    if (nextSources.length === 1 && isArray(nextSources[0])) {\n        nextSources = nextSources[0];\n    }\n    source = nextSources.shift();\n    return from(source).lift(new OnErrorResumeNextOperator(nextSources));\n}\nclass OnErrorResumeNextOperator {\n    constructor(nextSources) {\n        this.nextSources = nextSources;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));\n    }\n}\nclass OnErrorResumeNextSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, nextSources) {\n        super(destination);\n        this.destination = destination;\n        this.nextSources = nextSources;\n    }\n    notifyError() {\n        this.subscribeToNextSource();\n    }\n    notifyComplete() {\n        this.subscribeToNextSource();\n    }\n    _error(err) {\n        this.subscribeToNextSource();\n        this.unsubscribe();\n    }\n    _complete() {\n        this.subscribeToNextSource();\n        this.unsubscribe();\n    }\n    subscribeToNextSource() {\n        const next = this.nextSources.shift();\n        if (!!next) {\n            const innerSubscriber = new SimpleInnerSubscriber(this);\n            const destination = this.destination;\n            destination.add(innerSubscriber);\n            const innerSubscription = innerSubscribe(next, innerSubscriber);\n            if (innerSubscription !== innerSubscriber) {\n                destination.add(innerSubscription);\n            }\n        }\n        else {\n            this.destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=onErrorResumeNext.js.map","import { Subscriber } from '../Subscriber';\nexport function retry(count = -1) {\n    return (source) => source.lift(new RetryOperator(count, source));\n}\nclass RetryOperator {\n    constructor(count, source) {\n        this.count = count;\n        this.source = source;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n    }\n}\nclass RetrySubscriber extends Subscriber {\n    constructor(destination, count, source) {\n        super(destination);\n        this.count = count;\n        this.source = source;\n    }\n    error(err) {\n        if (!this.isStopped) {\n            const { source, count } = this;\n            if (count === 0) {\n                return super.error(err);\n            }\n            else if (count > -1) {\n                this.count = count - 1;\n            }\n            source.subscribe(this._unsubscribeAndRecycle());\n        }\n    }\n}\n//# sourceMappingURL=retry.js.map","import { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n    return function tapOperatorFunction(source) {\n        return source.lift(new DoOperator(nextOrObserver, error, complete));\n    };\n}\nclass DoOperator {\n    constructor(nextOrObserver, error, complete) {\n        this.nextOrObserver = nextOrObserver;\n        this.error = error;\n        this.complete = complete;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n    }\n}\nclass TapSubscriber extends Subscriber {\n    constructor(destination, observerOrNext, error, complete) {\n        super(destination);\n        this._tapNext = noop;\n        this._tapError = noop;\n        this._tapComplete = noop;\n        this._tapError = error || noop;\n        this._tapComplete = complete || noop;\n        if (isFunction(observerOrNext)) {\n            this._context = this;\n            this._tapNext = observerOrNext;\n        }\n        else if (observerOrNext) {\n            this._context = observerOrNext;\n            this._tapNext = observerOrNext.next || noop;\n            this._tapError = observerOrNext.error || noop;\n            this._tapComplete = observerOrNext.complete || noop;\n        }\n    }\n    _next(value) {\n        try {\n            this._tapNext.call(this._context, value);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(value);\n    }\n    _error(err) {\n        try {\n            this._tapError.call(this._context, err);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.error(err);\n    }\n    _complete() {\n        try {\n            this._tapComplete.call(this._context);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        return this.destination.complete();\n    }\n}\n//# sourceMappingURL=tap.js.map","import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';\nexport function skipUntil(notifier) {\n    return (source) => source.lift(new SkipUntilOperator(notifier));\n}\nclass SkipUntilOperator {\n    constructor(notifier) {\n        this.notifier = notifier;\n    }\n    call(destination, source) {\n        return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));\n    }\n}\nclass SkipUntilSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, notifier) {\n        super(destination);\n        this.hasValue = false;\n        const innerSubscriber = new SimpleInnerSubscriber(this);\n        this.add(innerSubscriber);\n        this.innerSubscription = innerSubscriber;\n        const innerSubscription = innerSubscribe(notifier, innerSubscriber);\n        if (innerSubscription !== innerSubscriber) {\n            this.add(innerSubscription);\n            this.innerSubscription = innerSubscription;\n        }\n    }\n    _next(value) {\n        if (this.hasValue) {\n            super._next(value);\n        }\n    }\n    notifyNext() {\n        this.hasValue = true;\n        if (this.innerSubscription) {\n            this.innerSubscription.unsubscribe();\n        }\n    }\n    notifyComplete() {\n    }\n}\n//# sourceMappingURL=skipUntil.js.map","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  return Constructor;\n}","import { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n    return new Subject();\n}\nexport function share() {\n    return (source) => refCount()(multicast(shareSubjectFactory)(source));\n}\n//# sourceMappingURL=share.js.map","import { map } from './map';\nexport function pluck(...properties) {\n    const length = properties.length;\n    if (length === 0) {\n        throw new Error('list of properties cannot be empty.');\n    }\n    return (source) => map(plucker(properties, length))(source);\n}\nfunction plucker(props, length) {\n    const mapper = (x) => {\n        let currentProp = x;\n        for (let i = 0; i < length; i++) {\n            const p = currentProp != null ? currentProp[props[i]] : undefined;\n            if (p !== void 0) {\n                currentProp = p;\n            }\n            else {\n                return undefined;\n            }\n        }\n        return currentProp;\n    };\n    return mapper;\n}\n//# sourceMappingURL=pluck.js.map","import { Subscriber } from '../Subscriber';\nexport function refCount() {\n    return function refCountOperatorFunction(source) {\n        return source.lift(new RefCountOperator(source));\n    };\n}\nclass RefCountOperator {\n    constructor(connectable) {\n        this.connectable = connectable;\n    }\n    call(subscriber, source) {\n        const { connectable } = this;\n        connectable._refCount++;\n        const refCounter = new RefCountSubscriber(subscriber, connectable);\n        const subscription = source.subscribe(refCounter);\n        if (!refCounter.closed) {\n            refCounter.connection = connectable.connect();\n        }\n        return subscription;\n    }\n}\nclass RefCountSubscriber extends Subscriber {\n    constructor(destination, connectable) {\n        super(destination);\n        this.connectable = connectable;\n    }\n    _unsubscribe() {\n        const { connectable } = this;\n        if (!connectable) {\n            this.connection = null;\n            return;\n        }\n        this.connectable = null;\n        const refCount = connectable._refCount;\n        if (refCount <= 0) {\n            this.connection = null;\n            return;\n        }\n        connectable._refCount = refCount - 1;\n        if (refCount > 1) {\n            this.connection = null;\n            return;\n        }\n        const { connection } = this;\n        const sharedConnection = connectable._connection;\n        this.connection = null;\n        if (sharedConnection && (!connection || sharedConnection === connection)) {\n            sharedConnection.unsubscribe();\n        }\n    }\n}\n//# sourceMappingURL=refCount.js.map","import { Subscriber } from '../Subscriber';\nexport function defaultIfEmpty(defaultValue = null) {\n    return (source) => source.lift(new DefaultIfEmptyOperator(defaultValue));\n}\nclass DefaultIfEmptyOperator {\n    constructor(defaultValue) {\n        this.defaultValue = defaultValue;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n    }\n}\nclass DefaultIfEmptySubscriber extends Subscriber {\n    constructor(destination, defaultValue) {\n        super(destination);\n        this.defaultValue = defaultValue;\n        this.isEmpty = true;\n    }\n    _next(value) {\n        this.isEmpty = false;\n        this.destination.next(value);\n    }\n    _complete() {\n        if (this.isEmpty) {\n            this.destination.next(this.defaultValue);\n        }\n        this.destination.complete();\n    }\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nconst toString = (() => Object.prototype.toString)();\nexport function fromEvent(target, eventName, options, resultSelector) {\n    if (isFunction(options)) {\n        resultSelector = options;\n        options = undefined;\n    }\n    if (resultSelector) {\n        return fromEvent(target, eventName, options).pipe(map(args => isArray(args) ? resultSelector(...args) : resultSelector(args)));\n    }\n    return new Observable(subscriber => {\n        function handler(e) {\n            if (arguments.length > 1) {\n                subscriber.next(Array.prototype.slice.call(arguments));\n            }\n            else {\n                subscriber.next(e);\n            }\n        }\n        setupSubscription(target, eventName, handler, subscriber, options);\n    });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n    let unsubscribe;\n    if (isEventTarget(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.addEventListener(eventName, handler, options);\n        unsubscribe = () => source.removeEventListener(eventName, handler, options);\n    }\n    else if (isJQueryStyleEventEmitter(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.on(eventName, handler);\n        unsubscribe = () => source.off(eventName, handler);\n    }\n    else if (isNodeStyleEventEmitter(sourceObj)) {\n        const source = sourceObj;\n        sourceObj.addListener(eventName, handler);\n        unsubscribe = () => source.removeListener(eventName, handler);\n    }\n    else if (sourceObj && sourceObj.length) {\n        for (let i = 0, len = sourceObj.length; i < len; i++) {\n            setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n        }\n    }\n    else {\n        throw new TypeError('Invalid event target');\n    }\n    subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n    return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n    return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscribeToArray(input));\n    }\n    else {\n        return scheduleArray(input, scheduler);\n    }\n}\n//# sourceMappingURL=fromArray.js.map","import { reduce } from './reduce';\nexport function max(comparer) {\n    const max = (typeof comparer === 'function')\n        ? (x, y) => comparer(x, y) > 0 ? x : y\n        : (x, y) => x > y ? x : y;\n    return reduce(max);\n}\n//# sourceMappingURL=max.js.map","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n  'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n    return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n    if (Array.isArray(arg)) {\n        each(arg, context[fn], context);\n        return true;\n    }\n    return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n    var i;\n\n    if (!obj) {\n        return;\n    }\n\n    if (obj.forEach) {\n        obj.forEach(iterator, context);\n    } else if (obj.length !== undefined) {\n        i = 0;\n        while (i < obj.length) {\n            iterator.call(context, obj[i], i, obj);\n            i++;\n        }\n    } else {\n        for (i in obj) {\n            obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n        }\n    }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n    var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n    return function() {\n        var e = new Error('get-stack-trace');\n        var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n            .replace(/^\\s+at\\s+/gm, '')\n            .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n        var log = window.console && (window.console.warn || window.console.log);\n        if (log) {\n            log.call(window.console, deprecationMessage, stack);\n        }\n        return method.apply(this, arguments);\n    };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n    assign = function assign(target) {\n        if (target === undefined || target === null) {\n            throw new TypeError('Cannot convert undefined or null to object');\n        }\n\n        var output = Object(target);\n        for (var index = 1; index < arguments.length; index++) {\n            var source = arguments[index];\n            if (source !== undefined && source !== null) {\n                for (var nextKey in source) {\n                    if (source.hasOwnProperty(nextKey)) {\n                        output[nextKey] = source[nextKey];\n                    }\n                }\n            }\n        }\n        return output;\n    };\n} else {\n    assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n    var keys = Object.keys(src);\n    var i = 0;\n    while (i < keys.length) {\n        if (!merge || (merge && dest[keys[i]] === undefined)) {\n            dest[keys[i]] = src[keys[i]];\n        }\n        i++;\n    }\n    return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n    return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n    var baseP = base.prototype,\n        childP;\n\n    childP = child.prototype = Object.create(baseP);\n    childP.constructor = child;\n    childP._super = baseP;\n\n    if (properties) {\n        assign(childP, properties);\n    }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n    return function boundFn() {\n        return fn.apply(context, arguments);\n    };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n    if (typeof val == TYPE_FUNCTION) {\n        return val.apply(args ? args[0] || undefined : undefined, args);\n    }\n    return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n    return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n    each(splitStr(types), function(type) {\n        target.addEventListener(type, handler, false);\n    });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n    each(splitStr(types), function(type) {\n        target.removeEventListener(type, handler, false);\n    });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n    while (node) {\n        if (node == parent) {\n            return true;\n        }\n        node = node.parentNode;\n    }\n    return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n    return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n    return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n    if (src.indexOf && !findByKey) {\n        return src.indexOf(find);\n    } else {\n        var i = 0;\n        while (i < src.length) {\n            if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n                return i;\n            }\n            i++;\n        }\n        return -1;\n    }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n    return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n    var results = [];\n    var values = [];\n    var i = 0;\n\n    while (i < src.length) {\n        var val = key ? src[i][key] : src[i];\n        if (inArray(values, val) < 0) {\n            results.push(src[i]);\n        }\n        values[i] = val;\n        i++;\n    }\n\n    if (sort) {\n        if (!key) {\n            results = results.sort();\n        } else {\n            results = results.sort(function sortUniqueArray(a, b) {\n                return a[key] > b[key];\n            });\n        }\n    }\n\n    return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n    var prefix, prop;\n    var camelProp = property[0].toUpperCase() + property.slice(1);\n\n    var i = 0;\n    while (i < VENDOR_PREFIXES.length) {\n        prefix = VENDOR_PREFIXES[i];\n        prop = (prefix) ? prefix + camelProp : property;\n\n        if (prop in obj) {\n            return prop;\n        }\n        i++;\n    }\n    return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n    return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n    var doc = element.ownerDocument || element;\n    return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n    var self = this;\n    this.manager = manager;\n    this.callback = callback;\n    this.element = manager.element;\n    this.target = manager.options.inputTarget;\n\n    // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n    // so when disabled the input events are completely bypassed.\n    this.domHandler = function(ev) {\n        if (boolOrFn(manager.options.enable, [manager])) {\n            self.handler(ev);\n        }\n    };\n\n    this.init();\n\n}\n\nInput.prototype = {\n    /**\n     * should handle the inputEvent data and trigger the callback\n     * @virtual\n     */\n    handler: function() { },\n\n    /**\n     * bind the events\n     */\n    init: function() {\n        this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n        this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n        this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n    },\n\n    /**\n     * unbind the events\n     */\n    destroy: function() {\n        this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n        this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n        this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n    }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n    var Type;\n    var inputClass = manager.options.inputClass;\n\n    if (inputClass) {\n        Type = inputClass;\n    } else if (SUPPORT_POINTER_EVENTS) {\n        Type = PointerEventInput;\n    } else if (SUPPORT_ONLY_TOUCH) {\n        Type = TouchInput;\n    } else if (!SUPPORT_TOUCH) {\n        Type = MouseInput;\n    } else {\n        Type = TouchMouseInput;\n    }\n    return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n    var pointersLen = input.pointers.length;\n    var changedPointersLen = input.changedPointers.length;\n    var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n    var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n    input.isFirst = !!isFirst;\n    input.isFinal = !!isFinal;\n\n    if (isFirst) {\n        manager.session = {};\n    }\n\n    // source event is the normalized value of the domEvents\n    // like 'touchstart, mouseup, pointerdown'\n    input.eventType = eventType;\n\n    // compute scale, rotation etc\n    computeInputData(manager, input);\n\n    // emit secret event\n    manager.emit('hammer.input', input);\n\n    manager.recognize(input);\n    manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n    var session = manager.session;\n    var pointers = input.pointers;\n    var pointersLength = pointers.length;\n\n    // store the first input to calculate the distance and direction\n    if (!session.firstInput) {\n        session.firstInput = simpleCloneInputData(input);\n    }\n\n    // to compute scale and rotation we need to store the multiple touches\n    if (pointersLength > 1 && !session.firstMultiple) {\n        session.firstMultiple = simpleCloneInputData(input);\n    } else if (pointersLength === 1) {\n        session.firstMultiple = false;\n    }\n\n    var firstInput = session.firstInput;\n    var firstMultiple = session.firstMultiple;\n    var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n    var center = input.center = getCenter(pointers);\n    input.timeStamp = now();\n    input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n    input.angle = getAngle(offsetCenter, center);\n    input.distance = getDistance(offsetCenter, center);\n\n    computeDeltaXY(session, input);\n    input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n    var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n    input.overallVelocityX = overallVelocity.x;\n    input.overallVelocityY = overallVelocity.y;\n    input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n    input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n    input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n    input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n        session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n    computeIntervalInputData(session, input);\n\n    // find the correct target\n    var target = manager.element;\n    if (hasParent(input.srcEvent.target, target)) {\n        target = input.srcEvent.target;\n    }\n    input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n    var center = input.center;\n    var offset = session.offsetDelta || {};\n    var prevDelta = session.prevDelta || {};\n    var prevInput = session.prevInput || {};\n\n    if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n        prevDelta = session.prevDelta = {\n            x: prevInput.deltaX || 0,\n            y: prevInput.deltaY || 0\n        };\n\n        offset = session.offsetDelta = {\n            x: center.x,\n            y: center.y\n        };\n    }\n\n    input.deltaX = prevDelta.x + (center.x - offset.x);\n    input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n    var last = session.lastInterval || input,\n        deltaTime = input.timeStamp - last.timeStamp,\n        velocity, velocityX, velocityY, direction;\n\n    if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n        var deltaX = input.deltaX - last.deltaX;\n        var deltaY = input.deltaY - last.deltaY;\n\n        var v = getVelocity(deltaTime, deltaX, deltaY);\n        velocityX = v.x;\n        velocityY = v.y;\n        velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n        direction = getDirection(deltaX, deltaY);\n\n        session.lastInterval = input;\n    } else {\n        // use latest velocity info if it doesn't overtake a minimum period\n        velocity = last.velocity;\n        velocityX = last.velocityX;\n        velocityY = last.velocityY;\n        direction = last.direction;\n    }\n\n    input.velocity = velocity;\n    input.velocityX = velocityX;\n    input.velocityY = velocityY;\n    input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n    // make a simple copy of the pointers because we will get a reference if we don't\n    // we only need clientXY for the calculations\n    var pointers = [];\n    var i = 0;\n    while (i < input.pointers.length) {\n        pointers[i] = {\n            clientX: round(input.pointers[i].clientX),\n            clientY: round(input.pointers[i].clientY)\n        };\n        i++;\n    }\n\n    return {\n        timeStamp: now(),\n        pointers: pointers,\n        center: getCenter(pointers),\n        deltaX: input.deltaX,\n        deltaY: input.deltaY\n    };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n    var pointersLength = pointers.length;\n\n    // no need to loop when only one touch\n    if (pointersLength === 1) {\n        return {\n            x: round(pointers[0].clientX),\n            y: round(pointers[0].clientY)\n        };\n    }\n\n    var x = 0, y = 0, i = 0;\n    while (i < pointersLength) {\n        x += pointers[i].clientX;\n        y += pointers[i].clientY;\n        i++;\n    }\n\n    return {\n        x: round(x / pointersLength),\n        y: round(y / pointersLength)\n    };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n    return {\n        x: x / deltaTime || 0,\n        y: y / deltaTime || 0\n    };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n    if (x === y) {\n        return DIRECTION_NONE;\n    }\n\n    if (abs(x) >= abs(y)) {\n        return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n    }\n    return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n    if (!props) {\n        props = PROPS_XY;\n    }\n    var x = p2[props[0]] - p1[props[0]],\n        y = p2[props[1]] - p1[props[1]];\n\n    return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n    if (!props) {\n        props = PROPS_XY;\n    }\n    var x = p2[props[0]] - p1[props[0]],\n        y = p2[props[1]] - p1[props[1]];\n    return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n    return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n    return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n    mousedown: INPUT_START,\n    mousemove: INPUT_MOVE,\n    mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n    this.evEl = MOUSE_ELEMENT_EVENTS;\n    this.evWin = MOUSE_WINDOW_EVENTS;\n\n    this.pressed = false; // mousedown state\n\n    Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n    /**\n     * handle mouse events\n     * @param {Object} ev\n     */\n    handler: function MEhandler(ev) {\n        var eventType = MOUSE_INPUT_MAP[ev.type];\n\n        // on start we want to have the left mouse button down\n        if (eventType & INPUT_START && ev.button === 0) {\n            this.pressed = true;\n        }\n\n        if (eventType & INPUT_MOVE && ev.which !== 1) {\n            eventType = INPUT_END;\n        }\n\n        // mouse must be down\n        if (!this.pressed) {\n            return;\n        }\n\n        if (eventType & INPUT_END) {\n            this.pressed = false;\n        }\n\n        this.callback(this.manager, eventType, {\n            pointers: [ev],\n            changedPointers: [ev],\n            pointerType: INPUT_TYPE_MOUSE,\n            srcEvent: ev\n        });\n    }\n});\n\nvar POINTER_INPUT_MAP = {\n    pointerdown: INPUT_START,\n    pointermove: INPUT_MOVE,\n    pointerup: INPUT_END,\n    pointercancel: INPUT_CANCEL,\n    pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n    2: INPUT_TYPE_TOUCH,\n    3: INPUT_TYPE_PEN,\n    4: INPUT_TYPE_MOUSE,\n    5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n    POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n    POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n    this.evEl = POINTER_ELEMENT_EVENTS;\n    this.evWin = POINTER_WINDOW_EVENTS;\n\n    Input.apply(this, arguments);\n\n    this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n    /**\n     * handle mouse events\n     * @param {Object} ev\n     */\n    handler: function PEhandler(ev) {\n        var store = this.store;\n        var removePointer = false;\n\n        var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n        var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n        var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n        var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n        // get index of the event in the store\n        var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n        // start and mouse must be down\n        if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n            if (storeIndex < 0) {\n                store.push(ev);\n                storeIndex = store.length - 1;\n            }\n        } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n            removePointer = true;\n        }\n\n        // it not found, so the pointer hasn't been down (so it's probably a hover)\n        if (storeIndex < 0) {\n            return;\n        }\n\n        // update the event in the store\n        store[storeIndex] = ev;\n\n        this.callback(this.manager, eventType, {\n            pointers: store,\n            changedPointers: [ev],\n            pointerType: pointerType,\n            srcEvent: ev\n        });\n\n        if (removePointer) {\n            // remove from the store\n            store.splice(storeIndex, 1);\n        }\n    }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n    touchstart: INPUT_START,\n    touchmove: INPUT_MOVE,\n    touchend: INPUT_END,\n    touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n    this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n    this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n    this.started = false;\n\n    Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n    handler: function TEhandler(ev) {\n        var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n        // should we handle the touch events?\n        if (type === INPUT_START) {\n            this.started = true;\n        }\n\n        if (!this.started) {\n            return;\n        }\n\n        var touches = normalizeSingleTouches.call(this, ev, type);\n\n        // when done, reset the started state\n        if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n            this.started = false;\n        }\n\n        this.callback(this.manager, type, {\n            pointers: touches[0],\n            changedPointers: touches[1],\n            pointerType: INPUT_TYPE_TOUCH,\n            srcEvent: ev\n        });\n    }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n    var all = toArray(ev.touches);\n    var changed = toArray(ev.changedTouches);\n\n    if (type & (INPUT_END | INPUT_CANCEL)) {\n        all = uniqueArray(all.concat(changed), 'identifier', true);\n    }\n\n    return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n    touchstart: INPUT_START,\n    touchmove: INPUT_MOVE,\n    touchend: INPUT_END,\n    touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n    this.evTarget = TOUCH_TARGET_EVENTS;\n    this.targetIds = {};\n\n    Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n    handler: function MTEhandler(ev) {\n        var type = TOUCH_INPUT_MAP[ev.type];\n        var touches = getTouches.call(this, ev, type);\n        if (!touches) {\n            return;\n        }\n\n        this.callback(this.manager, type, {\n            pointers: touches[0],\n            changedPointers: touches[1],\n            pointerType: INPUT_TYPE_TOUCH,\n            srcEvent: ev\n        });\n    }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n    var allTouches = toArray(ev.touches);\n    var targetIds = this.targetIds;\n\n    // when there is only one touch, the process can be simplified\n    if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n        targetIds[allTouches[0].identifier] = true;\n        return [allTouches, allTouches];\n    }\n\n    var i,\n        targetTouches,\n        changedTouches = toArray(ev.changedTouches),\n        changedTargetTouches = [],\n        target = this.target;\n\n    // get target touches from touches\n    targetTouches = allTouches.filter(function(touch) {\n        return hasParent(touch.target, target);\n    });\n\n    // collect touches\n    if (type === INPUT_START) {\n        i = 0;\n        while (i < targetTouches.length) {\n            targetIds[targetTouches[i].identifier] = true;\n            i++;\n        }\n    }\n\n    // filter changed touches to only contain touches that exist in the collected target ids\n    i = 0;\n    while (i < changedTouches.length) {\n        if (targetIds[changedTouches[i].identifier]) {\n            changedTargetTouches.push(changedTouches[i]);\n        }\n\n        // cleanup removed touches\n        if (type & (INPUT_END | INPUT_CANCEL)) {\n            delete targetIds[changedTouches[i].identifier];\n        }\n        i++;\n    }\n\n    if (!changedTargetTouches.length) {\n        return;\n    }\n\n    return [\n        // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n        uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n        changedTargetTouches\n    ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n    Input.apply(this, arguments);\n\n    var handler = bindFn(this.handler, this);\n    this.touch = new TouchInput(this.manager, handler);\n    this.mouse = new MouseInput(this.manager, handler);\n\n    this.primaryTouch = null;\n    this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n    /**\n     * handle mouse and touch events\n     * @param {Hammer} manager\n     * @param {String} inputEvent\n     * @param {Object} inputData\n     */\n    handler: function TMEhandler(manager, inputEvent, inputData) {\n        var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n            isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n        if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n            return;\n        }\n\n        // when we're in a touch event, record touches to  de-dupe synthetic mouse event\n        if (isTouch) {\n            recordTouches.call(this, inputEvent, inputData);\n        } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n            return;\n        }\n\n        this.callback(manager, inputEvent, inputData);\n    },\n\n    /**\n     * remove the event listeners\n     */\n    destroy: function destroy() {\n        this.touch.destroy();\n        this.mouse.destroy();\n    }\n});\n\nfunction recordTouches(eventType, eventData) {\n    if (eventType & INPUT_START) {\n        this.primaryTouch = eventData.changedPointers[0].identifier;\n        setLastTouch.call(this, eventData);\n    } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n        setLastTouch.call(this, eventData);\n    }\n}\n\nfunction setLastTouch(eventData) {\n    var touch = eventData.changedPointers[0];\n\n    if (touch.identifier === this.primaryTouch) {\n        var lastTouch = {x: touch.clientX, y: touch.clientY};\n        this.lastTouches.push(lastTouch);\n        var lts = this.lastTouches;\n        var removeLastTouch = function() {\n            var i = lts.indexOf(lastTouch);\n            if (i > -1) {\n                lts.splice(i, 1);\n            }\n        };\n        setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n    }\n}\n\nfunction isSyntheticEvent(eventData) {\n    var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n    for (var i = 0; i < this.lastTouches.length; i++) {\n        var t = this.lastTouches[i];\n        var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n        if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n            return true;\n        }\n    }\n    return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n    this.manager = manager;\n    this.set(value);\n}\n\nTouchAction.prototype = {\n    /**\n     * set the touchAction value on the element or enable the polyfill\n     * @param {String} value\n     */\n    set: function(value) {\n        // find out the touch-action by the event handlers\n        if (value == TOUCH_ACTION_COMPUTE) {\n            value = this.compute();\n        }\n\n        if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n            this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n        }\n        this.actions = value.toLowerCase().trim();\n    },\n\n    /**\n     * just re-set the touchAction value\n     */\n    update: function() {\n        this.set(this.manager.options.touchAction);\n    },\n\n    /**\n     * compute the value for the touchAction property based on the recognizer's settings\n     * @returns {String} value\n     */\n    compute: function() {\n        var actions = [];\n        each(this.manager.recognizers, function(recognizer) {\n            if (boolOrFn(recognizer.options.enable, [recognizer])) {\n                actions = actions.concat(recognizer.getTouchAction());\n            }\n        });\n        return cleanTouchActions(actions.join(' '));\n    },\n\n    /**\n     * this method is called on each input cycle and provides the preventing of the browser behavior\n     * @param {Object} input\n     */\n    preventDefaults: function(input) {\n        var srcEvent = input.srcEvent;\n        var direction = input.offsetDirection;\n\n        // if the touch action did prevented once this session\n        if (this.manager.session.prevented) {\n            srcEvent.preventDefault();\n            return;\n        }\n\n        var actions = this.actions;\n        var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n        var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n        var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n        if (hasNone) {\n            //do not prevent defaults if this is a tap gesture\n\n            var isTapPointer = input.pointers.length === 1;\n            var isTapMovement = input.distance < 2;\n            var isTapTouchTime = input.deltaTime < 250;\n\n            if (isTapPointer && isTapMovement && isTapTouchTime) {\n                return;\n            }\n        }\n\n        if (hasPanX && hasPanY) {\n            // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n            return;\n        }\n\n        if (hasNone ||\n            (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n            (hasPanX && direction & DIRECTION_VERTICAL)) {\n            return this.preventSrc(srcEvent);\n        }\n    },\n\n    /**\n     * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n     * @param {Object} srcEvent\n     */\n    preventSrc: function(srcEvent) {\n        this.manager.session.prevented = true;\n        srcEvent.preventDefault();\n    }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n    // none\n    if (inStr(actions, TOUCH_ACTION_NONE)) {\n        return TOUCH_ACTION_NONE;\n    }\n\n    var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n    var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n    // if both pan-x and pan-y are set (different recognizers\n    // for different directions, e.g. horizontal pan but vertical swipe?)\n    // we need none (as otherwise with pan-x pan-y combined none of these\n    // recognizers will work, since the browser would handle all panning\n    if (hasPanX && hasPanY) {\n        return TOUCH_ACTION_NONE;\n    }\n\n    // pan-x OR pan-y\n    if (hasPanX || hasPanY) {\n        return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n    }\n\n    // manipulation\n    if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n        return TOUCH_ACTION_MANIPULATION;\n    }\n\n    return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n    if (!NATIVE_TOUCH_ACTION) {\n        return false;\n    }\n    var touchMap = {};\n    var cssSupports = window.CSS && window.CSS.supports;\n    ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n        // If css.supports is not supported but there is native touch-action assume it supports\n        // all values. This is the case for IE 10 and 11.\n        touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n    });\n    return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n *               Possible\n *                  |\n *            +-----+---------------+\n *            |                     |\n *      +-----+-----+               |\n *      |           |               |\n *   Failed      Cancelled          |\n *                          +-------+------+\n *                          |              |\n *                      Recognized       Began\n *                                         |\n *                                      Changed\n *                                         |\n *                                  Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n    this.options = assign({}, this.defaults, options || {});\n\n    this.id = uniqueId();\n\n    this.manager = null;\n\n    // default is enable true\n    this.options.enable = ifUndefined(this.options.enable, true);\n\n    this.state = STATE_POSSIBLE;\n\n    this.simultaneous = {};\n    this.requireFail = [];\n}\n\nRecognizer.prototype = {\n    /**\n     * @virtual\n     * @type {Object}\n     */\n    defaults: {},\n\n    /**\n     * set options\n     * @param {Object} options\n     * @return {Recognizer}\n     */\n    set: function(options) {\n        assign(this.options, options);\n\n        // also update the touchAction, in case something changed about the directions/enabled state\n        this.manager && this.manager.touchAction.update();\n        return this;\n    },\n\n    /**\n     * recognize simultaneous with an other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    recognizeWith: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n            return this;\n        }\n\n        var simultaneous = this.simultaneous;\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        if (!simultaneous[otherRecognizer.id]) {\n            simultaneous[otherRecognizer.id] = otherRecognizer;\n            otherRecognizer.recognizeWith(this);\n        }\n        return this;\n    },\n\n    /**\n     * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    dropRecognizeWith: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n            return this;\n        }\n\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        delete this.simultaneous[otherRecognizer.id];\n        return this;\n    },\n\n    /**\n     * recognizer can only run when an other is failing\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    requireFailure: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n            return this;\n        }\n\n        var requireFail = this.requireFail;\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        if (inArray(requireFail, otherRecognizer) === -1) {\n            requireFail.push(otherRecognizer);\n            otherRecognizer.requireFailure(this);\n        }\n        return this;\n    },\n\n    /**\n     * drop the requireFailure link. it does not remove the link on the other recognizer.\n     * @param {Recognizer} otherRecognizer\n     * @returns {Recognizer} this\n     */\n    dropRequireFailure: function(otherRecognizer) {\n        if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n            return this;\n        }\n\n        otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n        var index = inArray(this.requireFail, otherRecognizer);\n        if (index > -1) {\n            this.requireFail.splice(index, 1);\n        }\n        return this;\n    },\n\n    /**\n     * has require failures boolean\n     * @returns {boolean}\n     */\n    hasRequireFailures: function() {\n        return this.requireFail.length > 0;\n    },\n\n    /**\n     * if the recognizer can recognize simultaneous with an other recognizer\n     * @param {Recognizer} otherRecognizer\n     * @returns {Boolean}\n     */\n    canRecognizeWith: function(otherRecognizer) {\n        return !!this.simultaneous[otherRecognizer.id];\n    },\n\n    /**\n     * You should use `tryEmit` instead of `emit` directly to check\n     * that all the needed recognizers has failed before emitting.\n     * @param {Object} input\n     */\n    emit: function(input) {\n        var self = this;\n        var state = this.state;\n\n        function emit(event) {\n            self.manager.emit(event, input);\n        }\n\n        // 'panstart' and 'panmove'\n        if (state < STATE_ENDED) {\n            emit(self.options.event + stateStr(state));\n        }\n\n        emit(self.options.event); // simple 'eventName' events\n\n        if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n            emit(input.additionalEvent);\n        }\n\n        // panend and pancancel\n        if (state >= STATE_ENDED) {\n            emit(self.options.event + stateStr(state));\n        }\n    },\n\n    /**\n     * Check that all the require failure recognizers has failed,\n     * if true, it emits a gesture event,\n     * otherwise, setup the state to FAILED.\n     * @param {Object} input\n     */\n    tryEmit: function(input) {\n        if (this.canEmit()) {\n            return this.emit(input);\n        }\n        // it's failing anyway\n        this.state = STATE_FAILED;\n    },\n\n    /**\n     * can we emit?\n     * @returns {boolean}\n     */\n    canEmit: function() {\n        var i = 0;\n        while (i < this.requireFail.length) {\n            if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n                return false;\n            }\n            i++;\n        }\n        return true;\n    },\n\n    /**\n     * update the recognizer\n     * @param {Object} inputData\n     */\n    recognize: function(inputData) {\n        // make a new copy of the inputData\n        // so we can change the inputData without messing up the other recognizers\n        var inputDataClone = assign({}, inputData);\n\n        // is is enabled and allow recognizing?\n        if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n            this.reset();\n            this.state = STATE_FAILED;\n            return;\n        }\n\n        // reset when we've reached the end\n        if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n            this.state = STATE_POSSIBLE;\n        }\n\n        this.state = this.process(inputDataClone);\n\n        // the recognizer has recognized a gesture\n        // so trigger an event\n        if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n            this.tryEmit(inputDataClone);\n        }\n    },\n\n    /**\n     * return the state of the recognizer\n     * the actual recognizing happens in this method\n     * @virtual\n     * @param {Object} inputData\n     * @returns {Const} STATE\n     */\n    process: function(inputData) { }, // jshint ignore:line\n\n    /**\n     * return the preferred touch-action\n     * @virtual\n     * @returns {Array}\n     */\n    getTouchAction: function() { },\n\n    /**\n     * called when the gesture isn't allowed to recognize\n     * like when another is being recognized or it is disabled\n     * @virtual\n     */\n    reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n    if (state & STATE_CANCELLED) {\n        return 'cancel';\n    } else if (state & STATE_ENDED) {\n        return 'end';\n    } else if (state & STATE_CHANGED) {\n        return 'move';\n    } else if (state & STATE_BEGAN) {\n        return 'start';\n    }\n    return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n    if (direction == DIRECTION_DOWN) {\n        return 'down';\n    } else if (direction == DIRECTION_UP) {\n        return 'up';\n    } else if (direction == DIRECTION_LEFT) {\n        return 'left';\n    } else if (direction == DIRECTION_RIGHT) {\n        return 'right';\n    }\n    return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n    var manager = recognizer.manager;\n    if (manager) {\n        return manager.get(otherRecognizer);\n    }\n    return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n    Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof AttrRecognizer\n     */\n    defaults: {\n        /**\n         * @type {Number}\n         * @default 1\n         */\n        pointers: 1\n    },\n\n    /**\n     * Used to check if it the recognizer receives valid input, like input.distance > 10.\n     * @memberof AttrRecognizer\n     * @param {Object} input\n     * @returns {Boolean} recognized\n     */\n    attrTest: function(input) {\n        var optionPointers = this.options.pointers;\n        return optionPointers === 0 || input.pointers.length === optionPointers;\n    },\n\n    /**\n     * Process the input and return the state for the recognizer\n     * @memberof AttrRecognizer\n     * @param {Object} input\n     * @returns {*} State\n     */\n    process: function(input) {\n        var state = this.state;\n        var eventType = input.eventType;\n\n        var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n        var isValid = this.attrTest(input);\n\n        // on cancel input and we've recognized before, return STATE_CANCELLED\n        if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n            return state | STATE_CANCELLED;\n        } else if (isRecognized || isValid) {\n            if (eventType & INPUT_END) {\n                return state | STATE_ENDED;\n            } else if (!(state & STATE_BEGAN)) {\n                return STATE_BEGAN;\n            }\n            return state | STATE_CHANGED;\n        }\n        return STATE_FAILED;\n    }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n\n    this.pX = null;\n    this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof PanRecognizer\n     */\n    defaults: {\n        event: 'pan',\n        threshold: 10,\n        pointers: 1,\n        direction: DIRECTION_ALL\n    },\n\n    getTouchAction: function() {\n        var direction = this.options.direction;\n        var actions = [];\n        if (direction & DIRECTION_HORIZONTAL) {\n            actions.push(TOUCH_ACTION_PAN_Y);\n        }\n        if (direction & DIRECTION_VERTICAL) {\n            actions.push(TOUCH_ACTION_PAN_X);\n        }\n        return actions;\n    },\n\n    directionTest: function(input) {\n        var options = this.options;\n        var hasMoved = true;\n        var distance = input.distance;\n        var direction = input.direction;\n        var x = input.deltaX;\n        var y = input.deltaY;\n\n        // lock to axis?\n        if (!(direction & options.direction)) {\n            if (options.direction & DIRECTION_HORIZONTAL) {\n                direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n                hasMoved = x != this.pX;\n                distance = Math.abs(input.deltaX);\n            } else {\n                direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n                hasMoved = y != this.pY;\n                distance = Math.abs(input.deltaY);\n            }\n        }\n        input.direction = direction;\n        return hasMoved && distance > options.threshold && direction & options.direction;\n    },\n\n    attrTest: function(input) {\n        return AttrRecognizer.prototype.attrTest.call(this, input) &&\n            (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n    },\n\n    emit: function(input) {\n\n        this.pX = input.deltaX;\n        this.pY = input.deltaY;\n\n        var direction = directionStr(input.direction);\n\n        if (direction) {\n            input.additionalEvent = this.options.event + direction;\n        }\n        this._super.emit.call(this, input);\n    }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof PinchRecognizer\n     */\n    defaults: {\n        event: 'pinch',\n        threshold: 0,\n        pointers: 2\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_NONE];\n    },\n\n    attrTest: function(input) {\n        return this._super.attrTest.call(this, input) &&\n            (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n    },\n\n    emit: function(input) {\n        if (input.scale !== 1) {\n            var inOut = input.scale < 1 ? 'in' : 'out';\n            input.additionalEvent = this.options.event + inOut;\n        }\n        this._super.emit.call(this, input);\n    }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n    Recognizer.apply(this, arguments);\n\n    this._timer = null;\n    this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof PressRecognizer\n     */\n    defaults: {\n        event: 'press',\n        pointers: 1,\n        time: 251, // minimal time of the pointer to be pressed\n        threshold: 9 // a minimal movement is ok, but keep it low\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_AUTO];\n    },\n\n    process: function(input) {\n        var options = this.options;\n        var validPointers = input.pointers.length === options.pointers;\n        var validMovement = input.distance < options.threshold;\n        var validTime = input.deltaTime > options.time;\n\n        this._input = input;\n\n        // we only allow little movement\n        // and we've reached an end event, so a tap is possible\n        if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n            this.reset();\n        } else if (input.eventType & INPUT_START) {\n            this.reset();\n            this._timer = setTimeoutContext(function() {\n                this.state = STATE_RECOGNIZED;\n                this.tryEmit();\n            }, options.time, this);\n        } else if (input.eventType & INPUT_END) {\n            return STATE_RECOGNIZED;\n        }\n        return STATE_FAILED;\n    },\n\n    reset: function() {\n        clearTimeout(this._timer);\n    },\n\n    emit: function(input) {\n        if (this.state !== STATE_RECOGNIZED) {\n            return;\n        }\n\n        if (input && (input.eventType & INPUT_END)) {\n            this.manager.emit(this.options.event + 'up', input);\n        } else {\n            this._input.timeStamp = now();\n            this.manager.emit(this.options.event, this._input);\n        }\n    }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof RotateRecognizer\n     */\n    defaults: {\n        event: 'rotate',\n        threshold: 0,\n        pointers: 2\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_NONE];\n    },\n\n    attrTest: function(input) {\n        return this._super.attrTest.call(this, input) &&\n            (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n    }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n    AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n    /**\n     * @namespace\n     * @memberof SwipeRecognizer\n     */\n    defaults: {\n        event: 'swipe',\n        threshold: 10,\n        velocity: 0.3,\n        direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n        pointers: 1\n    },\n\n    getTouchAction: function() {\n        return PanRecognizer.prototype.getTouchAction.call(this);\n    },\n\n    attrTest: function(input) {\n        var direction = this.options.direction;\n        var velocity;\n\n        if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n            velocity = input.overallVelocity;\n        } else if (direction & DIRECTION_HORIZONTAL) {\n            velocity = input.overallVelocityX;\n        } else if (direction & DIRECTION_VERTICAL) {\n            velocity = input.overallVelocityY;\n        }\n\n        return this._super.attrTest.call(this, input) &&\n            direction & input.offsetDirection &&\n            input.distance > this.options.threshold &&\n            input.maxPointers == this.options.pointers &&\n            abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n    },\n\n    emit: function(input) {\n        var direction = directionStr(input.offsetDirection);\n        if (direction) {\n            this.manager.emit(this.options.event + direction, input);\n        }\n\n        this.manager.emit(this.options.event, input);\n    }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n    Recognizer.apply(this, arguments);\n\n    // previous time and center,\n    // used for tap counting\n    this.pTime = false;\n    this.pCenter = false;\n\n    this._timer = null;\n    this._input = null;\n    this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n    /**\n     * @namespace\n     * @memberof PinchRecognizer\n     */\n    defaults: {\n        event: 'tap',\n        pointers: 1,\n        taps: 1,\n        interval: 300, // max time between the multi-tap taps\n        time: 250, // max time of the pointer to be down (like finger on the screen)\n        threshold: 9, // a minimal movement is ok, but keep it low\n        posThreshold: 10 // a multi-tap can be a bit off the initial position\n    },\n\n    getTouchAction: function() {\n        return [TOUCH_ACTION_MANIPULATION];\n    },\n\n    process: function(input) {\n        var options = this.options;\n\n        var validPointers = input.pointers.length === options.pointers;\n        var validMovement = input.distance < options.threshold;\n        var validTouchTime = input.deltaTime < options.time;\n\n        this.reset();\n\n        if ((input.eventType & INPUT_START) && (this.count === 0)) {\n            return this.failTimeout();\n        }\n\n        // we only allow little movement\n        // and we've reached an end event, so a tap is possible\n        if (validMovement && validTouchTime && validPointers) {\n            if (input.eventType != INPUT_END) {\n                return this.failTimeout();\n            }\n\n            var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n            var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n            this.pTime = input.timeStamp;\n            this.pCenter = input.center;\n\n            if (!validMultiTap || !validInterval) {\n                this.count = 1;\n            } else {\n                this.count += 1;\n            }\n\n            this._input = input;\n\n            // if tap count matches we have recognized it,\n            // else it has began recognizing...\n            var tapCount = this.count % options.taps;\n            if (tapCount === 0) {\n                // no failing requirements, immediately trigger the tap event\n                // or wait as long as the multitap interval to trigger\n                if (!this.hasRequireFailures()) {\n                    return STATE_RECOGNIZED;\n                } else {\n                    this._timer = setTimeoutContext(function() {\n                        this.state = STATE_RECOGNIZED;\n                        this.tryEmit();\n                    }, options.interval, this);\n                    return STATE_BEGAN;\n                }\n            }\n        }\n        return STATE_FAILED;\n    },\n\n    failTimeout: function() {\n        this._timer = setTimeoutContext(function() {\n            this.state = STATE_FAILED;\n        }, this.options.interval, this);\n        return STATE_FAILED;\n    },\n\n    reset: function() {\n        clearTimeout(this._timer);\n    },\n\n    emit: function() {\n        if (this.state == STATE_RECOGNIZED) {\n            this._input.tapCount = this.count;\n            this.manager.emit(this.options.event, this._input);\n        }\n    }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n    options = options || {};\n    options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n    return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n    /**\n     * set if DOM events are being triggered.\n     * But this is slower and unused by simple implementations, so disabled by default.\n     * @type {Boolean}\n     * @default false\n     */\n    domEvents: false,\n\n    /**\n     * The value for the touchAction property/fallback.\n     * When set to `compute` it will magically set the correct value based on the added recognizers.\n     * @type {String}\n     * @default compute\n     */\n    touchAction: TOUCH_ACTION_COMPUTE,\n\n    /**\n     * @type {Boolean}\n     * @default true\n     */\n    enable: true,\n\n    /**\n     * EXPERIMENTAL FEATURE -- can be removed/changed\n     * Change the parent input target element.\n     * If Null, then it is being set the to main element.\n     * @type {Null|EventTarget}\n     * @default null\n     */\n    inputTarget: null,\n\n    /**\n     * force an input class\n     * @type {Null|Function}\n     * @default null\n     */\n    inputClass: null,\n\n    /**\n     * Default recognizer setup when calling `Hammer()`\n     * When creating a new Manager these will be skipped.\n     * @type {Array}\n     */\n    preset: [\n        // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n        [RotateRecognizer, {enable: false}],\n        [PinchRecognizer, {enable: false}, ['rotate']],\n        [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n        [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n        [TapRecognizer],\n        [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n        [PressRecognizer]\n    ],\n\n    /**\n     * Some CSS properties can be used to improve the working of Hammer.\n     * Add them to this method and they will be set when creating a new Manager.\n     * @namespace\n     */\n    cssProps: {\n        /**\n         * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n         * @type {String}\n         * @default 'none'\n         */\n        userSelect: 'none',\n\n        /**\n         * Disable the Windows Phone grippers when pressing an element.\n         * @type {String}\n         * @default 'none'\n         */\n        touchSelect: 'none',\n\n        /**\n         * Disables the default callout shown when you touch and hold a touch target.\n         * On iOS, when you touch and hold a touch target such as a link, Safari displays\n         * a callout containing information about the link. This property allows you to disable that callout.\n         * @type {String}\n         * @default 'none'\n         */\n        touchCallout: 'none',\n\n        /**\n         * Specifies whether zooming is enabled. Used by IE10>\n         * @type {String}\n         * @default 'none'\n         */\n        contentZooming: 'none',\n\n        /**\n         * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n         * @type {String}\n         * @default 'none'\n         */\n        userDrag: 'none',\n\n        /**\n         * Overrides the highlight color shown when the user taps a link or a JavaScript\n         * clickable element in iOS. This property obeys the alpha value, if specified.\n         * @type {String}\n         * @default 'rgba(0,0,0,0)'\n         */\n        tapHighlightColor: 'rgba(0,0,0,0)'\n    }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n    this.options = assign({}, Hammer.defaults, options || {});\n\n    this.options.inputTarget = this.options.inputTarget || element;\n\n    this.handlers = {};\n    this.session = {};\n    this.recognizers = [];\n    this.oldCssProps = {};\n\n    this.element = element;\n    this.input = createInputInstance(this);\n    this.touchAction = new TouchAction(this, this.options.touchAction);\n\n    toggleCssProps(this, true);\n\n    each(this.options.recognizers, function(item) {\n        var recognizer = this.add(new (item[0])(item[1]));\n        item[2] && recognizer.recognizeWith(item[2]);\n        item[3] && recognizer.requireFailure(item[3]);\n    }, this);\n}\n\nManager.prototype = {\n    /**\n     * set options\n     * @param {Object} options\n     * @returns {Manager}\n     */\n    set: function(options) {\n        assign(this.options, options);\n\n        // Options that need a little more setup\n        if (options.touchAction) {\n            this.touchAction.update();\n        }\n        if (options.inputTarget) {\n            // Clean up existing event listeners and reinitialize\n            this.input.destroy();\n            this.input.target = options.inputTarget;\n            this.input.init();\n        }\n        return this;\n    },\n\n    /**\n     * stop recognizing for this session.\n     * This session will be discarded, when a new [input]start event is fired.\n     * When forced, the recognizer cycle is stopped immediately.\n     * @param {Boolean} [force]\n     */\n    stop: function(force) {\n        this.session.stopped = force ? FORCED_STOP : STOP;\n    },\n\n    /**\n     * run the recognizers!\n     * called by the inputHandler function on every movement of the pointers (touches)\n     * it walks through all the recognizers and tries to detect the gesture that is being made\n     * @param {Object} inputData\n     */\n    recognize: function(inputData) {\n        var session = this.session;\n        if (session.stopped) {\n            return;\n        }\n\n        // run the touch-action polyfill\n        this.touchAction.preventDefaults(inputData);\n\n        var recognizer;\n        var recognizers = this.recognizers;\n\n        // this holds the recognizer that is being recognized.\n        // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n        // if no recognizer is detecting a thing, it is set to `null`\n        var curRecognizer = session.curRecognizer;\n\n        // reset when the last recognizer is recognized\n        // or when we're in a new session\n        if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n            curRecognizer = session.curRecognizer = null;\n        }\n\n        var i = 0;\n        while (i < recognizers.length) {\n            recognizer = recognizers[i];\n\n            // find out if we are allowed try to recognize the input for this one.\n            // 1.   allow if the session is NOT forced stopped (see the .stop() method)\n            // 2.   allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n            //      that is being recognized.\n            // 3.   allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n            //      this can be setup with the `recognizeWith()` method on the recognizer.\n            if (session.stopped !== FORCED_STOP && ( // 1\n                    !curRecognizer || recognizer == curRecognizer || // 2\n                    recognizer.canRecognizeWith(curRecognizer))) { // 3\n                recognizer.recognize(inputData);\n            } else {\n                recognizer.reset();\n            }\n\n            // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n            // current active recognizer. but only if we don't already have an active recognizer\n            if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n                curRecognizer = session.curRecognizer = recognizer;\n            }\n            i++;\n        }\n    },\n\n    /**\n     * get a recognizer by its event name.\n     * @param {Recognizer|String} recognizer\n     * @returns {Recognizer|Null}\n     */\n    get: function(recognizer) {\n        if (recognizer instanceof Recognizer) {\n            return recognizer;\n        }\n\n        var recognizers = this.recognizers;\n        for (var i = 0; i < recognizers.length; i++) {\n            if (recognizers[i].options.event == recognizer) {\n                return recognizers[i];\n            }\n        }\n        return null;\n    },\n\n    /**\n     * add a recognizer to the manager\n     * existing recognizers with the same event name will be removed\n     * @param {Recognizer} recognizer\n     * @returns {Recognizer|Manager}\n     */\n    add: function(recognizer) {\n        if (invokeArrayArg(recognizer, 'add', this)) {\n            return this;\n        }\n\n        // remove existing\n        var existing = this.get(recognizer.options.event);\n        if (existing) {\n            this.remove(existing);\n        }\n\n        this.recognizers.push(recognizer);\n        recognizer.manager = this;\n\n        this.touchAction.update();\n        return recognizer;\n    },\n\n    /**\n     * remove a recognizer by name or instance\n     * @param {Recognizer|String} recognizer\n     * @returns {Manager}\n     */\n    remove: function(recognizer) {\n        if (invokeArrayArg(recognizer, 'remove', this)) {\n            return this;\n        }\n\n        recognizer = this.get(recognizer);\n\n        // let's make sure this recognizer exists\n        if (recognizer) {\n            var recognizers = this.recognizers;\n            var index = inArray(recognizers, recognizer);\n\n            if (index !== -1) {\n                recognizers.splice(index, 1);\n                this.touchAction.update();\n            }\n        }\n\n        return this;\n    },\n\n    /**\n     * bind event\n     * @param {String} events\n     * @param {Function} handler\n     * @returns {EventEmitter} this\n     */\n    on: function(events, handler) {\n        if (events === undefined) {\n            return;\n        }\n        if (handler === undefined) {\n            return;\n        }\n\n        var handlers = this.handlers;\n        each(splitStr(events), function(event) {\n            handlers[event] = handlers[event] || [];\n            handlers[event].push(handler);\n        });\n        return this;\n    },\n\n    /**\n     * unbind event, leave emit blank to remove all handlers\n     * @param {String} events\n     * @param {Function} [handler]\n     * @returns {EventEmitter} this\n     */\n    off: function(events, handler) {\n        if (events === undefined) {\n            return;\n        }\n\n        var handlers = this.handlers;\n        each(splitStr(events), function(event) {\n            if (!handler) {\n                delete handlers[event];\n            } else {\n                handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n            }\n        });\n        return this;\n    },\n\n    /**\n     * emit event to the listeners\n     * @param {String} event\n     * @param {Object} data\n     */\n    emit: function(event, data) {\n        // we also want to trigger dom events\n        if (this.options.domEvents) {\n            triggerDomEvent(event, data);\n        }\n\n        // no handlers, so skip it all\n        var handlers = this.handlers[event] && this.handlers[event].slice();\n        if (!handlers || !handlers.length) {\n            return;\n        }\n\n        data.type = event;\n        data.preventDefault = function() {\n            data.srcEvent.preventDefault();\n        };\n\n        var i = 0;\n        while (i < handlers.length) {\n            handlers[i](data);\n            i++;\n        }\n    },\n\n    /**\n     * destroy the manager and unbinds all events\n     * it doesn't unbind dom events, that is the user own responsibility\n     */\n    destroy: function() {\n        this.element && toggleCssProps(this, false);\n\n        this.handlers = {};\n        this.session = {};\n        this.input.destroy();\n        this.element = null;\n    }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n    var element = manager.element;\n    if (!element.style) {\n        return;\n    }\n    var prop;\n    each(manager.options.cssProps, function(value, name) {\n        prop = prefixed(element.style, name);\n        if (add) {\n            manager.oldCssProps[prop] = element.style[prop];\n            element.style[prop] = value;\n        } else {\n            element.style[prop] = manager.oldCssProps[prop] || '';\n        }\n    });\n    if (!add) {\n        manager.oldCssProps = {};\n    }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n    var gestureEvent = document.createEvent('Event');\n    gestureEvent.initEvent(event, true, true);\n    gestureEvent.gesture = data;\n    data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n    INPUT_START: INPUT_START,\n    INPUT_MOVE: INPUT_MOVE,\n    INPUT_END: INPUT_END,\n    INPUT_CANCEL: INPUT_CANCEL,\n\n    STATE_POSSIBLE: STATE_POSSIBLE,\n    STATE_BEGAN: STATE_BEGAN,\n    STATE_CHANGED: STATE_CHANGED,\n    STATE_ENDED: STATE_ENDED,\n    STATE_RECOGNIZED: STATE_RECOGNIZED,\n    STATE_CANCELLED: STATE_CANCELLED,\n    STATE_FAILED: STATE_FAILED,\n\n    DIRECTION_NONE: DIRECTION_NONE,\n    DIRECTION_LEFT: DIRECTION_LEFT,\n    DIRECTION_RIGHT: DIRECTION_RIGHT,\n    DIRECTION_UP: DIRECTION_UP,\n    DIRECTION_DOWN: DIRECTION_DOWN,\n    DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n    DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n    DIRECTION_ALL: DIRECTION_ALL,\n\n    Manager: Manager,\n    Input: Input,\n    TouchAction: TouchAction,\n\n    TouchInput: TouchInput,\n    MouseInput: MouseInput,\n    PointerEventInput: PointerEventInput,\n    TouchMouseInput: TouchMouseInput,\n    SingleTouchInput: SingleTouchInput,\n\n    Recognizer: Recognizer,\n    AttrRecognizer: AttrRecognizer,\n    Tap: TapRecognizer,\n    Pan: PanRecognizer,\n    Swipe: SwipeRecognizer,\n    Pinch: PinchRecognizer,\n    Rotate: RotateRecognizer,\n    Press: PressRecognizer,\n\n    on: addEventListeners,\n    off: removeEventListeners,\n    each: each,\n    merge: merge,\n    extend: extend,\n    assign: assign,\n    inherit: inherit,\n    bindFn: bindFn,\n    prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n//  style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n    define(function() {\n        return Hammer;\n    });\n} else if (typeof module != 'undefined' && module.exports) {\n    module.exports = Hammer;\n} else {\n    window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport const defaultThrottleConfig = {\n    leading: true,\n    trailing: false\n};\nexport function throttle(durationSelector, config = defaultThrottleConfig) {\n    return (source) => source.lift(new ThrottleOperator(durationSelector, !!config.leading, !!config.trailing));\n}\nclass ThrottleOperator {\n    constructor(durationSelector, leading, trailing) {\n        this.durationSelector = durationSelector;\n        this.leading = leading;\n        this.trailing = trailing;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n    }\n}\nclass ThrottleSubscriber extends SimpleOuterSubscriber {\n    constructor(destination, durationSelector, _leading, _trailing) {\n        super(destination);\n        this.destination = destination;\n        this.durationSelector = durationSelector;\n        this._leading = _leading;\n        this._trailing = _trailing;\n        this._hasValue = false;\n    }\n    _next(value) {\n        this._hasValue = true;\n        this._sendValue = value;\n        if (!this._throttled) {\n            if (this._leading) {\n                this.send();\n            }\n            else {\n                this.throttle(value);\n            }\n        }\n    }\n    send() {\n        const { _hasValue, _sendValue } = this;\n        if (_hasValue) {\n            this.destination.next(_sendValue);\n            this.throttle(_sendValue);\n        }\n        this._hasValue = false;\n        this._sendValue = undefined;\n    }\n    throttle(value) {\n        const duration = this.tryDurationSelector(value);\n        if (!!duration) {\n            this.add(this._throttled = innerSubscribe(duration, new SimpleInnerSubscriber(this)));\n        }\n    }\n    tryDurationSelector(value) {\n        try {\n            return this.durationSelector(value);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return null;\n        }\n    }\n    throttlingDone() {\n        const { _throttled, _trailing } = this;\n        if (_throttled) {\n            _throttled.unsubscribe();\n        }\n        this._throttled = undefined;\n        if (_trailing) {\n            this.send();\n        }\n    }\n    notifyNext() {\n        this.throttlingDone();\n    }\n    notifyComplete() {\n        this.throttlingDone();\n    }\n}\n//# sourceMappingURL=throttle.js.map","export function isScheduler(value) {\n    return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map","import { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n    if (!scheduler) {\n        return new Observable(subscriber => subscriber.error(error));\n    }\n    else {\n        return new Observable(subscriber => scheduler.schedule(dispatch, 0, { error, subscriber }));\n    }\n}\nfunction dispatch({ error, subscriber }) {\n    subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map","import { Subscriber } from '../Subscriber';\nexport function skip(count) {\n    return (source) => source.lift(new SkipOperator(count));\n}\nclass SkipOperator {\n    constructor(total) {\n        this.total = total;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new SkipSubscriber(subscriber, this.total));\n    }\n}\nclass SkipSubscriber extends Subscriber {\n    constructor(destination, total) {\n        super(destination);\n        this.total = total;\n        this.count = 0;\n    }\n    _next(x) {\n        if (++this.count > this.total) {\n            this.destination.next(x);\n        }\n    }\n}\n//# sourceMappingURL=skip.js.map","import { AsyncScheduler } from './AsyncScheduler';\nexport class AnimationFrameScheduler extends AsyncScheduler {\n    flush(action) {\n        this.active = true;\n        this.scheduled = undefined;\n        const { actions } = this;\n        let error;\n        let index = -1;\n        let count = actions.length;\n        action = action || actions.shift();\n        do {\n            if (error = action.execute(action.state, action.delay)) {\n                break;\n            }\n        } while (++index < count && (action = actions.shift()));\n        this.active = false;\n        if (error) {\n            while (++index < count && (action = actions.shift())) {\n                action.unsubscribe();\n            }\n            throw error;\n        }\n    }\n}\n//# sourceMappingURL=AnimationFrameScheduler.js.map","import { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function withLatestFrom(...args) {\n    return (source) => {\n        let project;\n        if (typeof args[args.length - 1] === 'function') {\n            project = args.pop();\n        }\n        const observables = args;\n        return source.lift(new WithLatestFromOperator(observables, project));\n    };\n}\nclass WithLatestFromOperator {\n    constructor(observables, project) {\n        this.observables = observables;\n        this.project = project;\n    }\n    call(subscriber, source) {\n        return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n    }\n}\nclass WithLatestFromSubscriber extends OuterSubscriber {\n    constructor(destination, observables, project) {\n        super(destination);\n        this.observables = observables;\n        this.project = project;\n        this.toRespond = [];\n        const len = observables.length;\n        this.values = new Array(len);\n        for (let i = 0; i < len; i++) {\n            this.toRespond.push(i);\n        }\n        for (let i = 0; i < len; i++) {\n            let observable = observables[i];\n            this.add(subscribeToResult(this, observable, undefined, i));\n        }\n    }\n    notifyNext(_outerValue, innerValue, outerIndex) {\n        this.values[outerIndex] = innerValue;\n        const toRespond = this.toRespond;\n        if (toRespond.length > 0) {\n            const found = toRespond.indexOf(outerIndex);\n            if (found !== -1) {\n                toRespond.splice(found, 1);\n            }\n        }\n    }\n    notifyComplete() {\n    }\n    _next(value) {\n        if (this.toRespond.length === 0) {\n            const args = [value, ...this.values];\n            if (this.project) {\n                this._tryProject(args);\n            }\n            else {\n                this.destination.next(args);\n            }\n        }\n    }\n    _tryProject(args) {\n        let result;\n        try {\n            result = this.project.apply(this, args);\n        }\n        catch (err) {\n            this.destination.error(err);\n            return;\n        }\n        this.destination.next(result);\n    }\n}\n//# sourceMappingURL=withLatestFrom.js.map","import { SimpleOuterSubscriber, innerSubscribe, SimpleInnerSubscriber } from '../innerSubscribe';\nexport function exhaust() {\n    return (source) => source.lift(new SwitchFirstOperator());\n}\nclass SwitchFirstOperator {\n    call(subscriber, source) {\n        return source.subscribe(new SwitchFirstSubscriber(subscriber));\n    }\n}\nclass SwitchFirstSubscriber extends SimpleOuterSubscriber {\n    constructor(destination) {\n        super(destination);\n        this.hasCompleted = false;\n        this.hasSubscription = false;\n    }\n    _next(value) {\n        if (!this.hasSubscription) {\n            this.hasSubscription = true;\n            this.add(innerSubscribe(value, new SimpleInnerSubscriber(this)));\n        }\n    }\n    _complete() {\n        this.hasCompleted = true;\n        if (!this.hasSubscription) {\n            this.destination.complete();\n        }\n    }\n    notifyComplete() {\n        this.hasSubscription = false;\n        if (this.hasCompleted) {\n            this.destination.complete();\n        }\n    }\n}\n//# sourceMappingURL=exhaust.js.map","import { Subscriber } from './Subscriber';\nimport { Observable } from './Observable';\nimport { subscribeTo } from './util/subscribeTo';\nexport class SimpleInnerSubscriber extends Subscriber {\n    constructor(parent) {\n        super();\n        this.parent = parent;\n    }\n    _next(value) {\n        this.parent.notifyNext(value);\n    }\n    _error(error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete();\n        this.unsubscribe();\n    }\n}\nexport class ComplexInnerSubscriber extends Subscriber {\n    constructor(parent, outerValue, outerIndex) {\n        super();\n        this.parent = parent;\n        this.outerValue = outerValue;\n        this.outerIndex = outerIndex;\n    }\n    _next(value) {\n        this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);\n    }\n    _error(error) {\n        this.parent.notifyError(error);\n        this.unsubscribe();\n    }\n    _complete() {\n        this.parent.notifyComplete(this);\n        this.unsubscribe();\n    }\n}\nexport class SimpleOuterSubscriber extends Subscriber {\n    notifyNext(innerValue) {\n        this.destination.next(innerValue);\n    }\n    notifyError(err) {\n        this.destination.error(err);\n    }\n    notifyComplete() {\n        this.destination.complete();\n    }\n}\nexport class ComplexOuterSubscriber extends Subscriber {\n    notifyNext(_outerValue, innerValue, _outerIndex, _innerSub) {\n        this.destination.next(innerValue);\n    }\n    notifyError(error) {\n        this.destination.error(error);\n    }\n    notifyComplete(_innerSub) {\n        this.destination.complete();\n    }\n}\nexport function innerSubscribe(result, innerSubscriber) {\n    if (innerSubscriber.closed) {\n        return undefined;\n    }\n    if (result instanceof Observable) {\n        return result.subscribe(innerSubscriber);\n    }\n    return subscribeTo(result)(innerSubscriber);\n}\n//# sourceMappingURL=innerSubscribe.js.map"],"sourceRoot":"webpack:///"}