You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sup_File/other/vendor.js.map

1 line
4.9 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{"version":3,"sources":["webpack:///./node_modules/@agm/core/core.module.js","webpack:///./node_modules/@agm/core/directives.js","webpack:///./node_modules/@agm/core/directives/circle.js","webpack:///./node_modules/@agm/core/directives/data-layer.js","webpack:///./node_modules/@agm/core/directives/info-window.js","webpack:///./node_modules/@agm/core/directives/kml-layer.js","webpack:///./node_modules/@agm/core/directives/map.js","webpack:///./node_modules/@agm/core/directives/marker.js","webpack:///./node_modules/@agm/core/directives/polygon.js","webpack:///./node_modules/@agm/core/directives/polyline-point.js","webpack:///./node_modules/@agm/core/directives/polyline.js","webpack:///./node_modules/@agm/core/index.js","webpack:///./node_modules/@agm/core/services.js","webpack:///./node_modules/@agm/core/services/google-maps-api-wrapper.js","webpack:///./node_modules/@agm/core/services/managers/circle-manager.js","webpack:///./node_modules/@agm/core/services/managers/data-layer-manager.js","webpack:///./node_modules/@agm/core/services/managers/info-window-manager.js","webpack:///./node_modules/@agm/core/services/managers/kml-layer-manager.js","webpack:///./node_modules/@agm/core/services/managers/marker-manager.js","webpack:///./node_modules/@agm/core/services/managers/polygon-manager.js","webpack:///./node_modules/@agm/core/services/managers/polyline-manager.js","webpack:///./node_modules/@agm/core/services/maps-api-loader/lazy-maps-api-loader.js","webpack:///./node_modules/@agm/core/services/maps-api-loader/maps-api-loader.js","webpack:///./node_modules/@agm/core/services/maps-api-loader/noop-maps-api-loader.js","webpack:///./node_modules/@agm/core/utils/browser-globals.js","webpack:///./node_modules/@angular/animations/fesm5/animations.js","webpack:///./node_modules/@angular/animations/fesm5/browser.js","webpack:///./node_modules/@angular/animations/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/common/fesm5/common.js","webpack:///./node_modules/@angular/common/fesm5/http.js","webpack:///./node_modules/@angular/common/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/compiler/fesm5/compiler.js","webpack:///./node_modules/@angular/compiler/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/core/fesm5/core.js","webpack:///./node_modules/@angular/core/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/forms/fesm5/forms.js","webpack:///./node_modules/@angular/forms/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/http/fesm5/http.js","webpack:///./node_modules/@angular/http/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js","webpack:///./node_modules/@angular/platform-browser-dynamic/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/platform-browser/fesm5/animations.js","webpack:///./node_modules/@angular/platform-browser/fesm5/platform-browser.js","webpack:///./node_modules/@angular/platform-browser/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@angular/router/fesm5/router.js","webpack:///./node_modules/@angular/router/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/dropzone/dist/dropzone.js","webpack:///./node_modules/hammerjs/hammer.js","webpack:///./node_modules/ngx-dropzone-wrapper/dist/ngx-dropzone-wrapper.es5.js","webpack:///./node_modules/rxjs-compat/_esm5/Observable.js","webpack:///./node_modules/rxjs-compat/_esm5/Subject.js","webpack:///./node_modules/rxjs-compat/_esm5/add/observable/combineLatest.js","webpack:///./node_modules/rxjs-compat/_esm5/add/observable/from.js","webpack:///./node_modules/rxjs-compat/_esm5/add/observable/fromEvent.js","webpack:///./node_modules/rxjs-compat/_esm5/add/observable/merge.js","webpack:///./node_modules/rxjs-compat/_esm5/add/observable/timer.js","webpack:///./node_modules/rxjs-compat/_esm5/add/operator/catch.js","webpack:///./node_modules/rxjs-compat/_esm5/add/operator/combineLatest.js","webpack:///./node_modules/rxjs-compat/_esm5/add/operator/filter.js","webpack:///./node_modules/rxjs-compat/_esm5/add/operator/map.js","webpack:///./node_modules/rxjs-compat/_esm5/add/operator/mergeAll.js","webpack:///./node_modules/rxjs-compat/_esm5/observable/TimerObservable.js","webpack:///./node_modules/rxjs-compat/_esm5/operator/catch.js","webpack:///./node_modules/rxjs-compat/_esm5/operator/combineLatest.js","webpack:///./node_modules/rxjs-compat/_esm5/operator/filter.js","webpack:///./node_modules/rxjs-compat/_esm5/operator/map.js","webpack:///./node_modules/rxjs-compat/_esm5/operator/mergeAll.js","webpack:///./node_modules/rxjs/_esm5/index.js","webpack:///./node_modules/rxjs/_esm5/internal-compatibility/index.js","webpack:///./node_modules/rxjs/_esm5/internal/AsyncSubject.js","webpack:///./node_modules/rxjs/_esm5/internal/BehaviorSubject.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/Notification.js","webpack:///./node_modules/rxjs/_esm5/internal/Observable.js","webpack:///./node_modules/rxjs/_esm5/internal/Observer.js","webpack:///./node_modules/rxjs/_esm5/internal/OuterSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/ReplaySubject.js","webpack:///./node_modules/rxjs/_esm5/internal/Scheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/Subject.js","webpack:///./node_modules/rxjs/_esm5/internal/SubjectSubscription.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscription.js","webpack:///./node_modules/rxjs/_esm5/internal/config.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/bindCallback.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/bindNodeCallback.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/AjaxObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/WebSocketSubject.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/ajax.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/webSocket.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/forkJoin.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/from.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/generate.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/iif.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/interval.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/pairs.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/race.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/range.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/scalar.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/timer.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/using.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/zip.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/audit.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/auditTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/buffer.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferCount.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferToggle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/bufferWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/catchError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/combineAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/count.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/debounce.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/debounceTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/defaultIfEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delayWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/dematerialize.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinct.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/elementAt.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/every.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/exhaust.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/exhaustMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/expand.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/finalize.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/find.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/findIndex.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/first.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/groupBy.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/ignoreElements.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/isEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/last.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/materialize.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/max.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeScan.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/min.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/multicast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/observeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/onErrorResumeNext.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pairwise.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/partition.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publish.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishBehavior.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishLast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/publishReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/race.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/reduce.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/refCount.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/repeat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/repeatWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/retry.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/retryWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sample.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sampleTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/sequenceEqual.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/share.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/shareReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/single.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipLast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipUntil.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skipWhile.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/startWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/subscribeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/take.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeLast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeWhile.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttleTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/throwIfEmpty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeInterval.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeout.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timeoutWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/timestamp.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/toArray.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/window.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowCount.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowTime.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowToggle.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/windowWhen.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/zip.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/zipAll.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/Action.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsapScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/VirtualTimeScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/asap.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/queue.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/iterator.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/observable.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/EmptyError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/Immediate.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/TimeoutError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/applyMixins.js","webpack:///./node_modules/rxjs/_esm5/internal/util/errorObject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/hostReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/identity.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArray.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArrayLike.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isDate.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isFunction.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isNumeric.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/util/noop.js","webpack:///./node_modules/rxjs/_esm5/internal/util/not.js","webpack:///./node_modules/rxjs/_esm5/internal/util/pipe.js","webpack:///./node_modules/rxjs/_esm5/internal/util/root.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeTo.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js","webpack:///./node_modules/rxjs/_esm5/internal/util/toSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/tryCatch.js","webpack:///./node_modules/rxjs/_esm5/operators/index.js","webpack:///./node_modules/rxjs/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/videogular2/buffering.js","webpack:///./node_modules/videogular2/controls.js","webpack:///./node_modules/videogular2/core.js","webpack:///./node_modules/videogular2/overlay-play.js","webpack:///./node_modules/videogular2/src/buffering/buffering.js","webpack:///./node_modules/videogular2/src/buffering/vg-buffering.js","webpack:///./node_modules/videogular2/src/controls/controls.js","webpack:///./node_modules/videogular2/src/controls/vg-controls.js","webpack:///./node_modules/videogular2/src/controls/vg-fullscreen/vg-fullscreen.js","webpack:///./node_modules/videogular2/src/controls/vg-mute/vg-mute.js","webpack:///./node_modules/videogular2/src/controls/vg-play-pause/vg-play-pause.js","webpack:///./node_modules/videogular2/src/controls/vg-playback-button/vg-playback-button.js","webpack:///./node_modules/videogular2/src/controls/vg-quality-selector/vg-quality-selector.js","webpack:///./node_modules/videogular2/src/controls/vg-scrub-bar/vg-scrub-bar-buffering-time/vg-scrub-bar-buffering-time.js","webpack:///./node_modules/videogular2/src/controls/vg-scrub-bar/vg-scrub-bar-cue-points/vg-scrub-bar-cue-points.js","webpack:///./node_modules/videogular2/src/controls/vg-scrub-bar/vg-scrub-bar-current-time/vg-scrub-bar-current-time.js","webpack:///./node_modules/videogular2/src/controls/vg-scrub-bar/vg-scrub-bar.js","webpack:///./node_modules/videogular2/src/controls/vg-time-display/vg-time-display.js","webpack:///./node_modules/videogular2/src/controls/vg-track-selector/vg-track-selector.js","webpack:///./node_modules/videogular2/src/controls/vg-volume/vg-volume.js","webpack:///./node_modules/videogular2/src/core/core.js","webpack:///./node_modules/videogular2/src/core/events/vg-events.js","webpack:///./node_modules/videogular2/src/core/services/vg-api.js","webpack:///./node_modules/videogular2/src/core/services/vg-controls-hidden.js","webpack:///./node_modules/videogular2/src/core/services/vg-fullscreen-api.js","webpack:///./node_modules/videogular2/src/core/services/vg-utils.js","webpack:///./node_modules/videogular2/src/core/states/vg-states.js","webpack:///./node_modules/videogular2/src/core/vg-cue-points/vg-cue-points.js","webpack:///./node_modules/videogular2/src/core/vg-media/vg-media-element.js","webpack:///./node_modules/videogular2/src/core/vg-media/vg-media.js","webpack:///./node_modules/videogular2/src/core/vg-player/vg-player.js","webpack:///./node_modules/videogular2/src/overlay-play/overlay-play.js","webpack:///./node_modules/videogular2/src/overlay-play/vg-overlay-play.js","webpack:///(webpack)/buildin/module.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAmB;AACF;AACG;AACI;AACJ;AACC;AACC;AACK;AACL;AACC;AACK;AACG;AACP;AACY;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iNAAsD;AACvE,iBAAiB;AACjB;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,uEAAyB,4DAA4D,IAAI;AAC9F;AACA;AACA,4CAA4C,WAAW;AACvD,uC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnDiB;AACG;AACI;AACF;AACC;AACH;AACC;AACC;AACK;AAC3B,sC;;;;;;;;;;;;;;;;ACTiD;AACzB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,gDAAgD,EAAE;AACrH,yCAAyC,sCAAsC,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,kCAAkC,EAAE;AACpH;AACA;AACA;AACA,sDAAsD,uCAAuC;AAC7F,yBAAyB;AACzB;AACA;AACA,2CAA2C,UAAU,mDAAmD,EAAE;AAC1G;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,uDAAuD,iBAAiB,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sCAAsC;AACvF,iDAAiD,sCAAsC;AACvF;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,wCAAwC;AACxC,KAAK,yFAAuB;AAC5B,EAAE;AACF;AACA,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,mBAAmB,4DAAc;AACjC,mBAAmB,wFAA0C;AAC7D,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,qBAAqB,4DAAc;AACnC,gBAAgB,4DAAc;AAC9B,qBAAqB,4DAAc;AACnC,uBAAuB,4DAAc;AACrC,wBAAwB,4DAAc;AACtC,sBAAsB,4DAAc;AACpC,iBAAiB,4DAAc;AAC/B,gBAAgB,4DAAc;AAC9B,sBAAsB,6DAAe;AACrC,qBAAqB,6DAAe;AACpC,wBAAwB,6DAAe;AACvC,cAAc,6DAAe;AAC7B,iBAAiB,6DAAe;AAChC,mBAAmB,6DAAe;AAClC,mBAAmB,6DAAe;AAClC,mBAAmB,6DAAe;AAClC,kBAAkB,6DAAe;AACjC,mBAAmB,6DAAe;AAClC,iBAAiB,6DAAe;AAChC,sBAAsB,6DAAe;AACrC,oBAAoB,6DAAe;AACnC;AACA,kC;;;;;;;;;;;;;;;;ACxNiD;AACtB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,uBAAuB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC,kCAAkC,EAAE,EAAE;AAC3F;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA,mDAAmD,8CAA8C;AACjG;AACA;AACA;AACA;AACA,kDAAkD,wBAAwB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,wFAAwF,EAAE;AAC5J;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,2CAA2C;AAC3C,KAAK,gGAA0B;AAC/B,EAAE;AACF;AACA,oBAAoB,6DAAe;AACnC,iBAAiB,4DAAc;AAC/B,eAAe,4DAAc;AAC7B;AACA,sC;;;;;;;;;;;;;;;;AC5Q6D;AACjC;AAC5B;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,iEAAiE,EAAE;AACtI,yCAAyC,sCAAsC,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA,gDAAgD,2CAA2C;AAC3F;AACA;AACA;AACA;AACA;AACA,qEAAqE,8BAA8B,EAAE;AACrG;AACA;AACA,8CAA8C,iBAAiB;AAC/D;AACA,oDAAoD,+CAA+C;AACnG;AACA,uDAAuD,gDAAgD;AACvG;AACA,CAAC;AACO;AACR;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA,4CAA4C;AAC5C,KAAK,kGAA2B;AAChC,KAAK,kEAAoB;AACzB,EAAE;AACF;AACA,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,wBAAwB,4DAAc;AACtC,gBAAgB,4DAAc;AAC9B,kBAAkB,4DAAc;AAChC,gBAAgB,4DAAc;AAC9B,yBAAyB,6DAAe;AACxC;AACA,uC;;;;;;;;;;;;;;;;AC7HiD;AACvB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,uDAAuD,EAAE;AAC3F;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC,kCAAkC,EAAE,EAAE;AAC3F,aAAa,wDAAwD,2CAA2C,EAAE,EAAE;AACpH,aAAa,+CAA+C,kCAAkC,EAAE,EAAE;AAClG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA,kDAAkD,6CAA6C;AAC/F;AACA;AACA;AACA;AACA,kDAAkD,wBAAwB,EAAE;AAC5E;AACA;AACA,CAAC;AACO;AACR;AACA;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,0CAA0C;AAC1C,KAAK,8FAAyB;AAC9B,EAAE;AACF;AACA,mBAAmB,4DAAc;AACjC,0BAA0B,4DAAc;AACxC,wBAAwB,4DAAc;AACtC,6BAA6B,4DAAc;AAC3C,aAAa,4DAAc;AAC3B,gBAAgB,4DAAc;AAC9B,oBAAoB,6DAAe;AACnC,+BAA+B,6DAAe;AAC9C,sBAAsB,6DAAe;AACrC;AACA,qC;;;;;;;;;;;;;;;;;;;;;;;AC1H6D;AAC9B;AACP;AACI;AACJ;AACC;AACC;AACA;AACC;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAoD;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+BAA+B,0CAA0C,EAAE;AAC3E,kCAAkC,iCAAiC,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,wBAAwB,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,uDAAuD,EAAE;AAC5H,yCAAyC,sCAAsC,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,4CAA4C;AACrF,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,mEAAmE,iCAAiC,EAAE;AACtG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,qFAAqF,yBAAyB,EAAE;AAChH;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD,aAAa,kDAAkD;AAC/D,aAAa,8CAA8C;AAC3D;AACA;AACA;AACA,6BAA6B,UAAU,mDAAmD;AAC1F;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,0DAA0D,uBAAuB,wBAAwB,OAAO,wBAAwB,qBAAqB,OAAO;AACpK;AACA,aAAa,IAAI;AACjB;AACA;AACA,qCAAqC;AACrC,KAAK,kEAAoB;AACzB,KAAK,gGAA8B;AACnC,EAAE;AACF;AACA,mBAAmB,4DAAc;AACjC,kBAAkB,4DAAc;AAChC,cAAc,4DAAc;AAC5B,iBAAiB,4DAAc;AAC/B,iBAAiB,4DAAc;AAC/B,mBAAmB,qFAAuC;AAC1D,gCAAgC,4DAAc;AAC9C,0BAA0B,4DAAc;AACxC,qBAAqB,4DAAc;AACnC,yBAAyB,4DAAc;AACvC,yBAAyB,4DAAc;AACvC,wBAAwB,4DAAc;AACtC,2BAA2B,4DAAc;AACzC,qBAAqB,4DAAc;AACnC,4BAA4B,4DAAc;AAC1C,gBAAgB,4DAAc;AAC9B,oBAAoB,4DAAc;AAClC,2BAA2B,4DAAc;AACzC,kCAAkC,4DAAc;AAChD,mBAAmB,4DAAc;AACjC,sBAAsB,4DAAc;AACpC,6BAA6B,4DAAc;AAC3C,wBAAwB,4DAAc;AACtC,+BAA+B,4DAAc;AAC7C,oBAAoB,4DAAc;AAClC,2BAA2B,4DAAc;AACzC,uBAAuB,4DAAc;AACrC,8BAA8B,4DAAc;AAC5C,2BAA2B,4DAAc;AACzC,kCAAkC,4DAAc;AAChD,mBAAmB,4DAAc;AACjC,wBAAwB,4DAAc;AACtC,yBAAyB,4DAAc;AACvC,kBAAkB,6DAAe;AACjC,uBAAuB,6DAAe;AACtC,qBAAqB,6DAAe;AACpC,sBAAsB,6DAAe;AACrC,sBAAsB,6DAAe;AACrC,cAAc,6DAAe;AAC7B,oBAAoB,6DAAe;AACnC,kBAAkB,6DAAe;AACjC;AACA,+B;;;;;;;;;;;;;;;;;ACna6E;AACrD;AACA;AACxB;AACA;AACA,4CAA4C,aAAa;AACzD;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,uCAAuC,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,0BAA0B,EAAE;AAC5F;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gCAAgC,UAAU,2CAA2C,EAAE;AACvF,SAAS;AACT;AACA;AACA;AACA,kCAAkC,UAAU,2CAA2C,EAAE;AACzF,SAAS;AACT;AACA;AACA;AACA,iCAAiC,UAAU,2CAA2C,EAAE;AACxF,SAAS;AACT;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA,gDAAgD,2CAA2C;AAC3F;AACA;AACA;AACA;AACA,4DAA4D,wBAAwB,EAAE;AACtF;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,wCAAwC;AACxC,KAAK,yFAAuB;AAC5B,EAAE;AACF;AACA,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,eAAe,4DAAc;AAC7B,eAAe,4DAAc;AAC7B,mBAAmB,wFAA0C;AAC7D,iBAAiB,4DAAc;AAC/B,iBAAiB,4DAAc;AAC/B,wBAAwB,4DAAc;AACtC,iBAAiB,4DAAc;AAC/B,gBAAgB,4DAAc;AAC9B,mBAAmB,wFAA0C;AAC7D,qBAAqB,6DAAe;AACpC,iBAAiB,6DAAe;AAChC,mBAAmB,6DAAe;AAClC,kBAAkB,6DAAe;AACjC,oBAAoB,2IAAgD;AACpE;AACA,kC;;;;;;;;;;;;;;;;AC1MiD;AACxB;AACzB;AACA,sCAAsC;AACtC;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ;AACR;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ,mBAAmB;AAC3B,QAAQ;AACR;AACA,QAAQ,kBAAkB;AAC1B,QAAQ,kBAAkB;AAC1B,QAAQ,kBAAkB;AAC1B,QAAQ,kBAAkB;AAC1B,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC,iCAAiC,EAAE,EAAE;AAC1F,aAAa,0CAA0C,oCAAoC,EAAE,EAAE;AAC/F,aAAa,uCAAuC,gCAAgC,EAAE,EAAE;AACxF,aAAa,0CAA0C,mCAAmC,EAAE,EAAE;AAC9F,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,2CAA2C,oCAAoC,EAAE,EAAE;AAChG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,0CAA0C,mCAAmC,EAAE,EAAE;AAC9F,aAAa,6CAA6C,sCAAsC,EAAE,EAAE;AACpG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,kCAAkC,+DAA+D,EAAE;AACnG;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA,kDAAkD,wBAAwB,EAAE;AAC5E;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,yCAAyC;AACzC,KAAK,2FAAwB;AAC7B,EAAE;AACF;AACA,mBAAmB,4DAAc;AACjC,mBAAmB,sFAAwC;AAC3D,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,qBAAqB,4DAAc;AACnC,kBAAkB,4DAAc;AAChC,eAAe,4DAAc;AAC7B,qBAAqB,4DAAc;AACnC,uBAAuB,4DAAc;AACrC,sBAAsB,4DAAc;AACpC,iBAAiB,4DAAc;AAC/B,gBAAgB,4DAAc;AAC9B,mBAAmB,6DAAe;AAClC,sBAAsB,6DAAe;AACrC,kBAAkB,6DAAe;AACjC,qBAAqB,6DAAe;AACpC,uBAAuB,6DAAe;AACtC,uBAAuB,6DAAe;AACtC,uBAAuB,6DAAe;AACtC,sBAAsB,6DAAe;AACrC,uBAAuB,6DAAe;AACtC,qBAAqB,6DAAe;AACpC,wBAAwB,6DAAe;AACvC;AACA,mC;;;;;;;;;;;;;;;ACxOiD;AACjD;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,wEAA0B,iCAAiC,IAAI;AACpE;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA,kBAAkB,4DAAc;AAChC,mBAAmB,4DAAc;AACjC,yBAAyB,6DAAe;AACxC;AACA,0C;;;;;;;;;;;;;;;;;AClCkE;AACxC;AACC;AAC3B;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,oDAAoD,EAAE;AAC3H;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,2DAA2D,2DAA2D,EAAE;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,iEAAiE,EAAE;AACtI,yCAAyC,6CAA6C,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC,iCAAiC,EAAE,EAAE;AAC1F,aAAa,2CAA2C,oCAAoC,EAAE,EAAE;AAChG,aAAa,uCAAuC,gCAAgC,EAAE,EAAE;AACxF,aAAa,0CAA0C,mCAAmC,EAAE,EAAE;AAC9F,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,2CAA2C,oCAAoC,EAAE,EAAE;AAChG,aAAa,4CAA4C,qCAAqC,EAAE,EAAE;AAClG,aAAa,0CAA0C,mCAAmC,EAAE,EAAE;AAC9F,aAAa,6CAA6C,sCAAsC,EAAE,EAAE;AACpG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA;AACA;AACA,kDAAkD,wBAAwB,EAAE;AAC5E;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,aAAa,IAAI;AACjB;AACA;AACA,0CAA0C;AAC1C,KAAK,6FAAyB;AAC9B,EAAE;AACF;AACA,mBAAmB,4DAAc;AACjC,mBAAmB,0FAA4C;AAC/D,kBAAkB,4DAAc;AAChC,kBAAkB,4DAAc;AAChC,qBAAqB,4DAAc;AACnC,uBAAuB,4DAAc;AACrC,sBAAsB,4DAAc;AACpC,iBAAiB,4DAAc;AAC/B,gBAAgB,4DAAc;AAC9B,mBAAmB,6DAAe;AAClC,sBAAsB,6DAAe;AACrC,kBAAkB,6DAAe;AACjC,qBAAqB,6DAAe;AACpC,uBAAuB,6DAAe;AACtC,uBAAuB,6DAAe;AACtC,uBAAuB,6DAAe;AACtC,sBAAsB,6DAAe;AACrC,uBAAuB,6DAAe;AACtC,qBAAqB,6DAAe;AACpC,wBAAwB,6DAAe;AACvC,gBAAgB,iJAAmD;AACnE;AACA,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrNA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACwB;AACxB,iC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACP+B;AACP;AACI;AACJ;AACC;AACC;AACA;AACC;AACiD;AACpD;AACI;AAC5B,oC;;;;;;;;;;;;;;;;;ACX6B;AACR;AACG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8BAA8B,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qCAAqC,uBAAuB,EAAE;AAC9D;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C,kCAAkC,iBAAiB;AACnD;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2CAA2C,4CAA4C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,8BAA8B,2BAA2B,EAAE,EAAE,EAAE;AACxH,aAAa;AACb,SAAS;AACT;AACA;AACA,8CAA8C,8BAA8B,EAAE;AAC9E;AACA,0DAA0D,uCAAuC,sBAAsB,EAAE,EAAE;AAC3H;AACA,8CAA8C,wBAAwB,EAAE;AACxE;AACA;AACA,8CAA8C,0BAA0B,EAAE;AAC1E;AACA;AACA,8CAA8C,wBAAwB,EAAE;AACxE;AACA;AACA,8CAA8C,0BAA0B,EAAE;AAC1E;AACA;AACA,8CAA8C,wBAAwB,EAAE;AACxE;AACA;AACA,8CAA8C,8BAA8B,EAAE;AAC9E;AACA;AACA,8CAA8C,gCAAgC,EAAE;AAChF;AACA;AACA;AACA;AACA,+DAA+D,kBAAkB;AACjF;AACA;AACA;AACA;AACA,4CAA4C,gDAAgD,EAAE;AAC9F;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,mDAAmD;AACnD,KAAK,wFAAuB;AAC5B,KAAK,8DAAgB;AACrB,EAAE;AACF,mD;;;;;;;;;;;;;;;;;ACvI6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4DAA4D,8BAA8B,EAAE;AAC5F;AACA;AACA,4DAA4D,sBAAsB,EAAE;AACpF;AACA;AACA,4DAA4D,sBAAsB,EAAE;AACpF;AACA;AACA,4DAA4D,sBAAsB,EAAE;AACpF;AACA;AACA,4DAA4D,qBAAqB,8CAA8C,EAAE,EAAE;AACnI;AACA;AACA,4DAA4D,uCAAuC,EAAE;AACrG;AACA;AACA,4DAA4D,yCAAyC,EAAE;AACvG;AACA;AACA,4DAA4D,qCAAqC,EAAE;AACnG;AACA;AACA,4DAA4D,mCAAmC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AACtI,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,4CAA4C;AAC5C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,0C;;;;;;;;;;;;;;;;;ACxF6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kFAAkF,8BAA8B,EAAE;AAClH;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,wEAAwE,8BAA8B,EAAE;AACxG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,+CAA+C;AAC/C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,8C;;;;;;;;;;;;;;;;;;ACtGqB;AACQ;AACE;AACP;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,oEAAoE;AACpE;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA,gCAAgC,uCAAuC,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,4BAA4B,EAAE;AAChH,iBAAiB;AACjB;AACA,0EAA0E,oBAAoB,EAAE;AAChG,SAAS;AACT;AACA;AACA,oEAAoE,kBAAkB,EAAE;AACxF;AACA;AACA,oEAAoE,8BAA8B,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,gDAAgD;AAChD,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,KAAK,uEAAuB;AAC5B,EAAE;AACF,+C;;;;;;;;;;;;;;;;;ACxF6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,mDAAmD,8BAA8B,EAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,8CAA8C;AAC9C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,6C;;;;;;;;;;;;;;;;;AC7D6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,4DAA4D,uBAAuB,8CAA8C,EAAE,EAAE;AACrI;AACA;AACA,4DAA4D,iCAAiC,EAAE;AAC/F;AACA;AACA,4DAA4D,0BAA0B,EAAE;AACxF;AACA;AACA,4DAA4D,yCAAyC,EAAE;AACvG;AACA;AACA,4DAA4D,kCAAkC,EAAE;AAChG;AACA;AACA,4DAA4D,qCAAqC,EAAE;AACnG;AACA;AACA,4DAA4D,qCAAqC,EAAE;AACnG;AACA;AACA,4DAA4D,mCAAmC,EAAE;AACjG;AACA;AACA,4DAA4D,yCAAyC,EAAE;AACvG;AACA;AACA;AACA,uBAAuB,8CAA8C;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,4CAA4C;AAC5C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,0C;;;;;;;;;;;;;;;;;ACtF6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qCAAqC,2BAA2B,EAAE,EAAE,EAAE;AAC1G;AACA;AACA,2DAA2D,uBAAuB,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,6CAA6C;AAC7C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,2C;;;;;;;;;;;;;;;;;ACrE6B;AACR;AACU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qCAAqC,iBAAiB,EAAE,EAAE,EAAE;AAChG;AACA;AACA,4DAA4D,uBAAuB,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,yBAAyB,EAAE,EAAE,EAAE;AAC3H,aAAa;AACb,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,8CAA8C;AAC9C,KAAK,uFAA8B;AACnC,KAAK,8DAAgB;AACrB,EAAE;AACF,4C;;;;;;;;;;;;;;;;;;AC3EA;AAAA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AAC4C;AACZ;AACT;AACxB;AACA;AACA;AACA;AACA;AACA,CAAC,4DAA4D;AAC7D;AACA,oFAAoF;AACpF,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B,EAAE;AACnE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,oBAAoB;AACpB,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,gDAAgD;AAChD,KAAK,gCAAgC,4FAA8C,IAAI;AACvF,KAAK,0EAAmB;AACxB,KAAK,4EAAqB;AAC1B,EAAE;AACF,gD;;;;;;;;;;;;;;;ACjHqB;AACrB;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA,KAAK,iEAAmB;AACxB;AACA;AACA,4CAA4C,WAAW;AACvD,2C;;;;;;;;;;;;;ACZA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR,gD;;;;;;;;;;;;;;;ACjBA;AAAA;AACA;AACA;AACA,uDAAuD,eAAe;AACtE;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,2DAA2D,iBAAiB;AAC5E;AACA,CAAC;AACO;AACR;AACA,2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA,yEAAyE;AACzE,mDAAmD,KAAK;AACxD,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B,8BAA8B,iBAAiB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,wCAAwC;AACtF,4BAA4B,sCAAsC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,uDAAuD;AACvD,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8DAA8D;AAClE;AACA;AACA,gEAAgE,kBAAkB;AAClF,IAAI,4BAA4B;AAChC;AACA;AACA;AACA,IAAI,8CAA8C;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,kBAAkB;AAC1F,IAAI,4BAA4B;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,uBAAuB;AAClC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,kBAAkB;AACtF;AACA,8FAA8F;AAC9F,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA,oEAAoE,qBAAqB;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yEAAyE;AACrF;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,sBAAsB,qCAAqC,GAAG,kBAAkB,MAAM;AACtF,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,kBAAkB,KAAK;AAC5F,uBAAuB;AACvB;AACA,IAAI,qEAAqE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA,YAAY,qBAAqB;AACjC,YAAY,oBAAoB;AAChC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA,qDAAqD,wBAAwB,OAAO;AACpF,cAAc;AACd;AACA;AACA;AACA;AACA,8FAA8F;AAC9F,eAAe,KAAK,sBAAsB;AAC1C,mDAAmD,0BAA0B,OAAO;AACpF,8CAA8C;AAC9C;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA;AACA,2DAA2D,4BAA4B;AACvF;AACA,wDAAwD,kBAAkB,OAAO;AACjF,cAAc;AACd;AACA;AACA;AACA,IAAI,kBAAkB;AACtB;AACA;AACA;AACA;AACA,IAAI,kBAAkB,KAAK,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,oBAAoB,aAAa;AACjC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA;AACA,IAAI,6BAA6B,aAAa,kCAAkC;AAChF,aAAa,sBAAsB,MAAM,0BAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,mCAAmC;AAC7C;AACA;AACA,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA,UAAU,YAAY;AACtB,wBAAwB,cAAc;AACtC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,4BAA4B;AACxF,mFAAmF;AACnF,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,yBAAyB;AACtD;AACA;AACA;AACA;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,0BAA0B,YAAY;AACtC,iCAAiC,cAAc;AAC/C;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oCAAoC;AAChD,YAAY,uCAAuC;AACnD,YAAY,yCAAyC;AACrD,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yBAAyB;AACrC,YAAY,0BAA0B;AACtC,YAAY,4BAA4B;AACxC,YAAY,2BAA2B;AACvC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,+EAA+E;AAC/E,2DAA2D;AAC3D;AACA;AACA,8BAA8B,2CAA2C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,gCAAgC;AAC/E,wEAAwE;AACxE,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C,yBAAyB,qBAAqB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,aAAa;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,yBAAyB,aAAa;AACtC;AACA;AACA,yBAAyB,aAAa;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kDAAkD;AAC7D,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,UAAU;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA,6CAA6C,eAAe;AAC5D;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa,SAAS,GAAG;AACrC,gBAAgB,QAAQ;AACxB,cAAc,aAAa,OAAO,EAAE;AACpC,OAAO,UAAU,oCAAoC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yDAAyD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC,iCAAiC,aAAa;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B,+BAA+B,aAAa;AAC5C;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oBAAoB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA,8FAA8F;AAC9F,yBAAyB;AACzB;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,WAAW;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,iBAAiB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,aAAa;AAC1C,mCAAmC,aAAa;AAChD;AACA;AACA,2CAA2C,aAAa;AACxD,iDAAiD,aAAa;AAC9D;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gBAAgB;AAC7C,YAAY;AACZ;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oDAAoD;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,aAAa;AAC/C;AACA;AACA;AACA,gBAAgB,aAAa;AAC7B;AACA,kCAAkC,aAAa;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc;AAChD,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa,EAAE;AAClE;AACA;AACA;AACA,2DAA2D,2BAA2B;AACtF,0DAA0D,0BAA0B;AACpF,6DAA6D,6BAA6B;AAC1F,4DAA4D,sBAAsB;AAClF,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,0BAA0B,EAAE;AACnE;AACA;AACA,gDAAgD,aAAa,EAAE;AAC/D;AACA;AACA,uDAAuD;AACvD,yDAAyD;AACzD,wDAAwD,kBAAkB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,aAAa,EAAE;AACrE;AACA;AACA;AACA,uDAAuD;AACvD,8DAA8D;AAC9D,6DAA6D,UAAU;AACvE;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa,EAAE;AACtD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,sEAAsE,yCAAyC,EAAE;AACjH;AACA;AACA;AACA;AACA,mDAAmD,aAAa,EAAE;AAClE;AACA;AACA;AACA,uDAAuD,yCAAyC,sBAAsB,EAAE,EAAE;AAC1H,4DAA4D,2BAA2B;AACvF;AACA;AACA;AACA,oDAAoD,aAAa,EAAE;AACnE;AACA;AACA;AACA,2DAA2D,0BAA0B;AACrF,8DAA8D,6BAA6B;AAC3F,6DAA6D,sBAAsB;AACnF;AACA;AACA;AACA;AACA;AACA,gDAAgD,sBAAsB,EAAE;AACxE;AACA,wDAAwD,yCAAyC,uBAAuB,EAAE,EAAE;AAC5H,0DAA0D,yCAAyC,yBAAyB,EAAE,EAAE;AAChI;AACA;AACA,gDAAgD,wBAAwB,EAAE;AAC1E;AACA,0DAA0D,mBAAmB;AAC7E;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB,EAAE;AAC/E,sDAAsD,aAAa,EAAE;AACrE;AACA;AACA;AACA;AACA,gDAAgD,uBAAuB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa,EAAE;AACtD;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjvCA;AAAA;AACA;AACA;AACA;AACA;;AAE8F;AACzE;AACqC;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sEAAsE,EAAE;AAChH;AACA;AACA,uCAAuC,qEAAqE,EAAE;AAC9G;AACA;AACA,0CAA0C,wEAAwE,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C,+BAA+B,eAAe;AAC9C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,cAAc;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,4BAA4B;AACnE;AACA,iDAAiD,kCAAkC;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,wCAAwC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,oCAAoC;AAC/G;AACA;AACA;AACA,2EAA2E,oCAAoC;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,sBAAsB;AAC/D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA,iCAAiC;AACjC,+BAA+B;AAC/B;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA,iCAAiC,kBAAkB;AACnD,8CAA8C,+BAA+B,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA,wCAAwC,kDAAkD,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,kBAAkB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6DAA6D,wCAAwC,EAAE;AACvG;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,0DAA0D,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,oDAAoD;AACtG;AACA,kDAAkD,oDAAoD;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,sBAAsB;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,wCAAwC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oIAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,wCAAwC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wEAAwE,4BAA4B,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA,4CAA4C,oDAAoD,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB,sBAAsB,EAAE,EAAE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA,4BAA4B,eAAe;AAC3C,iCAAiC,qBAAqB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,+BAA+B;AAC7F,yDAAyD,mBAAmB;AAC5E;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,aAAa;AACzB,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB,GAAG,wBAAwB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB,0BAA0B,aAAa;AACvC,0BAA0B,aAAa;AACvC,0BAA0B,aAAa;AACvC,0BAA0B,0BAA0B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD,iCAAiC,kBAAkB;AACnD,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,qCAAqC,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,kCAAkC,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,oCAAoC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,oDAAoD,uEAAuE,EAAE;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,oCAAoC,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAkI,iBAAiB;AACnJ;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,2CAA2C;AAClH;AACA,0BAA0B,uCAAuC,EAAE;AACnE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,qEAAqE,iEAAiE;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,8DAA8D,2CAA2C;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,kDAAkD,kCAAkC;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,kEAAkE,kCAAkC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,2BAA2B,YAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,+EAA2B,EAAE;AAChF;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG,qBAAqB;AACzH;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iCAAiC,wBAAwB,EAAE;AAC3D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kEAAoB;AACpD;AACA;AACA,yCAAyC,yDAAyD,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D,sDAAsD,8BAA8B,EAAE;AACtF,iEAAiE;AACjE,uDAAuD,+BAA+B,EAAE;AACxF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,wCAAwC,qDAAqD,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,0BAA0B,gCAAgC,EAAE;AAC5D;AACA;AACA,KAAK;AACL;AACA,gEAAgE,0DAA0D,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mDAAmD,aAAa,EAAE;AAClE,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA,mHAAmH,IAAI;AACvH;AACA,4EAA4E;AAC5E,6DAA6D,4BAA4B,EAAE;AAC3F,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,0HAAsE,EAAE;AACjI,SAAS;AACT;AACA;AACA,2CAA2C;AAC3C,SAAS;AACT;AACA;AACA,sCAAsC,0BAA0B,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yKAAyK;AACnM;AACA;AACA,wCAAwC,wCAAwC,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,uBAAuB,EAAE;AACpG;AACA,oFAAoF,2BAA2B,EAAE;AACjH,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yBAAyB,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,4DAA4D,EAAE;AAChH;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uEAAuE,gDAAgD,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yCAAyC,EAAE;AACtF;AACA;AACA;AACA;AACA,oFAAoF,wCAAwC;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2CAA2C,oBAAoB,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,kCAAkC,EAAE;AACpF;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA,iCAAiC,0CAA0C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mDAAmD,4BAA4B,EAAE;AACjF;AACA,yEAAyE,kCAAkC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,2CAA2C;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,yDAAyD,EAAE;AACxG;AACA;AACA;AACA,6CAA6C,6DAA6D,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,kEAAkE,oDAAoD,EAAE;AACxH;AACA;AACA;AACA;AACA;AACA,+CAA+C,wBAAwB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,kBAAkB,EAAE;AAClG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA,iEAAiE,iDAAiD,EAAE;AACpH;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA,2BAA2B,wCAAwC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa,EAAE;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,mCAAmC,aAAa,EAAE,EAAE,EAAE;AACvH;AACA;AACA,kDAAkD,aAAa,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mCAAmC;AAChE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kCAAkC,EAAE;AAC/E,SAAS;AACT;AACA;AACA;AACA,yBAAyB,0CAA0C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,kCAAkC,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kCAAkC,EAAE;AAC/E,SAAS;AACT;AACA;AACA;AACA,+CAA+C,qCAAqC,EAAE;AACtF,aAAa;AACb;AACA;AACA,+CAA+C,qCAAqC,EAAE;AACtF,aAAa;AACb,sDAAsD,iCAAiC,EAAE;AACzF,SAAS;AACT;AACA;AACA,sDAAsD,UAAU;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,qDAAqD,EAAE;AACvG,kDAAkD,iDAAiD,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,0CAA0C,EAAE;AACzG;AACA,6BAA6B;AAC7B;AACA,wEAAwE,mEAAmE,EAAE;AAC7I;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,2BAA2B,EAAE;AACpF;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,yBAAyB,EAAE;AAC9E,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6DAA6D,2CAA2C,EAAE;AAC1G,aAAa;AACb,kDAAkD,yBAAyB,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6FAA+C;AAC/C,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iDAAiD,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,+DAA+D,EAAE;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,iDAAiD,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iCAAiC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,qBAAqB,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,+BAA+B;AACzG,wFAAwF,mCAAmC;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,wHAA0E,UAAU;AACpF;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,0BAA0B,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uCAAuC,kFAAkF,EAAE;AAC3H,SAAS;AACT,wDAAwD,kDAAkD,EAAE;AAC5G;AACA;AACA,4DAA4D,qDAAqD,EAAE;AACnH;AACA,SAAS;AACT;AACA;AACA,mDAAmD,8DAA8D,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,2DAA2D,EAAE;AACpI,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qEAAqE,qBAAqB;AAC1F,kFAAkF,4BAA4B;AAC9G;AACA;AACA;AACA;AACA,wCAAwC,mCAAmC,EAAE;AAC7E;AACA,mCAAmC,uBAAuB,EAAE;AAC5D,sCAAsC,wBAAwB,EAAE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,qBAAqB;AACjF,kEAAkE,wDAAwD;AAC1H,4DAA4D,qCAAqC;AACjG,6DAA6D,sCAAsC;AACnG,+DAA+D,wCAAwC;AACvG,8DAA8D,uBAAuB;AACrF;AACA;AACA;AACA;AACA,6DAA6D,sCAAsC;AACnG;AACA;AACA;AACA;AACA;AACA,mEAAmE,qDAAqD;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,8CAA8C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA,yCAAyC,8CAA8C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8BAA8B,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yCAAyC,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,2BAA2B,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,+DAA+D,mDAAmD;AAClH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iCAAiC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yDAAyD;AACzH,iEAAiE,0DAA0D;AAC3H;AACA;AACA;AACA;AACA;AACA,sEAAsE,uBAAuB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oDAAoD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2BAA2B;AACrF,yDAAyD,0BAA0B;AACnF,4DAA4D,6BAA6B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,aAAa,EAAE;AACjE;AACA;AACA;AACA,+CAA+C,aAAa,EAAE;AAC9D;AACA;AACA;AACA,gDAAgD,aAAa,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,iCAAiC;AAClG,4DAA4D,mCAAmC;AAC/F,2DAA2D,mDAAmD;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oKAAoK,uBAAuB,EAAE;AAC7L;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,iDAAiD,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,oCAAoC;AAC9G;AACA;AACA;AACA,0EAA0E,oCAAoC;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gCAAgC,EAAE;AACnF,oDAAoD;AACpD;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2FAA2F;AAC3F;AACA;AACA;AACA,0EAA0E;AAC1E;AACA;AACA,aAAa;AACb,mCAAmC;AACnC,SAAS;AACT,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,yCAAyC,sBAAsB;AAC/D;AACA;AACA;AACA,mFAAmF,6CAA6C,EAAE;AAClI;AACA;AACA;AACA;AACA,6DAA6D,4CAA4C,EAAE;AAC3G,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,6BAA6B,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,aAAa,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,0BAA0B,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2BAA2B;AACtF,0DAA0D,0BAA0B;AACpF,6DAA6D,6BAA6B;AAC1F;AACA;AACA;AACA,oDAAoD,aAAa,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sBAAsB;AAClF;AACA;AACA;AACA;AACA;AACA,sDAAsD,aAAa,EAAE;AACrE;AACA;AACA;AACA,8DAA8D,4CAA4C;AAC1G,6DAA6D,+CAA+C;AAC5G;AACA,0BAA0B,qCAAqC,EAAE;AACjE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa,EAAE;AACtD;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA,2EAA2E,oCAAoC;AAC/G;AACA;AACA;AACA,2EAA2E,oCAAoC;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,gCAAgC;AACvH;AACA,yCAAyC,sBAAsB;AAC/D;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,8CAA8C,EAAE;AACpI;AACA;AACA;AACA,6DAA6D,4CAA4C,EAAE;AAC3G,aAAa;AACb;AACA,qDAAqD,kCAAkC,EAAE;AACzF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACl0IA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAEmX;AACnU;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E;AACA;AACA,IAAI,uBAAuB,yBAAyB,eAAe;AACnE,WAAW,aAAa,sEAAsE;AAC9F,UAAU;AACV,IAAI,eAAe,IAAI,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,2BAA2B,MAAM,2BAA2B;AAChE;AACA,uCAAuC,eAAe;AACtD;AACA,gCAAgC,aAAa,KAAK,eAAe;AACjE;AACA;AACA,kBAAkB,2BAA2B;AAC7C,mCAAmC,2BAA2B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,IAAI,2BAA2B;AAC/B;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,oBAAoB;AAC/B,WAAW,cAAc;AACzB;AACA;AACA,kBAAkB,4CAA4C;AAC9D,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA,6BAA6B,sBAAsB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+BAA+B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mDAAmD;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2CAA2C;AAC3C,SAAS,0BAA0B;AACnC,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uBAAuB,wBAAwB,eAAe;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,uBAAuB;AACrF;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC;AAC5F,uDAAuD,+BAA+B;AACtF;AACA,SAAS;AACT;AACA;AACA,uDAAuD;AACvD,SAAS,0BAA0B;AACnC,SAAS,gCAAgC,+DAAiB,GAAG,qFAAuC,IAAI;AACxG,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,uBAAuB,wBAAwB,eAAe;AACpE;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,uBAAuB;AACrF;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC;AAC5F,uDAAuD,+BAA+B;AACtF;AACA,SAAS;AACT;AACA;AACA,uDAAuD;AACvD,SAAS,0BAA0B;AACnC,SAAS,gCAAgC,+DAAiB,GAAG,qFAAuC,IAAI;AACxG,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE;AAC7F,iBAAiB;AACjB,qEAAqE;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,6CAA6C;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4BAA4B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4CAA4C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0BAA0B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,EAAE;AAC5F,6BAA6B,EAAE;AAC/B;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE;AAC7C,MAAM,GAAG,EAAE;AACX,kEAAkE,EAAE,GAAG,EAAE;AACzE;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,wBAAwB,EAAE,OAAO,EAAE,kCAAkC,EAAE,GAAG,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,mBAAmB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6CAA6C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,gCAAgC,mCAAmC;AACnE;AACA;AACA;AACA;AACA,YAAY,6CAA6C;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,EAAE;AACjC;AACA;AACA,gFAAgF,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;AAChN;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,IAAI,IAAI;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC,0BAA0B,cAAc;AACxC,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB;AACnD,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE,IAAI,IAAI,IAAI,IAAI;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAAiE,aAAa,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW,EAAE;AACzD;AACA,cAAc,qBAAqB;AACnC;AACA;AACA;AACA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gCAAgC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,yCAAyC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uDAAuD;AACvD,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,SAAS,gCAAgC,+DAAiB,GAAG,4FAA8C,IAAI;AAC/G,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAiD,oBAAoB,UAAU;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,8CAA8C;AAC/E;AACA;AACA;AACA,iCAAiC,8BAA8B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,4DAA4D,EAAE;AAClH,sDAAsD,4DAA4D,EAAE;AACpH;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,sDAAsD,+CAA+C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wCAAwC,EAAE;AAChG;AACA;AACA,mEAAmE,wDAAwD,EAAE;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yCAAyC,EAAE;AACjG;AACA;AACA,mEAAmE,yCAAyC,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS,wEAA0B,wBAAwB;AAC3D;AACA;AACA,0CAA0C;AAC1C,SAAS,uEAAyB;AAClC,SAAS,uEAAyB;AAClC,SAAS,kEAAoB;AAC7B,SAAS,iEAAmB;AAC5B,MAAM;AACN;AACA,mBAAmB,8EAAgC;AACnD,qBAAqB,4DAAc;AACnC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,gBAAgB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,eAAe;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,kCAAkC;AACrE;AACA;AACA,oDAAoD;AACpD,SAAS,wEAA0B;AACnC,MAAM;AACN;AACA,+BAA+B,4DAAc;AAC7C,uCAAuC,4DAAc;AACrD,sCAAsC,4DAAc;AACpD,8CAA8C,4DAAc;AAC5D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,sCAAsC,EAAE;AAClE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,6BAA6B,EAAE;AACzD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,mBAAmB,EAAE;AAC/C;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,YAAY;AACvE,QAAQ,GAAG,GAAG,cAAc,IAAI,MAAM;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,YAAY;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,uBAAuB,yBAAyB;AAChD;AACA;AACA,0DAA0D,UAAU;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,+BAA+B;AAClE;AACA;AACA,0CAA0C;AAC1C,SAAS,wEAA0B;AACnC,SAAS,mEAAqB;AAC9B,SAAS,uEAAyB;AAClC,MAAM;AACN;AACA,qBAAqB,4DAAc;AACnC,0BAA0B,4DAAc;AACxC,2BAA2B,4DAAc;AACzC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,4BAA4B,IAAI,6BAA6B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAmB,OAAO;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,qBAAqB;AACxD;AACA;AACA,uCAAuC;AACvC,SAAS,wEAA0B;AACnC,SAAS,mEAAqB;AAC9B,MAAM;AACN;AACA,kBAAkB,4DAAc;AAChC,sBAAsB,4DAAc;AACpC,sBAAsB,4DAAc;AACpC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,yBAAyB;AAC5D;AACA;AACA,2CAA2C,WAAW;AACtD;AACA,sBAAsB,4DAAc;AACpC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,eAAe;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,sEAAsE;AAC1H;AACA,SAAS,wEAA0B,6BAA6B;AAChE;AACA;AACA,+CAA+C;AAC/C,SAAS,wEAA0B;AACnC,SAAS,mEAAqB;AAC9B,SAAS,+BAA+B,2DAAa,IAAI;AACzD,MAAM;AACN;AACA,0BAA0B,4DAAc;AACxC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,eAAe;AAC9D;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,gCAAgC;AACnE;AACA;AACA,kDAAkD;AAClD,SAAS,wEAA0B;AACnC,SAAS,mEAAqB;AAC9B,SAAS,+BAA+B,2DAAa,IAAI;AACzD,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,+DAA+D,qCAAqC;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,yBAAyB;AAC5D;AACA;AACA,2CAA2C;AAC3C,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,sBAAsB,4DAAc;AACpC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,8DAA8D,eAAe;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,eAAe;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,6BAA6B;AAChE;AACA;AACA,+CAA+C;AAC/C,SAAS,gCAAgC,yFAA2C,IAAI;AACxF,SAAS,mEAAqB;AAC9B,SAAS,wEAA0B;AACnC,SAAS,+BAA+B,2DAAa,IAAI;AACzD,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,uBAAuB;AACpD;AACA,6BAA6B,yBAAyB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,0CAA0C,EAAE;AAClG,oDAAoD,yDAAyD,EAAE;AAC/G,sDAAsD,yDAAyD,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,wBAAwB;AAC3D;AACA;AACA,0CAA0C;AAC1C,SAAS,uEAAyB;AAClC,SAAS,kEAAoB;AAC7B,SAAS,iEAAmB;AAC5B,MAAM;AACN;AACA,qBAAqB,4DAAc;AACnC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE,kEAAkE;AAClE;AACA;AACA,qJAAuG,uBAAuB;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAqE,UAAU;AAC/E;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA,SAAS,wEAA0B,iCAAiC;AACpE;AACA;AACA,mDAAmD;AACnD,SAAS,wEAA0B;AACnC,MAAM;AACN;AACA,qCAAqC,4DAAc;AACnD,8BAA8B,4DAAc;AAC5C;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,0CAA0C;AAC9E;AACA;AACA,oCAAoC,0CAA0C;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kEAAoB,gBAAgB,EAAE,IAAI;AAC5F;AACA;AACA,oCAAoC,0CAA0C;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,wBAAwB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,EAAE,IAAI,IAAI,IAAI,IAAI;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAAiE,0BAA0B,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,2BAA2B;AACzD;AACA;AACA,qDAAqD;AACrD,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,iBAAiB;AAC/C,sCAAsC,0BAA0B;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,iBAAiB;AAC/C;AACA;AACA,wDAAwD;AACxD,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,kBAAkB;AAChD;AACA;AACA,wDAAwD;AACxD,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kBAAkB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sBAAsB;AAC5D,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA,SAAS,mEAAqB,mBAAmB;AACjD;AACA;AACA,yDAAyD;AACzD,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,+CAA+C,SAAS,EAAE,EAAE;AAC5F;AACA,oEAAoE,4BAA4B;AAChG,sEAAsE,4BAA4B;AAClG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,2DAA2D,SAAS,EAAE;AACtE;AACA,iEAAiE;AACjE,mEAAmE;AACnE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,6CAA6C,EAAE;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,6BAA6B;AAC3D;AACA;AACA,4CAA4C;AAC5C,SAAS,yEAA2B;AACpC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,oBAAoB;AAClD;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA,CAAC;AACD;AACA;AACA,gCAAgC,EAAE;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,2DAA2D,EAAE;AAC7H;AACA;AACA,SAAS,mEAAqB,oBAAoB;AAClD;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,oBAAoB;AAClD;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA,cAAc,6CAA6C;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,2BAA2B;AACzD;AACA;AACA,2CAA2C;AAC3C,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,iCAAiC;AAC/D;AACA;AACA,iDAAiD;AACjD,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,iCAAiC;AAC/D;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,uCAAuC;AAC5F;AACA,SAAS,mEAAqB,4BAA4B;AAC1D;AACA;AACA,2CAA2C,WAAW;AACtD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACvE;AACA;AACA;AACA;AACA;AACA,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB,EAAE,kBAAkB,EAAE,kBAAkB;AACzE;AACA;AACA;AACA;AACA;AACA,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,iBAAiB;AAC/C;AACA;AACA,8CAA8C;AAC9C,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,sBAAsB,oBAAoB;AAC1C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,kBAAkB;AAChD;AACA;AACA,8CAA8C;AAC9C,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB,MAAM,qBAAqB;AAC1E;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD,8EAA8E,gBAAgB;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,kBAAkB;AAClD,gFAAgF,gBAAgB;AAChG;AACA;AACA;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mEAAqB,mBAAmB;AACjD;AACA;AACA,+CAA+C;AAC/C,SAAS,gCAAgC,+HAAmC,IAAI;AAChF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,sDAAsD;AACzG;AACA,SAAS,mEAAqB,6BAA6B;AAC3D;AACA;AACA,4CAA4C,WAAW;AACvD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,WAAW,GAAG,cAAc;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yBAAyB,0DAA0D;AACnF;AACA,iBAAiB;AACjB;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iCAAiC,8CAA8C;AAC/E,iBAAiB;AACjB;AACA;AACA,4DAA4D,WAAW;AACvE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtuLA;AAAA;AACA;AACA;AACA;AACA;;AAE8E;AACrD;AACQ;AACK;AACA;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA,2BAA2B,oCAAoC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,kCAAkC,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,yCAAyC,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,uEAAuE,EAAE;AAC9G;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,4BAA4B;AACzF,+DAA+D,4BAA4B;AAC3F,6DAA6D,8BAA8B;AAC3F,+DAA+D,8BAA8B;AAC7F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB,sCAAsC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB,sCAAsC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB,sCAAsC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sDAAsD,EAAE;AACpH;AACA,SAAS;AACT;AACA;AACA;AACA,oCAAoC,wBAAwB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2DAA2D,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,mDAAmD,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA,kDAAkD,mDAAmD,EAAE;AACvG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qBAAqB;AAC5D,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,iKAA6D,kCAAkC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAyD,sCAAsC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,oHAA6D,iBAAiB,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6CAA6C;AAC7C,SAAS,qBAAqB;AAC9B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,+CAA+C;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD;AACrD,SAAS,8BAA8B;AACvC,SAAS,gCAAgC,gIAAkC,IAAI;AAC/E,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mDAAmD;AACnD,SAAS,4BAA4B;AACrC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,+BAA+B;AAC7E;AACA,SAAS;AACT;AACA;AACA,6CAA6C,WAAW;AACxD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,qDAAqD,EAAE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,qEAAqE;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,iDAAiD;AACjD,SAAS,oBAAoB;AAC7B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0DAA0D;AAC1D,SAAS,gCAAgC,gIAAkC,IAAI;AAC/E,SAAS,gCAAgC,iIAAqC,IAAI;AAClF,SAAS,gCAAgC,wFAA0C,IAAI;AACvF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,mDAAmD;AAChF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sDAAsD;AACtD,SAAS,gCAAgC;AACzC,SAAS,gCAAgC,wFAA0C,IAAI;AACvF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,sDAAsD,EAAE;AACxI;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0DAA0D;AAC1D,SAAS,qBAAqB;AAC9B,SAAS,gEAAkB;AAC3B,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA,kEAAkE,sDAAsD,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0DAA0D;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,sCAAsC,0DAA0D;AAChG,sCAAsC,0DAA0D;AAChG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,4EAA4E;AACrG,yBAAyB,qEAAqE;AAC9F,yBAAyB,oDAAoD;AAC7E,yBAAyB,sDAAsD;AAC/E;AACA,iBAAiB;AACjB;AACA;AACA,uDAAuD,WAAW;AAClE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yBAAyB,0DAA0D;AACnF;AACA,yBAAyB,oDAAoD;AAC7E;AACA,yBAAyB,+CAA+C;AACxE;AACA,iBAAiB;AACjB;AACA;AACA,mDAAmD,WAAW;AAC9D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,kEAAkE;AAC3F,yBAAyB,sEAAsE;AAC/F;AACA,iBAAiB;AACjB;AACA;AACA,wDAAwD,WAAW;AACnE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5tEA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAE0D;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,UAAU,eAAe,EAAE,EAAE;AAChG,kFAAkF,UAAU,0CAA0C,EAAE,EAAE;AAC1I,iFAAiF,UAAU,+BAA+B,EAAE,EAAE;AAC9H;AACA,0BAA0B,WAAW;AACrC,oEAAsB,2EAA2E;AACjG,CAAC;AACD;AACA,0BAA0B,WAAW;AACrC,oEAAsB,yEAAyE;AAC/F,CAAC;AACD;AACA,0BAA0B,WAAW;AACrC,oEAAsB,yEAAyE;AAC/F,CAAC;AACD;AACA,oEAAsB,wEAAwE;AAC9F,CAAC;AACD;AACA,yBAAyB,UAAU;AACnC;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA,uBAAuB,QAAQ;AAC/B,oEAAsB,mDAAmD;AACzE,CAAC;AACD,2DAA2D,iEAAmB,aAAa,MAAM,EAAE;AACnG,+EAA+E,UAAU,2CAA2C,EAAE,EAAE;AACxI,iFAAiF,UAAU,2CAA2C,EAAE,EAAE;AAC1I,wFAAwF,UAAU,qCAAqC,EAAE,EAAE;AAC3I,yFAAyF,UAAU,mCAAmC,EAAE,EAAE;AAC1I,0EAA0E,iBAAiB,EAAE;AAC7F;AACA,gCAAgC,iBAAiB;AACjD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;AACjE;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,uEAAyB,uBAAuB;AAChD;AACA,uCAAuC,2CAA2C;AAClF;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B,EAAE;AACvD,iCAAiC,gCAAgC,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wBAAwB,EAAE;AACnD,oCAAoC,mCAAmC;AACvE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0CAA0C,EAAE;AACrF;AACA;AACA;AACA;AACA,iDAAiD,oDAAoD,EAAE;AACvG;AACA;AACA,2EAA2E,cAAc;AACzF,uEAAuE,cAAc;AACrF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,gCAAgC,sDAAsD,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yCAAyC;AACpG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yCAAyC;AACpG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,mFAAmF;AACnF,0EAA0E;AAC1E,4EAA4E;AAC5E,2EAA2E;AAC3E,wEAAwE;AACxE,kFAAkF;AAClF,uEAAuE;AACvE,4EAA4E;AAC5E,uEAAuE;AACvE,4EAA4E;AAC5E,oFAAoF;AACpF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kCAAkC,kBAAkB,kBAAkB,yBAAyB;AAC/F;AACA;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA,wBAAwB,mEAAmE,EAAE;AAC7F,wBAAwB,oCAAoC;AAC5D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,oCAAoC,wBAAwB;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sBAAsB;AAC3D;AACA;AACA,2CAA2C,sBAAsB;AACjE;AACA;AACA,yCAAyC,sBAAsB;AAC/D;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gDAAgD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qCAAqC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA,0BAA0B,wCAAwC,EAAE;AACpE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,qBAAqB,EAAE;AACjD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,wCAAwC,EAAE;AACpE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iDAAiD,+CAA+C;AAChG;AACA,0CAA0C,QAAQ;AAClD;AACA;AACA;AACA;AACA;AACA,8CAA8C,sBAAsB;AACpE,yCAAyC,wBAAwB;AACjE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,yCAAyC;AACjG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,8CAA8C;AAC3G;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,kDAAkD;AACnH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,8CAA8C;AAC3G;AACA,CAAC;AACD;AACA;AACA,yCAAyC,wBAAwB;AACjE,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,4CAA4C;AACvG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,2DAA2D,4CAA4C;AACvG;AACA,CAAC;AACD;AACA,6BAA6B,gBAAgB;AAC7C;AACA;AACA,wBAAwB,mEAAmE,EAAE;AAC7F,wBAAwB,oCAAoC;AAC5D;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yEAAyE;AACzE,oEAAoE;AACpE,uEAAuE;AACvE;AACA,6DAA6D,kBAAkB,EAAE;AACjF;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,8DAA8D,MAAM;;AAEpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wEAAwE,WAAW,GAAG;AACtF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oDAAoD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,mCAAmC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,yDAAyD,EAAE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG,yEAAyE,EAAE;AAC5K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yEAAyE,EAAE;AACxI;AACA;AACA;AACA;AACA,qFAAqF,sCAAsC,GAAG,QAAQ,uCAAuC,EAAE,GAAG,kDAAkD;AACpO;AACA;AACA;AACA;AACA,8FAA8F,+DAA+D;AAC7J;AACA;AACA,sFAAsF,kFAAkF;AACxK;AACA;AACA;AACA,iEAAiE,qEAAqE;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2KAA2K,oGAAoG,EAAE;AACjR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,sCAAsC;AACxF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wDAAwD,iCAAiC,EAAE;AAC3F;AACA,SAAS;AACT;AACA;AACA;AACA,2CAA2C,+BAA+B;AAC1E,kFAAkF,yCAAyC,EAAE;AAC7H,sCAAsC;AACtC,uFAAuF,6CAA6C;AACpI;AACA;AACA,SAAS,EAAE,EAAE,kBAAkB,0BAA0B,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA,iCAAiC,mDAAmD,EAAE;AACtF;AACA;AACA;AACA;AACA,SAAS;AACT,8CAA8C,mEAAmE;AACjH;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,2BAA2B;AAC3G;AACA;AACA;AACA,8EAA8E,aAAa;AAC3F,gFAAgF,aAAa;AAC7F,2EAA2E,aAAa;AACxF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gBAAgB;AACzC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,gCAAgC,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,iCAAiC,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,sCAAsC,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,gFAAgF,uCAAuC,EAAE;AACzH;AACA;AACA;AACA,aAAa;AACb,2EAA2E,sDAAsD,sBAAsB,EAAE,EAAE,EAAE;AAC7J;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qEAAqE,iDAAiD;AACtH;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAqD;AACrD,yGAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8BAA8B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,sCAAsC;AAClF,4CAA4C,sCAAsC;AAClF;AACA;AACA;AACA,gDAAgD,0CAA0C;AAC1F,6CAA6C,uCAAuC;AACpF,gDAAgD,iEAAiE;AACjH,+CAA+C,gEAAgE;AAC/G,iDAAiD,kEAAkE;AACnH;AACA;AACA;AACA,iDAAiD,kEAAkE;AACnH,kDAAkD,mEAAmE;AACrH,iDAAiD,kEAAkE;AACnH,2CAA2C,qCAAqC;AAChF,4CAA4C,2DAA2D;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,0CAA0C,cAAc;AACxD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,4CAA4C,gBAAgB;AAC5D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,oDAAoD,6CAA6C;AACjG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,oEAAoE;AACpE,mEAAmE;AACnE,yEAAyE;AACzE,0EAA0E;AAC1E,8EAA8E;AAC9E,2EAA2E;AAC3E,uEAAuE;AACvE,wEAAwE;AACxE,0EAA0E;AAC1E,wEAAwE;AACxE,8EAA8E;AAC9E,wEAAwE;AACxE,kEAAkE;AAClE,uEAAuE;AACvE,2EAA2E;AAC3E,0EAA0E;AAC1E,2EAA2E;AAC3E,mEAAmE;AACnE,4EAA4E;AAC5E,8EAA8E;AAC9E;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,gDAAgD;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,aAAa;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,2CAA2C;AACxH,mFAAmF,aAAa;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,kCAAkC,EAAE;AACzE;AACA;AACA,wEAAwE,aAAa;AACrF;AACA,CAAC;AACD;AACA;AACA;AACA,8EAA8E,YAAY;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6FAA6F,YAAY;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,YAAY;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,YAAY;AAC9F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,6BAA6B,qBAAqB;AAClD;AACA;AACA;AACA;AACA,SAAS;AACT,oCAAoC,2BAA2B,EAAE;AACjE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+CAA+C,EAAE;AACjD,4CAA4C,2BAA2B,EAAE;AACzE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT,2CAA2C,2BAA2B,EAAE;AACxE,yCAAyC,EAAE;AAC3C,+CAA+C,EAAE;AACjD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT,wCAAwC,uBAAuB,EAAE;AACjE,4CAA4C,uBAAuB,EAAE;AACrE,2CAA2C,qBAAqB,EAAE;AAClE;AACA;AACA;AACA,SAAS;AACT,oCAAoC,EAAE;AACtC;AACA;AACA;AACA,SAAS;AACT,+CAA+C,qBAAqB,EAAE;AACtE,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,qBAAqB,EAAE;AACjD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,iDAAiD,8CAA8C;AAC/F,+CAA+C,cAAc;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iCAAiC;AACvF,qDAAqD,gCAAgC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,uDAAuD,gCAAgC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,8DAA8D;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF,oFAAoF;AACpF,uFAAuF;AACvF,mFAAmF;AACnF,oFAAoF;AACpF,uFAAuF;AACvF,iFAAiF;AACjF,qFAAqF;AACrF,mFAAmF;AACnF,mFAAmF,gCAAgC;AACnH,iFAAiF,2BAA2B;AAC5G,6EAA6E;AAC7E,gFAAgF;AAChF,oFAAoF;AACpF,kFAAkF;AAClF,2EAA2E,2BAA2B;AACtG,gFAAgF;AAChF,iFAAiF;AACjF;AACA;AACA,yCAAyC,0BAA0B,EAAE;AACrE;AACA,4EAA4E;AAC5E,4EAA4E;AAC5E;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA,+BAA+B,+BAA+B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4CAA4C,gCAAgC;AAC5E,yCAAyC,oDAAoD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,kBAAkB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qDAAqD;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,6BAA6B;AAC5D,6BAA6B,2BAA2B;AACxD;AACA;AACA;AACA,+BAA+B,6BAA6B;AAC5D;AACA;AACA;AACA;AACA,6BAA6B,2BAA2B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,6BAA6B,GAAG,IAAI;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,gCAAgC,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,gCAAgC,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+GAA+G;AAC/G;AACA;AACA;AACA;AACA,2GAA2G;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,iBAAiB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,QAAQ;AAC3D;AACA,wBAAwB;AACxB;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAA+B,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,mBAAmB;AAC1F;AACA;AACA,8DAA8D,2BAA2B,EAAE;AAC3F;AACA;AACA;AACA,gEAAgE,eAAe,kCAAkC,EAAE,EAAE;AACrH,iBAAiB,sEAAsE;AACvF;AACA;AACA;AACA;AACA;AACA,yFAAyF,2BAA2B,EAAE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mCAAmC,yCAAyC,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,eAAe,kCAAkC,EAAE,EAAE;AACrH;AACA,iBAAiB,8CAA8C;AAC/D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA,uBAAuB,QAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wBAAwB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,uCAAuC,EAAE;AACzF;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kBAAkB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,WAAW;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wDAAwD,yCAAyC;AACjG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,8CAA8C;AAC3G;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,wCAAwC;AAC/F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,mDAAmD;AACrH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gDAAgD;AAC/G;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,mDAAmD;AACrH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,iEAAiE,gDAAgD;AACjH;AACA;AACA,4DAA4D,gCAAgC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA,uDAAuD,0DAA0D,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gCAAgC,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA;AACA,qDAAqD,2BAA2B,EAAE;AAClF;AACA;AACA;AACA,qDAAqD,2BAA2B,EAAE;AAClF;AACA;AACA;AACA,8CAA8C,2BAA2B,EAAE;AAC3E;AACA,wEAAwE;AACxE,2EAA2E;AAC3E;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA,yDAAyD,+CAA+C,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,8CAA8C,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,eAAe;AAClD,mCAAmC,eAAe;AAClD,mCAAmC,eAAe;AAClD,oCAAoC,eAAe;AACnD,mCAAmC,eAAe;AAClD,kCAAkC,eAAe;AACjD,oCAAoC,eAAe;AACnD,oCAAoC,eAAe;AACnD,iCAAiC,eAAe;AAChD,iCAAiC,eAAe;AAChD,qCAAqC,eAAe;AACpD,oCAAoC,eAAe;AACnD,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,oCAAoC,uCAAuC;AAC3E,oCAAoC,6DAA6D;AACjG,oCAAoC,oDAAoD;AACxF;AACA;AACA;AACA;AACA,KAAK;AACL,iCAAiC,uDAAuD;AACxF,iCAAiC,uDAAuD;AACxF,kCAAkC,8CAA8C;AAChF,kCAAkC,iCAAiC;AACnE,mCAAmC,kCAAkC;AACrE,iCAAiC,iDAAiD;AAClF,iCAAiC,iCAAiC;AAClE,iCAAiC,uDAAuD;AACxF,iCAAiC,oEAAoE;AACrG,iCAAiC,oEAAoE;AACrG,kCAAkC,8DAA8D;AAChG,iCAAiC,oEAAoE;AACrG,uCAAuC,uDAAuD;AAC9F,qCAAqC,iEAAiE;AACtG,kCAAkC,sBAAsB;AACxD,sCAAsC,sBAAsB;AAC5D,oCAAoC,uCAAuC;AAC3E,qCAAqC,uCAAuC;AAC5E,oCAAoC,iDAAiD;AACrF,uCAAuC,sEAAsE;AAC7G;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,uCAAuC,EAAE;AAC/G;AACA;AACA;AACA,oEAAoE,mCAAmC,SAAS;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,aAAa;AACpF;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,4BAA4B,EAAE,EAAE;AAC1H,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2CAA2C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,gCAAgC,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,wBAAwB,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,gDAAgD,EAAE;AAC3F,sCAAsC;AACtC,uBAAuB,EAAE;AACzB;AACA;AACA;AACA;AACA,6DAA6D,2BAA2B,EAAE;AAC1F;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,YAAY;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,kDAAkD,EAAE;AACpI;AACA,mDAAmD,iBAAiB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,iCAAiC,EAAE;AAC5E;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,cAAc;AAC5F,kEAAkE,cAAc;AAChF;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,aAAa;AAC7E;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,0BAA0B,EAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,aAAa;AACzF;AACA;AACA;AACA;AACA;AACA,iFAAiF,oCAAoC;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0BAA0B,EAAE;AACxF;AACA;AACA,oDAAoD,mBAAmB;AACvE;AACA;AACA;AACA;AACA,+DAA+D,0CAA0C,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,sCAAsC,6BAA6B,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sDAAsD,uCAAuC;AAC7F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,kDAAkD,mCAAmC;AACrF;AACA,CAAC;AACD;AACA;AACA,wCAAwC,qBAAqB;AAC7D,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,8CAA8C,+BAA+B;AAC7E;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,+CAA+C,gCAAgC;AAC/E;AACA,CAAC;AACD;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA,CAAC;AACD;AACA,iBAAiB;AACjB,kBAAkB;AAClB,kBAAkB;AAClB,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA,yDAAyD,yCAAyC,EAAE;AACpG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,sBAAsB;AACzF,iFAAiF,+BAA+B,qEAAqE,+BAA+B;AACpN;AACA,aAAa;AACb,gDAAgD,mCAAmC;AACnF,+IAAiG;AACjG;AACA,oEAAoE,qCAAqC;AACzG;AACA;AACA,oEAAoE,iCAAiC;AACrG;AACA;AACA;AACA;AACA,SAAS;AACT,qCAAqC;AACrC;AACA;AACA;AACA;AACA,SAAS;AACT,sCAAsC,mCAAmC;AACzE;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB;AAChB;AACA,iDAAiD,wBAAwB;AACzE;AACA,CAAC;AACD;AACA;AACA;AACA,kEAAkE,iCAAiC;AACnG;AACA;AACA;AACA,oDAAoD,2GAA6D,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,8GAAgE,8CAA8C;AAC9G,SAAS;AACT,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oEAAoE;AACnH;AACA,oDAAoD,mEAAmE;AACvH,oDAAoD,oEAAoE;AACxH;AACA;AACA;AACA,2CAA2C,+BAA+B,kBAAkB,GAAG;AAC/F;AACA;AACA,0BAA0B,0GAA0G,mBAAmB,IAAI,EAAE,EAAE,gBAAgB;AAC/K,2CAA2C,uCAAuC;AAClF;AACA;AACA;AACA,qHAAuE,0BAA0B,EAAE;AACnG;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,2BAA2B,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wCAAwC,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E;AAC1E,gEAAgE;AAChE,sEAAsE;AACtE,0EAA0E;AAC1E,kFAAkF;AAClF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,gDAAgD;AAC9G;AACA;AACA,0DAA0D,2BAA2B,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,wEAAwE;AACxE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA;AACA;AACA,oEAAoE,0BAA0B;AAC9F;AACA;AACA,oEAAoE,sBAAsB;AAC1F;AACA;AACA;AACA,gEAAgE,uBAAuB;AACvF;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,sEAAsE;AACtE;AACA;AACA,SAAS;AACT,oCAAoC,0CAA0C;AAC9E,yCAAyC,kFAAkF;AAC3H;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB;AAChB;AACA,kDAAkD,+BAA+B;AACjF;AACA,CAAC;AACD;AACA;AACA;AACA,kEAAkE,iCAAiC;AACnG;AACA;AACA;AACA,oDAAoD,2GAA6D,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,8GAAgE,8CAA8C;AAC9G,SAAS;AACT,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gIAAkF,0BAA0B,EAAE;AAC9G;AACA,2CAA2C,kCAAkC,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,kBAAkB;AAC3C,aAAa;AACb;AACA;AACA,sEAAsE,mBAAmB,IAAI,EAAE,EAAE;AACjG;AACA,6CAA6C,oCAAoC,kEAAkE,GAAG;AACtJ;AACA;AACA;AACA;AACA,qHAAuE,0BAA0B,EAAE;AACnG;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,2BAA2B,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,gCAAgC,EAAE;AACvG;AACA;AACA;AACA,sEAAsE,gCAAgC,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E,iEAAiE;AACjE,uEAAuE;AACvE,2EAA2E;AAC3E,mFAAmF;AACnF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,gDAAgD;AAC9G;AACA;AACA;AACA;AACA,8DAA8D,8BAA8B,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,mCAAmC,EAAE;AACpG,6DAA6D,iCAAiC,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4LAA8I,gCAAgC,EAAE;AAChL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,wEAAwE;AACxE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,0BAA0B;AACzE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,6DAA6D,iCAAiC;AAC9F;AACA;AACA;AACA,oDAAoD,2GAA6D,EAAE;AACnH;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,8GAAgE,8CAA8C;AAC9G,SAAS;AACT,gCAAgC;AAChC;AACA;AACA;AACA,8CAA8C;AAC9C,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA,4CAA4C,iBAAiB,kBAAkB;AAC/E,6CAA6C,gBAAgB;AAC7D;AACA;AACA,4CAA4C;AAC5C,yBAAyB,0GAA0G,mBAAmB,IAAI,EAAE,EAAE,gBAAgB;AAC9K;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA,qHAAuE,0BAA0B,EAAE;AACnG;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,kDAAkD,0BAA0B,EAAE;AAC9E;AACA;AACA,0DAA0D;AAC1D,iEAAiE;AACjE,gEAAgE;AAChE;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,gCAAgC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,gBAAgB;AAChB;AACA,+CAA+C,0BAA0B;AACzE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iCAAiC;AAClF;AACA,SAAS;AACT,2BAA2B,2DAA2D,EAAE;AACxF,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,6BAA6B,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,2BAA2B,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE,8DAA8D;AAC9D,oEAAoE;AACpE,wEAAwE;AACxE,gFAAgF;AAChF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,gDAAgD;AAC9G;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,6BAA6B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,wEAAwE;AACxE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,wBAAwB;AACnE,oDAAoD,iEAAiE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,6BAA6B;AAClE,0CAA0C,uCAAuC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,sDAAsD;AAC/G;AACA,CAAC;AACD;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,uBAAuB,EAAE;AAC7E;AACA;AACA;AACA,6DAA6D,eAAe,kCAAkC,EAAE,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA,iBAAiB,uDAAuD;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,6CAA6C,EAAE;AAC9G;AACA;AACA;AACA,qDAAqD,uBAAuB,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0CAA0C;AAC3E;AACA;AACA;AACA;AACA;AACA,4CAA4C,oDAAoD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,aAAa;AACzD;AACA,8CAA8C,0BAA0B,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yDAAyD;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA,6CAA6C,6BAA6B;AAC1E,6CAA6C,oDAAoD;AACjG;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B,oCAAoC;AACpC;AACA;AACA;AACA;AACA,6BAA6B;AAC7B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,gCAAgC;AAChC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,4BAA4B;AAC5B,4BAA4B;AAC5B,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,+BAA+B;AAC/B,6BAA6B;AAC7B,4BAA4B;AAC5B,2BAA2B;AAC3B,8BAA8B;AAC9B,6BAA6B;AAC7B,2BAA2B;AAC3B,gCAAgC;AAChC,+BAA+B;AAC/B,4BAA4B;AAC5B,gCAAgC;AAChC,iCAAiC;AACjC,+BAA+B;AAC/B,2BAA2B;AAC3B,6BAA6B;AAC7B,gCAAgC;AAChC,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA,CAAC;AACD;AACA,YAAY,cAAc,uBAAuB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA,sDAAsD,gDAAgD;AACtG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA,+DAA+D,4CAA4C;AAC3G;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,4CAA4C;AAC3F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,cAAc;AACvE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,aAAa;AACjE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,oCAAoC,mBAAmB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,cAAc;AACtE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,cAAc;AAC9D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,cAAc;AAC/D;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,cAAc;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yCAAyC,uBAAuB,EAAE,EAAE;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yCAAyC,6BAA6B,EAAE,EAAE;AACjI;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA;AACA;AACA;AACA;AACA,2DAA2D,gDAAgD;AAC3G;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,gDAAgD;AACnH;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA,sDAAsD,6BAA6B;AACnF;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA,0DAA0D,oCAAoC;AAC9F;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,iCAAiC;AACxF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,uEAAuE,aAAa;AACpF,uEAAuE,aAAa;AACpF,yEAAyE,yCAAyC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,yCAAyC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,kGAAkG,EAAE;AAC5J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,6CAA6C,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,oHAAoH,EAAE;AAChL;AACA;AACA,0DAA0D,mIAAmI,EAAE;AAC/L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4CAA4C,EAAE;AACxF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,uEAAuE,YAAY;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,sCAAsC;AACrH;AACA;AACA;AACA;AACA,6EAA6E,sCAAsC;AACnH,2EAA2E,sCAAsC;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,uCAAuC,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oDAAoD,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,uDAAuD,EAAE;AACzG;AACA;AACA;AACA,gDAAgD,uDAAuD,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,aAAa;AAC5F,oFAAoF,aAAa;AACjG;AACA;AACA,uCAAuC,4CAA4C,EAAE;AACrF;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD,mCAAmC,sBAAsB;AACzD;AACA;AACA;AACA,mCAAmC,sBAAsB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC,uDAAuD,sDAAsD,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,IAAI;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iHAAmE,gBAAgB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,uCAAuC,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kFAAkF,6BAA6B;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yBAAyB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,wCAAwC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,iDAAiD,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uBAAuB;AACnF;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C;AACA;AACA,0DAA0D,0CAA0C;AACpG;AACA;AACA;AACA,sDAAsD,2BAA2B,EAAE;AACnF;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA,0DAA0D,2CAA2C,EAAE;AACvG;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,wBAAwB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qBAAqB;AACxD;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sDAAsD;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,2BAA2B,4EAA4E,EAAE;AACzG;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,+CAA+C,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,0DAA0D,8CAA8C,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE,2CAA2C,0BAA0B;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,+CAA+C,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,oJAAsG,yDAAyD,EAAE;AACjK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,+CAA+C,+CAA+C,EAAE;AAChG,+CAA+C,iEAAiE,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,8BAA8B,EAAE;AACvF,gEAAgE,uCAAuC,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,iEAAiE,wCAAwC,EAAE;AAC3G,4DAA4D,mCAAmC,EAAE;AACjG,SAAS;AACT;AACA,iEAAiE,gCAAgC,EAAE;AACnG,4DAA4D,2BAA2B,EAAE;AACzF,SAAS;AACT;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,gDAAgD,uCAAuC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA,mFAAmF,uCAAuC,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2BAA2B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,sEAAsE,6CAA6C,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,4BAA4B,cAAc,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA,0CAA0C,uBAAuB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,qBAAqB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+EAA+E,kCAAkC;AACjH;AACA;AACA;AACA;AACA;AACA,2EAA2E,yCAAyC,EAAE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,yBAAyB,UAAU;AACnC;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mDAAmD,EAAE;AAC/F,yEAAyE,+BAA+B,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,uFAAuF,kCAAkC,EAAE;AAC3H;AACA,yDAAyD;AACzD,iEAAiE,EAAE;AACnE;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,4DAA4D,oGAAsD,EAAE;AACpH;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4CAA4C;AAC3E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kIAAoF,gDAAgD,EAAE;AACtI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,8BAA8B;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,wEAAwE,EAAE;AACvH;AACA;AACA;AACA;AACA,6CAA6C,wEAAwE,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,qDAAqD,gDAAgD;AACrG;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6BAA6B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,SAAS,2BAA2B;AACxE;AACA,SAAS;AACT,oFAAoF,uBAAuB,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,8BAA8B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,sEAAsE,EAAE;AACrH;AACA;AACA;AACA;AACA,6CAA6C,sEAAsE,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,qDAAqD,gDAAgD;AACrG;AACA;AACA;AACA;AACA,+BAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS,6BAA6B;AACjE;AACA,KAAK;AACL;AACA,yEAAyE,wBAAwB,EAAE,2CAA2C,yBAAyB,EAAE;AACzK;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,0CAA0C,sCAAsC,EAAE,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,6CAA6C,yCAAyC,EAAE,EAAE;AAClJ;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,8BAA8B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kCAAkC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB,EAAE;AAClF,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,wDAAwD,EAAE;AAC3I;AACA;AACA;AACA,aAAa,4DAA4D;AACzE,aAAa,mDAAmD;AAChE,aAAa,6EAA6E;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,mCAAmC,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8DAA8D,qCAAqC,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA,6DAA6D,wEAAwE;AACrI;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,qFAAqF;AACpH;AACA;AACA;AACA,0BAA0B,gCAAgC,EAAE;AAC5D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,0BAA0B;AAC1B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qCAAqC;AACzF;AACA,0BAA0B,4CAA4C,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA,kCAAkC,eAAe;AACjD;AACA;AACA,+DAA+D,6CAA6C;AAC5G;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,2BAA2B;AAC7F,4DAA4D,4BAA4B;AACxF;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,+BAA+B,6EAA6E,EAAE;AAC9G;AACA;AACA;AACA,sCAAsC,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6EAA6E,wCAAwC;AACrH;AACA;AACA;AACA;AACA,mCAAmC,sCAAsC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iCAAiC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,SAAS;AACT,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yCAAyC,EAAE;AACzF;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,wCAAwC,EAAE;AACtF;AACA;AACA,CAAC;AACD;AACA,iCAAiC,oBAAoB;AACrD;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA,mEAAmE,6CAA6C,EAAE;AAClH,wCAAwC,sBAAsB,mCAAmC;AACjG,SAAS;AACT;AACA;AACA;AACA,4EAA4E;AAC5E,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8BAA8B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA,8CAA8C,2CAA2C,EAAE;AAC3F;AACA;AACA;AACA,gDAAgD,6CAA6C,EAAE;AAC/F,gDAAgD,6CAA6C,EAAE;AAC/F;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,4BAA4B,yCAAyC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,mCAAmC,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,WAAW;AACpC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qHAAuE,iBAAiB;AACxF;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,gDAAgD,EAAE;AAC3G;AACA;AACA,gEAAgE,8BAA8B,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,gDAAgD,8CAA8C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,oDAAoD,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,8CAA8C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,oDAAoD,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,4CAA4C;AAC5H,qFAAqF,uBAAuB;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,oBAAoB;AACpB;AACA;AACA,2EAA2E,kCAAkC;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,mBAAmB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,+BAA+B,4BAA4B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA,4BAA4B;AAC5B,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,qCAAqC,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kCAAkC,gDAAgD,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,sEAAsE,mCAAmC,EAAE;AAC3G;AACA,kDAAkD,sBAAsB;AACxE;AACA,CAAC;AACD,0DAA0D,+BAA+B,KAAK,IAAI,KAAK;AACvG,2CAA2C,gCAAgC,OAAO,GAAG;AACrF,4DAA4D,gCAAgC,OAAO,GAAG;AACtG;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,EAAE,cAAc,QAAQ,KAAK,UAAU;AACjE,oBAAoB;AACpB,mBAAmB;AACnB,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,uDAAuD,EAAE;AACrI;AACA;AACA;AACA;AACA;AACA,8GAA8G,kEAAkE,EAAE;AAClL,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,GAAG;AAC1D;AACA,uCAAuC,4CAA4C,EAAE;AACrF;AACA;AACA,iCAAiC;AACjC;AACA,yBAAyB;AACzB;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,gBAAgB;AAC5F,gFAAgF,kBAAkB;AAClG,wFAAwF,sBAAsB;AAC9G;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,SAAS;AACT,SAAS;AACT,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,kBAAkB;AAC1F,8DAA8D,aAAa;AAC3E,oEAAoE,gBAAgB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,+CAA+C,EAAE;AACxF;AACA,wDAAwD,6CAA6C;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8DAA8D,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,gEAAgE,kEAAkE,EAAE;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,+BAA+B;AAC9D;AACA;AACA;AACA;AACA,6HAA+E,kBAAkB;AACjG;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,qCAAqC,EAAE;AAC/H,sCAAsC,yBAAyB,EAAE;AACjE,+EAA+E,0CAA0C,EAAE;AAC3H,sIAAwF,qEAAqE,EAAE;AAC/J,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA,iEAAiE,mDAAmD,EAAE;AACtH,+DAA+D,iDAAiD,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,8CAA8C,EAAE;AAC1G;AACA;AACA;AACA;AACA,gCAAgC,gBAAgB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,6BAA6B,EAAE;AACzE,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,mFAAmF,aAAa;AAChG,2FAA2F,aAAa;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,aAAa;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,0DAA0D,cAAc,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uDAAuD,wCAAwC,EAAE;AACjG;AACA;AACA;AACA,uCAAuC,iDAAiD,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+BAA+B,+BAA+B;AAC9D;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,gCAAgC,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA,6EAA6E,aAAa;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,kBAAkB;AACnG,yFAAyF,sBAAsB;AAC/G;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,4DAA4D,iBAAiB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,wCAAwC,EAAE;AACxG;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,uCAAuC,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,4CAA4C,EAAE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,yBAAyB;AAC7D,SAAS;AACT;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,iBAAiB,EAAE,EAAE;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,QAAQ;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sBAAsB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAqE,kCAAkC,EAAE;AACzG;AACA;AACA;AACA;AACA,uDAAuD,kCAAkC,EAAE;AAC3F;AACA;AACA;AACA;AACA,kDAAkD,kCAAkC,EAAE;AACtF;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,4BAA4B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2CAA2C;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,aAAa,EAAE;AACxD,wCAAwC,aAAa,EAAE;AACvD,8CAA8C,aAAa,EAAE;AAC7D,+CAA+C,aAAa,EAAE;AAC9D,mDAAmD,aAAa,EAAE;AAClE,gDAAgD,aAAa,EAAE;AAC/D,4CAA4C,6BAA6B,EAAE;AAC3E,6CAA6C,aAAa,EAAE;AAC5D,+CAA+C,aAAa,EAAE;AAC9D,6CAA6C,aAAa,EAAE;AAC5D,mDAAmD,aAAa,EAAE;AAClE,6CAA6C,kCAAkC,EAAE;AACjF,uCAAuC,aAAa,EAAE;AACtD,4CAA4C,aAAa,EAAE;AAC3D,gDAAgD,aAAa,EAAE;AAC/D,+CAA+C,kCAAkC,EAAE;AACnF,gDAAgD,aAAa,EAAE;AAC/D,wCAAwC,aAAa,EAAE;AACvD,iDAAiD,yCAAyC,EAAE;AAC5F;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,4BAA4B,EAAE;AAC1E;AACA;AACA,yCAAyC,wDAAwD,EAAE;AACnG,wCAAwC,cAAc,EAAE;AACxD;AACA;AACA;AACA,aAAa;AACb,+CAA+C,aAAa,EAAE;AAC9D,mDAAmD,cAAc,EAAE;AACnE,gDAAgD,yCAAyC,EAAE;AAC3F,4CAA4C,cAAc,EAAE;AAC5D,6CAA6C,cAAc,EAAE;AAC7D,+CAA+C,aAAa,EAAE;AAC9D,6CAA6C,aAAa,EAAE;AAC5D,mDAAmD,cAAc,EAAE;AACnE,6CAA6C,aAAa,EAAE;AAC5D,uCAAuC,aAAa,EAAE;AACtD,4CAA4C,oCAAoC,EAAE;AAClF,gDAAgD,oCAAoC,EAAE;AACtF,+CAA+C,cAAc,EAAE;AAC/D,gDAAgD,cAAc,EAAE;AAChE,wCAAwC,cAAc,EAAE;AACxD,iDAAiD,aAAa,EAAE;AAChE,mDAAmD,cAAc;AACjE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,sCAAsC,yCAAyC,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,4CAA4C,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iHAAmE,UAAU;AAC7E;AACA;AACA,2HAA6E,UAAU;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,6BAA6B;AAC7B;AACA;AACA;AACA,+BAA+B,QAAQ,gBAAgB;AACvD;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,uBAAuB;AACjE,gDAAgD,mDAAmD,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8HAAgF,6DAA6D,EAAE;AAC/I,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8HAAgF,6DAA6D,EAAE;AAC/I,SAAS;AACT;AACA;AACA;AACA,kHAAoE,UAAU;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oEAAoE;AAC3G,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mFAAmF;AACnH,SAAS;AACT;AACA;AACA;AACA;AACA,kDAAkD,8BAA8B,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gCAAgC,uFAAuF;AACvH,SAAS;AACT;AACA;AACA;AACA;AACA,gDAAgD,4BAA4B,6EAA6E,EAAE,EAAE;AAC7J;AACA;AACA;AACA;AACA,+DAA+D,4BAA4B,2EAA2E,EAAE,EAAE;AAC1K,+DAA+D;AAC/D;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA,2EAA2E,6BAA6B,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA,kBAAkB,EAAE;AACpB,4DAA4D;AAC5D,4DAA4D;AAC5D;AACA;AACA;AACA,qBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA,kBAAkB,EAAE;AACpB,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,EAAE;AACpB,aAAa;AACb;AACA;AACA,oEAAoE;AACpE,+DAA+D;AAC/D,4EAA4E;AAC5E,oEAAoE;AACpE,mEAAmE;AACnE,gEAAgE;AAChE,0EAA0E;AAC1E,+DAA+D;AAC/D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,EAAE,EAAE;AACrB,aAAa;AACb;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB;AACA;AACA;AACA,0CAA0C,uBAAuB;AACjE,gDAAgD,sCAAsC,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F,2CAA2C,+GAA+G,EAAE,EAAE;AAC3P;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA,2DAA2D,mBAAmB,EAAE;AAChF;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA;AACA,qBAAqB,EAAE,EAAE;AACzB,qEAAqE,oEAAoE,EAAE;AAC3I;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,6DAA6D,qCAAqC,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,6BAA6B,uDAAuD;AACpF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA,iBAAiB,EAAE,EAAE;AACrB;AACA;AACA,0EAA0E;AAC1E;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb,wEAAwE;AACxE;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE;AACX,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kEAAkE,qCAAqC,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,aAAa;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,6BAA6B,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb,gCAAgC,wCAAwC;AACxE;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA,uDAAuD,kEAAoB,MAAM,oBAAoB,GAAG,EAAE;AAC1G;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb,gCAAgC,wCAAwC;AACxE;AACA;AACA,+DAA+D,kCAAkC,EAAE;AACnG;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oIAAoI;AACxK;AACA;AACA;AACA;AACA,oCAAoC,sHAAsH;AAC1J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8DAA8D,uCAAuC,EAAE;AACvG;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,4EAA4E,EAAE;AAChJ;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAAwF,6DAA6D,EAAE;AACvJ;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE;AACpE,4EAA4E;AAC5E,oEAAoE;AACpE,mEAAmE;AACnE,gEAAgE;AAChE,0EAA0E;AAC1E,+DAA+D;AAC/D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAyC,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA,6EAA6E,sEAAsE,EAAE;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,oBAAoB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,oCAAoC,EAAE;AAC3G,sEAAsE,qCAAqC,EAAE;AAC7G,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,qCAAqC,EAAE;AAC5G,sEAAsE,qCAAqC,EAAE;AAC7G,aAAa;AACb;AACA;AACA;AACA,mDAAmD,0CAA0C,EAAE;AAC/F;AACA,oDAAoD,uCAAuC,EAAE;AAC7F,0BAA0B,mEAAmE;AAC7F,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oCAAoC,EAAE;AAC/F,0DAA0D,qCAAqC,EAAE;AACjG,KAAK;AACL,gDAAgD,uCAAuC,EAAE;AACzF,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,aAAa;AACrE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,2CAA2C,EAAE;AACpH;AACA,wFAAwF,4BAA4B,EAAE;AACtH;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA,aAAa,EAAE,EAAE;AACjB;AACA,qFAAqF,gBAAgB,EAAE,uBAAuB,wDAAwD;AACtL;AACA;AACA;AACA,aAAa,EAAE,EAAE,GAAG,EAAE;AACtB;AACA;AACA;AACA;AACA;AACA,mEAAmE,wBAAwB,EAAE;AAC7F;AACA,oEAAoE,gFAAgF,EAAE;AACtJ,oFAAoF,0CAA0C,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,2CAA2C;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yCAAyC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,8CAA8C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qDAAqD;AACxE;AACA;AACA,mBAAmB,uDAAuD;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,uBAAuB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,0DAA0D,IAAI;AAC9D;AACA;AACA,sEAAsE,yDAAyD,EAAE;AACjI;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,+BAA+B,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA,qDAAqD,+BAA+B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA,KAAK,EAAE,EAAE;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,8BAA8B;AAC9B,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,qCAAqC;AACrC,mCAAmC;AACnC,gCAAgC;AAChC,mCAAmC;AACnC,wBAAwB;AACxB,kCAAkC;AAClC,mCAAmC;AACnC,wBAAwB;AACxB,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,kCAAkC;AAClC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AACjC,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,6BAA6B;AAC7B,wBAAwB;AACxB,wBAAwB;AACxB,8BAA8B;AAC9B,iCAAiC;AACjC,oCAAoC;AACpC,sCAAsC;AACtC,mCAAmC;AACnC,oCAAoC;AACpC,qCAAqC;AACrC,0CAA0C;AAC1C,mCAAmC;AACnC,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,yBAAyB;AACzB,gCAAgC;AAChC,sCAAsC;AACtC,4BAA4B;AAC5B;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,wCAAwC,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,uDAAuD;AACzG;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,wCAAwC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,wCAAwC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAsH,4DAA4D,EAAE;AACpL;AACA;AACA;AACA,gDAAgD,sCAAsC,EAAE;AACxF;AACA,uDAAuD;AACvD;AACA,iEAAiE,IAAI;AACrE;AACA;AACA,6DAA6D,0BAA0B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,mEAAmE,gCAAgC,EAAE;AACrG;AACA;AACA;AACA;AACA,8DAA8D,gCAAgC,EAAE;AAChG;AACA;AACA,qBAAqB,OAAO;AAC5B;AACA,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA,iEAAiE,8CAA8C,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gCAAgC,eAAe;AAC/C,iDAAiD,gCAAgC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E;AAC5E,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,sCAAsC;AAClE;AACA;AACA,uDAAuD,uBAAuB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,0EAA0E,iCAAiC,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yIAA2F,qBAAqB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,uDAAuD,eAAe,EAAE;AACxE;AACA;AACA;AACA,oEAAoE,qCAAqC,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAqE,UAAU;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sHAAwE,UAAU;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA,oEAAoE,oCAAoC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gHAAkE,UAAU;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iEAAiE,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,yBAAyB,uBAAuB,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,8HAA8H,0CAA0C,EAAE;AAC1K;AACA;AACA,SAAS;AACT;AACA;AACA,iHAAmE,UAAU;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6IAA+F,sBAAsB;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2HAA6E,UAAU;AACvF;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ,gBAAgB;AACvD;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,0BAA0B;AAClG,sEAAsE,oCAAoC;AAC1G;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8DAA8D,oBAAoB,EAAE;AACpF,yCAAyC,eAAe,EAAE;AAC1D,iGAAiG,uBAAuB,EAAE;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0GAA4D,UAAU;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA,6HAA+E,mBAAmB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAuF,UAAU;AACjG;AACA;AACA;AACA;AACA;AACA,oBAAoB,SAAS,iBAAiB;AAC9C;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,uBAAuB,0CAA0C;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAuF,oBAAoB;AAC3G;AACA,4IAA4I,0CAA0C,EAAE;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS,iBAAiB;AAClD;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,yJAA2G,yBAAyB;AACpI;AACA,gHAAgH,0CAA0C,EAAE;AAC5J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,SAAS,iBAAiB;AAClD;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,uBAAuB,EAAE;AACvE;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,UAAU,yEAAyE,EAAE,EAAE;AACnK,8CAA8C,uBAAuB,EAAE;AACvE;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA,+CAA+C,0CAA0C;AACzF;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,sDAAsD,EAAE;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,0EAA0E,UAAU,uDAAuD,EAAE,EAAE;AAC/I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wDAAwD;AACtF;AACA,8BAA8B,+EAA+E;AAC7G,gDAAgD,qBAAqB,EAAE;AACvE;AACA,8BAA8B,wDAAwD;AACtF;AACA;AACA,kCAAkC,mDAAmD;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oIAAsF,UAAU;AAChG;AACA;AACA;AACA;AACA,6JAA+G,wBAAwB;AACvI;AACA;AACA;AACA;AACA,+BAA+B,QAAQ,gBAAgB;AACvD;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA,6HAA+E,kBAAkB;AACjG;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,qBAAqB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAuF,mBAAmB;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,0HAA4E,UAAU;AACtF;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,2DAA2D,yEAAyE,EAAE;AACtI,yFAAyF,8BAA8B,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oFAAsC,QAAQ,8BAA8B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB,sFAAsF;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,qCAAqC,mEAAmE,EAAE,EAAE;AAC3J;AACA;AACA;AACA,qCAAqC,qEAAqE;AAC1G,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,qCAAqC;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,yDAAyD;AACjF;AACA;AACA,wBAAwB,oDAAoD;AAC5E;AACA;AACA;AACA;AACA;AACA,iJAAmG,uBAAuB;AAC1H;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,4GAA8D,UAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iIAAmF,UAAU;AAC7F;AACA;AACA;AACA;AACA,mCAAmC,QAAQ,gBAAgB;AAC3D;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uBAAuB,EAAE;AAC/D,+EAA+E,uBAAuB,EAAE;AACxG,wCAAwC,wCAAwC,EAAE;AAClF,qCAAqC,uCAAuC,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yIAA2F,4BAA4B,EAAE,2BAA2B;AACpJ;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,0CAA0C,EAAE;AACxG;AACA;AACA;AACA,+EAA+E,8EAA8E,EAAE;AAC/J;AACA,8EAA8E,uBAAuB;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,4IAA4I,EAAE;AACnN;AACA;AACA;AACA;AACA,kCAAkC,oDAAoD;AACtF;AACA;AACA,kCAAkC,gGAAgG;AAClI;AACA,SAAS;AACT;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,qCAAqC;AACzF;AACA;AACA;AACA,6DAA6D,oGAAoG,EAAE;AACnK;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,qGAAqG,EAAE;AACzK,+BAA+B,sBAAsB,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qCAAqC,EAAE;AAC9F;AACA,uCAAuC;AACvC;AACA,SAAS,EAAE,EAAE;AACb,iEAAiE,iDAAiD,EAAE;AACpH,+DAA+D;AAC/D;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA,uDAAuD,qCAAqC,EAAE;AAC9F,uCAAuC,oDAAoD,oGAAoG,EAAE,EAAE,EAAE;AACrM,iEAAiE,iDAAiD,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uJAAyG,oBAAoB,EAAE,yDAAyD,oBAAoB,EAAE,kDAAkD,yBAAyB,EAAE,kDAAkD,yBAAyB,EAAE;AACxW;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6IAA+F,sBAAsB;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,qDAAqD,qBAAqB,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,wKAAwK,EAAE;AACjN,yCAAyC,oGAAoG,EAAE;AAC/I;AACA,qCAAqC;AACrC;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA,kDAAkD,oEAAoE,EAAE;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mDAAmD,+DAA+D,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,mDAAmD,+DAA+D,EAAE;AACpH;AACA,qBAAqB,8IAAgG;AACrH;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,wIAAwI,EAAE;AACjM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,sDAAsD,EAAE;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,oDAAoD,EAAE;AAC1F,6GAA+D;AAC/D;AACA;AACA,SAAS,EAAE,EAAE,kCAAkC;AAC/C;AACA;AACA,SAAS,EAAE,EAAE,6BAA6B;AAC1C;AACA;AACA,SAAS,EAAE,EAAE,mCAAmC;AAChD;AACA;AACA,SAAS,EAAE,EAAE;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,0BAA0B,EAAE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,mEAAmE,EAAE;AACvI,yEAAyE,+DAA+D,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB;AAC3D,0CAA0C,qBAAqB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,8BAA8B,EAAE;AAC/F;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gIAAkF,UAAU;AAC5F;AACA;AACA;AACA,yJAA2G,sBAAsB;AACjI;AACA;AACA;AACA;AACA,mCAAmC,QAAQ,gBAAgB;AAC3D;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wBAAwB;AAChE,2CAA2C,oBAAoB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iJAAmG,sBAAsB;AACzH;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ,gBAAgB;AACnD;AACA;AACA;AACA;AACA,yBAAyB,0BAA0B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,8CAA8C,EAAE;AAC1H,SAAS;AACT;AACA,2CAA2C,4BAA4B,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,sCAAsC,EAAE;AAC9E;AACA;AACA;AACA,qDAAqD,6CAA6C,EAAE;AACpG;AACA,sEAAsE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,6DAA6D,EAAE;AAC7H,yDAAyD,6DAA6D,EAAE;AACxH,SAAS;AACT,4CAA4C,qCAAqC,EAAE;AACnF,uCAAuC,qCAAqC,EAAE;AAC9E,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,YAAY;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,2BAA2B;AACzE,gDAAgD,6BAA6B;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,oGAAoG,EAAE;AAC1J,sDAAsD,oFAAoF,EAAE;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,+DAA+D,EAAE;AACjI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,yCAAyC,EAAE;AAC/G;AACA;AACA;AACA,oEAAoE,+CAA+C,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0GAA0G,8CAA8C,mCAAmC,EAAE,EAAE,EAAE;AACjM;AACA;AACA,gHAAgH,4BAA4B,EAAE;AAC9I;AACA;AACA;AACA,yEAAyE,cAAc,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,wCAAwC,qEAAqE,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yCAAyC,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,2DAA2D,oCAAoC,EAAE;AACjG;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yJAA2G,yBAAyB;AACpI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA,+DAA+D,8GAAgE,EAAE;AACjI;AACA;AACA,+DAA+D,kCAAkC,EAAE;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,qCAAqC,EAAE;AACnG,qDAAqD,4CAA4C,EAAE;AACnG;AACA,+JAAiH,wBAAwB,EAAE;AAC3I;AACA;AACA;AACA,2CAA2C,uBAAuB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAA2E,UAAU;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6KAA+H,uBAAuB;AACtJ;AACA;AACA;AACA;AACA,mDAAmD,QAAQ,gBAAgB;AAC3E;AACA;AACA;AACA;AACA,iDAAiD,0BAA0B;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ,gBAAgB;AAC3D;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,qCAAqC,EAAE;AAC7H,iEAAiE,4CAA4C,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,gDAAgD,gDAAgD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,sDAAsD;AAC1G;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAA2B,6BAA6B,EAAE;AACpF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,qCAAqC,EAAE;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,gDAAgD;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,wDAAwD,EAAE;AAC5G;AACA;AACA;AACA,kDAAkD,wDAAwD,EAAE;AAC5G;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8CAA8C,sBAAsB,uCAAuC,EAAE,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,8DAA8D,cAAc;AAC5E,0EAA0E,iBAAiB;AAC3F,4EAA4E,iBAAiB;AAC7F;AACA;AACA;AACA,6DAA6D,WAAW;AACxE,qEAAqE,kBAAkB;AACvF,2EAA2E,aAAa;AACxF,kEAAkE,8CAA8C;AAChH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,+CAA+C,EAAE;AAChG;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,6DAA6D,mBAAmB,EAAE;AAClF;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,mFAAmF,mBAAmB,EAAE;AACxG;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,oDAAoD,+BAA+B,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,wCAAwC;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,gBAAgB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,aAAa;AAC7F,qFAAqF,aAAa;AAClG;AACA;AACA;AACA;AACA;AACA,2EAA2E,kBAAkB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,mBAAmB,EAAE;AAC/E;AACA;AACA;AACA,2DAA2D,mBAAmB,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4CAA4C;AAC3E,+BAA+B,4CAA4C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,oEAAoE,EAAE;AACpH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,yCAAyC,EAAE;AAC3F;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA,gDAAgD,mDAAmD,EAAE;AACrG,gDAAgD,mDAAmD,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,sGAAsG,kBAAkB;AACxH;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA,6BAA6B,EAAE;AAC/B;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,4BAA4B,yCAAyC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,+CAA+C,oCAAoC,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,MAAM;AACxB;AACA,yJAA2G;AAC3G,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,mEAAmE,EAAE;AAChL;AACA;AACA;AACA;AACA,uBAAuB,+BAA+B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,mBAAmB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,gEAAgE;AAClH;AACA;AACA;AACA,0DAA0D,oDAAoD;AAC9G;AACA;AACA,uCAAuC,sBAAsB,EAAE,yBAAyB,kCAAkC,EAAE;AAC5H;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,yCAAyC,2DAA2D,EAAE;AACtG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,+CAA+C,yCAAyC,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,kFAAkF,+DAA+D,EAAE;AACnJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,mEAAmE,EAAE;AACvI,yEAAyE,+DAA+D,EAAE;AAC1I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kEAAkE;AAC7F;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iEAAiE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,2BAA2B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,WAAW;AAC9D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,oGAAoG,EAAE;AAC1J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,yDAAyD,qBAAqB,EAAE;AAChF;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,kEAAkE;AAC3G,kDAAkD,sBAAsB,+BAA+B,EAAE,EAAE;AAC3G;AACA;AACA;AACA,gEAAgE;AAChE;AACA,gBAAgB;AAChB;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7rtBA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAE0D;AACP;AACnC;;AAEhB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,qDAAqD,uCAAuC;AAC5F;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,YAAY;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,UAAU,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,kCAAkC;AAC1C,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,MAAM,mCAAmC;AACzC,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,UAAU,+BAA+B,EAAE,EAAE;AACvH;AACA;AACA;AACA,QAAQ,sBAAsB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,gBAAgB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,oEAAsB,2EAA2E;AACjG,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,oEAAsB,yEAAyE;AAC/F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC,oEAAsB,yEAAyE;AAC/F,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAsB,wEAAwE;AAC9F,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0DAA0D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oDAAoD;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ;AAC/B,oEAAsB,mDAAmD;AACzE,CAAC;AACD;AACA;AACA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA,IAAI,4BAA4B;AAChC;AACA;AACA;AACA;AACA,+CAA+C,iEAAmB,aAAa,MAAM,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,UAAU,2CAA2C,EAAE,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,UAAU,2CAA2C,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,UAAU,qCAAqC,EAAE,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA,iFAAiF,UAAU,mCAAmC,EAAE,EAAE;;AAElI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,4BAA4B,EAAE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C,2EAA2E;AAC3E,qFAAqF;AACrF;AACA;AACA;AACA;AACA,wEAAwE,aAAa;AACrF,6DAA6D;AAC7D;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,oCAAoC,EAAE;AAC9G;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,WAAW;AAC1E,+DAA+D,iDAAiD,GAAG;AACnH;AACA,iEAAiE;AACjE;AACA;AACA,kGAAkG,+CAA+C;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,+BAA+B;AACnG;AACA;AACA;AACA,oFAAoF,6BAA6B;AACjH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,yCAAyC,0BAA0B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,UAAU,eAAe,EAAE,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,qCAAqC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kEAAkE;AAChG;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB,EAAE;AACzD,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iDAAiD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wBAAwB;AACxD,gCAAgC,eAAe;AAC/C;AACA;AACA;AACA,+BAA+B,sEAAsE;AACrG,+BAA+B,sEAAsE;AACrG;AACA;AACA;AACA,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,sCAAsC,EAAE;AACrF;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,yCAAyC,yCAAyC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA,oDAAoD,wBAAwB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iCAAiC;AACxD;AACA;AACA;AACA;AACA,iBAAiB,yCAAyC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gBAAgB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,gCAAgC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,4HAA8E;AAC1G;AACA;AACA;AACA,4BAA4B,iCAAiC;AAC7D;AACA;AACA;AACA,4BAA4B,+CAA+C;AAC3E;AACA;AACA;AACA,4BAA4B,yKAA2H;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,8HAAgF;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA,iEAAiE,uBAAuB;AACxF;AACA;AACA,KAAK;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,gBAAgB;AAC/F;AACA,QAAQ,4CAA4C;AACpD;AACA;AACA;AACA,+EAA+E,gBAAgB;AAC/F;AACA,QAAQ,4CAA4C;AACpD;AACA;AACA;AACA;AACA,+EAA+E,gBAAgB;AAC/F;AACA,QAAQ,4CAA4C;AACpD;AACA;AACA;AACA;AACA;AACA,gEAAgE,8BAA8B;AAC9F,QAAQ,oCAAoC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,8CAA8C;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,gDAAgD;AAClE,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,eAAe;AAC3E,IAAI,eAAe,kBAAkB,eAAe;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wEAAwE;AAC9E,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qCAAqC,eAAe,2BAA2B;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,eAAe;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,iBAAiB;AAC9E;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,sDAAsD;AAC5D,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB;AAChF;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA,0CAA0C,yBAAyB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wCAAwC,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,oCAAoC;AAClG,mDAAmD,kDAAkD;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iDAAiD;AACnG,kDAAkD,iDAAiD;AACnG,kDAAkD,iDAAiD;AACnG,qDAAqD,oDAAoD;AACzG,uDAAuD,sDAAsD;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,mFAAmF;AACnF,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,sBAAsB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,0BAA0B;AAC3D;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,OAAO,uBAAuB;AAC9D;AACA,IAAI,eAAe,uBAAuB,uBAAuB,GAAG,eAAe;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,uCAAuC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,0BAA0B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,YAAY,EAAE;AACpE,8CAA8C,+CAA+C,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,kBAAkB,EAAE;AACtD;AACA;AACA,oCAAoC,6CAA6C,EAAE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iCAAiC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,YAAY,qEAAqE;AACjF;AACA;AACA;AACA;AACA;AACA,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc,qEAAqE;AACnF;AACA;AACA;AACA;AACA;AACA,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc,qEAAqE;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,eAAe;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,yCAAyC;AACrD,QAAQ,qEAAqE;AAC7E;AACA;AACA;AACA;AACA,6DAA6D,eAAe;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD,UAAU,qEAAqE;AAC/E;AACA;AACA;AACA;AACA,6DAA6D,eAAe;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,yCAAyC;AACvD,UAAU,qEAAqE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,yBAAyB;AACjG;AACA;AACA;AACA,2BAA2B,uCAAuC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,8CAA8C,EAAE;AAC9H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,wCAAwC,EAAE;AACxG;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,0DAA0D,yBAAyB;AACnF;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,0DAA0D,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,2BAA2B,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,8BAA8B,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,oCAAoC;AAC3E,+BAA+B,yBAAyB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qDAAqD,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,wCAAwC,EAAE;AACtG;AACA;AACA,oDAAoD,wCAAwC,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0CAA0C;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,qCAAqC;AACxE;AACA;AACA,mCAAmC,qIAAuF;AAC1H;AACA;AACA;AACA;AACA,uCAAuC,mJAAqG;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,iBAAiB;AAC5C,2BAA2B,eAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,kEAAkE,EAAE;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,YAAY,EAAE,sBAAsB,iBAAiB,EAAE;AAChH;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wDAAwD;AACxD,SAAS,4BAA4B,yCAAyC,GAAG,iBAAiB,IAAI;AACtG,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,4DAA4D;AAChE;AACA;AACA,kFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0CAA0C,WAAW;AACrD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA,gBAAgB,yBAAyB;AACzC;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,SAAS;AACT;AACA;AACA,2CAA2C,WAAW;AACtD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,uBAAuB;AAC/E;AACA;AACA,gFAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,sBAAsB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,cAAc;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,kBAAkB;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,oFAAoF,aAAa;AACjG;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,aAAa;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA,oDAAoD,yCAAyC;AAC7F;AACA;AACA,sCAAsC,aAAa;AACnD,sCAAsC,aAAa;AACnD;AACA;AACA,wCAAwC,oCAAoC,EAAE;AAC9E,aAAa,qBAAqB,6BAA6B;AAC/D;AACA,2DAA2D,yBAAyB,mCAAmC,EAAE,EAAE,EAAE;AAC7H,oCAAoC,4BAA4B;AAChE;AACA;AACA,2DAA2D,yBAAyB,mCAAmC,EAAE,EAAE,EAAE;AAC7H,iCAAiC,4BAA4B;AAC7D;AACA;AACA;AACA,6DAA6D,yBAAyB,+BAA+B,EAAE,EAAE,EAAE;AAC3H,kCAAkC,wBAAwB;AAC1D;AACA;AACA,qDAAqD,yBAAyB,mBAAmB,EAAE,EAAE,EAAE,mBAAmB,YAAY;AACtI;AACA;AACA;AACA,kDAAkD,yBAAyB,mBAAmB,EAAE,EAAE,EAAE,gBAAgB,YAAY;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yBAAyB;AACvE,qCAAqC,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,KAAK;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,UAAU;AAChC,oDAAoD,OAAO;AAC3D;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,8BAA8B,EAAE;AACnE,UAAU;AACV,QAAQ;AACR;AACA;AACA;AACA;AACA,wCAAwC,cAAc;AACtD;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,mDAAmD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yBAAyB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,yBAAyB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yBAAyB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,gCAAgC,yBAAyB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,iCAAiC,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,wBAAwB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,iCAAiC,EAAE;AACnF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,aAAa;AAC3D,qDAAqD,aAAa;AAClE,4DAA4D,aAAa;AACzE,kDAAkD,aAAa;AAC/D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,+DAA+D,EAAE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,mCAAmC,EAAE;AAC/G;AACA,aAAa;AACb;AACA,8BAA8B,uDAAuD;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8CAA8C;AAC9C,SAAS,gBAAgB;AACzB,MAAM;AACN;AACA,CAAC;AACD;AACA,yBAAyB,kBAAkB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,kCAAkC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAA6C;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8CAA8C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wBAAwB;AACjE;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;AACD;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA,wCAAwC,qBAAqB;AAC7D;AACA;AACA;AACA,+EAA+E,kCAAkC;AACjH;AACA;AACA,iFAAiF,kCAAkC;AACnH,gDAAgD,2CAA2C;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sBAAsB,iCAAiC,qBAAqB;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,eAAe,kBAAkB;AACjC,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oCAAoC;AAC9D;AACA;AACA;AACA,kDAAkD,oFAAoF;AACtI;AACA;AACA;AACA;AACA;AACA,6CAA6C,0CAA0C,EAAE;AACzF;AACA,iDAAiD,yBAAyB,qCAAqC,EAAE,EAAE;AACnH,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,sBAAsB;AAC/D;AACA,uCAAuC;AACvC;AACA;AACA,4CAA4C,6DAA6D,EAAE;AAC3G;AACA;AACA;AACA;AACA,iEAAiE,4BAA4B,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,uCAAuC;AAChE;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA,qBAAqB,uBAAuB,EAAE;AAC9C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB,EAAE;AACpF,4DAA4D,mBAAmB,EAAE;AACjF;AACA;AACA;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA,SAAS;AACT;AACA;AACA,8CAA8C;AAC9C,SAAS,kBAAkB;AAC3B,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,oCAAoC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,oCAAoC,EAAE;AAC5F;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,8CAA8C,oCAAoC,EAAE;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oBAAoB,8BAA8B,cAAc,EAAE,EAAE,EAAE,EAAE;AACvH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA,+DAA+D,sBAAsB,EAAE;AACvF;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,iCAAiC,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,6BAA6B,EAAE;AAChF;AACA,qDAAqD,8BAA8B,EAAE;AACrF;AACA;AACA;AACA;AACA,sDAAsD,+CAA+C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,+BAA+B,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,uBAAuB,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2BAA2B,EAAE;AAClD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iDAAiD;AACjD,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,kCAAkC;AAC3C,SAAS,+BAA+B;AACxC,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,qDAAqD;AACnF,IAAI,uDAAuD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB,GAAG,sBAAsB,OAAO;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,2BAA2B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,8BAA8B;AAC7E,4DAA4D,6CAA6C;AACzG,gDAAgD,iCAAiC;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,yBAAyB;AAChF;AACA;AACA;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,2BAA2B,EAAE;AAClE,mCAAmC,gDAAgD,EAAE;AACrF,mCAAmC,iDAAiD,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,gDAAgD,EAAE;AACvF,sCAAsC,mDAAmD,EAAE;AAC3F;AACA;AACA,SAAS;AACT;AACA;AACA,yDAAyD;AACzD,SAAS,kBAAkB;AAC3B,SAAS,mDAAmD,iBAAiB,IAAI;AACjF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,YAAY;AACtE;AACA,2DAA2D;AAC3D,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,MAAM,uBAAuB;AACjD,IAAI,oCAAoC,MAAM,0BAA0B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,gBAAgB;AACzF,mEAAmE,gBAAgB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,uCAAuC,MAAM;AAC7C;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA,UAAU,kBAAkB;AAC5B;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA,WAAW,MAAM;AACjB;AACA;AACA,uEAAuE,kBAAkB;AACzF;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oCAAoC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,qCAAqC,EAAE;AACjE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,mCAAmC,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,0BAA0B,sCAAsC,EAAE;AAClE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,0CAA0C,EAAE;AACtE;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,qCAAqC,EAAE;AAClG,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uCAAuC,yBAAyB,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,WAAW;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,gCAAgC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,8DAA8D;AACpF;AACA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yBAAyB;AAC1C;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,gBAAgB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,gCAAgC;AACtG;AACA;AACA;AACA;AACA,CAAC;AACD,8CAA8C,aAAa;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,4BAA4B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB;AACvD;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB;AAC/E;AACA;AACA,8CAA8C,iBAAiB;AAC/D;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA,oCAAoC,4BAA4B;AAChE;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B;AAC5D;AACA,sCAAsC,4BAA4B;AAClE;AACA;AACA;AACA;AACA,gCAAgC,4BAA4B;AAC5D;AACA,sCAAsC,4BAA4B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,iBAAiB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,gBAAgB;AACtE;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA;AACA,KAAK;AACL,iDAAiD,kBAAkB;AACnE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,8CAA8C;AACpH,iEAAiE,oCAAoC;AACrG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,oCAAoC,iBAAiB;AACrD;AACA;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB;AACzD;AACA;AACA;AACA;AACA;AACA,0CAA0C,iBAAiB;AAC3D;AACA;AACA;AACA;AACA;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,iBAAiB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,iBAAiB;AACjE;AACA;AACA;AACA;AACA,4CAA4C,iBAAiB;AAC7D;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,sBAAsB,EAAE;AAC3E;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD,kBAAkB,sBAAsB;AACxC,QAAQ,sBAAsB;AAC9B;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,oBAAoB,sBAAsB;AAC1C,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,oBAAoB,sBAAsB;AAC1C,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,wDAAwD,6BAA6B,EAAE;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kEAAkE;AAChG,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B;AACtD,kBAAkB,sBAAsB;AACxC,QAAQ,sBAAsB;AAC9B;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,oBAAoB,sBAAsB;AAC1C,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,4BAA4B,4BAA4B;AACxD,oBAAoB,sBAAsB;AAC1C,UAAU,sBAAsB;AAChC;AACA;AACA;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,wDAAwD,uBAAuB,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4CAA4C;AACjD,KAAK,yCAAyC;AAC9C,KAAK,yCAAyC;AAC9C,KAAK,6BAA6B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,kDAAkD;AAC9D;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA,kBAAkB,uCAAuC;AACzD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA,kBAAkB,+CAA+C;AACjE,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,mBAAmB;AACjF;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA,WAAW,sBAAsB;AACjC,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA,kBAAkB,+CAA+C;AACjE,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,oDAAoD;AAChE;AACA;AACA;AACA,WAAW,6BAA6B;AACxC,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gEAAgE;;AAEjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,yBAAyB,gEAAgE;AACzF,yBAAyB,gEAAgE;AACzF;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,iBAAiB;AACjB;AACA;AACA,oDAAoD;AACpD,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA,gBAAgB;AAChB;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA,qIAAqI;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,oCAAoC,EAAE;AAC1F;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAAgE,UAAU;AAC1E;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA,iHAAmE,gBAAgB;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,sCAAsC;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,+EAA+E;AAC/E,KAAK;AACL,4DAA4D,uCAAuC,EAAE,EAAE;AACvG,4BAA4B;AAC5B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,0CAA0C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,wCAAwC;AAC1F;AACA,gBAAgB;AAChB;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa,EAAE;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iBAAiB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qDAAqD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6CAA6C;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iDAAiD;AACjF;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,iCAAiC,iDAAiD;AAClF;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA,0BAA0B,oCAAoC,EAAE;AAChE;AACA;AACA,KAAK;AACL,mDAAmD,yBAAyB;AAC5E,6DAA6D,mCAAmC;AAChG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iDAAiD,EAAE;AAC7E;AACA;AACA,KAAK;AACL;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,mCAAmC,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oCAAoC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,uDAAuD,EAAE;AACnF;AACA;AACA,KAAK;AACL,mDAAmD,qCAAqC;AACxF,6CAA6C,uCAAuC;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,yCAAyC;AAC9F,+CAA+C,sCAAsC;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA,iFAAiF,+DAA+D;AAChJ;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,oBAAoB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,6CAA6C;AACrH,qDAAqD,6DAA6D;AAClH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF,qCAAqC,+BAA+B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,wDAAwD;AACjG;AACA;AACA,0BAA0B,mCAAmC,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,0BAA0B,2CAA2C,EAAE;AACvE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,mBAAmB,EAAE;AACjF;AACA,4DAA4D,uCAAuC;AACnG;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,gGAAgG;AAC7H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,4CAA4C;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qDAAqD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,6CAA6C;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,yCAAyC;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+CAA+C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,6DAA6D;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,UAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,0BAA0B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,2BAA2B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,eAAe,wBAAwB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,iCAAiC,6BAA6B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,EAAE;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2CAA2C,EAAE;AACrG;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2CAA2C,EAAE;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,aAAa,EAAE;AAClD,mBAAmB,mDAAmD;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,6BAA6B;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,aAAa,EAAE;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,gBAAgB;AAChB;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6BAA6B;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kDAAkD,EAAE;AAC9E;AACA;AACA,KAAK;AACL;AACA,0BAA0B,oCAAoC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kCAAkC,EAAE;AAC9D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sDAAsD,mDAAmD;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,sDAAsD,mDAAmD;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,yBAAyB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,uCAAuC;AAClG,4DAA4D,wCAAwC;AACpG,gEAAgE,4CAA4C;AAC5G;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4FAA4F;AACrH;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA,4CAA4C,2BAA2B,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;AACnD;AACA;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,oBAAoB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iBAAiB;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,iDAAiD;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,0BAA0B;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA;AACA,2BAA2B,8BAA8B;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,kBAAkB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD,iEAAiE,yBAAyB;AAC1F;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,kBAAkB,EAAE;AAC1E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,4CAA4C;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,eAAe;AACtD;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,4CAA4C;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,4CAA4C;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,eAAe;AACxD;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA;AACA;AACA;AACA,QAAQ,oDAAoD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,GAAG;AAC7D;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oDAAoD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,GAAG;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,oDAAoD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,GAAG;AAC/D;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sCAAsC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,mBAAmB;AACjD,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAsC;AACvD;AACA;AACA;AACA,kDAAkD,sCAAsC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,sCAAsC;AAClD;AACA;AACA;AACA;AACA,oDAAoD,sCAAsC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA;AACA;AACA;AACA,oDAAoD,sCAAsC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sCAAsC;AACpD;AACA,iBAAiB,6BAA6B;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,aAAa,EAAE;AACrE;AACA;AACA,mCAAmC,iDAAiD;AACpF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,oCAAoC;AACjE;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,yCAAyC,EAAE;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B;AACjE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,sCAAsC;AAC7F;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,wCAAwC;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,yBAAyB,wFAAwF,EAAE;AACnH;AACA;AACA;AACA;AACA,8CAA8C,gBAAgB,EAAE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC,oCAAoC,aAAa;AACjD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,mCAAmC;AACzF;AACA;AACA;AACA;AACA;AACA,yDAAyD,mCAAmC;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D,8BAA8B,8BAA8B;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,8BAA8B;AACtE;AACA;AACA;AACA,gDAAgD,8BAA8B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,8BAA8B;AAC9E,6DAA6D,4CAA4C;AACzG,iDAAiD,gCAAgC;AACjF;AACA;AACA;AACA;AACA,wDAAwD,yBAAyB;AACjF,iDAAiD,mBAAmB;AACpE;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,mCAAmC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,iCAAiC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,yCAAyC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oCAAoC;AAC7F;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzviBA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAEkD;AAC0L;AACnN;AACX;AACI;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iDAAiD,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iDAAiD,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mDAAmD,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mDAAmD,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAoD,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mDAAmD,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kDAAkD,EAAE;AACzE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oDAAoD,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iDAAiD,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mDAAmD,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kDAAkD,EAAE;AAC9E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qDAAqD,EAAE;AAC5E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,aAAa,EAAE;AACpC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,aAAa,EAAE;AACpC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,aAAa,EAAE;AACpC;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,2EAA2E;AAC7F,IAAI;AACJ;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,MAAM,OAAO,KAAK,4BAA4B,EAAE,gCAAgC,EAAE,+BAA+B,KAAK,yCAAyC,KAAK;AAC9L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,mDAAmD,SAAS,sCAAsC,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,mDAAmD,SAAS,sCAAsC,EAAE;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,mBAAmB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,0DAA0D;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,iBAAiB,eAAe,sDAAsD,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,eAAe,sDAAsD,EAAE;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,iBAAiB,aAAa,oDAAoD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,mBAAmB,EAAE;AAC7D;AACA;AACA,wCAAwC,mBAAmB,EAAE;AAC7D;AACA;AACA;AACA,yFAA2C;AAC3C,KAAK,IAAI;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,qCAAqC,EAAE;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA,6EAA6E,oBAAoB;AACjG,8EAA8E,qBAAqB;AACnG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,yEAAyE;AACpG;AACA,iBAAiB;AACjB;AACA;AACA,+DAA+D;AAC/D,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,6BAA6B,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,oBAAoB;AACzF,sEAAsE,qBAAqB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA,uDAAuD;AACvD,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,SAAS,gCAAgC,+DAAiB,GAAG,+FAAiD,IAAI;AAClH,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,8BAA8B;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,4BAA4B,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,4CAA4C;AACtF;AACA,qEAAqE,qBAAqB;AAC1F;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA,sDAAsD;AACtD,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,wBAAwB,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,kCAAkC,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,QAAQ;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uDAAuD,WAAW;AAClE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,6BAA6B;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,wBAAwB;AAChG,2EAA2E,qBAAqB;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,oDAAoD;AAC/E;AACA,iBAAiB;AACjB;AACA;AACA,4DAA4D;AAC5D,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,gEAAkB;AAC3B,MAAM;AACN;AACA,kBAAkB,4DAAc;AAChC,6BAA6B,4DAAc;AAC3C,mBAAmB,4DAAc;AACjC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,2BAA2B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA,0CAA0C,4CAA4C;AACtF;AACA,oEAAoE,qBAAqB;AACzF;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB;AACA;AACA,qDAAqD;AACrD,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8KAA8K,4CAA4C,EAAE;AAC5N,sOAAsO,gCAAgC,+BAA+B,QAAQ,EAAE;AAC/S,oJAAoJ,yLAAyL,oCAAoC,qCAAqC,EAAE;AACxZ;AACA,iLAAiL,iBAAiB;AAClM;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iZAAiZ,kCAAkC,+BAA+B,4FAA4F,EAAE;AAChjB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,mCAAmC,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,qBAAqB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA;AACA;AACA,qIAAuF,UAAU;AACjG;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,uEAAuE;AAClG;AACA,iBAAiB;AACjB;AACA;AACA,6DAA6D;AAC7D,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,yBAAyB,4DAAc;AACvC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,qBAAqB;AACxD;AACA;AACA,iDAAiD;AACjD,SAAS,kEAAoB;AAC7B,SAAS,iEAAmB;AAC5B,SAAS,iDAAiD,+DAAiB,GAAG,2DAAa,IAAI;AAC/F,MAAM;AACN;AACA,qBAAqB,gFAAkC;AACvD,mBAAmB,8EAAgC;AACnD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,2CAA2C,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,8BAA8B,EAAE;AAChF,2DAA2D,oDAAoD;AAC/G;AACA;AACA,2DAA2D,yBAAyB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oFAAoF,qBAAqB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qIAAuF,UAAU;AACjG;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,iEAAiE;AAC5F;AACA,iBAAiB;AACjB;AACA;AACA,qEAAqE;AACrE,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,yBAAyB,4DAAc;AACvC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,qBAAqB;AACxD;AACA;AACA,yDAAyD;AACzD,SAAS,kEAAoB;AAC7B,SAAS,iEAAmB;AAC5B,SAAS,yDAAyD,+DAAiB,GAAG,2DAAa,IAAI;AACvG,MAAM;AACN;AACA,qBAAqB,gFAAkC;AACvD,mBAAmB,8EAAgC;AACnD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,gDAAgD,EAAE;AAClH;AACA;AACA;AACA;AACA,6DAA6D,yCAAyC,EAAE;AACxG,KAAK;AACL;AACA;AACA,6DAA6D,yCAAyC,EAAE;AACxG,KAAK;AACL;AACA;AACA,oDAAoD,6BAA6B,EAAE;AACnF,qDAAqD,6BAA6B,EAAE;AACpF;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,6CAA6C,+BAA+B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,wCAAwC,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8CAA8C,EAAE;AACrE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6CAA6C,EAAE;AACpE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yDAAyD,EAAE;AAChF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,4CAA4C,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB;AACjB;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8DAA8D,EAAE;AAC1F;AACA;AACA,KAAK;AACL;AACA,0BAA0B,4DAA4D,EAAE;AACxF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,6DAA6D,EAAE;AACzF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,0DAA0D,EAAE;AACtF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,0DAA0D,EAAE;AACtF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,4DAA4D,EAAE;AACxF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,4DAA4D,EAAE;AACxF;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,mFAAmF;AACtH;AACA;AACA,kDAAkD;AAClD,SAAS,gCAAgC,2DAAa,IAAI;AAC1D,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,uDAAuD;AACvD,SAAS,uCAAuC,2DAAa,IAAI;AACjE,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB,EAAE;AAC5C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8BAA8B,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,gCAAgC,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B,EAAE;AACtD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC,EAAE;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iCAAiC,EAAE;AACxD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,uBAAuB,EAAE;AAC9C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB,EAAE;AAC7C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA,+CAA+C,0BAA0B,iBAAiB,EAAE,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA,+CAA+C,yBAAyB,iBAAiB,EAAE,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA,+CAA+C,0EAA4B,SAAS,iBAAiB,GAAG,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,uBAAuB,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA,+CAA+C,yEAA2B,SAAS,iBAAiB,GAAG,EAAE;AACzG,qCAAqC,4CAA4C;AACjF;AACA,4DAA4D,wBAAwB,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,uBAAuB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,SAAS,mBAAmB;AAC1D,4CAA4C,uCAAuC,EAAE;AACrF,qCAAqC,4CAA4C;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,iCAAiC,uBAAuB,EAAE,EAAE;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,uCAAuC,kBAAkB;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA,8CAA8C;AAC9C;AACA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,yCAAyC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,kCAAkC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA,qDAAqD,sBAAsB,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA,qDAAqD,wBAAwB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,+BAA+B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA,iCAAiC,6BAA6B;AAC9D,2BAA2B;AAC3B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,mBAAmB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD;AACA;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,wDAAwD,uEAAuE,EAAE;AACjI;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,oCAAoC;AACtF,oCAAoC,sCAAsC;AAC1E;AACA;AACA;AACA;AACA;AACA,oDAAoD,oCAAoC;AACxF,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA;AACA;AACA,oDAAoD,oCAAoC;AACxF,sCAAsC,sCAAsC;AAC5E;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA,uCAAuC;AACvC,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA,6BAA6B,+BAA+B;AAC5D;AACA,yCAAyC;AACzC,0CAA0C;AAC1C;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,cAAc;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,+CAA+C;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,mCAAmC;AAClF,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,2BAA2B,OAAO,qBAAqB;AACvD,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,oEAAoE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,GAAG,iBAAiB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,sCAAsC;AACrD;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAsC;AACvD;AACA;AACA;AACA;AACA;AACA,iBAAiB,sCAAsC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,EAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,EAAE;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gCAAgC,OAAO;AACvC;AACA,uBAAuB,6BAA6B;AACpD,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,kCAAkC,OAAO;AACzC;AACA,yBAAyB,6BAA6B;AACtD,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,kCAAkC,OAAO;AACzC;AACA,yBAAyB,6BAA6B;AACtD,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,wDAAwD,+CAA+C;AACvG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,gCAAgC,OAAO;AACvC;AACA,yBAAyB,eAAe;AACxC,gCAAgC,OAAO;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,kCAAkC,OAAO;AACzC;AACA,2BAA2B,eAAe;AAC1C,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,kCAAkC,OAAO;AACzC;AACA,2BAA2B,eAAe;AAC1C,kCAAkC,OAAO;AACzC;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,8DAA8D,+CAA+C;AAC7G;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iCAAiC;AACzD;AACA,oCAAoC,MAAM;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8BAA8B;AAC/C;AACA,QAAQ;AACR;AACA,oCAAoC,MAAM;AAC1C,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD;AACA,UAAU;AACV;AACA,sCAAsC,MAAM;AAC5C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC;AAC3D;AACA,sCAAsC,MAAM;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,8BAA8B;AACjD;AACA,UAAU;AACV;AACA,sCAAsC,MAAM;AAC5C,oDAAoD;AACpD;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,iCAAiC,cAAc;AAC/C;AACA,wCAAwC,+CAA+C;AACvF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,iCAAiC,EAAE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,8BAA8B,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAA+E,UAAU;AACzF;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,2DAA2D;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,iBAAiB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,EAAE;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B,EAAE;AACpD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA,gDAAgD,+CAA+C;AAC/F,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA,sDAAsD,+CAA+C;AACrG;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,8BAA8B;AACxC;AACA;AACA;AACA,mCAAmC;AACnC,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,qCAAqC;AACrC,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,8BAA8B;AAC1C;AACA;AACA;AACA,qCAAqC;AACrC,6CAA6C;AAC7C;AACA;AACA;AACA,+BAA+B,YAAY;AAC3C,iCAAiC,cAAc;AAC/C;AACA,yCAAyC,+CAA+C;AACxF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,yCAAyC,iBAAiB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,oBAAoB,EAAE;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0CAA0C,EAAE;AACjG,yCAAyC,sBAAsB,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA,sDAAsD,8CAA8C,EAAE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,wCAAwC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,gHAAkE,UAAU;AAC5E;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,eAAe,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,oDAAoD,2BAA2B;AAC/E;AACA,0BAA0B,aAAa,EAAE;AACzC;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kBAAkB,EAAE;AAC9C;AACA;AACA,KAAK;AACL;AACA,0BAA0B,WAAW,EAAE;AACvC;AACA;AACA,KAAK;AACL;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,mBAAmB;AACnE;AACA,SAAS;AACT;AACA,kDAAkD,gCAAgC;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA,0CAA0C,mBAAmB;AAC7D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,oDAAoD,gCAAgC;AACpF;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,kDAAkD,8BAA8B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B,yDAAyD;AACpF;AACA;AACA,iBAAiB;AACjB;AACA;AACA,yCAAyC;AACzC,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,MAAM;AACN;AACA,qBAAqB,sFAAwC;AAC7D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6UAA6U,iBAAiB;AAC9V;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,qBAAqB,EAAE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,wFAAwF;AAC3H;AACA;AACA,+CAA+C;AAC/C,SAAS,uCAAuC,2DAAa,GAAG,+DAAiB,IAAI;AACrF,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,MAAM;AACN;AACA,kBAAkB,qFAAuC;AACzD;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,gBAAgB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA,UAAU,eAAe;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,8DAA8D;AAC/G;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,yDAAyD,EAAE;AACrF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,gCAAgC,+BAA+B,EAAE,EAAE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0CAA0C;AAC1C,SAAS,uCAAuC,+DAAiB,GAAG,2DAAa,IAAI;AACrF,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,yFAA2C,IAAI;AACxH,MAAM;AACN;AACA,kBAAkB,4DAAc;AAChC,wBAAwB,iFAAmC;AAC3D,mBAAmB,gFAAkC;AACrD,qBAAqB,uFAAyC;AAC9D,oBAAoB,uFAAyC;AAC7D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,6BAA6B,EAAE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,wCAAwC;AAC3F,IAAI,4CAA4C;AAChD;AACA;AACA,qBAAqB,gDAAgD;AACrE,IAAI,kDAAkD;AACtD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC,EAAE;AAC5E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,mBAAmB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,WAAW,EAAE;AACvC;AACA;AACA,KAAK;AACL;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kBAAkB,EAAE;AAC9C;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,mFAAmF;AACtH;AACA;AACA,uDAAuD;AACvD,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,yFAA2C,IAAI;AACxH,SAAS,gCAAgC,+DAAiB,GAAG,0GAA4D,IAAI;AAC7H,MAAM;AACN;AACA,kBAAkB,oFAAsC;AACxD,wBAAwB,iFAAmC;AAC3D,mBAAmB,gFAAkC;AACrD,oBAAoB,uFAAyC;AAC7D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,2BAA2B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wCAAwC,KAAK;AACjD;AACA;AACA;AACA,yBAAyB,gDAAgD;AACzE,kBAAkB,kDAAkD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa,EAAE;AACzC;AACA;AACA,KAAK;AACL;AACA,0BAA0B,kBAAkB,EAAE;AAC9C;AACA;AACA,KAAK;AACL;AACA,0BAA0B,WAAW,EAAE;AACvC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA,8DAA8D,gCAAgC;AAC9F,iEAAiE,iCAAiC;AAClG;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA,mEAAmE;AACnE,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA,mEAAmE;AACnE,gEAAgE,gCAAgC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,kBAAkB;AAC1E;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,uCAAuC,mBAAmB;AAC1D;AACA;AACA;AACA,2DAA2D,gCAAgC,EAAE;AAC7F;AACA,mEAAmE,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B,yDAAyD;AACpF;AACA,iBAAiB;AACjB;AACA;AACA,qDAAqD;AACrD,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,MAAM;AACN;AACA,kBAAkB,kFAAoC;AACtD,sBAAsB,6DAAe;AACrC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,sBAAsB,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,wCAAwC,KAAK,4CAA4C;AAC7F;AACA;AACA,qBAAqB,gDAAgD;AACrE,IAAI,kDAAkD;AACtD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,kEAAkE;AACrG;AACA;AACA,gDAAgD;AAChD,SAAS,uCAAuC,+DAAiB,GAAG,2DAAa,GAAG,+DAAiB,IAAI;AACzG,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,MAAM;AACN;AACA,kBAAkB,sFAAwC;AAC1D;AACA;AACA,CAAC;AACD;AACA;AACA,+FAAyC,sBAAsB,EAAE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,8BAA8B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,wCAAwC;AAC1D,IAAI,4CAA4C;AAChD;AACA;AACA,mCAAmC,gDAAgD;AACnF,+BAA+B,kDAAkD;AACjF;AACA;AACA;AACA,QAAQ,0BAA0B;AAClC,wDAAwD;AACxD;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,8CAA8C,EAAE;AAC1E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,0BAA0B,6CAA6C,EAAE;AACzE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,4CAA4C,EAAE;AACxE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,kEAAkE;AACrG;AACA;AACA,gDAAgD;AAChD,SAAS,uCAAuC,+DAAiB,GAAG,2DAAa,GAAG,+DAAiB,IAAI;AACzG,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,MAAM;AACN;AACA,kBAAkB,sFAAwC;AAC1D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,wBAAwB,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,8BAA8B;AAC9D,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wCAAwC,KAAK,4CAA4C;AAC9F;AACA;AACA,qBAAqB,gDAAgD;AACrE,IAAI,kDAAkD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,sCAAsC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sCAAsC,EAAE;AAC5E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA,0BAA0B,yDAAyD,EAAE;AACrF;AACA;AACA,KAAK;AACL;AACA,0BAA0B,+CAA+C,EAAE;AAC3E;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,iEAAiE;AACpG;AACA;AACA,kDAAkD;AAClD,SAAS,uCAAuC,+DAAiB,GAAG,2DAAa,GAAG,+DAAiB,IAAI;AACzG,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,qFAAuC,IAAI;AACpH,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,2FAA6C,IAAI;AAC1H,SAAS,4BAA4B,+DAAiB,GAAG,2DAAa,GAAG,yFAA2C,IAAI;AACxH,SAAS,gCAAgC,+DAAiB,GAAG,0GAA4D,IAAI;AAC7H,MAAM;AACN;AACA,kBAAkB,wFAA0C;AAC5D,wBAAwB,iFAAmC;AAC3D,mBAAmB,gFAAkC;AACrD,oBAAoB,uFAAyC;AAC7D;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+FAAyC,0BAA0B,EAAE;AACrE;AACA;AACA;AACA;AACA,+FAAyC,kCAAkC,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,uBAAuB,EAAE;AACnD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2EAA2E,qBAAqB;AAChG;AACA,SAAS;AACT;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA,oDAAoD,WAAW;AAC/D;AACA,sBAAsB,4DAAc;AACpC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA,4DAA4D,WAAW;AACvE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,+FAAyC,uBAAuB,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,wEAAwE,qBAAqB;AAC7F;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iDAAiD,WAAW;AAC5D;AACA,mBAAmB,4DAAc;AACjC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,+FAAyC,2BAA2B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,qBAAqB;AACjG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA,qDAAqD,WAAW;AAChE;AACA,uBAAuB,4DAAc;AACrC;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,+FAAyC,2BAA2B,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,qBAAqB;AACjG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA,qDAAqD,WAAW;AAChE;AACA,uBAAuB,4DAAc;AACrC;AACA;AACA,CAAC;AACD;AACA;AACA,+FAAyC,yBAAyB,EAAE;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2BAA2B;AACnF,0EAA0E,qBAAqB;AAC/F,+DAA+D,oDAAoD;AACnH;AACA,SAAS;AACT;AACA;AACA,2BAA2B;AAC3B,iBAAiB;AACjB;AACA;AACA,mDAAmD,WAAW;AAC9D;AACA,qBAAqB,4DAAc;AACnC;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gCAAgC,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,8CAA8C,WAAW;AACzD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,2BAA2B,mBAAmB;AAC9C,iBAAiB;AACjB;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,4DAA4D,WAAW;AACvE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,8CAA8C,WAAW;AACzD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7nMA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAEwC;AACF;AACjB;AACH;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,+BAA+B;AAC7E;AACA,SAAS;AACT;AACA;AACA,6CAA6C,WAAW;AACxD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,sCAAsC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,gCAAgC;AACjC;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,oCAAoC;AACrC;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA;AACA;AACA,iEAAiE,cAAc;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kCAAkC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,kDAAkD;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,wDAAwD;AACxD;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,kCAAkC,EAAE;AACrF,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,6CAA6C,kCAAkC,EAAE;AACjF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,uEAAuE,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,mDAAmD;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,2CAA2C;AAC5D;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA,yCAAyC,sGAAwD,EAAE;AACnG;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yEAAyE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe;AACnB;AACA;AACA;AACA;AACA;AACA,IAAI,0BAA0B;AAC9B;AACA,6CAA6C,yBAAyB;AACtE,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA,WAAW,0BAA0B;AACrC;AACA;AACA,aAAa,cAAc;AAC3B,IAAI;AACJ;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,0BAA0B;AACzC;AACA;AACA,gBAAgB;AAChB,QAAQ;AACR;AACA;AACA,QAAQ;AACR,gDAAgD;AAChD,8CAA8C,YAAY;AAC1D,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA,kBAAkB;AAClB,UAAU;AACV;AACA;AACA,UAAU;AACV,kDAAkD;AAClD,gDAAgD,YAAY;AAC5D,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA,kBAAkB;AAClB,UAAU;AACV;AACA;AACA,UAAU;AACV,kDAAkD;AAClD,gDAAgD,YAAY;AAC5D,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACD;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;AACA,sBAAsB,cAAc;AACpC;AACA,kDAAkD,sBAAsB;AACxE,wBAAwB,eAAe;AACvC,YAAY,WAAW,YAAY,yBAAyB;AAC5D;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,oEAAoE;AAC/E;AACA,WAAW,IAAI;AACf;AACA;AACA,oCAAoC,kBAAkB;AACtD;AACA;AACA,oCAAoC,8CAA8C;AAClF;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA,2BAA2B,qBAAqB;AAChD,IAAI;AACJ,8EAA8E;AAC9E,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,oFAAoF;AACtH;AACA;AACA,SAAS;AACT;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wCAAwC;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,YAAY;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,4BAA4B;AACjF,uDAAuD,4BAA4B;AACnF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mBAAmB;AAC3E;AACA;AACA;AACA;AACA;AACA,qEAAqE;AACrE;AACA;AACA;AACA;AACA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD,sCAAsC,mCAAmC;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,kCAAkC;AACxF;AACA;AACA;AACA;AACA,yDAAyD,wCAAwC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,yDAAyD,8BAA8B;AACvF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,cAAc,MAAM;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,yBAAyB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mCAAmC;AAC3F,4DAA4D,4CAA4C;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,mCAAmC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,kEAAkE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,sCAAsC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,gDAAgD;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,MAAM,wBAAwB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+CAA+C;AAC/C,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,iFAAiF;AAC5I;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,wDAAwD,EAAE;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,4BAA4B;AACjE,qCAAqC,8BAA8B;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,wDAAwD;AACnE;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ,4CAA4C;AACpD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,6CAA6C;AAC7C,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,cAAc;AAClB;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA,WAAW,uCAAuC;AAClD;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,yDAAyD;AACzD,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,oBAAoB,EAAE;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB,EAAE;AACnD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR,6DAA6D;AAC7D,gDAAgD;AAChD,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV,+DAA+D;AAC/D,kDAAkD;AAClD,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,UAAU;AACV,+DAA+D;AAC/D,kDAAkD;AAClD,0CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA,+CAA+C,8CAA8C,EAAE;AAC/F;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA,eAAe;AACf,sBAAsB,cAAc;AACpC;AACA,kDAAkD,qBAAqB;AACvE,wBAAwB,eAAe;AACvC,YAAY,WAAW,qBAAqB,uBAAuB;AACnE;AACA;AACA,WAAW,mCAAmC;AAC9C;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,gEAAgE;AAChE;AACA;AACA;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,yDAAyD;AACzD,4CAA4C;AAC5C,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,oDAAoD;AACtF;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD,WAAW;AAChE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,WAAW;AACvF,IAAI,YAAY;AAChB,qFAAqF,WAAW;AAChG;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,6CAA6C;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,8CAA8C,qDAAqD,EAAE;AACrG;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,gDAAgD,2BAA2B;AAC3E;AACA;AACA;AACA;AACA;AACA,+DAA+D,eAAe;AAC9E;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,IAAI;AACf;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAiB;AACrB,QAAQ,iBAAiB;AACzB;AACA;AACA;AACA;AACA,WAAW,yBAAyB;AACpC,WAAW,YAAY;AACvB;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc,wDAAwD;AAChF;AACA,WAAW,yBAAyB;AACpC;AACA;AACA;AACA,YAAY,cAAc,wDAAwD;AAClF;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA,YAAY,cAAc,wDAAwD;AAClF;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG,aAAa;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG,aAAa;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAAoG,aAAa;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,uCAAuC;AACvC,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,cAAc,wDAAwD;AAChF;AACA,WAAW,yBAAyB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc,wDAAwD;AAClF;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc,wDAAwD;AAClF;AACA,aAAa,yBAAyB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wCAAwC;AACxC,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yBAAyB,6EAA6E;AACtG;AACA,yBAAyB,wDAAwD;AACjF,yBAAyB,0DAA0D;AACnF;AACA,yBAAyB,sEAAsE;AAC/F;AACA,iBAAiB;AACjB;AACA;AACA,6CAA6C,WAAW;AACxD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yBAAyB,iFAAiF;AAC1G;AACA,yBAAyB,wDAAwD;AACjF,yBAAyB,0DAA0D;AACnF;AACA;AACA,iBAAiB;AACjB;AACA;AACA,8CAA8C,WAAW;AACzD;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrxEA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAE+b;AACuX;AACxxB;AACC;AACgB;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,qCAAqC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,iDAAiD;AACtG;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uLAAuF,iBAAiB;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA,oEAAoE,4CAA4C;AAChH,2DAA2D,0CAA0C;AACrG;AACA;AACA;AACA,qDAAqD,6BAA6B;AAClF,4DAA4D,oCAAoC;AAChG;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK,4GAA0D;AAC/D,KAAK,2GAAyD;AAC9D,KAAK,0FAAwC;AAC7C,KAAK,gKAA4D;AACjE,KAAK,4EAA8B;AACnC,KAAK,6EAA2B;AAChC,KAAK,qIAAiC;AACtC;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL,KAAK,0VAAgG;AACrG,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,8FAAgD;AAChD;AACA,KAAK,kJAA8C;AACnD,KAAK,sJAAkD;AACvD,KAAK,0JAAsD;AAC3D,KAAK,8JAA0D;AAC/D,KAAK;AACL;AACA;AACA;AACA,qEAAuB;AACvB,KAAK,gGAA8C;AACnD,KAAK,4KAAwE;AAC7E,KAAK,iJAAiD;AACtD,KAAK,2JAAuD;AAC5D,KAAK,sJAAkD;AACvD,KAAK,0JAAsD;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,cAAc;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,gEAAgE,uBAAuB,EAAE;AACzF,8EAA8E,qCAAqC,EAAE;AACrH,mEAAmE,0BAA0B,EAAE;AAC/F,4EAA4E,mCAAmC,EAAE;AACjH,6EAA6E,oCAAoC,EAAE;AACnH;AACA;AACA;AACA,iCAAiC,QAAQ;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,wGAA0D,EAAE;AAC/F;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sFAAwC,eAAe;AAC5D,KAAK,+KAAmF;AACxF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iCAAiC;AACpE;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qDAAqD,WAAW;AAChE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc,oHAAkE,GAAG;AACtG;AACA,KAAK;AACL,KAAK,qJAAuD;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,sHAAoE;AACpG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1dA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAEoG;AAC5C;AAClB;AACiB;AACwI;;AAE/L;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,0DAA0D;AAC1D,SAAS,wEAA0B;AACnC,SAAS,gCAAgC,0IAAkC,IAAI;AAC/E,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA,8DAA8D,0BAA0B;AACxF,+DAA+D,2BAA2B;AAC1F,iEAAiE,6BAA6B;AAC9F,0DAA0D,uBAAuB;AACjF,gEAAgE,sBAAsB;AACtF;AACA;AACA;AACA;AACA,2DAA2D,wBAAwB;AACnF,6DAA6D,0BAA0B;AACvF,4DAA4D,yBAAyB;AACrF,6DAA6D,0BAA0B;AACvF,2DAA2D,wBAAwB;AACnF,kEAAkE,iCAAiC;AACnG,iEAAiE,UAAU;AAC3E;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,sBAAsB,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,iBAAiB,EAAE;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,wEAAwE,wCAAwC;AAChH;AACA,SAAS;AACT;AACA;AACA,2DAA2D;AAC3D,SAAS,wEAA0B;AACnC,SAAS,sFAA0B;AACnC,SAAS,8DAAgB;AACzB,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,qEAAqE,gCAAgC,EAAE;AACvG;AACA;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,2CAA2C;AACjH,mEAAmE,wCAAwC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF,wDAAwD;AAC3I,kEAAkE,uCAAuC;AACzG,mEAAmE,wCAAwC;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,kCAAkC;AACtG,uEAAuE,qCAAqC;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,qCAAqC;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,4DAA4D;AAC5D,SAAS,qFAAyB;AAClC,SAAS,+FAAmC;AAC5C,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mHAA+D;AACpE,KAAK,gJAAoF;AACzF,KAAK,6HAAiE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,wIAA4E;AACjF,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,mLAA2D;AAChE,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,0DAA0D,WAAW;AACrE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,uDAAuD,WAAW;AAClE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzcA;AAAA;AACA;AACA;AACA;AACA;;AAE4F;AACsZ;AAC1c;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,4BAA4B,EAAE;AACnD,+BAA+B,6BAA6B,EAAE;AAC9D;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,wBAAwB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,iCAAiC;AAC7G;AACA;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;AACA;AACA,yEAAyE,2DAA2D;AACpI,uEAAuE,uDAAuD;AAC9H;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,0CAA0C;AAC3G,iDAAiD,4CAA4C;AAC7F,wEAAwE,wBAAwB;AAChG,0EAA0E,kBAAkB;AAC5F,mEAAmE,iBAAiB;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,uBAAuB,EAAE;AACnD;AACA;AACA,KAAK;AACL,oEAAoE,wCAAwC;AAC5G,yEAAyE,mCAAmC;AAC5G,4EAA4E,sCAAsC;AAClH,mEAAmE,2CAA2C;AAC9G;AACA;AACA;AACA;AACA,4BAA4B,8CAA8C;AAC1E;AACA,oEAAoE,uBAAuB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,qBAAqB;AACnF;AACA;AACA;AACA,8DAA8D,qBAAqB;AACnF,4DAA4D,sBAAsB;AAClF,6DAA6D,uBAAuB;AACpF,wDAAwD,kBAAkB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,sBAAsB;AAClF,6DAA6D,uBAAuB;AACpF,+DAA+D,sBAAsB;AACrF,4DAA4D,sBAAsB;AAClF;AACA;AACA;AACA,uBAAuB,uBAAuB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,sBAAsB;AACzF,mEAAmE,sBAAsB;AACzF,kFAAkF,qCAAqC;AACvH;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,gCAAgC;AAC7G;AACA,oCAAoC,oCAAoC,EAAE;AAC1E;AACA,4EAA4E,4CAA4C;AACxH,qEAAqE,sBAAsB;AAC3F,yDAAyD,uBAAuB;AAChF,gEAAgE,wBAAwB;AACxF,0DAA0D,iBAAiB;AAC3E,iEAAiE,kBAAkB;AACnF,4DAA4D,mBAAmB;AAC/E,mEAAmE,oBAAoB;AACvF,iEAAiE,sDAAsD;AACvH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,8BAA8B;AAChG,+DAA+D,sBAAsB;AACrF,yDAAyD,gBAAgB;AACzE,yDAAyD,6BAA6B;AACtF;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,yDAAyD;AACzH,0EAA0E,kCAAkC;AAC5G,6EAA6E,qCAAqC;AAClH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0EAA0E,iCAAiC;AAC3G;AACA;AACA;AACA;AACA,8DAA8D,wBAAwB;AACtF;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,mCAAmC;AACnH;AACA;AACA;AACA,iFAAiF,oCAAoC;AACrH;AACA;AACA;AACA,mEAAmE,2DAA2D;AAC9H;AACA;AACA;AACA,kEAAkE,iBAAiB;AACnF;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,2DAA2D,kBAAkB;AAC7E,qEAAqE,4BAA4B;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,yCAAyC;AACvG,iEAAiE,4CAA4C;AAC7G,iEAAiE,4CAA4C;AAC7G;AACA;AACA;AACA,gEAAgE,yCAAyC;AACzG,iEAAiE,gEAAgE;AACjI,6DAA6D,iCAAiC;AAC9F,yDAAyD,gCAAgC;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,uBAAuB;AACjF,2DAA2D,wBAAwB;AACnF;AACA;AACA;AACA;AACA,gEAAgE,oBAAoB;AACpF,4DAA4D,mCAAmC;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,kCAAkC;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,aAAa;AAC5E,6DAA6D,yGAAiD;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,wCAAwC;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,+BAA+B,EAAE;AAC3D,iCAAiC,kCAAkC,EAAE;AACrE;AACA;AACA,KAAK;AACL;AACA,0BAA0B,6BAA6B,EAAE;AACzD;AACA;AACA,KAAK;AACL;AACA,0BAA0B,2BAA2B,EAAE;AACvD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,yBAAyB;AACtF,0DAA0D,sBAAsB;AAChF;AACA,SAAS;AACT;AACA;AACA,0DAA0D;AAC1D,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,oDAAoD;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,uBAAuB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,qDAAqD,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,wDAAwD,EAAE;AAChH;AACA;AACA,SAAS;AACT;AACA;AACA,uCAAuC;AACvC,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,+DAA+D,EAAE;AAC1G,wCAAwC,uBAAuB,EAAE;AACjE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,yGAAmD;AACjG;AACA;AACA,6CAA6C,wBAAwB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA,2GAA6D,uCAAuC;AACpG,0GAA4D,sCAAsC;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qCAAqC;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wCAAwC;AACjE;AACA,SAAS;AACT;AACA;AACA,wCAAwC;AACxC,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kGAAoD;AACpD,wBAAwB,6BAA6B;AACrD;AACA;AACA,6CAA6C,uCAAuC,EAAE,IAAI;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,0BAA0B,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,mBAAmB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,+CAA+C;AAC/C,SAAS,4BAA4B,6FAA+C,IAAI;AACxF,SAAS,8DAAgB;AACzB,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,qEAAqE;AACrE,2DAA2D,oCAAoC;AAC/F;AACA,SAAS;AACT;AACA;AACA,mDAAmD,WAAW;AAC9D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,oEAAoE,kCAAkC;AACtG;AACA;AACA,qDAAqD,oDAAoD,EAAE;AAC3G;AACA,6DAA6D,gDAAgD,mCAAmC,EAAE,EAAE;AACpJ;AACA,SAAS;AACT;AACA;AACA,sDAAsD;AACtD,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD,qDAAqD;AACrD;AACA,SAAS;AACT;AACA;AACA,sDAAsD;AACtD,SAAS,sBAAsB;AAC/B,SAAS,6BAA6B;AACtC,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,sCAAsC;AAC1G,iEAAiE,uCAAuC;AACxG,6EAA6E,8BAA8B;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,wBAAwB;AACxF,iEAAiE,yBAAyB;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,wBAAwB;AAC1F,qEAAqE,2BAA2B;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAAkF,sEAAsE;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,sDAAsD;AAC1H,uDAAuD,mDAAmD;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,uCAAuC,EAAE;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gCAAgC;AAChE;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gCAAgC;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gEAAgE;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,SAAS,8DAAgB;AACzB,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,0BAA0B;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,eAAe;AAC5C,8BAA8B,eAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,sDAAsD,WAAW;AACjE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,mBAAmB,EAAE;AAClE;AACA;AACA,gCAAgC,oCAAoC;AACpE,SAAS;AACT;AACA,yEAAyE,oDAAoD;AAC7H;AACA,SAAS;AACT;AACA;AACA,uDAAuD;AACvD,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,SAAS,0CAA0C,6FAA+C,IAAI;AACtG,SAAS,gEAAkB;AAC3B,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,qBAAqB;AAClD,6BAA6B,sBAAsB;AACnD,6BAA6B,sBAAsB;AACnD,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D,0DAA0D;AACzH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,uBAAuB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,gCAAgC;AAC3G,4EAA4E,iCAAiC;AAC7G,6EAA6E,kCAAkC;AAC/G,0EAA0E,+BAA+B;AACzG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mDAAmD;AACnD,SAAS,gCAAgC,kFAAoC,IAAI;AACjF,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,sDAAsD,eAAe;AACrE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,uDAAuD,gBAAgB;AACvE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,wDAAwD,iBAAiB;AACzE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,qDAAqD,cAAc;AACnE;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,6DAA6D,sBAAsB;AACnF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qJAAuD;AAC5D,KAAK,qHAAuE;AAC5E,KAAK,mIAAmF;AACxF,KAAK,uDAAuD;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,8FAAgD;AACrD,KAAK,wEAAwE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wFAA0C;AAC3D,iBAAiB,4FAA8C;AAC/D;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,yBAAyB,mFAAqC;AAC9D,yBAAyB,0GAA4D;AACrF,yBAAyB,yEAAyE;AAClG,yBAAyB,yEAAyE;AAClG,yBAAyB,8EAA8E;AACvG,yBAAyB,gEAAgE;AACzF;AACA,yBAAyB,4GAA8D;AACvF,yBAAyB,8DAA8D;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gDAAgD;AAChD,SAAS,oCAAoC,+DAAiB,GAAG,+DAAiB,IAAI;AACtF,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,aAAa;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,aAAa;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,aAAa;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB;AACjB,kBAAkB;AAClB,iBAAiB;AACjB,iBAAiB;AACjB;AACA,kDAAkD,uBAAuB,EAAE;AAC3E;AACA;AACA;AACA,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ,YAAY;AACZ;AACA,6BAA6B,GAAG,kBAAkB,yBAAyB,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uCAAuC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,gDAAgD,WAAW;AAC3D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,iCAAiC,kIAAoF;AACrH,iBAAiB;AACjB;AACA;AACA,6DAA6D,WAAW;AACxE;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,iBAAiB,iCAAiC,aAAa,GAAG;AAClE;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,wCAAwC,yDAAyD;AACjG;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjgFA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjLA;AAAA;AACA;AACA;AACA;AACA;;AAEwI;AAC6W;AACnc;AACmB;AACmC;AACtF;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,kCAAkC;AAC7E;AACA,uCAAuC,sBAAsB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,wEAAwE;AACzF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,yEAAyE;AAC1F;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8DAA8D;AACzH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,4DAA4D;AACrH;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,yCAAyC;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iCAAiC,EAAE;AAC7D;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,gCAAgC,iBAAiB;AACjD;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wNAAwN,wDAAwD,YAAY,oDAAoD,2BAA2B,qDAAqD,UAAU;AAC1a;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,qEAAqE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAAiC,MAAM,qBAAqB,6DAAe;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAoB;AACpB;AACA;AACA;AACA;AACA;AACA,4GAAqD,mBAAmB,EAAE;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,0SAAgG,YAAY,EAAE;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA,+KAAiE,wBAAwB,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,KAAK;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,0CAA0C,EAAE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,kCAAkC,aAAa;AAC/C;AACA,0CAA0C;AAC1C,2CAA2C;AAC3C,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,2CAA2C;AAC5D;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,yBAAyB,EAAE;AACtE;AACA;AACA;AACA;AACA,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,0CAA0C,EAAE;AACjE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,6BAA6B;AAC9C;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA,oDAAoD;AACpD;AACA;AACA,iBAAiB;AACjB,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA,CAAC;AACD;AACA,0DAA0D,qDAAqD,EAAE;AACjH;AACA;AACA;AACA;AACA,qCAAqC,8BAA8B,EAAE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,8CAA8C,yBAAyB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,UAAU,gEAAgE,EAAE;AACzG;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uDAAuD,EAAE;AAC7F;AACA,KAAK;AACL;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,MAAM;AACtB;AACA,gBAAgB,MAAM;AACtB;AACA;AACA,gBAAgB,MAAM;AACtB;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,uCAAuC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,+EAA0C,6CAA6C,EAAE;AACzF;AACA;AACA,+EAA0C,iDAAiD,EAAE;AAC7F;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sGAA+C,0CAA0C,EAAE;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gFAAgF,uEAAuE,EAAE;AACzJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS,kJAAoC,YAAY,EAAE;AAC3D;AACA;AACA,qGAAwD;AACxD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,iBAAiB;AACjB;AACA,mGAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAiE,wDAAwD,EAAE;AAC3H;AACA;AACA,+GAAkE;AAClE;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6JAA+G,0BAA0B;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,oBAAoB,gFAAgF;AACpG;AACA,gBAAgB,+EAA+E;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAA2E,kBAAkB;AAC7F;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA,oEAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA,yHAA2E,kBAAkB;AAC7F;AACA;AACA,8DAA8D;AAC9D;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA,qCAAqC,0FAA0F,EAAE;AACjI;AACA;AACA,qCAAqC,uDAAuD,EAAE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,gBAAgB,EAAE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,gBAAgB,EAAE;AAC7E,uCAAuC,iBAAiB,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kDAAkD,gBAAgB,EAAE,EAAE;AACxF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,4GAA8D,UAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA8D,UAAU;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,uCAAuC;AACtF;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,gDAAgD,2CAA2C,EAAE;AAC7F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iCAAiC;AACnF;AACA,CAAC;AACD;AACA;AACA,kGAA6D;AAC7D,iFAA4C;AAC5C,+EAA0C;AAC1C,sFAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gKAAgK;AAChK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,yCAAyC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,+BAA+B,EAAE;AACtD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,uCAAuC,EAAE;AAC9D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,2CAA2C,EAAE;AAClE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,yCAAyC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,6CAA6C,EAAE;AACpE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,2HAAoE,6BAA6B,EAAE;AACnG;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,mHAA4D,6BAA6B,EAAE;AAC3F;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,yCAAyC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAAgC;AAChC,4EAA8B;AAC9B,+EAAiC;AACjC,gBAAgB;AAChB,KAAK,GAAG,WAAW,UAAU,aAAa,EAAE;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,+BAA+B,EAAE;AACtD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,uCAAuC,EAAE;AAC9D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,2CAA2C,EAAE;AAClE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,yCAAyC,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,qBAAqB,6CAA6C,EAAE;AACpE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,mDAAmD,2BAA2B,EAAE;AAChF;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,4BAA4B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kCAAkC;AAC5F;AACA,CAAC;AACD;AACA;AACA,wCAAwC,iCAAiC,EAAE;AAC3E;AACA;AACA,0CAA0C,sDAAsD;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,0CAA0C,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,0BAA0B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,qHAAuE,UAAU;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,eAAe,EAAE;AACvF,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,wDAAwD,EAAE;AAClH;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,qFAAuC,qBAAqB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA,+EAA+E;AAC/E;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,qCAAqC,wBAAwB,EAAE;AAC/D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6HAAsE,8GAAiE,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA,qGAA8C,iEAAiE,EAAE,mFAA4B,UAAU,EAAE;AACzJ;AACA,0DAA0D,8CAA8C;AACxG,wDAAwD,4CAA4C;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oGAA6C,6DAA6D,EAAE,mFAA4B,wBAAwB,EAAE;AAClK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mFAA4B,wBAAwB,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,yCAAyC,EAAE;AAC1E,kCAAkC,mBAAmB,EAAE;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,mHAA4D,wBAAwB,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA,mFAAqC;AACrC;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,qEAAwB;AACxB;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT,6KAA+D,aAAa,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,iCAAiC,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,+CAA+C,yCAAyC;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sEAAsE,uEAAuE,yEAAyE;AACtN;AACA;AACA;AACA;AACA;AACA;AACA,uFAAkD,qBAAqB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,sCAAsC,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yFAAyF,8DAA8D,EAAE;AACzJ;AACA;AACA;AACA;AACA;AACA;AACA,6HAA+E,kBAAkB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mDAAmD;AACnE;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,uBAAuB,EAAE;AACvE,wGAA0D;AAC1D;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,qBAAqB,EAAE;AACzF,kDAAkD,qBAAqB,EAAE;AACzE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,yHAA2E,kBAAkB;AAC7F;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA,oEAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yHAA2E,kBAAkB;AAC7F;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ,gBAAgB;AAC3C;AACA;AACA;AACA;AACA,iBAAiB,0BAA0B;AAC3C;AACA;AACA;AACA;AACA;AACA,qCAAqC,6FAA6F,EAAE;AACpI;AACA;AACA,qCAAqC,wDAAwD,EAAE;AAC/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE,cAAc;AACvF,gFAAgF;AAChF,yEAAyE,cAAc;AACvF,qEAAqE,aAAa;AAClF;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,aAAa;AACzF,mEAAmE,YAAY;AAC/E,kFAAkF,mBAAmB;AACrG;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,wDAAwD;AAChG,sCAAsC,sDAAsD;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,mBAAmB;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,0CAA0C;AAC/D;AACA,wCAAwC,sDAAsD,mBAAmB,EAAE,EAAE;AACrH,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,qBAAqB,+CAA+C,EAAE;AACtE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,WAAW,uCAAuC;AAClD,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,uCAAuC;AACpD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,aAAa,uCAAuC;AACpD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B,2CAA2C,aAAa;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA,2CAA2C,UAAU,mCAAmC;AACxF;AACA;AACA,2CAA2C,UAAU,iCAAiC;AACtF;AACA;AACA;AACA;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA;AACA,wDAAwD,kBAAkB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,6CAA6C,aAAa;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wBAAwB;AACxD;AACA;AACA,6CAA6C,UAAU,mCAAmC;AAC1F;AACA;AACA,6CAA6C,UAAU,iCAAiC;AACxF;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;AACA;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,6CAA6C,aAAa;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,wBAAwB;AACxD;AACA;AACA,6CAA6C,UAAU,mCAAmC;AAC1F;AACA;AACA,6CAA6C,UAAU,iCAAiC;AACxF;AACA;AACA;AACA;AACA,4CAA4C,kBAAkB;AAC9D;AACA;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;AACA,0CAA0C,uBAAuB;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iFAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,2BAA2B;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,2BAA2B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,6BAA6B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA,kDAAkD,4CAA4C;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA,oDAAoD,4CAA4C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,kBAAkB;AACtE;AACA;AACA,oDAAoD,4CAA4C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,WAAW,6BAA6B;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,0CAA0C;AAC9D;AACA;AACA;AACA,oBAAoB,sCAAsC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,EAAE;AACxD;AACA;AACA;AACA;AACA,SAAS;AACT,oCAAoC,EAAE;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,+BAA+B,2HAA2H;AAC1J;AACA;AACA,2CAA2C,0BAA0B,EAAE;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA,mFAAsC,6CAA6C;AACnF;AACA;AACA;AACA;AACA,gJAAyF,UAAU,EAAE;AACrG,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wHAAwH,gCAAgC,EAAE;AAC1J;AACA,wBAAwB;AACxB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,+IAAwF,UAAU,EAAE;AACpG,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,4BAA4B;AAC5B;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,mBAAmB;AAC9E;AACA;AACA,iDAAiD,mBAAmB;AACpE;AACA;AACA,6FAA6F,gCAAgC,EAAE;AAC/H;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,sCAAsC;AAC7H;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,+DAA+D;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,2DAA2D,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,iCAAiC,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,yCAAyC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE,+DAA+D;AAC/D;AACA;AACA,wCAAwC,cAAc;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,wCAAwC;AACxC;AACA;AACA,mDAAmD,YAAY;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yCAAyC;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,SAAS,wEAA0B,kCAAkC;AACrE;AACA;AACA,6CAA6C;AAC7C,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,gCAAgC,qFAAuC,IAAI;AACpF,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,MAAM;AACN;AACA,yBAAyB,4DAAc;AACvC,sBAAsB,4DAAc;AACpC,iCAAiC,4DAAc;AAC/C,8BAA8B,4DAAc;AAC5C,gCAAgC,4DAAc;AAC9C,wBAAwB,4DAAc;AACtC,wBAAwB,4DAAc;AACtC,iCAAiC,4DAAc;AAC/C,qBAAqB,qFAAuC;AAC5D;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,mEAAmE,+BAA+B;AAClG,4DAA4D,iCAAiC;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,SAAS,wEAA0B,4BAA4B;AAC/D;AACA;AACA,qDAAqD;AACrD,SAAS,gBAAgB;AACzB,SAAS,wBAAwB;AACjC,SAAS,0EAA0B;AACnC,MAAM;AACN;AACA,oBAAoB,0FAA4C,GAAG,4DAAc;AACjF,yBAAyB,4DAAc;AACvC,sBAAsB,4DAAc;AACpC,iCAAiC,4DAAc;AAC/C,8BAA8B,4DAAc;AAC5C,gCAAgC,4DAAc;AAC9C,wBAAwB,4DAAc;AACtC,kBAAkB,kEAAoB;AACtC,wBAAwB,4DAAc;AACtC,iCAAiC,4DAAc;AAC/C,qBAAqB,+JAAiH;AACtI;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF;AACxF,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,YAAY;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mDAAmD,uBAAuB,EAAE;AAC5E,4DAA4D,uBAAuB,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA,wDAAwD,YAAY,EAAE;AACtE,SAAS;AACT;AACA;AACA,KAAK;AACL,iEAAiE,eAAe;AAChF,0DAA0D,iCAAiC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,mDAAmD;AACnD,SAAS,gBAAgB;AACzB,SAAS,kEAAoB;AAC7B,SAAS,iEAAmB;AAC5B,SAAS,yEAA2B;AACpC,MAAM;AACN;AACA,mBAAmB,0FAA4C,oBAAoB,IAAI;AACvF,4BAA4B,kGAAoD,oBAAoB,IAAI;AACxG,qCAAqC,4DAAc;AACnD,8BAA8B,4DAAc;AAC5C;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+EAA+E,0BAA0B;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,6CAA6C;AACrH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,uDAAuD;AAC7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,yBAAyB,EAAE;AACrD;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,wEAA0B,gDAAgD;AACnF;AACA;AACA,+CAA+C;AAC/C,SAAS,gCAAgC;AACzC,SAAS,wEAA0B;AACnC,SAAS,gFAAkC;AAC3C,SAAS,gCAAgC,iFAAmC,IAAI;AAChF,SAAS,yEAA2B;AACpC,MAAM;AACN;AACA,4BAA4B,kFAAoC;AAChE,8BAA8B,oFAAsC;AACpE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,sCAAsC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wGAAiD,8DAAiB,EAAE;AACpE;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8DAAiB;AAC5E;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,yDAAyD;AACjG,sCAAsC,uDAAuD;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA,kGAA2C,mCAAmC,EAAE,iFAA0B,wBAAwB,EAAE;AACpI,wCAAwC,EAAE;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,iCAAiC;AAClD;AACA;AACA;AACA,6HAA+E,kBAAkB;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,QAAQ,gBAAgB;AAC/C;AACA;AACA;AACA;AACA,qBAAqB,0BAA0B;AAC/C;AACA,uNAA4D,eAAe,EAAE;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,kDAAkD;AAClD,SAAS,gBAAgB;AACzB,SAAS,6EAA+B;AACxC,SAAS,gEAAkB;AAC3B,SAAS,gEAAkB;AAC3B,SAAS,4BAA4B;AACrC,MAAM;AACN;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK,iEAAiE;AACtE,KAAK,+JAAmE;AACxE;AACA;AACA;AACA,KAAK,2CAA2C,uBAAuB,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB,8DAA8D,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,iBAAiB;AACjB,iBAAiB,mHAAqE;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,SAAS,uEAAyB,8DAA8D;AAChG;AACA;AACA,+CAA+C;AAC/C,SAAS,gCAAgC,+DAAiB,GAAG,4FAA8C,IAAI;AAC/G,SAAS,6BAA6B,+DAAiB,IAAI;AAC3D,MAAM;AACN;AACA,CAAC;AACD;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qHAAuE;AAChF,SAAS,iDAAiD;AAC1D;AACA;AACA;AACA,0BAA0B,WAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD,oBAAoB,EAAE;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,oDAAoD;AACpD,SAAS,gEAAkB;AAC3B,MAAM;AACN;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS,2FAA2F;AACpG,SAAS,8HAAgF;AACzF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEQ;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC38KA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;8CCjLA;;AAEA,gCAAgC,2CAA2C,gBAAgB,kBAAkB,OAAO,2BAA2B,wDAAwD,gCAAgC,uDAAuD,2DAA2D,EAAE,EAAE,yDAAyD,qEAAqE,6DAA6D,oBAAoB,GAAG,EAAE;;AAEjjB,iDAAiD,aAAa,uFAAuF,EAAE,uFAAuF;;AAE9O,0CAA0C,+DAA+D,qGAAqG,EAAE,yEAAyE,eAAe,yEAAyE,EAAE,EAAE,uHAAuH;;AAE5e,iDAAiD,0CAA0C,0DAA0D,EAAE;;AAEvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,0FAA0F,aAAa;AACvG;AACA;;AAEA,kIAAkI;AAClI;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,6CAA6C,EAAE;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sCAAsC;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,UAAU,SAAS,aAAa;AAC9C;AACA,4CAA4C,UAAU,sBAAsB,aAAa;;AAEzF;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,YAAY;AAC1B;AACA,oDAAoD,YAAY;;AAEhE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yBAAyB,UAAU;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,iDAAiD;AAC7E;AACA;AACA;AACA;AACA,gCAAgC;;;AAGhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0KAA0K;AAC1K;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,eAAe;AACf;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,2CAA2C;AAC3C;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT,mCAAmC;;;AAGnC;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;;AAEvD;AACA,0LAA0L;AAC1L;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,0LAA0L;AAC1L;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,4GAA4G;AAC5G;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA,mBAAmB;AACnB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA,4LAA4L;AAC5L;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA,+LAA+L;AAC/L;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kMAAkM;AAClM;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT,kDAAkD;;;AAGlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4DAA4D;;;AAG5D;AACA;AACA;AACA;AACA;AACA,oMAAoM;AACpM;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA,8DAA8D;;;AAG9D;AACA;AACA;AACA,sCAAsC;AACtC,sDAAsD;;;AAGtD;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,sDAAsD;;;AAGtD;AACA;AACA;AACA,SAAS;AACT,wDAAwD;;;AAGxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,wDAAwD;AACxD,wDAAwD;AACxD,sDAAsD;AACtD,kDAAkD;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA,+FAA+F,eAAe;AAC9G;AACA;;AAEA,qIAAqI;AACrI;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,sCAAsC,sEAAsE;;AAE5G;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kJAAkJ;AAClJ;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,gJAAgJ;AAChJ;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,EAAE;;AAEX;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;;AAEP;;AAEA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,4JAA4J;AAC5J;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA,+IAA+I;AAC/I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB,oBAAoB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,uBAAuB,kBAAkB;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,0DAA0D;AAC1D;;AAEA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,iCAAiC;AACtD;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,4IAA4I;AAC5I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA,kJAAkJ;AAClJ;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA,2DAA2D,UAAU,0DAA0D,aAAa;AAC5I,OAAO;AACP;AACA,OAAO;AACP,0DAA0D,UAAU;AACpE;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,iDAAiD;AACjD,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS,KAAK;AACd;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,uJAAuJ;AACvJ;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,+BAA+B;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,mJAAmJ;AACnJ;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,mJAAmJ;AACnJ;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8FAA8F,eAAe;AAC7G;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B,iCAAiC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA,2BAA2B,iCAAiC;AAC5D;AACA;AACA,WAAW;AACX;AACA;AACA,SAAS;AACT;AACA,4BAA4B,qBAAqB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA,GAAG;AACH;AACA;AACA,qBAAqB,iCAAiC;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,uBAAuB;AAC5C;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,qBAAqB,kBAAkB;AACvC;AACA;AACA;;AAEA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA,uMAAuM;AACvM;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wJAAwJ;AACxJ;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,iCAAiC;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,8IAA8I;AAC9I;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,4IAA4I;AAC5I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;;AAEA,4IAA4I;AAC5I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4IAA4I;AAC5I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA,2FAA2F,YAAY;AACvG;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,GAAG;AACH;AACA;AACA,0IAA0I;AAC1I;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,+IAA+I;AAC/I;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,4IAA4I;AAC5I;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA,iKAAiK;AACjK;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,+DAA+D;;AAE/D;AACA;AACA;AACA,0DAA0D,2BAA2B;AACrF;AACA;;AAEA;AACA,yBAAyB,mBAAmB;AAC5C;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wIAAwI;AACxI;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA,iKAAiK;AACjK;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA,8IAA8I;AAC9I;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC;;AAEzC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iDAAiD;AACjD;AACA;AACA,2EAA2E;AAC3E;AACA;AACA,8BAA8B;AAC9B;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;;;;;;;;;;;ACr8GA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,UAAU;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,EAAE;AACb,WAAW,EAAE;AACb,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,YAAY;AACvB,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,eAAe;AAC3B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK;AAC3C,WAAW,OAAO;AAClB,WAAW,QAAQ;AACnB,aAAa,MAAM,GAAG,KAAK,EAAE,KAAK;AAClC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,YAAY;AACvB,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB,EAAE;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO,KAAK;AACvB,WAAW,OAAO,KAAK;AACvB,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,YAAY,OAAO;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB;;AAEzB;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA,UAAU;AACV,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,CAAC;;AAED;AACA,UAAU;AACV,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,6BAA6B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA,4BAA4B,8BAA8B;;AAE1D;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA,gBAAgB;;AAEhB;AACA;AACA,eAAe,OAAO;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB,WAAW;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iCAAiC;;AAEjC,oCAAoC;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA,sCAAsC;;AAEtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,MAAM;AACvB;AACA,kCAAkC,EAAE;;AAEpC;AACA;AACA;AACA,iBAAiB;AACjB;AACA,gCAAgC,EAAE;;AAElC;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,WAAW;AACtB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB,EAAE;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,4BAA4B,cAAc;AAC1C,2BAA2B,cAAc;AACzC,2BAA2B,gCAAgC;AAC3D,yBAAyB,gCAAgC;AACzD;AACA,yBAAyB,4BAA4B;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,OAAO;AAClB;AACA;AACA;AACA,4BAA4B,gCAAgC;;AAE5D;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,kBAAkB;AACjC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,wBAAwB;AAC/C;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe,WAAW;AAC1B,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,kBAAkB;AACjC,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,SAAS;AACxB,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA,eAAe,OAAO;AACtB,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,mGAAmG,GAAG;AACtG;;AAEA;AACA;AACA;AACA,KAAK;AAAA;AACL,CAAC,QAID;;AAEA,CAAC;;;;;;;;;;;;;;;;;;;;;;;ACllFkM;AACnM;AAC0C;;AAE1C;AACA;AACA,cAAc,WAAW;AACzB;AACA,eAAe,EAAE;AACjB,eAAe,EAAE;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA;AACA,eAAe,GAAG;AAClB,eAAe,GAAG;AAClB,gBAAgB;AAChB;AACA;AACA,eAAe,GAAG;AAClB,eAAe,GAAG;AAClB,gBAAgB;AAChB;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA,4BAA4B,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,EAAE;AACzB,mCAAmC;AACnC;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,sBAAsB,EAAE;AAChE;AACA,SAAS;AACT;AACA;AACA,wCAAwC,sBAAsB,EAAE;AAChE;AACA,SAAS;AACT;AACA;AACA,wCAAwC,sBAAsB,EAAE;AAChE;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT;AACA,iEAAiE;AACjE,kDAAkD;AAClD;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,2BAA2B,EAAE,oDAAoD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,eAAe,GAAG;AAClB,gBAAgB;AAChB;AACA;AACA,eAAe,GAAG;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iBAAiB;AACjB;AACA;AACA,oDAAoD;AACpD,SAAS,8DAAgB;AACzB,SAAS,iEAAmB;AAC5B,SAAS,kEAAoB;AAC7B,SAAS,uEAAyB;AAClC,SAAS,6BAA6B,iIAAqC,IAAI;AAC/E,SAAS,gCAAgC,+DAAiB,GAAG,uFAAyC,IAAI;AAC1G,MAAM;AACN;AACA,sBAAsB,4DAAc;AACpC,oBAAoB,iFAAmC;AACvD,sBAAsB,+EAAiC;AACvD,wBAAwB,iFAAmC;AAC3D,wBAAwB,iFAAmC;AAC3D,yBAAyB,kFAAoC;AAC7D,yBAAyB,kFAAoC;AAC7D,2BAA2B,oFAAsC;AACjE,qBAAqB,8EAAgC;AACrD,0BAA0B,mFAAqC;AAC/D,wBAAwB,iFAAmC;AAC3D,0BAA0B,mFAAqC;AAC/D,yBAAyB,kFAAoC;AAC7D,0BAA0B,mFAAqC;AAC/D,0BAA0B,mFAAqC;AAC/D,0BAA0B,mFAAqC;AAC/D,4BAA4B,qFAAuC;AACnE,+BAA+B,wFAA0C;AACzE,gCAAgC,yFAA2C;AAC3E,iCAAiC,0FAA4C;AAC7E,gCAAgC,yFAA2C;AAC3E,gCAAgC,yFAA2C;AAC3E,iCAAiC,0FAA4C;AAC7E,iCAAiC,0FAA4C;AAC7E,mCAAmC,4FAA8C;AACjF,sBAAsB,+EAAiC;AACvD,8BAA8B,uFAAyC;AACvE,oCAAoC,6FAA+C;AACnF;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kEAAkE,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,cAAc,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,UAAU,iBAAiB,2CAA2C,wCAAwC,uCAAuC,sCAAsC,mCAAmC,EAAE,EAAE,qCAAqC,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,cAAc,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,UAAU,iBAAiB,2CAA2C,wCAAwC,uCAAuC,sCAAsC,mCAAmC,EAAE,EAAE,gCAAgC,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,cAAc,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,UAAU,iBAAiB,2CAA2C,wCAAwC,uCAAuC,sCAAsC,mCAAmC,EAAE,EAAE,iCAAiC,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,SAAS,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,EAAE,8BAA8B,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,SAAS,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,EAAE,yBAAyB,QAAQ,iBAAiB,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,EAAE,SAAS,iBAAiB,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,EAAE,EAAE,8BAA8B,QAAQ,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,SAAS,oCAAoC,iCAAiC,gCAAgC,+BAA+B,4BAA4B,EAAE,SAAS,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,EAAE,2BAA2B,QAAQ,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,SAAS,oCAAoC,iCAAiC,gCAAgC,+BAA+B,4BAA4B,EAAE,SAAS,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,EAAE,sBAAsB,QAAQ,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,SAAS,oCAAoC,iCAAiC,gCAAgC,+BAA+B,4BAA4B,EAAE,SAAS,kCAAkC,+BAA+B,8BAA8B,6BAA6B,0BAA0B,EAAE,EAAE,4BAA4B,2BAA2B,EAAE,eAAe,sBAAsB,yCAAyC,sBAAsB,uBAAuB,EAAE,4BAA4B,oBAAoB,EAAE,8BAA8B,oBAAoB,EAAE,8EAA8E,oBAAoB,EAAE,sCAAsC,kBAAkB,EAAE,6BAA6B,wBAAwB,EAAE,yCAAyC,iBAAiB,EAAE,2BAA2B,uBAAuB,kBAAkB,EAAE,2BAA2B,uBAAuB,0BAA0B,wBAAwB,iBAAiB,sBAAsB,EAAE,iCAAiC,kBAAkB,EAAE,6CAA6C,eAAe,EAAE,qDAAqD,wBAAwB,qBAAqB,uDAAuD,EAAE,uDAAuD,eAAe,EAAE,4CAA4C,sBAAsB,EAAE,wDAAwD,4CAA4C,yCAAyC,wCAAwC,uCAAuC,oCAAoC,EAAE,sCAAsC,oBAAoB,uBAAuB,mBAAmB,oBAAoB,iBAAiB,EAAE,4CAA4C,+BAA+B,EAAE,6CAA6C,eAAe,EAAE,uCAAuC,gBAAgB,uBAAuB,WAAW,YAAY,eAAe,oBAAoB,oBAAoB,oBAAoB,qBAAqB,uBAAuB,8BAA8B,sBAAsB,EAAE,gDAAgD,uBAAuB,oBAAoB,EAAE,oDAAoD,wBAAwB,EAAE,+DAA+D,+CAA+C,+CAA+C,EAAE,gEAAgE,qBAAqB,4BAA4B,EAAE,qEAAqE,kCAAkC,EAAE,0GAA0G,+CAA+C,qBAAqB,uBAAuB,EAAE,+CAA+C,yCAAyC,sCAAsC,qCAAqC,oCAAoC,iCAAiC,8BAA8B,sBAAsB,EAAE,qCAAqC,wBAAwB,qBAAqB,iBAAiB,kBAAkB,uBAAuB,mBAAmB,gBAAgB,EAAE,yCAAyC,mBAAmB,EAAE,uDAAuD,0EAA0E,uEAAuE,sEAAsE,qEAAqE,kEAAkE,EAAE,mDAAmD,eAAe,mEAAmE,gEAAgE,+DAA+D,8DAA8D,2DAA2D,EAAE,kFAAkF,yBAAyB,eAAe,iBAAiB,uBAAuB,mBAAmB,aAAa,cAAc,uBAAuB,sBAAsB,EAAE,0FAA0F,mBAAmB,gBAAgB,iBAAiB,EAAE,sDAAsD,eAAe,wCAAwC,qCAAqC,oCAAoC,mCAAmC,gCAAgC,EAAE,oDAAoD,eAAe,6CAA6C,0CAA0C,yCAAyC,wCAAwC,qCAAqC,EAAE,4DAA4D,8CAA8C,2CAA2C,0CAA0C,yCAAyC,sCAAsC,EAAE,wCAAwC,eAAe,kBAAkB,yBAAyB,uBAAuB,iBAAiB,cAAc,aAAa,qBAAqB,gBAAgB,uBAAuB,yCAAyC,gCAAgC,uBAAuB,qBAAqB,EAAE,mDAAmD,qBAAqB,uDAAuD,uBAAuB,WAAW,YAAY,cAAc,aAAa,gDAAgD,6CAA6C,4CAA4C,2CAA2C,wCAAwC,EAAE,sDAAsD,mBAAmB,EAAE,4DAA4D,eAAe,yBAAyB,EAAE,6CAA6C,yBAAyB,kBAAkB,uBAAuB,mBAAmB,kBAAkB,eAAe,0CAA0C,uCAAuC,sCAAsC,qCAAqC,kCAAkC,uBAAuB,oBAAoB,eAAe,gBAAgB,iBAAiB,wBAAwB,6DAA6D,yBAAyB,iBAAiB,EAAE,mDAAmD,gBAAgB,uBAAuB,cAAc,eAAe,aAAa,cAAc,uCAAuC,wCAAwC,qCAAqC,EAAE,cAAc,mBAAmB,gBAAgB,iBAAiB,EAAE,sBAAsB,oBAAoB,8BAA8B,mBAAmB,oBAAoB,qCAAqC,kCAAkC,EAAE,+CAA+C,uBAAuB,qBAAqB,sBAAsB,4BAA4B,EAAE,wBAAwB,2BAA2B,6BAA6B,+BAA+B,iCAAiC,gCAAgC,EAAE,2DAA2D,sBAAsB,+BAA+B,4BAA4B,8BAA8B,gCAAgC,kCAAkC,sCAAsC,mCAAmC,iCAAiC,EAAE,6DAA6D,sBAAsB,4BAA4B,2BAA2B,6BAA6B,uCAAuC,iCAAiC,mCAAmC,gCAAgC,gCAAgC,EAAE,qCAAqC,yBAAyB,qBAAqB,kBAAkB,oBAAoB,uBAAuB,iBAAiB,mBAAmB,kBAAkB,8BAA8B,EAAE,mDAAmD,2BAA2B,8BAA8B,uBAAuB,iCAAiC,qCAAqC,yBAAyB,qCAAqC,yBAAyB,oBAAoB,gCAAgC,+BAA+B,EAAE,8DAA8D,6BAA6B,mBAAmB,sBAAsB,4BAA4B,6BAA6B,sCAAsC,EAAE,+DAA+D,sBAAsB,uBAAuB,mCAAmC,uCAAuC,uCAAuC,EAAE,8DAA8D,8BAA8B,EAAE,yEAAyE,yBAAyB,EAAE,oEAAoE,+CAA+C,EAAE,+EAA+E,+BAA+B,uBAAuB,mBAAmB,uBAAuB,sBAAsB,uBAAuB,8BAA8B,uDAAuD,wCAAwC,4GAA4G,EAAE,2FAA2F,+BAA+B,EAAE,sGAAsG,yBAAyB,EAAE,uGAAuG,wCAAwC,gCAAgC,EAAE,mDAAmD,oBAAoB,EAAE,iEAAiE,wBAAwB,EAAE,kEAAkE,qBAAqB,4BAA4B,iCAAiC,6BAA6B,EAAE,+EAA+E,mCAAmC,EAAE,uEAAuE,yBAAyB,2BAA2B,sBAAsB,0BAA0B,kCAAkC,EAAE,+EAA+E,8BAA8B,gCAAgC,kCAAkC,EAAE,wEAAwE,sBAAsB,EAAE,6DAA6D,oBAAoB,qBAAqB,EAAE,6DAA6D,iCAAiC,qBAAqB,EAAE,yEAAyE,sBAAsB,uBAAuB,2BAA2B,EAAE,+EAA+E,2BAA2B,wBAAwB,yBAAyB,sBAAsB,EAAE,mEAAmE,iBAAiB,kBAAkB,qDAAqD,EAAE,0EAA0E,8BAA8B,EAAE;AACp8hB,iBAAiB;AACjB;AACA;AACA,oDAAoD;AACpD,SAAS,6BAA6B,iIAAqC,IAAI;AAC/E,MAAM;AACN;AACA,sBAAsB,4DAAc;AACpC,oBAAoB,4DAAc;AAClC,qBAAqB,4DAAc;AACnC,yBAAyB,4DAAc;AACvC,8BAA8B,4DAAc;AAC5C,0BAA0B,4FAA8C;AACxE,sBAAsB,+EAAiC;AACvD,wBAAwB,iFAAmC;AAC3D,wBAAwB,iFAAmC;AAC3D,yBAAyB,kFAAoC;AAC7D,yBAAyB,kFAAoC;AAC7D,2BAA2B,oFAAsC;AACjE,qBAAqB,8EAAgC;AACrD,0BAA0B,mFAAqC;AAC/D,wBAAwB,iFAAmC;AAC3D,0BAA0B,mFAAqC;AAC/D,yBAAyB,kFAAoC;AAC7D,0BAA0B,mFAAqC;AAC/D,0BAA0B,mFAAqC;AAC/D,0BAA0B,mFAAqC;AAC/D,4BAA4B,qFAAuC;AACnE,+BAA+B,wFAA0C;AACzE,gCAAgC,yFAA2C;AAC3E,iCAAiC,0FAA4C;AAC7E,gCAAgC,yFAA2C;AAC3E,gCAAgC,yFAA2C;AAC3E,iCAAiC,0FAA4C;AAC7E,iCAAiC,0FAA4C;AAC7E,mCAAmC,4FAA8C;AACjF,sBAAsB,+EAAiC;AACvD,8BAA8B,uFAAyC;AACvE,oCAAoC,6FAA+C;AACnF;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc,WAAW;AACzB;;AAEA;AACA;AACA,cAAc,WAAW;AACzB;;AAEQ;AACR;;;;;;;;;;;;;;;;;ACvbqB;AACrB,sC;;;;;;;;;;;;;;;;ACDkB;AAClB,mC;;;;;;;;;;;;;;ACD2D;AAC3D;AACA,yC;;;;;;;;;;;;;;ACFyC;AACzC;AACA,gC;;;;;;;;;;;;;;ACFmD;AACnD;AACA,qC;;;;;;;;;;;;;;ACF2C;AAC3C;AACA,iC;;;;;;;;;;;;;;ACF2C;AAC3C;AACA,iC;;;;;;;;;;;;;;;ACFqB;AACJ;AACjB;AACA;AACA,iC;;;;;;;;;;;;;;;ACJqB;AACG;AACxB;AACA,yC;;;;;;;;;;;;;;;ACHqB;AACJ;AACjB;AACA,kC;;;;;;;;;;;;;;;ACHqB;AACP;AACd;AACA,+B;;;;;;;;;;;;;;;ACHqB;AACF;AACnB;AACA,oC;;;;;;;;;;;;;;ACHA;AAAA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AAC2B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,kBAAkB;AACxD;AACA;AACA;AACA,CAAC;AACO;AACR,2C;;;;;;;;;;;;;;;ACvBoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iC;;;;;;;;;;;;;;;;AC/Da;AAC4B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,SAAS;AACpB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yC;;;;;;;;;;;;;;;AC9DsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;;;;;;;;;AC5CgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,qCAAqC;AAChD;AACA;AACA;AACA,WAAW,IAAI;AACf;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+B;;;;;;;;;;;;;;;ACrCkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,gCAAgC,uCAAuC;AACvE;AACA;AACA,oC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjDA;AAAA;AAAA;AACA;AACqB;AACW;AACJ;AACP;AACrB;AACkB;AACQ;AACF;AACD;AACvB;AACgC;AACE;AACA;AACkB;AACN;AAC1B;AACpB;AACuB;AACF;AACrB;AACuB;AACvB;AACe;AACA;AACI;AACnB;AACkC;AACb;AACa;AACJ;AACP;AACvB;AACuB;AACI;AACH;AACP;AACD;AACA;AACG;AACJ;AACK;AACO;AACR;AACL;AACK;AACH;AACA;AACH;AACe;AACZ;AACD;AACC;AACK;AACL;AACA;AACF;AACd;AACgB;AACA;AAChB;AACiB;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/DA;AAAA;AAAA;AACiB;AACS;AACA;AACN;AACO;AACG;AACT;AACC;AACC;AACR;AACK;AACgI;AACzH;AACK;AACb;AACa;AACZ;AACG;AACK;AACI;AACT;AACJ;AACE;AACa;AACb;AACD;AACc;AACX;AACO;AACR;AACA;AACI;AACP;AACD;AACI;AACL;AACI;AACA;AACD;AACD;AACI;AACH;AACE;AACP;AACD;AACC;AACA;AACO;AACK;AACG;AACE;AACH;AACD;AACL;AACJ;AACnB;;;;;;;;;;;;;;;;;ACxDA;AAAA;AACA;AACkB;AACK;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;AClDA;AAAA;AACA;AACkB;AACgB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;AC9CA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;AChCA;AAAA;AACgB;AACH;AACQ;AACrB;AACA,mDAAmD,iBAAiB;AACpE;AACA,SAAS,kBAAkB,GAAG,oBAAoB,GAAG,gBAAgB;AACrE;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA,eAAe,yBAAyB;AACxC,eAAe,yBAAyB;AACxC,eAAe,iBAAiB;AAChC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD;AACA,eAAe,yBAAyB;AACxC,eAAe,iBAAiB;AAChC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,IAAI;AACnB,gBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;ACnIA;AAAA;AACuB;AACmB;AAClB;AACP;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,aAAa;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,eAAe;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAiG;AACjG;AACA,uFAAuF,gBAAgB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,kBAAkB;AAClB,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA,eAAe,SAAS;AACxB;AACA,eAAe,SAAS;AACxB,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,eAAe,mBAAmB;AAClC,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA,eAAe,oBAAoB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,kBAAkB,EAAE,kBAAkB,oBAAoB,EAAE,eAAe,uBAAuB,EAAE;AAC9I,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxSA;AAAA;AACiB;AACS;AAC1B;AACA;AACA,4BAA4B,EAAE;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,2BAA2B;AAC3B;AACA;;;;;;;;;;;;;;;;AChBA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;;ACzBA;AAAA;AACA;AACkB;AACF;AACO;AACO;AACI;AACJ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;AC9HA;AAAA;AACA;AACA;AACA;AACA;AACA,kDAAkD,aAAa;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mCAAmC;AAClD;AACA,eAAe,OAAO;AACtB;AACA,eAAe,EAAE;AACjB;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,oBAAoB;AAC3E;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;;;;ACvDA;AAAA;AACA;AACqB;AACA;AACE;AACW;AACJ;AACe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;AC1KA;AAAA;AACA;AACuB;AACvB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;;ACpCA;AAAA;AACA;AACqB;AACY;AACV;AACsB;AAC5B;AACS;AAC1B;AACA,mBAAmB,eAAe;AAClC,IAAI,mBAAmB,mBAAmB,eAAe;AACzD,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,kCAAkC;AACjD;AACA,eAAe,wBAAwB;AACvC;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oHAA4D,aAAa;AACzE;AACA;AACA;AACA,eAAe,sBAAsB;AACrC,eAAe,wBAAwB;AACvC;AACA,eAAe,iBAAiB;AAChC;AACA,gBAAgB,cAAc;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA,eAAe,EAAE;AACjB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B,yCAAyC,YAAY;AACrD;AACA,eAAe,IAAI;AACnB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,eAAe;AAC3B;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,6CAA6C;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACxSA;AAAA;AACkB;AACC;AACE;AACF;AACG;AACQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,cAAc;AAC7B;AACA,gBAAgB,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,aAAa;AAC5B,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACO;AACR;AACA,+CAA+C,uIAA6E,EAAE;AAC9H;AACA;;;;;;;;;;;;;;ACrMA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,gBAAgB,MAAM;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;;;;;AClCA;AAAA;AACA;AAC4B;AACP;AACA;AACE;AACmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA,eAAe,cAAc;AAC7B,gBAAgB,2BAA2B;AAC3C,eAAe,8BAA8B;AAC7C,kBAAkB,8BAA8B;AAChD,iBAAiB,qCAAqC;AACtD,kBAAkB,sDAAsD;AACxE,iBAAiB,qCAAqC;AACtD,cAAc,kCAAkC;AAChD,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;AC1KA;AAAA;AACA;AACqB;AACN;AACK;AACpB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;AC1DA;AAAA;AACqB;AACE;AACT;AACI;AACI;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB,KAAK,uBAAuB;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB,KAAK;AACzB,IAAI;AACJ;AACA;AACA;AACA,gDAAgD,0BAA0B;AAC1E,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA,kKAA2G,wIAAkF,EAAE;AAC/L;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA,2DAA2D,iCAAiC;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AClNA;AAAA;AACqB;AACE;AACT;AACQ;AACJ;AAClB;AACA;AACA;AACA;AACA,0CAA0C,mBAAmB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gBAAgB;AAChC;AACA,kDAAkD,mBAAmB;AACrE;AACA;AACA,UAAU,mBAAmB;AAC7B;AACA;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE,IAAI,uBAAuB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,mBAAmB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,oBAAoB;AACpB,oBAAoB;AACpB,IAAI;AACJ;AACA;AACA;AACA,wBAAwB;AACxB,IAAI;AACJ;AACA;AACA;AACA,oBAAoB;AACpB,IAAI;AACJ;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,UAAU;AACrB;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,uBAAuB;AACvD;AACA;AACA,sKAA+G,wIAAkF,EAAE;AACnM;AACA;AACA;AACA;AACA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,uBAAuB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,2DAA2D;AACnH;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA,gEAAgE,6BAA6B;AAC7F;AACA;AACA;AACA,+DAA+D,iCAAiC;AAChG;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,6BAA6B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACjNA;AAAA;AACA;AACsB;AACJ;AACQ;AACE;AACR;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B;AACA;AACA,WAAW,SAAS;AACpB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;ACrNA;AAAA;AACsB;AACT;AACE;AACK;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,aAAa;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B,WAAW,gBAAgB;AAC3B;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC7GA;AAAA;AACqB;AACS;AACd;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,kCAAkC;AAC7C;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChEA;AAAA;AACA;AACe;AACI;AACG;AACD;AACA;AACP;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,4CAA4C;AAC3E;AACA;AACA,+BAA+B,yDAAyD;AACxF;AACA;AACA,+BAA+B,+CAA+C;AAC9E;AACA;AACA,+BAA+B,wDAAwD;AACvF;AACA;AACA,+BAA+B,0DAA0D;AACzF;AACA,gHAAyD,mBAAmB,EAAE;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,iCAAiC;AACrE;AACA,eAAe,cAAc;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mBAAmB;AAClD,gBAAgB,WAAW;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,sEAAsE,EAAE;AACrI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;;;ACpaA;AAAA;AACA;AACoC;AACf;AACA;AACE;AACC;AACL;AACG;AACtB;AACA;AACA,gCAAgC,2BAA2B,EAAE;AAC7D,kCAAkC,8BAA8B,EAAE;AAClE;AACA,+IAA+I,+BAA+B;AAC9K;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA4D;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB,4BAA4B,EAAE,eAAe,4BAA4B,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;AChPA;AAAA;AACyB;AACzB;AACA;;;;;;;;;;;;;;;ACHA;AAAA;AAC2B;AAC3B;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA,WAAW,YAAY;AACvB,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C;AACA,WAAW,gCAAgC;AAC3C,YAAY;AACZ;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC3CA;AAAA;AACqB;AACrB;AACA,yDAAyD,YAAY;AACrE,IAAI,gBAAgB;AACpB;AACA,4GAAuE,8BAA8B,EAAE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,UAAU,gBAAgB,iBAAiB;AACtD;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAAiD,wCAAwC,8BAA8B,EAAE,EAAE,EAAE;AAC7H;AACA;;;;;;;;;;;;;;;;;;;;;ACzDA;AAAA;AACA;AACqB;AACH;AACF;AACY;AACF;AACZ;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mFAAmF;AACnF,OAAO,UAAU;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,mBAAmB;AAC9B;AACA,WAAW,SAAS;AACpB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kHAA2D,2CAA2C,EAAE;AACxG;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;;;;;ACzLA;AAAA;AACqB;AACD;AACE;AACC;AACF;AACD;AACE;AACC;AACE;AACH;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AClCA;AAAA;AACqB;AACE;AACI;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AAAA;AACqB;AACH;AACG;AACP;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB,KAAK;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,mBAAmB;AAC9B;AACA,WAAW,OAAO;AAClB;AACA,WAAW,qBAAqB;AAChC,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sIAA+E,wIAAkF,EAAE;AACnK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kEAAkE;AACrG;AACA;AACA;AACA;AACA,mCAAmC,yCAAyC;AAC5E;AACA;AACA;AACA;AACA,mCAAmC,oDAAoD;AACvF;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AChLA;AAAA;AACqB;AACH;AACG;AACP;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,iCAAiC;AAC5C;AACA;AACA,WAAW,gDAAgD;AAC3D;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,4IAAqF,wIAAkF,EAAE;AACzK;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,yCAAyC;AACrE,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;;AC3EA;AAAA;AACqB;AACE;AACe;AACR;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;;;ACpDA;AAAA;AACqB;AACE;AACmB;AACV;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,yCAAyC,+BAA+B,EAAE,GAAG,EAAE;AAC3H,2CAA2C,yCAAyC,8BAA8B,EAAE,GAAG,EAAE;AACzH,2CAA2C,yCAAyC,8BAA8B,EAAE,GAAG,EAAE;AACzH,iBAAiB;AACjB,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;;ACxBA;AAAA;AACqB;AACE;AACM;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,8BAA8B,EAAE;AAChG,qBAAqB;AACrB,iBAAiB;AACjB,4DAA4D,8BAA8B,EAAE;AAC5F,iBAAiB;AACjB,aAAa;AACb;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;;ACzBA;AAAA;AACqB;AACF;AACG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC5HA;AAAA;AACgB;AACA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6FAA6F;AAC7F,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,oBAAoB;AAC/B,WAAW,WAAW;AACtB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA8B,+CAA+C,EAAE;AAC/E;AACA;;;;;;;;;;;;;;;;;AC7FA;AAAA;AACqB;AACL;AACI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,qDAAqD;AAClH;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,mBAAmB,+DAA+D;AAClF;AACA;;;;;;;;;;;;;;;;;;AC5DA;AAAA;AACqB;AACC;AACH;AACC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,mBAAmB;AAC9B,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACxFA;AAAA;AACqB;AACN;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACjCA;AAAA;AACsB;AACF;AACJ;AACC;AACjB;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AAAA;AACqB;AACN;AACG;AACF;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8FAA8F,YAAY;AAC1G;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA,WAAW,wBAAwB;AACnC,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,mBAAmB;AAC9B,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,yFAAyF;AAC5H;AACA,oCAAoC,wBAAwB,EAAE;AAC9D;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;ACnFA;AAAA;AACqB;AACE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA,aAAa,0BAA0B;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,uCAAuC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,8DAA8D,qFAAqF;AACnJ;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,6FAA6F;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACtEA;AAAA;AACA;AACkB;AACE;AACM;AACE;AAC5B;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,+BAA+B;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACpFA;AAAA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU,gBAAgB,iBAAiB;AACtD;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5EA;AAAA;AACqB;AACrB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACXA;AAAA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,eAAe;AAC7C;AACA;AACA,WAAW,yBAAyB;AACpC;AACA;AACA;AACA;AACA;AACA,WAAW,2BAA2B;AACtC,WAAW,WAAW;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,IAAI;AACf,WAAW,UAAU,gBAAgB,iBAAiB;AACtD;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iGAAqD,gCAAgC,EAAE;AACvF;AACA;AACA,iGAAqD,yCAAyC,uCAAuC,EAAE,EAAE;AACzI;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1DA;AAAA;AACqB;AACL;AACI;AACE;AACtB;AACA;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,WAAW;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,YAAY;AACvB;AACA,WAAW,qBAAqB;AAChC;AACA,WAAW,cAAc;AACzB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AClFA;AAAA;AACqB;AACS;AACd;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,0BAA0B;AACrC;AACA,WAAW,iDAAiD;AAC5D;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;;;;;;;;;AC5DA;AAAA;AACA;AACoB;AACF;AACG;AACK;AACE;AACU;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,mBAAmB;AAChF;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP,OAAO;AACP;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+BAA+B,IAAI;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;ACtQA;AAAA;AACA;AACmB;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,0CAA0C;AACrD;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACjHA;AAAA;AACgB;AACA;AACA;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,iBAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,UAAU,wBAAwB,iBAAiB;AAC9D;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6EAA8B,6FAAmC,EAAE;AACnE;AACA;;;;;;;;;;;;;;;;;ACpDA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACzEA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,KAAK;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;AC5IA;AAAA;AACA;AACgB;AACK;AACC;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,8BAA8B;AAC9B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sGAAsG,2CAA2C;AACjJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACrMA;AAAA;AACA;AACuB;AACK;AACF;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,yBAAyB;AACpC;AACA,WAAW,0CAA0C;AACrD;AACA;AACA;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;ACrJA;AAAA;AACA;AACuB;AACJ;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,uBAAuB;AAClC;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACxHA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;AC/GA;AAAA;AACgC;AAChC;AACA,8BAA8B,kHAAwD;AACtF;AACA;;;;;;;;;;;;;;;;;ACLA;AAAA;AACkB;AACc;AACjB;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oNAAiG;AAC/H;AACA;;;;;;;;;;;;;;;ACzBA;AAAA;AACiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,8BAA8B,gIAAmF;AACjH;AACA;;;;;;;;;;;;;;;ACbA;AAAA;AACmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrDA;AAAA;AACmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gBAAgB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,oDAAoD;AAC/D;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACzDA;AAAA;AACoB;AACpB;AACA;AACA;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,qFAAkC,wBAAwB,EAAE;AAC5D;AACA;;;;;;;;;;;;;;;;ACtDA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,8DAA8D;AACzE;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,0DAA0D;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC1GA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,mBAAmB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,0CAA0C;AACrD;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4DAA4D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC/HA;AAAA;AACA;AACqB;AACL;AAChB;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,WAAW,UAAU,wBAAwB,iBAAiB;AAC9D;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kEAAkE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACvHA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,IAAI;AACf;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8DAA8D;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;AC1EA;AAAA;AACA;AACgB;AACC;AACI;AACE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA;AACA,kDAAkD;AAClD,0CAA0C;AAC1C;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,YAAY;AACvB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4DAA4D;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;ACpIA;AAAA;AACA;AACqB;AACA;AACK;AACE;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kEAAkE;AAChG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;AChMA;AAAA;AACA;AACqB;AACrB;AACA,8BAA8B,mBAAmB;AACjD;AACA;AACA,mCAAmC,mBAAmB;AACtD,sDAAsD,kBAAkB;AACxE;AACA;AACA;AACA;AACA,IAAI,mBAAmB;AACvB;AACA;AACA;AACA;AACA,0CAA0C,kBAAkB;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACvEA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,SAAS;AACpB,WAAW,WAAW;AACtB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,gEAAgE;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;AClHA;AAAA;AACA;AACqB;AACF;AACG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP,OAAO;AACP;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;ACvGA;AAAA;AAC+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B,QAAQ,qBAAqB;AAC7B;AACA;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,sBAAsB;AAC9B,QAAQ,qBAAqB;AAC7B,QAAQ,sBAAsB;AAC9B,QAAQ,sBAAsB;AAC9B;AACA;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP,OAAO;AACP;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,+GAAiD,8DAA8D,EAAE;AACjH;AACA;;;;;;;;;;;;;;;;;;;AC/DA;AAAA;AACkC;AACjB;AACM;AACE;AACV;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,wBAAwB;AACpC;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,EAAE;AACb,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mGAAmD,oBAAoB,EAAE;AACzE;AACA,8FAAwC,oGAAsC,EAAE;AAChF;AACA;AACA;;;;;;;;;;;;;;;;AC3DA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA,WAAW,SAAS;AACpB,WAAW,IAAI;AACf,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,mEAAmE;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACrEA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,eAAe;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,+CAA+C;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;ACpFA;AAAA;AACA;AAC0B;AACE;AACd;AACC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,cAAc;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,oDAAoD;AAC/D;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,gDAAgD,6JAAuD,oCAAoC,EAAE,GAAG,EAAE,GAAG;AACvL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;;ACnHA;AAAA;AACA;AACmB;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,gDAAgD;AAC3D;AACA;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wEAAwE;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACtJA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACzFA;AAAA;AACA;AACqB;AACE;AACvB;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,mDAAmD;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACtCA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,kEAAkE;AAC7E;AACA,WAAW,IAAI;AACf;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8EAA8E;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;AC/FA;AAAA;AAC4B;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,YAAY;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,kEAAkE;AAC7E;AACA,WAAW,IAAI;AACf;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,6HAA6E;AAC3G;AACA;;;;;;;;;;;;;;;;;;;;ACvCA;AAAA;AACqB;AACJ;AACF;AACU;AACF;AACJ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,WAAW;AACvB;AACA;AACA,WAAW,kEAAkE;AAC7E;AACA,WAAW,EAAE;AACb;AACA,YAAY,gBAAgB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,wGAAwD,gCAAgC,EAAE,6SAAkG,0EAAyB,EAAE,GAAG;AACxP;AACA;;;;;;;;;;;;;;;;;;;;ACtDA;AAAA;AACA;AACqB;AACE;AACF;AACH;AAClB;AACA;AACA;AACA;AACA,IAAI,wBAAwB;AAC5B;AACA;AACA;AACA;AACA,uBAAuB,oBAAoB;AAC3C,uBAAuB,mBAAmB;AAC1C,uBAAuB,mBAAmB;AAC1C,uBAAuB,oBAAoB;AAC3C,uBAAuB,mBAAmB;AAC1C,uBAAuB,sBAAsB;AAC7C,uBAAuB,oBAAoB;AAC3C,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B;AACA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,0BAA0B;AACnC;AACA,SAAS,sBAAsB;AAC/B;AACA;AACA,uBAAuB,oBAAoB;AAC3C,uBAAuB,mBAAmB;AAC1C,uBAAuB,mBAAmB;AAC1C,uBAAuB,oBAAoB;AAC3C,uBAAuB,mBAAmB;AAC1C,uBAAuB,sBAAsB;AAC7C,uBAAuB,oBAAoB;AAC3C,uBAAuB;AACvB;AACA;AACA;AACA,qBAAqB,+CAA+C;AACpE;AACA;AACA;AACA,OAAO;AACP,OAAO;AACP,OAAO;AACP;AACA,WAAW,sBAAsB;AACjC;AACA,WAAW,sBAAsB;AACjC;AACA,WAAW,2DAA2D;AACtE;AACA;AACA,YAAY,mCAAmC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACnRA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACzCA;AAAA;AACA;AACqB;AACrB;AACA,8BAA8B,2CAA2C;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;ACrCA;AAAA;AACqB;AACJ;AACE;AACI;AACE;AACN;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA,WAAW,SAAS;AACpB,WAAW,IAAI;AACf;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,wGAAwD,gCAAgC,EAAE,qTAAsG,0EAAyB,EAAE,GAAG;AAC5P;AACA;;;;;;;;;;;;;;;;;AC5BA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,qCAAqC;AAChD;AACA;AACA;AACA,WAAW,IAAI;AACf;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACpFA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,IAAI;AACf,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,8CAA8C;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC1DA;AAAA;AACA;AACqB;AACE;AACvB;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA,IAAI,mBAAmB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,oBAAoB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,YAAY,4BAA4B;AACxC,IAAI,mBAAmB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;ACtFA;AAAA;AACiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C,0BAA0B,oBAAoB;AAC9C,0BAA0B,qBAAqB;AAC/C;AACA,4DAA4D;AAC5D;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D,2BAA2B,sBAAsB;AACjD;AACA;AACA;;;;;;;;;;;;;;;ACvCA;AAAA;AAC+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA,8BAA8B,8HAAkF;AAChH;AACA;;;;;;;;;;;;;;;;ACbA;AAAA;AACmB;AACA;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACrDA;AAAA;AACA;AAC4B;AACF;AACZ;AACC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,eAAe;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,oDAAoD;AAC/D;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,8CAA8C,6JAAuD,oCAAoC,EAAE,GAAG,EAAE,eAAe;AACjM;AACA;AACA;AACA;AACA,8BAA8B,+DAA+D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;ACvJA;AAAA;AACmB;AACnB;AACA;AACA;AACA;AACA;AACA,qCAAqC,eAAe;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,OAAO;AAClB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAqC,wBAAwB,EAAE;AAC/D;AACA;AACA;AACA;AACA,mFAAiC,wBAAwB,EAAE;AAC3D;AACA;;;;;;;;;;;;;;;;;;;;;ACjDA;AAAA;AACA;AACmB;AACG;AACM;AACF;AAC1B;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,0CAA0C;AACrD;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,0EAA0E;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;AC9HA;AAAA;AACiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,oBAAoB;AAC9C,0BAA0B,oBAAoB;AAC9C,0BAA0B,qBAAqB;AAC/C;AACA,4DAA4D;AAC5D;AACA;AACA,SAAS;AACT;AACA,WAAW,SAAS;AACpB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA,2BAA2B,mCAAmC;AAC9D,2BAA2B,sBAAsB;AACjD;AACA;AACA;;;;;;;;;;;;;;;;ACvCA;AAAA;AAC0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;ACzDA;AAAA;AACA;AACqB;AACE;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,YAAY;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,IAAI;AACJ;AACA,SAAS;AACT;AACA,WAAW,cAAc;AACzB,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;ACrHA;AAAA;AACA;AACe;AACG;AACQ;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,aAAa;AAC/E;AACA;AACA;AACA;AACA;AACA,8DAA8D,gBAAgB;AAC9E,0FAA0F,YAAY;AACtG;AACA;AACA;AACA;AACA;AACA,uBAAuB,eAAe;AACtC;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,mBAAmB;AAC9B,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA,8BAA8B,gEAAgE;AAC9F;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACnIA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,YAAY,qBAAqB;AACjC;AACA;AACA;AACA;AACA;AACA,8BAA8B,4CAA4C;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACxEA;AAAA;AACc;AACG;AACjB;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD,2BAA2B,aAAa;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,aAAa;AACjE,iBAAiB,aAAa;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,2CAA2C;AACtD;AACA;AACA;AACA;AACA;AACA,WAAW,IAAI;AACf;AACA,YAAY,+BAA+B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACpDA;AAAA;AACc;AACd;AACA;AACA;AACA,gCAAgC,UAAU;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,UAAU;AACrB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,8FAAiD;AAC/E;AACA;AACA;AACA;AACA,uBAAuB,YAAY;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACvDA;AAAA;AACkB;AACE;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kFAA+B,+DAAsB,EAAE;AACvD;AACA;AACA;;;;;;;;;;;;;;;;ACtBA;AAAA;AAC0B;AACN;AACpB;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA,8BAA8B,0JAAsD;AACpF;AACA;;;;;;;;;;;;;;;;ACZA;AAAA;AACuB;AACH;AACpB;AACA,8BAA8B,+IAA8C;AAC5E;AACA;;;;;;;;;;;;;;;;ACNA;AAAA;AACwB;AACJ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kFAA+B,gBAAgB,EAAE,oBAAoB;AACnG;AACA;;;;;;;;;;;;;;;;ACZA;AAAA;AACkB;AACW;AAC7B;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AC1BA;AAAA;AACe;AACI;AACM;AACV;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,WAAW,uBAAuB,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,6CAA6C;AACxD;AACA,WAAW,EAAE;AACb,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;;;;;;;;;;;;;;;ACnEA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AChFA;AAAA;AACA;AACqB;AACL;AAChB;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;ACrEA;AAAA;AACA;AACkB;AACC;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gDAAgD;AAC3D;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACrGA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;AC9DA;AAAA;AACA;AACkB;AACC;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,yCAAyC;AACpD;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA,8BAA8B,6DAA6D;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC7FA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kDAAkD;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACnFA;AAAA;AACA;AACqB;AACL;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA,WAAW,UAAU,wBAAwB,iBAAiB;AAC9D;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+DAA+D;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,oCAAoC;AACxG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACxFA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,aAAa;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,6CAA6C;AACxD;AACA,WAAW,IAAI;AACf,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;ACtHA;AAAA;AACA;AACqB;AACF;AACG;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,sFAAsF;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,WAAW;AACtB,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,oEAAoE;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AChKA;AAAA;AACoB;AACD;AACD;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA,8BAA8B,gKAA2D;AACzF;AACA;;;;;;;;;;;;;;;ACtBA;AAAA;AACwB;AACxB;AACA;AACA;AACA;AACA;AACA,8BAA8B,4EAA4E;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,qBAAqB,EAAE;AAC/D;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC1CA;AAAA;AACA;AACqB;AACA;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,2DAA2D;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACzFA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA,8BAA8B,6CAA6C;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC9CA;AAAA;AACA;AACqB;AACa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,wBAAwB;AACpC;AACA;AACA,WAAW,OAAO;AAClB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;AACA,8BAA8B,iDAAiD;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACxFA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;ACvDA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;AC7DA;AAAA;AACoB;AACH;AACD;AACiB;AACX;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU,kBAAkB,iBAAiB;AACxD;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC9CA;AAAA;AACgC;AAChC;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;AC/BA;AAAA;AACoB;AACD;AACnB;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACNA;AAAA;AACA;AAC0B;AACE;AACd;AACC;AACf;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,aAAa;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,oDAAoD;AAC/D;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,+CAA+C,6JAAuD,oCAAoC,EAAE,GAAG,EAAE,GAAG;AACtL;AACA,8BAA8B,oDAAoD;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;AClHA;AAAA;AACoB;AACpB;AACA;AACA;AACA,eAAe,aAAa;AAC5B;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sGAAmD,wBAAwB,EAAE,8FAA2C,wBAAwB,EAAE;AAClJ;AACA;;;;;;;;;;;;;;;;;;ACxCA;AAAA;AACA;AACqB;AACa;AAClB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,wBAAwB;AACpC;AACA;AACA,WAAW,OAAO;AAClB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACtFA;AAAA;AACA;AACqB;AACa;AAClB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,YAAY,wBAAwB;AACpC;AACA;AACA,WAAW,OAAO;AAClB;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,WAAW;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;ACxGA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,WAAW;AACtB;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA,8BAA8B,qDAAqD;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;AC1EA;AAAA;AACA;AACqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,2CAA2C;AACtD;AACA;AACA,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,sDAAsD;AACpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACvFA;AAAA;AACA;AACqB;AACN;AACM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA,WAAW,kBAAkB;AAC7B;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACzHA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,0CAA0C;AACrD;AACA;AACA,WAAW,OAAO;AAClB,QAAQ,iCAAiC;AACzC,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6FAA6F;AAC3H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;ACvIA;AAAA;AACA;AACqB;AACL;AACgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,iBAAiB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA;AACA,WAAW,UAAU,wBAAwB,iBAAiB;AAC9D;AACA,WAAW,OAAO;AAClB,sCAAsC,iCAAiC;AACvE,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,oGAAoG;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4FAA4F,mBAAmB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9HA;AAAA;AACc;AACO;AACrB;AACA;AACA;AACA,0DAA0D,iBAAiB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uCAAuC,EAAE;AACtD,iBAAiB,oBAAoB,EAAE;AACvC,IAAI;AACJ,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,sBAAsB,EAAE;AACnD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC3CA;AAAA;AACgB;AACD;AACC;AACF;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,wDAAwD;AACjF,aAAa,GAAG,8DAA8D;AAC9E;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;AC/BA;AAAA;AACgB;AACO;AACD;AACD;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,YAAY;AACvB;AACA,WAAW,UAAU;AACrB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC5EA;AAAA;AACA;AACgB;AACC;AACS;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB,YAAY,cAAc;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC9HA;AAAA;AACgB;AACF;AACd;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAAiC,8CAA8C,EAAE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;ACxBA;AAAA;AACiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACZA;AAAA;AACA;AACkB;AACQ;AACE;AAC5B;AACA;AACA;AACA;AACA,qCAAqC,aAAa;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC5GA;AAAA;AACA;AACqB;AACH;AAClB;AACA;AACA;AACA;AACA,qCAAqC,kBAAkB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,OAAO;AAClB;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;AClIA;AAAA;AACA;AACkB;AACF;AACK;AACD;AACE;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,iCAAiC;AACjC;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC/JA;AAAA;AACA;AACkB;AACK;AACJ;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,cAAc;AACzB;AACA,WAAW,+BAA+B;AAC1C;AACA;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA,8BAA8B,yEAAyE;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;;;;AChLA;AAAA;AACA;AACkB;AACC;AACG;AACI;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA,WAAW,uBAAuB;AAClC;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;;;AC9HA;AAAA;AACA;AAC0B;AACE;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,gBAAgB;AAC3B;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA,YAAY,WAAW;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA,uBAAuB,SAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;;;AC/HA;AAAA;AAC2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfA;AAAA;AACsB;AACtB;AACA,8BAA8B,8FAA8C;AAC5E;AACA;;;;;;;;;;;;;;;;ACLA;AAAA;AACA;AACuB;AACvB;AACA,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,EAAE;AACjB;AACA,eAAe,OAAO;AACtB;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACzCA;AAAA;AACA;AACsB;AACtB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gGAAgG,8BAA8B,EAAE;AAChI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACtDA;AAAA;AACA;AACyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;AChCA;AAAA;AACA;AACoB;AACE;AACtB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACvDA;AAAA;AACA;AACyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;AChCA;AAAA;AACA;AACiB;AACjB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;AChJA;AAAA;AACA;AACoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kCAAkC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACpEA;AAAA;AACA;AACsB;AACtB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACjDA;AAAA;AACA;AACyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;ACXA;AAAA;AACA;AACsB;AACG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oEAAoE,oBAAoB,EAAE;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;ACzHA;AAAA;AAC+B;AACG;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,6EAA6E,YAAY;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClCA;AAAA;AACqB;AACG;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,YAAY;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACtCA;AAAA;AACsB;AACG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC9CA;AAAA;AACsB;AACG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,YAAY;AAC7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D;AAC9D;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACjEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;;;;;;;;;;;;;;ACZA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACHA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACRA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;ACvBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;ACvBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,6BAA6B,EAAE;AAC3E;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;ACpBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;ACtBA;AAAA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;ACnBA;AAAA;AACA;AACA;AACA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA,0GAA0G,sCAAsC,EAAE;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;ACnBA;AAAA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA,mDAAmD,UAAU;AAC7D;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACXA;AAAA;AACA;AACA,mBAA0B,MAAM;AAChC;;;;;;;;;;;;;;ACHA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW,EAAE;AACzC;AACA;;;;;;;;;;;;;;ACTA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AAAA;AACA,8CAAqD,0CAA0C,EAAE;AACjG;;;;;;;;;;;;;;ACFA;AAAA;AACA,iCAAwC,qEAAqE,EAAE;AAC/G;;;;;;;;;;;;;;ACFA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACJA;AAAA;AACsC;AACtC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACNA;AAAA;AACkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACTA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACJA;AAAA;AAC0C;AAC1C;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACNA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACJA;AAAA;AACA;AACA,iBAAwB;AACxB;;;;;;;;;;;;;;ACHA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACTA;AAAA;AACe;AACf;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,iBAAiB,EAAE;AAClE;AACA;AACA;;;;;;;;;;;;;;ACtBA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACO;AACR;;;;;;;;;;;;;;;;;;;;;;;;AClBA;AAAA;AACqB;AACM;AACE;AACC;AACE;AACV;AACF;AACD;AACmB;AACI;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC3CA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,+BAA+B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACfA;AAAA;AACsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC3BA;AAAA;AAC0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACnBA;AAAA;AAC0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,kBAAkB,8BAA8B,EAAE;AAC3D;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACdA;AAAA;AAC0B;AACJ;AACtB;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACPA;AAAA;AACqB;AACwB;AACZ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AClBA;AAAA;AACsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChBA;AAAA;AAAA;AACA;AACgB;AACI;AACH;AACK;AACD;AACE;AACF;AACA;AACA;AACG;AACP;AACG;AACA;AACE;AACN;AACG;AACI;AACE;AACT;AACI;AACI;AACL;AACY;AACG;AACd;AACJ;AACE;AACG;AACJ;AACA;AACE;AACJ;AACK;AACJ;AACE;AACO;AACP;AACH;AACD;AACE;AACM;AACR;AACE;AACG;AACA;AACW;AACT;AACD;AACN;AACM;AACA;AACQ;AACT;AACC;AACJ;AACE;AACQ;AACJ;AACE;AACT;AACE;AACA;AACI;AACL;AACI;AACD;AACF;AACI;AACN;AACS;AACR;AACM;AACL;AACF;AACI;AACC;AACA;AACA;AACE;AACF;AACA;AACE;AACP;AACI;AACC;AACA;AACN;AACK;AACI;AACA;AACA;AACL;AACI;AACF;AACF;AACD;AACK;AACD;AACE;AACF;AACI;AACX;AACG;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzGA;AAAA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM,gBAAgB,sCAAsC,iBAAiB,EAAE;AAC/E,qBAAqB,uDAAuD;;AAE5E;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;;AAEA;AACA;AACA;AACA,4CAA4C,QAAQ;AACpD;AACA;;AAEA;AACA,mCAAmC,oCAAoC;AACvE;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,MAAM,6BAA6B,EAAE,YAAY,WAAW,EAAE;AACjG,kCAAkC,MAAM,iCAAiC,EAAE,YAAY,WAAW,EAAE;AACpG,+BAA+B,iEAAiE,uBAAuB,EAAE,4BAA4B;AACrJ;AACA,KAAK;AACL;;AAEA;AACA,aAAa,6BAA6B,0BAA0B,aAAa,EAAE,qBAAqB;AACxG,gBAAgB,qDAAqD,oEAAoE,aAAa,EAAE;AACxJ,sBAAsB,sBAAsB,qBAAqB,GAAG;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC,kCAAkC,SAAS;AAC3C,kCAAkC,WAAW,UAAU;AACvD,yCAAyC,cAAc;AACvD;AACA,6GAA6G,OAAO,UAAU;AAC9H,gFAAgF,iBAAiB,OAAO;AACxG,wDAAwD,gBAAgB,QAAQ,OAAO;AACvF,8CAA8C,gBAAgB,gBAAgB,OAAO;AACrF;AACA,iCAAiC;AACjC;AACA;AACA,SAAS,YAAY,aAAa,OAAO,EAAE,UAAU,WAAW;AAChE,mCAAmC,SAAS;AAC5C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM,gBAAgB;AACzC;AACA;AACA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA;AACA,4BAA4B,sBAAsB;AAClD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,sFAAsF,aAAa,EAAE;AACtH,sBAAsB,gCAAgC,qCAAqC,0CAA0C,EAAE,EAAE,GAAG;AAC5I,2BAA2B,MAAM,eAAe,EAAE,YAAY,oBAAoB,EAAE;AACpF,sBAAsB,oGAAoG;AAC1H,6BAA6B,uBAAuB;AACpD,4BAA4B,wBAAwB;AACpD,2BAA2B,yDAAyD;AACpF;;AAEA;AACA;AACA,iBAAiB,4CAA4C,SAAS,EAAE,qDAAqD,aAAa,EAAE;AAC5I,yBAAyB,gCAAgC,oBAAoB,gDAAgD,gBAAgB,GAAG;AAChJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,uCAAuC,aAAa,EAAE,EAAE,OAAO,kBAAkB;AACjH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;;;;;;;;;;;;ACjLA;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;;AAEA,2CAA2C,+P;;;;;;;;;;;;ACP3C;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;;AAEA,2CAA2C,2P;;;;;;;;;;;;ACP3C;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,2CAA2C,mtD;;;;;;;;;;;;ACpB3C;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;;AAEA,2CAA2C,+Q;;;;;;;;;;;;ACP3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,u1B;;;;;;;;;;;;ACvB3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA,2GAA2G,0CAA0C,EAAE;AACvJ;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,sDAAsD,4BAA4B,2BAA2B,WAAW,uCAAuC,6BAA6B,WAAW,mCAAmC,iCAAiC,6BAA6B,0BAA0B,2BAA2B,WAAW,+CAA+C,0BAA0B,iCAAiC,8BAA8B,uBAAuB,gCAAgC,wBAAwB,wCAAwC,2BAA2B,WAAW,6JAA6J,iDAAiD,uDAAuD,0BAA0B,qDAAqD,sDAAsD,kCAAkC,2CAA2C,0BAA0B,2BAA2B,6BAA6B,uDAAuD,0DAA0D,WAAW,iDAAiD,mDAAmD,gDAAgD,WAAW,kCAAkC,kBAAkB,+CAA+C,eAAe,oBAAoB,iDAAiD,eAAe,WAAW,qCAAqC,kBAAkB,+CAA+C,eAAe,oBAAoB,kDAAkD,eAAe,WAAW,qCAAqC,kBAAkB,kDAAkD,eAAe,oBAAoB,oDAAoD,eAAe,WAAW,wCAAwC,kBAAkB,kDAAkD,eAAe,oBAAoB,qDAAqD,eAAe,WAAW;AAC/yE,iBAAiB,IAAI;AACrB;AACA;AACA,8CAA8C;AAC9C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,yBAAyB,0DAA0D;AACnF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,2lO;;;;;;;;;;;;ACvD3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,+sH;;;;;;;;;;;;AC/D3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qDAAqD,iCAAiC,4BAA4B,0BAA0B,2BAA2B,2BAA2B,wBAAwB,mDAAmD,4CAA4C,2CAA2C,yCAAyC,wCAAwC,oCAAoC,WAAW,8BAA8B,8BAA8B,WAAW;AAC3iB,iBAAiB,IAAI;AACrB;AACA;AACA,6CAA6C;AAC7C,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AACpC,SAAS,+CAA+C;AACxD,MAAM;AACN;AACA,0BAA0B,4DAA4D;AACtF,0BAA0B,kDAAkD;AAC5E,mBAAmB,qBAAqB;AACxC,wBAAwB,qBAAqB;AAC7C,4BAA4B,qBAAqB;AACjD;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,uvT;;;;;;;;;;;;ACnH3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uDAAuD,0CAA0C,wCAAwC,uCAAuC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,0BAA0B,8BAA8B,2BAA2B,gCAAgC,WAAW,iCAAiC,mCAAmC,WAAW;AACnkB,iBAAiB,IAAI;AACrB;AACA;AACA,+CAA+C;AAC/C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,6CAA6C;AACtD,MAAM;AACN;AACA,qBAAqB,8CAA8C;AACnE,uBAAuB,4DAA4D;AACnF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,+vM;;;;;;;;;;;;ACzE3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iDAAiD,0CAA0C,wCAAwC,uCAAuC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,0BAA0B,8BAA8B,2BAA2B,gCAAgC,WAAW,2BAA2B,mCAAmC,WAAW;AACvjB,iBAAiB,IAAI;AACrB;AACA;AACA,yCAAyC;AACzC,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,qBAAqB,8CAA8C;AACnE,uBAAuB,4DAA4D;AACnF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,moN;;;;;;;;;;;;AC7E3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,uDAAuD,0CAA0C,wCAAwC,uCAAuC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,0BAA0B,8BAA8B,2BAA2B,gCAAgC,WAAW,iCAAiC,mCAAmC,WAAW;AACnkB,iBAAiB,IAAI;AACrB;AACA;AACA,8CAA8C;AAC9C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,qBAAqB,8CAA8C;AACnE,uBAAuB,4DAA4D;AACnF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,2pM;;;;;;;;;;;;AC3E3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA,4NAA4N,mBAAmB;AAC/O,4DAA4D,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,0BAA0B,8BAA8B,2BAA2B,gCAAgC,wEAAwE,WAAW,wCAAwC,4BAA4B,kCAAkC,sCAAsC,0BAA0B,WAAW;AAC3sB,iBAAiB,IAAI;AACrB;AACA;AACA,mDAAmD;AACnD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,4BAA4B,qBAAqB;AACjD,qBAAqB,8CAA8C;AACnE,uBAAuB,4DAA4D;AACnF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,mlN;;;;;;;;;;;;AC1E3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,8EAA8E,EAAE;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA,8LAA8L,0BAA0B,uiBAAuiB,iBAAiB;AAChxB,6DAA6D,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,0BAA0B,2BAA2B,8BAA8B,2BAA2B,gCAAgC,WAAW,0CAA0C,iCAAiC,4BAA4B,2BAA2B,kCAAkC,uCAAuC,0BAA0B,WAAW,uDAAuD,0BAA0B,+BAA+B,2BAA2B,+BAA+B,uCAAuC,oCAAoC,+BAA+B,iCAAiC,8BAA8B,WAAW,mEAAmE,4BAA4B,WAAW,8DAA8D,0BAA0B,WAAW,iDAAiD,iCAAiC,0BAA0B,2BAA2B,wBAAwB,iCAAiC,wCAAwC,wEAAwE,+BAA+B,mCAAmC,WAAW,8DAA8D,0BAA0B,WAAW;AAC9sD,iBAAiB,IAAI;AACrB;AACA;AACA,oDAAoD;AACpD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,sBAAsB,qBAAqB;AAC3C,6BAA6B,sBAAsB;AACnD;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,mxN;;;;;;;;;;;;AC9C3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,qEAAqE,4BAA4B,0BAA0B,0BAA0B,mCAAmC,iCAAiC,WAAW,qDAAqD,yDAAyD,WAAW,qDAAqD,iCAAiC,mCAAmC,WAAW,iEAAiE,yCAAyC,sCAAsC,iCAAiC,WAAW;AAC7pB,iBAAiB,IAAI;AACrB;AACA;AACA,0DAA0D;AAC1D,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,20J;;;;;;;;;;;;ACzD3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,OAAO;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iEAAiE,4BAA4B,0BAA0B,0BAA0B,mCAAmC,iCAAiC,WAAW,qEAAqE,iCAAiC,0BAA0B,uDAAuD,WAAW,iDAAiD,iCAAiC,mCAAmC,WAAW;AACliB,iBAAiB,IAAI;AACrB;AACA;AACA,sDAAsD;AACtD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,yBAAyB,qBAAqB;AAC9C,mBAAmB,qBAAqB;AACxC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,u8S;;;;;;;;;;;;ACjG3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mEAAmE,4BAA4B,0BAA0B,0BAA0B,mCAAmC,iCAAiC,WAAW,mDAAmD,sCAAsC,WAAW,mDAAmD,iCAAiC,mCAAmC,yCAAyC,sCAAsC,iCAAiC,WAAW,+DAA+D,sCAAsC,yCAAyC,sCAAsC,iCAAiC,WAAW,sDAAsD,gCAAgC,2BAA2B,0BAA0B,iCAAiC,6CAA6C,+BAA+B,iCAAiC,WAAW;AAC5jC,iBAAiB,IAAI;AACrB;AACA;AACA,wDAAwD;AACxD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,sBAAsB,qBAAqB;AAC3C;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,+vJ;;;;;;;;;;;;AClD3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,mCAAmC,EAAE;AAC/H;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,sDAAsD,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,iCAAiC,0BAA0B,0BAA0B,2BAA2B,wBAAwB,8BAA8B,kCAAkC,8CAA8C,2BAA2B,0DAA0D,yDAAyD,uDAAuD,sDAAsD,kDAAkD,WAAW,4CAA4C,iCAAiC,4BAA4B,2BAA2B,kCAAkC,2BAA2B,WAAW,sCAAsC,iCAAiC,wBAAwB,sCAAsC,2BAA2B,2BAA2B,4BAA4B,6BAA6B,0CAA0C,yCAAyC,uCAAuC,sCAAsC,kCAAkC,WAAW,+BAA+B,wBAAwB,yBAAyB,WAAW,2CAA2C,8BAA8B,+BAA+B,WAAW;AAC1nD,iBAAiB,IAAI;AACrB;AACA;AACA,6CAA6C;AAC7C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,+CAA+C;AACxD,MAAM;AACN;AACA,0BAA0B,kDAAkD;AAC5E,mBAAmB,qBAAqB;AACxC,sBAAsB,qBAAqB;AAC3C,iCAAiC,8DAA8D;AAC/F,iCAAiC,uEAAuE;AACxG,+BAA+B,qEAAqE;AACpG,kCAAkC,+DAA+D;AACjG,iCAAiC,uEAAuE;AACxG,mCAAmC,yEAAyE;AAC5G,gCAAgC,sEAAsE;AACtG,+BAA+B,4DAA4D;AAC3F;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,2ukB;;;;;;;;;;;;ACxL3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,4BAA4B,gBAAgB,IAAI;AACzD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA,+HAA+H,8BAA8B;AAC7J,yDAAyD,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,0BAA0B,8BAA8B,2BAA2B,gCAAgC,mCAAmC,wEAAwE,WAAW;AAC1jB,iBAAiB,IAAI;AACrB;AACA;AACA,gDAAgD;AAChD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,wBAAwB,qBAAqB;AAC7C,sBAAsB,qBAAqB;AAC3C;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,uoN;;;;;;;;;;;;ACvF3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA,qCAAqC,iCAAiC,EAAE;AACxE,qCAAqC,kCAAkC,EAAE;AACzE;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA,sDAAsD,gCAAgC,EAAE;AACxF;AACA;AACA,wDAAwD,+BAA+B,EAAE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA,sMAAsM,uBAAuB,ifAAif,eAAe;AAC7tB,2DAA2D,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,0BAA0B,2BAA2B,8BAA8B,2BAA2B,gCAAgC,WAAW,wCAAwC,iCAAiC,4BAA4B,2BAA2B,kCAAkC,uCAAuC,0BAA0B,WAAW,kDAAkD,0BAA0B,+BAA+B,2BAA2B,+BAA+B,uCAAuC,oCAAoC,+BAA+B,iCAAiC,8BAA8B,WAAW,8DAA8D,4BAA4B,WAAW,yDAAyD,0BAA0B,WAAW,6CAA6C,iCAAiC,0BAA0B,2BAA2B,wBAAwB,iCAAiC,wCAAwC,wEAAwE,+BAA+B,mCAAmC,WAAW,4DAA4D,0BAA0B,WAAW;AACrrD,iBAAiB,IAAI;AACrB;AACA;AACA,kDAAkD;AAClD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,2rT;;;;;;;;;;;;AChF3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA,0lBAA0lB,qBAAqB;AAC/mB,mDAAmD,0CAA0C,wCAAwC,qCAAqC,oCAAoC,gCAAgC,4BAA4B,sCAAsC,2BAA2B,2BAA2B,8BAA8B,2BAA2B,gCAAgC,WAAW,gCAAgC,iCAAiC,4BAA4B,2BAA2B,kCAAkC,WAAW,uCAAuC,4BAA4B,2BAA2B,0BAA0B,mCAAmC,qCAAqC,WAAW,kCAAkC,4BAA4B,0BAA0B,mCAAmC,qCAAqC,2CAA2C,WAAW,iCAAiC,iCAAiC,0BAA0B,cAAc,sBAAsB,UAAU,0CAA0C,kCAAkC,mCAAmC,qCAAqC,2CAA2C,WAAW,wHAAwH,+BAA+B,WAAW;AACtgD,iBAAiB,IAAI;AACrB;AACA;AACA,2CAA2C;AAC3C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,0BAA0B,+CAA+C;AACzE,oBAAoB,uEAAuE;AAC3F,wBAAwB,qEAAqE;AAC7F,+BAA+B,4DAA4D;AAC3F;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,mpW;;;;;;;;;;;;AC9F3C;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,m9F;;;;;;;;;;;;ACxD3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,+gF;;;;;;;;;;;;AC1C3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,WAAW;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,wCAAwC,WAAW;AACnD;AACA,CAAC;AACD;;AAEA,2CAA2C,m6iB;;;;;;;;;;;;AClS3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,mDAAmD,WAAW;AAC9D;AACA,CAAC;AACD;;AAEA,2CAA2C,+nC;;;;;;;;;;;;ACrB3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,kDAAkD,WAAW;AAC7D;AACA,CAAC;AACD;;AAEA,2CAA2C,+lZ;;;;;;;;;;;;ACzJ3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,2kG;;;;;;;;;;;;ACxD3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAA0B;AACnC;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,moB;;;;;;;;;;;;ACjB3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,wBAAwB,EAAE;AAC/E,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,8CAA8C;AAC9C,SAAS,2BAA2B;AACpC,MAAM;AACN;AACA,6BAA6B,kDAAkD;AAC/E,8BAA8B,mDAAmD;AACjF,4BAA4B,iDAAiD;AAC7E,gCAAgC,qDAAqD;AACrF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,m9M;;;;;;;;;;;;ACzE3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA,0BAA0B,aAAa,EAAE;AACzC;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,mtI;;;;;;;;;;;;AC5C3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,4CAA4C,oCAAoC;AAChF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA,yDAAyD,sCAAsC,EAAE;AACjG;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,6CAA6C,OAAO;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,6BAA6B,EAAE;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,0CAA0C;AAC1C,SAAS,wBAAwB;AACjC,SAAS,kCAAkC;AAC3C,MAAM;AACN;AACA,qBAAqB,qBAAqB;AAC1C,sBAAsB,qBAAqB;AAC3C;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,m4zC;;;;;;;;;;;;ACjc3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,mDAAmD,wCAAwC,iCAAiC,4BAA4B,0BAA0B,2BAA2B,+BAA+B,sCAAsC,WAAW,kCAAkC,8BAA8B,sBAAsB,qBAAqB,WAAW,yDAAyD,2BAA2B,WAAW;AAClf;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,2CAA2C;AAC3C,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,6CAA6C;AACtD,SAAS,+CAA+C;AACxD,MAAM;AACN;AACA,0BAA0B,wDAAwD;AAClF,gCAAgC,+DAA+D;AAC/F,+BAA+B,6DAA6D;AAC5F,oBAAoB,qDAAqD;AACzE,2BAA2B,sBAAsB;AACjD,0BAA0B,sBAAsB;AAChD,oBAAoB,4DAA4D;AAChF;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,usN;;;;;;;;;;;;AC7E3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,IAAI;AACrB;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,m3B;;;;;;;;;;;;ACvB3C;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,8BAA8B,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2GAA2G,0CAA0C,EAAE;AACvJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,OAAO;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,wBAAwB,EAAE;AAC3E;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,yDAAyD,2BAA2B,WAAW,0CAA0C,4BAA4B,WAAW,8CAA8C,mCAAmC,8BAA8B,iCAAiC,6BAA6B,2BAA2B,0BAA0B,2BAA2B,8BAA8B,wCAAwC,2BAA2B,WAAW,gFAAgF,2BAA2B,WAAW,yFAAyF,mCAAmC,0BAA0B,2BAA2B,iCAAiC,4BAA4B,kCAAkC,sCAAsC,8BAA8B,WAAW,oDAAoD,yCAAyC,yBAAyB,WAAW,sGAAsG,oCAAoC,WAAW;AACpwC,iBAAiB,IAAI;AACrB;AACA;AACA,gDAAgD;AAChD,SAAS,2BAA2B;AACpC,SAAS,wBAAwB;AACjC,SAAS,6CAA6C;AACtD,SAAS,+CAA+C;AACxD,MAAM;AACN;AACA,mBAAmB,qBAAqB;AACxC,yBAAyB,0DAA0D;AACnF,qBAAqB,8CAA8C;AACnE;AACA;AACA,CAAC;AACD;;AAEA,2CAA2C,28T;;;;;;;;;;;ACrG3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA","file":"vendor.js","sourcesContent":["import { NgModule } from '@angular/core';\nimport { AgmMap } from './directives/map';\nimport { AgmCircle } from './directives/circle';\nimport { AgmInfoWindow } from './directives/info-window';\nimport { AgmMarker } from './directives/marker';\nimport { AgmPolygon } from './directives/polygon';\nimport { AgmPolyline } from './directives/polyline';\nimport { AgmPolylinePoint } from './directives/polyline-point';\nimport { AgmKmlLayer } from './directives/kml-layer';\nimport { AgmDataLayer } from './directives/data-layer';\nimport { LazyMapsAPILoader } from './services/maps-api-loader/lazy-maps-api-loader';\nimport { LAZY_MAPS_API_CONFIG } from './services/maps-api-loader/lazy-maps-api-loader';\nimport { MapsAPILoader } from './services/maps-api-loader/maps-api-loader';\nimport { BROWSER_GLOBALS_PROVIDERS } from './utils/browser-globals';\n/**\n * @internal\n */\nexport function coreDirectives() {\n return [\n AgmMap, AgmMarker, AgmInfoWindow, AgmCircle,\n AgmPolygon, AgmPolyline, AgmPolylinePoint, AgmKmlLayer,\n AgmDataLayer\n ];\n}\n/**\n * The angular-google-maps core module. Contains all Directives/Services/Pipes\n * of the core module. Please use `AgmCoreModule.forRoot()` in your app module.\n */\nvar AgmCoreModule = (function () {\n function AgmCoreModule() {\n }\n /**\n * Please use this method when you register the module at the root level.\n */\n AgmCoreModule.forRoot = function (lazyMapsAPILoaderConfig) {\n return {\n ngModule: AgmCoreModule,\n providers: BROWSER_GLOBALS_PROVIDERS.concat([\n { provide: MapsAPILoader, useClass: LazyMapsAPILoader },\n { provide: LAZY_MAPS_API_CONFIG, useValue: lazyMapsAPILoaderConfig }\n ]),\n };\n };\n return AgmCoreModule;\n}());\nexport { AgmCoreModule };\nAgmCoreModule.decorators = [\n { type: NgModule, args: [{ declarations: coreDirectives(), exports: coreDirectives() },] },\n];\n/** @nocollapse */\nAgmCoreModule.ctorParameters = function () { return []; };\n//# sourceMappingURL=core.module.js.map","export { AgmMap } from './directives/map';\nexport { AgmCircle } from './directives/circle';\nexport { AgmInfoWindow } from './directives/info-window';\nexport { AgmKmlLayer } from './directives/kml-layer';\nexport { AgmDataLayer } from './directives/data-layer';\nexport { AgmMarker } from './directives/marker';\nexport { AgmPolygon } from './directives/polygon';\nexport { AgmPolyline } from './directives/polyline';\nexport { AgmPolylinePoint } from './directives/polyline-point';\n//# sourceMappingURL=directives.js.map","import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { CircleManager } from '../services/managers/circle-manager';\nvar AgmCircle = (function () {\n function AgmCircle(_manager) {\n this._manager = _manager;\n /**\n * Indicates whether this Circle handles mouse events. Defaults to true.\n */\n this.clickable = true;\n /**\n * If set to true, the user can drag this circle over the map. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n this.draggable = false;\n /**\n * If set to true, the user can edit this circle by dragging the control points shown at\n * the center and around the circumference of the circle. Defaults to false.\n */\n this.editable = false;\n /**\n * The radius in meters on the Earth's surface.\n */\n this.radius = 0;\n /**\n * The stroke position. Defaults to CENTER.\n * This property is not supported on Internet Explorer 8 and earlier.\n */\n this.strokePosition = 'CENTER';\n /**\n * The stroke width in pixels.\n */\n this.strokeWeight = 0;\n /**\n * Whether this circle is visible on the map. Defaults to true.\n */\n this.visible = true;\n /**\n * This event is fired when the circle's center is changed.\n */\n this.centerChange = new EventEmitter();\n /**\n * This event emitter gets emitted when the user clicks on the circle.\n */\n this.circleClick = new EventEmitter();\n /**\n * This event emitter gets emitted when the user clicks on the circle.\n */\n this.circleDblClick = new EventEmitter();\n /**\n * This event is repeatedly fired while the user drags the circle.\n */\n this.drag = new EventEmitter();\n /**\n * This event is fired when the user stops dragging the circle.\n */\n this.dragEnd = new EventEmitter();\n /**\n * This event is fired when the user starts dragging the circle.\n */\n this.dragStart = new EventEmitter();\n /**\n * This event is fired when the DOM mousedown event is fired on the circle.\n */\n this.mouseDown = new EventEmitter();\n /**\n * This event is fired when the DOM mousemove event is fired on the circle.\n */\n this.mouseMove = new EventEmitter();\n /**\n * This event is fired on circle mouseout.\n */\n this.mouseOut = new EventEmitter();\n /**\n * This event is fired on circle mouseover.\n */\n this.mouseOver = new EventEmitter();\n /**\n * This event is fired when the DOM mouseup event is fired on the circle.\n */\n this.mouseUp = new EventEmitter();\n /**\n * This event is fired when the circle's radius is changed.\n */\n this.radiusChange = new EventEmitter();\n /**\n * This event is fired when the circle is right-clicked on.\n */\n this.rightClick = new EventEmitter();\n this._circleAddedToManager = false;\n this._eventSubscriptions = [];\n }\n /** @internal */\n AgmCircle.prototype.ngOnInit = function () {\n this._manager.addCircle(this);\n this._circleAddedToManager = true;\n this._registerEventListeners();\n };\n /** @internal */\n AgmCircle.prototype.ngOnChanges = function (changes) {\n if (!this._circleAddedToManager) {\n return;\n }\n if (changes['latitude'] || changes['longitude']) {\n this._manager.setCenter(this);\n }\n if (changes['editable']) {\n this._manager.setEditable(this);\n }\n if (changes['draggable']) {\n this._manager.setDraggable(this);\n }\n if (changes['visible']) {\n this._manager.setVisible(this);\n }\n if (changes['radius']) {\n this._manager.setRadius(this);\n }\n this._updateCircleOptionsChanges(changes);\n };\n AgmCircle.prototype._updateCircleOptionsChanges = function (changes) {\n var options = {};\n var optionKeys = Object.keys(changes).filter(function (k) { return AgmCircle._mapOptions.indexOf(k) !== -1; });\n optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n if (optionKeys.length > 0) {\n this._manager.setOptions(this, options);\n }\n };\n AgmCircle.prototype._registerEventListeners = function () {\n var _this = this;\n var events = new Map();\n events.set('center_changed', this.centerChange);\n events.set('click', this.circleClick);\n events.set('dblclick', this.circleDblClick);\n events.set('drag', this.drag);\n events.set('dragend', this.dragEnd);\n events.set('dragStart', this.dragStart);\n events.set('mousedown', this.mouseDown);\n events.set('mousemove', this.mouseMove);\n events.set('mouseout', this.mouseOut);\n events.set('mouseover', this.mouseOver);\n events.set('mouseup', this.mouseUp);\n events.set('radius_changed', this.radiusChange);\n events.set('rightclick', this.rightClick);\n events.forEach(function (eventEmitter, eventName) {\n _this._eventSubscriptions.push(_this._manager.createEventObservable(eventName, _this).subscribe(function (value) {\n switch (eventName) {\n case 'radius_changed':\n _this._manager.getRadius(_this).then(function (radius) { return eventEmitter.emit(radius); });\n break;\n case 'center_changed':\n _this._manager.getCenter(_this).then(function (center) {\n return eventEmitter.emit({ lat: center.lat(), lng: center.lng() });\n });\n break;\n default:\n eventEmitter.emit({ coords: { lat: value.latLng.lat(), lng: value.latLng.lng() } });\n }\n }));\n });\n };\n /** @internal */\n AgmCircle.prototype.ngOnDestroy = function () {\n this._eventSubscriptions.forEach(function (s) { s.unsubscribe(); });\n this._eventSubscriptions = null;\n this._manager.removeCircle(this);\n };\n /**\n * Gets the LatLngBounds of this Circle.\n */\n AgmCircle.prototype.getBounds = function () { return this._manager.getBounds(this); };\n AgmCircle.prototype.getCenter = function () { return this._manager.getCenter(this); };\n return AgmCircle;\n}());\nexport { AgmCircle };\nAgmCircle._mapOptions = [\n 'fillColor', 'fillOpacity', 'strokeColor', 'strokeOpacity', 'strokePosition', 'strokeWeight',\n 'visible', 'zIndex', 'clickable'\n];\nAgmCircle.decorators = [\n { type: Directive, args: [{\n selector: 'agm-circle'\n },] },\n];\n/** @nocollapse */\nAgmCircle.ctorParameters = function () { return [\n { type: CircleManager, },\n]; };\nAgmCircle.propDecorators = {\n 'latitude': [{ type: Input },],\n 'longitude': [{ type: Input },],\n 'clickable': [{ type: Input },],\n 'draggable': [{ type: Input, args: ['circleDraggable',] },],\n 'editable': [{ type: Input },],\n 'fillColor': [{ type: Input },],\n 'fillOpacity': [{ type: Input },],\n 'radius': [{ type: Input },],\n 'strokeColor': [{ type: Input },],\n 'strokeOpacity': [{ type: Input },],\n 'strokePosition': [{ type: Input },],\n 'strokeWeight': [{ type: Input },],\n 'visible': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'centerChange': [{ type: Output },],\n 'circleClick': [{ type: Output },],\n 'circleDblClick': [{ type: Output },],\n 'drag': [{ type: Output },],\n 'dragEnd': [{ type: Output },],\n 'dragStart': [{ type: Output },],\n 'mouseDown': [{ type: Output },],\n 'mouseMove': [{ type: Output },],\n 'mouseOut': [{ type: Output },],\n 'mouseOver': [{ type: Output },],\n 'mouseUp': [{ type: Output },],\n 'radiusChange': [{ type: Output },],\n 'rightClick': [{ type: Output },],\n};\n//# sourceMappingURL=circle.js.map","import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { DataLayerManager } from './../services/managers/data-layer-manager';\nvar layerId = 0;\n/**\n * AgmDataLayer enables the user to add data layers to the map.\n *\n * ### Example\n * ```typescript\n * import { Component } from 'angular2/core';\n * import { AgmMap, AgmDataLayer } from\n * 'angular-google-maps/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * directives: [AgmMap, AgmDataLayer],\n * styles: [`\n * .agm-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * \t <agm-data-layer [geoJson]=\"geoJsonObject\" (layerClick)=\"clicked($event)\" [style]=\"styleFunc\">\n * \t </agm-data-layer>\n * </agm-map>\n * `\n * })\n * export class MyMapCmp {\n * lat: number = -25.274449;\n * lng: number = 133.775060;\n * zoom: number = 5;\n *\n * clicked(clickEvent) {\n * console.log(clickEvent);\n * }\n *\n * styleFunc(feature) {\n * return ({\n * clickable: false,\n * fillColor: feature.getProperty('color'),\n * strokeWeight: 1\n * });\n * }\n *\n * geoJsonObject: Object = {\n * \"type\": \"FeatureCollection\",\n * \"features\": [\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"G\",\n * \"color\": \"blue\",\n * \"rank\": \"7\",\n * \"ascii\": \"71\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [123.61, -22.14], [122.38, -21.73], [121.06, -21.69], [119.66, -22.22], [119.00, -23.40],\n * [118.65, -24.76], [118.43, -26.07], [118.78, -27.56], [119.22, -28.57], [120.23, -29.49],\n * [121.77, -29.87], [123.57, -29.64], [124.45, -29.03], [124.71, -27.95], [124.80, -26.70],\n * [124.80, -25.60], [123.61, -25.64], [122.56, -25.64], [121.72, -25.72], [121.81, -26.62],\n * [121.86, -26.98], [122.60, -26.90], [123.57, -27.05], [123.57, -27.68], [123.35, -28.18],\n * [122.51, -28.38], [121.77, -28.26], [121.02, -27.91], [120.49, -27.21], [120.14, -26.50],\n * [120.10, -25.64], [120.27, -24.52], [120.67, -23.68], [121.72, -23.32], [122.43, -23.48],\n * [123.04, -24.04], [124.54, -24.28], [124.58, -23.20], [123.61, -22.14]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"o\",\n * \"color\": \"red\",\n * \"rank\": \"15\",\n * \"ascii\": \"111\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [128.84, -25.76], [128.18, -25.60], [127.96, -25.52], [127.88, -25.52], [127.70, -25.60],\n * [127.26, -25.79], [126.60, -26.11], [126.16, -26.78], [126.12, -27.68], [126.21, -28.42],\n * [126.69, -29.49], [127.74, -29.80], [128.80, -29.72], [129.41, -29.03], [129.72, -27.95],\n * [129.68, -27.21], [129.33, -26.23], [128.84, -25.76]\n * ],\n * [\n * [128.45, -27.44], [128.32, -26.94], [127.70, -26.82], [127.35, -27.05], [127.17, -27.80],\n * [127.57, -28.22], [128.10, -28.42], [128.49, -27.80], [128.45, -27.44]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"o\",\n * \"color\": \"yellow\",\n * \"rank\": \"15\",\n * \"ascii\": \"111\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [131.87, -25.76], [131.35, -26.07], [130.95, -26.78], [130.82, -27.64], [130.86, -28.53],\n * [131.26, -29.22], [131.92, -29.76], [132.45, -29.87], [133.06, -29.76], [133.72, -29.34],\n * [134.07, -28.80], [134.20, -27.91], [134.07, -27.21], [133.81, -26.31], [133.37, -25.83],\n * [132.71, -25.64], [131.87, -25.76]\n * ],\n * [\n * [133.15, -27.17], [132.71, -26.86], [132.09, -26.90], [131.74, -27.56], [131.79, -28.26],\n * [132.36, -28.45], [132.93, -28.34], [133.15, -27.76], [133.15, -27.17]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"g\",\n * \"color\": \"blue\",\n * \"rank\": \"7\",\n * \"ascii\": \"103\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [138.12, -25.04], [136.84, -25.16], [135.96, -25.36], [135.26, -25.99], [135, -26.90],\n * [135.04, -27.91], [135.26, -28.88], [136.05, -29.45], [137.02, -29.49], [137.81, -29.49],\n * [137.94, -29.99], [137.90, -31.20], [137.85, -32.24], [136.88, -32.69], [136.45, -32.36],\n * [136.27, -31.80], [134.95, -31.84], [135.17, -32.99], [135.52, -33.43], [136.14, -33.76],\n * [137.06, -33.83], [138.12, -33.65], [138.86, -33.21], [139.30, -32.28], [139.30, -31.24],\n * [139.30, -30.14], [139.21, -28.96], [139.17, -28.22], [139.08, -27.41], [139.08, -26.47],\n * [138.99, -25.40], [138.73, -25.00], [138.12, -25.04]\n * ],\n * [\n * [137.50, -26.54], [136.97, -26.47], [136.49, -26.58], [136.31, -27.13], [136.31, -27.72],\n * [136.58, -27.99], [137.50, -28.03], [137.68, -27.68], [137.59, -26.78], [137.50, -26.54]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"l\",\n * \"color\": \"green\",\n * \"rank\": \"12\",\n * \"ascii\": \"108\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [140.14, -21.04], [140.31, -29.42], [141.67, -29.49], [141.59, -20.92], [140.14, -21.04]\n * ]\n * ]\n * }\n * },\n * {\n * \"type\": \"Feature\",\n * \"properties\": {\n * \"letter\": \"e\",\n * \"color\": \"red\",\n * \"rank\": \"5\",\n * \"ascii\": \"101\"\n * },\n * \"geometry\": {\n * \"type\": \"Polygon\",\n * \"coordinates\": [\n * [\n * [144.14, -27.41], [145.67, -27.52], [146.86, -27.09], [146.82, -25.64], [146.25, -25.04],\n * [145.45, -24.68], [144.66, -24.60], [144.09, -24.76], [143.43, -25.08], [142.99, -25.40],\n * [142.64, -26.03], [142.64, -27.05], [142.64, -28.26], [143.30, -29.11], [144.18, -29.57],\n * [145.41, -29.64], [146.46, -29.19], [146.64, -28.72], [146.82, -28.14], [144.84, -28.42],\n * [144.31, -28.26], [144.14, -27.41]\n * ],\n * [\n * [144.18, -26.39], [144.53, -26.58], [145.19, -26.62], [145.72, -26.35], [145.81, -25.91],\n * [145.41, -25.68], [144.97, -25.68], [144.49, -25.64], [144, -25.99], [144.18, -26.39]\n * ]\n * ]\n * }\n * }\n * ]\n * };\n * }\n * ```\n */\nvar AgmDataLayer = (function () {\n function AgmDataLayer(_manager) {\n this._manager = _manager;\n this._addedToManager = false;\n this._id = (layerId++).toString();\n this._subscriptions = [];\n /**\n * This event is fired when a feature in the layer is clicked.\n */\n this.layerClick = new EventEmitter();\n /**\n * The geoJson to be displayed\n */\n this.geoJson = null;\n }\n AgmDataLayer.prototype.ngOnInit = function () {\n if (this._addedToManager) {\n return;\n }\n this._manager.addDataLayer(this);\n this._addedToManager = true;\n this._addEventListeners();\n };\n AgmDataLayer.prototype._addEventListeners = function () {\n var _this = this;\n var listeners = [\n { name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },\n ];\n listeners.forEach(function (obj) {\n var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n _this._subscriptions.push(os);\n });\n };\n /** @internal */\n AgmDataLayer.prototype.id = function () { return this._id; };\n /** @internal */\n AgmDataLayer.prototype.toString = function () { return \"AgmDataLayer-\" + this._id.toString(); };\n /** @internal */\n AgmDataLayer.prototype.ngOnDestroy = function () {\n this._manager.deleteDataLayer(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n /** @internal */\n AgmDataLayer.prototype.ngOnChanges = function (changes) {\n var _this = this;\n if (!this._addedToManager) {\n return;\n }\n var geoJsonChange = changes['geoJson'];\n if (geoJsonChange) {\n this._manager.updateGeoJson(this, geoJsonChange.currentValue);\n }\n var dataOptions = {};\n AgmDataLayer._dataOptionsAttributes.forEach(function (k) { return dataOptions[k] = changes.hasOwnProperty(k) ? changes[k].currentValue : _this[k]; });\n this._manager.setDataOptions(this, dataOptions);\n };\n return AgmDataLayer;\n}());\nexport { AgmDataLayer };\nAgmDataLayer._dataOptionsAttributes = ['style'];\nAgmDataLayer.decorators = [\n { type: Directive, args: [{\n selector: 'agm-data-layer'\n },] },\n];\n/** @nocollapse */\nAgmDataLayer.ctorParameters = function () { return [\n { type: DataLayerManager, },\n]; };\nAgmDataLayer.propDecorators = {\n 'layerClick': [{ type: Output },],\n 'geoJson': [{ type: Input },],\n 'style': [{ type: Input },],\n};\n//# sourceMappingURL=data-layer.js.map","import { Component, ElementRef, EventEmitter, Output, Input } from '@angular/core';\nimport { InfoWindowManager } from '../services/managers/info-window-manager';\nvar infoWindowId = 0;\n/**\n * AgmInfoWindow renders a info window inside a {@link AgmMarker} or standalone.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n * <agm-info-window [disableAutoPan]=\"true\">\n * Hi, this is the content of the <strong>info window</strong>\n * </agm-info-window>\n * </agm-marker>\n * </agm-map>\n * `\n * })\n * ```\n */\nvar AgmInfoWindow = (function () {\n function AgmInfoWindow(_infoWindowManager, _el) {\n this._infoWindowManager = _infoWindowManager;\n this._el = _el;\n /**\n * Sets the open state for the InfoWindow. You can also call the open() and close() methods.\n */\n this.isOpen = false;\n /**\n * Emits an event when the info window is closed.\n */\n this.infoWindowClose = new EventEmitter();\n this._infoWindowAddedToManager = false;\n this._id = (infoWindowId++).toString();\n }\n AgmInfoWindow.prototype.ngOnInit = function () {\n this.content = this._el.nativeElement.querySelector('.agm-info-window-content');\n this._infoWindowManager.addInfoWindow(this);\n this._infoWindowAddedToManager = true;\n this._updateOpenState();\n this._registerEventListeners();\n };\n /** @internal */\n AgmInfoWindow.prototype.ngOnChanges = function (changes) {\n if (!this._infoWindowAddedToManager) {\n return;\n }\n if ((changes['latitude'] || changes['longitude']) && typeof this.latitude === 'number' &&\n typeof this.longitude === 'number') {\n this._infoWindowManager.setPosition(this);\n }\n if (changes['zIndex']) {\n this._infoWindowManager.setZIndex(this);\n }\n if (changes['isOpen']) {\n this._updateOpenState();\n }\n this._setInfoWindowOptions(changes);\n };\n AgmInfoWindow.prototype._registerEventListeners = function () {\n var _this = this;\n this._infoWindowManager.createEventObservable('closeclick', this).subscribe(function () {\n _this.isOpen = false;\n _this.infoWindowClose.emit();\n });\n };\n AgmInfoWindow.prototype._updateOpenState = function () {\n this.isOpen ? this.open() : this.close();\n };\n AgmInfoWindow.prototype._setInfoWindowOptions = function (changes) {\n var options = {};\n var optionKeys = Object.keys(changes).filter(function (k) { return AgmInfoWindow._infoWindowOptionsInputs.indexOf(k) !== -1; });\n optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n this._infoWindowManager.setOptions(this, options);\n };\n /**\n * Opens the info window.\n */\n AgmInfoWindow.prototype.open = function () { return this._infoWindowManager.open(this); };\n /**\n * Closes the info window.\n */\n AgmInfoWindow.prototype.close = function () {\n var _this = this;\n return this._infoWindowManager.close(this).then(function () { _this.infoWindowClose.emit(); });\n };\n /** @internal */\n AgmInfoWindow.prototype.id = function () { return this._id; };\n /** @internal */\n AgmInfoWindow.prototype.toString = function () { return 'AgmInfoWindow-' + this._id.toString(); };\n /** @internal */\n AgmInfoWindow.prototype.ngOnDestroy = function () { this._infoWindowManager.deleteInfoWindow(this); };\n return AgmInfoWindow;\n}());\nexport { AgmInfoWindow };\nAgmInfoWindow._infoWindowOptionsInputs = ['disableAutoPan', 'maxWidth'];\nAgmInfoWindow.decorators = [\n { type: Component, args: [{\n selector: 'agm-info-window',\n template: \"<div class='agm-info-window-content'>\\n <ng-content></ng-content>\\n </div>\\n \"\n },] },\n];\n/** @nocollapse */\nAgmInfoWindow.ctorParameters = function () { return [\n { type: InfoWindowManager, },\n { type: ElementRef, },\n]; };\nAgmInfoWindow.propDecorators = {\n 'latitude': [{ type: Input },],\n 'longitude': [{ type: Input },],\n 'disableAutoPan': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'maxWidth': [{ type: Input },],\n 'isOpen': [{ type: Input },],\n 'infoWindowClose': [{ type: Output },],\n};\n//# sourceMappingURL=info-window.js.map","import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { KmlLayerManager } from './../services/managers/kml-layer-manager';\nvar layerId = 0;\nvar AgmKmlLayer = (function () {\n function AgmKmlLayer(_manager) {\n this._manager = _manager;\n this._addedToManager = false;\n this._id = (layerId++).toString();\n this._subscriptions = [];\n /**\n * If true, the layer receives mouse events. Default value is true.\n */\n this.clickable = true;\n /**\n * By default, the input map is centered and zoomed to the bounding box of the contents of the\n * layer.\n * If this option is set to true, the viewport is left unchanged, unless the map's center and zoom\n * were never set.\n */\n this.preserveViewport = false;\n /**\n * Whether to render the screen overlays. Default true.\n */\n this.screenOverlays = true;\n /**\n * Suppress the rendering of info windows when layer features are clicked.\n */\n this.suppressInfoWindows = false;\n /**\n * The URL of the KML document to display.\n */\n this.url = null;\n /**\n * The z-index of the layer.\n */\n this.zIndex = null;\n /**\n * This event is fired when a feature in the layer is clicked.\n */\n this.layerClick = new EventEmitter();\n /**\n * This event is fired when the KML layers default viewport has changed.\n */\n this.defaultViewportChange = new EventEmitter();\n /**\n * This event is fired when the KML layer has finished loading.\n * At this point it is safe to read the status property to determine if the layer loaded\n * successfully.\n */\n this.statusChange = new EventEmitter();\n }\n AgmKmlLayer.prototype.ngOnInit = function () {\n if (this._addedToManager) {\n return;\n }\n this._manager.addKmlLayer(this);\n this._addedToManager = true;\n this._addEventListeners();\n };\n AgmKmlLayer.prototype.ngOnChanges = function (changes) {\n if (!this._addedToManager) {\n return;\n }\n this._updatePolygonOptions(changes);\n };\n AgmKmlLayer.prototype._updatePolygonOptions = function (changes) {\n var options = Object.keys(changes)\n .filter(function (k) { return AgmKmlLayer._kmlLayerOptions.indexOf(k) !== -1; })\n .reduce(function (obj, k) {\n obj[k] = changes[k].currentValue;\n return obj;\n }, {});\n if (Object.keys(options).length > 0) {\n this._manager.setOptions(this, options);\n }\n };\n AgmKmlLayer.prototype._addEventListeners = function () {\n var _this = this;\n var listeners = [\n { name: 'click', handler: function (ev) { return _this.layerClick.emit(ev); } },\n { name: 'defaultviewport_changed', handler: function () { return _this.defaultViewportChange.emit(); } },\n { name: 'status_changed', handler: function () { return _this.statusChange.emit(); } },\n ];\n listeners.forEach(function (obj) {\n var os = _this._manager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n _this._subscriptions.push(os);\n });\n };\n /** @internal */\n AgmKmlLayer.prototype.id = function () { return this._id; };\n /** @internal */\n AgmKmlLayer.prototype.toString = function () { return \"AgmKmlLayer-\" + this._id.toString(); };\n /** @internal */\n AgmKmlLayer.prototype.ngOnDestroy = function () {\n this._manager.deleteKmlLayer(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n return AgmKmlLayer;\n}());\nexport { AgmKmlLayer };\nAgmKmlLayer._kmlLayerOptions = ['clickable', 'preserveViewport', 'screenOverlays', 'suppressInfoWindows', 'url', 'zIndex'];\nAgmKmlLayer.decorators = [\n { type: Directive, args: [{\n selector: 'agm-kml-layer'\n },] },\n];\n/** @nocollapse */\nAgmKmlLayer.ctorParameters = function () { return [\n { type: KmlLayerManager, },\n]; };\nAgmKmlLayer.propDecorators = {\n 'clickable': [{ type: Input },],\n 'preserveViewport': [{ type: Input },],\n 'screenOverlays': [{ type: Input },],\n 'suppressInfoWindows': [{ type: Input },],\n 'url': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'layerClick': [{ type: Output },],\n 'defaultViewportChange': [{ type: Output },],\n 'statusChange': [{ type: Output },],\n};\n//# sourceMappingURL=kml-layer.js.map","import { Component, ElementRef, EventEmitter, Input, Output } from '@angular/core';\nimport { GoogleMapsAPIWrapper } from '../services/google-maps-api-wrapper';\nimport { CircleManager } from '../services/managers/circle-manager';\nimport { InfoWindowManager } from '../services/managers/info-window-manager';\nimport { MarkerManager } from '../services/managers/marker-manager';\nimport { PolygonManager } from '../services/managers/polygon-manager';\nimport { PolylineManager } from '../services/managers/polyline-manager';\nimport { KmlLayerManager } from './../services/managers/kml-layer-manager';\nimport { DataLayerManager } from './../services/managers/data-layer-manager';\n/**\n * AgmMap renders a Google Map.\n * **Important note**: To be able see a map in the browser, you have to define a height for the\n * element `agm-map`.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * agm-map {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * </agm-map>\n * `\n * })\n * ```\n */\nvar AgmMap = (function () {\n function AgmMap(_elem, _mapsWrapper) {\n this._elem = _elem;\n this._mapsWrapper = _mapsWrapper;\n /**\n * The longitude that defines the center of the map.\n */\n this.longitude = 0;\n /**\n * The latitude that defines the center of the map.\n */\n this.latitude = 0;\n /**\n * The zoom level of the map. The default zoom level is 8.\n */\n this.zoom = 8;\n /**\n * Enables/disables if map is draggable.\n */\n // tslint:disable-next-line:no-input-rename\n this.draggable = true;\n /**\n * Enables/disables zoom and center on double click. Enabled by default.\n */\n this.disableDoubleClickZoom = false;\n /**\n * Enables/disables all default UI of the Google map. Please note: When the map is created, this\n * value cannot get updated.\n */\n this.disableDefaultUI = false;\n /**\n * If false, disables scrollwheel zooming on the map. The scrollwheel is enabled by default.\n */\n this.scrollwheel = true;\n /**\n * If false, prevents the map from being controlled by the keyboard. Keyboard shortcuts are\n * enabled by default.\n */\n this.keyboardShortcuts = true;\n /**\n * The enabled/disabled state of the Zoom control.\n */\n this.zoomControl = true;\n /**\n * Styles to apply to each of the default map types. Note that for Satellite/Hybrid and Terrain\n * modes, these styles will only apply to labels and geometry.\n */\n this.styles = [];\n /**\n * When true and the latitude and/or longitude values changes, the Google Maps panTo method is\n * used to\n * center the map. See: https://developers.google.com/maps/documentation/javascript/reference#Map\n */\n this.usePanning = false;\n /**\n * The initial enabled/disabled state of the Street View Pegman control.\n * This control is part of the default UI, and should be set to false when displaying a map type\n * on which the Street View road overlay should not appear (e.g. a non-Earth map type).\n */\n this.streetViewControl = true;\n /**\n * Sets the viewport to contain the given bounds.\n */\n this.fitBounds = null;\n /**\n * The initial enabled/disabled state of the Scale control. This is disabled by default.\n */\n this.scaleControl = false;\n /**\n * The initial enabled/disabled state of the Map type control.\n */\n this.mapTypeControl = false;\n /**\n * The initial enabled/disabled state of the Pan control.\n */\n this.panControl = false;\n /**\n * The initial enabled/disabled state of the Rotate control.\n */\n this.rotateControl = false;\n /**\n * The initial enabled/disabled state of the Fullscreen control.\n */\n this.fullscreenControl = false;\n /**\n * The map mapTypeId. Defaults to 'roadmap'.\n */\n this.mapTypeId = 'roadmap';\n /**\n * When false, map icons are not clickable. A map icon represents a point of interest,\n * also known as a POI. By default map icons are clickable.\n */\n this.clickableIcons = true;\n /**\n * This setting controls how gestures on the map are handled.\n * Allowed values:\n * - 'cooperative' (Two-finger touch gestures pan and zoom the map. One-finger touch gestures are not handled by the map.)\n * - 'greedy' (All touch gestures pan or zoom the map.)\n * - 'none' (The map cannot be panned or zoomed by user gestures.)\n * - 'auto' [default] (Gesture handling is either cooperative or greedy, depending on whether the page is scrollable or not.\n */\n this.gestureHandling = 'auto';\n this._observableSubscriptions = [];\n /**\n * This event emitter gets emitted when the user clicks on the map (but not when they click on a\n * marker or infoWindow).\n */\n this.mapClick = new EventEmitter();\n /**\n * This event emitter gets emitted when the user right-clicks on the map (but not when they click\n * on a marker or infoWindow).\n */\n this.mapRightClick = new EventEmitter();\n /**\n * This event emitter gets emitted when the user double-clicks on the map (but not when they click\n * on a marker or infoWindow).\n */\n this.mapDblClick = new EventEmitter();\n /**\n * This event emitter is fired when the map center changes.\n */\n this.centerChange = new EventEmitter();\n /**\n * This event is fired when the viewport bounds have changed.\n */\n this.boundsChange = new EventEmitter();\n /**\n * This event is fired when the map becomes idle after panning or zooming.\n */\n this.idle = new EventEmitter();\n /**\n * This event is fired when the zoom level has changed.\n */\n this.zoomChange = new EventEmitter();\n /**\n * This event is fired when the google map is fully initialized.\n * You get the google.maps.Map instance as a result of this EventEmitter.\n */\n this.mapReady = new EventEmitter();\n }\n /** @internal */\n AgmMap.prototype.ngOnInit = function () {\n // todo: this should be solved with a new component and a viewChild decorator\n var container = this._elem.nativeElement.querySelector('.agm-map-container-inner');\n this._initMapInstance(container);\n };\n AgmMap.prototype._initMapInstance = function (el) {\n var _this = this;\n this._mapsWrapper.createMap(el, {\n center: { lat: this.latitude || 0, lng: this.longitude || 0 },\n zoom: this.zoom,\n minZoom: this.minZoom,\n maxZoom: this.maxZoom,\n disableDefaultUI: this.disableDefaultUI,\n disableDoubleClickZoom: this.disableDoubleClickZoom,\n scrollwheel: this.scrollwheel,\n backgroundColor: this.backgroundColor,\n draggable: this.draggable,\n draggableCursor: this.draggableCursor,\n draggingCursor: this.draggingCursor,\n keyboardShortcuts: this.keyboardShortcuts,\n styles: this.styles,\n zoomControl: this.zoomControl,\n zoomControlOptions: this.zoomControlOptions,\n streetViewControl: this.streetViewControl,\n streetViewControlOptions: this.streetViewControlOptions,\n scaleControl: this.scaleControl,\n scaleControlOptions: this.scaleControlOptions,\n mapTypeControl: this.mapTypeControl,\n mapTypeControlOptions: this.mapTypeControlOptions,\n panControl: this.panControl,\n panControlOptions: this.panControlOptions,\n rotateControl: this.rotateControl,\n rotateControlOptions: this.rotateControlOptions,\n fullscreenControl: this.fullscreenControl,\n fullscreenControlOptions: this.fullscreenControlOptions,\n mapTypeId: this.mapTypeId,\n clickableIcons: this.clickableIcons,\n gestureHandling: this.gestureHandling\n })\n .then(function () { return _this._mapsWrapper.getNativeMap(); })\n .then(function (map) { return _this.mapReady.emit(map); });\n // register event listeners\n this._handleMapCenterChange();\n this._handleMapZoomChange();\n this._handleMapMouseEvents();\n this._handleBoundsChange();\n this._handleIdleEvent();\n };\n /** @internal */\n AgmMap.prototype.ngOnDestroy = function () {\n // unsubscribe all registered observable subscriptions\n this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n /* @internal */\n AgmMap.prototype.ngOnChanges = function (changes) {\n this._updateMapOptionsChanges(changes);\n this._updatePosition(changes);\n };\n AgmMap.prototype._updateMapOptionsChanges = function (changes) {\n var options = {};\n var optionKeys = Object.keys(changes).filter(function (k) { return AgmMap._mapOptionsAttributes.indexOf(k) !== -1; });\n optionKeys.forEach(function (k) { options[k] = changes[k].currentValue; });\n this._mapsWrapper.setMapOptions(options);\n };\n /**\n * Triggers a resize event on the google map instance.\n * When recenter is true, the of the google map gets called with the current lat/lng values or fitBounds value to recenter the map.\n * Returns a promise that gets resolved after the event was triggered.\n */\n AgmMap.prototype.triggerResize = function (recenter) {\n var _this = this;\n if (recenter === void 0) { recenter = true; }\n // Note: When we would trigger the resize event and show the map in the same turn (which is a\n // common case for triggering a resize event), then the resize event would not\n // work (to show the map), so we trigger the event in a timeout.\n return new Promise(function (resolve) {\n setTimeout(function () {\n return _this._mapsWrapper.triggerMapEvent('resize').then(function () {\n if (recenter) {\n _this.fitBounds != null ? _this._fitBounds() : _this._setCenter();\n }\n resolve();\n });\n });\n });\n };\n AgmMap.prototype._updatePosition = function (changes) {\n if (changes['latitude'] == null && changes['longitude'] == null &&\n changes['fitBounds'] == null) {\n // no position update needed\n return;\n }\n // we prefer fitBounds in changes\n if (changes['fitBounds'] && this.fitBounds != null) {\n this._fitBounds();\n return;\n }\n if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n return;\n }\n this._setCenter();\n };\n AgmMap.prototype._setCenter = function () {\n var newCenter = {\n lat: this.latitude,\n lng: this.longitude,\n };\n if (this.usePanning) {\n this._mapsWrapper.panTo(newCenter);\n }\n else {\n this._mapsWrapper.setCenter(newCenter);\n }\n };\n AgmMap.prototype._fitBounds = function () {\n if (this.usePanning) {\n this._mapsWrapper.panToBounds(this.fitBounds);\n return;\n }\n this._mapsWrapper.fitBounds(this.fitBounds);\n };\n AgmMap.prototype._handleMapCenterChange = function () {\n var _this = this;\n var s = this._mapsWrapper.subscribeToMapEvent('center_changed').subscribe(function () {\n _this._mapsWrapper.getCenter().then(function (center) {\n _this.latitude = center.lat();\n _this.longitude = center.lng();\n _this.centerChange.emit({ lat: _this.latitude, lng: _this.longitude });\n });\n });\n this._observableSubscriptions.push(s);\n };\n AgmMap.prototype._handleBoundsChange = function () {\n var _this = this;\n var s = this._mapsWrapper.subscribeToMapEvent('bounds_changed').subscribe(function () {\n _this._mapsWrapper.getBounds().then(function (bounds) { _this.boundsChange.emit(bounds); });\n });\n this._observableSubscriptions.push(s);\n };\n AgmMap.prototype._handleMapZoomChange = function () {\n var _this = this;\n var s = this._mapsWrapper.subscribeToMapEvent('zoom_changed').subscribe(function () {\n _this._mapsWrapper.getZoom().then(function (z) {\n _this.zoom = z;\n _this.zoomChange.emit(z);\n });\n });\n this._observableSubscriptions.push(s);\n };\n AgmMap.prototype._handleIdleEvent = function () {\n var _this = this;\n var s = this._mapsWrapper.subscribeToMapEvent('idle').subscribe(function () { _this.idle.emit(void 0); });\n this._observableSubscriptions.push(s);\n };\n AgmMap.prototype._handleMapMouseEvents = function () {\n var _this = this;\n var events = [\n { name: 'click', emitter: this.mapClick },\n { name: 'rightclick', emitter: this.mapRightClick },\n { name: 'dblclick', emitter: this.mapDblClick },\n ];\n events.forEach(function (e) {\n var s = _this._mapsWrapper.subscribeToMapEvent(e.name).subscribe(function (event) {\n var value = { coords: { lat: event.latLng.lat(), lng: event.latLng.lng() } };\n e.emitter.emit(value);\n });\n _this._observableSubscriptions.push(s);\n });\n };\n return AgmMap;\n}());\nexport { AgmMap };\n/**\n * Map option attributes that can change over time\n */\nAgmMap._mapOptionsAttributes = [\n 'disableDoubleClickZoom', 'scrollwheel', 'draggable', 'draggableCursor', 'draggingCursor',\n 'keyboardShortcuts', 'zoomControl', 'zoomControlOptions', 'styles', 'streetViewControl',\n 'streetViewControlOptions', 'zoom', 'mapTypeControl', 'mapTypeControlOptions', 'minZoom',\n 'maxZoom', 'panControl', 'panControlOptions', 'rotateControl', 'rotateControlOptions',\n 'fullscreenControl', 'fullscreenControlOptions', 'scaleControl', 'scaleControlOptions',\n 'mapTypeId', 'clickableIcons', 'gestureHandling'\n];\nAgmMap.decorators = [\n { type: Component, args: [{\n selector: 'agm-map',\n providers: [\n GoogleMapsAPIWrapper, MarkerManager, InfoWindowManager, CircleManager, PolylineManager,\n PolygonManager, KmlLayerManager, DataLayerManager\n ],\n host: {\n // todo: deprecated - we will remove it with the next version\n '[class.sebm-google-map-container]': 'true'\n },\n styles: [\"\\n .agm-map-container-inner {\\n width: inherit;\\n height: inherit;\\n }\\n .agm-map-content {\\n display:none;\\n }\\n \"],\n template: \"\\n <div class='agm-map-container-inner sebm-google-map-container-inner'></div>\\n <div class='agm-map-content'>\\n <ng-content></ng-content>\\n </div>\\n \"\n },] },\n];\n/** @nocollapse */\nAgmMap.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: GoogleMapsAPIWrapper, },\n]; };\nAgmMap.propDecorators = {\n 'longitude': [{ type: Input },],\n 'latitude': [{ type: Input },],\n 'zoom': [{ type: Input },],\n 'minZoom': [{ type: Input },],\n 'maxZoom': [{ type: Input },],\n 'draggable': [{ type: Input, args: ['mapDraggable',] },],\n 'disableDoubleClickZoom': [{ type: Input },],\n 'disableDefaultUI': [{ type: Input },],\n 'scrollwheel': [{ type: Input },],\n 'backgroundColor': [{ type: Input },],\n 'draggableCursor': [{ type: Input },],\n 'draggingCursor': [{ type: Input },],\n 'keyboardShortcuts': [{ type: Input },],\n 'zoomControl': [{ type: Input },],\n 'zoomControlOptions': [{ type: Input },],\n 'styles': [{ type: Input },],\n 'usePanning': [{ type: Input },],\n 'streetViewControl': [{ type: Input },],\n 'streetViewControlOptions': [{ type: Input },],\n 'fitBounds': [{ type: Input },],\n 'scaleControl': [{ type: Input },],\n 'scaleControlOptions': [{ type: Input },],\n 'mapTypeControl': [{ type: Input },],\n 'mapTypeControlOptions': [{ type: Input },],\n 'panControl': [{ type: Input },],\n 'panControlOptions': [{ type: Input },],\n 'rotateControl': [{ type: Input },],\n 'rotateControlOptions': [{ type: Input },],\n 'fullscreenControl': [{ type: Input },],\n 'fullscreenControlOptions': [{ type: Input },],\n 'mapTypeId': [{ type: Input },],\n 'clickableIcons': [{ type: Input },],\n 'gestureHandling': [{ type: Input },],\n 'mapClick': [{ type: Output },],\n 'mapRightClick': [{ type: Output },],\n 'mapDblClick': [{ type: Output },],\n 'centerChange': [{ type: Output },],\n 'boundsChange': [{ type: Output },],\n 'idle': [{ type: Output },],\n 'zoomChange': [{ type: Output },],\n 'mapReady': [{ type: Output },],\n};\n//# sourceMappingURL=map.js.map","import { Directive, EventEmitter, ContentChildren, QueryList, Input, Output } from '@angular/core';\nimport { MarkerManager } from '../services/managers/marker-manager';\nimport { AgmInfoWindow } from './info-window';\nvar markerId = 0;\n/**\n * AgmMarker renders a map marker inside a {@link AgmMap}.\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-marker [latitude]=\"lat\" [longitude]=\"lng\" [label]=\"'M'\">\n * </agm-marker>\n * </agm-map>\n * `\n * })\n * ```\n */\nvar AgmMarker = (function () {\n function AgmMarker(_markerManager) {\n this._markerManager = _markerManager;\n /**\n * If true, the marker can be dragged. Default value is false.\n */\n // tslint:disable-next-line:no-input-rename\n this.draggable = false;\n /**\n * If true, the marker is visible\n */\n this.visible = true;\n /**\n * Whether to automatically open the child info window when the marker is clicked.\n */\n this.openInfoWindow = true;\n /**\n * The marker's opacity between 0.0 and 1.0.\n */\n this.opacity = 1;\n /**\n * All markers are displayed on the map in order of their zIndex, with higher values displaying in\n * front of markers with lower values. By default, markers are displayed according to their\n * vertical position on screen, with lower markers appearing in front of markers further up the\n * screen.\n */\n this.zIndex = 1;\n /**\n * If true, the marker can be clicked. Default value is true.\n */\n // tslint:disable-next-line:no-input-rename\n this.clickable = true;\n /**\n * This event emitter gets emitted when the user clicks on the marker.\n */\n this.markerClick = new EventEmitter();\n /**\n * This event is fired when the user stops dragging the marker.\n */\n this.dragEnd = new EventEmitter();\n /**\n * This event is fired when the user mouses over the marker.\n */\n this.mouseOver = new EventEmitter();\n /**\n * This event is fired when the user mouses outside the marker.\n */\n this.mouseOut = new EventEmitter();\n /**\n * @internal\n */\n this.infoWindow = new QueryList();\n this._markerAddedToManger = false;\n this._observableSubscriptions = [];\n this._id = (markerId++).toString();\n }\n /* @internal */\n AgmMarker.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.handleInfoWindowUpdate();\n this.infoWindow.changes.subscribe(function () { return _this.handleInfoWindowUpdate(); });\n };\n AgmMarker.prototype.handleInfoWindowUpdate = function () {\n var _this = this;\n if (this.infoWindow.length > 1) {\n throw new Error('Expected no more than one info window.');\n }\n this.infoWindow.forEach(function (marker) {\n marker.hostMarker = _this;\n });\n };\n /** @internal */\n AgmMarker.prototype.ngOnChanges = function (changes) {\n if (typeof this.latitude !== 'number' || typeof this.longitude !== 'number') {\n return;\n }\n if (!this._markerAddedToManger) {\n this._markerManager.addMarker(this);\n this._markerAddedToManger = true;\n this._addEventListeners();\n return;\n }\n if (changes['latitude'] || changes['longitude']) {\n this._markerManager.updateMarkerPosition(this);\n }\n if (changes['title']) {\n this._markerManager.updateTitle(this);\n }\n if (changes['label']) {\n this._markerManager.updateLabel(this);\n }\n if (changes['draggable']) {\n this._markerManager.updateDraggable(this);\n }\n if (changes['iconUrl']) {\n this._markerManager.updateIcon(this);\n }\n if (changes['opacity']) {\n this._markerManager.updateOpacity(this);\n }\n if (changes['visible']) {\n this._markerManager.updateVisible(this);\n }\n if (changes['zIndex']) {\n this._markerManager.updateZIndex(this);\n }\n if (changes['clickable']) {\n this._markerManager.updateClickable(this);\n }\n };\n AgmMarker.prototype._addEventListeners = function () {\n var _this = this;\n var cs = this._markerManager.createEventObservable('click', this).subscribe(function () {\n if (_this.openInfoWindow) {\n _this.infoWindow.forEach(function (infoWindow) { return infoWindow.open(); });\n }\n _this.markerClick.emit(null);\n });\n this._observableSubscriptions.push(cs);\n var ds = this._markerManager.createEventObservable('dragend', this)\n .subscribe(function (e) {\n _this.dragEnd.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n });\n this._observableSubscriptions.push(ds);\n var mover = this._markerManager.createEventObservable('mouseover', this)\n .subscribe(function (e) {\n _this.mouseOver.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n });\n this._observableSubscriptions.push(mover);\n var mout = this._markerManager.createEventObservable('mouseout', this)\n .subscribe(function (e) {\n _this.mouseOut.emit({ coords: { lat: e.latLng.lat(), lng: e.latLng.lng() } });\n });\n this._observableSubscriptions.push(mout);\n };\n /** @internal */\n AgmMarker.prototype.id = function () { return this._id; };\n /** @internal */\n AgmMarker.prototype.toString = function () { return 'AgmMarker-' + this._id.toString(); };\n /** @internal */\n AgmMarker.prototype.ngOnDestroy = function () {\n this._markerManager.deleteMarker(this);\n // unsubscribe all registered observable subscriptions\n this._observableSubscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n return AgmMarker;\n}());\nexport { AgmMarker };\nAgmMarker.decorators = [\n { type: Directive, args: [{\n selector: 'agm-marker'\n },] },\n];\n/** @nocollapse */\nAgmMarker.ctorParameters = function () { return [\n { type: MarkerManager, },\n]; };\nAgmMarker.propDecorators = {\n 'latitude': [{ type: Input },],\n 'longitude': [{ type: Input },],\n 'title': [{ type: Input },],\n 'label': [{ type: Input },],\n 'draggable': [{ type: Input, args: ['markerDraggable',] },],\n 'iconUrl': [{ type: Input },],\n 'visible': [{ type: Input },],\n 'openInfoWindow': [{ type: Input },],\n 'opacity': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'clickable': [{ type: Input, args: ['markerClickable',] },],\n 'markerClick': [{ type: Output },],\n 'dragEnd': [{ type: Output },],\n 'mouseOver': [{ type: Output },],\n 'mouseOut': [{ type: Output },],\n 'infoWindow': [{ type: ContentChildren, args: [AgmInfoWindow,] },],\n};\n//# sourceMappingURL=marker.js.map","import { Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { PolygonManager } from '../services/managers/polygon-manager';\n/**\n * AgmPolygon renders a polygon on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * agm-map {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-polygon [paths]=\"paths\">\n * </agm-polygon>\n * </agm-map>\n * `\n * })\n * export class MyMapCmp {\n * lat: number = 0;\n * lng: number = 0;\n * zoom: number = 10;\n * paths: Array<LatLngLiteral> = [\n * { lat: 0, lng: 10 },\n * { lat: 0, lng: 20 },\n * { lat: 10, lng: 20 },\n * { lat: 10, lng: 10 },\n * { lat: 0, lng: 10 }\n * ]\n * // Nesting paths will create a hole where they overlap;\n * nestedPaths: Array<Array<LatLngLiteral>> = [[\n * { lat: 0, lng: 10 },\n * { lat: 0, lng: 20 },\n * { lat: 10, lng: 20 },\n * { lat: 10, lng: 10 },\n * { lat: 0, lng: 10 }\n * ], [\n * { lat: 0, lng: 15 },\n * { lat: 0, lng: 20 },\n * { lat: 5, lng: 20 },\n * { lat: 5, lng: 15 },\n * { lat: 0, lng: 15 }\n * ]]\n * }\n * ```\n */\nvar AgmPolygon = (function () {\n function AgmPolygon(_polygonManager) {\n this._polygonManager = _polygonManager;\n /**\n * Indicates whether this Polygon handles mouse events. Defaults to true.\n */\n this.clickable = true;\n /**\n * If set to true, the user can drag this shape over the map. The geodesic\n * property defines the mode of dragging. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n this.draggable = false;\n /**\n * If set to true, the user can edit this shape by dragging the control\n * points shown at the vertices and on each segment. Defaults to false.\n */\n this.editable = false;\n /**\n * When true, edges of the polygon are interpreted as geodesic and will\n * follow the curvature of the Earth. When false, edges of the polygon are\n * rendered as straight lines in screen space. Note that the shape of a\n * geodesic polygon may appear to change when dragged, as the dimensions\n * are maintained relative to the surface of the earth. Defaults to false.\n */\n this.geodesic = false;\n /**\n * The ordered sequence of coordinates that designates a closed loop.\n * Unlike polylines, a polygon may consist of one or more paths.\n * As a result, the paths property may specify one or more arrays of\n * LatLng coordinates. Paths are closed automatically; do not repeat the\n * first vertex of the path as the last vertex. Simple polygons may be\n * defined using a single array of LatLngs. More complex polygons may\n * specify an array of arrays. Any simple arrays are converted into Arrays.\n * Inserting or removing LatLngs from the Array will automatically update\n * the polygon on the map.\n */\n this.paths = [];\n /**\n * This event is fired when the DOM click event is fired on the Polygon.\n */\n this.polyClick = new EventEmitter();\n /**\n * This event is fired when the DOM dblclick event is fired on the Polygon.\n */\n this.polyDblClick = new EventEmitter();\n /**\n * This event is repeatedly fired while the user drags the polygon.\n */\n this.polyDrag = new EventEmitter();\n /**\n * This event is fired when the user stops dragging the polygon.\n */\n this.polyDragEnd = new EventEmitter();\n /**\n * This event is fired when the user starts dragging the polygon.\n */\n this.polyDragStart = new EventEmitter();\n /**\n * This event is fired when the DOM mousedown event is fired on the Polygon.\n */\n this.polyMouseDown = new EventEmitter();\n /**\n * This event is fired when the DOM mousemove event is fired on the Polygon.\n */\n this.polyMouseMove = new EventEmitter();\n /**\n * This event is fired on Polygon mouseout.\n */\n this.polyMouseOut = new EventEmitter();\n /**\n * This event is fired on Polygon mouseover.\n */\n this.polyMouseOver = new EventEmitter();\n /**\n * This event is fired whe the DOM mouseup event is fired on the Polygon\n */\n this.polyMouseUp = new EventEmitter();\n /**\n * This even is fired when the Polygon is right-clicked on.\n */\n this.polyRightClick = new EventEmitter();\n this._polygonAddedToManager = false;\n this._subscriptions = [];\n }\n /** @internal */\n AgmPolygon.prototype.ngAfterContentInit = function () {\n if (!this._polygonAddedToManager) {\n this._init();\n }\n };\n AgmPolygon.prototype.ngOnChanges = function (changes) {\n if (!this._polygonAddedToManager) {\n this._init();\n return;\n }\n this._polygonManager.setPolygonOptions(this, this._updatePolygonOptions(changes));\n };\n AgmPolygon.prototype._init = function () {\n this._polygonManager.addPolygon(this);\n this._polygonAddedToManager = true;\n this._addEventListeners();\n };\n AgmPolygon.prototype._addEventListeners = function () {\n var _this = this;\n var handlers = [\n { name: 'click', handler: function (ev) { return _this.polyClick.emit(ev); } },\n { name: 'dbclick', handler: function (ev) { return _this.polyDblClick.emit(ev); } },\n { name: 'drag', handler: function (ev) { return _this.polyDrag.emit(ev); } },\n { name: 'dragend', handler: function (ev) { return _this.polyDragEnd.emit(ev); } },\n { name: 'dragstart', handler: function (ev) { return _this.polyDragStart.emit(ev); } },\n { name: 'mousedown', handler: function (ev) { return _this.polyMouseDown.emit(ev); } },\n { name: 'mousemove', handler: function (ev) { return _this.polyMouseMove.emit(ev); } },\n { name: 'mouseout', handler: function (ev) { return _this.polyMouseOut.emit(ev); } },\n { name: 'mouseover', handler: function (ev) { return _this.polyMouseOver.emit(ev); } },\n { name: 'mouseup', handler: function (ev) { return _this.polyMouseUp.emit(ev); } },\n { name: 'rightclick', handler: function (ev) { return _this.polyRightClick.emit(ev); } },\n ];\n handlers.forEach(function (obj) {\n var os = _this._polygonManager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n _this._subscriptions.push(os);\n });\n };\n AgmPolygon.prototype._updatePolygonOptions = function (changes) {\n return Object.keys(changes)\n .filter(function (k) { return AgmPolygon._polygonOptionsAttributes.indexOf(k) !== -1; })\n .reduce(function (obj, k) {\n obj[k] = changes[k].currentValue;\n return obj;\n }, {});\n };\n /** @internal */\n AgmPolygon.prototype.id = function () { return this._id; };\n /** @internal */\n AgmPolygon.prototype.ngOnDestroy = function () {\n this._polygonManager.deletePolygon(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n return AgmPolygon;\n}());\nexport { AgmPolygon };\nAgmPolygon._polygonOptionsAttributes = [\n 'clickable', 'draggable', 'editable', 'fillColor', 'fillOpacity', 'geodesic', 'icon', 'map',\n 'paths', 'strokeColor', 'strokeOpacity', 'strokeWeight', 'visible', 'zIndex', 'draggable',\n 'editable', 'visible'\n];\nAgmPolygon.decorators = [\n { type: Directive, args: [{\n selector: 'agm-polygon'\n },] },\n];\n/** @nocollapse */\nAgmPolygon.ctorParameters = function () { return [\n { type: PolygonManager, },\n]; };\nAgmPolygon.propDecorators = {\n 'clickable': [{ type: Input },],\n 'draggable': [{ type: Input, args: ['polyDraggable',] },],\n 'editable': [{ type: Input },],\n 'fillColor': [{ type: Input },],\n 'fillOpacity': [{ type: Input },],\n 'geodesic': [{ type: Input },],\n 'paths': [{ type: Input },],\n 'strokeColor': [{ type: Input },],\n 'strokeOpacity': [{ type: Input },],\n 'strokeWeight': [{ type: Input },],\n 'visible': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'polyClick': [{ type: Output },],\n 'polyDblClick': [{ type: Output },],\n 'polyDrag': [{ type: Output },],\n 'polyDragEnd': [{ type: Output },],\n 'polyDragStart': [{ type: Output },],\n 'polyMouseDown': [{ type: Output },],\n 'polyMouseMove': [{ type: Output },],\n 'polyMouseOut': [{ type: Output },],\n 'polyMouseOver': [{ type: Output },],\n 'polyMouseUp': [{ type: Output },],\n 'polyRightClick': [{ type: Output },],\n};\n//# sourceMappingURL=polygon.js.map","import { Directive, EventEmitter, Input, Output } from '@angular/core';\n/**\n * AgmPolylinePoint represents one element of a polyline within a {@link\n * SembGoogleMapPolyline}\n */\nvar AgmPolylinePoint = (function () {\n function AgmPolylinePoint() {\n /**\n * This event emitter gets emitted when the position of the point changed.\n */\n this.positionChanged = new EventEmitter();\n }\n AgmPolylinePoint.prototype.ngOnChanges = function (changes) {\n if (changes['latitude'] || changes['longitude']) {\n var position = {\n lat: changes['latitude'].currentValue,\n lng: changes['longitude'].currentValue\n };\n this.positionChanged.emit(position);\n }\n };\n return AgmPolylinePoint;\n}());\nexport { AgmPolylinePoint };\nAgmPolylinePoint.decorators = [\n { type: Directive, args: [{ selector: 'agm-polyline-point' },] },\n];\n/** @nocollapse */\nAgmPolylinePoint.ctorParameters = function () { return []; };\nAgmPolylinePoint.propDecorators = {\n 'latitude': [{ type: Input },],\n 'longitude': [{ type: Input },],\n 'positionChanged': [{ type: Output },],\n};\n//# sourceMappingURL=polyline-point.js.map","import { ContentChildren, Directive, EventEmitter, Input, Output } from '@angular/core';\nimport { PolylineManager } from '../services/managers/polyline-manager';\nimport { AgmPolylinePoint } from './polyline-point';\nvar polylineId = 0;\n/**\n * AgmPolyline renders a polyline on a {@link AgmMap}\n *\n * ### Example\n * ```typescript\n * import { Component } from '@angular/core';\n *\n * @Component({\n * selector: 'my-map-cmp',\n * styles: [`\n * .agm-map-container {\n * height: 300px;\n * }\n * `],\n * template: `\n * <agm-map [latitude]=\"lat\" [longitude]=\"lng\" [zoom]=\"zoom\">\n * <agm-polyline>\n * <agm-polyline-point [latitude]=\"latA\" [longitude]=\"lngA\">\n * </agm-polyline-point>\n * <agm-polyline-point [latitude]=\"latB\" [longitude]=\"lngB\">\n * </agm-polyline-point>\n * </agm-polyline>\n * </agm-map>\n * `\n * })\n * ```\n */\nvar AgmPolyline = (function () {\n function AgmPolyline(_polylineManager) {\n this._polylineManager = _polylineManager;\n /**\n * Indicates whether this Polyline handles mouse events. Defaults to true.\n */\n this.clickable = true;\n /**\n * If set to true, the user can drag this shape over the map. The geodesic property defines the\n * mode of dragging. Defaults to false.\n */\n // tslint:disable-next-line:no-input-rename\n this.draggable = false;\n /**\n * If set to true, the user can edit this shape by dragging the control points shown at the\n * vertices and on each segment. Defaults to false.\n */\n this.editable = false;\n /**\n * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of\n * the Earth. When false, edges of the polygon are rendered as straight lines in screen space.\n * Note that the shape of a geodesic polygon may appear to change when dragged, as the dimensions\n * are maintained relative to the surface of the earth. Defaults to false.\n */\n this.geodesic = false;\n /**\n * Whether this polyline is visible on the map. Defaults to true.\n */\n this.visible = true;\n /**\n * This event is fired when the DOM click event is fired on the Polyline.\n */\n this.lineClick = new EventEmitter();\n /**\n * This event is fired when the DOM dblclick event is fired on the Polyline.\n */\n this.lineDblClick = new EventEmitter();\n /**\n * This event is repeatedly fired while the user drags the polyline.\n */\n this.lineDrag = new EventEmitter();\n /**\n * This event is fired when the user stops dragging the polyline.\n */\n this.lineDragEnd = new EventEmitter();\n /**\n * This event is fired when the user starts dragging the polyline.\n */\n this.lineDragStart = new EventEmitter();\n /**\n * This event is fired when the DOM mousedown event is fired on the Polyline.\n */\n this.lineMouseDown = new EventEmitter();\n /**\n * This event is fired when the DOM mousemove event is fired on the Polyline.\n */\n this.lineMouseMove = new EventEmitter();\n /**\n * This event is fired on Polyline mouseout.\n */\n this.lineMouseOut = new EventEmitter();\n /**\n * This event is fired on Polyline mouseover.\n */\n this.lineMouseOver = new EventEmitter();\n /**\n * This event is fired whe the DOM mouseup event is fired on the Polyline\n */\n this.lineMouseUp = new EventEmitter();\n /**\n * This even is fired when the Polyline is right-clicked on.\n */\n this.lineRightClick = new EventEmitter();\n this._polylineAddedToManager = false;\n this._subscriptions = [];\n this._id = (polylineId++).toString();\n }\n /** @internal */\n AgmPolyline.prototype.ngAfterContentInit = function () {\n var _this = this;\n if (this.points.length) {\n this.points.forEach(function (point) {\n var s = point.positionChanged.subscribe(function () { _this._polylineManager.updatePolylinePoints(_this); });\n _this._subscriptions.push(s);\n });\n }\n if (!this._polylineAddedToManager) {\n this._init();\n }\n var s = this.points.changes.subscribe(function () { return _this._polylineManager.updatePolylinePoints(_this); });\n this._subscriptions.push(s);\n this._polylineManager.updatePolylinePoints(this);\n };\n AgmPolyline.prototype.ngOnChanges = function (changes) {\n if (!this._polylineAddedToManager) {\n this._init();\n return;\n }\n var options = {};\n var optionKeys = Object.keys(changes).filter(function (k) { return AgmPolyline._polylineOptionsAttributes.indexOf(k) !== -1; });\n optionKeys.forEach(function (k) { return options[k] = changes[k].currentValue; });\n this._polylineManager.setPolylineOptions(this, options);\n };\n AgmPolyline.prototype._init = function () {\n this._polylineManager.addPolyline(this);\n this._polylineAddedToManager = true;\n this._addEventListeners();\n };\n AgmPolyline.prototype._addEventListeners = function () {\n var _this = this;\n var handlers = [\n { name: 'click', handler: function (ev) { return _this.lineClick.emit(ev); } },\n { name: 'dblclick', handler: function (ev) { return _this.lineDblClick.emit(ev); } },\n { name: 'drag', handler: function (ev) { return _this.lineDrag.emit(ev); } },\n { name: 'dragend', handler: function (ev) { return _this.lineDragEnd.emit(ev); } },\n { name: 'dragstart', handler: function (ev) { return _this.lineDragStart.emit(ev); } },\n { name: 'mousedown', handler: function (ev) { return _this.lineMouseDown.emit(ev); } },\n { name: 'mousemove', handler: function (ev) { return _this.lineMouseMove.emit(ev); } },\n { name: 'mouseout', handler: function (ev) { return _this.lineMouseOut.emit(ev); } },\n { name: 'mouseover', handler: function (ev) { return _this.lineMouseOver.emit(ev); } },\n { name: 'mouseup', handler: function (ev) { return _this.lineMouseUp.emit(ev); } },\n { name: 'rightclick', handler: function (ev) { return _this.lineRightClick.emit(ev); } },\n ];\n handlers.forEach(function (obj) {\n var os = _this._polylineManager.createEventObservable(obj.name, _this).subscribe(obj.handler);\n _this._subscriptions.push(os);\n });\n };\n /** @internal */\n AgmPolyline.prototype._getPoints = function () {\n if (this.points) {\n return this.points.toArray();\n }\n return [];\n };\n /** @internal */\n AgmPolyline.prototype.id = function () { return this._id; };\n /** @internal */\n AgmPolyline.prototype.ngOnDestroy = function () {\n this._polylineManager.deletePolyline(this);\n // unsubscribe all registered observable subscriptions\n this._subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n return AgmPolyline;\n}());\nexport { AgmPolyline };\nAgmPolyline._polylineOptionsAttributes = [\n 'draggable', 'editable', 'visible', 'geodesic', 'strokeColor', 'strokeOpacity', 'strokeWeight',\n 'zIndex'\n];\nAgmPolyline.decorators = [\n { type: Directive, args: [{\n selector: 'agm-polyline'\n },] },\n];\n/** @nocollapse */\nAgmPolyline.ctorParameters = function () { return [\n { type: PolylineManager, },\n]; };\nAgmPolyline.propDecorators = {\n 'clickable': [{ type: Input },],\n 'draggable': [{ type: Input, args: ['polylineDraggable',] },],\n 'editable': [{ type: Input },],\n 'geodesic': [{ type: Input },],\n 'strokeColor': [{ type: Input },],\n 'strokeOpacity': [{ type: Input },],\n 'strokeWeight': [{ type: Input },],\n 'visible': [{ type: Input },],\n 'zIndex': [{ type: Input },],\n 'lineClick': [{ type: Output },],\n 'lineDblClick': [{ type: Output },],\n 'lineDrag': [{ type: Output },],\n 'lineDragEnd': [{ type: Output },],\n 'lineDragStart': [{ type: Output },],\n 'lineMouseDown': [{ type: Output },],\n 'lineMouseMove': [{ type: Output },],\n 'lineMouseOut': [{ type: Output },],\n 'lineMouseOver': [{ type: Output },],\n 'lineMouseUp': [{ type: Output },],\n 'lineRightClick': [{ type: Output },],\n 'points': [{ type: ContentChildren, args: [AgmPolylinePoint,] },],\n};\n//# sourceMappingURL=polyline.js.map","// main modules\nexport * from './directives';\nexport * from './services';\n// core module\n// we explicitly export the module here to prevent this Ionic 2 bug:\n// http://stevemichelotti.com/integrate-angular-2-google-maps-into-ionic-2/\nexport { AgmCoreModule } from './core.module';\n//# sourceMappingURL=index.js.map","export { GoogleMapsAPIWrapper } from './services/google-maps-api-wrapper';\nexport { CircleManager } from './services/managers/circle-manager';\nexport { InfoWindowManager } from './services/managers/info-window-manager';\nexport { MarkerManager } from './services/managers/marker-manager';\nexport { PolygonManager } from './services/managers/polygon-manager';\nexport { PolylineManager } from './services/managers/polyline-manager';\nexport { KmlLayerManager } from './services/managers/kml-layer-manager';\nexport { DataLayerManager } from './services/managers/data-layer-manager';\nexport { GoogleMapsScriptProtocol, LAZY_MAPS_API_CONFIG, LazyMapsAPILoader } from './services/maps-api-loader/lazy-maps-api-loader';\nexport { MapsAPILoader } from './services/maps-api-loader/maps-api-loader';\nexport { NoOpMapsAPILoader } from './services/maps-api-loader/noop-maps-api-loader';\n//# sourceMappingURL=services.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { MapsAPILoader } from './maps-api-loader/maps-api-loader';\n/**\n * Wrapper class that handles the communication with the Google Maps Javascript\n * API v3\n */\nvar GoogleMapsAPIWrapper = (function () {\n function GoogleMapsAPIWrapper(_loader, _zone) {\n var _this = this;\n this._loader = _loader;\n this._zone = _zone;\n this._map =\n new Promise(function (resolve) { _this._mapResolver = resolve; });\n }\n GoogleMapsAPIWrapper.prototype.createMap = function (el, mapOptions) {\n var _this = this;\n return this._loader.load().then(function () {\n var map = new google.maps.Map(el, mapOptions);\n _this._mapResolver(map);\n return;\n });\n };\n GoogleMapsAPIWrapper.prototype.setMapOptions = function (options) {\n this._map.then(function (m) { m.setOptions(options); });\n };\n /**\n * Creates a google map marker with the map context\n */\n GoogleMapsAPIWrapper.prototype.createMarker = function (options, addToMap) {\n if (options === void 0) { options = {}; }\n if (addToMap === void 0) { addToMap = true; }\n return this._map.then(function (map) {\n if (addToMap) {\n options.map = map;\n }\n return new google.maps.Marker(options);\n });\n };\n GoogleMapsAPIWrapper.prototype.createInfoWindow = function (options) {\n return this._map.then(function () { return new google.maps.InfoWindow(options); });\n };\n /**\n * Creates a google.map.Circle for the current map.\n */\n GoogleMapsAPIWrapper.prototype.createCircle = function (options) {\n return this._map.then(function (map) {\n options.map = map;\n return new google.maps.Circle(options);\n });\n };\n GoogleMapsAPIWrapper.prototype.createPolyline = function (options) {\n return this.getNativeMap().then(function (map) {\n var line = new google.maps.Polyline(options);\n line.setMap(map);\n return line;\n });\n };\n GoogleMapsAPIWrapper.prototype.createPolygon = function (options) {\n return this.getNativeMap().then(function (map) {\n var polygon = new google.maps.Polygon(options);\n polygon.setMap(map);\n return polygon;\n });\n };\n /**\n * Creates a new google.map.Data layer for the current map\n */\n GoogleMapsAPIWrapper.prototype.createDataLayer = function (options) {\n return this._map.then(function (m) {\n var data = new google.maps.Data(options);\n data.setMap(m);\n return data;\n });\n };\n /**\n * Determines if given coordinates are insite a Polygon path.\n */\n GoogleMapsAPIWrapper.prototype.containsLocation = function (latLng, polygon) {\n return google.maps.geometry.poly.containsLocation(latLng, polygon);\n };\n GoogleMapsAPIWrapper.prototype.subscribeToMapEvent = function (eventName) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._map.then(function (m) {\n m.addListener(eventName, function (arg) { _this._zone.run(function () { return observer.next(arg); }); });\n });\n });\n };\n GoogleMapsAPIWrapper.prototype.setCenter = function (latLng) {\n return this._map.then(function (map) { return map.setCenter(latLng); });\n };\n GoogleMapsAPIWrapper.prototype.getZoom = function () { return this._map.then(function (map) { return map.getZoom(); }); };\n GoogleMapsAPIWrapper.prototype.getBounds = function () {\n return this._map.then(function (map) { return map.getBounds(); });\n };\n GoogleMapsAPIWrapper.prototype.setZoom = function (zoom) {\n return this._map.then(function (map) { return map.setZoom(zoom); });\n };\n GoogleMapsAPIWrapper.prototype.getCenter = function () {\n return this._map.then(function (map) { return map.getCenter(); });\n };\n GoogleMapsAPIWrapper.prototype.panTo = function (latLng) {\n return this._map.then(function (map) { return map.panTo(latLng); });\n };\n GoogleMapsAPIWrapper.prototype.panBy = function (x, y) {\n return this._map.then(function (map) { return map.panBy(x, y); });\n };\n GoogleMapsAPIWrapper.prototype.fitBounds = function (latLng) {\n return this._map.then(function (map) { return map.fitBounds(latLng); });\n };\n GoogleMapsAPIWrapper.prototype.panToBounds = function (latLng) {\n return this._map.then(function (map) { return map.panToBounds(latLng); });\n };\n /**\n * Returns the native Google Maps Map instance. Be careful when using this instance directly.\n */\n GoogleMapsAPIWrapper.prototype.getNativeMap = function () { return this._map; };\n /**\n * Triggers the given event name on the map instance.\n */\n GoogleMapsAPIWrapper.prototype.triggerMapEvent = function (eventName) {\n return this._map.then(function (m) { return google.maps.event.trigger(m, eventName); });\n };\n return GoogleMapsAPIWrapper;\n}());\nexport { GoogleMapsAPIWrapper };\nGoogleMapsAPIWrapper.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nGoogleMapsAPIWrapper.ctorParameters = function () { return [\n { type: MapsAPILoader, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=google-maps-api-wrapper.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\nvar CircleManager = (function () {\n function CircleManager(_apiWrapper, _zone) {\n this._apiWrapper = _apiWrapper;\n this._zone = _zone;\n this._circles = new Map();\n }\n CircleManager.prototype.addCircle = function (circle) {\n this._circles.set(circle, this._apiWrapper.createCircle({\n center: { lat: circle.latitude, lng: circle.longitude },\n clickable: circle.clickable,\n draggable: circle.draggable,\n editable: circle.editable,\n fillColor: circle.fillColor,\n fillOpacity: circle.fillOpacity,\n radius: circle.radius,\n strokeColor: circle.strokeColor,\n strokeOpacity: circle.strokeOpacity,\n strokePosition: circle.strokePosition,\n strokeWeight: circle.strokeWeight,\n visible: circle.visible,\n zIndex: circle.zIndex\n }));\n };\n /**\n * Removes the given circle from the map.\n */\n CircleManager.prototype.removeCircle = function (circle) {\n var _this = this;\n return this._circles.get(circle).then(function (c) {\n c.setMap(null);\n _this._circles.delete(circle);\n });\n };\n CircleManager.prototype.setOptions = function (circle, options) {\n return this._circles.get(circle).then(function (c) { return c.setOptions(options); });\n };\n CircleManager.prototype.getBounds = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.getBounds(); });\n };\n CircleManager.prototype.getCenter = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.getCenter(); });\n };\n CircleManager.prototype.getRadius = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.getRadius(); });\n };\n CircleManager.prototype.setCenter = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.setCenter({ lat: circle.latitude, lng: circle.longitude }); });\n };\n CircleManager.prototype.setEditable = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.setEditable(circle.editable); });\n };\n CircleManager.prototype.setDraggable = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.setDraggable(circle.draggable); });\n };\n CircleManager.prototype.setVisible = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.setVisible(circle.visible); });\n };\n CircleManager.prototype.setRadius = function (circle) {\n return this._circles.get(circle).then(function (c) { return c.setRadius(circle.radius); });\n };\n CircleManager.prototype.createEventObservable = function (eventName, circle) {\n var _this = this;\n return Observable.create(function (observer) {\n var listener = null;\n _this._circles.get(circle).then(function (c) {\n listener = c.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n return function () {\n if (listener !== null) {\n listener.remove();\n }\n };\n });\n };\n return CircleManager;\n}());\nexport { CircleManager };\nCircleManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nCircleManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=circle-manager.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\n/**\n * Manages all Data Layers for a Google Map instance.\n */\nvar DataLayerManager = (function () {\n function DataLayerManager(_wrapper, _zone) {\n this._wrapper = _wrapper;\n this._zone = _zone;\n this._layers = new Map();\n }\n /**\n * Adds a new Data Layer to the map.\n */\n DataLayerManager.prototype.addDataLayer = function (layer) {\n var _this = this;\n var newLayer = this._wrapper.createDataLayer({\n style: layer.style\n })\n .then(function (d) {\n if (layer.geoJson) {\n _this.getDataFeatures(d, layer.geoJson).then(function (features) { return d.features = features; });\n }\n return d;\n });\n this._layers.set(layer, newLayer);\n };\n DataLayerManager.prototype.deleteDataLayer = function (layer) {\n var _this = this;\n this._layers.get(layer).then(function (l) {\n l.setMap(null);\n _this._layers.delete(layer);\n });\n };\n DataLayerManager.prototype.updateGeoJson = function (layer, geoJson) {\n var _this = this;\n this._layers.get(layer).then(function (l) {\n l.forEach(function (feature) {\n l.remove(feature);\n var index = l.features.indexOf(feature, 0);\n if (index > -1) {\n l.features.splice(index, 1);\n }\n });\n _this.getDataFeatures(l, geoJson).then(function (features) { return l.features = features; });\n });\n };\n DataLayerManager.prototype.setDataOptions = function (layer, options) {\n this._layers.get(layer).then(function (l) {\n l.setControlPosition(options.controlPosition);\n l.setControls(options.controls);\n l.setDrawingMode(options.drawingMode);\n l.setStyle(options.style);\n });\n };\n /**\n * Creates a Google Maps event listener for the given DataLayer as an Observable\n */\n DataLayerManager.prototype.createEventObservable = function (eventName, layer) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._layers.get(layer).then(function (d) {\n d.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n /**\n * Extract features from a geoJson using google.maps Data Class\n * @param d : google.maps.Data class instance\n * @param geoJson : url or geojson object\n */\n DataLayerManager.prototype.getDataFeatures = function (d, geoJson) {\n return new Promise(function (resolve, reject) {\n if (typeof geoJson === 'object') {\n try {\n var features = d.addGeoJson(geoJson);\n resolve(features);\n }\n catch (e) {\n reject(e);\n }\n }\n else if (typeof geoJson === 'string') {\n d.loadGeoJson(geoJson, null, resolve);\n }\n else {\n reject(\"Impossible to extract features from geoJson: wrong argument type\");\n }\n });\n };\n return DataLayerManager;\n}());\nexport { DataLayerManager };\nDataLayerManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nDataLayerManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=data-layer-manager.js.map","import { Observable } from 'rxjs/Observable';\nimport { Injectable, NgZone } from '@angular/core';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\nimport { MarkerManager } from './marker-manager';\nvar InfoWindowManager = (function () {\n function InfoWindowManager(_mapsWrapper, _zone, _markerManager) {\n this._mapsWrapper = _mapsWrapper;\n this._zone = _zone;\n this._markerManager = _markerManager;\n this._infoWindows = new Map();\n }\n InfoWindowManager.prototype.deleteInfoWindow = function (infoWindow) {\n var _this = this;\n var iWindow = this._infoWindows.get(infoWindow);\n if (iWindow == null) {\n // info window already deleted\n return Promise.resolve();\n }\n return iWindow.then(function (i) {\n return _this._zone.run(function () {\n i.close();\n _this._infoWindows.delete(infoWindow);\n });\n });\n };\n InfoWindowManager.prototype.setPosition = function (infoWindow) {\n return this._infoWindows.get(infoWindow).then(function (i) { return i.setPosition({\n lat: infoWindow.latitude,\n lng: infoWindow.longitude\n }); });\n };\n InfoWindowManager.prototype.setZIndex = function (infoWindow) {\n return this._infoWindows.get(infoWindow)\n .then(function (i) { return i.setZIndex(infoWindow.zIndex); });\n };\n InfoWindowManager.prototype.open = function (infoWindow) {\n var _this = this;\n return this._infoWindows.get(infoWindow).then(function (w) {\n if (infoWindow.hostMarker != null) {\n return _this._markerManager.getNativeMarker(infoWindow.hostMarker).then(function (marker) {\n return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map, marker); });\n });\n }\n return _this._mapsWrapper.getNativeMap().then(function (map) { return w.open(map); });\n });\n };\n InfoWindowManager.prototype.close = function (infoWindow) {\n return this._infoWindows.get(infoWindow).then(function (w) { return w.close(); });\n };\n InfoWindowManager.prototype.setOptions = function (infoWindow, options) {\n return this._infoWindows.get(infoWindow).then(function (i) { return i.setOptions(options); });\n };\n InfoWindowManager.prototype.addInfoWindow = function (infoWindow) {\n var options = {\n content: infoWindow.content,\n maxWidth: infoWindow.maxWidth,\n zIndex: infoWindow.zIndex,\n disableAutoPan: infoWindow.disableAutoPan\n };\n if (typeof infoWindow.latitude === 'number' && typeof infoWindow.longitude === 'number') {\n options.position = { lat: infoWindow.latitude, lng: infoWindow.longitude };\n }\n var infoWindowPromise = this._mapsWrapper.createInfoWindow(options);\n this._infoWindows.set(infoWindow, infoWindowPromise);\n };\n /**\n * Creates a Google Maps event listener for the given InfoWindow as an Observable\n */\n InfoWindowManager.prototype.createEventObservable = function (eventName, infoWindow) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._infoWindows.get(infoWindow).then(function (i) {\n i.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n return InfoWindowManager;\n}());\nexport { InfoWindowManager };\nInfoWindowManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nInfoWindowManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n { type: MarkerManager, },\n]; };\n//# sourceMappingURL=info-window-manager.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\n/**\n * Manages all KML Layers for a Google Map instance.\n */\nvar KmlLayerManager = (function () {\n function KmlLayerManager(_wrapper, _zone) {\n this._wrapper = _wrapper;\n this._zone = _zone;\n this._layers = new Map();\n }\n /**\n * Adds a new KML Layer to the map.\n */\n KmlLayerManager.prototype.addKmlLayer = function (layer) {\n var newLayer = this._wrapper.getNativeMap().then(function (m) {\n return new google.maps.KmlLayer({\n clickable: layer.clickable,\n map: m,\n preserveViewport: layer.preserveViewport,\n screenOverlays: layer.screenOverlays,\n suppressInfoWindows: layer.suppressInfoWindows,\n url: layer.url,\n zIndex: layer.zIndex\n });\n });\n this._layers.set(layer, newLayer);\n };\n KmlLayerManager.prototype.setOptions = function (layer, options) {\n this._layers.get(layer).then(function (l) { return l.setOptions(options); });\n };\n KmlLayerManager.prototype.deleteKmlLayer = function (layer) {\n var _this = this;\n this._layers.get(layer).then(function (l) {\n l.setMap(null);\n _this._layers.delete(layer);\n });\n };\n /**\n * Creates a Google Maps event listener for the given KmlLayer as an Observable\n */\n KmlLayerManager.prototype.createEventObservable = function (eventName, layer) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._layers.get(layer).then(function (m) {\n m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n return KmlLayerManager;\n}());\nexport { KmlLayerManager };\nKmlLayerManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nKmlLayerManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=kml-layer-manager.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from './../google-maps-api-wrapper';\nvar MarkerManager = (function () {\n function MarkerManager(_mapsWrapper, _zone) {\n this._mapsWrapper = _mapsWrapper;\n this._zone = _zone;\n this._markers = new Map();\n }\n MarkerManager.prototype.deleteMarker = function (marker) {\n var _this = this;\n var m = this._markers.get(marker);\n if (m == null) {\n // marker already deleted\n return Promise.resolve();\n }\n return m.then(function (m) {\n return _this._zone.run(function () {\n m.setMap(null);\n _this._markers.delete(marker);\n });\n });\n };\n MarkerManager.prototype.updateMarkerPosition = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setPosition({ lat: marker.latitude, lng: marker.longitude }); });\n };\n MarkerManager.prototype.updateTitle = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setTitle(marker.title); });\n };\n MarkerManager.prototype.updateLabel = function (marker) {\n return this._markers.get(marker).then(function (m) { m.setLabel(marker.label); });\n };\n MarkerManager.prototype.updateDraggable = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setDraggable(marker.draggable); });\n };\n MarkerManager.prototype.updateIcon = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setIcon(marker.iconUrl); });\n };\n MarkerManager.prototype.updateOpacity = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setOpacity(marker.opacity); });\n };\n MarkerManager.prototype.updateVisible = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setVisible(marker.visible); });\n };\n MarkerManager.prototype.updateZIndex = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setZIndex(marker.zIndex); });\n };\n MarkerManager.prototype.updateClickable = function (marker) {\n return this._markers.get(marker).then(function (m) { return m.setClickable(marker.clickable); });\n };\n MarkerManager.prototype.addMarker = function (marker) {\n var markerPromise = this._mapsWrapper.createMarker({\n position: { lat: marker.latitude, lng: marker.longitude },\n label: marker.label,\n draggable: marker.draggable,\n icon: marker.iconUrl,\n opacity: marker.opacity,\n visible: marker.visible,\n zIndex: marker.zIndex,\n title: marker.title,\n clickable: marker.clickable\n });\n this._markers.set(marker, markerPromise);\n };\n MarkerManager.prototype.getNativeMarker = function (marker) {\n return this._markers.get(marker);\n };\n MarkerManager.prototype.createEventObservable = function (eventName, marker) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._markers.get(marker).then(function (m) {\n m.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n return MarkerManager;\n}());\nexport { MarkerManager };\nMarkerManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nMarkerManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=marker-manager.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\nvar PolygonManager = (function () {\n function PolygonManager(_mapsWrapper, _zone) {\n this._mapsWrapper = _mapsWrapper;\n this._zone = _zone;\n this._polygons = new Map();\n }\n PolygonManager.prototype.addPolygon = function (path) {\n var polygonPromise = this._mapsWrapper.createPolygon({\n clickable: path.clickable,\n draggable: path.draggable,\n editable: path.editable,\n fillColor: path.fillColor,\n fillOpacity: path.fillOpacity,\n geodesic: path.geodesic,\n paths: path.paths,\n strokeColor: path.strokeColor,\n strokeOpacity: path.strokeOpacity,\n strokeWeight: path.strokeWeight,\n visible: path.visible,\n zIndex: path.zIndex,\n });\n this._polygons.set(path, polygonPromise);\n };\n PolygonManager.prototype.updatePolygon = function (polygon) {\n var _this = this;\n var m = this._polygons.get(polygon);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then(function (l) { return _this._zone.run(function () { l.setPaths(polygon.paths); }); });\n };\n PolygonManager.prototype.setPolygonOptions = function (path, options) {\n return this._polygons.get(path).then(function (l) { l.setOptions(options); });\n };\n PolygonManager.prototype.deletePolygon = function (paths) {\n var _this = this;\n var m = this._polygons.get(paths);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then(function (l) {\n return _this._zone.run(function () {\n l.setMap(null);\n _this._polygons.delete(paths);\n });\n });\n };\n PolygonManager.prototype.createEventObservable = function (eventName, path) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._polygons.get(path).then(function (l) {\n l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n return PolygonManager;\n}());\nexport { PolygonManager };\nPolygonManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nPolygonManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=polygon-manager.js.map","import { Injectable, NgZone } from '@angular/core';\nimport { Observable } from 'rxjs/Observable';\nimport { GoogleMapsAPIWrapper } from '../google-maps-api-wrapper';\nvar PolylineManager = (function () {\n function PolylineManager(_mapsWrapper, _zone) {\n this._mapsWrapper = _mapsWrapper;\n this._zone = _zone;\n this._polylines = new Map();\n }\n PolylineManager._convertPoints = function (line) {\n var path = line._getPoints().map(function (point) {\n return { lat: point.latitude, lng: point.longitude };\n });\n return path;\n };\n PolylineManager.prototype.addPolyline = function (line) {\n var path = PolylineManager._convertPoints(line);\n var polylinePromise = this._mapsWrapper.createPolyline({\n clickable: line.clickable,\n draggable: line.draggable,\n editable: line.editable,\n geodesic: line.geodesic,\n strokeColor: line.strokeColor,\n strokeOpacity: line.strokeOpacity,\n strokeWeight: line.strokeWeight,\n visible: line.visible,\n zIndex: line.zIndex,\n path: path\n });\n this._polylines.set(line, polylinePromise);\n };\n PolylineManager.prototype.updatePolylinePoints = function (line) {\n var _this = this;\n var path = PolylineManager._convertPoints(line);\n var m = this._polylines.get(line);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then(function (l) { return _this._zone.run(function () { l.setPath(path); }); });\n };\n PolylineManager.prototype.setPolylineOptions = function (line, options) {\n return this._polylines.get(line).then(function (l) { l.setOptions(options); });\n };\n PolylineManager.prototype.deletePolyline = function (line) {\n var _this = this;\n var m = this._polylines.get(line);\n if (m == null) {\n return Promise.resolve();\n }\n return m.then(function (l) {\n return _this._zone.run(function () {\n l.setMap(null);\n _this._polylines.delete(line);\n });\n });\n };\n PolylineManager.prototype.createEventObservable = function (eventName, line) {\n var _this = this;\n return Observable.create(function (observer) {\n _this._polylines.get(line).then(function (l) {\n l.addListener(eventName, function (e) { return _this._zone.run(function () { return observer.next(e); }); });\n });\n });\n };\n return PolylineManager;\n}());\nexport { PolylineManager };\nPolylineManager.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nPolylineManager.ctorParameters = function () { return [\n { type: GoogleMapsAPIWrapper, },\n { type: NgZone, },\n]; };\n//# sourceMappingURL=polyline-manager.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Inject, Injectable, InjectionToken } from '@angular/core';\nimport { DocumentRef, WindowRef } from '../../utils/browser-globals';\nimport { MapsAPILoader } from './maps-api-loader';\nexport var GoogleMapsScriptProtocol;\n(function (GoogleMapsScriptProtocol) {\n GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"HTTP\"] = 1] = \"HTTP\";\n GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"HTTPS\"] = 2] = \"HTTPS\";\n GoogleMapsScriptProtocol[GoogleMapsScriptProtocol[\"AUTO\"] = 3] = \"AUTO\";\n})(GoogleMapsScriptProtocol || (GoogleMapsScriptProtocol = {}));\n/**\n * Token for the config of the LazyMapsAPILoader. Please provide an object of type {@link\n * LazyMapsAPILoaderConfig}.\n */\nexport var LAZY_MAPS_API_CONFIG = new InjectionToken('angular-google-maps LAZY_MAPS_API_CONFIG');\nvar LazyMapsAPILoader = (function (_super) {\n __extends(LazyMapsAPILoader, _super);\n function LazyMapsAPILoader(config, w, d) {\n var _this = _super.call(this) || this;\n _this._config = config || {};\n _this._windowRef = w;\n _this._documentRef = d;\n return _this;\n }\n LazyMapsAPILoader.prototype.load = function () {\n var _this = this;\n if (this._scriptLoadingPromise) {\n return this._scriptLoadingPromise;\n }\n var script = this._documentRef.getNativeDocument().createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n var callbackName = \"angular2GoogleMapsLazyMapsAPILoader\";\n script.src = this._getScriptSrc(callbackName);\n this._scriptLoadingPromise = new Promise(function (resolve, reject) {\n _this._windowRef.getNativeWindow()[callbackName] = function () {\n resolve();\n };\n script.onerror = function (error) {\n reject(error);\n };\n });\n this._documentRef.getNativeDocument().body.appendChild(script);\n return this._scriptLoadingPromise;\n };\n LazyMapsAPILoader.prototype._getScriptSrc = function (callbackName) {\n var protocolType = (this._config && this._config.protocol) || GoogleMapsScriptProtocol.HTTPS;\n var protocol;\n switch (protocolType) {\n case GoogleMapsScriptProtocol.AUTO:\n protocol = '';\n break;\n case GoogleMapsScriptProtocol.HTTP:\n protocol = 'http:';\n break;\n case GoogleMapsScriptProtocol.HTTPS:\n protocol = 'https:';\n break;\n }\n var hostAndPath = this._config.hostAndPath || 'maps.googleapis.com/maps/api/js';\n var queryParams = {\n v: this._config.apiVersion || '3',\n callback: callbackName,\n key: this._config.apiKey,\n client: this._config.clientId,\n channel: this._config.channel,\n libraries: this._config.libraries,\n region: this._config.region,\n language: this._config.language\n };\n var params = Object.keys(queryParams)\n .filter(function (k) { return queryParams[k] != null; })\n .filter(function (k) {\n // remove empty arrays\n return !Array.isArray(queryParams[k]) ||\n (Array.isArray(queryParams[k]) && queryParams[k].length > 0);\n })\n .map(function (k) {\n // join arrays as comma seperated strings\n var i = queryParams[k];\n if (Array.isArray(i)) {\n return { key: k, value: i.join(',') };\n }\n return { key: k, value: queryParams[k] };\n })\n .map(function (entry) {\n return entry.key + \"=\" + entry.value;\n })\n .join('&');\n return protocol + \"//\" + hostAndPath + \"?\" + params;\n };\n return LazyMapsAPILoader;\n}(MapsAPILoader));\nexport { LazyMapsAPILoader };\nLazyMapsAPILoader.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nLazyMapsAPILoader.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LAZY_MAPS_API_CONFIG,] },] },\n { type: WindowRef, },\n { type: DocumentRef, },\n]; };\n//# sourceMappingURL=lazy-maps-api-loader.js.map","import { Injectable } from '@angular/core';\nvar MapsAPILoader = (function () {\n function MapsAPILoader() {\n }\n return MapsAPILoader;\n}());\nexport { MapsAPILoader };\nMapsAPILoader.decorators = [\n { type: Injectable },\n];\n/** @nocollapse */\nMapsAPILoader.ctorParameters = function () { return []; };\n//# sourceMappingURL=maps-api-loader.js.map","/**\n * When using the NoOpMapsAPILoader, the Google Maps API must be added to the page via a `<script>`\n * Tag.\n * It's important that the Google Maps API script gets loaded first on the page.\n */\nvar NoOpMapsAPILoader = (function () {\n function NoOpMapsAPILoader() {\n }\n NoOpMapsAPILoader.prototype.load = function () {\n if (!window.google || !window.google.maps) {\n throw new Error('Google Maps API not loaded on page. Make sure window.google.maps is available!');\n }\n return Promise.resolve();\n };\n return NoOpMapsAPILoader;\n}());\nexport { NoOpMapsAPILoader };\n//# sourceMappingURL=noop-maps-api-loader.js.map","var WindowRef = (function () {\n function WindowRef() {\n }\n WindowRef.prototype.getNativeWindow = function () { return window; };\n return WindowRef;\n}());\nexport { WindowRef };\nvar DocumentRef = (function () {\n function DocumentRef() {\n }\n DocumentRef.prototype.getNativeDocument = function () { return document; };\n return DocumentRef;\n}());\nexport { DocumentRef };\nexport var BROWSER_GLOBALS_PROVIDERS = [WindowRef, DocumentRef];\n//# sourceMappingURL=browser-globals.js.map","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\n/**\n * AnimationBuilder is an injectable service that is available when the {@link\n * BrowserAnimationsModule BrowserAnimationsModule} or {@link NoopAnimationsModule\n * NoopAnimationsModule} modules are used within an application.\n *\n * The purpose if this service is to produce an animation sequence programmatically within an\n * angular component or directive.\n *\n * Programmatic animations are first built and then a player is created when the build animation is\n * attached to an element.\n *\n * ```ts\n * // remember to include the BrowserAnimationsModule module for this to work...\n * import {AnimationBuilder} from '@angular/animations';\n *\n * class MyCmp {\n * constructor(private _builder: AnimationBuilder) {}\n *\n * makeAnimation(element: any) {\n * // first build the animation\n * const myAnimation = this._builder.build([\n * style({ width: 0 }),\n * animate(1000, style({ width: '100px' }))\n * ]);\n *\n * // then create a player from it\n * const player = myAnimation.create(element);\n *\n * player.play();\n * }\n * }\n * ```\n *\n * When an animation is built an instance of {@link AnimationFactory AnimationFactory} will be\n * returned. Using that an {@link AnimationPlayer AnimationPlayer} can be created which can then be\n * used to start the animation.\n *\n * @experimental Animation support is experimental.\n */\nvar AnimationBuilder = /** @class */ (function () {\n function AnimationBuilder() {\n }\n return AnimationBuilder;\n}());\n/**\n * An instance of `AnimationFactory` is returned from {@link AnimationBuilder#build\n * AnimationBuilder.build}.\n *\n * @experimental Animation support is experimental.\n */\nvar AnimationFactory = /** @class */ (function () {\n function AnimationFactory() {\n }\n return AnimationFactory;\n}());\n\n/**\n * @experimental Animation support is experimental.\n */\nvar AUTO_STYLE = '*';\n/**\n * `trigger` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the\n * {@link Component#animations component animations metadata page} to gain a better\n * understanding of how animations in Angular are used.\n *\n * `trigger` Creates an animation trigger which will a list of {@link state state} and\n * {@link transition transition} entries that will be evaluated when the expression\n * bound to the trigger changes.\n *\n * Triggers are registered within the component annotation data under the\n * {@link Component#animations animations section}. An animation trigger can be placed on an element\n * within a template by referencing the name of the trigger followed by the expression value that\n the\n * trigger is bound to (in the form of `[@triggerName]=\"expression\"`.\n *\n * Animation trigger bindings strigify values and then match the previous and current values against\n * any linked transitions. If a boolean value is provided into the trigger binding then it will both\n * be represented as `1` or `true` and `0` or `false` for a true and false boolean values\n * respectively.\n *\n * ### Usage\n *\n * `trigger` will create an animation trigger reference based on the provided `name` value. The\n * provided `animation` value is expected to be an array consisting of {@link state state} and\n * {@link transition 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 will make use of the `myAnimationTrigger` animation\n trigger 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 * ```\n * // this method will be run each time the `myAnimationTrigger`\n * // 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 * The inline method will be run each time the trigger\n * value changes\n *\n * ## Disable Animations\n * A special animation control binding called `@.disabled` can be placed on an element which will\n then disable animations for any inner animation triggers situated within the element as well as\n any animations on the element itself.\n *\n * When true, the `@.disabled` binding will prevent all animations from rendering. The example\n below shows how to use this feature:\n *\n * ```ts\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 * The `@childAnimation` trigger will not animate because `@.disabled` prevents it from happening\n (when true).\n *\n * Note that `@.disabled` will only disable all animations (this means any animations running on\n * the same element will also be disabled).\n *\n * ### Disabling Animations Application-wide\n * When an area of the template is set to have animations disabled, **all** inner components will\n also have their animations disabled as well. This means that all animations for an angular\n application can be disabled by placing a host binding set on `@.disabled` on the topmost Angular\n component.\n *\n * ```ts\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 * ### What about animations that us `query()` and `animateChild()`?\n * Despite inner animations being disabled, a parent animation can {@link query query} for inner\n elements located in disabled areas of the template and still animate them as it sees fit. This is\n also the case for when a sub animation is queried by a parent and then later animated using {@link\n animateChild animateChild}.\n\n * ### Detecting when an animation is disabled\n * If a region of the DOM (or the entire application) has its animations disabled, then animation\n * trigger callbacks will still fire just as normal (only for zero seconds).\n *\n * When a trigger callback fires it will provide an instance of an {@link AnimationEvent}. If\n animations\n * are disabled then the `.disabled` flag on the event will be true.\n *\n * @experimental Animation support is experimental.\n */\nfunction trigger(name, definitions) {\n return { type: 7 /* Trigger */, name: name, definitions: definitions, options: {} };\n}\n/**\n * `animate` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `animate` specifies an animation step that will apply the provided `styles` data for a given\n * amount of time based on the provided `timing` expression value. Calls to `animate` are expected\n * to be used within {@link sequence an animation sequence}, {@link group group}, or {@link\n * transition transition}.\n *\n * ### Usage\n *\n * The `animate` function accepts two input parameters: `timing` and `styles`:\n *\n * - `timing` is a string based value that can be a combination of a duration with optional delay\n * and easing values. The format for the expression breaks down to `duration delay easing`\n * (therefore a value such as `1s 100ms ease-out` will be parse itself into `duration=1000,\n * delay=100, easing=ease-out`. If a numeric value is provided then that will be used as the\n * `duration` value in millisecond form.\n * - `styles` is the style input data which can either be a call to {@link style style} or {@link\n * keyframes keyframes}. If left empty then the styles from the destination state will be collected\n * and used (this is useful when describing an animation step that will complete an animation by\n * {@link transition#the-final-animate-call animating to the final state}).\n *\n * ```typescript\n * // various functions for specifying timing data\n * animate(500, style(...))\n * animate(\"1s\", style(...))\n * animate(\"100ms 0.5s\", style(...))\n * animate(\"5s ease\", style(...))\n * animate(\"5s 10ms cubic-bezier(.17,.67,.88,.1)\", style(...))\n *\n * // either style() of keyframes() can be used\n * animate(500, style({ background: \"red\" }))\n * animate(500, keyframes([\n * style({ background: \"blue\" })),\n * style({ background: \"red\" }))\n * ])\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction animate(timings, styles) {\n if (styles === void 0) { styles = null; }\n return { type: 4 /* Animate */, styles: styles, timings: timings };\n}\n/**\n * `group` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `group` specifies a list of animation steps that are all run in parallel. Grouped animations are\n * useful when a series of styles must be animated/closed off at different starting/ending times.\n *\n * The `group` function can either be used within a {@link sequence sequence} or a {@link transition\n * transition} and it will only continue to the next instruction once all of the inner animation\n * steps have completed.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `group` animation function can either consist of {@link\n * style style} or {@link animate animate} function calls. Each call to `style()` or `animate()`\n * within a group will be executed instantly (use {@link keyframes keyframes} or a {@link\n * animate#usage animate() with a delay value} to offset styles to be applied at a later time).\n *\n * ```typescript\n * group([\n * animate(\"1s\", { background: \"black\" }))\n * animate(\"2s\", { color: \"white\" }))\n * ])\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction group(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 3 /* Group */, steps: steps, options: options };\n}\n/**\n * `sequence` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used by\n * default when an array is passed as animation data into {@link transition transition}.)\n *\n * The `sequence` function can either be used within a {@link group group} or a {@link transition\n * transition} and it will only continue to the next instruction once each of the inner animation\n * steps have completed.\n *\n * To perform animation styling in parallel with other animation steps then have a look at the\n * {@link group group} animation function.\n *\n * ### Usage\n *\n * The `steps` data that is passed into the `sequence` animation function can either consist of\n * {@link style style} or {@link animate animate} function calls. A call to `style()` will apply the\n * provided styling data immediately while a call to `animate()` will apply its styling data over a\n * given time depending on its timing data.\n *\n * ```typescript\n * sequence([\n * style({ opacity: 0 })),\n * animate(\"1s\", { opacity: 1 }))\n * ])\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction sequence(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 2 /* Sequence */, steps: steps, options: options };\n}\n/**\n * `style` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `style` declares a key/value object containing CSS properties/styles that can then be used for\n * {@link state animation states}, within an {@link sequence animation sequence}, or as styling data\n * for both {@link animate animate} and {@link keyframes keyframes}.\n *\n * ### Usage\n *\n * `style` takes in a key/value string map as data and expects one or more CSS property/value pairs\n * to be defined.\n *\n * ```typescript\n * // string values are used for css properties\n * style({ background: \"red\", color: \"blue\" })\n *\n * // numerical (pixel) values are also supported\n * style({ width: 100, height: 0 })\n * ```\n *\n * #### Auto-styles (using `*`)\n *\n * When an asterix (`*`) character is used as a value then it will be detected from the element\n * being animated and applied as animation data when the animation starts.\n *\n * This feature proves useful for a state depending on layout and/or environment factors; in such\n * cases the styles are calculated just before the animation starts.\n *\n * ```typescript\n * // the steps below will animate from 0 to the\n * // actual height of the element\n * style({ height: 0 }),\n * animate(\"1s\", style({ height: \"*\" }))\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction style(tokens) {\n return { type: 6 /* Style */, styles: tokens, offset: null };\n}\n/**\n * `state` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `state` declares an animation state within the given trigger. When a state is active within a\n * component then its associated styles will persist on the element that the trigger is attached to\n * (even when the animation ends).\n *\n * To animate between states, have a look at the animation {@link transition transition} DSL\n * function. To register states to an animation trigger please have a look at the {@link trigger\n * trigger} function.\n *\n * #### The `void` state\n *\n * The `void` state value is a reserved word that angular uses to determine when the element is not\n * apart of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the\n * associated element is void).\n *\n * #### The `*` (default) state\n *\n * The `*` state (when styled) is a fallback state that will be used if the state that is being\n * animated is not declared within the trigger.\n *\n * ### Usage\n *\n * `state` will declare an animation state with its associated styles\n * within the given trigger.\n *\n * - `stateNameExpr` can be one or more state names separated by commas.\n * - `styles` refers to the {@link style styling data} that will be persisted on the element once\n * the state has been reached.\n *\n * ```typescript\n * // \"void\" is a reserved name for a state and is used to represent\n * // the state in which an element is detached from from the application.\n * state(\"void\", style({ height: 0 }))\n *\n * // user-defined states\n * state(\"closed\", style({ height: 0 }))\n * state(\"open, visible\", style({ height: \"*\" }))\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction state(name, styles, options) {\n return { type: 0 /* State */, name: name, styles: styles, options: options };\n}\n/**\n * `keyframes` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `keyframes` specifies a collection of {@link style style} entries each optionally characterized\n * by an `offset` value.\n *\n * ### Usage\n *\n * The `keyframes` animation function is designed to be used alongside the {@link animate animate}\n * animation function. Instead of applying animations from where they are currently to their\n * destination, keyframes can describe how each style entry is applied and at what point within the\n * animation arc (much like CSS Keyframe Animations do).\n *\n * For each `style()` entry an `offset` value can be set. Doing so allows to specify at what\n * percentage of the animate time the styles will be applied.\n *\n * ```typescript\n * // the provided offset values describe when each backgroundColor value is applied.\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 * Alternatively, if there are no `offset` values used within the style entries then the offsets\n * will be 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 * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction keyframes(steps) {\n return { type: 5 /* Keyframes */, steps: steps };\n}\n/**\n * `transition` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. If this information is new, please navigate to the {@link\n * Component#animations component animations metadata page} to gain a better understanding of\n * how animations in Angular are used.\n *\n * `transition` declares the {@link sequence sequence of animation steps} that will be run when the\n * provided `stateChangeExpr` value is satisfied. The `stateChangeExpr` consists of a `state1 =>\n * state2` which consists of two known states (use an asterix (`*`) to refer to a dynamic starting\n * and/or ending state).\n *\n * A function can also be provided as the `stateChangeExpr` argument for a transition and this\n * function will be executed each time a state change occurs. If the value returned within the\n * function is true then the associated animation will be run.\n *\n * Animation transitions are placed within an {@link trigger animation trigger}. For an transition\n * to animate to a state value and persist its styles then one or more {@link state animation\n * states} is expected to be defined.\n *\n * ### Usage\n *\n * An animation transition is kicked off the `stateChangeExpr` predicate evaluates to true based on\n * what the previous state is and what the current state has become. In other words, if a transition\n * is defined that matches the old/current state criteria then the associated animation will be\n * triggered.\n *\n * ```typescript\n * // all transition/state changes are defined within an animation trigger\n * trigger(\"myAnimationTrigger\", [\n * // if a state is defined then its styles will be persisted when the\n * // animation has fully completed itself\n * state(\"on\", style({ background: \"green\" })),\n * state(\"off\", style({ background: \"grey\" })),\n *\n * // a transition animation that will be kicked off when the state value\n * // bound to \"myAnimationTrigger\" changes from \"on\" to \"off\"\n * transition(\"on => off\", animate(500)),\n *\n * // it is also possible to do run the same animation for both directions\n * transition(\"on <=> off\", animate(500)),\n *\n * // or to define multiple states pairs separated by commas\n * transition(\"on => off, off => void\", animate(500)),\n *\n * // this is a catch-all state change for when an element is inserted into\n * // the page and the destination state is unknown\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ]),\n *\n * // this will capture a state change between any states\n * transition(\"* => *\", animate(\"1s 0s\")),\n *\n * // you can also go full out and include a function\n * transition((fromState, toState) => {\n * // when `true` then it will allow the animation below to be invoked\n * return fromState == \"off\" && toState == \"on\";\n * }, animate(\"1s 0s\"))\n * ])\n * ```\n *\n * The template associated with this component will make use of the `myAnimationTrigger` animation\n * trigger 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 * #### The final `animate` call\n *\n * If the final step within the transition steps is a call to `animate()` that **only** uses a\n * timing value with **no style data** then it will be automatically used as the final animation arc\n * for the element to animate itself to the final state. This involves an automatic mix of\n * adding/removing CSS styles so that the element will be in the exact state it should be for the\n * applied state to be presented correctly.\n *\n * ```\n * // start off by hiding the element, but make sure that it animates properly to whatever state\n * // is currently active for \"myAnimationTrigger\"\n * transition(\"void => *\", [\n * style({ opacity: 0 }),\n * animate(500)\n * ])\n * ```\n *\n * ### Using :enter and :leave\n *\n * Given that enter (insertion) and leave (removal) animations are so common, the `transition`\n * function accepts both `:enter` and `:leave` values which are aliases for the `void => *` and `*\n * => void` state changes.\n *\n * ```\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 * ### Boolean values\n * if a trigger binding value is a boolean value then it can be matched using a transition\n * expression that compares `true` and `false` or `1` and `0`.\n *\n * ```\n * // in the template\n * <div [@openClose]=\"open ? true : false\">...</div>\n *\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 * ### Using :increment and :decrement\n * In addition to the :enter and :leave transition aliases, the :increment and :decrement aliases\n * can be used to kick off a transition when a numeric value has increased or decreased in value.\n *\n * ```\n * import {group, animate, query, transition, style, trigger} from '@angular/animations';\n * import {Component} from '@angular/core';\n *\n * @Component({\n * selector: 'banner-carousel-component',\n * styles: [`\n * .banner-container {\n * position:relative;\n * height:500px;\n * overflow:hidden;\n * }\n * .banner-container > .banner {\n * position:absolute;\n * left:0;\n * top:0;\n * font-size:200px;\n * line-height:500px;\n * font-weight:bold;\n * text-align:center;\n * width:100%;\n * }\n * `],\n * template: `\n * <button (click)=\"previous()\">Previous</button>\n * <button (click)=\"next()\">Next</button>\n * <hr>\n * <div [@bannerAnimation]=\"selectedIndex\" class=\"banner-container\">\n * <div class=\"banner\" *ngFor=\"let banner of banners\"> {{ banner }} </div>\n * </div>\n * `,\n * animations: [\n * trigger('bannerAnimation', [\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 * 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 * })\n * class BannerCarouselComponent {\n * allBanners: string[] = ['1', '2', '3', '4'];\n * selectedIndex: number = 0;\n *\n * get banners() {\n * return [this.allBanners[this.selectedIndex]];\n * }\n *\n * previous() {\n * this.selectedIndex = Math.max(this.selectedIndex - 1, 0);\n * }\n *\n * next() {\n * this.selectedIndex = Math.min(this.selectedIndex + 1, this.allBanners.length - 1);\n * }\n * }\n * ```\n *\n * {@example core/animation/ts/dsl/animation_example.ts region='Component'}\n *\n * @experimental Animation support is experimental.\n */\nfunction transition(stateChangeExpr, steps, options) {\n if (options === void 0) { options = null; }\n return { type: 1 /* Transition */, expr: stateChangeExpr, animation: steps, options: options };\n}\n/**\n * `animation` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language.\n *\n * `var myAnimation = animation(...)` is designed to produce a reusable animation that can be later\n * invoked in another animation or sequence. Reusable animations are designed to make use of\n * animation parameters and the produced animation can be used via the `useAnimation` method.\n *\n * ```\n * var fadeAnimation = animation([\n * style({ opacity: '{{ start }}' }),\n * animate('{{ time }}',\n * style({ opacity: '{{ end }}'}))\n * ], { params: { time: '1000ms', start: 0, end: 1 }});\n * ```\n *\n * If parameters are attached to an animation then they act as **default parameter values**. When an\n * animation is invoked via `useAnimation` then parameter values are allowed to be passed in\n * directly. If any of the passed in parameter values are missing then the default values will be\n * used.\n *\n * ```\n * useAnimation(fadeAnimation, {\n * params: {\n * time: '2s',\n * start: 1,\n * end: 0\n * }\n * })\n * ```\n *\n * If one or more parameter values are missing before animated then an error will be thrown.\n *\n * @experimental Animation support is experimental.\n */\nfunction animation(steps, options) {\n if (options === void 0) { options = null; }\n return { type: 8 /* Reference */, animation: steps, options: options };\n}\n/**\n * `animateChild` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. It works by allowing a queried element to execute its own\n * animation within the animation sequence.\n *\n * Each time an animation is triggered in angular, the parent animation\n * will always get priority and any child animations will be blocked. In order\n * for a child animation to run, the parent animation must query each of the elements\n * containing child animations and then allow the animations to run using `animateChild`.\n *\n * The example HTML code below shows both parent and child elements that have animation\n * triggers that will execute at the same time.\n *\n * ```html\n * <!-- parent-child.component.html -->\n * <button (click)=\"exp =! exp\">Toggle</button>\n * <hr>\n *\n * <div [@parentAnimation]=\"exp\">\n * <header>Hello</header>\n * <div [@childAnimation]=\"exp\">\n * one\n * </div>\n * <div [@childAnimation]=\"exp\">\n * two\n * </div>\n * <div [@childAnimation]=\"exp\">\n * three\n * </div>\n * </div>\n * ```\n *\n * Now when the `exp` value changes to true, only the `parentAnimation` animation will animate\n * because it has priority. However, using `query` and `animateChild` each of the inner animations\n * can also fire:\n *\n * ```ts\n * // parent-child.component.ts\n * import {trigger, transition, animate, style, query, animateChild} from '@angular/animations';\n * @Component({\n * selector: 'parent-child-component',\n * animations: [\n * trigger('parentAnimation', [\n * transition('false => true', [\n * query('header', [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ]),\n * query('@childAnimation', [\n * animateChild()\n * ])\n * ])\n * ]),\n * trigger('childAnimation', [\n * transition('false => true', [\n * style({ opacity: 0 }),\n * animate(500, style({ opacity: 1 }))\n * ])\n * ])\n * ]\n * })\n * class ParentChildCmp {\n * exp: boolean = false;\n * }\n * ```\n *\n * In the animation code above, when the `parentAnimation` transition kicks off it first queries to\n * find the header element and fades it in. It then finds each of the sub elements that contain the\n * `@childAnimation` trigger and then allows for their animations to fire.\n *\n * This example can be further extended by using stagger:\n *\n * ```ts\n * query('@childAnimation', stagger(100, [\n * animateChild()\n * ]))\n * ```\n *\n * Now each of the sub animations start off with respect to the `100ms` staggering step.\n *\n * ## The first frame of child animations\n * When sub animations are executed using `animateChild` the animation engine will always apply the\n * first frame of every sub animation immediately at the start of the animation sequence. This way\n * the parent animation does not need to set any initial styling data on the sub elements before the\n * sub animations kick off.\n *\n * In the example above the first frame of the `childAnimation`'s `false => true` transition\n * consists of a style of `opacity: 0`. This is applied immediately when the `parentAnimation`\n * animation transition sequence starts. Only then when the `@childAnimation` is queried and called\n * with `animateChild` will it then animate to its destination of `opacity: 1`.\n *\n * Note that this feature designed to be used alongside {@link query query()} and it will only work\n * with animations that are assigned using the Angular animation DSL (this means that CSS keyframes\n * and transitions are not handled by this API).\n *\n * @experimental Animation support is experimental.\n */\nfunction animateChild(options) {\n if (options === void 0) { options = null; }\n return { type: 9 /* AnimateChild */, options: options };\n}\n/**\n * `useAnimation` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. It is used to kick off a reusable animation that is created using {@link\n * animation animation()}.\n *\n * @experimental Animation support is experimental.\n */\nfunction useAnimation(animation, options) {\n if (options === void 0) { options = null; }\n return { type: 10 /* AnimateRef */, animation: animation, options: options };\n}\n/**\n * `query` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language.\n *\n * query() is used to find one or more inner elements within the current element that is\n * being animated within the sequence. The provided animation steps are applied\n * to the queried element (by default, an array is provided, then this will be\n * treated as an animation sequence).\n *\n * ### Usage\n *\n * query() is designed to collect multiple elements and works internally by using\n * `element.querySelectorAll`. An additional options object can be provided which\n * can be used to limit the total amount of items to be collected.\n *\n * ```js\n * query('div', [\n * animate(...),\n * animate(...)\n * ], { limit: 1 })\n * ```\n *\n * query(), by default, will throw an error when zero items are found. If a query\n * has the `optional` flag set to true then this error will be ignored.\n *\n * ```js\n * query('.some-element-that-may-not-be-there', [\n * animate(...),\n * animate(...)\n * ], { optional: true })\n * ```\n *\n * ### Special Selector Values\n *\n * The selector value within a query can collect elements that contain angular-specific\n * characteristics\n * using special pseudo-selectors tokens.\n *\n * These include:\n *\n * - Querying for newly inserted/removed elements using `query(\":enter\")`/`query(\":leave\")`\n * - Querying all currently animating elements using `query(\":animating\")`\n * - Querying elements that contain an animation trigger using `query(\"@triggerName\")`\n * - Querying all elements that contain an animation triggers using `query(\"@*\")`\n * - Including the current element into the animation sequence using `query(\":self\")`\n *\n *\n * Each of these pseudo-selector tokens can be merged together into a combined query selector\n * string:\n *\n * ```\n * query(':self, .record:enter, .record:leave, @subTrigger', [...])\n * ```\n *\n * ### Demo\n *\n * ```\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 * @experimental Animation support is experimental.\n */\nfunction query(selector, animation, options) {\n if (options === void 0) { options = null; }\n return { type: 11 /* Query */, selector: selector, animation: animation, options: options };\n}\n/**\n * `stagger` is an animation-specific function that is designed to be used inside of Angular's\n * animation DSL language. It is designed to be used inside of an animation {@link query query()}\n * and works by issuing a timing gap between after each queried item is animated.\n *\n * ### Usage\n *\n * In the example below there is a container element that 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 * ```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 * The component code for this looks as such:\n *\n * ```ts\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 * And now for the animation trigger code:\n *\n * ```ts\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 * Now each time the items are added/removed then either the opacity\n * fade-in animation will run or each removed item will be faded out.\n * When either of these animations occur then a stagger effect will be\n * applied after each item's animation is started.\n *\n * @experimental Animation support is experimental.\n */\nfunction stagger(timings, animation) {\n return { type: 12 /* Stagger */, timings: timings, animation: animation };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 scheduleMicroTask(cb) {\n Promise.resolve(null).then(cb);\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nvar NoopAnimationPlayer = /** @class */ (function () {\n function NoopAnimationPlayer(duration, delay) {\n if (duration === void 0) { duration = 0; }\n if (delay === void 0) { delay = 0; }\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._started = false;\n this._destroyed = false;\n this._finished = false;\n this.parentPlayer = null;\n this.totalTime = duration + delay;\n }\n NoopAnimationPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n NoopAnimationPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n NoopAnimationPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n NoopAnimationPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n NoopAnimationPlayer.prototype.hasStarted = function () { return this._started; };\n NoopAnimationPlayer.prototype.init = function () { };\n NoopAnimationPlayer.prototype.play = function () {\n if (!this.hasStarted()) {\n this._onStart();\n this.triggerMicrotask();\n }\n this._started = true;\n };\n /* @internal */\n /* @internal */\n NoopAnimationPlayer.prototype.triggerMicrotask = /* @internal */\n function () {\n var _this = this;\n scheduleMicroTask(function () { return _this._onFinish(); });\n };\n NoopAnimationPlayer.prototype._onStart = function () {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n };\n NoopAnimationPlayer.prototype.pause = function () { };\n NoopAnimationPlayer.prototype.restart = function () { };\n NoopAnimationPlayer.prototype.finish = function () { this._onFinish(); };\n NoopAnimationPlayer.prototype.destroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n if (!this.hasStarted()) {\n this._onStart();\n }\n this.finish();\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n NoopAnimationPlayer.prototype.reset = function () { };\n NoopAnimationPlayer.prototype.setPosition = function (p) { };\n NoopAnimationPlayer.prototype.getPosition = function () { return 0; };\n /* @internal */\n /* @internal */\n NoopAnimationPlayer.prototype.triggerCallback = /* @internal */\n function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return NoopAnimationPlayer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 AnimationGroupPlayer = /** @class */ (function () {\n function AnimationGroupPlayer(_players) {\n var _this = this;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this._onDestroyFns = [];\n this.parentPlayer = null;\n this.totalTime = 0;\n this.players = _players;\n var doneCount = 0;\n var destroyCount = 0;\n var startCount = 0;\n var total = this.players.length;\n if (total == 0) {\n scheduleMicroTask(function () { return _this._onFinish(); });\n }\n else {\n this.players.forEach(function (player) {\n player.onDone(function () {\n if (++doneCount == total) {\n _this._onFinish();\n }\n });\n player.onDestroy(function () {\n if (++destroyCount == total) {\n _this._onDestroy();\n }\n });\n player.onStart(function () {\n if (++startCount == total) {\n _this._onStart();\n }\n });\n });\n }\n this.totalTime = this.players.reduce(function (time, player) { return Math.max(time, player.totalTime); }, 0);\n }\n AnimationGroupPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n AnimationGroupPlayer.prototype.init = function () { this.players.forEach(function (player) { return player.init(); }); };\n AnimationGroupPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n AnimationGroupPlayer.prototype._onStart = function () {\n if (!this.hasStarted()) {\n this._started = true;\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n }\n };\n AnimationGroupPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n AnimationGroupPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n AnimationGroupPlayer.prototype.hasStarted = function () { return this._started; };\n AnimationGroupPlayer.prototype.play = function () {\n if (!this.parentPlayer) {\n this.init();\n }\n this._onStart();\n this.players.forEach(function (player) { return player.play(); });\n };\n AnimationGroupPlayer.prototype.pause = function () { this.players.forEach(function (player) { return player.pause(); }); };\n AnimationGroupPlayer.prototype.restart = function () { this.players.forEach(function (player) { return player.restart(); }); };\n AnimationGroupPlayer.prototype.finish = function () {\n this._onFinish();\n this.players.forEach(function (player) { return player.finish(); });\n };\n AnimationGroupPlayer.prototype.destroy = function () { this._onDestroy(); };\n AnimationGroupPlayer.prototype._onDestroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n this._onFinish();\n this.players.forEach(function (player) { return player.destroy(); });\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n AnimationGroupPlayer.prototype.reset = function () {\n this.players.forEach(function (player) { return player.reset(); });\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n };\n AnimationGroupPlayer.prototype.setPosition = function (p) {\n var timeAtPosition = p * this.totalTime;\n this.players.forEach(function (player) {\n var position = player.totalTime ? Math.min(1, timeAtPosition / player.totalTime) : 1;\n player.setPosition(position);\n });\n };\n AnimationGroupPlayer.prototype.getPosition = function () {\n var min = 0;\n this.players.forEach(function (player) {\n var p = player.getPosition();\n min = Math.min(p, min);\n });\n return min;\n };\n AnimationGroupPlayer.prototype.beforeDestroy = function () {\n this.players.forEach(function (player) {\n if (player.beforeDestroy) {\n player.beforeDestroy();\n }\n });\n };\n /* @internal */\n /* @internal */\n AnimationGroupPlayer.prototype.triggerCallback = /* @internal */\n function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return AnimationGroupPlayer;\n}());\n\nvar ɵPRE_STYLE = '!';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 { AnimationBuilder, AnimationFactory, AUTO_STYLE, animate, animateChild, animation, group, keyframes, query, sequence, stagger, state, style, transition, trigger, useAnimation, NoopAnimationPlayer, ɵPRE_STYLE, AnimationGroupPlayer as ɵAnimationGroupPlayer };\n//# sourceMappingURL=animations.js.map\n","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { AUTO_STYLE, NoopAnimationPlayer, sequence, style, ɵAnimationGroupPlayer, ɵPRE_STYLE } from '@angular/animations';\nimport { Injectable } from '@angular/core';\nimport { __assign, __extends, __read, __spread, __values } from 'tslib';\n\nfunction optimizeGroupPlayer(players) {\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}\nfunction normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, postStyles) {\n if (preStyles === void 0) { preStyles = {}; }\n if (postStyles === void 0) { postStyles = {}; }\n var errors = [];\n var normalizedKeyframes = [];\n var previousOffset = -1;\n var previousKeyframe = null;\n keyframes.forEach(function (kf) {\n var offset = kf['offset'];\n var isSameOffset = offset == previousOffset;\n var normalizedKeyframe = (isSameOffset && previousKeyframe) || {};\n Object.keys(kf).forEach(function (prop) {\n var normalizedProp = prop;\n var 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 case AUTO_STYLE:\n normalizedValue = postStyles[prop];\n break;\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 var LINE_START = '\\n - ';\n throw new Error(\"Unable to animate due to the following errors:\" + LINE_START + errors.join(LINE_START));\n }\n return normalizedKeyframes;\n}\nfunction listenOnPlayer(player, eventName, event, callback) {\n switch (eventName) {\n case 'start':\n player.onStart(function () { return callback(event && copyAnimationEvent(event, 'start', player)); });\n break;\n case 'done':\n player.onDone(function () { return callback(event && copyAnimationEvent(event, 'done', player)); });\n break;\n case 'destroy':\n player.onDestroy(function () { return callback(event && copyAnimationEvent(event, 'destroy', player)); });\n break;\n }\n}\nfunction copyAnimationEvent(e, phaseName, player) {\n var totalTime = player.totalTime;\n var disabled = player.disabled ? true : false;\n var event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime, disabled);\n var data = e['_data'];\n if (data != null) {\n event['_data'] = data;\n }\n return event;\n}\nfunction makeAnimationEvent(element, triggerName, fromState, toState, phaseName, totalTime, disabled) {\n if (phaseName === void 0) { phaseName = ''; }\n if (totalTime === void 0) { totalTime = 0; }\n return { element: element, triggerName: triggerName, fromState: fromState, toState: toState, phaseName: phaseName, totalTime: totalTime, disabled: !!disabled };\n}\nfunction getOrSetAsInMap(map, key, defaultValue) {\n var value;\n if (map instanceof Map) {\n value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n }\n else {\n value = map[key];\n if (!value) {\n value = map[key] = defaultValue;\n }\n }\n return value;\n}\nfunction parseTimelineCommand(command) {\n var separatorPos = command.indexOf(':');\n var id = command.substring(1, separatorPos);\n var action = command.substr(separatorPos + 1);\n return [id, action];\n}\nvar _contains = function (elm1, elm2) { return false; };\nvar _matches = function (element, selector) {\n return false;\n};\nvar _query = function (element, selector, multi) {\n return [];\n};\nif (typeof Element != 'undefined') {\n // this is well supported in all browsers\n _contains = function (elm1, elm2) { return elm1.contains(elm2); };\n if (Element.prototype.matches) {\n _matches = function (element, selector) { return element.matches(selector); };\n }\n else {\n var proto = Element.prototype;\n var fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||\n proto.oMatchesSelector || proto.webkitMatchesSelector;\n if (fn_1) {\n _matches = function (element, selector) { return fn_1.apply(element, [selector]); };\n }\n }\n _query = function (element, selector, multi) {\n var results = [];\n if (multi) {\n results.push.apply(results, __spread(element.querySelectorAll(selector)));\n }\n else {\n var elm = element.querySelector(selector);\n if (elm) {\n results.push(elm);\n }\n }\n return results;\n };\n}\nfunction containsVendorPrefix(prop) {\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}\nvar _CACHED_BODY = null;\nvar _IS_WEBKIT = false;\nfunction validateStyleProperty(prop) {\n if (!_CACHED_BODY) {\n _CACHED_BODY = getBodyNode() || {};\n _IS_WEBKIT = _CACHED_BODY.style ? ('WebkitAppearance' in _CACHED_BODY.style) : false;\n }\n var result = true;\n if (_CACHED_BODY.style && !containsVendorPrefix(prop)) {\n result = prop in _CACHED_BODY.style;\n if (!result && _IS_WEBKIT) {\n var camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);\n result = camelProp in _CACHED_BODY.style;\n }\n }\n return result;\n}\nfunction getBodyNode() {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\nvar matchesElement = _matches;\nvar containsElement = _contains;\nvar invokeQuery = _query;\n\n/**\n * @experimental\n */\nvar NoopAnimationDriver = /** @class */ (function () {\n function NoopAnimationDriver() {\n }\n NoopAnimationDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };\n NoopAnimationDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };\n NoopAnimationDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n NoopAnimationDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return defaultValue || '';\n };\n NoopAnimationDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n return new NoopAnimationPlayer(duration, delay);\n };\n NoopAnimationDriver.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n NoopAnimationDriver.ctorParameters = function () { return []; };\n return NoopAnimationDriver;\n}());\n/**\n * @experimental\n */\nvar AnimationDriver = /** @class */ (function () {\n function AnimationDriver() {\n }\n AnimationDriver.NOOP = new NoopAnimationDriver();\n return AnimationDriver;\n}());\n\nvar ONE_SECOND = 1000;\nvar SUBSTITUTION_EXPR_START = '{{';\nvar SUBSTITUTION_EXPR_END = '}}';\nvar ENTER_CLASSNAME = 'ng-enter';\nvar LEAVE_CLASSNAME = 'ng-leave';\n\n\nvar NG_TRIGGER_CLASSNAME = 'ng-trigger';\nvar NG_TRIGGER_SELECTOR = '.ng-trigger';\nvar NG_ANIMATING_CLASSNAME = 'ng-animating';\nvar NG_ANIMATING_SELECTOR = '.ng-animating';\nfunction resolveTimingValue(value) {\n if (typeof value == 'number')\n return value;\n var matches = value.match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2)\n return 0;\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\nfunction _convertTimeValueToMS(value, unit) {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default:\n // ms or something else\n return value;\n }\n}\nfunction resolveTiming(timings, errors, allowNegativeValues) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\nfunction parseTimeExpression(exp, errors, allowNegativeValues) {\n var regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n var duration;\n var delay = 0;\n var easing = '';\n if (typeof exp === 'string') {\n var 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 duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n var delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]);\n }\n var easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n }\n else {\n duration = exp;\n }\n if (!allowNegativeValues) {\n var containsErrors = false;\n var 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 return { duration: duration, delay: delay, easing: easing };\n}\nfunction copyObj(obj, destination) {\n if (destination === void 0) { destination = {}; }\n Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; });\n return destination;\n}\nfunction normalizeStyles(styles) {\n var normalizedStyles = {};\n if (Array.isArray(styles)) {\n styles.forEach(function (data) { return copyStyles(data, false, normalizedStyles); });\n }\n else {\n copyStyles(styles, false, normalizedStyles);\n }\n return normalizedStyles;\n}\nfunction copyStyles(styles, readPrototype, destination) {\n if (destination === void 0) { destination = {}; }\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 (var prop in styles) {\n destination[prop] = styles[prop];\n }\n }\n else {\n copyObj(styles, destination);\n }\n return destination;\n}\nfunction setStyles(element, styles) {\n if (element['style']) {\n Object.keys(styles).forEach(function (prop) {\n var camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = styles[prop];\n });\n }\n}\nfunction eraseStyles(element, styles) {\n if (element['style']) {\n Object.keys(styles).forEach(function (prop) {\n var camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n }\n}\nfunction normalizeAnimationEntry(steps) {\n if (Array.isArray(steps)) {\n if (steps.length == 1)\n return steps[0];\n return sequence(steps);\n }\n return steps;\n}\nfunction validateStyleParams(value, options, errors) {\n var params = options.params || {};\n var matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(function (varName) {\n if (!params.hasOwnProperty(varName)) {\n errors.push(\"Unable to resolve the local animation param \" + varName + \" in the given list of values\");\n }\n });\n }\n}\nvar PARAM_REGEX = new RegExp(SUBSTITUTION_EXPR_START + \"\\\\s*(.+?)\\\\s*\" + SUBSTITUTION_EXPR_END, 'g');\nfunction extractStyleParams(value) {\n var params = [];\n if (typeof value === 'string') {\n var val = value.toString();\n var match = void 0;\n while (match = PARAM_REGEX.exec(val)) {\n params.push(match[1]);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\nfunction interpolateParams(value, params, errors) {\n var original = value.toString();\n var str = original.replace(PARAM_REGEX, function (_, varName) {\n var 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 // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\nfunction iteratorToArray(iterator) {\n var arr = [];\n var item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\n\nvar DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[1].toUpperCase();\n });\n}\nfunction allowPreviousPlayerStylesMerge(duration, delay) {\n return duration === 0 || delay === 0;\n}\nfunction balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles) {\n var previousStyleProps = Object.keys(previousStyles);\n if (previousStyleProps.length && keyframes.length) {\n var startingKeyframe_1 = keyframes[0];\n var missingStyleProps_1 = [];\n previousStyleProps.forEach(function (prop) {\n if (!startingKeyframe_1.hasOwnProperty(prop)) {\n missingStyleProps_1.push(prop);\n }\n startingKeyframe_1[prop] = previousStyles[prop];\n });\n if (missingStyleProps_1.length) {\n var _loop_1 = function () {\n var kf = keyframes[i];\n missingStyleProps_1.forEach(function (prop) { kf[prop] = computeStyle(element, prop); });\n };\n // tslint:disable-next-line\n for (var i = 1; i < keyframes.length; i++) {\n _loop_1();\n }\n }\n }\n return keyframes;\n}\nfunction visitDslNode(visitor, node, context) {\n switch (node.type) {\n case 7 /* Trigger */:\n return visitor.visitTrigger(node, context);\n case 0 /* State */:\n return visitor.visitState(node, context);\n case 1 /* Transition */:\n return visitor.visitTransition(node, context);\n case 2 /* Sequence */:\n return visitor.visitSequence(node, context);\n case 3 /* Group */:\n return visitor.visitGroup(node, context);\n case 4 /* Animate */:\n return visitor.visitAnimate(node, context);\n case 5 /* Keyframes */:\n return visitor.visitKeyframes(node, context);\n case 6 /* Style */:\n return visitor.visitStyle(node, context);\n case 8 /* Reference */:\n return visitor.visitReference(node, context);\n case 9 /* AnimateChild */:\n return visitor.visitAnimateChild(node, context);\n case 10 /* AnimateRef */:\n return visitor.visitAnimateRef(node, context);\n case 11 /* Query */:\n return visitor.visitQuery(node, context);\n case 12 /* Stagger */:\n return visitor.visitStagger(node, context);\n default:\n throw new Error(\"Unable to resolve animation metadata node #\" + node.type);\n }\n}\nfunction computeStyle(element, prop) {\n return window.getComputedStyle(element)[prop];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ANY_STATE = '*';\nfunction parseTransitionExpr(transitionValue, errors) {\n var expressions = [];\n if (typeof transitionValue == 'string') {\n transitionValue\n .split(/\\s*,\\s*/)\n .forEach(function (str) { return parseInnerTransitionStr(str, expressions, errors); });\n }\n else {\n expressions.push(transitionValue);\n }\n return expressions;\n}\nfunction parseInnerTransitionStr(eventStr, expressions, errors) {\n if (eventStr[0] == ':') {\n var result = parseAnimationAlias(eventStr, errors);\n if (typeof result == 'function') {\n expressions.push(result);\n return;\n }\n eventStr = result;\n }\n var 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 var fromState = match[1];\n var separator = match[2];\n var toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n var isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\nfunction parseAnimationAlias(alias, errors) {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n case ':increment':\n return function (fromState, toState) { return parseFloat(toState) > parseFloat(fromState); };\n case ':decrement':\n return function (fromState, toState) { return parseFloat(toState) < parseFloat(fromState); };\n default:\n errors.push(\"The transition alias value \\\"\" + alias + \"\\\" is not supported\");\n return '* => *';\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...\nvar TRUE_BOOLEAN_VALUES = new Set(['true', '1']);\nvar FALSE_BOOLEAN_VALUES = new Set(['false', '0']);\nfunction makeLambdaFromStates(lhs, rhs) {\n var LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n var RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n return function (fromState, toState) {\n var lhsMatch = lhs == ANY_STATE || lhs == fromState;\n var rhsMatch = rhs == ANY_STATE || rhs == toState;\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 return lhsMatch && rhsMatch;\n };\n}\n\nvar SELF_TOKEN = ':self';\nvar SELF_TOKEN_REGEX = new RegExp(\"s*\" + SELF_TOKEN + \"s*,?\", 'g');\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 behaviour 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 */\nfunction buildAnimationAst(driver, metadata, errors) {\n return new AnimationAstBuilderVisitor(driver).build(metadata, errors);\n}\nvar ROOT_SELECTOR = '';\nvar AnimationAstBuilderVisitor = /** @class */ (function () {\n function AnimationAstBuilderVisitor(_driver) {\n this._driver = _driver;\n }\n AnimationAstBuilderVisitor.prototype.build = function (metadata, errors) {\n var context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n return visitDslNode(this, normalizeAnimationEntry(metadata), context);\n };\n AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = function (context) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = {};\n context.collectedStyles[ROOT_SELECTOR] = {};\n context.currentTime = 0;\n };\n AnimationAstBuilderVisitor.prototype.visitTrigger = function (metadata, context) {\n var _this = this;\n var queryCount = context.queryCount = 0;\n var depCount = context.depCount = 0;\n var states = [];\n var transitions = [];\n if (metadata.name.charAt(0) == '@') {\n context.errors.push('animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\\'@foo\\', [...]))');\n }\n metadata.definitions.forEach(function (def) {\n _this._resetContextStyleTimingState(context);\n if (def.type == 0 /* State */) {\n var stateDef_1 = def;\n var name_1 = stateDef_1.name;\n name_1.toString().split(/\\s*,\\s*/).forEach(function (n) {\n stateDef_1.name = n;\n states.push(_this.visitState(stateDef_1, context));\n });\n stateDef_1.name = name_1;\n }\n else if (def.type == 1 /* Transition */) {\n var transition = _this.visitTransition(def, context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n }\n else {\n context.errors.push('only state() and transition() definitions can sit inside of a trigger()');\n }\n });\n return {\n type: 7 /* Trigger */,\n name: metadata.name, states: states, transitions: transitions, queryCount: queryCount, depCount: depCount,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitState = function (metadata, context) {\n var styleAst = this.visitStyle(metadata.styles, context);\n var astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n var missingSubs_1 = new Set();\n var params_1 = astParams || {};\n styleAst.styles.forEach(function (value) {\n if (isObject(value)) {\n var stylesObj_1 = value;\n Object.keys(stylesObj_1).forEach(function (prop) {\n extractStyleParams(stylesObj_1[prop]).forEach(function (sub) {\n if (!params_1.hasOwnProperty(sub)) {\n missingSubs_1.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs_1.size) {\n var missingSubsArr = iteratorToArray(missingSubs_1.values());\n context.errors.push(\"state(\\\"\" + metadata.name + \"\\\", ...) must define default values for all the following style substitutions: \" + missingSubsArr.join(', '));\n }\n }\n return {\n type: 0 /* State */,\n name: metadata.name,\n style: styleAst,\n options: astParams ? { params: astParams } : null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitTransition = function (metadata, context) {\n context.queryCount = 0;\n context.depCount = 0;\n var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n var matchers = parseTransitionExpr(metadata.expr, context.errors);\n return {\n type: 1 /* Transition */,\n matchers: matchers,\n animation: animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitSequence = function (metadata, context) {\n var _this = this;\n return {\n type: 2 /* Sequence */,\n steps: metadata.steps.map(function (s) { return visitDslNode(_this, s, context); }),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitGroup = function (metadata, context) {\n var _this = this;\n var currentTime = context.currentTime;\n var furthestTime = 0;\n var steps = metadata.steps.map(function (step) {\n context.currentTime = currentTime;\n var innerAst = visitDslNode(_this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n context.currentTime = furthestTime;\n return {\n type: 3 /* Group */,\n steps: steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimate = function (metadata, context) {\n var timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n var styleAst;\n var styleMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == 5 /* Keyframes */) {\n styleAst = this.visitKeyframes(styleMetadata, context);\n }\n else {\n var styleMetadata_1 = metadata.styles;\n var isEmpty = false;\n if (!styleMetadata_1) {\n isEmpty = true;\n var newStyleData = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata_1 = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n var _styleAst = this.visitStyle(styleMetadata_1, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n context.currentAnimateTimings = null;\n return {\n type: 4 /* Animate */,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype.visitStyle = function (metadata, context) {\n var ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n };\n AnimationAstBuilderVisitor.prototype._makeStyleAst = function (metadata, context) {\n var styles = [];\n if (Array.isArray(metadata.styles)) {\n metadata.styles.forEach(function (styleTuple) {\n if (typeof styleTuple == 'string') {\n if (styleTuple == AUTO_STYLE) {\n styles.push(styleTuple);\n }\n else {\n context.errors.push(\"The provided style string value \" + styleTuple + \" is not allowed.\");\n }\n }\n else {\n styles.push(styleTuple);\n }\n });\n }\n else {\n styles.push(metadata.styles);\n }\n var containsDynamicStyles = false;\n var collectedEasing = null;\n styles.forEach(function (styleData) {\n if (isObject(styleData)) {\n var styleMap = styleData;\n var easing = styleMap['easing'];\n if (easing) {\n collectedEasing = easing;\n delete styleMap['easing'];\n }\n if (!containsDynamicStyles) {\n for (var prop in styleMap) {\n var value = styleMap[prop];\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n return {\n type: 6 /* Style */,\n styles: styles,\n easing: collectedEasing,\n offset: metadata.offset, containsDynamicStyles: containsDynamicStyles,\n options: null\n };\n };\n AnimationAstBuilderVisitor.prototype._validateStyleAst = function (ast, context) {\n var _this = this;\n var timings = context.currentAnimateTimings;\n var endTime = context.currentTime;\n var startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n ast.styles.forEach(function (tuple) {\n if (typeof tuple == 'string')\n return;\n Object.keys(tuple).forEach(function (prop) {\n if (!_this._driver.validateStyleProperty(prop)) {\n context.errors.push(\"The provided animation property \\\"\" + prop + \"\\\" is not a supported CSS property for animations\");\n return;\n }\n var collectedStyles = context.collectedStyles[context.currentQuerySelector];\n var collectedEntry = collectedStyles[prop];\n var 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 \\\"\" + collectedEntry.startTime + \"ms\\\" and \\\"\" + collectedEntry.endTime + \"ms\\\" is also being animated in a parallel animation between the times of \\\"\" + startTime + \"ms\\\" and \\\"\" + endTime + \"ms\\\"\");\n updateCollectedStyle = false;\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 if (updateCollectedStyle) {\n collectedStyles[prop] = { startTime: startTime, endTime: endTime };\n }\n if (context.options) {\n validateStyleParams(tuple[prop], context.options, context.errors);\n }\n });\n });\n };\n AnimationAstBuilderVisitor.prototype.visitKeyframes = function (metadata, context) {\n var _this = this;\n var ast = { type: 5 /* 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 var MAX_KEYFRAME_OFFSET = 1;\n var totalKeyframesWithOffsets = 0;\n var offsets = [];\n var offsetsOutOfOrder = false;\n var keyframesOutOfRange = false;\n var previousOffset = 0;\n var keyframes = metadata.steps.map(function (styles) {\n var style$$1 = _this._makeStyleAst(styles, context);\n var offsetVal = style$$1.offset != null ? style$$1.offset : consumeOffset(style$$1.styles);\n var offset = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style$$1.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$$1;\n });\n if (keyframesOutOfRange) {\n context.errors.push(\"Please ensure that all keyframe offsets are between 0 and 1\");\n }\n if (offsetsOutOfOrder) {\n context.errors.push(\"Please ensure that all keyframe offsets are in order\");\n }\n var length = metadata.steps.length;\n var generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(\"Not all style() steps within the declared keyframes() contain offsets\");\n }\n else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n var limit = length - 1;\n var currentTime = context.currentTime;\n var currentAnimateTimings = (context.currentAnimateTimings);\n var animateDuration = currentAnimateTimings.duration;\n keyframes.forEach(function (kf, i) {\n var offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n var durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n _this._validateStyleAst(kf, context);\n kf.offset = offset;\n ast.styles.push(kf);\n });\n return ast;\n };\n AnimationAstBuilderVisitor.prototype.visitReference = function (metadata, context) {\n return {\n type: 8 /* Reference */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimateChild = function (metadata, context) {\n context.depCount++;\n return {\n type: 9 /* AnimateChild */,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitAnimateRef = function (metadata, context) {\n return {\n type: 10 /* AnimateRef */,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitQuery = function (metadata, context) {\n var parentSelector = (context.currentQuerySelector);\n var options = (metadata.options || {});\n context.queryCount++;\n context.currentQuery = metadata;\n var _a = __read(normalizeSelector(metadata.selector), 2), selector = _a[0], includeSelf = _a[1];\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n var animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n return {\n type: 11 /* Query */,\n selector: selector,\n limit: options.limit || 0,\n optional: !!options.optional, includeSelf: includeSelf, animation: animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n };\n AnimationAstBuilderVisitor.prototype.visitStagger = function (metadata, context) {\n if (!context.currentQuery) {\n context.errors.push(\"stagger() can only be used inside of query()\");\n }\n var timings = metadata.timings === 'full' ?\n { duration: 0, delay: 0, easing: 'full' } :\n resolveTiming(metadata.timings, context.errors, true);\n return {\n type: 12 /* Stagger */,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings: timings,\n options: null\n };\n };\n return AnimationAstBuilderVisitor;\n}());\nfunction normalizeSelector(selector) {\n var hasAmpersand = selector.split(/\\s*,\\s*/).find(function (token) { return token == SELF_TOKEN; }) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\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, function (match) { return NG_TRIGGER_SELECTOR + '-' + match.substr(1); })\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n return [selector, hasAmpersand];\n}\nfunction normalizeParams(obj) {\n return obj ? copyObj(obj) : null;\n}\nvar AnimationAstBuilderContext = /** @class */ (function () {\n function AnimationAstBuilderContext(errors) {\n this.errors = errors;\n this.queryCount = 0;\n this.depCount = 0;\n this.currentTransition = null;\n this.currentQuery = null;\n this.currentQuerySelector = null;\n this.currentAnimateTimings = null;\n this.currentTime = 0;\n this.collectedStyles = {};\n this.options = null;\n }\n return AnimationAstBuilderContext;\n}());\nfunction consumeOffset(styles) {\n if (typeof styles == 'string')\n return null;\n var offset = null;\n if (Array.isArray(styles)) {\n styles.forEach(function (styleTuple) {\n if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {\n var obj = styleTuple;\n offset = parseFloat(obj['offset']);\n delete obj['offset'];\n }\n });\n }\n else if (isObject(styles) && styles.hasOwnProperty('offset')) {\n var obj = styles;\n offset = parseFloat(obj['offset']);\n delete obj['offset'];\n }\n return offset;\n}\nfunction isObject(value) {\n return !Array.isArray(value) && typeof value == 'object';\n}\nfunction constructTimingAst(value, errors) {\n var timings = null;\n if (value.hasOwnProperty('duration')) {\n timings = value;\n }\n else if (typeof value == 'number') {\n var duration = resolveTiming(value, errors).duration;\n return makeTimingAst(duration, 0, '');\n }\n var strValue = value;\n var isDynamic = strValue.split(/\\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; });\n if (isDynamic) {\n var ast = makeTimingAst(0, 0, '');\n ast.dynamic = true;\n ast.strValue = strValue;\n return ast;\n }\n timings = timings || resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\nfunction normalizeAnimationOptions(options) {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = (normalizeParams(options['params']));\n }\n }\n else {\n options = {};\n }\n return options;\n}\nfunction makeTimingAst(duration, delay, easing) {\n return { duration: duration, delay: delay, easing: easing };\n}\n\nfunction createTimelineInstruction(element, keyframes, preStyleProps, postStyleProps, duration, delay, easing, subTimeline) {\n if (easing === void 0) { easing = null; }\n if (subTimeline === void 0) { subTimeline = false; }\n return {\n type: 1 /* TimelineAnimation */,\n element: element,\n keyframes: keyframes,\n preStyleProps: preStyleProps,\n postStyleProps: postStyleProps,\n duration: duration,\n delay: delay,\n totalTime: duration + delay, easing: easing, subTimeline: subTimeline\n };\n}\n\nvar ElementInstructionMap = /** @class */ (function () {\n function ElementInstructionMap() {\n this._map = new Map();\n }\n ElementInstructionMap.prototype.consume = function (element) {\n var instructions = this._map.get(element);\n if (instructions) {\n this._map.delete(element);\n }\n else {\n instructions = [];\n }\n return instructions;\n };\n ElementInstructionMap.prototype.append = function (element, instructions) {\n var existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push.apply(existingInstructions, __spread(instructions));\n };\n ElementInstructionMap.prototype.has = function (element) { return this._map.has(element); };\n ElementInstructionMap.prototype.clear = function () { this._map.clear(); };\n return ElementInstructionMap;\n}());\n\nvar ONE_FRAME_IN_MILLISECONDS = 1;\nvar ENTER_TOKEN = ':enter';\nvar ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nvar LEAVE_TOKEN = ':leave';\nvar LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\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 */\nfunction buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {\n if (startingStyles === void 0) { startingStyles = {}; }\n if (finalStyles === void 0) { finalStyles = {}; }\n if (errors === void 0) { errors = []; }\n return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);\n}\nvar AnimationTimelineBuilderVisitor = /** @class */ (function () {\n function AnimationTimelineBuilderVisitor() {\n }\n AnimationTimelineBuilderVisitor.prototype.buildKeyframes = function (driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {\n if (errors === void 0) { errors = []; }\n subInstructions = subInstructions || new ElementInstructionMap();\n var context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);\n context.options = options;\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n visitDslNode(this, ast, context);\n // this checks to see if an actual animation happened\n var timelines = context.timelines.filter(function (timeline) { return timeline.containsAnimation(); });\n if (timelines.length && Object.keys(finalStyles).length) {\n var tl = timelines[timelines.length - 1];\n if (!tl.allowOnlyTimelineStyles()) {\n tl.setStyles([finalStyles], null, context.errors, options);\n }\n }\n return timelines.length ? timelines.map(function (timeline) { return timeline.buildKeyframes(); }) :\n [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n };\n AnimationTimelineBuilderVisitor.prototype.visitTrigger = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitState = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitTransition = function (ast, context) {\n // these values are not visited in this AST\n };\n AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = function (ast, context) {\n var elementInstructions = context.subInstructions.consume(context.element);\n if (elementInstructions) {\n var innerContext = context.createSubContext(ast.options);\n var startTime = context.currentTimeline.currentTime;\n var endTime = this._visitSubInstructions(elementInstructions, innerContext, innerContext.options);\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 AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = function (ast, context) {\n var 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 AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = function (instructions, context, options) {\n var startTime = context.currentTimeline.currentTime;\n var furthestTime = startTime;\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n var duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n var delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(function (instruction) {\n var instructionTimings = context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n return furthestTime;\n };\n AnimationTimelineBuilderVisitor.prototype.visitReference = function (ast, context) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitSequence = function (ast, context) {\n var _this = this;\n var subContextCount = context.subContextCount;\n var ctx = context;\n var options = ast.options;\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n if (options.delay != null) {\n if (ctx.previousNode.type == 6 /* Style */) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n var delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n if (ast.steps.length) {\n ast.steps.forEach(function (s) { return visitDslNode(_this, s, ctx); });\n // this is here just incase the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\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 context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitGroup = function (ast, context) {\n var _this = this;\n var innerTimelines = [];\n var furthestTime = context.currentTimeline.currentTime;\n var delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n ast.steps.forEach(function (s) {\n var innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n visitDslNode(_this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\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(function (timeline) { return context.currentTimeline.mergeTimelineCollectedStyles(timeline); });\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype._visitTiming = function (ast, context) {\n if (ast.dynamic) {\n var strValue = ast.strValue;\n var timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n }\n else {\n return { duration: ast.duration, delay: ast.delay, easing: ast.easing };\n }\n };\n AnimationTimelineBuilderVisitor.prototype.visitAnimate = function (ast, context) {\n var timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n var timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n var style$$1 = ast.style;\n if (style$$1.type == 5 /* Keyframes */) {\n this.visitKeyframes(style$$1, context);\n }\n else {\n context.incrementTime(timings.duration);\n this.visitStyle(style$$1, context);\n timeline.applyStylesToKeyframe();\n }\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitStyle = function (ast, context) {\n var timeline = context.currentTimeline;\n var timings = (context.currentAnimateTimings);\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 var easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n }\n else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitKeyframes = function (ast, context) {\n var currentAnimateTimings = (context.currentAnimateTimings);\n var startTime = (context.currentTimeline).duration;\n var duration = currentAnimateTimings.duration;\n var innerContext = context.createSubContext();\n var innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n ast.styles.forEach(function (step) {\n var offset = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\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 // 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 AnimationTimelineBuilderVisitor.prototype.visitQuery = function (ast, context) {\n var _this = this;\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 var startTime = context.currentTimeline.currentTime;\n var options = (ast.options || {});\n var delay = options.delay ? resolveTimingValue(options.delay) : 0;\n if (delay && (context.previousNode.type === 6 /* Style */ ||\n (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n var furthestTime = startTime;\n var elms = context.invokeQuery(ast.selector, ast.originalSelector, ast.limit, ast.includeSelf, options.optional ? true : false, context.errors);\n context.currentQueryTotal = elms.length;\n var sameElementTimeline = null;\n elms.forEach(function (element, i) {\n context.currentQueryIndex = i;\n var innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n visitDslNode(_this, ast.animation, innerContext);\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 var endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n context.previousNode = ast;\n };\n AnimationTimelineBuilderVisitor.prototype.visitStagger = function (ast, context) {\n var parentContext = (context.parentContext);\n var tl = context.currentTimeline;\n var timings = ast.timings;\n var duration = Math.abs(timings.duration);\n var maxTime = duration * (context.currentQueryTotal - 1);\n var delay = duration * context.currentQueryIndex;\n var 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 var timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n var startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\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 return AnimationTimelineBuilderVisitor;\n}());\nvar DEFAULT_NOOP_PREVIOUS_NODE = {};\nvar AnimationTimelineContext = /** @class */ (function () {\n function AnimationTimelineContext(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {\n this._driver = _driver;\n this.element = element;\n this.subInstructions = subInstructions;\n this._enterClassName = _enterClassName;\n this._leaveClassName = _leaveClassName;\n this.errors = errors;\n this.timelines = timelines;\n this.parentContext = null;\n this.currentAnimateTimings = null;\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.subContextCount = 0;\n this.options = {};\n this.currentQueryIndex = 0;\n this.currentQueryTotal = 0;\n this.currentStaggerTime = 0;\n this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);\n timelines.push(this.currentTimeline);\n }\n Object.defineProperty(AnimationTimelineContext.prototype, \"params\", {\n get: function () { return this.options.params; },\n enumerable: true,\n configurable: true\n });\n AnimationTimelineContext.prototype.updateOptions = function (options, skipIfExists) {\n var _this = this;\n if (!options)\n return;\n var newOptions = options;\n var optionsToUpdate = this.options;\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n optionsToUpdate.duration = resolveTimingValue(newOptions.duration);\n }\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n var newParams = newOptions.params;\n if (newParams) {\n var paramsToUpdate_1 = (optionsToUpdate.params);\n if (!paramsToUpdate_1) {\n paramsToUpdate_1 = this.options.params = {};\n }\n Object.keys(newParams).forEach(function (name) {\n if (!skipIfExists || !paramsToUpdate_1.hasOwnProperty(name)) {\n paramsToUpdate_1[name] = interpolateParams(newParams[name], paramsToUpdate_1, _this.errors);\n }\n });\n }\n };\n AnimationTimelineContext.prototype._copyOptions = function () {\n var options = {};\n if (this.options) {\n var oldParams_1 = this.options.params;\n if (oldParams_1) {\n var params_1 = options['params'] = {};\n Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; });\n }\n }\n return options;\n };\n AnimationTimelineContext.prototype.createSubContext = function (options, element, newTime) {\n if (options === void 0) { options = null; }\n var target = element || this.element;\n var context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n context.options = this._copyOptions();\n context.updateOptions(options);\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n };\n AnimationTimelineContext.prototype.transformIntoNewTimeline = function (newTime) {\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 AnimationTimelineContext.prototype.appendInstructionToTimeline = function (instruction, duration, delay) {\n var updatedTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n var builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n };\n AnimationTimelineContext.prototype.incrementTime = function (time) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n };\n AnimationTimelineContext.prototype.delayNextStep = function (delay) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n };\n AnimationTimelineContext.prototype.invokeQuery = function (selector, originalSelector, limit, includeSelf, optional, errors) {\n var results = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) {\n // 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 var multi = limit != 1;\n var 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.apply(results, __spread(elements));\n }\n if (!optional && results.length == 0) {\n errors.push(\"`query(\\\"\" + originalSelector + \"\\\")` returned zero elements. (Use `query(\\\"\" + originalSelector + \"\\\", { optional: true })` if you wish to allow this.)\");\n }\n return results;\n };\n return AnimationTimelineContext;\n}());\nvar TimelineBuilder = /** @class */ (function () {\n function TimelineBuilder(_driver, element, startTime, _elementTimelineStylesLookup) {\n this._driver = _driver;\n this.element = element;\n this.startTime = startTime;\n this._elementTimelineStylesLookup = _elementTimelineStylesLookup;\n this.duration = 0;\n this._previousKeyframe = {};\n this._currentKeyframe = {};\n this._keyframes = new Map();\n this._styleSummary = {};\n this._pendingStyles = {};\n this._backFill = {};\n this._currentEmptyStepKeyframe = null;\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\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 TimelineBuilder.prototype.containsAnimation = function () {\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 TimelineBuilder.prototype.getCurrentStyleProperties = function () { return Object.keys(this._currentKeyframe); };\n Object.defineProperty(TimelineBuilder.prototype, \"currentTime\", {\n get: function () { return this.startTime + this.duration; },\n enumerable: true,\n configurable: true\n });\n TimelineBuilder.prototype.delayNextStep = function (delay) {\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 var hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n }\n else {\n this.startTime += delay;\n }\n };\n TimelineBuilder.prototype.fork = function (element, currentTime) {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n };\n TimelineBuilder.prototype._loadKeyframe = function () {\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 TimelineBuilder.prototype.forwardFrame = function () {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n };\n TimelineBuilder.prototype.forwardTime = function (time) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n };\n TimelineBuilder.prototype._updateStyle = function (prop, value) {\n this._localTimelineStyles[prop] = value;\n this._globalTimelineStyles[prop] = value;\n this._styleSummary[prop] = { time: this.currentTime, value: value };\n };\n TimelineBuilder.prototype.allowOnlyTimelineStyles = function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };\n TimelineBuilder.prototype.applyEmptyStep = function (easing) {\n var _this = this;\n if (easing) {\n this._previousKeyframe['easing'] = easing;\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(function (prop) {\n _this._backFill[prop] = _this._globalTimelineStyles[prop] || AUTO_STYLE;\n _this._currentKeyframe[prop] = AUTO_STYLE;\n });\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n };\n TimelineBuilder.prototype.setStyles = function (input, easing, errors, options) {\n var _this = this;\n if (easing) {\n this._previousKeyframe['easing'] = easing;\n }\n var params = (options && options.params) || {};\n var styles = flattenStyles(input, this._globalTimelineStyles);\n Object.keys(styles).forEach(function (prop) {\n var 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 TimelineBuilder.prototype.applyStylesToKeyframe = function () {\n var _this = this;\n var styles = this._pendingStyles;\n var props = Object.keys(styles);\n if (props.length == 0)\n return;\n this._pendingStyles = {};\n props.forEach(function (prop) {\n var val = styles[prop];\n _this._currentKeyframe[prop] = val;\n });\n Object.keys(this._localTimelineStyles).forEach(function (prop) {\n if (!_this._currentKeyframe.hasOwnProperty(prop)) {\n _this._currentKeyframe[prop] = _this._localTimelineStyles[prop];\n }\n });\n };\n TimelineBuilder.prototype.snapshotCurrentStyles = function () {\n var _this = this;\n Object.keys(this._localTimelineStyles).forEach(function (prop) {\n var val = _this._localTimelineStyles[prop];\n _this._pendingStyles[prop] = val;\n _this._updateStyle(prop, val);\n });\n };\n TimelineBuilder.prototype.getFinalKeyframe = function () { return this._keyframes.get(this.duration); };\n Object.defineProperty(TimelineBuilder.prototype, \"properties\", {\n get: function () {\n var properties = [];\n for (var prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n },\n enumerable: true,\n configurable: true\n });\n TimelineBuilder.prototype.mergeTimelineCollectedStyles = function (timeline) {\n var _this = this;\n Object.keys(timeline._styleSummary).forEach(function (prop) {\n var details0 = _this._styleSummary[prop];\n var details1 = timeline._styleSummary[prop];\n if (!details0 || details1.time > details0.time) {\n _this._updateStyle(prop, details1.value);\n }\n });\n };\n TimelineBuilder.prototype.buildKeyframes = function () {\n var _this = this;\n this.applyStylesToKeyframe();\n var preStyleProps = new Set();\n var postStyleProps = new Set();\n var isEmpty = this._keyframes.size === 1 && this.duration === 0;\n var finalKeyframes = [];\n this._keyframes.forEach(function (keyframe, time) {\n var finalKeyframe = copyStyles(keyframe, true);\n Object.keys(finalKeyframe).forEach(function (prop) {\n var value = finalKeyframe[prop];\n if (value == ɵPRE_STYLE) {\n preStyleProps.add(prop);\n }\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 var preProps = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n var postProps = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n var kf0 = finalKeyframes[0];\n var kf1 = copyObj(kf0);\n kf0['offset'] = 0;\n kf1['offset'] = 1;\n finalKeyframes = [kf0, kf1];\n }\n return createTimelineInstruction(this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime, this.easing, false);\n };\n return TimelineBuilder;\n}());\nvar SubTimelineBuilder = /** @class */ (function (_super) {\n __extends(SubTimelineBuilder, _super);\n function SubTimelineBuilder(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) {\n if (_stretchStartingKeyframe === void 0) { _stretchStartingKeyframe = false; }\n var _this = _super.call(this, driver, element, timings.delay) || this;\n _this.element = element;\n _this.keyframes = keyframes;\n _this.preStyleProps = preStyleProps;\n _this.postStyleProps = postStyleProps;\n _this._stretchStartingKeyframe = _stretchStartingKeyframe;\n _this.timings = { duration: timings.duration, delay: timings.delay, easing: timings.easing };\n return _this;\n }\n SubTimelineBuilder.prototype.containsAnimation = function () { return this.keyframes.length > 1; };\n SubTimelineBuilder.prototype.buildKeyframes = function () {\n var keyframes = this.keyframes;\n var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;\n if (this._stretchStartingKeyframe && delay) {\n var newKeyframes = [];\n var totalTime = duration + delay;\n var startingGap = delay / totalTime;\n // the original starting keyframe now starts once the delay is done\n var newFirstKeyframe = copyStyles(keyframes[0], false);\n newFirstKeyframe['offset'] = 0;\n newKeyframes.push(newFirstKeyframe);\n var oldFirstKeyframe = copyStyles(keyframes[0], false);\n oldFirstKeyframe['offset'] = roundOffset(startingGap);\n newKeyframes.push(oldFirstKeyframe);\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 // offsets between 1 ... n -1 are all warped by the keyframe stretch\n var limit = keyframes.length - 1;\n for (var i = 1; i <= limit; i++) {\n var kf = copyStyles(keyframes[i], false);\n var oldOffset = kf['offset'];\n var timeAtKeyframe = delay + oldOffset * duration;\n kf['offset'] = roundOffset(timeAtKeyframe / totalTime);\n newKeyframes.push(kf);\n }\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n keyframes = newKeyframes;\n }\n return createTimelineInstruction(this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing, true);\n };\n return SubTimelineBuilder;\n}(TimelineBuilder));\nfunction roundOffset(offset, decimalPoints) {\n if (decimalPoints === void 0) { decimalPoints = 3; }\n var mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\nfunction flattenStyles(input, allStyles) {\n var styles = {};\n var allProperties;\n input.forEach(function (token) {\n if (token === '*') {\n allProperties = allProperties || Object.keys(allStyles);\n allProperties.forEach(function (prop) { styles[prop] = AUTO_STYLE; });\n }\n else {\n copyStyles(token, false, styles);\n }\n });\n return styles;\n}\n\nvar Animation = /** @class */ (function () {\n function Animation(_driver, input) {\n this._driver = _driver;\n var errors = [];\n var ast = buildAnimationAst(_driver, input, errors);\n if (errors.length) {\n var errorMessage = \"animation validation failed:\\n\" + errors.join(\"\\n\");\n throw new Error(errorMessage);\n }\n this._animationAst = ast;\n }\n Animation.prototype.buildTimelines = function (element, startingStyles, destinationStyles, options, subInstructions) {\n var start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) :\n startingStyles;\n var dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) :\n destinationStyles;\n var errors = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n var result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);\n if (errors.length) {\n var errorMessage = \"animation building failed:\\n\" + errors.join(\"\\n\");\n throw new Error(errorMessage);\n }\n return result;\n };\n return Animation;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @experimental Animation support is experimental.\n */\nvar AnimationStyleNormalizer = /** @class */ (function () {\n function AnimationStyleNormalizer() {\n }\n return AnimationStyleNormalizer;\n}());\n/**\n * @experimental Animation support is experimental.\n */\nvar NoopAnimationStyleNormalizer = /** @class */ (function () {\n function NoopAnimationStyleNormalizer() {\n }\n NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) { return propertyName; };\n NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {\n return value;\n };\n return NoopAnimationStyleNormalizer;\n}());\n\nvar WebAnimationsStyleNormalizer = /** @class */ (function (_super) {\n __extends(WebAnimationsStyleNormalizer, _super);\n function WebAnimationsStyleNormalizer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n WebAnimationsStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) {\n return dashCaseToCamelCase(propertyName);\n };\n WebAnimationsStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {\n var unit = '';\n var strVal = value.toString().trim();\n if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n }\n else {\n var 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 return WebAnimationsStyleNormalizer;\n}(AnimationStyleNormalizer));\nvar DIMENSIONAL_PROP_MAP = makeBooleanMap('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(','));\nfunction makeBooleanMap(keys) {\n var map = {};\n keys.forEach(function (key) { return map[key] = true; });\n return map;\n}\n\nfunction createTransitionInstruction(element, triggerName, fromState, toState, isRemovalTransition, fromStyles, toStyles, timelines, queriedElements, preStyleProps, postStyleProps, totalTime, errors) {\n return {\n type: 0 /* TransitionAnimation */,\n element: element,\n triggerName: triggerName,\n isRemovalTransition: isRemovalTransition,\n fromState: fromState,\n fromStyles: fromStyles,\n toState: toState,\n toStyles: toStyles,\n timelines: timelines,\n queriedElements: queriedElements,\n preStyleProps: preStyleProps,\n postStyleProps: postStyleProps,\n totalTime: totalTime,\n errors: errors\n };\n}\n\nvar EMPTY_OBJECT = {};\nvar AnimationTransitionFactory = /** @class */ (function () {\n function AnimationTransitionFactory(_triggerName, ast, _stateStyles) {\n this._triggerName = _triggerName;\n this.ast = ast;\n this._stateStyles = _stateStyles;\n }\n AnimationTransitionFactory.prototype.match = function (currentState, nextState, element, params) {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState, element, params);\n };\n AnimationTransitionFactory.prototype.buildStyles = function (stateName, params, errors) {\n var backupStateStyler = this._stateStyles['*'];\n var stateStyler = this._stateStyles[stateName];\n var backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};\n return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;\n };\n AnimationTransitionFactory.prototype.build = function (driver, element, currentState, nextState, enterClassName, leaveClassName, currentOptions, nextOptions, subInstructions) {\n var errors = [];\n var transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n var currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n var currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n var nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n var nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n var queriedElements = new Set();\n var preStyleMap = new Map();\n var postStyleMap = new Map();\n var isRemoval = nextState === 'void';\n var animationOptions = { params: __assign({}, transitionAnimationParams, nextAnimationParams) };\n var timelines = buildAnimationTimelines(driver, element, this.ast.animation, enterClassName, leaveClassName, currentStateStyles, nextStateStyles, animationOptions, subInstructions, errors);\n var totalTime = 0;\n timelines.forEach(function (tl) { totalTime = Math.max(tl.duration + tl.delay, totalTime); });\n if (errors.length) {\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, [], [], preStyleMap, postStyleMap, totalTime, errors);\n }\n timelines.forEach(function (tl) {\n var elm = tl.element;\n var preProps = getOrSetAsInMap(preStyleMap, elm, {});\n tl.preStyleProps.forEach(function (prop) { return preProps[prop] = true; });\n var postProps = getOrSetAsInMap(postStyleMap, elm, {});\n tl.postStyleProps.forEach(function (prop) { return postProps[prop] = true; });\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n var queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles, nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap, totalTime);\n };\n return AnimationTransitionFactory;\n}());\nfunction oneOrMoreTransitionsMatch(matchFns, currentState, nextState, element, params) {\n return matchFns.some(function (fn) { return fn(currentState, nextState, element, params); });\n}\nvar AnimationStateStyles = /** @class */ (function () {\n function AnimationStateStyles(styles, defaultParams) {\n this.styles = styles;\n this.defaultParams = defaultParams;\n }\n AnimationStateStyles.prototype.buildStyles = function (params, errors) {\n var finalStyles = {};\n var combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(function (key) {\n var value = params[key];\n if (value != null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(function (value) {\n if (typeof value !== 'string') {\n var styleObj_1 = value;\n Object.keys(styleObj_1).forEach(function (prop) {\n var val = styleObj_1[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 return AnimationStateStyles;\n}());\n\n/**\n * @experimental Animation support is experimental.\n */\nfunction buildTrigger(name, ast) {\n return new AnimationTrigger(name, ast);\n}\n/**\n* @experimental Animation support is experimental.\n*/\nvar AnimationTrigger = /** @class */ (function () {\n function AnimationTrigger(name, ast) {\n var _this = this;\n this.name = name;\n this.ast = ast;\n this.transitionFactories = [];\n this.states = {};\n ast.states.forEach(function (ast) {\n var defaultParams = (ast.options && ast.options.params) || {};\n _this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);\n });\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n ast.transitions.forEach(function (ast) {\n _this.transitionFactories.push(new AnimationTransitionFactory(name, ast, _this.states));\n });\n this.fallbackTransition = createFallbackTransition(name, this.states);\n }\n Object.defineProperty(AnimationTrigger.prototype, \"containsQueries\", {\n get: function () { return this.ast.queryCount > 0; },\n enumerable: true,\n configurable: true\n });\n AnimationTrigger.prototype.matchTransition = function (currentState, nextState, element, params) {\n var entry = this.transitionFactories.find(function (f) { return f.match(currentState, nextState, element, params); });\n return entry || null;\n };\n AnimationTrigger.prototype.matchStyles = function (currentState, params, errors) {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n };\n return AnimationTrigger;\n}());\nfunction createFallbackTransition(triggerName, states) {\n var matchers = [function (fromState, toState) { return true; }];\n var animation = { type: 2 /* Sequence */, steps: [], options: null };\n var transition = {\n type: 1 /* Transition */,\n animation: animation,\n matchers: matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\nfunction balanceProperties(obj, key1, key2) {\n if (obj.hasOwnProperty(key1)) {\n if (!obj.hasOwnProperty(key2)) {\n obj[key2] = obj[key1];\n }\n }\n else if (obj.hasOwnProperty(key2)) {\n obj[key1] = obj[key2];\n }\n}\n\nvar EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nvar TimelineAnimationEngine = /** @class */ (function () {\n function TimelineAnimationEngine(_driver, _normalizer) {\n this._driver = _driver;\n this._normalizer = _normalizer;\n this._animations = {};\n this._playersById = {};\n this.players = [];\n }\n TimelineAnimationEngine.prototype.register = function (id, metadata) {\n var errors = [];\n var ast = buildAnimationAst(this._driver, metadata, errors);\n if (errors.length) {\n throw new Error(\"Unable to build the animation due to the following errors: \" + errors.join(\"\\n\"));\n }\n else {\n this._animations[id] = ast;\n }\n };\n TimelineAnimationEngine.prototype._buildPlayer = function (i, preStyles, postStyles) {\n var element = i.element;\n var keyframes = normalizeKeyframes(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 TimelineAnimationEngine.prototype.create = function (id, element, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var errors = [];\n var ast = this._animations[id];\n var instructions;\n var autoStylesMap = new Map();\n if (ast) {\n instructions = buildAnimationTimelines(this._driver, element, ast, ENTER_CLASSNAME, LEAVE_CLASSNAME, {}, {}, options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(function (inst) {\n var styles = getOrSetAsInMap(autoStylesMap, inst.element, {});\n inst.postStyleProps.forEach(function (prop) { return styles[prop] = null; });\n });\n }\n else {\n errors.push('The requested animation doesn\\'t exist or has already been destroyed');\n instructions = [];\n }\n if (errors.length) {\n throw new Error(\"Unable to create the animation due to the following errors: \" + errors.join(\"\\n\"));\n }\n autoStylesMap.forEach(function (styles, element) {\n Object.keys(styles).forEach(function (prop) { styles[prop] = _this._driver.computeStyle(element, prop, AUTO_STYLE); });\n });\n var players = instructions.map(function (i) {\n var styles = autoStylesMap.get(i.element);\n return _this._buildPlayer(i, {}, styles);\n });\n var player = optimizeGroupPlayer(players);\n this._playersById[id] = player;\n player.onDestroy(function () { return _this.destroy(id); });\n this.players.push(player);\n return player;\n };\n TimelineAnimationEngine.prototype.destroy = function (id) {\n var player = this._getPlayer(id);\n player.destroy();\n delete this._playersById[id];\n var index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n };\n TimelineAnimationEngine.prototype._getPlayer = function (id) {\n var 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 TimelineAnimationEngine.prototype.listen = function (id, element, eventName, callback) {\n // triggerName, fromState, toState are all ignored for timeline animations\n var baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return function () { };\n };\n TimelineAnimationEngine.prototype.command = function (id, element, command, args) {\n if (command == 'register') {\n this.register(id, args[0]);\n return;\n }\n if (command == 'create') {\n var options = (args[0] || {});\n this.create(id, element, options);\n return;\n }\n var 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]));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n };\n return TimelineAnimationEngine;\n}());\n\nvar QUEUED_CLASSNAME = 'ng-animate-queued';\nvar QUEUED_SELECTOR = '.ng-animate-queued';\nvar DISABLED_CLASSNAME = 'ng-animate-disabled';\nvar DISABLED_SELECTOR = '.ng-animate-disabled';\nvar STAR_CLASSNAME = 'ng-star-inserted';\nvar STAR_SELECTOR = '.ng-star-inserted';\nvar EMPTY_PLAYER_ARRAY = [];\nvar NULL_REMOVAL_STATE = {\n namespaceId: '',\n setForRemoval: null,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nvar NULL_REMOVED_QUERIED_STATE = {\n namespaceId: '',\n setForRemoval: null,\n hasAnimation: false,\n removedBeforeQueried: true\n};\nvar REMOVAL_FLAG = '__ng_removed';\nvar StateValue = /** @class */ (function () {\n function StateValue(input, namespaceId) {\n if (namespaceId === void 0) { namespaceId = ''; }\n this.namespaceId = namespaceId;\n var isObj = input && input.hasOwnProperty('value');\n var value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n var options = copyObj(input);\n delete options['value'];\n this.options = options;\n }\n else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n Object.defineProperty(StateValue.prototype, \"params\", {\n get: function () { return this.options.params; },\n enumerable: true,\n configurable: true\n });\n StateValue.prototype.absorbOptions = function (options) {\n var newParams = options.params;\n if (newParams) {\n var oldParams_1 = (this.options.params);\n Object.keys(newParams).forEach(function (prop) {\n if (oldParams_1[prop] == null) {\n oldParams_1[prop] = newParams[prop];\n }\n });\n }\n };\n return StateValue;\n}());\nvar VOID_VALUE = 'void';\nvar DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nvar DELETED_STATE_VALUE = new StateValue('DELETED');\nvar AnimationTransitionNamespace = /** @class */ (function () {\n function AnimationTransitionNamespace(id, hostElement, _engine) {\n this.id = id;\n this.hostElement = hostElement;\n this._engine = _engine;\n this.players = [];\n this._triggers = {};\n this._queue = [];\n this._elementListeners = new Map();\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n AnimationTransitionNamespace.prototype.listen = function (element, name, phase, callback) {\n var _this = this;\n if (!this._triggers.hasOwnProperty(name)) {\n throw new Error(\"Unable to listen on the animation trigger event \\\"\" + phase + \"\\\" because the animation trigger \\\"\" + name + \"\\\" doesn't exist!\");\n }\n if (phase == null || phase.length == 0) {\n throw new Error(\"Unable to listen on the animation trigger \\\"\" + name + \"\\\" because the provided event is undefined!\");\n }\n if (!isTriggerEventValid(phase)) {\n throw new Error(\"The provided animation trigger event \\\"\" + phase + \"\\\" for the animation trigger \\\"\" + name + \"\\\" is not supported!\");\n }\n var listeners = getOrSetAsInMap(this._elementListeners, element, []);\n var data = { name: name, phase: phase, callback: callback };\n listeners.push(data);\n var 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 return function () {\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 // 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(function () {\n var index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n if (!_this._triggers[name]) {\n delete triggersWithStates[name];\n }\n });\n };\n };\n AnimationTransitionNamespace.prototype.register = function (name, ast) {\n if (this._triggers[name]) {\n // throw\n return false;\n }\n else {\n this._triggers[name] = ast;\n return true;\n }\n };\n AnimationTransitionNamespace.prototype._getTrigger = function (name) {\n var 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 AnimationTransitionNamespace.prototype.trigger = function (element, triggerName, value, defaultToFallback) {\n var _this = this;\n if (defaultToFallback === void 0) { defaultToFallback = true; }\n var trigger = this._getTrigger(triggerName);\n var player = new TransitionAnimationPlayer(this.id, triggerName, element);\n var 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 var fromState = triggersWithStates[triggerName];\n var toState = new StateValue(value, this.id);\n var isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n triggersWithStates[triggerName] = toState;\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n }\n else if (fromState === DELETED_STATE_VALUE) {\n return player;\n }\n var isRemoval = toState.value === VOID_VALUE;\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 var errors = [];\n var fromStyles_1 = trigger.matchStyles(fromState.value, fromState.params, errors);\n var toStyles_1 = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n }\n else {\n this._engine.afterFlush(function () {\n eraseStyles(element, fromStyles_1);\n setStyles(element, toStyles_1);\n });\n }\n }\n return;\n }\n var playersOnElement = getOrSetAsInMap(this._engine.playersByElement, element, []);\n playersOnElement.forEach(function (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 var transition = trigger.matchTransition(fromState.value, toState.value, element, toState.params);\n var isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback)\n return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n this._engine.totalQueuedPlayers++;\n this._queue.push({ element: element, triggerName: triggerName, transition: transition, fromState: fromState, toState: toState, player: player, isFallbackTransition: isFallbackTransition });\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(function () { removeClass(element, QUEUED_CLASSNAME); });\n }\n player.onDone(function () {\n var index = _this.players.indexOf(player);\n if (index >= 0) {\n _this.players.splice(index, 1);\n }\n var players = _this._engine.playersByElement.get(element);\n if (players) {\n var index_1 = players.indexOf(player);\n if (index_1 >= 0) {\n players.splice(index_1, 1);\n }\n }\n });\n this.players.push(player);\n playersOnElement.push(player);\n return player;\n };\n AnimationTransitionNamespace.prototype.deregister = function (name) {\n var _this = this;\n delete this._triggers[name];\n this._engine.statesByElement.forEach(function (stateMap, element) { delete stateMap[name]; });\n this._elementListeners.forEach(function (listeners, element) {\n _this._elementListeners.set(element, listeners.filter(function (entry) { return entry.name != name; }));\n });\n };\n AnimationTransitionNamespace.prototype.clearElementCache = function (element) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n var elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(function (player) { return player.destroy(); });\n this._engine.playersByElement.delete(element);\n }\n };\n AnimationTransitionNamespace.prototype._signalRemovalForInnerTriggers = function (rootElement, context, animate) {\n var _this = this;\n if (animate === void 0) { animate = false; }\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 this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach(function (elm) {\n // this means that an inner remove() operation has already kicked off\n // the animation on this element...\n if (elm[REMOVAL_FLAG])\n return;\n var namespaces = _this._engine.fetchNamespacesByElement(elm);\n if (namespaces.size) {\n namespaces.forEach(function (ns) { return ns.triggerLeaveAnimation(elm, context, false, true); });\n }\n else {\n _this.clearElementCache(elm);\n }\n });\n };\n AnimationTransitionNamespace.prototype.triggerLeaveAnimation = function (element, context, destroyAfterComplete, defaultToFallback) {\n var _this = this;\n var triggerStates = this._engine.statesByElement.get(element);\n if (triggerStates) {\n var players_1 = [];\n Object.keys(triggerStates).forEach(function (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 var player = _this.trigger(element, triggerName, VOID_VALUE, defaultToFallback);\n if (player) {\n players_1.push(player);\n }\n }\n });\n if (players_1.length) {\n this._engine.markElementAsRemoved(this.id, element, true, context);\n if (destroyAfterComplete) {\n optimizeGroupPlayer(players_1).onDone(function () { return _this._engine.processLeaveNode(element); });\n }\n return true;\n }\n }\n return false;\n };\n AnimationTransitionNamespace.prototype.prepareLeaveAnimationListeners = function (element) {\n var _this = this;\n var listeners = this._elementListeners.get(element);\n if (listeners) {\n var visitedTriggers_1 = new Set();\n listeners.forEach(function (listener) {\n var triggerName = listener.name;\n if (visitedTriggers_1.has(triggerName))\n return;\n visitedTriggers_1.add(triggerName);\n var trigger = _this._triggers[triggerName];\n var transition = trigger.fallbackTransition;\n var elementStates = (_this._engine.statesByElement.get(element));\n var fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;\n var toState = new StateValue(VOID_VALUE);\n var player = new TransitionAnimationPlayer(_this.id, triggerName, element);\n _this._engine.totalQueuedPlayers++;\n _this._queue.push({\n element: element,\n triggerName: triggerName,\n transition: transition,\n fromState: fromState,\n toState: toState,\n player: player,\n isFallbackTransition: true\n });\n });\n }\n };\n AnimationTransitionNamespace.prototype.removeNode = function (element, context) {\n var _this = this;\n var engine = this._engine;\n if (element.childElementCount) {\n this._signalRemovalForInnerTriggers(element, context, true);\n }\n // this means that a * => VOID animation was detected and kicked off\n if (this.triggerLeaveAnimation(element, context, true))\n return;\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n var containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n var currentPlayers = engine.players.length ? engine.playersByQueriedElement.get(element) : [];\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 }\n else {\n var parent_1 = element;\n while (parent_1 = parent_1.parentNode) {\n var triggers = engine.statesByElement.get(parent_1);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\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 // 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 }\n else {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(function () { return _this.clearElementCache(element); });\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n };\n AnimationTransitionNamespace.prototype.insertNode = function (element, parent) { addClass(element, this._hostClassName); };\n AnimationTransitionNamespace.prototype.drainQueuedTransitions = function (microtaskId) {\n var _this = this;\n var instructions = [];\n this._queue.forEach(function (entry) {\n var player = entry.player;\n if (player.destroyed)\n return;\n var element = entry.element;\n var listeners = _this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach(function (listener) {\n if (listener.name == entry.triggerName) {\n var baseEvent = makeAnimationEvent(element, entry.triggerName, entry.fromState.value, entry.toState.value);\n baseEvent['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n if (player.markedForDestroy) {\n _this._engine.afterFlush(function () {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n }\n else {\n instructions.push(entry);\n }\n });\n this._queue = [];\n return instructions.sort(function (a, b) {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n var d0 = a.transition.ast.depCount;\n var 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 AnimationTransitionNamespace.prototype.destroy = function (context) {\n this.players.forEach(function (p) { return p.destroy(); });\n this._signalRemovalForInnerTriggers(this.hostElement, context);\n };\n AnimationTransitionNamespace.prototype.elementContainsData = function (element) {\n var containsData = false;\n if (this._elementListeners.has(element))\n containsData = true;\n containsData =\n (this._queue.find(function (entry) { return entry.element === element; }) ? true : false) || containsData;\n return containsData;\n };\n return AnimationTransitionNamespace;\n}());\nvar TransitionAnimationEngine = /** @class */ (function () {\n function TransitionAnimationEngine(driver, _normalizer) {\n this.driver = driver;\n this._normalizer = _normalizer;\n this.players = [];\n this.newHostElements = new Map();\n this.playersByElement = new Map();\n this.playersByQueriedElement = new Map();\n this.statesByElement = new Map();\n this.disabledNodes = new Set();\n this.totalAnimations = 0;\n this.totalQueuedPlayers = 0;\n this._namespaceLookup = {};\n this._namespaceList = [];\n this._flushFns = [];\n this._whenQuietFns = [];\n this.namespacesByHostElement = new Map();\n this.collectedEnterElements = [];\n this.collectedLeaveElements = [];\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = function (element, context) { };\n }\n /** @internal */\n /** @internal */\n TransitionAnimationEngine.prototype._onRemovalComplete = /** @internal */\n function (element, context) { this.onRemovalComplete(element, context); };\n Object.defineProperty(TransitionAnimationEngine.prototype, \"queuedPlayers\", {\n get: function () {\n var players = [];\n this._namespaceList.forEach(function (ns) {\n ns.players.forEach(function (player) {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n },\n enumerable: true,\n configurable: true\n });\n TransitionAnimationEngine.prototype.createNamespace = function (namespaceId, hostElement) {\n var ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (hostElement.parentNode) {\n this._balanceNamespaceList(ns, hostElement);\n }\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 // 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 TransitionAnimationEngine.prototype._balanceNamespaceList = function (ns, hostElement) {\n var limit = this._namespaceList.length - 1;\n if (limit >= 0) {\n var found = false;\n for (var i = limit; i >= 0; i--) {\n var 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 }\n else {\n this._namespaceList.push(ns);\n }\n this.namespacesByHostElement.set(hostElement, ns);\n return ns;\n };\n TransitionAnimationEngine.prototype.register = function (namespaceId, hostElement) {\n var ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n };\n TransitionAnimationEngine.prototype.registerTrigger = function (namespaceId, name, trigger) {\n var ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n };\n TransitionAnimationEngine.prototype.destroy = function (namespaceId, context) {\n var _this = this;\n if (!namespaceId)\n return;\n var ns = this._fetchNamespace(namespaceId);\n this.afterFlush(function () {\n _this.namespacesByHostElement.delete(ns.hostElement);\n delete _this._namespaceLookup[namespaceId];\n var index = _this._namespaceList.indexOf(ns);\n if (index >= 0) {\n _this._namespaceList.splice(index, 1);\n }\n });\n this.afterFlushAnimationsDone(function () { return ns.destroy(context); });\n };\n TransitionAnimationEngine.prototype._fetchNamespace = function (id) { return this._namespaceLookup[id]; };\n TransitionAnimationEngine.prototype.fetchNamespacesByElement = function (element) {\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 var namespaces = new Set();\n var elementStates = this.statesByElement.get(element);\n if (elementStates) {\n var keys = Object.keys(elementStates);\n for (var i = 0; i < keys.length; i++) {\n var nsId = elementStates[keys[i]].namespaceId;\n if (nsId) {\n var ns = this._fetchNamespace(nsId);\n if (ns) {\n namespaces.add(ns);\n }\n }\n }\n }\n return namespaces;\n };\n TransitionAnimationEngine.prototype.trigger = function (namespaceId, element, name, value) {\n if (isElementNode(element)) {\n this._fetchNamespace(namespaceId).trigger(element, name, value);\n return true;\n }\n return false;\n };\n TransitionAnimationEngine.prototype.insertNode = function (namespaceId, element, parent, insertBefore) {\n if (!isElementNode(element))\n return;\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 var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\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 var 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 // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n };\n TransitionAnimationEngine.prototype.collectEnterElement = function (element) { this.collectedEnterElements.push(element); };\n TransitionAnimationEngine.prototype.markElementAsDisabled = function (element, value) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n }\n else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n };\n TransitionAnimationEngine.prototype.removeNode = function (namespaceId, element, context) {\n if (!isElementNode(element)) {\n this._onRemovalComplete(element, context);\n return;\n }\n var ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context);\n }\n else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n };\n TransitionAnimationEngine.prototype.markElementAsRemoved = function (namespaceId, element, hasAnimation, context) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId: namespaceId,\n setForRemoval: context, hasAnimation: hasAnimation,\n removedBeforeQueried: false\n };\n };\n TransitionAnimationEngine.prototype.listen = function (namespaceId, element, name, phase, callback) {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return function () { };\n };\n TransitionAnimationEngine.prototype._buildInstruction = function (entry, subTimelines, enterClassName, leaveClassName) {\n return entry.transition.build(this.driver, entry.element, entry.fromState.value, entry.toState.value, enterClassName, leaveClassName, entry.fromState.options, entry.toState.options, subTimelines);\n };\n TransitionAnimationEngine.prototype.destroyInnerAnimations = function (containerElement) {\n var _this = this;\n var elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(function (element) { return _this.destroyActiveAnimationsForElement(element); });\n if (this.playersByQueriedElement.size == 0)\n return;\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n elements.forEach(function (element) { return _this.finishActiveQueriedAnimationOnElement(element); });\n };\n TransitionAnimationEngine.prototype.destroyActiveAnimationsForElement = function (element) {\n var players = this.playersByElement.get(element);\n if (players) {\n players.forEach(function (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 }\n else {\n player.destroy();\n }\n });\n }\n var stateMap = this.statesByElement.get(element);\n if (stateMap) {\n Object.keys(stateMap).forEach(function (triggerName) { return stateMap[triggerName] = DELETED_STATE_VALUE; });\n }\n };\n TransitionAnimationEngine.prototype.finishActiveQueriedAnimationOnElement = function (element) {\n var players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(function (player) { return player.finish(); });\n }\n };\n TransitionAnimationEngine.prototype.whenRenderingDone = function () {\n var _this = this;\n return new Promise(function (resolve) {\n if (_this.players.length) {\n return optimizeGroupPlayer(_this.players).onDone(function () { return resolve(); });\n }\n else {\n resolve();\n }\n });\n };\n TransitionAnimationEngine.prototype.processLeaveNode = function (element) {\n var _this = this;\n var details = element[REMOVAL_FLAG];\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 var ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {\n this.markElementAsDisabled(element, false);\n }\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(function (node) {\n _this.markElementAsDisabled(element, false);\n });\n };\n TransitionAnimationEngine.prototype.flush = function (microtaskId) {\n var _this = this;\n if (microtaskId === void 0) { microtaskId = -1; }\n var players = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach(function (ns, element) { return _this._balanceNamespaceList(ns, element); });\n this.newHostElements.clear();\n }\n if (this.totalAnimations && this.collectedEnterElements.length) {\n for (var i = 0; i < this.collectedEnterElements.length; i++) {\n var elm = this.collectedEnterElements[i];\n addClass(elm, STAR_CLASSNAME);\n }\n }\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n var cleanupFns = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n }\n finally {\n for (var i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n }\n else {\n for (var i = 0; i < this.collectedLeaveElements.length; i++) {\n var element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(function (fn) { return fn(); });\n this._flushFns = [];\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 var quietFns_1 = this._whenQuietFns;\n this._whenQuietFns = [];\n if (players.length) {\n optimizeGroupPlayer(players).onDone(function () { quietFns_1.forEach(function (fn) { return fn(); }); });\n }\n else {\n quietFns_1.forEach(function (fn) { return fn(); });\n }\n }\n };\n TransitionAnimationEngine.prototype.reportError = function (errors) {\n throw new Error(\"Unable to process animations due to the following failed trigger transitions\\n \" + errors.join('\\n'));\n };\n TransitionAnimationEngine.prototype._flushAnimations = function (cleanupFns, microtaskId) {\n var _this = this;\n var subTimelines = new ElementInstructionMap();\n var skippedPlayers = [];\n var skippedPlayersMap = new Map();\n var queuedInstructions = [];\n var queriedElements = new Map();\n var allPreStyleElements = new Map();\n var allPostStyleElements = new Map();\n var disabledElementsSet = new Set();\n this.disabledNodes.forEach(function (node) {\n disabledElementsSet.add(node);\n var nodesThatAreDisabled = _this.driver.query(node, QUEUED_SELECTOR, true);\n for (var i_1 = 0; i_1 < nodesThatAreDisabled.length; i_1++) {\n disabledElementsSet.add(nodesThatAreDisabled[i_1]);\n }\n });\n var bodyNode = getBodyNode();\n var allTriggerElements = Array.from(this.statesByElement.keys());\n var enterNodeMap = buildRootMap(allTriggerElements, this.collectedEnterElements);\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 var enterNodeMapIds = new Map();\n var i = 0;\n enterNodeMap.forEach(function (nodes, root) {\n var className = ENTER_CLASSNAME + i++;\n enterNodeMapIds.set(root, className);\n nodes.forEach(function (node) { return addClass(node, className); });\n });\n var allLeaveNodes = [];\n var mergedLeaveNodes = new Set();\n var leaveNodesWithoutAnimations = new Set();\n for (var i_2 = 0; i_2 < this.collectedLeaveElements.length; i_2++) {\n var element = this.collectedLeaveElements[i_2];\n var details = element[REMOVAL_FLAG];\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(function (elm) { return mergedLeaveNodes.add(elm); });\n }\n else {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n var leaveNodeMapIds = new Map();\n var leaveNodeMap = buildRootMap(allTriggerElements, Array.from(mergedLeaveNodes));\n leaveNodeMap.forEach(function (nodes, root) {\n var className = LEAVE_CLASSNAME + i++;\n leaveNodeMapIds.set(root, className);\n nodes.forEach(function (node) { return addClass(node, className); });\n });\n cleanupFns.push(function () {\n enterNodeMap.forEach(function (nodes, root) {\n var className = (enterNodeMapIds.get(root));\n nodes.forEach(function (node) { return removeClass(node, className); });\n });\n leaveNodeMap.forEach(function (nodes, root) {\n var className = (leaveNodeMapIds.get(root));\n nodes.forEach(function (node) { return removeClass(node, className); });\n });\n allLeaveNodes.forEach(function (element) { _this.processLeaveNode(element); });\n });\n var allPlayers = [];\n var erroneousTransitions = [];\n for (var i_3 = this._namespaceList.length - 1; i_3 >= 0; i_3--) {\n var ns = this._namespaceList[i_3];\n ns.drainQueuedTransitions(microtaskId).forEach(function (entry) {\n var player = entry.player;\n allPlayers.push(player);\n var element = entry.element;\n if (!bodyNode || !_this.driver.containsElement(bodyNode, element)) {\n player.destroy();\n return;\n }\n var leaveClassName = (leaveNodeMapIds.get(element));\n var enterClassName = (enterNodeMapIds.get(element));\n var instruction = (_this._buildInstruction(entry, subTimelines, enterClassName, leaveClassName));\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\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(function () { return eraseStyles(element, instruction.fromStyles); });\n player.onDestroy(function () { return setStyles(element, instruction.toStyles); });\n skippedPlayers.push(player);\n return;\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(function (tl) { return tl.stretchStartingKeyframe = true; });\n subTimelines.append(element, instruction.timelines);\n var tuple = { instruction: instruction, player: player, element: element };\n queuedInstructions.push(tuple);\n instruction.queriedElements.forEach(function (element) { return getOrSetAsInMap(queriedElements, element, []).push(player); });\n instruction.preStyleProps.forEach(function (stringMap, element) {\n var props = Object.keys(stringMap);\n if (props.length) {\n var setVal_1 = (allPreStyleElements.get(element));\n if (!setVal_1) {\n allPreStyleElements.set(element, setVal_1 = new Set());\n }\n props.forEach(function (prop) { return setVal_1.add(prop); });\n }\n });\n instruction.postStyleProps.forEach(function (stringMap, element) {\n var props = Object.keys(stringMap);\n var setVal = (allPostStyleElements.get(element));\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n props.forEach(function (prop) { return setVal.add(prop); });\n });\n });\n }\n if (erroneousTransitions.length) {\n var errors_1 = [];\n erroneousTransitions.forEach(function (instruction) {\n errors_1.push(\"@\" + instruction.triggerName + \" has failed due to:\\n\");\n instruction.errors.forEach(function (error) { return errors_1.push(\"- \" + error + \"\\n\"); });\n });\n allPlayers.forEach(function (player) { return player.destroy(); });\n this.reportError(errors_1);\n }\n var allPreviousPlayersMap = new Map();\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 var animationElementMap = new Map();\n queuedInstructions.forEach(function (entry) {\n var element = entry.element;\n if (subTimelines.has(element)) {\n animationElementMap.set(element, element);\n _this._beforeAnimationBuild(entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n skippedPlayers.forEach(function (player) {\n var element = player.element;\n var previousPlayers = _this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(function (prevPlayer) {\n getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\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 var replaceNodes = allLeaveNodes.filter(function (node) {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n // POST STAGE: fill the * styles\n var postStylesMap = new Map();\n var allLeaveQueriedNodes = cloakAndComputeStyles(postStylesMap, this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n allLeaveQueriedNodes.forEach(function (node) {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n // PRE STAGE: fill the ! styles\n var preStylesMap = new Map();\n enterNodeMap.forEach(function (nodes, root) {\n cloakAndComputeStyles(preStylesMap, _this.driver, new Set(nodes), allPreStyleElements, ɵPRE_STYLE);\n });\n replaceNodes.forEach(function (node) {\n var post = postStylesMap.get(node);\n var pre = preStylesMap.get(node);\n postStylesMap.set(node, __assign({}, post, pre));\n });\n var rootPlayers = [];\n var subPlayers = [];\n var NO_PARENT_ANIMATION_ELEMENT_DETECTED = {};\n queuedInstructions.forEach(function (entry) {\n var element = entry.element, player = entry.player, instruction = entry.instruction;\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(function () { return setStyles(element, instruction.toStyles); });\n player.disabled = true;\n player.overrideTotalTime(instruction.totalTime);\n skippedPlayers.push(player);\n return;\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 var parentWithAnimation_1 = NO_PARENT_ANIMATION_ELEMENT_DETECTED;\n if (animationElementMap.size > 1) {\n var elm = element;\n var parentsToAdd = [];\n while (elm = elm.parentNode) {\n var detectedParent = animationElementMap.get(elm);\n if (detectedParent) {\n parentWithAnimation_1 = detectedParent;\n break;\n }\n parentsToAdd.push(elm);\n }\n parentsToAdd.forEach(function (parent) { return animationElementMap.set(parent, parentWithAnimation_1); });\n }\n var innerPlayer = _this._buildAnimation(player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap);\n player.setRealPlayer(innerPlayer);\n if (parentWithAnimation_1 === NO_PARENT_ANIMATION_ELEMENT_DETECTED) {\n rootPlayers.push(player);\n }\n else {\n var parentPlayers = _this.playersByElement.get(parentWithAnimation_1);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n }\n }\n else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(function () { return 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 // find all of the sub players' corresponding inner animation player\n subPlayers.forEach(function (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 var playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n var innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\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(function (player) {\n if (player.parentPlayer) {\n player.syncPlayerEvents(player.parentPlayer);\n }\n else {\n player.destroy();\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 (var i_4 = 0; i_4 < allLeaveNodes.length; i_4++) {\n var element = allLeaveNodes[i_4];\n var details = element[REMOVAL_FLAG];\n removeClass(element, LEAVE_CLASSNAME);\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)\n continue;\n var players = [];\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 var queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push.apply(players, __spread(queriedPlayerResults));\n }\n var queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (var j = 0; j < queriedInnerElements.length; j++) {\n var queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push.apply(players, __spread(queriedPlayers));\n }\n }\n }\n var activePlayers = players.filter(function (p) { return !p.destroyed; });\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n }\n else {\n this.processLeaveNode(element);\n }\n }\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n rootPlayers.forEach(function (player) {\n _this.players.push(player);\n player.onDone(function () {\n player.destroy();\n var index = _this.players.indexOf(player);\n _this.players.splice(index, 1);\n });\n player.play();\n });\n return rootPlayers;\n };\n TransitionAnimationEngine.prototype.elementContainsData = function (namespaceId, element) {\n var containsData = false;\n var details = element[REMOVAL_FLAG];\n if (details && details.setForRemoval)\n containsData = true;\n if (this.playersByElement.has(element))\n containsData = true;\n if (this.playersByQueriedElement.has(element))\n containsData = true;\n if (this.statesByElement.has(element))\n containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n };\n TransitionAnimationEngine.prototype.afterFlush = function (callback) { this._flushFns.push(callback); };\n TransitionAnimationEngine.prototype.afterFlushAnimationsDone = function (callback) { this._whenQuietFns.push(callback); };\n TransitionAnimationEngine.prototype._getPreviousPlayers = function (element, isQueriedElement, namespaceId, triggerName, toStateValue) {\n var players = [];\n if (isQueriedElement) {\n var queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n }\n else {\n var elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n var isRemovalAnimation_1 = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(function (player) {\n if (player.queued)\n return;\n if (!isRemovalAnimation_1 && player.triggerName != triggerName)\n return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(function (player) {\n if (namespaceId && namespaceId != player.namespaceId)\n return false;\n if (triggerName && triggerName != player.triggerName)\n return false;\n return true;\n });\n }\n return players;\n };\n TransitionAnimationEngine.prototype._beforeAnimationBuild = function (namespaceId, instruction, allPreviousPlayersMap) {\n var triggerName = instruction.triggerName;\n var rootElement = instruction.element;\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n var targetNameSpaceId = instruction.isRemovalTransition ? undefined : namespaceId;\n var targetTriggerName = instruction.isRemovalTransition ? undefined : triggerName;\n var _loop_1 = function (timelineInstruction) {\n var element = timelineInstruction.element;\n var isQueriedElement = element !== rootElement;\n var players = getOrSetAsInMap(allPreviousPlayersMap, element, []);\n var previousPlayers = this_1._getPreviousPlayers(element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(function (player) {\n var realPlayer = player.getRealPlayer();\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n };\n var this_1 = this;\n try {\n for (var _a = __values(instruction.timelines), _b = _a.next(); !_b.done; _b = _a.next()) {\n var timelineInstruction = _b.value;\n _loop_1(timelineInstruction);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\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 var e_1, _c;\n };\n TransitionAnimationEngine.prototype._buildAnimation = function (namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap, postStylesMap) {\n var _this = this;\n var triggerName = instruction.triggerName;\n var rootElement = instruction.element;\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n var allQueriedPlayers = [];\n var allConsumedElements = new Set();\n var allSubElements = new Set();\n var allNewPlayers = instruction.timelines.map(function (timelineInstruction) {\n var element = timelineInstruction.element;\n allConsumedElements.add(element);\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n var details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried)\n return new NoopAnimationPlayer(timelineInstruction.duration, timelineInstruction.delay);\n var isQueriedElement = element !== rootElement;\n var previousPlayers = flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(function (p) { return p.getRealPlayer(); }))\n .filter(function (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 var pp = p;\n return pp.element ? pp.element === element : false;\n });\n var preStyles = preStylesMap.get(element);\n var postStyles = postStylesMap.get(element);\n var keyframes = normalizeKeyframes(_this.driver, _this._normalizer, element, timelineInstruction.keyframes, preStyles, postStyles);\n var player = _this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\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 if (isQueriedElement) {\n var wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n return player;\n });\n allQueriedPlayers.forEach(function (player) {\n getOrSetAsInMap(_this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(function () { return deleteOrUnsetInMap(_this.playersByQueriedElement, player.element, player); });\n });\n allConsumedElements.forEach(function (element) { return addClass(element, NG_ANIMATING_CLASSNAME); });\n var player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(function () {\n allConsumedElements.forEach(function (element) { return removeClass(element, NG_ANIMATING_CLASSNAME); });\n setStyles(rootElement, instruction.toStyles);\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(function (element) { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });\n return player;\n };\n TransitionAnimationEngine.prototype._buildPlayer = function (instruction, keyframes, previousPlayers) {\n if (keyframes.length > 0) {\n return this.driver.animate(instruction.element, keyframes, instruction.duration, instruction.delay, instruction.easing, previousPlayers);\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 return TransitionAnimationEngine;\n}());\nvar TransitionAnimationPlayer = /** @class */ (function () {\n function TransitionAnimationPlayer(namespaceId, triggerName, element) {\n this.namespaceId = namespaceId;\n this.triggerName = triggerName;\n this.element = element;\n this._player = new NoopAnimationPlayer();\n this._containsRealPlayer = false;\n this._queuedCallbacks = {};\n this.destroyed = false;\n this.markedForDestroy = false;\n this.disabled = false;\n this.queued = true;\n this.totalTime = 0;\n }\n TransitionAnimationPlayer.prototype.setRealPlayer = function (player) {\n var _this = this;\n if (this._containsRealPlayer)\n return;\n this._player = player;\n Object.keys(this._queuedCallbacks).forEach(function (phase) {\n _this._queuedCallbacks[phase].forEach(function (callback) { return listenOnPlayer(player, phase, undefined, callback); });\n });\n this._queuedCallbacks = {};\n this._containsRealPlayer = true;\n this.overrideTotalTime(player.totalTime);\n this.queued = false;\n };\n TransitionAnimationPlayer.prototype.getRealPlayer = function () { return this._player; };\n TransitionAnimationPlayer.prototype.overrideTotalTime = function (totalTime) { this.totalTime = totalTime; };\n TransitionAnimationPlayer.prototype.syncPlayerEvents = function (player) {\n var _this = this;\n var p = this._player;\n if (p.triggerCallback) {\n player.onStart(function () { return p.triggerCallback('start'); });\n }\n player.onDone(function () { return _this.finish(); });\n player.onDestroy(function () { return _this.destroy(); });\n };\n TransitionAnimationPlayer.prototype._queueEvent = function (name, callback) {\n getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);\n };\n TransitionAnimationPlayer.prototype.onDone = function (fn) {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n };\n TransitionAnimationPlayer.prototype.onStart = function (fn) {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n };\n TransitionAnimationPlayer.prototype.onDestroy = function (fn) {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n };\n TransitionAnimationPlayer.prototype.init = function () { this._player.init(); };\n TransitionAnimationPlayer.prototype.hasStarted = function () { return this.queued ? false : this._player.hasStarted(); };\n TransitionAnimationPlayer.prototype.play = function () { !this.queued && this._player.play(); };\n TransitionAnimationPlayer.prototype.pause = function () { !this.queued && this._player.pause(); };\n TransitionAnimationPlayer.prototype.restart = function () { !this.queued && this._player.restart(); };\n TransitionAnimationPlayer.prototype.finish = function () { this._player.finish(); };\n TransitionAnimationPlayer.prototype.destroy = function () {\n this.destroyed = true;\n this._player.destroy();\n };\n TransitionAnimationPlayer.prototype.reset = function () { !this.queued && this._player.reset(); };\n TransitionAnimationPlayer.prototype.setPosition = function (p) {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n };\n TransitionAnimationPlayer.prototype.getPosition = function () { return this.queued ? 0 : this._player.getPosition(); };\n /* @internal */\n /* @internal */\n TransitionAnimationPlayer.prototype.triggerCallback = /* @internal */\n function (phaseName) {\n var p = this._player;\n if (p.triggerCallback) {\n p.triggerCallback(phaseName);\n }\n };\n return TransitionAnimationPlayer;\n}());\nfunction deleteOrUnsetInMap(map, key, value) {\n var currentValues;\n if (map instanceof Map) {\n currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n var index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n }\n else {\n currentValues = map[key];\n if (currentValues) {\n if (currentValues.length) {\n var 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}\nfunction normalizeTriggerValue(value) {\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}\nfunction isElementNode(node) {\n return node && node['nodeType'] === 1;\n}\nfunction isTriggerEventValid(eventName) {\n return eventName == 'start' || eventName == 'done';\n}\nfunction cloakElement(element, value) {\n var oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\nfunction cloakAndComputeStyles(valuesMap, driver, elements, elementPropsMap, defaultStyle) {\n var cloakVals = [];\n elements.forEach(function (element) { return cloakVals.push(cloakElement(element)); });\n var failedElements = [];\n elementPropsMap.forEach(function (props, element) {\n var styles = {};\n props.forEach(function (prop) {\n var value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);\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 // 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 var i = 0;\n elements.forEach(function (element) { return cloakElement(element, cloakVals[i++]); });\n return failedElements;\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, nodes) {\n var rootMap = new Map();\n roots.forEach(function (root) { return rootMap.set(root, []); });\n if (nodes.length == 0)\n return rootMap;\n var NULL_NODE = 1;\n var nodeSet = new Set(nodes);\n var localRootMap = new Map();\n function getRoot(node) {\n if (!node)\n return NULL_NODE;\n var root = localRootMap.get(node);\n if (root)\n return root;\n var parent = node.parentNode;\n if (rootMap.has(parent)) {\n // ngIf inside @trigger\n root = parent;\n }\n else if (nodeSet.has(parent)) {\n // ngIf inside ngIf\n root = NULL_NODE;\n }\n else {\n // recurse upwards\n root = getRoot(parent);\n }\n localRootMap.set(node, root);\n return root;\n }\n nodes.forEach(function (node) {\n var root = getRoot(node);\n if (root !== NULL_NODE) {\n rootMap.get(root).push(node);\n }\n });\n return rootMap;\n}\nvar CLASSES_CACHE_KEY = '$$classes';\nfunction addClass(element, className) {\n if (element.classList) {\n element.classList.add(className);\n }\n else {\n var classes = element[CLASSES_CACHE_KEY];\n if (!classes) {\n classes = element[CLASSES_CACHE_KEY] = {};\n }\n classes[className] = true;\n }\n}\nfunction removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n }\n else {\n var classes = element[CLASSES_CACHE_KEY];\n if (classes) {\n delete classes[className];\n }\n }\n}\nfunction removeNodesAfterAnimationDone(engine, element, players) {\n optimizeGroupPlayer(players).onDone(function () { return engine.processLeaveNode(element); });\n}\nfunction flattenGroupPlayers(players) {\n var finalPlayers = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\nfunction _flattenGroupPlayersRecur(players, finalPlayers) {\n for (var i = 0; i < players.length; i++) {\n var player = players[i];\n if (player instanceof ɵAnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n }\n else {\n finalPlayers.push(player);\n }\n }\n}\nfunction objEquals(a, b) {\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (k1.length != k2.length)\n return false;\n for (var i = 0; i < k1.length; i++) {\n var prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop])\n return false;\n }\n return true;\n}\nfunction replacePostStylesAsPre(element, allPreStyleElements, allPostStyleElements) {\n var postEntry = allPostStyleElements.get(element);\n if (!postEntry)\n return false;\n var preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(function (data) { return preEntry.add(data); });\n }\n else {\n allPreStyleElements.set(element, postEntry);\n }\n allPostStyleElements.delete(element);\n return true;\n}\n\nvar AnimationEngine = /** @class */ (function () {\n function AnimationEngine(_driver, normalizer) {\n var _this = this;\n this._driver = _driver;\n this._triggerCache = {};\n // this method is designed to be overridden by the code that uses this engine\n this.onRemovalComplete = function (element, context) { };\n this._transitionEngine = new TransitionAnimationEngine(_driver, normalizer);\n this._timelineEngine = new TimelineAnimationEngine(_driver, normalizer);\n this._transitionEngine.onRemovalComplete = function (element, context) {\n return _this.onRemovalComplete(element, context);\n };\n }\n AnimationEngine.prototype.registerTrigger = function (componentId, namespaceId, hostElement, name, metadata) {\n var cacheKey = componentId + '-' + name;\n var trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n var errors = [];\n var ast = buildAnimationAst(this._driver, metadata, errors);\n if (errors.length) {\n throw new Error(\"The animation trigger \\\"\" + 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 AnimationEngine.prototype.register = function (namespaceId, hostElement) {\n this._transitionEngine.register(namespaceId, hostElement);\n };\n AnimationEngine.prototype.destroy = function (namespaceId, context) {\n this._transitionEngine.destroy(namespaceId, context);\n };\n AnimationEngine.prototype.onInsert = function (namespaceId, element, parent, insertBefore) {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n };\n AnimationEngine.prototype.onRemove = function (namespaceId, element, context) {\n this._transitionEngine.removeNode(namespaceId, element, context);\n };\n AnimationEngine.prototype.disableAnimations = function (element, disable) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n };\n AnimationEngine.prototype.process = function (namespaceId, element, property, value) {\n if (property.charAt(0) == '@') {\n var _a = __read(parseTimelineCommand(property), 2), id = _a[0], action = _a[1];\n var args = value;\n this._timelineEngine.command(id, element, action, args);\n }\n else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n };\n AnimationEngine.prototype.listen = function (namespaceId, element, eventName, eventPhase, callback) {\n // @@listen\n if (eventName.charAt(0) == '@') {\n var _a = __read(parseTimelineCommand(eventName), 2), id = _a[0], action = _a[1];\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n };\n AnimationEngine.prototype.flush = function (microtaskId) {\n if (microtaskId === void 0) { microtaskId = -1; }\n this._transitionEngine.flush(microtaskId);\n };\n Object.defineProperty(AnimationEngine.prototype, \"players\", {\n get: function () {\n return this._transitionEngine.players\n .concat(this._timelineEngine.players);\n },\n enumerable: true,\n configurable: true\n });\n AnimationEngine.prototype.whenRenderingDone = function () { return this._transitionEngine.whenRenderingDone(); };\n return AnimationEngine;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\nvar ANIMATION_PROP = 'animation';\nvar ANIMATIONEND_EVENT = 'animationend';\nvar ONE_SECOND$1 = 1000;\nvar ElementAnimationStyleHandler = /** @class */ (function () {\n function ElementAnimationStyleHandler(_element, _name, _duration, _delay, _easing, _fillMode, _onDoneFn) {\n var _this = this;\n this._element = _element;\n this._name = _name;\n this._duration = _duration;\n this._delay = _delay;\n this._easing = _easing;\n this._fillMode = _fillMode;\n this._onDoneFn = _onDoneFn;\n this._finished = false;\n this._destroyed = false;\n this._startTime = 0;\n this._position = 0;\n this._eventFn = function (e) { return _this._handleCallback(e); };\n }\n ElementAnimationStyleHandler.prototype.apply = function () {\n applyKeyframeAnimation(this._element, this._duration + \"ms \" + this._easing + \" \" + this._delay + \"ms 1 normal \" + this._fillMode + \" \" + this._name);\n addRemoveAnimationEvent(this._element, this._eventFn, false);\n this._startTime = Date.now();\n };\n ElementAnimationStyleHandler.prototype.pause = function () { playPauseAnimation(this._element, this._name, 'paused'); };\n ElementAnimationStyleHandler.prototype.resume = function () { playPauseAnimation(this._element, this._name, 'running'); };\n ElementAnimationStyleHandler.prototype.setPosition = function (position) {\n var index = findIndexForAnimation(this._element, this._name);\n this._position = position * this._duration;\n setAnimationStyle(this._element, 'Delay', \"-\" + this._position + \"ms\", index);\n };\n ElementAnimationStyleHandler.prototype.getPosition = function () { return this._position; };\n ElementAnimationStyleHandler.prototype._handleCallback = function (event) {\n var timestamp = event._ngTestManualTimestamp || Date.now();\n var elapsedTime = parseFloat(event.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)) * ONE_SECOND$1;\n if (event.animationName == this._name &&\n Math.max(timestamp - this._startTime, 0) >= this._delay && elapsedTime >= this._duration) {\n this.finish();\n }\n };\n ElementAnimationStyleHandler.prototype.finish = function () {\n if (this._finished)\n return;\n this._finished = true;\n this._onDoneFn();\n addRemoveAnimationEvent(this._element, this._eventFn, true);\n };\n ElementAnimationStyleHandler.prototype.destroy = function () {\n if (this._destroyed)\n return;\n this._destroyed = true;\n this.finish();\n removeKeyframeAnimation(this._element, this._name);\n };\n return ElementAnimationStyleHandler;\n}());\nfunction playPauseAnimation(element, name, status) {\n var index = findIndexForAnimation(element, name);\n setAnimationStyle(element, 'PlayState', status, index);\n}\nfunction applyKeyframeAnimation(element, value) {\n var anim = getAnimationStyle(element, '').trim();\n var index = 0;\n if (anim.length) {\n index = countChars(anim, ',') + 1;\n value = anim + \", \" + value;\n }\n setAnimationStyle(element, '', value);\n return index;\n}\nfunction removeKeyframeAnimation(element, name) {\n var anim = getAnimationStyle(element, '');\n var tokens = anim.split(',');\n var index = findMatchingTokenIndex(tokens, name);\n if (index >= 0) {\n tokens.splice(index, 1);\n var newValue = tokens.join(',');\n setAnimationStyle(element, '', newValue);\n }\n}\nfunction findIndexForAnimation(element, value) {\n var anim = getAnimationStyle(element, '');\n if (anim.indexOf(',') > 0) {\n var tokens = anim.split(',');\n return findMatchingTokenIndex(tokens, value);\n }\n return findMatchingTokenIndex([anim], value);\n}\nfunction findMatchingTokenIndex(tokens, searchToken) {\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].indexOf(searchToken) >= 0) {\n return i;\n }\n }\n return -1;\n}\nfunction addRemoveAnimationEvent(element, fn, doRemove) {\n doRemove ? element.removeEventListener(ANIMATIONEND_EVENT, fn) :\n element.addEventListener(ANIMATIONEND_EVENT, fn);\n}\nfunction setAnimationStyle(element, name, value, index) {\n var prop = ANIMATION_PROP + name;\n if (index != null) {\n var oldValue = element.style[prop];\n if (oldValue.length) {\n var tokens = oldValue.split(',');\n tokens[index] = value;\n value = tokens.join(',');\n }\n }\n element.style[prop] = value;\n}\nfunction getAnimationStyle(element, name) {\n return element.style[ANIMATION_PROP + name];\n}\nfunction countChars(value, char) {\n var count = 0;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === char)\n count++;\n }\n return count;\n}\n\nvar DEFAULT_FILL_MODE = 'forwards';\nvar DEFAULT_EASING = 'linear';\nvar AnimatorControlState;\n(function (AnimatorControlState) {\n AnimatorControlState[AnimatorControlState[\"INITIALIZED\"] = 1] = \"INITIALIZED\";\n AnimatorControlState[AnimatorControlState[\"STARTED\"] = 2] = \"STARTED\";\n AnimatorControlState[AnimatorControlState[\"FINISHED\"] = 3] = \"FINISHED\";\n AnimatorControlState[AnimatorControlState[\"DESTROYED\"] = 4] = \"DESTROYED\";\n})(AnimatorControlState || (AnimatorControlState = {}));\nvar CssKeyframesPlayer = /** @class */ (function () {\n function CssKeyframesPlayer(element, keyframes, animationName, _duration, _delay, easing, _finalStyles) {\n this.element = element;\n this.keyframes = keyframes;\n this.animationName = animationName;\n this._duration = _duration;\n this._delay = _delay;\n this._finalStyles = _finalStyles;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._started = false;\n this.currentSnapshot = {};\n this.state = 0;\n this.easing = easing || DEFAULT_EASING;\n this.totalTime = _duration + _delay;\n this._buildStyler();\n }\n CssKeyframesPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n CssKeyframesPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n CssKeyframesPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n CssKeyframesPlayer.prototype.destroy = function () {\n this.init();\n if (this.state >= AnimatorControlState.DESTROYED)\n return;\n this.state = AnimatorControlState.DESTROYED;\n this._styler.destroy();\n this._flushStartFns();\n this._flushDoneFns();\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n };\n CssKeyframesPlayer.prototype._flushDoneFns = function () {\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n };\n CssKeyframesPlayer.prototype._flushStartFns = function () {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n };\n CssKeyframesPlayer.prototype.finish = function () {\n this.init();\n if (this.state >= AnimatorControlState.FINISHED)\n return;\n this.state = AnimatorControlState.FINISHED;\n this._styler.finish();\n this._flushStartFns();\n this._flushDoneFns();\n };\n CssKeyframesPlayer.prototype.setPosition = function (value) { this._styler.setPosition(value); };\n CssKeyframesPlayer.prototype.getPosition = function () { return this._styler.getPosition(); };\n CssKeyframesPlayer.prototype.hasStarted = function () { return this.state >= AnimatorControlState.STARTED; };\n CssKeyframesPlayer.prototype.init = function () {\n if (this.state >= AnimatorControlState.INITIALIZED)\n return;\n this.state = AnimatorControlState.INITIALIZED;\n var elm = this.element;\n this._styler.apply();\n if (this._delay) {\n this._styler.pause();\n }\n };\n CssKeyframesPlayer.prototype.play = function () {\n this.init();\n if (!this.hasStarted()) {\n this._flushStartFns();\n this.state = AnimatorControlState.STARTED;\n }\n this._styler.resume();\n };\n CssKeyframesPlayer.prototype.pause = function () {\n this.init();\n this._styler.pause();\n };\n CssKeyframesPlayer.prototype.restart = function () {\n this.reset();\n this.play();\n };\n CssKeyframesPlayer.prototype.reset = function () {\n this._styler.destroy();\n this._buildStyler();\n this._styler.apply();\n };\n CssKeyframesPlayer.prototype._buildStyler = function () {\n var _this = this;\n this._styler = new ElementAnimationStyleHandler(this.element, this.animationName, this._duration, this._delay, this.easing, DEFAULT_FILL_MODE, function () { return _this.finish(); });\n };\n /* @internal */\n /* @internal */\n CssKeyframesPlayer.prototype.triggerCallback = /* @internal */\n function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n CssKeyframesPlayer.prototype.beforeDestroy = function () {\n var _this = this;\n this.init();\n var styles = {};\n if (this.hasStarted()) {\n var finished_1 = this.state >= AnimatorControlState.FINISHED;\n Object.keys(this._finalStyles).forEach(function (prop) {\n if (prop != 'offset') {\n styles[prop] = finished_1 ? _this._finalStyles[prop] : computeStyle(_this.element, prop);\n }\n });\n }\n this.currentSnapshot = styles;\n };\n return CssKeyframesPlayer;\n}());\n\nvar DirectStylePlayer = /** @class */ (function (_super) {\n __extends(DirectStylePlayer, _super);\n function DirectStylePlayer(element, _styles) {\n var _this = _super.call(this) || this;\n _this.element = element;\n _this._styles = _styles;\n _this._startingStyles = {};\n _this.__initialized = false;\n return _this;\n }\n DirectStylePlayer.prototype.init = function () {\n var _this = this;\n if (this.__initialized || !this._startingStyles)\n return;\n this.__initialized = true;\n Object.keys(this._styles).forEach(function (prop) {\n _this._startingStyles[prop] = _this.element.style[prop];\n });\n _super.prototype.init.call(this);\n };\n DirectStylePlayer.prototype.play = function () {\n var _this = this;\n if (!this._startingStyles)\n return;\n this.init();\n Object.keys(this._styles).forEach(function (prop) { _this.element.style[prop] = _this._styles[prop]; });\n _super.prototype.play.call(this);\n };\n DirectStylePlayer.prototype.destroy = function () {\n var _this = this;\n if (!this._startingStyles)\n return;\n Object.keys(this._startingStyles).forEach(function (prop) {\n var value = _this._startingStyles[prop];\n if (value) {\n _this.element.style[prop] = value;\n }\n else {\n _this.element.style.removeProperty(prop);\n }\n });\n this._startingStyles = null;\n _super.prototype.destroy.call(this);\n };\n return DirectStylePlayer;\n}(NoopAnimationPlayer));\n\nvar KEYFRAMES_NAME_PREFIX = 'gen_css_kf_';\nvar TAB_SPACE = ' ';\nvar CssKeyframesDriver = /** @class */ (function () {\n function CssKeyframesDriver() {\n this._count = 0;\n this._head = document.querySelector('head');\n this._warningIssued = false;\n }\n CssKeyframesDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };\n CssKeyframesDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n CssKeyframesDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };\n CssKeyframesDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n CssKeyframesDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n };\n CssKeyframesDriver.prototype.buildKeyframeElement = function (element, name, keyframes) {\n keyframes = keyframes.map(function (kf) { return hypenatePropsObject(kf); });\n var keyframeStr = \"@keyframes \" + name + \" {\\n\";\n var tab = '';\n keyframes.forEach(function (kf) {\n tab = TAB_SPACE;\n var offset = parseFloat(kf.offset);\n keyframeStr += \"\" + tab + offset * 100 + \"% {\\n\";\n tab += TAB_SPACE;\n Object.keys(kf).forEach(function (prop) {\n var 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 var kfElm = document.createElement('style');\n kfElm.innerHTML = keyframeStr;\n return kfElm;\n };\n CssKeyframesDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n if (scrubberAccessRequested) {\n this._notifyFaultyScrubber();\n }\n var previousCssKeyframePlayers = previousPlayers.filter(function (player) { return player instanceof CssKeyframesPlayer; });\n var previousStyles = {};\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousCssKeyframePlayers.forEach(function (player) {\n var styles = player.currentSnapshot;\n Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });\n });\n }\n keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n var finalStyles = flattenKeyframesIntoStyles(keyframes);\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 var animationName = \"\" + KEYFRAMES_NAME_PREFIX + this._count++;\n var kfElm = this.buildKeyframeElement(element, animationName, keyframes);\n document.querySelector('head').appendChild(kfElm);\n var player = new CssKeyframesPlayer(element, keyframes, animationName, duration, delay, easing, finalStyles);\n player.onDestroy(function () { return removeElement(kfElm); });\n return player;\n };\n CssKeyframesDriver.prototype._notifyFaultyScrubber = function () {\n if (!this._warningIssued) {\n console.warn('@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\\n', ' visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill.');\n this._warningIssued = true;\n }\n };\n return CssKeyframesDriver;\n}());\nfunction flattenKeyframesIntoStyles(keyframes) {\n var flatKeyframes = {};\n if (keyframes) {\n var kfs = Array.isArray(keyframes) ? keyframes : [keyframes];\n kfs.forEach(function (kf) {\n Object.keys(kf).forEach(function (prop) {\n if (prop == 'offset' || prop == 'easing')\n return;\n flatKeyframes[prop] = kf[prop];\n });\n });\n }\n return flatKeyframes;\n}\nfunction hypenatePropsObject(object) {\n var newObj = {};\n Object.keys(object).forEach(function (prop) {\n var newProp = prop.replace(/([a-z])([A-Z])/g, '$1-$2');\n newObj[newProp] = object[prop];\n });\n return newObj;\n}\nfunction removeElement(node) {\n node.parentNode.removeChild(node);\n}\n\nvar WebAnimationsPlayer = /** @class */ (function () {\n function WebAnimationsPlayer(element, keyframes, options) {\n this.element = element;\n this.keyframes = keyframes;\n this.options = options;\n this._onDoneFns = [];\n this._onStartFns = [];\n this._onDestroyFns = [];\n this._initialized = false;\n this._finished = false;\n this._started = false;\n this._destroyed = false;\n this.time = 0;\n this.parentPlayer = null;\n this.currentSnapshot = {};\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n }\n WebAnimationsPlayer.prototype._onFinish = function () {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(function (fn) { return fn(); });\n this._onDoneFns = [];\n }\n };\n WebAnimationsPlayer.prototype.init = function () {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n };\n WebAnimationsPlayer.prototype._buildPlayer = function () {\n var _this = this;\n if (this._initialized)\n return;\n this._initialized = true;\n var keyframes = this.keyframes;\n this.domPlayer =\n this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};\n this.domPlayer.addEventListener('finish', function () { return _this._onFinish(); });\n };\n WebAnimationsPlayer.prototype._preparePlayerBeforeStart = function () {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n }\n else {\n this.domPlayer.pause();\n }\n };\n /** @internal */\n /** @internal */\n WebAnimationsPlayer.prototype._triggerWebAnimation = /** @internal */\n function (element, keyframes, options) {\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);\n };\n WebAnimationsPlayer.prototype.onStart = function (fn) { this._onStartFns.push(fn); };\n WebAnimationsPlayer.prototype.onDone = function (fn) { this._onDoneFns.push(fn); };\n WebAnimationsPlayer.prototype.onDestroy = function (fn) { this._onDestroyFns.push(fn); };\n WebAnimationsPlayer.prototype.play = function () {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(function (fn) { return fn(); });\n this._onStartFns = [];\n this._started = true;\n }\n this.domPlayer.play();\n };\n WebAnimationsPlayer.prototype.pause = function () {\n this.init();\n this.domPlayer.pause();\n };\n WebAnimationsPlayer.prototype.finish = function () {\n this.init();\n this._onFinish();\n this.domPlayer.finish();\n };\n WebAnimationsPlayer.prototype.reset = function () {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n };\n WebAnimationsPlayer.prototype._resetDomPlayerState = function () {\n if (this.domPlayer) {\n this.domPlayer.cancel();\n }\n };\n WebAnimationsPlayer.prototype.restart = function () {\n this.reset();\n this.play();\n };\n WebAnimationsPlayer.prototype.hasStarted = function () { return this._started; };\n WebAnimationsPlayer.prototype.destroy = function () {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n this._onDestroyFns.forEach(function (fn) { return fn(); });\n this._onDestroyFns = [];\n }\n };\n WebAnimationsPlayer.prototype.setPosition = function (p) { this.domPlayer.currentTime = p * this.time; };\n WebAnimationsPlayer.prototype.getPosition = function () { return this.domPlayer.currentTime / this.time; };\n Object.defineProperty(WebAnimationsPlayer.prototype, \"totalTime\", {\n get: function () { return this._delay + this._duration; },\n enumerable: true,\n configurable: true\n });\n WebAnimationsPlayer.prototype.beforeDestroy = function () {\n var _this = this;\n var styles = {};\n if (this.hasStarted()) {\n Object.keys(this._finalKeyframe).forEach(function (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 /* @internal */\n /* @internal */\n WebAnimationsPlayer.prototype.triggerCallback = /* @internal */\n function (phaseName) {\n var methods = phaseName == 'start' ? this._onStartFns : this._onDoneFns;\n methods.forEach(function (fn) { return fn(); });\n methods.length = 0;\n };\n return WebAnimationsPlayer;\n}());\n\nvar WebAnimationsDriver = /** @class */ (function () {\n function WebAnimationsDriver() {\n this._isNativeImpl = /\\{\\s*\\[native\\s+code\\]\\s*\\}/.test(getElementAnimateFn().toString());\n this._cssKeyframesDriver = new CssKeyframesDriver();\n }\n WebAnimationsDriver.prototype.validateStyleProperty = function (prop) { return validateStyleProperty(prop); };\n WebAnimationsDriver.prototype.matchesElement = function (element, selector) {\n return matchesElement(element, selector);\n };\n WebAnimationsDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };\n WebAnimationsDriver.prototype.query = function (element, selector, multi) {\n return invokeQuery(element, selector, multi);\n };\n WebAnimationsDriver.prototype.computeStyle = function (element, prop, defaultValue) {\n return window.getComputedStyle(element)[prop];\n };\n WebAnimationsDriver.prototype.overrideWebAnimationsSupport = function (supported) { this._isNativeImpl = supported; };\n WebAnimationsDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers, scrubberAccessRequested) {\n if (previousPlayers === void 0) { previousPlayers = []; }\n var useKeyframes = !scrubberAccessRequested && !this._isNativeImpl;\n if (useKeyframes) {\n return this._cssKeyframesDriver.animate(element, keyframes, duration, delay, easing, previousPlayers);\n }\n var fill = delay == 0 ? 'both' : 'forwards';\n var playerOptions = { duration: duration, delay: delay, fill: 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 var previousStyles = {};\n var previousWebAnimationPlayers = previousPlayers.filter(function (player) { return player instanceof WebAnimationsPlayer; });\n if (allowPreviousPlayerStylesMerge(duration, delay)) {\n previousWebAnimationPlayers.forEach(function (player) {\n var styles = player.currentSnapshot;\n Object.keys(styles).forEach(function (prop) { return previousStyles[prop] = styles[prop]; });\n });\n }\n keyframes = keyframes.map(function (styles) { return copyStyles(styles, false); });\n keyframes = balancePreviousStylesIntoKeyframes(element, keyframes, previousStyles);\n return new WebAnimationsPlayer(element, keyframes, playerOptions);\n };\n return WebAnimationsDriver;\n}());\nfunction supportsWebAnimations() {\n return typeof getElementAnimateFn() === 'function';\n}\nfunction getElementAnimateFn() {\n return (typeof Element !== 'undefined' && Element.prototype['animate']) || {};\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 { AnimationDriver, Animation as ɵAnimation, AnimationStyleNormalizer as ɵAnimationStyleNormalizer, NoopAnimationStyleNormalizer as ɵNoopAnimationStyleNormalizer, WebAnimationsStyleNormalizer as ɵWebAnimationsStyleNormalizer, AnimationDriver as ɵAnimationDriver, NoopAnimationDriver as ɵNoopAnimationDriver, AnimationEngine as ɵAnimationEngine, CssKeyframesDriver as ɵCssKeyframesDriver, CssKeyframesPlayer as ɵCssKeyframesPlayer, containsElement as ɵcontainsElement, invokeQuery as ɵinvokeQuery, matchesElement as ɵmatchesElement, validateStyleProperty as ɵvalidateStyleProperty, WebAnimationsDriver as ɵWebAnimationsDriver, supportsWebAnimations as ɵsupportsWebAnimations, WebAnimationsPlayer as ɵWebAnimationsPlayer, allowPreviousPlayerStylesMerge as ɵallowPreviousPlayerStylesMerge };\n//# sourceMappingURL=browser.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { Attribute, ChangeDetectorRef, ComponentFactoryResolver, Directive, ElementRef, EventEmitter, Host, Inject, Injectable, InjectionToken, Input, IterableDiffers, KeyValueDiffers, LOCALE_ID, NgModule, NgModuleRef, Optional, Pipe, Renderer2, TemplateRef, Version, ViewContainerRef, WrappedValue, isDevMode, ɵisListLikeIterable, ɵisObservable, ɵisPromise, ɵstringify } from '@angular/core';\nimport { __assign, __extends, __read, __values } from 'tslib';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 platform\n * 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-webworker` provides\n * one suitable for use with web workers.\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 independent.\n *\n *\n */\nvar PlatformLocation = /** @class */ (function () {\n function PlatformLocation() {\n }\n return PlatformLocation;\n}());\n/**\n * @description Indicates when a location is initialized.\n * @experimental\n */\nvar LOCATION_INITIALIZED = new InjectionToken('Location Initialized');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * `LocationStrategy` is responsible for representing and reading route state\n * from the browser's URL. Angular provides two strategies:\n * {@link HashLocationStrategy} and {@link PathLocationStrategy}.\n *\n * This is used under the hood of the {@link Location} service.\n *\n * Applications should use the {@link Router} or {@link Location} services to\n * interact with application route state.\n *\n * For instance, {@link HashLocationStrategy} produces URLs like\n * `http://example.com#/foo`, and {@link PathLocationStrategy} produces\n * `http://example.com/foo` as an equivalent URL.\n *\n * See these two classes for more.\n *\n *\n */\nvar LocationStrategy = /** @class */ (function () {\n function LocationStrategy() {\n }\n return LocationStrategy;\n}());\n/**\n * The `APP_BASE_HREF` token represents the base href to be used with the\n * {@link PathLocationStrategy}.\n *\n * If you're using {@link PathLocationStrategy}, you must provide a provider to a string\n * representing the URL prefix that should be preserved when generating and recognizing\n * URLs.\n *\n * ### Example\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 *\n */\nvar APP_BASE_HREF = new InjectionToken('appBaseHref');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * A service that applications can use to interact with a browser's URL.\n *\n * Depending on which {@link LocationStrategy} is used, `Location` will either persist\n * to the URL's path or the URL's hash segment.\n *\n * Note: it's better to use {@link 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 * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n */\nvar Location = /** @class */ (function () {\n function Location(platformStrategy) {\n var _this = this;\n /** @internal */\n this._subject = new EventEmitter();\n this._platformStrategy = platformStrategy;\n var browserBaseHref = this._platformStrategy.getBaseHref();\n this._baseHref = Location.stripTrailingSlash(_stripIndexHtml(browserBaseHref));\n this._platformStrategy.onPopState(function (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 * 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 /**\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 Location.prototype.path = /**\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 function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n return this.normalize(this._platformStrategy.path(includeHash));\n };\n /**\n * Normalizes the given path and compares to the current normalized path.\n */\n /**\n * Normalizes the given path and compares to the current normalized path.\n */\n Location.prototype.isCurrentPathEqualTo = /**\n * Normalizes the given path and compares to the current normalized path.\n */\n function (path, query) {\n if (query === void 0) { query = ''; }\n return this.path() == this.normalize(path + Location.normalizeQueryParams(query));\n };\n /**\n * Given a string representing a URL, returns the normalized URL path without leading or\n * trailing slashes.\n */\n /**\n * Given a string representing a URL, returns the normalized URL path without leading or\n * trailing slashes.\n */\n Location.prototype.normalize = /**\n * Given a string representing a URL, returns the normalized URL path without leading or\n * trailing slashes.\n */\n function (url) {\n return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n };\n /**\n * Given a string representing a URL, returns the platform-specific external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one\n * before normalizing. This method will also add a hash if `HashLocationStrategy` is\n * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n */\n /**\n * Given a string representing a URL, returns the platform-specific external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one\n * before normalizing. This method will also add a hash if `HashLocationStrategy` is\n * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n */\n Location.prototype.prepareExternalUrl = /**\n * Given a string representing a URL, returns the platform-specific external URL path.\n * If the given URL doesn't begin with a leading slash (`'/'`), this method adds one\n * before normalizing. This method will also add a hash if `HashLocationStrategy` is\n * used, or the `APP_BASE_HREF` if the `PathLocationStrategy` is in use.\n */\n function (url) {\n if (url && url[0] !== '/') {\n url = '/' + url;\n }\n return this._platformStrategy.prepareExternalUrl(url);\n };\n // TODO: rename this method to pushState\n /**\n * Changes the browsers URL to the normalized version of the given URL, and pushes a\n * new item onto the platform's history.\n */\n // TODO: rename this method to pushState\n /**\n * Changes the browsers URL to the normalized version of the given URL, and pushes a\n * new item onto the platform's history.\n */\n Location.prototype.go = \n // TODO: rename this method to pushState\n /**\n * Changes the browsers URL to the normalized version of the given URL, and pushes a\n * new item onto the platform's history.\n */\n function (path, query, state) {\n if (query === void 0) { query = ''; }\n if (state === void 0) { state = null; }\n this._platformStrategy.pushState(state, '', path, query);\n };\n /**\n * Changes the browsers URL to the normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n */\n /**\n * Changes the browsers URL to the normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n */\n Location.prototype.replaceState = /**\n * Changes the browsers URL to the normalized version of the given URL, and replaces\n * the top item on the platform's history stack.\n */\n function (path, query, state) {\n if (query === void 0) { query = ''; }\n if (state === void 0) { state = null; }\n this._platformStrategy.replaceState(state, '', path, query);\n };\n /**\n * Navigates forward in the platform's history.\n */\n /**\n * Navigates forward in the platform's history.\n */\n Location.prototype.forward = /**\n * Navigates forward in the platform's history.\n */\n function () { this._platformStrategy.forward(); };\n /**\n * Navigates back in the platform's history.\n */\n /**\n * Navigates back in the platform's history.\n */\n Location.prototype.back = /**\n * Navigates back in the platform's history.\n */\n function () { this._platformStrategy.back(); };\n /**\n * Subscribe to the platform's `popState` events.\n */\n /**\n * Subscribe to the platform's `popState` events.\n */\n Location.prototype.subscribe = /**\n * Subscribe to the platform's `popState` events.\n */\n function (onNext, onThrow, onReturn) {\n return this._subject.subscribe({ next: onNext, error: onThrow, complete: onReturn });\n };\n /**\n * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as\n * is.\n */\n /**\n * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as\n * is.\n */\n Location.normalizeQueryParams = /**\n * Given a string of url parameters, prepend with '?' if needed, otherwise return parameters as\n * is.\n */\n function (params) {\n return params && params[0] !== '?' ? '?' + params : params;\n };\n /**\n * Given 2 parts of a url, join them with a slash if needed.\n */\n /**\n * Given 2 parts of a url, join them with a slash if needed.\n */\n Location.joinWithSlash = /**\n * Given 2 parts of a url, join them with a slash if needed.\n */\n function (start, end) {\n if (start.length == 0) {\n return end;\n }\n if (end.length == 0) {\n return start;\n }\n var 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 * If url has a trailing slash, remove it, otherwise return url as is. This\n * method looks for the first occurrence of either #, ?, or the end of the\n * line as `/` characters after any of these should not be replaced.\n */\n /**\n * If url has a trailing slash, remove it, otherwise return url as is. This\n * method looks for the first occurrence of either #, ?, or the end of the\n * line as `/` characters after any of these should not be replaced.\n */\n Location.stripTrailingSlash = /**\n * If url has a trailing slash, remove it, otherwise return url as is. This\n * method looks for the first occurrence of either #, ?, or the end of the\n * line as `/` characters after any of these should not be replaced.\n */\n function (url) {\n var match = url.match(/#|\\?|$/);\n var pathEndIdx = match && match.index || url.length;\n var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n };\n Location.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Location.ctorParameters = function () { return [\n { type: LocationStrategy, },\n ]; };\n return Location;\n}());\nfunction _stripBaseHref(baseHref, url) {\n return baseHref && url.startsWith(baseHref) ? url.substring(baseHref.length) : url;\n}\nfunction _stripIndexHtml(url) {\n return url.replace(/\\/index.html$/, '');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 * ### Example\n *\n * {@example common/location/ts/hash_location_component.ts region='LocationComponent'}\n *\n *\n */\nvar HashLocationStrategy = /** @class */ (function (_super) {\n __extends(HashLocationStrategy, _super);\n function HashLocationStrategy(_platformLocation, _baseHref) {\n var _this = _super.call(this) || this;\n _this._platformLocation = _platformLocation;\n _this._baseHref = '';\n if (_baseHref != null) {\n _this._baseHref = _baseHref;\n }\n return _this;\n }\n HashLocationStrategy.prototype.onPopState = function (fn) {\n this._platformLocation.onPopState(fn);\n this._platformLocation.onHashChange(fn);\n };\n HashLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };\n HashLocationStrategy.prototype.path = function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n // the hash value is always prefixed with a `#`\n // and if it is empty then it will stay empty\n var path = this._platformLocation.hash;\n if (path == null)\n path = '#';\n return path.length > 0 ? path.substring(1) : path;\n };\n HashLocationStrategy.prototype.prepareExternalUrl = function (internal) {\n var url = Location.joinWithSlash(this._baseHref, internal);\n return url.length > 0 ? ('#' + url) : url;\n };\n HashLocationStrategy.prototype.pushState = function (state, title, path, queryParams) {\n var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.pushState(state, title, url);\n };\n HashLocationStrategy.prototype.replaceState = function (state, title, path, queryParams) {\n var url = this.prepareExternalUrl(path + Location.normalizeQueryParams(queryParams));\n if (url.length == 0) {\n url = this._platformLocation.pathname;\n }\n this._platformLocation.replaceState(state, title, url);\n };\n HashLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };\n HashLocationStrategy.prototype.back = function () { this._platformLocation.back(); };\n HashLocationStrategy.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HashLocationStrategy.ctorParameters = function () { return [\n { type: PlatformLocation, },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_BASE_HREF,] },] },\n ]; };\n return HashLocationStrategy;\n}(LocationStrategy));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 element to the document. This URL prefix that will be preserved\n * when generating and recognizing URLs.\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`.\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 * ### Example\n *\n * {@example common/location/ts/path_location_component.ts region='LocationComponent'}\n *\n *\n */\nvar PathLocationStrategy = /** @class */ (function (_super) {\n __extends(PathLocationStrategy, _super);\n function PathLocationStrategy(_platformLocation, href) {\n var _this = _super.call(this) || this;\n _this._platformLocation = _platformLocation;\n if (href == null) {\n href = _this._platformLocation.getBaseHrefFromDOM();\n }\n if (href == null) {\n throw new Error(\"No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.\");\n }\n _this._baseHref = href;\n return _this;\n }\n PathLocationStrategy.prototype.onPopState = function (fn) {\n this._platformLocation.onPopState(fn);\n this._platformLocation.onHashChange(fn);\n };\n PathLocationStrategy.prototype.getBaseHref = function () { return this._baseHref; };\n PathLocationStrategy.prototype.prepareExternalUrl = function (internal) {\n return Location.joinWithSlash(this._baseHref, internal);\n };\n PathLocationStrategy.prototype.path = function (includeHash) {\n if (includeHash === void 0) { includeHash = false; }\n var pathname = this._platformLocation.pathname +\n Location.normalizeQueryParams(this._platformLocation.search);\n var hash = this._platformLocation.hash;\n return hash && includeHash ? \"\" + pathname + hash : pathname;\n };\n PathLocationStrategy.prototype.pushState = function (state, title, url, queryParams) {\n var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));\n this._platformLocation.pushState(state, title, externalUrl);\n };\n PathLocationStrategy.prototype.replaceState = function (state, title, url, queryParams) {\n var externalUrl = this.prepareExternalUrl(url + Location.normalizeQueryParams(queryParams));\n this._platformLocation.replaceState(state, title, externalUrl);\n };\n PathLocationStrategy.prototype.forward = function () { this._platformLocation.forward(); };\n PathLocationStrategy.prototype.back = function () { this._platformLocation.back(); };\n PathLocationStrategy.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n PathLocationStrategy.ctorParameters = function () { return [\n { type: PlatformLocation, },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [APP_BASE_HREF,] },] },\n ]; };\n return PathLocationStrategy;\n}(LocationStrategy));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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\nvar u = undefined;\nfunction plural(n) {\n var 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', [['a', 'p'], ['AM', 'PM'], u], [['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, [['B', 'A'], ['BC', 'AD'], ['Before Christ', 'Anno Domini']], 0, [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'], ['{1}, {0}', u, '{1} \\'at\\' {0}', u],\n ['.', ',', ';', '%', '+', '-', 'E', '×', '‰', '∞', 'NaN', ':'],\n ['#,##0.###', '#,##0%', '¤#,##0.00', '#E0'], '$', 'US Dollar', {}, plural\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @experimental i18n support is experimental.\n */\nvar LOCALE_DATA = {};\n/**\n * Register global data to be used internally by Angular. See the\n * {@linkDocs guide/i18n#i18n-pipes \"I18n guide\"} to know how to import additional locale data.\n *\n * @experimental i18n support is experimental.\n */\n// The signature registerLocaleData(data: any, extraData?: any) is deprecated since v5.1\nfunction registerLocaleData(data, localeId, extraData) {\n if (typeof localeId !== 'string') {\n extraData = localeId;\n localeId = data[0 /* LocaleId */];\n }\n localeId = localeId.toLowerCase().replace(/_/g, '-');\n LOCALE_DATA[localeId] = data;\n if (extraData) {\n LOCALE_DATA[localeId][19 /* ExtraData */] = extraData;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** @internal */\nvar CURRENCIES_EN = {\n 'ADP': [undefined, undefined, 0],\n 'AFN': [undefined, undefined, 0],\n 'ALL': [undefined, undefined, 0],\n 'AMD': [undefined, undefined, 0],\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, '$', 0],\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, '$', 0],\n 'HKD': ['HK$', '$'],\n 'HNL': [undefined, 'L'],\n 'HRK': [undefined, 'kn'],\n 'HUF': [undefined, 'Ft', 2],\n 'IDR': [undefined, 'Rp', 0],\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, '₮', 0],\n 'MRO': [undefined, undefined, 0],\n 'MUR': [undefined, 'Rs', 0],\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', 0],\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, 0],\n 'UAH': [undefined, '₴'],\n 'UGX': [undefined, undefined, 0],\n 'USD': ['$'],\n 'UYI': [undefined, undefined, 0],\n 'UYU': [undefined, '$'],\n 'UZS': [undefined, undefined, 0],\n 'VEF': [undefined, 'Bs'],\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 '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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 different format styles that can be used to represent numbers.\n * Used by the function {@link getLocaleNumberFormat}.\n *\n * @experimental i18n support is experimental.\n */\n/**\n * The different format styles that can be used to represent numbers.\n * Used by the function {@link getLocaleNumberFormat}.\n *\n * @experimental i18n support is experimental.\n */\nvar NumberFormatStyle;\n/**\n * The different format styles that can be used to represent numbers.\n * Used by the function {@link getLocaleNumberFormat}.\n *\n * @experimental i18n support is experimental.\n */\n(function (NumberFormatStyle) {\n NumberFormatStyle[NumberFormatStyle[\"Decimal\"] = 0] = \"Decimal\";\n NumberFormatStyle[NumberFormatStyle[\"Percent\"] = 1] = \"Percent\";\n NumberFormatStyle[NumberFormatStyle[\"Currency\"] = 2] = \"Currency\";\n NumberFormatStyle[NumberFormatStyle[\"Scientific\"] = 3] = \"Scientific\";\n})(NumberFormatStyle || (NumberFormatStyle = {}));\n/** @experimental */\n/** @experimental */\nvar Plural;\n/** @experimental */\n(function (Plural) {\n Plural[Plural[\"Zero\"] = 0] = \"Zero\";\n Plural[Plural[\"One\"] = 1] = \"One\";\n Plural[Plural[\"Two\"] = 2] = \"Two\";\n Plural[Plural[\"Few\"] = 3] = \"Few\";\n Plural[Plural[\"Many\"] = 4] = \"Many\";\n Plural[Plural[\"Other\"] = 5] = \"Other\";\n})(Plural || (Plural = {}));\n/**\n * Some languages use two different forms of strings (standalone and format) depending on the\n * context.\n * Typically the standalone version is the nominative form of the word, and the format version is in\n * the genitive.\n * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.\n *\n * @experimental i18n support is experimental.\n */\n/**\n * Some languages use two different forms of strings (standalone and format) depending on the\n * context.\n * Typically the standalone version is the nominative form of the word, and the format version is in\n * the genitive.\n * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.\n *\n * @experimental i18n support is experimental.\n */\nvar FormStyle;\n/**\n * Some languages use two different forms of strings (standalone and format) depending on the\n * context.\n * Typically the standalone version is the nominative form of the word, and the format version is in\n * the genitive.\n * See [the CLDR website](http://cldr.unicode.org/translation/date-time) for more information.\n *\n * @experimental i18n support is experimental.\n */\n(function (FormStyle) {\n FormStyle[FormStyle[\"Format\"] = 0] = \"Format\";\n FormStyle[FormStyle[\"Standalone\"] = 1] = \"Standalone\";\n})(FormStyle || (FormStyle = {}));\n/**\n * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),\n * wide (full length), and short (2 characters, only for days).\n *\n * For example the day `Sunday` will be:\n * - Narrow: `S`\n * - Short: `Su`\n * - Abbreviated: `Sun`\n * - Wide: `Sunday`\n *\n * @experimental i18n support is experimental.\n */\n/**\n * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),\n * wide (full length), and short (2 characters, only for days).\n *\n * For example the day `Sunday` will be:\n * - Narrow: `S`\n * - Short: `Su`\n * - Abbreviated: `Sun`\n * - Wide: `Sunday`\n *\n * @experimental i18n support is experimental.\n */\nvar TranslationWidth;\n/**\n * Multiple widths are available for translations: narrow (1 character), abbreviated (3 characters),\n * wide (full length), and short (2 characters, only for days).\n *\n * For example the day `Sunday` will be:\n * - Narrow: `S`\n * - Short: `Su`\n * - Abbreviated: `Sun`\n * - Wide: `Sunday`\n *\n * @experimental i18n support is experimental.\n */\n(function (TranslationWidth) {\n TranslationWidth[TranslationWidth[\"Narrow\"] = 0] = \"Narrow\";\n TranslationWidth[TranslationWidth[\"Abbreviated\"] = 1] = \"Abbreviated\";\n TranslationWidth[TranslationWidth[\"Wide\"] = 2] = \"Wide\";\n TranslationWidth[TranslationWidth[\"Short\"] = 3] = \"Short\";\n})(TranslationWidth || (TranslationWidth = {}));\n/**\n * Multiple widths are available for formats: short (minimal amount of data), medium (small amount\n * of data), long (complete amount of data), full (complete amount of data and extra information).\n *\n * For example the date-time formats for the english locale will be:\n * - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)\n * - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)\n * - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)\n * - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`)\n *\n * @experimental i18n support is experimental.\n */\n/**\n * Multiple widths are available for formats: short (minimal amount of data), medium (small amount\n * of data), long (complete amount of data), full (complete amount of data and extra information).\n *\n * For example the date-time formats for the english locale will be:\n * - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)\n * - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)\n * - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)\n * - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`)\n *\n * @experimental i18n support is experimental.\n */\nvar FormatWidth;\n/**\n * Multiple widths are available for formats: short (minimal amount of data), medium (small amount\n * of data), long (complete amount of data), full (complete amount of data and extra information).\n *\n * For example the date-time formats for the english locale will be:\n * - `'short'`: `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`)\n * - `'medium'`: `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`)\n * - `'long'`: `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM GMT+1`)\n * - `'full'`: `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`)\n *\n * @experimental i18n support is experimental.\n */\n(function (FormatWidth) {\n FormatWidth[FormatWidth[\"Short\"] = 0] = \"Short\";\n FormatWidth[FormatWidth[\"Medium\"] = 1] = \"Medium\";\n FormatWidth[FormatWidth[\"Long\"] = 2] = \"Long\";\n FormatWidth[FormatWidth[\"Full\"] = 3] = \"Full\";\n})(FormatWidth || (FormatWidth = {}));\n/**\n * Number symbol that can be used to replace placeholders in number patterns.\n * The placeholders are based on english values:\n *\n * | Name | Example for en-US | Meaning |\n * |------------------------|-------------------|---------------------------------------------|\n * | decimal | 2,345`.`67 | decimal separator |\n * | group | 2`,`345.67 | grouping separator, typically for thousands |\n * | plusSign | `+`23 | the plus sign used with numbers |\n * | minusSign | `-`23 | the minus sign used with numbers |\n * | percentSign | 23.4`%` | the percent sign (out of 100) |\n * | perMille | 234`‰` | the permille sign (out of 1000) |\n * | exponential | 1.2`E`3 | used in computers for 1.2×10³. |\n * | superscriptingExponent | 1.2`×`103 | human-readable format of exponential |\n * | infinity | `∞` | used in +∞ and -∞. |\n * | nan | `NaN` | \"not a number\". |\n * | timeSeparator | 10`:`52 | symbol used between time units |\n * | currencyDecimal | $2,345`.`67 | decimal separator, fallback to \"decimal\" |\n * | currencyGroup | $2`,`345.67 | grouping separator, fallback to \"group\" |\n *\n * @experimental i18n support is experimental.\n */\n/**\n * Number symbol that can be used to replace placeholders in number patterns.\n * The placeholders are based on english values:\n *\n * | Name | Example for en-US | Meaning |\n * |------------------------|-------------------|---------------------------------------------|\n * | decimal | 2,345`.`67 | decimal separator |\n * | group | 2`,`345.67 | grouping separator, typically for thousands |\n * | plusSign | `+`23 | the plus sign used with numbers |\n * | minusSign | `-`23 | the minus sign used with numbers |\n * | percentSign | 23.4`%` | the percent sign (out of 100) |\n * | perMille | 234`‰` | the permille sign (out of 1000) |\n * | exponential | 1.2`E`3 | used in computers for 1.2×10³. |\n * | superscriptingExponent | 1.2`×`103 | human-readable format of exponential |\n * | infinity | `∞` | used in +∞ and -∞. |\n * | nan | `NaN` | \"not a number\". |\n * | timeSeparator | 10`:`52 | symbol used between time units |\n * | currencyDecimal | $2,345`.`67 | decimal separator, fallback to \"decimal\" |\n * | currencyGroup | $2`,`345.67 | grouping separator, fallback to \"group\" |\n *\n * @experimental i18n support is experimental.\n */\nvar NumberSymbol;\n/**\n * Number symbol that can be used to replace placeholders in number patterns.\n * The placeholders are based on english values:\n *\n * | Name | Example for en-US | Meaning |\n * |------------------------|-------------------|---------------------------------------------|\n * | decimal | 2,345`.`67 | decimal separator |\n * | group | 2`,`345.67 | grouping separator, typically for thousands |\n * | plusSign | `+`23 | the plus sign used with numbers |\n * | minusSign | `-`23 | the minus sign used with numbers |\n * | percentSign | 23.4`%` | the percent sign (out of 100) |\n * | perMille | 234`‰` | the permille sign (out of 1000) |\n * | exponential | 1.2`E`3 | used in computers for 1.2×10³. |\n * | superscriptingExponent | 1.2`×`103 | human-readable format of exponential |\n * | infinity | `∞` | used in +∞ and -∞. |\n * | nan | `NaN` | \"not a number\". |\n * | timeSeparator | 10`:`52 | symbol used between time units |\n * | currencyDecimal | $2,345`.`67 | decimal separator, fallback to \"decimal\" |\n * | currencyGroup | $2`,`345.67 | grouping separator, fallback to \"group\" |\n *\n * @experimental i18n support is experimental.\n */\n(function (NumberSymbol) {\n NumberSymbol[NumberSymbol[\"Decimal\"] = 0] = \"Decimal\";\n NumberSymbol[NumberSymbol[\"Group\"] = 1] = \"Group\";\n NumberSymbol[NumberSymbol[\"List\"] = 2] = \"List\";\n NumberSymbol[NumberSymbol[\"PercentSign\"] = 3] = \"PercentSign\";\n NumberSymbol[NumberSymbol[\"PlusSign\"] = 4] = \"PlusSign\";\n NumberSymbol[NumberSymbol[\"MinusSign\"] = 5] = \"MinusSign\";\n NumberSymbol[NumberSymbol[\"Exponential\"] = 6] = \"Exponential\";\n NumberSymbol[NumberSymbol[\"SuperscriptingExponent\"] = 7] = \"SuperscriptingExponent\";\n NumberSymbol[NumberSymbol[\"PerMille\"] = 8] = \"PerMille\";\n NumberSymbol[NumberSymbol[\"Infinity\"] = 9] = \"Infinity\";\n NumberSymbol[NumberSymbol[\"NaN\"] = 10] = \"NaN\";\n NumberSymbol[NumberSymbol[\"TimeSeparator\"] = 11] = \"TimeSeparator\";\n NumberSymbol[NumberSymbol[\"CurrencyDecimal\"] = 12] = \"CurrencyDecimal\";\n NumberSymbol[NumberSymbol[\"CurrencyGroup\"] = 13] = \"CurrencyGroup\";\n})(NumberSymbol || (NumberSymbol = {}));\n/**\n * The value for each day of the week, based on the en-US locale\n *\n * @experimental\n */\n/**\n * The value for each day of the week, based on the en-US locale\n *\n * @experimental\n */\nvar WeekDay;\n/**\n * The value for each day of the week, based on the en-US locale\n *\n * @experimental\n */\n(function (WeekDay) {\n WeekDay[WeekDay[\"Sunday\"] = 0] = \"Sunday\";\n WeekDay[WeekDay[\"Monday\"] = 1] = \"Monday\";\n WeekDay[WeekDay[\"Tuesday\"] = 2] = \"Tuesday\";\n WeekDay[WeekDay[\"Wednesday\"] = 3] = \"Wednesday\";\n WeekDay[WeekDay[\"Thursday\"] = 4] = \"Thursday\";\n WeekDay[WeekDay[\"Friday\"] = 5] = \"Friday\";\n WeekDay[WeekDay[\"Saturday\"] = 6] = \"Saturday\";\n})(WeekDay || (WeekDay = {}));\n/**\n * The locale id for the chosen locale (e.g `en-GB`).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleId(locale) {\n return findLocaleData(locale)[0 /* LocaleId */];\n}\n/**\n * Periods of the day (e.g. `[AM, PM]` for en-US).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleDayPeriods(locale, formStyle, width) {\n var data = findLocaleData(locale);\n var amPmData = [data[1 /* DayPeriodsFormat */], data[2 /* DayPeriodsStandalone */]];\n var amPm = getLastDefinedValue(amPmData, formStyle);\n return getLastDefinedValue(amPm, width);\n}\n/**\n * Days of the week for the Gregorian calendar (e.g. `[Sunday, Monday, ... Saturday]` for en-US).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleDayNames(locale, formStyle, width) {\n var data = findLocaleData(locale);\n var daysData = [data[3 /* DaysFormat */], data[4 /* DaysStandalone */]];\n var days = getLastDefinedValue(daysData, formStyle);\n return getLastDefinedValue(days, width);\n}\n/**\n * Months of the year for the Gregorian calendar (e.g. `[January, February, ...]` for en-US).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleMonthNames(locale, formStyle, width) {\n var data = findLocaleData(locale);\n var monthsData = [data[5 /* MonthsFormat */], data[6 /* MonthsStandalone */]];\n var months = getLastDefinedValue(monthsData, formStyle);\n return getLastDefinedValue(months, width);\n}\n/**\n * Eras for the Gregorian calendar (e.g. AD/BC).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleEraNames(locale, width) {\n var data = findLocaleData(locale);\n var erasData = data[7 /* Eras */];\n return getLastDefinedValue(erasData, width);\n}\n/**\n * First day of the week for this locale, based on english days (Sunday = 0, Monday = 1, ...).\n * For example in french the value would be 1 because the first day of the week is Monday.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleFirstDayOfWeek(locale) {\n var data = findLocaleData(locale);\n return data[8 /* FirstDayOfWeek */];\n}\n/**\n * Range of days in the week that represent the week-end for this locale, based on english days\n * (Sunday = 0, Monday = 1, ...).\n * For example in english the value would be [6,0] for Saturday to Sunday.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleWeekEndRange(locale) {\n var data = findLocaleData(locale);\n return data[9 /* WeekendRange */];\n}\n/**\n * Date format that depends on the locale.\n *\n * There are four basic date formats:\n * - `full` should contain long-weekday (EEEE), year (y), long-month (MMMM), day (d).\n *\n * For example, English uses `EEEE, MMMM d, y`, corresponding to a date like\n * \"Tuesday, September 14, 1999\".\n *\n * - `long` should contain year, long-month, day.\n *\n * For example, `MMMM d, y`, corresponding to a date like \"September 14, 1999\".\n *\n * - `medium` should contain year, abbreviated-month (MMM), day.\n *\n * For example, `MMM d, y`, corresponding to a date like \"Sep 14, 1999\".\n * For languages that do not use abbreviated months, use the numeric month (MM/M). For example,\n * `y/MM/dd`, corresponding to a date like \"1999/09/14\".\n *\n * - `short` should contain year, numeric-month (MM/M), and day.\n *\n * For example, `M/d/yy`, corresponding to a date like \"9/14/99\".\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleDateFormat(locale, width) {\n var data = findLocaleData(locale);\n return getLastDefinedValue(data[10 /* DateFormat */], width);\n}\n/**\n * Time format that depends on the locale.\n *\n * The standard formats include four basic time formats:\n * - `full` should contain hour (h/H), minute (mm), second (ss), and zone (zzzz).\n * - `long` should contain hour, minute, second, and zone (z)\n * - `medium` should contain hour, minute, second.\n * - `short` should contain hour, minute.\n *\n * Note: The patterns depend on whether the main country using your language uses 12-hour time or\n * not:\n * - For 12-hour time, use a pattern like `hh:mm a` using h to mean a 12-hour clock cycle running\n * 1 through 12 (midnight plus 1 minute is 12:01), or using K to mean a 12-hour clock cycle\n * running 0 through 11 (midnight plus 1 minute is 0:01).\n * - For 24-hour time, use a pattern like `HH:mm` using H to mean a 24-hour clock cycle running 0\n * through 23 (midnight plus 1 minute is 0:01), or using k to mean a 24-hour clock cycle running\n * 1 through 24 (midnight plus 1 minute is 24:01).\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleTimeFormat(locale, width) {\n var data = findLocaleData(locale);\n return getLastDefinedValue(data[11 /* TimeFormat */], width);\n}\n/**\n * Date-time format that depends on the locale.\n *\n * The date-time pattern shows how to combine separate patterns for date (represented by {1})\n * and time (represented by {0}) into a single pattern. It usually doesn't need to be changed.\n * What you want to pay attention to are:\n * - possibly removing a space for languages that don't use it, such as many East Asian languages\n * - possibly adding a comma, other punctuation, or a combining word\n *\n * For example:\n * - English uses `{1} 'at' {0}` or `{1}, {0}` (depending on date style), while Japanese uses\n * `{1}{0}`.\n * - An English formatted date-time using the combining pattern `{1}, {0}` could be\n * `Dec 10, 2010, 3:59:49 PM`. Notice the comma and space between the date portion and the time\n * portion.\n *\n * There are four formats (`full`, `long`, `medium`, `short`); the determination of which to use\n * is normally based on the date style. For example, if the date has a full month and weekday\n * name, the full combining pattern will be used to combine that with a time. If the date has\n * numeric month, the short version of the combining pattern will be used to combine that with a\n * time. English uses `{1} 'at' {0}` for full and long styles, and `{1}, {0}` for medium and short\n * styles.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleDateTimeFormat(locale, width) {\n var data = findLocaleData(locale);\n var dateTimeFormatData = data[12 /* DateTimeFormat */];\n return getLastDefinedValue(dateTimeFormatData, width);\n}\n/**\n * Number symbol that can be used to replace placeholders in number formats.\n * See {@link NumberSymbol} for more information.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleNumberSymbol(locale, symbol) {\n var data = findLocaleData(locale);\n var res = data[13 /* NumberSymbols */][symbol];\n if (typeof res === 'undefined') {\n if (symbol === NumberSymbol.CurrencyDecimal) {\n return data[13 /* NumberSymbols */][NumberSymbol.Decimal];\n }\n else if (symbol === NumberSymbol.CurrencyGroup) {\n return data[13 /* NumberSymbols */][NumberSymbol.Group];\n }\n }\n return res;\n}\n/**\n * Number format that depends on the 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,67\". 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 * they 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 Number Symbols 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 * | ¤ | This will be replaced by a currency symbol, such as $ or USD. |\n * | % | This marks a percent format. The % symbol may change position, but must be retained. |\n * | E | This 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 * You can find more information\n * [on the CLDR website](http://cldr.unicode.org/translation/number-patterns)\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleNumberFormat(locale, type) {\n var data = findLocaleData(locale);\n return data[14 /* NumberFormats */][type];\n}\n/**\n * The symbol used to represent the currency for the main country using this locale (e.g. $ for\n * the locale en-US).\n * The symbol will be `null` if the main country cannot be determined.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleCurrencySymbol(locale) {\n var data = findLocaleData(locale);\n return data[15 /* CurrencySymbol */] || null;\n}\n/**\n * The name of the currency for the main country using this locale (e.g. USD for the locale\n * en-US).\n * The name will be `null` if the main country cannot be determined.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleCurrencyName(locale) {\n var data = findLocaleData(locale);\n return data[16 /* CurrencyName */] || null;\n}\n/**\n * Returns the currency values for the locale\n */\nfunction getLocaleCurrencies(locale) {\n var data = findLocaleData(locale);\n return data[17 /* Currencies */];\n}\n/**\n * The locale plural function used by ICU expressions to determine the plural case to use.\n * See {@link NgPlural} for more information.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocalePluralCase(locale) {\n var data = findLocaleData(locale);\n return data[18 /* PluralCase */];\n}\nfunction checkFullData(data) {\n if (!data[19 /* ExtraData */]) {\n throw new Error(\"Missing extra locale data for the locale \\\"\" + data[0 /* LocaleId */] + \"\\\". Use \\\"registerLocaleData\\\" to load new data. See the \\\"I18n guide\\\" on angular.io to know more.\");\n }\n}\n/**\n * Rules used to determine which day period to use (See `dayPeriods` below).\n * The rules can either be an array or a single value. If it's an array, consider it as \"from\"\n * and \"to\". If it's a single value then it means that the period is only valid at this exact\n * value.\n * There is always the same number of rules as the number of day periods, which means that the\n * first rule is applied to the first day period and so on.\n * You should fallback to AM/PM when there are no rules available.\n *\n * Note: this is only available if you load the full locale data.\n * See the {@linkDocs guide/i18n#i18n-pipes \"I18n guide\"} to know how to import additional locale\n * data.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleExtraDayPeriodRules(locale) {\n var data = findLocaleData(locale);\n checkFullData(data);\n var rules = data[19 /* ExtraData */][2 /* ExtraDayPeriodsRules */] || [];\n return rules.map(function (rule) {\n if (typeof rule === 'string') {\n return extractTime(rule);\n }\n return [extractTime(rule[0]), extractTime(rule[1])];\n });\n}\n/**\n * Day Periods indicate roughly how the day is broken up in different languages (e.g. morning,\n * noon, afternoon, midnight, ...).\n * You should use the function {@link getLocaleExtraDayPeriodRules} to determine which period to\n * use.\n * You should fallback to AM/PM when there are no day periods available.\n *\n * Note: this is only available if you load the full locale data.\n * See the {@linkDocs guide/i18n#i18n-pipes \"I18n guide\"} to know how to import additional locale\n * data.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLocaleExtraDayPeriods(locale, formStyle, width) {\n var data = findLocaleData(locale);\n checkFullData(data);\n var dayPeriodsData = [\n data[19 /* ExtraData */][0 /* ExtraDayPeriodFormats */],\n data[19 /* ExtraData */][1 /* ExtraDayPeriodStandalone */]\n ];\n var dayPeriods = getLastDefinedValue(dayPeriodsData, formStyle) || [];\n return getLastDefinedValue(dayPeriods, width) || [];\n}\n/**\n * Returns the first value that is defined in an array, going backwards.\n *\n * To avoid repeating the same data (e.g. when \"format\" and \"standalone\" are the same) we only\n * add the first one to the locale data arrays, the other ones are only defined when different.\n * We use this function to retrieve the first defined value.\n *\n * @experimental i18n support is experimental.\n */\nfunction getLastDefinedValue(data, index) {\n for (var 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 * Extract the hours and minutes from a string like \"15:45\"\n */\nfunction extractTime(time) {\n var _a = __read(time.split(':'), 2), h = _a[0], m = _a[1];\n return { hours: +h, minutes: +m };\n}\n/**\n * Finds the locale data for a locale id\n *\n * @experimental i18n support is experimental.\n */\nfunction findLocaleData(locale) {\n var normalizedLocale = locale.toLowerCase().replace(/_/g, '-');\n var match = LOCALE_DATA[normalizedLocale];\n if (match) {\n return match;\n }\n // let's try to find a parent locale\n var parentLocale = normalizedLocale.split('-')[0];\n match = LOCALE_DATA[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 * Returns the currency symbol for a given currency code, or the code if no symbol available\n * (e.g.: format narrow = $, format wide = US$, code = USD)\n * If no locale is provided, it uses the locale \"en\" by default\n *\n * @experimental i18n support is experimental.\n */\nfunction getCurrencySymbol(code, format, locale) {\n if (locale === void 0) { locale = 'en'; }\n var currency = getLocaleCurrencies(locale)[code] || CURRENCIES_EN[code] || [];\n var symbolNarrow = currency[1 /* SymbolNarrow */];\n if (format === 'narrow' && typeof symbolNarrow === 'string') {\n return symbolNarrow;\n }\n return currency[0 /* Symbol */] || code;\n}\n// Most currencies have cents, that's why the default is 2\nvar DEFAULT_NB_OF_CURRENCY_DIGITS = 2;\n/**\n * Returns the number of decimal digits for the given currency.\n * Its value depends upon the presence of cents in that particular currency.\n *\n * @experimental i18n support is experimental.\n */\nfunction getNumberOfCurrencyDigits(code) {\n var digits;\n var currency = CURRENCIES_EN[code];\n if (currency) {\n digits = currency[2 /* NbOfDigits */];\n }\n return typeof digits === 'number' ? digits : DEFAULT_NB_OF_CURRENCY_DIGITS;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ISO8601_DATE_REGEX = /^(\\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\nvar NAMED_FORMATS = {};\nvar DATE_FORMATS_SPLIT = /((?:[^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]*)/;\nvar ZoneWidth;\n(function (ZoneWidth) {\n ZoneWidth[ZoneWidth[\"Short\"] = 0] = \"Short\";\n ZoneWidth[ZoneWidth[\"ShortGMT\"] = 1] = \"ShortGMT\";\n ZoneWidth[ZoneWidth[\"Long\"] = 2] = \"Long\";\n ZoneWidth[ZoneWidth[\"Extended\"] = 3] = \"Extended\";\n})(ZoneWidth || (ZoneWidth = {}));\nvar DateType;\n(function (DateType) {\n DateType[DateType[\"FullYear\"] = 0] = \"FullYear\";\n DateType[DateType[\"Month\"] = 1] = \"Month\";\n DateType[DateType[\"Date\"] = 2] = \"Date\";\n DateType[DateType[\"Hours\"] = 3] = \"Hours\";\n DateType[DateType[\"Minutes\"] = 4] = \"Minutes\";\n DateType[DateType[\"Seconds\"] = 5] = \"Seconds\";\n DateType[DateType[\"Milliseconds\"] = 6] = \"Milliseconds\";\n DateType[DateType[\"Day\"] = 7] = \"Day\";\n})(DateType || (DateType = {}));\nvar TranslationType;\n(function (TranslationType) {\n TranslationType[TranslationType[\"DayPeriods\"] = 0] = \"DayPeriods\";\n TranslationType[TranslationType[\"Days\"] = 1] = \"Days\";\n TranslationType[TranslationType[\"Months\"] = 2] = \"Months\";\n TranslationType[TranslationType[\"Eras\"] = 3] = \"Eras\";\n})(TranslationType || (TranslationType = {}));\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * Where:\n * - `value` is a Date, a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * - `format` indicates which date/time components to include. See {@link DatePipe} for more\n * details.\n * - `locale` is a `string` defining the locale to use.\n * - `timezone` to be used for formatting. It understands UTC/GMT and the continental US time zone\n * abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).\n * If not specified, host system settings are used.\n *\n * See {@link DatePipe} for more details.\n *\n *\n */\nfunction formatDate(value, format, locale, timezone) {\n var date = toDate(value);\n var namedFormat = getNamedFormat(locale, format);\n format = namedFormat || format;\n var parts = [];\n var match;\n while (format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = parts.concat(match.slice(1));\n var part = parts.pop();\n if (!part) {\n break;\n }\n format = part;\n }\n else {\n parts.push(format);\n break;\n }\n }\n var dateTimezoneOffset = date.getTimezoneOffset();\n if (timezone) {\n dateTimezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n date = convertTimezoneToLocal(date, timezone, true);\n }\n var text = '';\n parts.forEach(function (value) {\n var dateFormatter = getDateFormatter(value);\n text += dateFormatter ?\n dateFormatter(date, locale, dateTimezoneOffset) :\n value === '\\'\\'' ? '\\'' : value.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n });\n return text;\n}\nfunction getNamedFormat(locale, format) {\n var localeId = getLocaleId(locale);\n NAMED_FORMATS[localeId] = NAMED_FORMATS[localeId] || {};\n if (NAMED_FORMATS[localeId][format]) {\n return NAMED_FORMATS[localeId][format];\n }\n var 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 var shortTime = getNamedFormat(locale, 'shortTime');\n var shortDate = getNamedFormat(locale, 'shortDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Short), [shortTime, shortDate]);\n break;\n case 'medium':\n var mediumTime = getNamedFormat(locale, 'mediumTime');\n var mediumDate = getNamedFormat(locale, 'mediumDate');\n formatValue = formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Medium), [mediumTime, mediumDate]);\n break;\n case 'long':\n var longTime = getNamedFormat(locale, 'longTime');\n var longDate = getNamedFormat(locale, 'longDate');\n formatValue =\n formatDateTime(getLocaleDateTimeFormat(locale, FormatWidth.Long), [longTime, longDate]);\n break;\n case 'full':\n var fullTime = getNamedFormat(locale, 'fullTime');\n var 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}\nfunction formatDateTime(str, opt_values) {\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}\nfunction padNumber(num, digits, minusSign, trim, negWrap) {\n if (minusSign === void 0) { minusSign = '-'; }\n var neg = '';\n if (num < 0 || (negWrap && num <= 0)) {\n if (negWrap) {\n num = -num + 1;\n }\n else {\n num = -num;\n neg = minusSign;\n }\n }\n var 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/**\n * Returns a date formatter that transforms a date into its locale digit representation\n */\nfunction dateGetter(name, size, offset, trim, negWrap) {\n if (offset === void 0) { offset = 0; }\n if (trim === void 0) { trim = false; }\n if (negWrap === void 0) { negWrap = false; }\n return function (date, locale) {\n var part = getDatePart(name, date, size);\n if (offset > 0 || part > -offset) {\n part += offset;\n }\n if (name === DateType.Hours && part === 0 && offset === -12) {\n part = 12;\n }\n return padNumber(part, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign), trim, negWrap);\n };\n}\nfunction getDatePart(name, date, size) {\n switch (name) {\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.Milliseconds:\n var div = size === 1 ? 100 : (size === 2 ? 10 : 1);\n return Math.round(date.getMilliseconds() / div);\n case DateType.Day:\n return date.getDay();\n default:\n throw new Error(\"Unknown DateType value \\\"\" + name + \"\\\".\");\n }\n}\n/**\n * Returns a date formatter that transforms a date into its locale string representation\n */\nfunction dateStrGetter(name, width, form, extended) {\n if (form === void 0) { form = FormStyle.Format; }\n if (extended === void 0) { extended = false; }\n return function (date, locale) {\n return getDateTranslation(date, locale, name, width, form, extended);\n };\n}\n/**\n * Returns the locale translation of a date for a given form, type and width\n */\nfunction getDateTranslation(date, locale, name, width, form, extended) {\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 var currentHours_1 = date.getHours();\n var currentMinutes_1 = date.getMinutes();\n if (extended) {\n var rules = getLocaleExtraDayPeriodRules(locale);\n var dayPeriods_1 = getLocaleExtraDayPeriods(locale, form, width);\n var result_1;\n rules.forEach(function (rule, index) {\n if (Array.isArray(rule)) {\n // morning, afternoon, evening, night\n var _a = rule[0], hoursFrom = _a.hours, minutesFrom = _a.minutes;\n var _b = rule[1], hoursTo = _b.hours, minutesTo = _b.minutes;\n if (currentHours_1 >= hoursFrom && currentMinutes_1 >= minutesFrom &&\n (currentHours_1 < hoursTo ||\n (currentHours_1 === hoursTo && currentMinutes_1 < minutesTo))) {\n result_1 = dayPeriods_1[index];\n }\n }\n else {\n // noon or midnight\n var hours = rule.hours, minutes = rule.minutes;\n if (hours === currentHours_1 && minutes === currentMinutes_1) {\n result_1 = dayPeriods_1[index];\n }\n }\n });\n if (result_1) {\n return result_1;\n }\n }\n // if no rules for the day periods, we use am/pm by default\n return getLocaleDayPeriods(locale, form, width)[currentHours_1 < 12 ? 0 : 1];\n case TranslationType.Eras:\n return getLocaleEraNames(locale, 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 var unexpected = name;\n throw new Error(\"unexpected translation type \" + unexpected);\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) {\n return function (date, locale, offset) {\n var zone = -1 * offset;\n var minusSign = getLocaleNumberSymbol(locale, NumberSymbol.MinusSign);\n var 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 }\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}\nvar JANUARY = 0;\nvar THURSDAY = 4;\nfunction getFirstThursdayOfYear(year) {\n var firstDayOfYear = (new Date(year, JANUARY, 1)).getDay();\n return new Date(year, 0, 1 + ((firstDayOfYear <= THURSDAY) ? THURSDAY : THURSDAY + 7) - firstDayOfYear);\n}\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate() + (THURSDAY - datetime.getDay()));\n}\nfunction weekGetter(size, monthBased) {\n if (monthBased === void 0) { monthBased = false; }\n return function (date, locale) {\n var result;\n if (monthBased) {\n var nbDaysBefore1stDayOfMonth = new Date(date.getFullYear(), date.getMonth(), 1).getDay() - 1;\n var today = date.getDate();\n result = 1 + Math.floor((today + nbDaysBefore1stDayOfMonth) / 7);\n }\n else {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear());\n var thisThurs = getThursdayThisWeek(date);\n var diff = thisThurs.getTime() - firstThurs.getTime();\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n }\n return padNumber(result, size, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n };\n}\nvar DATE_FORMATS = {};\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) {\n if (DATE_FORMATS[format]) {\n return DATE_FORMATS[format];\n }\n var 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 // 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 // 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 // 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 // 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 // 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 // Week of the month (1, ...)\n case 'W':\n formatter = weekGetter(1, true);\n break;\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 // 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 // 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 // Extended period of the day (midnight, at night, ...), standalone\n case 'b':\n case 'bb':\n case 'bbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Abbreviated, FormStyle.Standalone, true);\n break;\n case 'bbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Wide, FormStyle.Standalone, true);\n break;\n case 'bbbbb':\n formatter = dateStrGetter(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Standalone, true);\n break;\n // Extended period of the day (midnight, night, ...), standalone\n case 'B':\n case 'BB':\n case 'BBB':\n formatter = dateStrGetter(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(TranslationType.DayPeriods, TranslationWidth.Narrow, FormStyle.Format, true);\n break;\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 // 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 // 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 // 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 // Fractional second padded (0-9)\n case 'S':\n formatter = dateGetter(DateType.Milliseconds, 1);\n break;\n case 'SS':\n formatter = dateGetter(DateType.Milliseconds, 2);\n break;\n // = millisecond\n case 'SSS':\n formatter = dateGetter(DateType.Milliseconds, 3);\n break;\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 // 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}\nfunction timezoneToOffset(timezone, fallback) {\n // Support: IE 9-11 only, Edge 13-15+\n // IE/Edge do not \"understand\" colon (`:`) in timezone\n timezone = timezone.replace(/:/g, '');\n var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;\n return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;\n}\nfunction addDateMinutes(date, minutes) {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + minutes);\n return date;\n}\nfunction convertTimezoneToLocal(date, timezone, reverse) {\n var reverseValue = reverse ? -1 : 1;\n var dateTimezoneOffset = date.getTimezoneOffset();\n var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);\n return addDateMinutes(date, reverseValue * (timezoneOffset - dateTimezoneOffset));\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 */\nfunction toDate(value) {\n if (isDate(value)) {\n return value;\n }\n if (typeof value === 'number' && !isNaN(value)) {\n return new Date(value);\n }\n if (typeof value === 'string') {\n value = value.trim();\n var parsedNb = parseFloat(value);\n // any string that only contains numbers, like \"1234\" but not like \"1234hello\"\n if (!isNaN(value - parsedNb)) {\n return new Date(parsedNb);\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 var _a = __read(value.split('-').map(function (val) { return +val; }), 3), y = _a[0], m = _a[1], d = _a[2];\n return new Date(y, m - 1, d);\n }\n var match = void 0;\n if (match = value.match(ISO8601_DATE_REGEX)) {\n return isoStringToDate(match);\n }\n }\n var date = new Date(value);\n if (!isDate(date)) {\n throw new Error(\"Unable to convert \\\"\" + value + \"\\\" into a date\");\n }\n return date;\n}\n/**\n * Converts a date in ISO8601 to a Date.\n * Used instead of `Date.parse` because of browser discrepancies.\n */\nfunction isoStringToDate(match) {\n var date = new Date(0);\n var tzHour = 0;\n var tzMin = 0;\n // match[8] means that the string contains \"Z\" (UTC) or a timezone like \"+01:00\" or \"+0100\"\n var dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear;\n var timeSetter = match[8] ? date.setUTCHours : date.setHours;\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 var h = Number(match[4] || 0) - tzHour;\n var m = Number(match[5] || 0) - tzMin;\n var s = Number(match[6] || 0);\n var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n}\nfunction isDate(value) {\n return value instanceof Date && !isNaN(value.valueOf());\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NUMBER_FORMAT_REGEXP = /^(\\d+)?\\.((\\d+)(-(\\d+))?)?$/;\nvar MAX_DIGITS = 22;\nvar DECIMAL_SEP = '.';\nvar ZERO_CHAR = '0';\nvar PATTERN_SEP = ';';\nvar GROUP_SEP = ',';\nvar DIGIT_CHAR = '#';\nvar CURRENCY_CHAR = '¤';\nvar PERCENT_CHAR = '%';\n/**\n * Transforms a number to a locale string based on a style and a format\n */\nfunction formatNumberToLocaleString(value, pattern, locale, groupSymbol, decimalSymbol, digitsInfo, isPercent) {\n if (isPercent === void 0) { isPercent = false; }\n var formattedText = '';\n var isZero = false;\n if (!isFinite(value)) {\n formattedText = getLocaleNumberSymbol(locale, NumberSymbol.Infinity);\n }\n else {\n var parsedNumber = parseNumber(value);\n if (isPercent) {\n parsedNumber = toPercent(parsedNumber);\n }\n var minInt = pattern.minInt;\n var minFraction = pattern.minFrac;\n var maxFraction = pattern.maxFrac;\n if (digitsInfo) {\n var parts = digitsInfo.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(digitsInfo + \" is not a valid digit info\");\n }\n var minIntPart = parts[1];\n var minFractionPart = parts[3];\n var 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 }\n else if (minFractionPart != null && minFraction > maxFraction) {\n maxFraction = minFraction;\n }\n }\n roundNumber(parsedNumber, minFraction, maxFraction);\n var digits = parsedNumber.digits;\n var integerLen = parsedNumber.integerLen;\n var exponent = parsedNumber.exponent;\n var decimals = [];\n isZero = digits.every(function (d) { return !d; });\n // pad zeros for small numbers\n for (; integerLen < minInt; integerLen++) {\n digits.unshift(0);\n }\n // pad zeros for small numbers\n for (; integerLen < 0; integerLen++) {\n digits.unshift(0);\n }\n // extract decimals digits\n if (integerLen > 0) {\n decimals = digits.splice(integerLen, digits.length);\n }\n else {\n decimals = digits;\n digits = [0];\n }\n // format the integer digits with grouping separators\n var groups = [];\n if (digits.length >= pattern.lgSize) {\n groups.unshift(digits.splice(-pattern.lgSize, digits.length).join(''));\n }\n while (digits.length > pattern.gSize) {\n groups.unshift(digits.splice(-pattern.gSize, digits.length).join(''));\n }\n if (digits.length) {\n groups.unshift(digits.join(''));\n }\n formattedText = groups.join(getLocaleNumberSymbol(locale, groupSymbol));\n // append the decimal digits\n if (decimals.length) {\n formattedText += getLocaleNumberSymbol(locale, decimalSymbol) + decimals.join('');\n }\n if (exponent) {\n formattedText += getLocaleNumberSymbol(locale, NumberSymbol.Exponential) + '+' + exponent;\n }\n }\n if (value < 0 && !isZero) {\n formattedText = pattern.negPre + formattedText + pattern.negSuf;\n }\n else {\n formattedText = pattern.posPre + formattedText + pattern.posSuf;\n }\n return formattedText;\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * Use `currency` to format a number as currency.\n *\n * Where:\n * - `value` is a number.\n * - `locale` is a `string` defining the locale to use.\n * - `currency` is the string that represents the currency, it can be its symbol or its name.\n * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such\n * as `USD` for the US dollar and `EUR` for the euro.\n * - `digitInfo` See {@link DecimalPipe} for more details.\n *\n *\n */\nfunction formatCurrency(value, locale, currency, currencyCode, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Currency);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n pattern.minFrac = getNumberOfCurrencyDigits((currencyCode));\n pattern.maxFrac = pattern.minFrac;\n var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.CurrencyGroup, NumberSymbol.CurrencyDecimal, digitsInfo);\n return res\n .replace(CURRENCY_CHAR, currency)\n .replace(CURRENCY_CHAR, '');\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as a percentage according to locale rules.\n *\n * Where:\n * - `value` is a number.\n * - `locale` is a `string` defining the locale to use.\n * - `digitInfo` See {@link DecimalPipe} for more details.\n *\n *\n */\nfunction formatPercent(value, locale, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Percent);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n var res = formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo, true);\n return res.replace(new RegExp(PERCENT_CHAR, 'g'), getLocaleNumberSymbol(locale, NumberSymbol.PercentSign));\n}\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as text. Group sizing and separator and other locale-specific\n * configurations are based on the locale.\n *\n * Where:\n * - `value` is a number.\n * - `locale` is a `string` defining the locale to use.\n * - `digitInfo` See {@link DecimalPipe} for more details.\n *\n *\n */\nfunction formatNumber(value, locale, digitsInfo) {\n var format = getLocaleNumberFormat(locale, NumberFormatStyle.Decimal);\n var pattern = parseNumberFormat(format, getLocaleNumberSymbol(locale, NumberSymbol.MinusSign));\n return formatNumberToLocaleString(value, pattern, locale, NumberSymbol.Group, NumberSymbol.Decimal, digitsInfo);\n}\nfunction parseNumberFormat(format, minusSign) {\n if (minusSign === void 0) { minusSign = '-'; }\n var 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 var patternParts = format.split(PATTERN_SEP);\n var positive = patternParts[0];\n var negative = patternParts[1];\n var 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 ], integer = positiveParts[0], fraction = positiveParts[1] || '';\n p.posPre = integer.substr(0, integer.indexOf(DIGIT_CHAR));\n for (var i = 0; i < fraction.length; i++) {\n var ch = fraction.charAt(i);\n if (ch === ZERO_CHAR) {\n p.minFrac = p.maxFrac = i + 1;\n }\n else if (ch === DIGIT_CHAR) {\n p.maxFrac = i + 1;\n }\n else {\n p.posSuf += ch;\n }\n }\n var 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 if (negative) {\n var trunkLen = positive.length - p.posPre.length - p.posSuf.length, pos = negative.indexOf(DIGIT_CHAR);\n p.negPre = negative.substr(0, pos).replace(/'/g, '');\n p.negSuf = negative.substr(pos + trunkLen).replace(/'/g, '');\n }\n else {\n p.negPre = minusSign + p.posPre;\n p.negSuf = p.posSuf;\n }\n return p;\n}\n// Transforms a parsed number into a percentage by multiplying it by 100\nfunction toPercent(parsedNumber) {\n // if the number is 0, don't do anything\n if (parsedNumber.digits[0] === 0) {\n return parsedNumber;\n }\n // Getting the current number of decimals\n var fractionLen = parsedNumber.digits.length - parsedNumber.integerLen;\n if (parsedNumber.exponent) {\n parsedNumber.exponent += 2;\n }\n else {\n if (fractionLen === 0) {\n parsedNumber.digits.push(0, 0);\n }\n else if (fractionLen === 1) {\n parsedNumber.digits.push(0);\n }\n parsedNumber.integerLen += 2;\n }\n return parsedNumber;\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) {\n var numStr = Math.abs(num) + '';\n var exponent = 0, digits, integerLen;\n var i, j, zeros;\n // Decimal point?\n if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {\n numStr = numStr.replace(DECIMAL_SEP, '');\n }\n // Exponential form?\n if ((i = numStr.search(/e/i)) > 0) {\n // Work out the exponent.\n if (integerLen < 0)\n integerLen = i;\n integerLen += +numStr.slice(i + 1);\n numStr = numStr.substring(0, i);\n }\n else if (integerLen < 0) {\n // There was no decimal point or exponent so it is an integer.\n integerLen = numStr.length;\n }\n // Count the number of leading zeros.\n for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) {\n /* empty */\n }\n if (i === (zeros = numStr.length)) {\n // The digits are all zero.\n digits = [0];\n integerLen = 1;\n }\n else {\n // Count the number of trailing zeros\n zeros--;\n while (numStr.charAt(zeros) === ZERO_CHAR)\n zeros--;\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 // 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 return { digits: digits, exponent: exponent, integerLen: integerLen };\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, minFrac, maxFrac) {\n if (minFrac > maxFrac) {\n throw new Error(\"The minimum number of digits after fraction (\" + minFrac + \") is higher than the maximum (\" + maxFrac + \").\");\n }\n var digits = parsedNumber.digits;\n var fractionLen = digits.length - parsedNumber.integerLen;\n var fractionSize = Math.min(Math.max(minFrac, fractionLen), maxFrac);\n // The index of the digit to where rounding is to occur\n var roundAt = fractionSize + parsedNumber.integerLen;\n var digit = digits[roundAt];\n if (roundAt > 0) {\n // Drop fractional digits beyond `roundAt`\n digits.splice(Math.max(parsedNumber.integerLen, roundAt));\n // Set non-fractional digits beyond `roundAt` to 0\n for (var j = roundAt; j < digits.length; j++) {\n digits[j] = 0;\n }\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 (var i = 1; i < roundAt; i++)\n digits[i] = 0;\n }\n if (digit >= 5) {\n if (roundAt - 1 < 0) {\n for (var k = 0; k > roundAt; k--) {\n digits.unshift(0);\n parsedNumber.integerLen++;\n }\n digits.unshift(1);\n parsedNumber.integerLen++;\n }\n else {\n digits[roundAt - 1]++;\n }\n }\n // Pad out with zeros to get the required fraction length\n for (; fractionLen < Math.max(0, fractionSize); fractionLen++)\n digits.push(0);\n var 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 var minLen = minFrac + parsedNumber.integerLen;\n // Do any carrying, e.g. a digit was rounded up to 10\n var 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 }\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}\nfunction parseIntAutoRadix(text) {\n var result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @deprecated from v5\n */\nvar DEPRECATED_PLURAL_FN = new InjectionToken('UseV4Plurals');\n/**\n * @experimental\n */\nvar NgLocalization = /** @class */ (function () {\n function NgLocalization() {\n }\n return NgLocalization;\n}());\n/**\n * Returns the plural category for a given value.\n * - \"=value\" when the case exists,\n * - the plural category otherwise\n */\nfunction getPluralCategory(value, cases, ngLocalization, locale) {\n var key = \"=\" + value;\n if (cases.indexOf(key) > -1) {\n return key;\n }\n key = ngLocalization.getPluralCategory(value, locale);\n if (cases.indexOf(key) > -1) {\n return key;\n }\n if (cases.indexOf('other') > -1) {\n return 'other';\n }\n throw new Error(\"No plural message found for value \\\"\" + value + \"\\\"\");\n}\n/**\n * Returns the plural case based on the locale\n *\n * @experimental\n */\nvar NgLocaleLocalization = /** @class */ (function (_super) {\n __extends(NgLocaleLocalization, _super);\n function NgLocaleLocalization(locale, /** @deprecated from v5 */\n deprecatedPluralFn) {\n var _this = _super.call(this) || this;\n _this.locale = locale;\n _this.deprecatedPluralFn = deprecatedPluralFn;\n return _this;\n }\n NgLocaleLocalization.prototype.getPluralCategory = function (value, locale) {\n var plural = this.deprecatedPluralFn ? this.deprecatedPluralFn(locale || this.locale, value) :\n getLocalePluralCase(locale || this.locale)(value);\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 NgLocaleLocalization.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n NgLocaleLocalization.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DEPRECATED_PLURAL_FN,] },] },\n ]; };\n return NgLocaleLocalization;\n}(NgLocalization));\n/**\n * Returns the plural case based on the locale\n *\n * @deprecated from v5 the plural case function is in locale data files common/locales/*.ts\n * @experimental\n */\nfunction getPluralCase(locale, nLike) {\n // TODO(vicb): lazy compute\n if (typeof nLike === 'string') {\n nLike = parseInt(nLike, 10);\n }\n var n = nLike;\n var nDecimal = n.toString().replace(/^[^.]*\\.?/, '');\n var i = Math.floor(Math.abs(n));\n var v = nDecimal.length;\n var f = parseInt(nDecimal, 10);\n var t = parseInt(n.toString().replace(/^[^.]*\\.?|0+$/g, ''), 10) || 0;\n var lang = locale.split('-')[0].toLowerCase();\n switch (lang) {\n case 'af':\n case 'asa':\n case 'az':\n case 'bem':\n case 'bez':\n case 'bg':\n case 'brx':\n case 'ce':\n case 'cgg':\n case 'chr':\n case 'ckb':\n case 'ee':\n case 'el':\n case 'eo':\n case 'es':\n case 'eu':\n case 'fo':\n case 'fur':\n case 'gsw':\n case 'ha':\n case 'haw':\n case 'hu':\n case 'jgo':\n case 'jmc':\n case 'ka':\n case 'kk':\n case 'kkj':\n case 'kl':\n case 'ks':\n case 'ksb':\n case 'ky':\n case 'lb':\n case 'lg':\n case 'mas':\n case 'mgo':\n case 'ml':\n case 'mn':\n case 'nb':\n case 'nd':\n case 'ne':\n case 'nn':\n case 'nnh':\n case 'nyn':\n case 'om':\n case 'or':\n case 'os':\n case 'ps':\n case 'rm':\n case 'rof':\n case 'rwk':\n case 'saq':\n case 'seh':\n case 'sn':\n case 'so':\n case 'sq':\n case 'ta':\n case 'te':\n case 'teo':\n case 'tk':\n case 'tr':\n case 'ug':\n case 'uz':\n case 'vo':\n case 'vun':\n case 'wae':\n case 'xog':\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ak':\n case 'ln':\n case 'mg':\n case 'pa':\n case 'ti':\n if (n === Math.floor(n) && n >= 0 && n <= 1)\n return Plural.One;\n return Plural.Other;\n case 'am':\n case 'as':\n case 'bn':\n case 'fa':\n case 'gu':\n case 'hi':\n case 'kn':\n case 'mr':\n case 'zu':\n if (i === 0 || n === 1)\n return Plural.One;\n return Plural.Other;\n case 'ar':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 3 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 99)\n return Plural.Many;\n return Plural.Other;\n case 'ast':\n case 'ca':\n case 'de':\n case 'en':\n case 'et':\n case 'fi':\n case 'fy':\n case 'gl':\n case 'it':\n case 'nl':\n case 'sv':\n case 'sw':\n case 'ur':\n case 'yi':\n if (i === 1 && v === 0)\n return Plural.One;\n return Plural.Other;\n case 'be':\n if (n % 10 === 1 && !(n % 100 === 11))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 4 &&\n !(n % 100 >= 12 && n % 100 <= 14))\n return Plural.Few;\n if (n % 10 === 0 || n % 10 === Math.floor(n % 10) && n % 10 >= 5 && n % 10 <= 9 ||\n n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'br':\n if (n % 10 === 1 && !(n % 100 === 11 || n % 100 === 71 || n % 100 === 91))\n return Plural.One;\n if (n % 10 === 2 && !(n % 100 === 12 || n % 100 === 72 || n % 100 === 92))\n return Plural.Two;\n if (n % 10 === Math.floor(n % 10) && (n % 10 >= 3 && n % 10 <= 4 || n % 10 === 9) &&\n !(n % 100 >= 10 && n % 100 <= 19 || n % 100 >= 70 && n % 100 <= 79 ||\n n % 100 >= 90 && n % 100 <= 99))\n return Plural.Few;\n if (!(n === 0) && n % 1e6 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'bs':\n case 'hr':\n case 'sr':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11) || f % 10 === 1 && !(f % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14) ||\n f % 10 === Math.floor(f % 10) && f % 10 >= 2 && f % 10 <= 4 &&\n !(f % 100 >= 12 && f % 100 <= 14))\n return Plural.Few;\n return Plural.Other;\n case 'cs':\n case 'sk':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === Math.floor(i) && i >= 2 && i <= 4 && v === 0)\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'cy':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === 3)\n return Plural.Few;\n if (n === 6)\n return Plural.Many;\n return Plural.Other;\n case 'da':\n if (n === 1 || !(t === 0) && (i === 0 || i === 1))\n return Plural.One;\n return Plural.Other;\n case 'dsb':\n case 'hsb':\n if (v === 0 && i % 100 === 1 || f % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2 || f % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 ||\n f % 100 === Math.floor(f % 100) && f % 100 >= 3 && f % 100 <= 4)\n return Plural.Few;\n return Plural.Other;\n case 'ff':\n case 'fr':\n case 'hy':\n case 'kab':\n if (i === 0 || i === 1)\n return Plural.One;\n return Plural.Other;\n case 'fil':\n if (v === 0 && (i === 1 || i === 2 || i === 3) ||\n v === 0 && !(i % 10 === 4 || i % 10 === 6 || i % 10 === 9) ||\n !(v === 0) && !(f % 10 === 4 || f % 10 === 6 || f % 10 === 9))\n return Plural.One;\n return Plural.Other;\n case 'ga':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n if (n === Math.floor(n) && n >= 3 && n <= 6)\n return Plural.Few;\n if (n === Math.floor(n) && n >= 7 && n <= 10)\n return Plural.Many;\n return Plural.Other;\n case 'gd':\n if (n === 1 || n === 11)\n return Plural.One;\n if (n === 2 || n === 12)\n return Plural.Two;\n if (n === Math.floor(n) && (n >= 3 && n <= 10 || n >= 13 && n <= 19))\n return Plural.Few;\n return Plural.Other;\n case 'gv':\n if (v === 0 && i % 10 === 1)\n return Plural.One;\n if (v === 0 && i % 10 === 2)\n return Plural.Two;\n if (v === 0 &&\n (i % 100 === 0 || i % 100 === 20 || i % 100 === 40 || i % 100 === 60 || i % 100 === 80))\n return Plural.Few;\n if (!(v === 0))\n return Plural.Many;\n return Plural.Other;\n case 'he':\n if (i === 1 && v === 0)\n return Plural.One;\n if (i === 2 && v === 0)\n return Plural.Two;\n if (v === 0 && !(n >= 0 && n <= 10) && n % 10 === 0)\n return Plural.Many;\n return Plural.Other;\n case 'is':\n if (t === 0 && i % 10 === 1 && !(i % 100 === 11) || !(t === 0))\n return Plural.One;\n return Plural.Other;\n case 'ksh':\n if (n === 0)\n return Plural.Zero;\n if (n === 1)\n return Plural.One;\n return Plural.Other;\n case 'kw':\n case 'naq':\n case 'se':\n case 'smn':\n if (n === 1)\n return Plural.One;\n if (n === 2)\n return Plural.Two;\n return Plural.Other;\n case 'lag':\n if (n === 0)\n return Plural.Zero;\n if ((i === 0 || i === 1) && !(n === 0))\n return Plural.One;\n return Plural.Other;\n case 'lt':\n if (n % 10 === 1 && !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.One;\n if (n % 10 === Math.floor(n % 10) && n % 10 >= 2 && n % 10 <= 9 &&\n !(n % 100 >= 11 && n % 100 <= 19))\n return Plural.Few;\n if (!(f === 0))\n return Plural.Many;\n return Plural.Other;\n case 'lv':\n case 'prg':\n if (n % 10 === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19 ||\n v === 2 && f % 100 === Math.floor(f % 100) && f % 100 >= 11 && f % 100 <= 19)\n return Plural.Zero;\n if (n % 10 === 1 && !(n % 100 === 11) || v === 2 && f % 10 === 1 && !(f % 100 === 11) ||\n !(v === 2) && f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mk':\n if (v === 0 && i % 10 === 1 || f % 10 === 1)\n return Plural.One;\n return Plural.Other;\n case 'mt':\n if (n === 1)\n return Plural.One;\n if (n === 0 || n % 100 === Math.floor(n % 100) && n % 100 >= 2 && n % 100 <= 10)\n return Plural.Few;\n if (n % 100 === Math.floor(n % 100) && n % 100 >= 11 && n % 100 <= 19)\n return Plural.Many;\n return Plural.Other;\n case 'pl':\n if (i === 1 && v === 0)\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && !(i === 1) && i % 10 === Math.floor(i % 10) && i % 10 >= 0 && i % 10 <= 1 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 12 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'pt':\n if (n === Math.floor(n) && n >= 0 && n <= 2 && !(n === 2))\n return Plural.One;\n return Plural.Other;\n case 'ro':\n if (i === 1 && v === 0)\n return Plural.One;\n if (!(v === 0) || n === 0 ||\n !(n === 1) && n % 100 === Math.floor(n % 100) && n % 100 >= 1 && n % 100 <= 19)\n return Plural.Few;\n return Plural.Other;\n case 'ru':\n case 'uk':\n if (v === 0 && i % 10 === 1 && !(i % 100 === 11))\n return Plural.One;\n if (v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 2 && i % 10 <= 4 &&\n !(i % 100 >= 12 && i % 100 <= 14))\n return Plural.Few;\n if (v === 0 && i % 10 === 0 ||\n v === 0 && i % 10 === Math.floor(i % 10) && i % 10 >= 5 && i % 10 <= 9 ||\n v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 11 && i % 100 <= 14)\n return Plural.Many;\n return Plural.Other;\n case 'shi':\n if (i === 0 || n === 1)\n return Plural.One;\n if (n === Math.floor(n) && n >= 2 && n <= 10)\n return Plural.Few;\n return Plural.Other;\n case 'si':\n if (n === 0 || n === 1 || i === 0 && f === 1)\n return Plural.One;\n return Plural.Other;\n case 'sl':\n if (v === 0 && i % 100 === 1)\n return Plural.One;\n if (v === 0 && i % 100 === 2)\n return Plural.Two;\n if (v === 0 && i % 100 === Math.floor(i % 100) && i % 100 >= 3 && i % 100 <= 4 || !(v === 0))\n return Plural.Few;\n return Plural.Other;\n case 'tzm':\n if (n === Math.floor(n) && n >= 0 && n <= 1 || n === Math.floor(n) && n >= 11 && n <= 99)\n return Plural.One;\n return Plural.Other;\n // When there is no specification, the default is always \"other\"\n // Spec: http://cldr.unicode.org/index/cldr-spec/plural-rules\n // > other (required—general plural form — also used if the language only has a single form)\n default:\n return Plural.Other;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 parseCookieValue(cookieStr, name) {\n name = encodeURIComponent(name);\n try {\n for (var _a = __values(cookieStr.split(';')), _b = _a.next(); !_b.done; _b = _a.next()) {\n var cookie = _b.value;\n var eqIndex = cookie.indexOf('=');\n var _c = __read(eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)], 2), cookieName = _c[0], cookieValue = _c[1];\n if (cookieName.trim() === name) {\n return decodeURIComponent(cookieValue);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_d = _a.return)) _d.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n var e_1, _d;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @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 *\n */\nvar NgClass = /** @class */ (function () {\n function NgClass(_iterableDiffers, _keyValueDiffers, _ngEl, _renderer) {\n this._iterableDiffers = _iterableDiffers;\n this._keyValueDiffers = _keyValueDiffers;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n this._initialClasses = [];\n }\n Object.defineProperty(NgClass.prototype, \"klass\", {\n set: function (v) {\n this._removeClasses(this._initialClasses);\n this._initialClasses = typeof v === 'string' ? v.split(/\\s+/) : [];\n this._applyClasses(this._initialClasses);\n this._applyClasses(this._rawClass);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgClass.prototype, \"ngClass\", {\n set: function (v) {\n this._removeClasses(this._rawClass);\n this._applyClasses(this._initialClasses);\n this._iterableDiffer = null;\n this._keyValueDiffer = null;\n this._rawClass = typeof v === 'string' ? v.split(/\\s+/) : v;\n if (this._rawClass) {\n if (ɵisListLikeIterable(this._rawClass)) {\n this._iterableDiffer = this._iterableDiffers.find(this._rawClass).create();\n }\n else {\n this._keyValueDiffer = this._keyValueDiffers.find(this._rawClass).create();\n }\n }\n },\n enumerable: true,\n configurable: true\n });\n NgClass.prototype.ngDoCheck = function () {\n if (this._iterableDiffer) {\n var iterableChanges = this._iterableDiffer.diff(this._rawClass);\n if (iterableChanges) {\n this._applyIterableChanges(iterableChanges);\n }\n }\n else if (this._keyValueDiffer) {\n var keyValueChanges = this._keyValueDiffer.diff(this._rawClass);\n if (keyValueChanges) {\n this._applyKeyValueChanges(keyValueChanges);\n }\n }\n };\n NgClass.prototype._applyKeyValueChanges = function (changes) {\n var _this = this;\n changes.forEachAddedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });\n changes.forEachChangedItem(function (record) { return _this._toggleClass(record.key, record.currentValue); });\n changes.forEachRemovedItem(function (record) {\n if (record.previousValue) {\n _this._toggleClass(record.key, false);\n }\n });\n };\n NgClass.prototype._applyIterableChanges = function (changes) {\n var _this = this;\n changes.forEachAddedItem(function (record) {\n if (typeof record.item === 'string') {\n _this._toggleClass(record.item, true);\n }\n else {\n throw new Error(\"NgClass can only toggle CSS classes expressed as strings, got \" + ɵstringify(record.item));\n }\n });\n changes.forEachRemovedItem(function (record) { return _this._toggleClass(record.item, false); });\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 /**\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 NgClass.prototype._applyClasses = /**\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 function (rawClassVal) {\n var _this = this;\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, true); });\n }\n else {\n Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, !!rawClassVal[klass]); });\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 /**\n * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n * purposes.\n */\n NgClass.prototype._removeClasses = /**\n * Removes a collection of CSS classes from the DOM element. This is mostly useful for cleanup\n * purposes.\n */\n function (rawClassVal) {\n var _this = this;\n if (rawClassVal) {\n if (Array.isArray(rawClassVal) || rawClassVal instanceof Set) {\n rawClassVal.forEach(function (klass) { return _this._toggleClass(klass, false); });\n }\n else {\n Object.keys(rawClassVal).forEach(function (klass) { return _this._toggleClass(klass, false); });\n }\n }\n };\n NgClass.prototype._toggleClass = function (klass, enabled) {\n var _this = this;\n klass = klass.trim();\n if (klass) {\n klass.split(/\\s+/g).forEach(function (klass) {\n if (enabled) {\n _this._renderer.addClass(_this._ngEl.nativeElement, klass);\n }\n else {\n _this._renderer.removeClass(_this._ngEl.nativeElement, klass);\n }\n });\n }\n };\n NgClass.decorators = [\n { type: Directive, args: [{ selector: '[ngClass]' },] }\n ];\n /** @nocollapse */\n NgClass.ctorParameters = function () { return [\n { type: IterableDiffers, },\n { type: KeyValueDiffers, },\n { type: ElementRef, },\n { type: Renderer2, },\n ]; };\n NgClass.propDecorators = {\n \"klass\": [{ type: Input, args: ['class',] },],\n \"ngClass\": [{ type: Input },],\n };\n return NgClass;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 * ### 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 * ## 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 * A more complete example with ngModuleFactory:\n *\n * {@example common/ngComponentOutlet/ts/module.ts region='NgModuleFactoryExample'}\n *\n * @experimental\n */\nvar NgComponentOutlet = /** @class */ (function () {\n function NgComponentOutlet(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n this._componentRef = null;\n this._moduleRef = null;\n }\n NgComponentOutlet.prototype.ngOnChanges = function (changes) {\n this._viewContainerRef.clear();\n this._componentRef = null;\n if (this.ngComponentOutlet) {\n var elInjector = this.ngComponentOutletInjector || this._viewContainerRef.parentInjector;\n if (changes['ngComponentOutletNgModuleFactory']) {\n if (this._moduleRef)\n this._moduleRef.destroy();\n if (this.ngComponentOutletNgModuleFactory) {\n var parentModule = elInjector.get(NgModuleRef);\n this._moduleRef = this.ngComponentOutletNgModuleFactory.create(parentModule.injector);\n }\n else {\n this._moduleRef = null;\n }\n }\n var componentFactoryResolver = this._moduleRef ? this._moduleRef.componentFactoryResolver :\n elInjector.get(ComponentFactoryResolver);\n var componentFactory = componentFactoryResolver.resolveComponentFactory(this.ngComponentOutlet);\n this._componentRef = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, elInjector, this.ngComponentOutletContent);\n }\n };\n NgComponentOutlet.prototype.ngOnDestroy = function () {\n if (this._moduleRef)\n this._moduleRef.destroy();\n };\n NgComponentOutlet.decorators = [\n { type: Directive, args: [{ selector: '[ngComponentOutlet]' },] }\n ];\n /** @nocollapse */\n NgComponentOutlet.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n ]; };\n NgComponentOutlet.propDecorators = {\n \"ngComponentOutlet\": [{ type: Input },],\n \"ngComponentOutletInjector\": [{ type: Input },],\n \"ngComponentOutletContent\": [{ type: Input },],\n \"ngComponentOutletNgModuleFactory\": [{ type: Input },],\n };\n return NgComponentOutlet;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar NgForOfContext = /** @class */ (function () {\n function NgForOfContext($implicit, ngForOf, index, count) {\n this.$implicit = $implicit;\n this.ngForOf = ngForOf;\n this.index = index;\n this.count = count;\n }\n Object.defineProperty(NgForOfContext.prototype, \"first\", {\n get: function () { return this.index === 0; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"last\", {\n get: function () { return this.index === this.count - 1; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"even\", {\n get: function () { return this.index % 2 === 0; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOfContext.prototype, \"odd\", {\n get: function () { return !this.even; },\n enumerable: true,\n configurable: true\n });\n return NgForOfContext;\n}());\n/**\n * The `NgForOf` directive instantiates a template once per item from an iterable. The context\n * for each instantiated template inherits from the outer context with the given loop variable\n * set to the current item from the iterable.\n *\n * ### Local Variables\n *\n * `NgForOf` provides several exported values that 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 * - `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 * ```\n * <li *ngFor=\"let user of userObservable | async as users; index as i; first as isFirst\">\n * {{i}}/{{users.length}}. {{user}} <span *ngIf=\"isFirst\">default</span>\n * </li>\n * ```\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 * * Otherwise, the DOM element for that item will remain the same.\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 (such as `<input>` elements which accept user input) that are present. 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 *\n * It is possible for the identities of elements in the iterator to change while the data does not.\n * This can happen, for example, if the iterator produced from an RPC to the server, and that\n * RPC is re-run. Even if the data hasn't changed, the second response will produce objects with\n * different identities, and Angular will tear down the entire DOM and rebuild it (as if all old\n * elements were deleted and all new elements inserted). This is an expensive operation and should\n * be avoided if possible.\n *\n * To customize the default tracking algorithm, `NgForOf` supports `trackBy` option.\n * `trackBy` takes a function which has two arguments: `index` and `item`.\n * If `trackBy` is given, Angular tracks changes by the return value of the function.\n *\n * ### Syntax\n *\n * - `<li *ngFor=\"let item of items; index as i; trackBy: trackByFn\">...</li>`\n *\n * With `<ng-template>` element:\n *\n * ```\n * <ng-template ngFor let-item [ngForOf]=\"items\" let-i=\"index\" [ngForTrackBy]=\"trackByFn\">\n * <li>...</li>\n * </ng-template>\n * ```\n *\n * ### Example\n *\n * See a [live demo](http://plnkr.co/edit/KVuXxDp0qinGDyo307QW?p=preview) for a more detailed\n * example.\n *\n *\n */\nvar NgForOf = /** @class */ (function () {\n function NgForOf(_viewContainer, _template, _differs) {\n this._viewContainer = _viewContainer;\n this._template = _template;\n this._differs = _differs;\n this._differ = null;\n }\n Object.defineProperty(NgForOf.prototype, \"ngForTrackBy\", {\n get: function () { return this._trackByFn; },\n set: function (fn) {\n if (isDevMode() && fn != null && typeof fn !== 'function') {\n // TODO(vicb): use a log service once there is a public one available\n if (console && console.warn) {\n console.warn(\"trackBy must be a function, but received \" + JSON.stringify(fn) + \". \" +\n \"See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.\");\n }\n }\n this._trackByFn = fn;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForOf.prototype, \"ngForTemplate\", {\n set: function (value) {\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 enumerable: true,\n configurable: true\n });\n NgForOf.prototype.ngOnChanges = function (changes) {\n if ('ngForOf' in changes) {\n // React on ngForOf changes only once all inputs have been initialized\n var value = changes['ngForOf'].currentValue;\n if (!this._differ && value) {\n try {\n this._differ = this._differs.find(value).create(this.ngForTrackBy);\n }\n catch (e) {\n throw new Error(\"Cannot find a differ supporting object '\" + value + \"' of type '\" + getTypeNameForDebugging(value) + \"'. NgFor only supports binding to Iterables such as Arrays.\");\n }\n }\n }\n };\n NgForOf.prototype.ngDoCheck = function () {\n if (this._differ) {\n var changes = this._differ.diff(this.ngForOf);\n if (changes)\n this._applyChanges(changes);\n }\n };\n NgForOf.prototype._applyChanges = function (changes) {\n var _this = this;\n var insertTuples = [];\n changes.forEachOperation(function (item, adjustedPreviousIndex, currentIndex) {\n if (item.previousIndex == null) {\n var view = _this._viewContainer.createEmbeddedView(_this._template, new NgForOfContext((null), _this.ngForOf, -1, -1), currentIndex);\n var tuple = new RecordViewTuple(item, view);\n insertTuples.push(tuple);\n }\n else if (currentIndex == null) {\n _this._viewContainer.remove(adjustedPreviousIndex);\n }\n else {\n var view = (_this._viewContainer.get(adjustedPreviousIndex));\n _this._viewContainer.move(view, currentIndex);\n var tuple = new RecordViewTuple(item, view);\n insertTuples.push(tuple);\n }\n });\n for (var i = 0; i < insertTuples.length; i++) {\n this._perViewChange(insertTuples[i].view, insertTuples[i].record);\n }\n for (var i = 0, ilen = this._viewContainer.length; i < ilen; i++) {\n var viewRef = this._viewContainer.get(i);\n viewRef.context.index = i;\n viewRef.context.count = ilen;\n }\n changes.forEachIdentityChange(function (record) {\n var viewRef = _this._viewContainer.get(record.currentIndex);\n viewRef.context.$implicit = record.item;\n });\n };\n NgForOf.prototype._perViewChange = function (view, record) {\n view.context.$implicit = record.item;\n };\n NgForOf.decorators = [\n { type: Directive, args: [{ selector: '[ngFor][ngForOf]' },] }\n ];\n /** @nocollapse */\n NgForOf.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n { type: TemplateRef, },\n { type: IterableDiffers, },\n ]; };\n NgForOf.propDecorators = {\n \"ngForOf\": [{ type: Input },],\n \"ngForTrackBy\": [{ type: Input },],\n \"ngForTemplate\": [{ type: Input },],\n };\n return NgForOf;\n}());\nvar RecordViewTuple = /** @class */ (function () {\n function RecordViewTuple(record, view) {\n this.record = record;\n this.view = view;\n }\n return RecordViewTuple;\n}());\nfunction getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Conditionally includes a template based on the value of an `expression`.\n *\n * `ngIf` evaluates the `expression` and then renders the `then` or `else` template in its place\n * when expression is truthy or falsy respectively. Typically the:\n * - `then` template is the inline template of `ngIf` unless bound to a different value.\n * - `else` template is blank unless it is bound.\n *\n * ## Most common usage\n *\n * The most common usage of the `ngIf` directive is to conditionally show the inline template as\n * seen in this example:\n * {@example common/ngIf/ts/module.ts region='NgIfSimple'}\n *\n * ## Showing an alternative template using `else`\n *\n * If it is necessary to display a template when the `expression` is falsy use the `else` template\n * binding as shown. Note that the `else` binding points to a `<ng-template>` 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 non-inlined `then` template\n *\n * Usually the `then` template is the inlined template of the `ngIf`, but it can be changed using\n * a binding (just like `else`). Because `then` and `else` are bindings, the template references can\n * change at runtime as shown in this example.\n *\n * {@example common/ngIf/ts/module.ts region='NgIfThenElse'}\n *\n * ## Storing conditional result in a variable\n *\n * A common pattern is that we need to show a set of properties from the same object. If the\n * object is undefined, then we have to use the safe-traversal-operator `?.` to guard against\n * dereferencing a `null` value. This is especially the case when waiting on async data such as\n * when using the `async` pipe as shown in following example:\n *\n * ```\n * Hello {{ (userStream|async)?.last }}, {{ (userStream|async)?.first }}!\n * ```\n *\n * There are several inefficiencies in the above example:\n * - We create multiple subscriptions on `userStream`. One for each `async` pipe, or two in the\n * example above.\n * - We cannot display an alternative screen while waiting for the data to arrive asynchronously.\n * - We have to use the safe-traversal-operator `?.` to access properties, which is cumbersome.\n * - We have to place the `async` pipe in parenthesis.\n *\n * A better way to do this is to use `ngIf` and store the result of the condition in a local\n * variable as shown in the the example below:\n *\n * {@example common/ngIf/ts/module.ts region='NgIfAs'}\n *\n * Notice that:\n * - We use only one `async` pipe and hence only one subscription gets created.\n * - `ngIf` stores the result of the `userStream|async` in the local variable `user`.\n * - The local `user` can then be bound repeatedly in a more efficient way.\n * - No need to use the safe-traversal-operator `?.` to access properties as `ngIf` will only\n * display the data if `userStream` returns a value.\n * - We can display an alternative template while waiting for the data.\n *\n * ### Syntax\n *\n * Simple form:\n * - `<div *ngIf=\"condition\">...</div>`\n * - `<ng-template [ngIf]=\"condition\"><div>...</div></ng-template>`\n *\n * Form with an else block:\n * ```\n * <div *ngIf=\"condition; else elseBlock\">...</div>\n * <ng-template #elseBlock>...</ng-template>\n * ```\n *\n * Form with a `then` and `else` block:\n * ```\n * <div *ngIf=\"condition; then thenBlock else elseBlock\"></div>\n * <ng-template #thenBlock>...</ng-template>\n * <ng-template #elseBlock>...</ng-template>\n * ```\n *\n * Form with storing the value locally:\n * ```\n * <div *ngIf=\"condition as value; else elseBlock\">{{value}}</div>\n * <ng-template #elseBlock>...</ng-template>\n * ```\n *\n *\n */\nvar NgIf = /** @class */ (function () {\n function NgIf(_viewContainer, templateRef) {\n this._viewContainer = _viewContainer;\n this._context = new NgIfContext();\n this._thenTemplateRef = null;\n this._elseTemplateRef = null;\n this._thenViewRef = null;\n this._elseViewRef = null;\n this._thenTemplateRef = templateRef;\n }\n Object.defineProperty(NgIf.prototype, \"ngIf\", {\n set: function (condition) {\n this._context.$implicit = this._context.ngIf = condition;\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgIf.prototype, \"ngIfThen\", {\n set: function (templateRef) {\n assertTemplate('ngIfThen', templateRef);\n this._thenTemplateRef = templateRef;\n this._thenViewRef = null; // clear previous view if any.\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgIf.prototype, \"ngIfElse\", {\n set: function (templateRef) {\n assertTemplate('ngIfElse', templateRef);\n this._elseTemplateRef = templateRef;\n this._elseViewRef = null; // clear previous view if any.\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n NgIf.prototype._updateView = function () {\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 }\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 NgIf.decorators = [\n { type: Directive, args: [{ selector: '[ngIf]' },] }\n ];\n /** @nocollapse */\n NgIf.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n { type: TemplateRef, },\n ]; };\n NgIf.propDecorators = {\n \"ngIf\": [{ type: Input },],\n \"ngIfThen\": [{ type: Input },],\n \"ngIfElse\": [{ type: Input },],\n };\n return NgIf;\n}());\n/**\n *\n */\nvar NgIfContext = /** @class */ (function () {\n function NgIfContext() {\n this.$implicit = null;\n this.ngIf = null;\n }\n return NgIfContext;\n}());\nfunction assertTemplate(property, templateRef) {\n var isTemplateRefOrNull = !!(!templateRef || templateRef.createEmbeddedView);\n if (!isTemplateRefOrNull) {\n throw new Error(property + \" must be a TemplateRef, but received '\" + ɵstringify(templateRef) + \"'.\");\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SwitchView = /** @class */ (function () {\n function SwitchView(_viewContainerRef, _templateRef) {\n this._viewContainerRef = _viewContainerRef;\n this._templateRef = _templateRef;\n this._created = false;\n }\n SwitchView.prototype.create = function () {\n this._created = true;\n this._viewContainerRef.createEmbeddedView(this._templateRef);\n };\n SwitchView.prototype.destroy = function () {\n this._created = false;\n this._viewContainerRef.clear();\n };\n SwitchView.prototype.enforceState = function (created) {\n if (created && !this._created) {\n this.create();\n }\n else if (!created && this._created) {\n this.destroy();\n }\n };\n return SwitchView;\n}());\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\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 * @description\n *\n * Adds / removes DOM sub-trees when the nest match expressions matches the switch expression.\n *\n * `NgSwitch` stamps out nested views when their match expression value matches the value of the\n * switch expression.\n *\n * In other words:\n * - you define a container element (where you place the directive with a switch expression on the\n * `[ngSwitch]=\"...\"` attribute)\n * - you define inner views inside the `NgSwitch` and place a `*ngSwitchCase` attribute on the view\n * root elements.\n *\n * Elements within `NgSwitch` but outside of a `NgSwitchCase` or `NgSwitchDefault` directives will\n * be preserved at the location.\n *\n * The `ngSwitchCase` directive informs the parent `NgSwitch` of which view to display when the\n * expression is evaluated.\n * When no matching expression is found on a `ngSwitchCase` view, the `ngSwitchDefault` view is\n * stamped out.\n *\n *\n */\nvar NgSwitch = /** @class */ (function () {\n function NgSwitch() {\n this._defaultUsed = false;\n this._caseCount = 0;\n this._lastCaseCheckIndex = 0;\n this._lastCasesMatched = false;\n }\n Object.defineProperty(NgSwitch.prototype, \"ngSwitch\", {\n set: function (newValue) {\n this._ngSwitch = newValue;\n if (this._caseCount === 0) {\n this._updateDefaultCases(true);\n }\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n NgSwitch.prototype._addCase = /** @internal */\n function () { return this._caseCount++; };\n /** @internal */\n /** @internal */\n NgSwitch.prototype._addDefault = /** @internal */\n function (view) {\n if (!this._defaultViews) {\n this._defaultViews = [];\n }\n this._defaultViews.push(view);\n };\n /** @internal */\n /** @internal */\n NgSwitch.prototype._matchCase = /** @internal */\n function (value) {\n var 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 NgSwitch.prototype._updateDefaultCases = function (useDefault) {\n if (this._defaultViews && useDefault !== this._defaultUsed) {\n this._defaultUsed = useDefault;\n for (var i = 0; i < this._defaultViews.length; i++) {\n var defaultView = this._defaultViews[i];\n defaultView.enforceState(useDefault);\n }\n }\n };\n NgSwitch.decorators = [\n { type: Directive, args: [{ selector: '[ngSwitch]' },] }\n ];\n /** @nocollapse */\n NgSwitch.ctorParameters = function () { return []; };\n NgSwitch.propDecorators = {\n \"ngSwitch\": [{ type: Input },],\n };\n return NgSwitch;\n}());\n/**\n * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * </container-element>\n *```\n * @description\n *\n * Creates a view that will be added/removed from the parent {@link NgSwitch} when the\n * given expression evaluate to respectively the same/different value as the switch\n * expression.\n *\n * Insert the sub-tree when the expression evaluates to the same value as the enclosing switch\n * expression.\n *\n * If multiple match expressions match the switch expression value, all of them are displayed.\n *\n * See {@link NgSwitch} for more details and example.\n *\n *\n */\nvar NgSwitchCase = /** @class */ (function () {\n function NgSwitchCase(viewContainer, templateRef, ngSwitch) {\n this.ngSwitch = ngSwitch;\n ngSwitch._addCase();\n this._view = new SwitchView(viewContainer, templateRef);\n }\n NgSwitchCase.prototype.ngDoCheck = function () { this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase)); };\n NgSwitchCase.decorators = [\n { type: Directive, args: [{ selector: '[ngSwitchCase]' },] }\n ];\n /** @nocollapse */\n NgSwitchCase.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n { type: TemplateRef, },\n { type: NgSwitch, decorators: [{ type: Host },] },\n ]; };\n NgSwitchCase.propDecorators = {\n \"ngSwitchCase\": [{ type: Input },],\n };\n return NgSwitchCase;\n}());\n/**\n * @ngModule CommonModule\n * @usageNotes\n * ```\n * <container-element [ngSwitch]=\"switch_expression\">\n * <some-element *ngSwitchCase=\"match_expression_1\">...</some-element>\n * <some-other-element *ngSwitchDefault>...</some-other-element>\n * </container-element>\n * ```\n *\n * @description\n *\n * Creates a view that is added to the parent {@link NgSwitch} when no case expressions\n * match the switch expression.\n *\n * Insert the sub-tree when no case expressions evaluate to the same value as the enclosing switch\n * expression.\n *\n * See {@link NgSwitch} for more details and example.\n *\n *\n */\nvar NgSwitchDefault = /** @class */ (function () {\n function NgSwitchDefault(viewContainer, templateRef, ngSwitch) {\n ngSwitch._addDefault(new SwitchView(viewContainer, templateRef));\n }\n NgSwitchDefault.decorators = [\n { type: Directive, args: [{ selector: '[ngSwitchDefault]' },] }\n ];\n /** @nocollapse */\n NgSwitchDefault.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n { type: TemplateRef, },\n { type: NgSwitch, decorators: [{ type: Host },] },\n ]; };\n return NgSwitchDefault;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @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 * @experimental\n */\nvar NgPlural = /** @class */ (function () {\n function NgPlural(_localization) {\n this._localization = _localization;\n this._caseViews = {};\n }\n Object.defineProperty(NgPlural.prototype, \"ngPlural\", {\n set: function (value) {\n this._switchValue = value;\n this._updateView();\n },\n enumerable: true,\n configurable: true\n });\n NgPlural.prototype.addCase = function (value, switchView) { this._caseViews[value] = switchView; };\n NgPlural.prototype._updateView = function () {\n this._clearViews();\n var cases = Object.keys(this._caseViews);\n var key = getPluralCategory(this._switchValue, cases, this._localization);\n this._activateView(this._caseViews[key]);\n };\n NgPlural.prototype._clearViews = function () {\n if (this._activeView)\n this._activeView.destroy();\n };\n NgPlural.prototype._activateView = function (view) {\n if (view) {\n this._activeView = view;\n this._activeView.create();\n }\n };\n NgPlural.decorators = [\n { type: Directive, args: [{ selector: '[ngPlural]' },] }\n ];\n /** @nocollapse */\n NgPlural.ctorParameters = function () { return [\n { type: NgLocalization, },\n ]; };\n NgPlural.propDecorators = {\n \"ngPlural\": [{ type: Input },],\n };\n return NgPlural;\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 * @experimental\n */\nvar NgPluralCase = /** @class */ (function () {\n function NgPluralCase(value, template, viewContainer, ngPlural) {\n this.value = value;\n var isANumber = !isNaN(Number(value));\n ngPlural.addCase(isANumber ? \"=\" + value : value, new SwitchView(viewContainer, template));\n }\n NgPluralCase.decorators = [\n { type: Directive, args: [{ selector: '[ngPluralCase]' },] }\n ];\n /** @nocollapse */\n NgPluralCase.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Attribute, args: ['ngPluralCase',] },] },\n { type: TemplateRef, },\n { type: ViewContainerRef, },\n { type: NgPlural, decorators: [{ type: Host },] },\n ]; };\n return NgPluralCase;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <some-element [ngStyle]=\"{'font-style': styleExp}\">...</some-element>\n *\n * <some-element [ngStyle]=\"{'max-width.px': widthExp}\">...</some-element>\n *\n * <some-element [ngStyle]=\"objExp\">...</some-element>\n * ```\n *\n * @description\n *\n * Update an HTML element styles.\n *\n * The styles are updated according to the value of the expression evaluation:\n * - keys are style names with an optional `.<unit>` suffix (ie 'top.px', 'font-style.em'),\n * - values are the values assigned to those properties (expressed in the given unit).\n *\n *\n */\nvar NgStyle = /** @class */ (function () {\n function NgStyle(_differs, _ngEl, _renderer) {\n this._differs = _differs;\n this._ngEl = _ngEl;\n this._renderer = _renderer;\n }\n Object.defineProperty(NgStyle.prototype, \"ngStyle\", {\n set: function (v) {\n this._ngStyle = v;\n if (!this._differ && v) {\n this._differ = this._differs.find(v).create();\n }\n },\n enumerable: true,\n configurable: true\n });\n NgStyle.prototype.ngDoCheck = function () {\n if (this._differ) {\n var changes = this._differ.diff(this._ngStyle);\n if (changes) {\n this._applyChanges(changes);\n }\n }\n };\n NgStyle.prototype._applyChanges = function (changes) {\n var _this = this;\n changes.forEachRemovedItem(function (record) { return _this._setStyle(record.key, null); });\n changes.forEachAddedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });\n changes.forEachChangedItem(function (record) { return _this._setStyle(record.key, record.currentValue); });\n };\n NgStyle.prototype._setStyle = function (nameAndUnit, value) {\n var _a = __read(nameAndUnit.split('.'), 2), name = _a[0], unit = _a[1];\n value = value != null && unit ? \"\" + value + unit : value;\n if (value != null) {\n this._renderer.setStyle(this._ngEl.nativeElement, name, value);\n }\n else {\n this._renderer.removeStyle(this._ngEl.nativeElement, name);\n }\n };\n NgStyle.decorators = [\n { type: Directive, args: [{ selector: '[ngStyle]' },] }\n ];\n /** @nocollapse */\n NgStyle.ctorParameters = function () { return [\n { type: KeyValueDiffers, },\n { type: ElementRef, },\n { type: Renderer2, },\n ]; };\n NgStyle.propDecorators = {\n \"ngStyle\": [{ type: Input },],\n };\n return NgStyle;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @ngModule CommonModule\n *\n * @usageNotes\n * ```\n * <ng-container *ngTemplateOutlet=\"templateRefExp; context: contextExp\"></ng-container>\n * ```\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 * Note: 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 *\n */\nvar NgTemplateOutlet = /** @class */ (function () {\n function NgTemplateOutlet(_viewContainerRef) {\n this._viewContainerRef = _viewContainerRef;\n }\n NgTemplateOutlet.prototype.ngOnChanges = function (changes) {\n var recreateView = this._shouldRecreateView(changes);\n if (recreateView) {\n if (this._viewRef) {\n this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._viewRef));\n }\n if (this.ngTemplateOutlet) {\n this._viewRef = this._viewContainerRef.createEmbeddedView(this.ngTemplateOutlet, this.ngTemplateOutletContext);\n }\n }\n else {\n 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 /**\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 NgTemplateOutlet.prototype._shouldRecreateView = /**\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 function (changes) {\n var ctxChange = changes['ngTemplateOutletContext'];\n return !!changes['ngTemplateOutlet'] || (ctxChange && this._hasContextShapeChanged(ctxChange));\n };\n NgTemplateOutlet.prototype._hasContextShapeChanged = function (ctxChange) {\n var prevCtxKeys = Object.keys(ctxChange.previousValue || {});\n var currCtxKeys = Object.keys(ctxChange.currentValue || {});\n if (prevCtxKeys.length === currCtxKeys.length) {\n try {\n for (var currCtxKeys_1 = __values(currCtxKeys), currCtxKeys_1_1 = currCtxKeys_1.next(); !currCtxKeys_1_1.done; currCtxKeys_1_1 = currCtxKeys_1.next()) {\n var propName = currCtxKeys_1_1.value;\n if (prevCtxKeys.indexOf(propName) === -1) {\n return true;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (currCtxKeys_1_1 && !currCtxKeys_1_1.done && (_a = currCtxKeys_1.return)) _a.call(currCtxKeys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return false;\n }\n else {\n return true;\n }\n var e_1, _a;\n };\n NgTemplateOutlet.prototype._updateExistingContext = function (ctx) {\n try {\n for (var _a = __values(Object.keys(ctx)), _b = _a.next(); !_b.done; _b = _a.next()) {\n var propName = _b.value;\n this._viewRef.context[propName] = this.ngTemplateOutletContext[propName];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n var e_2, _c;\n };\n NgTemplateOutlet.decorators = [\n { type: Directive, args: [{ selector: '[ngTemplateOutlet]' },] }\n ];\n /** @nocollapse */\n NgTemplateOutlet.ctorParameters = function () { return [\n { type: ViewContainerRef, },\n ]; };\n NgTemplateOutlet.propDecorators = {\n \"ngTemplateOutletContext\": [{ type: Input },],\n \"ngTemplateOutlet\": [{ type: Input },],\n };\n return NgTemplateOutlet;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 collection of Angular directives that are likely to be used in each and every Angular\n * application.\n */\nvar COMMON_DIRECTIVES = [\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 invalidPipeArgumentError(type, value) {\n return Error(\"InvalidPipeArgument: '\" + value + \"' for pipe '\" + ɵstringify(type) + \"'\");\n}\n\nvar NumberFormatter = /** @class */ (function () {\n function NumberFormatter() {\n }\n NumberFormatter.format = function (num, locale, style, opts) {\n if (opts === void 0) { opts = {}; }\n var minimumIntegerDigits = opts.minimumIntegerDigits, minimumFractionDigits = opts.minimumFractionDigits, maximumFractionDigits = opts.maximumFractionDigits, currency = opts.currency, _a = opts.currencyAsSymbol, currencyAsSymbol = _a === void 0 ? false : _a;\n var options = {\n minimumIntegerDigits: minimumIntegerDigits,\n minimumFractionDigits: minimumFractionDigits,\n maximumFractionDigits: maximumFractionDigits,\n style: NumberFormatStyle[style].toLowerCase()\n };\n if (style == NumberFormatStyle.Currency) {\n options.currency = typeof currency == 'string' ? currency : undefined;\n options.currencyDisplay = currencyAsSymbol ? 'symbol' : 'code';\n }\n return new Intl.NumberFormat(locale, options).format(num);\n };\n return NumberFormatter;\n}());\nvar DATE_FORMATS_SPLIT$1 = /((?:[^yMLdHhmsazZEwGjJ']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|J+|j+|m+|s+|a|z|Z|G+|w+))(.*)/;\nvar PATTERN_ALIASES = {\n // Keys are quoted so they do not get renamed during closure compilation.\n 'yMMMdjms': datePartGetterFactory(combine([\n digitCondition('year', 1),\n nameCondition('month', 3),\n digitCondition('day', 1),\n digitCondition('hour', 1),\n digitCondition('minute', 1),\n digitCondition('second', 1),\n ])),\n 'yMdjm': datePartGetterFactory(combine([\n digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1),\n digitCondition('hour', 1), digitCondition('minute', 1)\n ])),\n 'yMMMMEEEEd': datePartGetterFactory(combine([\n digitCondition('year', 1), nameCondition('month', 4), nameCondition('weekday', 4),\n digitCondition('day', 1)\n ])),\n 'yMMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 4), digitCondition('day', 1)])),\n 'yMMMd': datePartGetterFactory(combine([digitCondition('year', 1), nameCondition('month', 3), digitCondition('day', 1)])),\n 'yMd': datePartGetterFactory(combine([digitCondition('year', 1), digitCondition('month', 1), digitCondition('day', 1)])),\n 'jms': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('second', 1), digitCondition('minute', 1)])),\n 'jm': datePartGetterFactory(combine([digitCondition('hour', 1), digitCondition('minute', 1)]))\n};\nvar DATE_FORMATS$1 = {\n // Keys are quoted so they do not get renamed.\n 'yyyy': datePartGetterFactory(digitCondition('year', 4)),\n 'yy': datePartGetterFactory(digitCondition('year', 2)),\n 'y': datePartGetterFactory(digitCondition('year', 1)),\n 'MMMM': datePartGetterFactory(nameCondition('month', 4)),\n 'MMM': datePartGetterFactory(nameCondition('month', 3)),\n 'MM': datePartGetterFactory(digitCondition('month', 2)),\n 'M': datePartGetterFactory(digitCondition('month', 1)),\n 'LLLL': datePartGetterFactory(nameCondition('month', 4)),\n 'L': datePartGetterFactory(nameCondition('month', 1)),\n 'dd': datePartGetterFactory(digitCondition('day', 2)),\n 'd': datePartGetterFactory(digitCondition('day', 1)),\n 'HH': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), false)))),\n 'H': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), false))),\n 'hh': digitModifier(hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 2), true)))),\n 'h': hourExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),\n 'jj': datePartGetterFactory(digitCondition('hour', 2)),\n 'j': datePartGetterFactory(digitCondition('hour', 1)),\n 'mm': digitModifier(datePartGetterFactory(digitCondition('minute', 2))),\n 'm': datePartGetterFactory(digitCondition('minute', 1)),\n 'ss': digitModifier(datePartGetterFactory(digitCondition('second', 2))),\n 's': datePartGetterFactory(digitCondition('second', 1)),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit\n // fractions\n 'sss': datePartGetterFactory(digitCondition('second', 3)),\n 'EEEE': datePartGetterFactory(nameCondition('weekday', 4)),\n 'EEE': datePartGetterFactory(nameCondition('weekday', 3)),\n 'EE': datePartGetterFactory(nameCondition('weekday', 2)),\n 'E': datePartGetterFactory(nameCondition('weekday', 1)),\n 'a': hourClockExtractor(datePartGetterFactory(hour12Modify(digitCondition('hour', 1), true))),\n 'Z': timeZoneGetter$1('short'),\n 'z': timeZoneGetter$1('long'),\n 'ww': datePartGetterFactory({}),\n // Week of year, padded (00-53). Week 01 is the week with the\n // first Thursday of the year. not support ?\n 'w': datePartGetterFactory({}),\n // Week of year (0-53). Week 1 is the week with the first Thursday\n // of the year not support ?\n 'G': datePartGetterFactory(nameCondition('era', 1)),\n 'GG': datePartGetterFactory(nameCondition('era', 2)),\n 'GGG': datePartGetterFactory(nameCondition('era', 3)),\n 'GGGG': datePartGetterFactory(nameCondition('era', 4))\n};\nfunction digitModifier(inner) {\n return function (date, locale) {\n var result = inner(date, locale);\n return result.length == 1 ? '0' + result : result;\n };\n}\nfunction hourClockExtractor(inner) {\n return function (date, locale) { return inner(date, locale).split(' ')[1]; };\n}\nfunction hourExtractor(inner) {\n return function (date, locale) { return inner(date, locale).split(' ')[0]; };\n}\nfunction intlDateFormat(date, locale, options) {\n return new Intl.DateTimeFormat(locale, options).format(date).replace(/[\\u200e\\u200f]/g, '');\n}\nfunction timeZoneGetter$1(timezone) {\n // To workaround `Intl` API restriction for single timezone let format with 24 hours\n var options = { hour: '2-digit', hour12: false, timeZoneName: timezone };\n return function (date, locale) {\n var result = intlDateFormat(date, locale, options);\n // Then extract first 3 letters that related to hours\n return result ? result.substring(3) : '';\n };\n}\nfunction hour12Modify(options, value) {\n options.hour12 = value;\n return options;\n}\nfunction digitCondition(prop, len) {\n var result = {};\n result[prop] = len === 2 ? '2-digit' : 'numeric';\n return result;\n}\nfunction nameCondition(prop, len) {\n var result = {};\n if (len < 4) {\n result[prop] = len > 1 ? 'short' : 'narrow';\n }\n else {\n result[prop] = 'long';\n }\n return result;\n}\nfunction combine(options) {\n return options.reduce(function (merged, opt) { return (__assign({}, merged, opt)); }, {});\n}\nfunction datePartGetterFactory(ret) {\n return function (date, locale) { return intlDateFormat(date, locale, ret); };\n}\nvar DATE_FORMATTER_CACHE = new Map();\nfunction dateFormatter(format, date, locale) {\n var fn = PATTERN_ALIASES[format];\n if (fn)\n return fn(date, locale);\n var cacheKey = format;\n var parts = DATE_FORMATTER_CACHE.get(cacheKey);\n if (!parts) {\n parts = [];\n var match = void 0;\n DATE_FORMATS_SPLIT$1.exec(format);\n var _format = format;\n while (_format) {\n match = DATE_FORMATS_SPLIT$1.exec(_format);\n if (match) {\n parts = parts.concat(match.slice(1));\n _format = (parts.pop());\n }\n else {\n parts.push(_format);\n _format = null;\n }\n }\n DATE_FORMATTER_CACHE.set(cacheKey, parts);\n }\n return parts.reduce(function (text, part) {\n var fn = DATE_FORMATS$1[part];\n return text + (fn ? fn(date, locale) : partToTime(part));\n }, '');\n}\nfunction partToTime(part) {\n return part === '\\'\\'' ? '\\'' : part.replace(/(^'|'$)/g, '').replace(/''/g, '\\'');\n}\nvar DateFormatter = /** @class */ (function () {\n function DateFormatter() {\n }\n DateFormatter.format = function (date, locale, pattern) {\n return dateFormatter(pattern, date, locale);\n };\n return DateFormatter;\n}());\n\n/**\n* @license\n* Copyright Google Inc. All Rights Reserved.\n*\n* Use of this source 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 * @ngModule CommonModule\n * @description\n *\n * Formats a date according to locale rules.\n *\n * Where:\n * - `expression` is a date object or a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * - `format` indicates which date/time components to include. The format can be predefined as\n * shown below or custom as shown in the table.\n * - `'medium'`: equivalent to `'yMMMdjms'` (e.g. `Sep 3, 2010, 12:05:08 PM` for `en-US`)\n * - `'short'`: equivalent to `'yMdjm'` (e.g. `9/3/2010, 12:05 PM` for `en-US`)\n * - `'fullDate'`: equivalent to `'yMMMMEEEEd'` (e.g. `Friday, September 3, 2010` for `en-US`)\n * - `'longDate'`: equivalent to `'yMMMMd'` (e.g. `September 3, 2010` for `en-US`)\n * - `'mediumDate'`: equivalent to `'yMMMd'` (e.g. `Sep 3, 2010` for `en-US`)\n * - `'shortDate'`: equivalent to `'yMd'` (e.g. `9/3/2010` for `en-US`)\n * - `'mediumTime'`: equivalent to `'jms'` (e.g. `12:05:08 PM` for `en-US`)\n * - `'shortTime'`: equivalent to `'jm'` (e.g. `12:05 PM` for `en-US`)\n *\n *\n * | Component | Symbol | Narrow | Short Form | Long Form | Numeric | 2-digit |\n * |-----------|:------:|--------|--------------|-------------------|-----------|-----------|\n * | era | G | G (A) | GGG (AD) | GGGG (Anno Domini)| - | - |\n * | year | y | - | - | - | y (2015) | yy (15) |\n * | month | M | L (S) | MMM (Sep) | MMMM (September) | M (9) | MM (09) |\n * | day | d | - | - | - | d (3) | dd (03) |\n * | weekday | E | E (S) | EEE (Sun) | EEEE (Sunday) | - | - |\n * | hour | j | - | - | - | j (13) | jj (13) |\n * | hour12 | h | - | - | - | h (1 PM) | hh (01 PM)|\n * | hour24 | H | - | - | - | H (13) | HH (13) |\n * | minute | m | - | - | - | m (5) | mm (05) |\n * | second | s | - | - | - | s (9) | ss (09) |\n * | timezone | z | - | - | z (Pacific Standard Time)| - | - |\n * | timezone | Z | - | Z (GMT-8:00) | - | - | - |\n * | timezone | a | - | a (PM) | - | - | - |\n *\n * In javascript, only the components specified will be respected (not the ordering,\n * punctuations, ...) and details of the formatting will be dependent on the locale.\n *\n * Timezone of the formatted text will be the local system timezone of the end-user's machine.\n *\n * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not\n * applied and the formatted text will have the same day, month and year of the expression.\n *\n * WARNINGS:\n * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.\n * Instead users should treat the date as an immutable object and change the reference when the\n * pipe needs to re-run (this is to avoid reformatting the date on every change detection run\n * which would be an expensive operation).\n * - this pipe uses the Internationalization API. Therefore it is only reliable in Chrome and Opera\n * browsers.\n *\n * ### Examples\n *\n * Assuming `dateObj` is (year: 2010, month: 9, day: 3, hour: 12 PM, minute: 05, second: 08)\n * in the _local_ time and locale is 'en-US':\n *\n * {@example common/pipes/ts/date_pipe.ts region='DeprecatedDatePipe'}\n *\n *\n */\nvar DeprecatedDatePipe = /** @class */ (function () {\n function DeprecatedDatePipe(_locale) {\n this._locale = _locale;\n }\n DeprecatedDatePipe.prototype.transform = function (value, pattern) {\n if (pattern === void 0) { pattern = 'mediumDate'; }\n if (value == null || value === '' || value !== value)\n return null;\n var date;\n if (typeof value === 'string') {\n value = value.trim();\n }\n if (isDate$1(value)) {\n date = value;\n }\n else if (!isNaN(value - parseFloat(value))) {\n date = new Date(parseFloat(value));\n }\n else if (typeof value === 'string' && /^(\\d{4}-\\d{1,2}-\\d{1,2})$/.test(value)) {\n /**\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\n * timeoffset\n * is applied\n * Note: ISO months are 0 for January, 1 for February, ...\n */\n var _a = __read(value.split('-').map(function (val) { return parseInt(val, 10); }), 3), y = _a[0], m = _a[1], d = _a[2];\n date = new Date(y, m - 1, d);\n }\n else {\n date = new Date(value);\n }\n if (!isDate$1(date)) {\n var match = void 0;\n if ((typeof value === 'string') && (match = value.match(ISO8601_DATE_REGEX))) {\n date = isoStringToDate(match);\n }\n else {\n throw invalidPipeArgumentError(DeprecatedDatePipe, value);\n }\n }\n return DateFormatter.format(date, this._locale, DeprecatedDatePipe._ALIASES[pattern] || pattern);\n };\n /** @internal */\n DeprecatedDatePipe._ALIASES = {\n 'medium': 'yMMMdjms',\n 'short': 'yMdjm',\n 'fullDate': 'yMMMMEEEEd',\n 'longDate': 'yMMMMd',\n 'mediumDate': 'yMMMd',\n 'shortDate': 'yMd',\n 'mediumTime': 'jms',\n 'shortTime': 'jm'\n };\n DeprecatedDatePipe.decorators = [\n { type: Pipe, args: [{ name: 'date', pure: true },] }\n ];\n /** @nocollapse */\n DeprecatedDatePipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DeprecatedDatePipe;\n}());\nfunction isDate$1(value) {\n return value instanceof Date && !isNaN(value.valueOf());\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 formatNumber$1(pipe, locale, value, style, digits, currency, currencyAsSymbol) {\n if (currency === void 0) { currency = null; }\n if (currencyAsSymbol === void 0) { currencyAsSymbol = false; }\n if (value == null)\n return null;\n // Convert strings to numbers\n value = typeof value === 'string' && !isNaN(+value - parseFloat(value)) ? +value : value;\n if (typeof value !== 'number') {\n throw invalidPipeArgumentError(pipe, value);\n }\n var minInt;\n var minFraction;\n var maxFraction;\n if (style !== NumberFormatStyle.Currency) {\n // rely on Intl default for currency\n minInt = 1;\n minFraction = 0;\n maxFraction = 3;\n }\n if (digits) {\n var parts = digits.match(NUMBER_FORMAT_REGEXP);\n if (parts === null) {\n throw new Error(digits + \" is not a valid digit info for number pipes\");\n }\n if (parts[1] != null) {\n // min integer digits\n minInt = parseIntAutoRadix(parts[1]);\n }\n if (parts[3] != null) {\n // min fraction digits\n minFraction = parseIntAutoRadix(parts[3]);\n }\n if (parts[5] != null) {\n // max fraction digits\n maxFraction = parseIntAutoRadix(parts[5]);\n }\n }\n return NumberFormatter.format(value, locale, style, {\n minimumIntegerDigits: minInt,\n minimumFractionDigits: minFraction,\n maximumFractionDigits: maxFraction,\n currency: currency,\n currencyAsSymbol: currencyAsSymbol,\n });\n}\n/**\n * @ngModule CommonModule\n *\n * Formats a number as text. Group sizing and separator and other locale-specific\n * configurations are based on the active locale.\n *\n * where `expression` is a number:\n * - `digitInfo` is a `string` which has a following format: <br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>\n * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.\n * - `minFractionDigits` is the minimum number of digits after fraction. Defaults to `0`.\n * - `maxFractionDigits` is the maximum number of digits after fraction. Defaults to `3`.\n *\n * For more information on the acceptable range for each of these numbers and other\n * details see your native internationalization library.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * ### Example\n *\n * {@example common/pipes/ts/number_pipe.ts region='DeprecatedNumberPipe'}\n *\n *\n */\nvar DeprecatedDecimalPipe = /** @class */ (function () {\n function DeprecatedDecimalPipe(_locale) {\n this._locale = _locale;\n }\n DeprecatedDecimalPipe.prototype.transform = function (value, digits) {\n return formatNumber$1(DeprecatedDecimalPipe, this._locale, value, NumberFormatStyle.Decimal, digits);\n };\n DeprecatedDecimalPipe.decorators = [\n { type: Pipe, args: [{ name: 'number' },] }\n ];\n /** @nocollapse */\n DeprecatedDecimalPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DeprecatedDecimalPipe;\n}());\n/**\n * @ngModule CommonModule\n *\n * @description\n *\n * Formats a number as percentage according to locale rules.\n *\n * - `digitInfo` See {@link DecimalPipe} for detailed description.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * ### Example\n *\n * {@example common/pipes/ts/percent_pipe.ts region='DeprecatedPercentPipe'}\n *\n *\n */\nvar DeprecatedPercentPipe = /** @class */ (function () {\n function DeprecatedPercentPipe(_locale) {\n this._locale = _locale;\n }\n DeprecatedPercentPipe.prototype.transform = function (value, digits) {\n return formatNumber$1(DeprecatedPercentPipe, this._locale, value, NumberFormatStyle.Percent, digits);\n };\n DeprecatedPercentPipe.decorators = [\n { type: Pipe, args: [{ name: 'percent' },] }\n ];\n /** @nocollapse */\n DeprecatedPercentPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DeprecatedPercentPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Formats a number as currency using locale rules.\n *\n * Use `currency` to format a number as currency.\n *\n * - `currencyCode` is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, such\n * as `USD` for the US dollar and `EUR` for the euro.\n * - `symbolDisplay` is a boolean indicating whether to use the currency symbol or code.\n * - `true`: use symbol (e.g. `$`).\n * - `false`(default): use code (e.g. `USD`).\n * - `digitInfo` See {@link DecimalPipe} for detailed description.\n *\n * WARNING: this pipe uses the Internationalization API which is not yet available in all browsers\n * and may require a polyfill. See [Browser Support](guide/browser-support) for details.\n *\n * ### Example\n *\n * {@example common/pipes/ts/currency_pipe.ts region='DeprecatedCurrencyPipe'}\n *\n *\n */\nvar DeprecatedCurrencyPipe = /** @class */ (function () {\n function DeprecatedCurrencyPipe(_locale) {\n this._locale = _locale;\n }\n DeprecatedCurrencyPipe.prototype.transform = function (value, currencyCode, symbolDisplay, digits) {\n if (currencyCode === void 0) { currencyCode = 'USD'; }\n if (symbolDisplay === void 0) { symbolDisplay = false; }\n return formatNumber$1(DeprecatedCurrencyPipe, this._locale, value, NumberFormatStyle.Currency, digits, currencyCode, symbolDisplay);\n };\n DeprecatedCurrencyPipe.decorators = [\n { type: Pipe, args: [{ name: 'currency' },] }\n ];\n /** @nocollapse */\n DeprecatedCurrencyPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DeprecatedCurrencyPipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 collection of deprecated i18n pipes that require intl api\n *\n * @deprecated from v5\n */\nvar COMMON_DEPRECATED_I18N_PIPES = [DeprecatedDecimalPipe, DeprecatedPercentPipe, DeprecatedCurrencyPipe, DeprecatedDatePipe];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ObservableStrategy = /** @class */ (function () {\n function ObservableStrategy() {\n }\n ObservableStrategy.prototype.createSubscription = function (async, updateLatestValue) {\n return async.subscribe({ next: updateLatestValue, error: function (e) { throw e; } });\n };\n ObservableStrategy.prototype.dispose = function (subscription) { subscription.unsubscribe(); };\n ObservableStrategy.prototype.onDestroy = function (subscription) { subscription.unsubscribe(); };\n return ObservableStrategy;\n}());\nvar PromiseStrategy = /** @class */ (function () {\n function PromiseStrategy() {\n }\n PromiseStrategy.prototype.createSubscription = function (async, updateLatestValue) {\n return async.then(updateLatestValue, function (e) { throw e; });\n };\n PromiseStrategy.prototype.dispose = function (subscription) { };\n PromiseStrategy.prototype.onDestroy = function (subscription) { };\n return PromiseStrategy;\n}());\nvar _promiseStrategy = new PromiseStrategy();\nvar _observableStrategy = new ObservableStrategy();\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 *\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 *\n */\nvar AsyncPipe = /** @class */ (function () {\n function AsyncPipe(_ref) {\n this._ref = _ref;\n this._latestValue = null;\n this._latestReturnedValue = null;\n this._subscription = null;\n this._obj = null;\n this._strategy = null;\n }\n AsyncPipe.prototype.ngOnDestroy = function () {\n if (this._subscription) {\n this._dispose();\n }\n };\n AsyncPipe.prototype.transform = function (obj) {\n if (!this._obj) {\n if (obj) {\n this._subscribe(obj);\n }\n this._latestReturnedValue = this._latestValue;\n return this._latestValue;\n }\n if (obj !== this._obj) {\n this._dispose();\n return this.transform(obj);\n }\n if (this._latestValue === this._latestReturnedValue) {\n return this._latestReturnedValue;\n }\n this._latestReturnedValue = this._latestValue;\n return WrappedValue.wrap(this._latestValue);\n };\n AsyncPipe.prototype._subscribe = function (obj) {\n var _this = this;\n this._obj = obj;\n this._strategy = this._selectStrategy(obj);\n this._subscription = this._strategy.createSubscription(obj, function (value) { return _this._updateLatestValue(obj, value); });\n };\n AsyncPipe.prototype._selectStrategy = function (obj) {\n if (ɵisPromise(obj)) {\n return _promiseStrategy;\n }\n if (ɵisObservable(obj)) {\n return _observableStrategy;\n }\n throw invalidPipeArgumentError(AsyncPipe, obj);\n };\n AsyncPipe.prototype._dispose = function () {\n this._strategy.dispose((this._subscription));\n this._latestValue = null;\n this._latestReturnedValue = null;\n this._subscription = null;\n this._obj = null;\n };\n AsyncPipe.prototype._updateLatestValue = function (async, value) {\n if (async === this._obj) {\n this._latestValue = value;\n this._ref.markForCheck();\n }\n };\n AsyncPipe.decorators = [\n { type: Pipe, args: [{ name: 'async', pure: false },] }\n ];\n /** @nocollapse */\n AsyncPipe.ctorParameters = function () { return [\n { type: ChangeDetectorRef, },\n ]; };\n return AsyncPipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Transforms text to lowercase.\n *\n * {@example common/pipes/ts/lowerupper_pipe.ts region='LowerUpperPipe' }\n *\n *\n */\nvar LowerCasePipe = /** @class */ (function () {\n function LowerCasePipe() {\n }\n LowerCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(LowerCasePipe, value);\n }\n return value.toLowerCase();\n };\n LowerCasePipe.decorators = [\n { type: Pipe, args: [{ name: 'lowercase' },] }\n ];\n /** @nocollapse */\n LowerCasePipe.ctorParameters = function () { return []; };\n return LowerCasePipe;\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//\nvar unicodeWordMatch = /(?:[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-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]|\\uD800[\\uDC00-\\uDC0B\\uDC0D-\\uDC26\\uDC28-\\uDC3A\\uDC3C\\uDC3D\\uDC3F-\\uDC4D\\uDC50-\\uDC5D\\uDC80-\\uDCFA\\uDE80-\\uDE9C\\uDEA0-\\uDED0\\uDF00-\\uDF1F\\uDF2D-\\uDF40\\uDF42-\\uDF49\\uDF50-\\uDF75\\uDF80-\\uDF9D\\uDFA0-\\uDFC3\\uDFC8-\\uDFCF]|\\uD801[\\uDC00-\\uDC9D\\uDCB0-\\uDCD3\\uDCD8-\\uDCFB\\uDD00-\\uDD27\\uDD30-\\uDD63\\uDE00-\\uDF36\\uDF40-\\uDF55\\uDF60-\\uDF67]|\\uD802[\\uDC00-\\uDC05\\uDC08\\uDC0A-\\uDC35\\uDC37\\uDC38\\uDC3C\\uDC3F-\\uDC55\\uDC60-\\uDC76\\uDC80-\\uDC9E\\uDCE0-\\uDCF2\\uDCF4\\uDCF5\\uDD00-\\uDD15\\uDD20-\\uDD39\\uDD80-\\uDDB7\\uDDBE\\uDDBF\\uDE00\\uDE10-\\uDE13\\uDE15-\\uDE17\\uDE19-\\uDE33\\uDE60-\\uDE7C\\uDE80-\\uDE9C\\uDEC0-\\uDEC7\\uDEC9-\\uDEE4\\uDF00-\\uDF35\\uDF40-\\uDF55\\uDF60-\\uDF72\\uDF80-\\uDF91]|\\uD803[\\uDC00-\\uDC48\\uDC80-\\uDCB2\\uDCC0-\\uDCF2]|\\uD804[\\uDC03-\\uDC37\\uDC83-\\uDCAF\\uDCD0-\\uDCE8\\uDD03-\\uDD26\\uDD50-\\uDD72\\uDD76\\uDD83-\\uDDB2\\uDDC1-\\uDDC4\\uDDDA\\uDDDC\\uDE00-\\uDE11\\uDE13-\\uDE2B\\uDE80-\\uDE86\\uDE88\\uDE8A-\\uDE8D\\uDE8F-\\uDE9D\\uDE9F-\\uDEA8\\uDEB0-\\uDEDE\\uDF05-\\uDF0C\\uDF0F\\uDF10\\uDF13-\\uDF28\\uDF2A-\\uDF30\\uDF32\\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 * Transforms text to titlecase.\n *\n * The pipe splits up a text into words, capitalizes the first letter of each word and transforms\n * the rest of the word into lowercase. In this case, whitespace characters (such as \"space\", \"\\t\",\n * \"\\n\", etc) are used as word separators.\n *\n * ## Example\n * {@example common/pipes/ts/titlecase_pipe.ts region='TitleCasePipe'}\n *\n *\n */\nvar TitleCasePipe = /** @class */ (function () {\n function TitleCasePipe() {\n }\n TitleCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(TitleCasePipe, value);\n }\n return value.replace(unicodeWordMatch, (function (txt) { return txt[0].toUpperCase() + txt.substr(1).toLowerCase(); }));\n };\n TitleCasePipe.decorators = [\n { type: Pipe, args: [{ name: 'titlecase' },] }\n ];\n /** @nocollapse */\n TitleCasePipe.ctorParameters = function () { return []; };\n return TitleCasePipe;\n}());\n/**\n * Transforms text to uppercase.\n *\n *\n */\nvar UpperCasePipe = /** @class */ (function () {\n function UpperCasePipe() {\n }\n UpperCasePipe.prototype.transform = function (value) {\n if (!value)\n return value;\n if (typeof value !== 'string') {\n throw invalidPipeArgumentError(UpperCasePipe, value);\n }\n return value.toUpperCase();\n };\n UpperCasePipe.decorators = [\n { type: Pipe, args: [{ name: 'uppercase' },] }\n ];\n /** @nocollapse */\n UpperCasePipe.ctorParameters = function () { return []; };\n return UpperCasePipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 off\n/**\n * @ngModule CommonModule\n * @description\n *\n * Uses the function {@link formatDate} to format a date according to locale rules.\n *\n * The following tabled describes the formatting options.\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 *\n * When the expression is a ISO string without time (e.g. 2016-09-19) the time zone offset is not\n * applied and the formatted text will have the same day, month and year of the expression.\n *\n * WARNINGS:\n * - this pipe has only access to en-US locale data by default. If you want to localize the dates\n * in another language, you will have to import data for other locales.\n * See the {@linkDocs guide/i18n#i18n-pipes \"I18n guide\"} to know how to import additional locale\n * data.\n * - Fields suffixed with * are only available in the extra dataset.\n * See the {@linkDocs guide/i18n#i18n-pipes \"I18n guide\"} to know how to import extra locale\n * data.\n * - this pipe is marked as pure hence it will not be re-evaluated when the input is mutated.\n * Instead users should treat the date as an immutable object and change the reference when the\n * pipe needs to re-run (this is to avoid reformatting the date on every change detection run\n * which would be an expensive operation).\n *\n * ### Examples\n *\n * Assuming `dateObj` is (year: 2015, month: 6, day: 15, hour: 21, minute: 43, second: 11)\n * in the _local_ time and locale is 'en-US':\n *\n * {@example common/pipes/ts/date_pipe.ts region='DatePipe'}\n *\n *\n */\n// clang-format on\nvar DatePipe = /** @class */ (function () {\n function DatePipe(locale) {\n this.locale = locale;\n }\n /**\n * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * @param format indicates which date/time components to include. The format can be predefined as\n * shown below (all examples are given for `en-US`) or custom as shown in the table.\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).\n * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental\n * US time zone\n * abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n /**\n * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * @param format indicates which date/time components to include. The format can be predefined as\n * shown below (all examples are given for `en-US`) or custom as shown in the table.\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).\n * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental\n * US time zone\n * abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n DatePipe.prototype.transform = /**\n * @param value a date object or a number (milliseconds since UTC epoch) or an ISO string\n * (https://www.w3.org/TR/NOTE-datetime).\n * @param format indicates which date/time components to include. The format can be predefined as\n * shown below (all examples are given for `en-US`) or custom as shown in the table.\n * - `'short'`: equivalent to `'M/d/yy, h:mm a'` (e.g. `6/15/15, 9:03 AM`).\n * - `'medium'`: equivalent to `'MMM d, y, h:mm:ss a'` (e.g. `Jun 15, 2015, 9:03:01 AM`).\n * - `'long'`: equivalent to `'MMMM d, y, h:mm:ss a z'` (e.g. `June 15, 2015 at 9:03:01 AM\n * GMT+1`).\n * - `'full'`: equivalent to `'EEEE, MMMM d, y, h:mm:ss a zzzz'` (e.g. `Monday, June 15, 2015 at\n * 9:03:01 AM GMT+01:00`).\n * - `'shortDate'`: equivalent to `'M/d/yy'` (e.g. `6/15/15`).\n * - `'mediumDate'`: equivalent to `'MMM d, y'` (e.g. `Jun 15, 2015`).\n * - `'longDate'`: equivalent to `'MMMM d, y'` (e.g. `June 15, 2015`).\n * - `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` (e.g. `Monday, June 15, 2015`).\n * - `'shortTime'`: equivalent to `'h:mm a'` (e.g. `9:03 AM`).\n * - `'mediumTime'`: equivalent to `'h:mm:ss a'` (e.g. `9:03:01 AM`).\n * - `'longTime'`: equivalent to `'h:mm:ss a z'` (e.g. `9:03:01 AM GMT+1`).\n * - `'fullTime'`: equivalent to `'h:mm:ss a zzzz'` (e.g. `9:03:01 AM GMT+01:00`).\n * @param timezone to be used for formatting the time. It understands UTC/GMT and the continental\n * US time zone\n * abbreviations, but for general use, use a time zone offset (e.g. `'+0430'`).\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n function (value, format, timezone, locale) {\n if (format === void 0) { format = 'mediumDate'; }\n if (value == null || value === '' || value !== value)\n return null;\n try {\n return formatDate(value, format, locale || this.locale, timezone);\n }\n catch (error) {\n throw invalidPipeArgumentError(DatePipe, error.message);\n }\n };\n DatePipe.decorators = [\n { type: Pipe, args: [{ name: 'date', pure: true },] }\n ];\n /** @nocollapse */\n DatePipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DatePipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _INTERPOLATION_REGEXP = /#/g;\n/**\n * @ngModule CommonModule\n * @description\n *\n * Maps a value to a string that pluralizes the value according to locale rules.\n *\n * ## Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nPluralPipeComponent'}\n *\n * @experimental\n */\nvar I18nPluralPipe = /** @class */ (function () {\n function I18nPluralPipe(_localization) {\n this._localization = _localization;\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 /**\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 I18nPluralPipe.prototype.transform = /**\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 function (value, pluralMap, locale) {\n if (value == null)\n return '';\n if (typeof pluralMap !== 'object' || pluralMap === null) {\n throw invalidPipeArgumentError(I18nPluralPipe, pluralMap);\n }\n var key = getPluralCategory(value, Object.keys(pluralMap), this._localization, locale);\n return pluralMap[key].replace(_INTERPOLATION_REGEXP, value.toString());\n };\n I18nPluralPipe.decorators = [\n { type: Pipe, args: [{ name: 'i18nPlural', pure: true },] }\n ];\n /** @nocollapse */\n I18nPluralPipe.ctorParameters = function () { return [\n { type: NgLocalization, },\n ]; };\n return I18nPluralPipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @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 * ## Example\n *\n * {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}\n *\n * @experimental\n */\nvar I18nSelectPipe = /** @class */ (function () {\n function I18nSelectPipe() {\n }\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 /**\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 I18nSelectPipe.prototype.transform = /**\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 function (value, mapping) {\n if (value == null)\n return '';\n if (typeof mapping !== 'object' || typeof value !== 'string') {\n throw invalidPipeArgumentError(I18nSelectPipe, mapping);\n }\n if (mapping.hasOwnProperty(value)) {\n return mapping[value];\n }\n if (mapping.hasOwnProperty('other')) {\n return mapping['other'];\n }\n return '';\n };\n I18nSelectPipe.decorators = [\n { type: Pipe, args: [{ name: 'i18nSelect', pure: true },] }\n ];\n /** @nocollapse */\n I18nSelectPipe.ctorParameters = function () { return []; };\n return I18nSelectPipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @ngModule CommonModule\n * @description\n *\n * Converts value into string using `JSON.stringify`. Useful for debugging.\n *\n * ### Example\n * {@example common/pipes/ts/json_pipe.ts region='JsonPipe'}\n *\n *\n */\nvar JsonPipe = /** @class */ (function () {\n function JsonPipe() {\n }\n JsonPipe.prototype.transform = function (value) { return JSON.stringify(value, null, 2); };\n JsonPipe.decorators = [\n { type: Pipe, args: [{ name: 'json', pure: false },] }\n ];\n /** @nocollapse */\n JsonPipe.ctorParameters = function () { return []; };\n return JsonPipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @ngModule CommonModule\n * @description\n *\n * Uses the function {@link formatNumber} to format a number according to locale rules.\n *\n * Formats a number as text. Group sizing and separator and other locale-specific\n * configurations are based on the locale.\n *\n * ### Example\n *\n * {@example common/pipes/ts/number_pipe.ts region='NumberPipe'}\n *\n *\n */\nvar DecimalPipe = /** @class */ (function () {\n function DecimalPipe(_locale) {\n this._locale = _locale;\n }\n /**\n * @param value a number to be formatted.\n * @param digitsInfo a `string` which has a following format: <br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.\n * - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to\n * `0`.\n * - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to\n * `3`.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n /**\n * @param value a number to be formatted.\n * @param digitsInfo a `string` which has a following format: <br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.\n * - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to\n * `0`.\n * - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to\n * `3`.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n DecimalPipe.prototype.transform = /**\n * @param value a number to be formatted.\n * @param digitsInfo a `string` which has a following format: <br>\n * <code>{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}</code>.\n * - `minIntegerDigits` is the minimum number of integer digits to use. Defaults to `1`.\n * - `minFractionDigits` is the minimum number of digits after the decimal point. Defaults to\n * `0`.\n * - `maxFractionDigits` is the maximum number of digits after the decimal point. Defaults to\n * `3`.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n function (value, digitsInfo, locale) {\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n try {\n var num = strToNumber(value);\n return formatNumber(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(DecimalPipe, error.message);\n }\n };\n DecimalPipe.decorators = [\n { type: Pipe, args: [{ name: 'number' },] }\n ];\n /** @nocollapse */\n DecimalPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return DecimalPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Uses the function {@link formatPercent} to format a number as a percentage according\n * to locale rules.\n *\n * ### Example\n *\n * {@example common/pipes/ts/percent_pipe.ts region='PercentPipe'}\n *\n *\n */\nvar PercentPipe = /** @class */ (function () {\n function PercentPipe(_locale) {\n this._locale = _locale;\n }\n /**\n *\n * @param value a number to be formatted as a percentage.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n /**\n *\n * @param value a number to be formatted as a percentage.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n PercentPipe.prototype.transform = /**\n *\n * @param value a number to be formatted as a percentage.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n function (value, digitsInfo, locale) {\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n try {\n var num = strToNumber(value);\n return formatPercent(num, locale, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(PercentPipe, error.message);\n }\n };\n PercentPipe.decorators = [\n { type: Pipe, args: [{ name: 'percent' },] }\n ];\n /** @nocollapse */\n PercentPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return PercentPipe;\n}());\n/**\n * @ngModule CommonModule\n * @description\n *\n * Uses the functions {@link getCurrencySymbol} and {@link formatCurrency} to format a\n * number as currency using locale rules.\n *\n * ### Example\n *\n * {@example common/pipes/ts/currency_pipe.ts region='CurrencyPipe'}\n *\n *\n */\nvar CurrencyPipe = /** @class */ (function () {\n function CurrencyPipe(_locale) {\n this._locale = _locale;\n }\n /**\n *\n * @param value a number to be formatted as currency.\n * @param currencyCodeis 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.\n * @param display indicates whether to show the currency symbol, the code or a custom value:\n * - `code`: use code (e.g. `USD`).\n * - `symbol`(default): use symbol (e.g. `$`).\n * - `symbol-narrow`: some countries have two symbols for their currency, one regular and one\n * narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).\n * - `string`: use this value instead of a code or a symbol.\n * - boolean (deprecated from v5): `true` for symbol and false for `code`.\n * If there is no narrow symbol for the chosen currency, the regular symbol will be used.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n /**\n *\n * @param value a number to be formatted as currency.\n * @param currencyCodeis 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.\n * @param display indicates whether to show the currency symbol, the code or a custom value:\n * - `code`: use code (e.g. `USD`).\n * - `symbol`(default): use symbol (e.g. `$`).\n * - `symbol-narrow`: some countries have two symbols for their currency, one regular and one\n * narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).\n * - `string`: use this value instead of a code or a symbol.\n * - boolean (deprecated from v5): `true` for symbol and false for `code`.\n * If there is no narrow symbol for the chosen currency, the regular symbol will be used.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n CurrencyPipe.prototype.transform = /**\n *\n * @param value a number to be formatted as currency.\n * @param currencyCodeis 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.\n * @param display indicates whether to show the currency symbol, the code or a custom value:\n * - `code`: use code (e.g. `USD`).\n * - `symbol`(default): use symbol (e.g. `$`).\n * - `symbol-narrow`: some countries have two symbols for their currency, one regular and one\n * narrow (e.g. the canadian dollar CAD has the symbol `CA$` and the symbol-narrow `$`).\n * - `string`: use this value instead of a code or a symbol.\n * - boolean (deprecated from v5): `true` for symbol and false for `code`.\n * If there is no narrow symbol for the chosen currency, the regular symbol will be used.\n * @param digitsInfo see {@link DecimalPipe} for more details.\n * @param locale a `string` defining the locale to use (uses the current {@link LOCALE_ID} by\n * default).\n */\n function (value, currencyCode, display, digitsInfo, locale) {\n if (display === void 0) { display = 'symbol'; }\n if (isEmpty(value))\n return null;\n locale = locale || this._locale;\n if (typeof display === 'boolean') {\n if (console && console.warn) {\n console.warn(\"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 var currency = currencyCode || 'USD';\n if (display !== 'code') {\n if (display === 'symbol' || display === 'symbol-narrow') {\n currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow', locale);\n }\n else {\n currency = display;\n }\n }\n try {\n var num = strToNumber(value);\n return formatCurrency(num, locale, currency, currencyCode, digitsInfo);\n }\n catch (error) {\n throw invalidPipeArgumentError(CurrencyPipe, error.message);\n }\n };\n CurrencyPipe.decorators = [\n { type: Pipe, args: [{ name: 'currency' },] }\n ];\n /** @nocollapse */\n CurrencyPipe.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [LOCALE_ID,] },] },\n ]; };\n return CurrencyPipe;\n}());\nfunction isEmpty(value) {\n return value == null || value === '' || value !== value;\n}\n/**\n * Transforms a string into a number (if needed)\n */\nfunction strToNumber(value) {\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @ngModule CommonModule\n * @description\n *\n * Creates a new `Array` or `String` containing a subset (slice) of the elements.\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 * <li>b</li>\n * <li>c</li>\n *\n * ## String Examples\n *\n * {@example common/pipes/ts/slice_pipe.ts region='SlicePipe_string'}\n *\n *\n */\nvar SlicePipe = /** @class */ (function () {\n function SlicePipe() {\n }\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 /**\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 SlicePipe.prototype.transform = /**\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 function (value, start, end) {\n if (value == null)\n return value;\n if (!this.supports(value)) {\n throw invalidPipeArgumentError(SlicePipe, value);\n }\n return value.slice(start, end);\n };\n SlicePipe.prototype.supports = function (obj) { return typeof obj === 'string' || Array.isArray(obj); };\n SlicePipe.decorators = [\n { type: Pipe, args: [{ name: 'slice', pure: false },] }\n ];\n /** @nocollapse */\n SlicePipe.ctorParameters = function () { return []; };\n return SlicePipe;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 collection of Angular pipes that are likely to be used in each and every application.\n */\nvar 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];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 does not contain the location providers,\n// as they need some platform specific implementations to work.\n/**\n * The module that includes all the basic Angular directives like {@link NgIf}, {@link NgForOf}, ...\n *\n *\n */\nvar CommonModule = /** @class */ (function () {\n function CommonModule() {\n }\n CommonModule.decorators = [\n { type: NgModule, args: [{\n declarations: [COMMON_DIRECTIVES, COMMON_PIPES],\n exports: [COMMON_DIRECTIVES, COMMON_PIPES],\n providers: [\n { provide: NgLocalization, useClass: NgLocaleLocalization },\n ],\n },] }\n ];\n /** @nocollapse */\n CommonModule.ctorParameters = function () { return []; };\n return CommonModule;\n}());\nvar ɵ0 = getPluralCase;\n/**\n * A module that contains the deprecated i18n pipes.\n *\n * @deprecated from v5\n */\nvar DeprecatedI18NPipesModule = /** @class */ (function () {\n function DeprecatedI18NPipesModule() {\n }\n DeprecatedI18NPipesModule.decorators = [\n { type: NgModule, args: [{\n declarations: [COMMON_DEPRECATED_I18N_PIPES],\n exports: [COMMON_DEPRECATED_I18N_PIPES],\n providers: [{ provide: DEPRECATED_PLURAL_FN, useValue: ɵ0 }],\n },] }\n ];\n /** @nocollapse */\n DeprecatedI18NPipesModule.ctorParameters = function () { return []; };\n return DeprecatedI18NPipesModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 into a Web Worker).\n *\n *\n */\nvar DOCUMENT = new InjectionToken('DocumentToken');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 PLATFORM_BROWSER_ID = 'browser';\nvar PLATFORM_SERVER_ID = 'server';\nvar PLATFORM_WORKER_APP_ID = 'browserWorkerApp';\nvar PLATFORM_WORKER_UI_ID = 'browserWorkerUi';\n/**\n * Returns whether a platform id represents a browser platform.\n * @experimental\n */\nfunction isPlatformBrowser(platformId) {\n return platformId === PLATFORM_BROWSER_ID;\n}\n/**\n * Returns whether a platform id represents a server platform.\n * @experimental\n */\nfunction isPlatformServer(platformId) {\n return platformId === PLATFORM_SERVER_ID;\n}\n/**\n * Returns whether a platform id represents a web worker app platform.\n * @experimental\n */\nfunction isPlatformWorkerApp(platformId) {\n return platformId === PLATFORM_WORKER_APP_ID;\n}\n/**\n * Returns whether a platform id represents a web worker UI platform.\n * @experimental\n */\nfunction isPlatformWorkerUi(platformId) {\n return platformId === PLATFORM_WORKER_UI_ID;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { COMMON_DIRECTIVES as ɵangular_packages_common_common_e, findLocaleData as ɵangular_packages_common_common_d, DEPRECATED_PLURAL_FN as ɵangular_packages_common_common_a, getPluralCase as ɵangular_packages_common_common_b, COMMON_DEPRECATED_I18N_PIPES as ɵangular_packages_common_common_g, COMMON_PIPES as ɵangular_packages_common_common_f, registerLocaleData as ɵregisterLocaleData, formatDate, formatCurrency, formatNumber, formatPercent, NgLocaleLocalization, NgLocalization, registerLocaleData, Plural, NumberFormatStyle, FormStyle, TranslationWidth, FormatWidth, NumberSymbol, WeekDay, getNumberOfCurrencyDigits, getCurrencySymbol, getLocaleDayPeriods, getLocaleDayNames, getLocaleMonthNames, getLocaleId, getLocaleEraNames, getLocaleWeekEndRange, getLocaleFirstDayOfWeek, getLocaleDateFormat, getLocaleDateTimeFormat, getLocaleExtraDayPeriodRules, getLocaleExtraDayPeriods, getLocalePluralCase, getLocaleTimeFormat, getLocaleNumberSymbol, getLocaleNumberFormat, getLocaleCurrencyName, getLocaleCurrencySymbol, parseCookieValue as ɵparseCookieValue, CommonModule, DeprecatedI18NPipesModule, NgClass, NgForOf, NgForOfContext, NgIf, NgIfContext, NgPlural, NgPluralCase, NgStyle, NgSwitch, NgSwitchCase, NgSwitchDefault, NgTemplateOutlet, NgComponentOutlet, DOCUMENT, AsyncPipe, DatePipe, I18nPluralPipe, I18nSelectPipe, JsonPipe, LowerCasePipe, CurrencyPipe, DecimalPipe, PercentPipe, SlicePipe, UpperCasePipe, TitleCasePipe, DeprecatedDatePipe, DeprecatedCurrencyPipe, DeprecatedDecimalPipe, DeprecatedPercentPipe, 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, VERSION, PlatformLocation, LOCATION_INITIALIZED, LocationStrategy, APP_BASE_HREF, HashLocationStrategy, PathLocationStrategy, Location };\n//# sourceMappingURL=common.js.map\n","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { Inject, Injectable, InjectionToken, Injector, NgModule, PLATFORM_ID } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { concatMap, filter, map } from 'rxjs/operators';\nimport { __extends, __read, __spread } from 'tslib';\nimport { DOCUMENT, ɵparseCookieValue } from '@angular/common';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Transforms an `HttpRequest` into a stream of `HttpEvent`s, one of which will likely be a\n * `HttpResponse`.\n *\n * `HttpHandler` is injectable. When injected, the handler instance dispatches requests to the\n * first interceptor in the chain, which dispatches to the second, etc, eventually reaching the\n * `HttpBackend`.\n *\n * In an `HttpInterceptor`, the `HttpHandler` parameter is the next interceptor in the chain.\n *\n *\n */\nvar HttpHandler = /** @class */ (function () {\n function HttpHandler() {\n }\n return HttpHandler;\n}());\n/**\n * A final `HttpHandler` which will dispatch the request via browser HTTP APIs to a backend.\n *\n * Interceptors sit between the `HttpClient` interface and the `HttpBackend`.\n *\n * When injected, `HttpBackend` dispatches requests directly to the backend, without going\n * through the interceptor chain.\n *\n *\n */\nvar HttpBackend = /** @class */ (function () {\n function HttpBackend() {\n }\n return HttpBackend;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Immutable set of Http headers, with lazy parsing.\n *\n */\nvar HttpHeaders = /** @class */ (function () {\n function HttpHeaders(headers) {\n var _this = this;\n /**\n * Internal map of lowercased header names to the normalized\n * form of the name (the form seen first).\n */\n this.normalizedNames = new Map();\n /**\n * Queued updates to be materialized the next initialization.\n */\n this.lazyUpdate = null;\n if (!headers) {\n this.headers = new Map();\n }\n else if (typeof headers === 'string') {\n this.lazyInit = function () {\n _this.headers = new Map();\n headers.split('\\n').forEach(function (line) {\n var index = line.indexOf(':');\n if (index > 0) {\n var name_1 = line.slice(0, index);\n var key = name_1.toLowerCase();\n var value = line.slice(index + 1).trim();\n _this.maybeSetNormalizedName(name_1, key);\n if (_this.headers.has(key)) {\n _this.headers.get(key).push(value);\n }\n else {\n _this.headers.set(key, [value]);\n }\n }\n });\n };\n }\n else {\n this.lazyInit = function () {\n _this.headers = new Map();\n Object.keys(headers).forEach(function (name) {\n var values = headers[name];\n var key = name.toLowerCase();\n if (typeof values === 'string') {\n values = [values];\n }\n if (values.length > 0) {\n _this.headers.set(key, values);\n _this.maybeSetNormalizedName(name, key);\n }\n });\n };\n }\n }\n /**\n * Checks for existence of header by given name.\n */\n /**\n * Checks for existence of header by given name.\n */\n HttpHeaders.prototype.has = /**\n * Checks for existence of header by given name.\n */\n function (name) {\n this.init();\n return this.headers.has(name.toLowerCase());\n };\n /**\n * Returns first header that matches given name.\n */\n /**\n * Returns first header that matches given name.\n */\n HttpHeaders.prototype.get = /**\n * Returns first header that matches given name.\n */\n function (name) {\n this.init();\n var values = this.headers.get(name.toLowerCase());\n return values && values.length > 0 ? values[0] : null;\n };\n /**\n * Returns the names of the headers\n */\n /**\n * Returns the names of the headers\n */\n HttpHeaders.prototype.keys = /**\n * Returns the names of the headers\n */\n function () {\n this.init();\n return Array.from(this.normalizedNames.values());\n };\n /**\n * Returns list of header values for a given name.\n */\n /**\n * Returns list of header values for a given name.\n */\n HttpHeaders.prototype.getAll = /**\n * Returns list of header values for a given name.\n */\n function (name) {\n this.init();\n return this.headers.get(name.toLowerCase()) || null;\n };\n HttpHeaders.prototype.append = function (name, value) {\n return this.clone({ name: name, value: value, op: 'a' });\n };\n HttpHeaders.prototype.set = function (name, value) {\n return this.clone({ name: name, value: value, op: 's' });\n };\n HttpHeaders.prototype.delete = function (name, value) {\n return this.clone({ name: name, value: value, op: 'd' });\n };\n HttpHeaders.prototype.maybeSetNormalizedName = function (name, lcName) {\n if (!this.normalizedNames.has(lcName)) {\n this.normalizedNames.set(lcName, name);\n }\n };\n HttpHeaders.prototype.init = function () {\n var _this = this;\n if (!!this.lazyInit) {\n if (this.lazyInit instanceof HttpHeaders) {\n this.copyFrom(this.lazyInit);\n }\n else {\n this.lazyInit();\n }\n this.lazyInit = null;\n if (!!this.lazyUpdate) {\n this.lazyUpdate.forEach(function (update) { return _this.applyUpdate(update); });\n this.lazyUpdate = null;\n }\n }\n };\n HttpHeaders.prototype.copyFrom = function (other) {\n var _this = this;\n other.init();\n Array.from(other.headers.keys()).forEach(function (key) {\n _this.headers.set(key, (other.headers.get(key)));\n _this.normalizedNames.set(key, (other.normalizedNames.get(key)));\n });\n };\n HttpHeaders.prototype.clone = function (update) {\n var clone = new HttpHeaders();\n clone.lazyInit =\n (!!this.lazyInit && this.lazyInit instanceof HttpHeaders) ? this.lazyInit : this;\n clone.lazyUpdate = (this.lazyUpdate || []).concat([update]);\n return clone;\n };\n HttpHeaders.prototype.applyUpdate = function (update) {\n var key = update.name.toLowerCase();\n switch (update.op) {\n case 'a':\n case 's':\n var value = (update.value);\n if (typeof value === 'string') {\n value = [value];\n }\n if (value.length === 0) {\n return;\n }\n this.maybeSetNormalizedName(update.name, key);\n var base = (update.op === 'a' ? this.headers.get(key) : undefined) || [];\n base.push.apply(base, __spread(value));\n this.headers.set(key, base);\n break;\n case 'd':\n var toDelete_1 = update.value;\n if (!toDelete_1) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n var existing = this.headers.get(key);\n if (!existing) {\n return;\n }\n existing = existing.filter(function (value) { return toDelete_1.indexOf(value) === -1; });\n if (existing.length === 0) {\n this.headers.delete(key);\n this.normalizedNames.delete(key);\n }\n else {\n this.headers.set(key, existing);\n }\n }\n break;\n }\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n HttpHeaders.prototype.forEach = /**\n * @internal\n */\n function (fn) {\n var _this = this;\n this.init();\n Array.from(this.normalizedNames.keys())\n .forEach(function (key) { return fn((_this.normalizedNames.get(key)), (_this.headers.get(key))); });\n };\n return HttpHeaders;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to\n * serialize and parse URL parameter keys and values.\n *\n *\n */\nvar HttpUrlEncodingCodec = /** @class */ (function () {\n function HttpUrlEncodingCodec() {\n }\n HttpUrlEncodingCodec.prototype.encodeKey = function (k) { return standardEncoding(k); };\n HttpUrlEncodingCodec.prototype.encodeValue = function (v) { return standardEncoding(v); };\n HttpUrlEncodingCodec.prototype.decodeKey = function (k) { return decodeURIComponent(k); };\n HttpUrlEncodingCodec.prototype.decodeValue = function (v) { return decodeURIComponent(v); };\n return HttpUrlEncodingCodec;\n}());\nfunction paramParser(rawParams, codec) {\n var map$$1 = new Map();\n if (rawParams.length > 0) {\n var params = rawParams.split('&');\n params.forEach(function (param) {\n var eqIdx = param.indexOf('=');\n var _a = __read(eqIdx == -1 ?\n [codec.decodeKey(param), ''] :\n [codec.decodeKey(param.slice(0, eqIdx)), codec.decodeValue(param.slice(eqIdx + 1))], 2), key = _a[0], val = _a[1];\n var list = map$$1.get(key) || [];\n list.push(val);\n map$$1.set(key, list);\n });\n }\n return map$$1;\n}\nfunction standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n}\n/**\n * An HTTP request/response body that represents serialized parameters,\n * per the MIME type `application/x-www-form-urlencoded`.\n *\n * This class is immutable - all mutation operations return a new instance.\n *\n *\n */\nvar HttpParams = /** @class */ (function () {\n function HttpParams(options) {\n if (options === void 0) { options = {}; }\n var _this = this;\n this.updates = null;\n this.cloneFrom = null;\n this.encoder = options.encoder || new HttpUrlEncodingCodec();\n if (!!options.fromString) {\n if (!!options.fromObject) {\n throw new Error(\"Cannot specify both fromString and fromObject.\");\n }\n this.map = paramParser(options.fromString, this.encoder);\n }\n else if (!!options.fromObject) {\n this.map = new Map();\n Object.keys(options.fromObject).forEach(function (key) {\n var value = options.fromObject[key];\n _this.map.set(key, Array.isArray(value) ? value : [value]);\n });\n }\n else {\n this.map = null;\n }\n }\n /**\n * Check whether the body has one or more values for the given parameter name.\n */\n /**\n * Check whether the body has one or more values for the given parameter name.\n */\n HttpParams.prototype.has = /**\n * Check whether the body has one or more values for the given parameter name.\n */\n function (param) {\n this.init();\n return this.map.has(param);\n };\n /**\n * Get the first value for the given parameter name, or `null` if it's not present.\n */\n /**\n * Get the first value for the given parameter name, or `null` if it's not present.\n */\n HttpParams.prototype.get = /**\n * Get the first value for the given parameter name, or `null` if it's not present.\n */\n function (param) {\n this.init();\n var res = this.map.get(param);\n return !!res ? res[0] : null;\n };\n /**\n * Get all values for the given parameter name, or `null` if it's not present.\n */\n /**\n * Get all values for the given parameter name, or `null` if it's not present.\n */\n HttpParams.prototype.getAll = /**\n * Get all values for the given parameter name, or `null` if it's not present.\n */\n function (param) {\n this.init();\n return this.map.get(param) || null;\n };\n /**\n * Get all the parameter names for this body.\n */\n /**\n * Get all the parameter names for this body.\n */\n HttpParams.prototype.keys = /**\n * Get all the parameter names for this body.\n */\n function () {\n this.init();\n return Array.from(this.map.keys());\n };\n /**\n * Construct a new body with an appended value for the given parameter name.\n */\n /**\n * Construct a new body with an appended value for the given parameter name.\n */\n HttpParams.prototype.append = /**\n * Construct a new body with an appended value for the given parameter name.\n */\n function (param, value) { return this.clone({ param: param, value: value, op: 'a' }); };\n /**\n * Construct a new body with a new value for the given parameter name.\n */\n /**\n * Construct a new body with a new value for the given parameter name.\n */\n HttpParams.prototype.set = /**\n * Construct a new body with a new value for the given parameter name.\n */\n function (param, value) { return this.clone({ param: param, value: value, op: 's' }); };\n /**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n */\n /**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n */\n HttpParams.prototype.delete = /**\n * Construct a new body with either the given value for the given parameter\n * removed, if a value is given, or all values for the given parameter removed\n * if not.\n */\n function (param, value) { return this.clone({ param: param, value: value, op: 'd' }); };\n /**\n * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n /**\n * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n HttpParams.prototype.toString = /**\n * Serialize the body to an encoded string, where key-value pairs (separated by `=`) are\n * separated by `&`s.\n */\n function () {\n var _this = this;\n this.init();\n return this.keys()\n .map(function (key) {\n var eKey = _this.encoder.encodeKey(key);\n return _this.map.get(key).map(function (value) { return eKey + '=' + _this.encoder.encodeValue(value); })\n .join('&');\n })\n .join('&');\n };\n HttpParams.prototype.clone = function (update) {\n var clone = new HttpParams({ encoder: this.encoder });\n clone.cloneFrom = this.cloneFrom || this;\n clone.updates = (this.updates || []).concat([update]);\n return clone;\n };\n HttpParams.prototype.init = function () {\n var _this = this;\n if (this.map === null) {\n this.map = new Map();\n }\n if (this.cloneFrom !== null) {\n this.cloneFrom.init();\n this.cloneFrom.keys().forEach(function (key) { return _this.map.set(key, (_this.cloneFrom.map.get(key))); });\n this.updates.forEach(function (update) {\n switch (update.op) {\n case 'a':\n case 's':\n var base = (update.op === 'a' ? _this.map.get(update.param) : undefined) || [];\n base.push((update.value));\n _this.map.set(update.param, base);\n break;\n case 'd':\n if (update.value !== undefined) {\n var base_1 = _this.map.get(update.param) || [];\n var idx = base_1.indexOf(update.value);\n if (idx !== -1) {\n base_1.splice(idx, 1);\n }\n if (base_1.length > 0) {\n _this.map.set(update.param, base_1);\n }\n else {\n _this.map.delete(update.param);\n }\n }\n else {\n _this.map.delete(update.param);\n break;\n }\n }\n });\n this.cloneFrom = null;\n }\n };\n return HttpParams;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 whether the given HTTP method may include a body.\n */\nfunction mightHaveBody(method) {\n switch (method) {\n case 'DELETE':\n case 'GET':\n case 'HEAD':\n case 'OPTIONS':\n case 'JSONP':\n return false;\n default:\n return true;\n }\n}\n/**\n * Safely assert whether the given value is an ArrayBuffer.\n *\n * In some execution environments ArrayBuffer is not defined.\n */\nfunction isArrayBuffer(value) {\n return typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer;\n}\n/**\n * Safely assert whether the given value is a Blob.\n *\n * In some execution environments Blob is not defined.\n */\nfunction isBlob(value) {\n return typeof Blob !== 'undefined' && value instanceof Blob;\n}\n/**\n * Safely assert whether the given value is a FormData instance.\n *\n * In some execution environments FormData is not defined.\n */\nfunction isFormData(value) {\n return typeof FormData !== 'undefined' && value instanceof FormData;\n}\n/**\n * An outgoing HTTP request with an optional typed body.\n *\n * `HttpRequest` represents an outgoing request, including URL, method,\n * headers, body, and other request configuration options. Instances should be\n * assumed to be immutable. To modify a `HttpRequest`, the `clone`\n * method should be used.\n *\n *\n */\nvar HttpRequest = /** @class */ (function () {\n function HttpRequest(method, url, third, fourth) {\n this.url = url;\n /**\n * The request body, or `null` if one isn't set.\n *\n * Bodies are not enforced to be immutable, as they can include a reference to any\n * user-defined data type. However, interceptors should take care to preserve\n * idempotence by treating them as such.\n */\n this.body = null;\n /**\n * Whether this request should be made in a way that exposes progress events.\n *\n * Progress events are expensive (change detection runs on each event) and so\n * they should only be requested if the consumer intends to monitor them.\n */\n this.reportProgress = false;\n /**\n * Whether this request should be sent with outgoing credentials (cookies).\n */\n this.withCredentials = false;\n /**\n * The expected response type of the server.\n *\n * This is used to parse the response appropriately before returning it to\n * the requestee.\n */\n this.responseType = 'json';\n this.method = method.toUpperCase();\n // Next, need to figure out which argument holds the HttpRequestInit\n // options, if any.\n var options;\n // Check whether a body argument is expected. The only valid way to omit\n // the body argument is to use a known no-body method like GET.\n if (mightHaveBody(this.method) || !!fourth) {\n // Body is the third argument, options are the fourth.\n this.body = (third !== undefined) ? third : null;\n options = fourth;\n }\n else {\n // No body required, options are the third argument. The body stays null.\n options = third;\n }\n // If options have been passed, interpret them.\n if (options) {\n // Normalize reportProgress and withCredentials.\n this.reportProgress = !!options.reportProgress;\n this.withCredentials = !!options.withCredentials;\n // Override default response type of 'json' if one is provided.\n if (!!options.responseType) {\n this.responseType = options.responseType;\n }\n // Override headers if they're provided.\n if (!!options.headers) {\n this.headers = options.headers;\n }\n if (!!options.params) {\n this.params = options.params;\n }\n }\n // If no headers have been passed in, construct a new HttpHeaders instance.\n if (!this.headers) {\n this.headers = new HttpHeaders();\n }\n // If no parameters have been passed in, construct a new HttpUrlEncodedParams instance.\n if (!this.params) {\n this.params = new HttpParams();\n this.urlWithParams = url;\n }\n else {\n // Encode the parameters to a string in preparation for inclusion in the URL.\n var params = this.params.toString();\n if (params.length === 0) {\n // No parameters, the visible URL is just the URL given at creation time.\n this.urlWithParams = url;\n }\n else {\n // Does the URL already have query parameters? Look for '?'.\n var qIdx = url.indexOf('?');\n // There are 3 cases to handle:\n // 1) No existing parameters -> append '?' followed by params.\n // 2) '?' exists and is followed by existing query string ->\n // append '&' followed by params.\n // 3) '?' exists at the end of the url -> append params directly.\n // This basically amounts to determining the character, if any, with\n // which to join the URL and parameters.\n var sep = qIdx === -1 ? '?' : (qIdx < url.length - 1 ? '&' : '');\n this.urlWithParams = url + sep + params;\n }\n }\n }\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n HttpRequest.prototype.serializeBody = /**\n * Transform the free-form body into a serialized format suitable for\n * transmission to the server.\n */\n function () {\n // If no body is present, no need to serialize it.\n if (this.body === null) {\n return null;\n }\n // Check whether the body is already in a serialized form. If so,\n // it can just be returned directly.\n if (isArrayBuffer(this.body) || isBlob(this.body) || isFormData(this.body) ||\n typeof this.body === 'string') {\n return this.body;\n }\n // Check whether the body is an instance of HttpUrlEncodedParams.\n if (this.body instanceof HttpParams) {\n return this.body.toString();\n }\n // Check whether the body is an object or array, and serialize with JSON if so.\n if (typeof this.body === 'object' || typeof this.body === 'boolean' ||\n Array.isArray(this.body)) {\n return JSON.stringify(this.body);\n }\n // Fall back on toString() for everything else.\n return this.body.toString();\n };\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n HttpRequest.prototype.detectContentTypeHeader = /**\n * Examine the body and attempt to infer an appropriate MIME type\n * for it.\n *\n * If no such type can be inferred, this method will return `null`.\n */\n function () {\n // An empty body has no content type.\n if (this.body === null) {\n return null;\n }\n // FormData bodies rely on the browser's content type assignment.\n if (isFormData(this.body)) {\n return null;\n }\n // Blobs usually have their own content type. If it doesn't, then\n // no type can be inferred.\n if (isBlob(this.body)) {\n return this.body.type || null;\n }\n // Array buffers have unknown contents and thus no type can be inferred.\n if (isArrayBuffer(this.body)) {\n return null;\n }\n // Technically, strings could be a form of JSON data, but it's safe enough\n // to assume they're plain strings.\n if (typeof this.body === 'string') {\n return 'text/plain';\n }\n // `HttpUrlEncodedParams` has its own content-type.\n if (this.body instanceof HttpParams) {\n return 'application/x-www-form-urlencoded;charset=UTF-8';\n }\n // Arrays, objects, and numbers will be encoded as JSON.\n if (typeof this.body === 'object' || typeof this.body === 'number' ||\n Array.isArray(this.body)) {\n return 'application/json';\n }\n // No type could be inferred.\n return null;\n };\n HttpRequest.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n // For method, url, and responseType, take the current value unless\n // it is overridden in the update hash.\n var method = update.method || this.method;\n var url = update.url || this.url;\n var responseType = update.responseType || this.responseType;\n // The body is somewhat special - a `null` value in update.body means\n // whatever current body is present is being overridden with an empty\n // body, whereas an `undefined` value in update.body implies no\n // override.\n var body = (update.body !== undefined) ? update.body : this.body;\n // Carefully handle the boolean options to differentiate between\n // `false` and `undefined` in the update args.\n var withCredentials = (update.withCredentials !== undefined) ? update.withCredentials : this.withCredentials;\n var reportProgress = (update.reportProgress !== undefined) ? update.reportProgress : this.reportProgress;\n // Headers and params may be appended to if `setHeaders` or\n // `setParams` are used.\n var headers = update.headers || this.headers;\n var params = update.params || this.params;\n // Check whether the caller has asked to add headers.\n if (update.setHeaders !== undefined) {\n // Set every requested header.\n headers =\n Object.keys(update.setHeaders)\n .reduce(function (headers, name) { return headers.set(name, update.setHeaders[name]); }, headers);\n }\n // Check whether the caller has asked to set params.\n if (update.setParams) {\n // Set every requested param.\n params = Object.keys(update.setParams)\n .reduce(function (params, param) { return params.set(param, update.setParams[param]); }, params);\n }\n // Finally, construct the new HttpRequest using the pieces from above.\n return new HttpRequest(method, url, body, {\n params: params, headers: headers, reportProgress: reportProgress, responseType: responseType, withCredentials: withCredentials,\n });\n };\n return HttpRequest;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Type enumeration for the different kinds of `HttpEvent`.\n *\n *\n */\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n *\n */\nvar HttpEventType;\n/**\n * Type enumeration for the different kinds of `HttpEvent`.\n *\n *\n */\n(function (HttpEventType) {\n /**\n * The request was sent out over the wire.\n */\n HttpEventType[HttpEventType[\"Sent\"] = 0] = \"Sent\";\n /**\n * An upload progress event was received.\n */\n HttpEventType[HttpEventType[\"UploadProgress\"] = 1] = \"UploadProgress\";\n /**\n * The response status code and headers were received.\n */\n HttpEventType[HttpEventType[\"ResponseHeader\"] = 2] = \"ResponseHeader\";\n /**\n * A download progress event was received.\n */\n HttpEventType[HttpEventType[\"DownloadProgress\"] = 3] = \"DownloadProgress\";\n /**\n * The full response including the body was received.\n */\n HttpEventType[HttpEventType[\"Response\"] = 4] = \"Response\";\n /**\n * A custom event from an interceptor or a backend.\n */\n HttpEventType[HttpEventType[\"User\"] = 5] = \"User\";\n})(HttpEventType || (HttpEventType = {}));\n/**\n * Base class for both `HttpResponse` and `HttpHeaderResponse`.\n *\n *\n */\nvar HttpResponseBase = /** @class */ (function () {\n /**\n * Super-constructor for all responses.\n *\n * The single parameter accepted is an initialization hash. Any properties\n * of the response passed there will override the default values.\n */\n function HttpResponseBase(init, defaultStatus, defaultStatusText) {\n if (defaultStatus === void 0) { defaultStatus = 200; }\n if (defaultStatusText === void 0) { defaultStatusText = 'OK'; }\n // If the hash has values passed, use them to initialize the response.\n // Otherwise use the default values.\n this.headers = init.headers || new HttpHeaders();\n this.status = init.status !== undefined ? init.status : defaultStatus;\n this.statusText = init.statusText || defaultStatusText;\n this.url = init.url || null;\n // Cache the ok value to avoid defining a getter.\n this.ok = this.status >= 200 && this.status < 300;\n }\n return HttpResponseBase;\n}());\n/**\n * A partial HTTP response which only includes the status and header data,\n * but no response body.\n *\n * `HttpHeaderResponse` is a `HttpEvent` available on the response\n * event stream, only when progress events are requested.\n *\n *\n */\nvar HttpHeaderResponse = /** @class */ (function (_super) {\n __extends(HttpHeaderResponse, _super);\n /**\n * Create a new `HttpHeaderResponse` with the given parameters.\n */\n function HttpHeaderResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = HttpEventType.ResponseHeader;\n return _this;\n }\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n HttpHeaderResponse.prototype.clone = /**\n * Copy this `HttpHeaderResponse`, overriding its contents with the\n * given parameter hash.\n */\n function (update) {\n if (update === void 0) { update = {}; }\n // Perform a straightforward initialization of the new HttpHeaderResponse,\n // overriding the current parameters with new ones if given.\n return new HttpHeaderResponse({\n headers: update.headers || this.headers,\n status: update.status !== undefined ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpHeaderResponse;\n}(HttpResponseBase));\n/**\n * A full HTTP response, including a typed response body (which may be `null`\n * if one was not returned).\n *\n * `HttpResponse` is a `HttpEvent` available on the response event\n * stream.\n *\n *\n */\nvar HttpResponse = /** @class */ (function (_super) {\n __extends(HttpResponse, _super);\n /**\n * Construct a new `HttpResponse`.\n */\n function HttpResponse(init) {\n if (init === void 0) { init = {}; }\n var _this = _super.call(this, init) || this;\n _this.type = HttpEventType.Response;\n _this.body = init.body !== undefined ? init.body : null;\n return _this;\n }\n HttpResponse.prototype.clone = function (update) {\n if (update === void 0) { update = {}; }\n return new HttpResponse({\n body: (update.body !== undefined) ? update.body : this.body,\n headers: update.headers || this.headers,\n status: (update.status !== undefined) ? update.status : this.status,\n statusText: update.statusText || this.statusText,\n url: update.url || this.url || undefined,\n });\n };\n return HttpResponse;\n}(HttpResponseBase));\n/**\n * A response that represents an error or failure, either from a\n * non-successful HTTP status, an error while executing the request,\n * or some other failure which occurred during the parsing of the response.\n *\n * Any error returned on the `Observable` response stream will be\n * wrapped in an `HttpErrorResponse` to provide additional context about\n * the state of the HTTP layer when the error occurred. The error property\n * will contain either a wrapped Error object or the error response returned\n * from the server.\n *\n *\n */\nvar HttpErrorResponse = /** @class */ (function (_super) {\n __extends(HttpErrorResponse, _super);\n function HttpErrorResponse(init) {\n var _this = \n // Initialize with a default status of 0 / Unknown Error.\n _super.call(this, init, 0, 'Unknown Error') || this;\n _this.name = 'HttpErrorResponse';\n /**\n * Errors are never okay, even when the status code is in the 2xx success range.\n */\n _this.ok = false;\n // If the response was successful, then this was a parse error. Otherwise, it was\n // a protocol-level failure of some sort. Either the request failed in transit\n // or the server returned an unsuccessful status code.\n if (_this.status >= 200 && _this.status < 300) {\n _this.message = \"Http failure during parsing for \" + (init.url || '(unknown url)');\n }\n else {\n _this.message =\n \"Http failure response for \" + (init.url || '(unknown url)') + \": \" + init.status + \" \" + init.statusText;\n }\n _this.error = init.error || null;\n return _this;\n }\n return HttpErrorResponse;\n}(HttpResponseBase));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 instance of `HttpRequestOptions<T>` from a source `HttpMethodOptions` and\n * the given `body`. Basically, this clones the object and adds the body.\n */\nfunction addBody(options, body) {\n return {\n body: body,\n headers: options.headers,\n observe: options.observe,\n params: options.params,\n reportProgress: options.reportProgress,\n responseType: options.responseType,\n withCredentials: options.withCredentials,\n };\n}\n/**\n * Perform HTTP requests.\n *\n * `HttpClient` is available as an injectable class, with methods to perform HTTP requests.\n * Each request method has multiple signatures, and the return type varies according to which\n * signature is called (mainly the values of `observe` and `responseType`).\n *\n *\n */\nvar HttpClient = /** @class */ (function () {\n function HttpClient(handler) {\n this.handler = handler;\n }\n /**\n * Constructs an `Observable` for a particular HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * This method can be called in one of two ways. Either an `HttpRequest`\n * instance can be passed directly as the only parameter, or a method can be\n * passed as the first parameter, a string URL as the second, and an\n * options hash as the third.\n *\n * If a `HttpRequest` object is passed directly, an `Observable` of the\n * raw `HttpEvent` stream will be returned.\n *\n * If a request is instead built by providing a URL, the options object\n * determines the return type of `request()`. In addition to configuring\n * request parameters such as the outgoing headers and/or the body, the options\n * hash specifies two key pieces of information about the request: the\n * `responseType` and what to `observe`.\n *\n * The `responseType` value determines how a successful response body will be\n * parsed. If `responseType` is the default `json`, a type interface for the\n * resulting object may be passed as a type parameter to `request()`.\n *\n * The `observe` value determines the return type of `request()`, based on what\n * the consumer is interested in observing. A value of `events` will return an\n * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,\n * including progress events by default. A value of `response` will return an\n * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`\n * depends on the `responseType` and any optionally provided type parameter.\n * A value of `body` will return an `Observable<T>` with the same `T` body type.\n */\n /**\n * Constructs an `Observable` for a particular HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * This method can be called in one of two ways. Either an `HttpRequest`\n * instance can be passed directly as the only parameter, or a method can be\n * passed as the first parameter, a string URL as the second, and an\n * options hash as the third.\n *\n * If a `HttpRequest` object is passed directly, an `Observable` of the\n * raw `HttpEvent` stream will be returned.\n *\n * If a request is instead built by providing a URL, the options object\n * determines the return type of `request()`. In addition to configuring\n * request parameters such as the outgoing headers and/or the body, the options\n * hash specifies two key pieces of information about the request: the\n * `responseType` and what to `observe`.\n *\n * The `responseType` value determines how a successful response body will be\n * parsed. If `responseType` is the default `json`, a type interface for the\n * resulting object may be passed as a type parameter to `request()`.\n *\n * The `observe` value determines the return type of `request()`, based on what\n * the consumer is interested in observing. A value of `events` will return an\n * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,\n * including progress events by default. A value of `response` will return an\n * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`\n * depends on the `responseType` and any optionally provided type parameter.\n * A value of `body` will return an `Observable<T>` with the same `T` body type.\n */\n HttpClient.prototype.request = /**\n * Constructs an `Observable` for a particular HTTP request that, when subscribed,\n * fires the request through the chain of registered interceptors and on to the\n * server.\n *\n * This method can be called in one of two ways. Either an `HttpRequest`\n * instance can be passed directly as the only parameter, or a method can be\n * passed as the first parameter, a string URL as the second, and an\n * options hash as the third.\n *\n * If a `HttpRequest` object is passed directly, an `Observable` of the\n * raw `HttpEvent` stream will be returned.\n *\n * If a request is instead built by providing a URL, the options object\n * determines the return type of `request()`. In addition to configuring\n * request parameters such as the outgoing headers and/or the body, the options\n * hash specifies two key pieces of information about the request: the\n * `responseType` and what to `observe`.\n *\n * The `responseType` value determines how a successful response body will be\n * parsed. If `responseType` is the default `json`, a type interface for the\n * resulting object may be passed as a type parameter to `request()`.\n *\n * The `observe` value determines the return type of `request()`, based on what\n * the consumer is interested in observing. A value of `events` will return an\n * `Observable<HttpEvent>` representing the raw `HttpEvent` stream,\n * including progress events by default. A value of `response` will return an\n * `Observable<HttpResponse<T>>` where the `T` parameter of `HttpResponse`\n * depends on the `responseType` and any optionally provided type parameter.\n * A value of `body` will return an `Observable<T>` with the same `T` body type.\n */\n function (first, url, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n var req;\n // Firstly, check whether the primary argument is an instance of `HttpRequest`.\n if (first instanceof HttpRequest) {\n // It is. The other arguments must be undefined (per the signatures) and can be\n // ignored.\n req = first;\n }\n else {\n // It's a string, so it represents a URL. Construct a request based on it,\n // and incorporate the remaining arguments (assuming GET unless a method is\n // provided.\n // Figure out the headers.\n var headers = undefined;\n if (options.headers instanceof HttpHeaders) {\n headers = options.headers;\n }\n else {\n headers = new HttpHeaders(options.headers);\n }\n // Sort out parameters.\n var params = undefined;\n if (!!options.params) {\n if (options.params instanceof HttpParams) {\n params = options.params;\n }\n else {\n params = new HttpParams({ fromObject: options.params });\n }\n }\n // Construct the request.\n req = new HttpRequest(first, (url), (options.body !== undefined ? options.body : null), {\n headers: headers,\n params: params,\n reportProgress: options.reportProgress,\n // By default, JSON is assumed to be returned for all calls.\n responseType: options.responseType || 'json',\n withCredentials: options.withCredentials,\n });\n }\n // Start with an Observable.of() the initial request, and run the handler (which\n // includes all interceptors) inside a concatMap(). This way, the handler runs\n // inside an Observable chain, which causes interceptors to be re-run on every\n // subscription (this also makes retries re-run the handler, including interceptors).\n var events$ = of(req).pipe(concatMap(function (req) { return _this.handler.handle(req); }));\n // If coming via the API signature which accepts a previously constructed HttpRequest,\n // the only option is to get the event stream. Otherwise, return the event stream if\n // that is what was requested.\n if (first instanceof HttpRequest || options.observe === 'events') {\n return events$;\n }\n // The requested stream contains either the full response or the body. In either\n // case, the first step is to filter the event stream to extract a stream of\n // responses(s).\n var res$ = events$.pipe(filter(function (event) { return event instanceof HttpResponse; }));\n // Decide which stream to return.\n switch (options.observe || 'body') {\n case 'body':\n // The requested stream is the body. Map the response stream to the response\n // body. This could be done more simply, but a misbehaving interceptor might\n // transform the response body into a different format and ignore the requested\n // responseType. Guard against this by validating that the response is of the\n // requested type.\n switch (req.responseType) {\n case 'arraybuffer':\n return res$.pipe(map(function (res) {\n // Validate that the body is an ArrayBuffer.\n if (res.body !== null && !(res.body instanceof ArrayBuffer)) {\n throw new Error('Response is not an ArrayBuffer.');\n }\n return res.body;\n }));\n case 'blob':\n return res$.pipe(map(function (res) {\n // Validate that the body is a Blob.\n if (res.body !== null && !(res.body instanceof Blob)) {\n throw new Error('Response is not a Blob.');\n }\n return res.body;\n }));\n case 'text':\n return res$.pipe(map(function (res) {\n // Validate that the body is a string.\n if (res.body !== null && typeof res.body !== 'string') {\n throw new Error('Response is not a string.');\n }\n return res.body;\n }));\n case 'json':\n default:\n // No validation needed for JSON responses, as they can be of any type.\n return res$.pipe(map(function (res) { return res.body; }));\n }\n case 'response':\n // The response stream was requested directly, so return it.\n return res$;\n default:\n // Guard against new future observe types being added.\n throw new Error(\"Unreachable: unhandled observe type \" + options.observe + \"}\");\n }\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * DELETE request to be executed on the server. See the individual overloads for\n * details of `delete()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * DELETE request to be executed on the server. See the individual overloads for\n * details of `delete()`'s return type based on the provided options.\n */\n HttpClient.prototype.delete = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * DELETE request to be executed on the server. See the individual overloads for\n * details of `delete()`'s return type based on the provided options.\n */\n function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('DELETE', url, options);\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * GET request to be executed on the server. See the individual overloads for\n * details of `get()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * GET request to be executed on the server. See the individual overloads for\n * details of `get()`'s return type based on the provided options.\n */\n HttpClient.prototype.get = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * GET request to be executed on the server. See the individual overloads for\n * details of `get()`'s return type based on the provided options.\n */\n function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('GET', url, options);\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * HEAD request to be executed on the server. See the individual overloads for\n * details of `head()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * HEAD request to be executed on the server. See the individual overloads for\n * details of `head()`'s return type based on the provided options.\n */\n HttpClient.prototype.head = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * HEAD request to be executed on the server. See the individual overloads for\n * details of `head()`'s return type based on the provided options.\n */\n function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('HEAD', url, options);\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause a request\n * with the special method `JSONP` to be dispatched via the interceptor pipeline.\n *\n * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).\n * If no such interceptor is reached, then the `JSONP` request will likely be\n * rejected by the configured backend.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause a request\n * with the special method `JSONP` to be dispatched via the interceptor pipeline.\n *\n * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).\n * If no such interceptor is reached, then the `JSONP` request will likely be\n * rejected by the configured backend.\n */\n HttpClient.prototype.jsonp = /**\n * Constructs an `Observable` which, when subscribed, will cause a request\n * with the special method `JSONP` to be dispatched via the interceptor pipeline.\n *\n * A suitable interceptor must be installed (e.g. via the `HttpClientJsonpModule`).\n * If no such interceptor is reached, then the `JSONP` request will likely be\n * rejected by the configured backend.\n */\n function (url, callbackParam) {\n return this.request('JSONP', url, {\n params: new HttpParams().append(callbackParam, 'JSONP_CALLBACK'),\n observe: 'body',\n responseType: 'json',\n });\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * OPTIONS request to be executed on the server. See the individual overloads for\n * details of `options()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * OPTIONS request to be executed on the server. See the individual overloads for\n * details of `options()`'s return type based on the provided options.\n */\n HttpClient.prototype.options = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * OPTIONS request to be executed on the server. See the individual overloads for\n * details of `options()`'s return type based on the provided options.\n */\n function (url, options) {\n if (options === void 0) { options = {}; }\n return this.request('OPTIONS', url, options);\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * PATCH request to be executed on the server. See the individual overloads for\n * details of `patch()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * PATCH request to be executed on the server. See the individual overloads for\n * details of `patch()`'s return type based on the provided options.\n */\n HttpClient.prototype.patch = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * PATCH request to be executed on the server. See the individual overloads for\n * details of `patch()`'s return type based on the provided options.\n */\n function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PATCH', url, addBody(options, body));\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n HttpClient.prototype.post = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('POST', url, addBody(options, body));\n };\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n HttpClient.prototype.put = /**\n * Constructs an `Observable` which, when subscribed, will cause the configured\n * POST request to be executed on the server. See the individual overloads for\n * details of `post()`'s return type based on the provided options.\n */\n function (url, body, options) {\n if (options === void 0) { options = {}; }\n return this.request('PUT', url, addBody(options, body));\n };\n HttpClient.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HttpClient.ctorParameters = function () { return [\n { type: HttpHandler, },\n ]; };\n return HttpClient;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * `HttpHandler` which applies an `HttpInterceptor` to an `HttpRequest`.\n *\n *\n */\nvar HttpInterceptorHandler = /** @class */ (function () {\n function HttpInterceptorHandler(next, interceptor) {\n this.next = next;\n this.interceptor = interceptor;\n }\n HttpInterceptorHandler.prototype.handle = function (req) {\n return this.interceptor.intercept(req, this.next);\n };\n return HttpInterceptorHandler;\n}());\n/**\n * A multi-provider token which represents the array of `HttpInterceptor`s that\n * are registered.\n *\n *\n */\nvar HTTP_INTERCEPTORS = new InjectionToken('HTTP_INTERCEPTORS');\nvar NoopInterceptor = /** @class */ (function () {\n function NoopInterceptor() {\n }\n NoopInterceptor.prototype.intercept = function (req, next) {\n return next.handle(req);\n };\n NoopInterceptor.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n NoopInterceptor.ctorParameters = function () { return []; };\n return NoopInterceptor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// Every request made through JSONP needs a callback name that's unique across the\n// whole page. Each request is assigned an id and the callback name is constructed\n// from that. The next id to be assigned is tracked in a global variable here that\n// is shared among all applications on the page.\nvar nextRequestId = 0;\n// Error text given when a JSONP script is injected, but doesn't invoke the callback\n// passed in its URL.\nvar JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\n// Error text given when a request is passed to the JsonpClientBackend that doesn't\n// have a request method JSONP.\nvar JSONP_ERR_WRONG_METHOD = 'JSONP requests must use JSONP request method.';\nvar JSONP_ERR_WRONG_RESPONSE_TYPE = 'JSONP requests must use Json response type.';\n/**\n * DI token/abstract type representing a map of JSONP callbacks.\n *\n * In the browser, this should always be the `window` object.\n *\n *\n */\nvar JsonpCallbackContext = /** @class */ (function () {\n function JsonpCallbackContext() {\n }\n return JsonpCallbackContext;\n}());\n/**\n * `HttpBackend` that only processes `HttpRequest` with the JSONP method,\n * by performing JSONP style requests.\n *\n *\n */\nvar JsonpClientBackend = /** @class */ (function () {\n function JsonpClientBackend(callbackMap, document) {\n this.callbackMap = callbackMap;\n this.document = document;\n }\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n JsonpClientBackend.prototype.nextCallback = /**\n * Get the name of the next callback method, by incrementing the global `nextRequestId`.\n */\n function () { return \"ng_jsonp_callback_\" + nextRequestId++; };\n /**\n * Process a JSONP request and return an event stream of the results.\n */\n /**\n * Process a JSONP request and return an event stream of the results.\n */\n JsonpClientBackend.prototype.handle = /**\n * Process a JSONP request and return an event stream of the results.\n */\n function (req) {\n var _this = this;\n // Firstly, check both the method and response type. If either doesn't match\n // then the request was improperly routed here and cannot be handled.\n if (req.method !== 'JSONP') {\n throw new Error(JSONP_ERR_WRONG_METHOD);\n }\n else if (req.responseType !== 'json') {\n throw new Error(JSONP_ERR_WRONG_RESPONSE_TYPE);\n }\n // Everything else happens inside the Observable boundary.\n return new Observable(function (observer) {\n // The first step to make a request is to generate the callback name, and replace the\n // callback placeholder in the URL with the name. Care has to be taken here to ensure\n // a trailing &, if matched, gets inserted back into the URL in the correct place.\n var callback = _this.nextCallback();\n var url = req.urlWithParams.replace(/=JSONP_CALLBACK(&|$)/, \"=\" + callback + \"$1\");\n // Construct the <script> tag and point it at the URL.\n var node = _this.document.createElement('script');\n node.src = url;\n // A JSONP request requires waiting for multiple callbacks. These variables\n // are closed over and track state across those callbacks.\n // The response object, if one has been received, or null otherwise.\n var body = null;\n // Whether the response callback has been called.\n var finished = false;\n // Whether the request has been cancelled (and thus any other callbacks)\n // should be ignored.\n var cancelled = false;\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n // Set the response callback in this.callbackMap (which will be the window\n // object in the browser. The script being loaded via the <script> tag will\n // eventually call this callback.\n _this.callbackMap[callback] = function (data) {\n // Data has been received from the JSONP script. Firstly, delete this callback.\n delete _this.callbackMap[callback];\n // Next, make sure the request wasn't cancelled in the meantime.\n if (cancelled) {\n return;\n }\n // Set state to indicate data was received.\n body = data;\n finished = true;\n };\n // cleanup() is a utility closure that removes the <script> from the page and\n // the response callback from the window. This logic is used in both the\n // success, error, and cancellation paths, so it's extracted out for convenience.\n var cleanup = function () {\n // Remove the <script> tag if it's still on the page.\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n // Remove the response callback from the callbackMap (window object in the\n // browser).\n delete _this.callbackMap[callback];\n };\n // onLoad() is the success callback which runs after the response callback\n // if the JSONP script loads successfully. The event itself is unimportant.\n // If something went wrong, onLoad() may run without the response callback\n // having been invoked.\n var onLoad = function (event) {\n // Do nothing if the request has been cancelled.\n if (cancelled) {\n return;\n }\n // Cleanup the page.\n cleanup();\n // Check whether the response callback has run.\n if (!finished) {\n // It hasn't, something went wrong with the request. Return an error via\n // the Observable error path. All JSONP errors have status 0.\n observer.error(new HttpErrorResponse({\n url: url,\n status: 0,\n statusText: 'JSONP Error',\n error: new Error(JSONP_ERR_NO_CALLBACK),\n }));\n return;\n }\n // Success. body either contains the response body or null if none was\n // returned.\n observer.next(new HttpResponse({\n body: body,\n status: 200,\n statusText: 'OK', url: url,\n }));\n // Complete the stream, the response is over.\n observer.complete();\n };\n // onError() is the error callback, which runs if the script returned generates\n // a Javascript error. It emits the error via the Observable error channel as\n // a HttpErrorResponse.\n var onError = function (error) {\n // If the request was already cancelled, no need to emit anything.\n if (cancelled) {\n return;\n }\n cleanup();\n // Wrap the error in a HttpErrorResponse.\n observer.error(new HttpErrorResponse({\n error: error,\n status: 0,\n statusText: 'JSONP Error', url: url,\n }));\n };\n // Subscribe to both the success (load) and error events on the <script> tag,\n // and add it to the page.\n node.addEventListener('load', onLoad);\n node.addEventListener('error', onError);\n _this.document.body.appendChild(node);\n // The request has now been successfully sent.\n observer.next({ type: HttpEventType.Sent });\n // Cancellation handler.\n return function () {\n // Track the cancellation so event listeners won't do anything even if already scheduled.\n cancelled = true;\n // Remove the event listeners so they won't run if the events later fire.\n node.removeEventListener('load', onLoad);\n node.removeEventListener('error', onError);\n // And finally, clean up the page.\n cleanup();\n };\n });\n };\n JsonpClientBackend.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n JsonpClientBackend.ctorParameters = function () { return [\n { type: JsonpCallbackContext, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n return JsonpClientBackend;\n}());\n/**\n * An `HttpInterceptor` which identifies requests with the method JSONP and\n * shifts them to the `JsonpClientBackend`.\n *\n *\n */\nvar JsonpInterceptor = /** @class */ (function () {\n function JsonpInterceptor(jsonp) {\n this.jsonp = jsonp;\n }\n JsonpInterceptor.prototype.intercept = function (req, next) {\n if (req.method === 'JSONP') {\n return this.jsonp.handle(req);\n }\n // Fall through for normal HTTP requests.\n return next.handle(req);\n };\n JsonpInterceptor.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n JsonpInterceptor.ctorParameters = function () { return [\n { type: JsonpClientBackend, },\n ]; };\n return JsonpInterceptor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Determine an appropriate URL for the response, by checking either\n * XMLHttpRequest.responseURL or the X-Request-URL header.\n */\nfunction getResponseUrl(xhr) {\n if ('responseURL' in xhr && xhr.responseURL) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n/**\n * A wrapper around the `XMLHttpRequest` constructor.\n *\n *\n */\nvar XhrFactory = /** @class */ (function () {\n function XhrFactory() {\n }\n return XhrFactory;\n}());\n/**\n * A factory for @{link HttpXhrBackend} that uses the `XMLHttpRequest` browser API.\n *\n *\n */\nvar BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n BrowserXhr.prototype.build = function () { return (new XMLHttpRequest()); };\n BrowserXhr.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BrowserXhr.ctorParameters = function () { return []; };\n return BrowserXhr;\n}());\n/**\n * An `HttpBackend` which uses the XMLHttpRequest API to send\n * requests to a backend server.\n *\n *\n */\nvar HttpXhrBackend = /** @class */ (function () {\n function HttpXhrBackend(xhrFactory) {\n this.xhrFactory = xhrFactory;\n }\n /**\n * Process a request and return a stream of response events.\n */\n /**\n * Process a request and return a stream of response events.\n */\n HttpXhrBackend.prototype.handle = /**\n * Process a request and return a stream of response events.\n */\n function (req) {\n var _this = this;\n // Quick check to give a better error message when a user attempts to use\n // HttpClient.jsonp() without installing the JsonpClientModule\n if (req.method === 'JSONP') {\n throw new Error(\"Attempted to construct Jsonp request without JsonpClientModule installed.\");\n }\n // Everything happens on Observable subscription.\n return new Observable(function (observer) {\n // Start by setting up the XHR object with request method, URL, and withCredentials flag.\n var xhr = _this.xhrFactory.build();\n xhr.open(req.method, req.urlWithParams);\n if (!!req.withCredentials) {\n xhr.withCredentials = true;\n }\n // Add all the requested headers.\n req.headers.forEach(function (name, values) { return xhr.setRequestHeader(name, values.join(',')); });\n // Add an Accept header if one isn't present already.\n if (!req.headers.has('Accept')) {\n xhr.setRequestHeader('Accept', 'application/json, text/plain, */*');\n }\n // Auto-detect the Content-Type header if one isn't present already.\n if (!req.headers.has('Content-Type')) {\n var detectedType = req.detectContentTypeHeader();\n // Sometimes Content-Type detection fails.\n if (detectedType !== null) {\n xhr.setRequestHeader('Content-Type', detectedType);\n }\n }\n // Set the responseType if one was requested.\n if (req.responseType) {\n var responseType = req.responseType.toLowerCase();\n // JSON responses need to be processed as text. This is because if the server\n // returns an XSSI-prefixed JSON response, the browser will fail to parse it,\n // xhr.response will be null, and xhr.responseText cannot be accessed to\n // retrieve the prefixed JSON data in order to strip the prefix. Thus, all JSON\n // is parsed by first requesting text and then applying JSON.parse.\n xhr.responseType = ((responseType !== 'json') ? responseType : 'text');\n }\n // Serialize the request body if one is present. If not, this will be set to null.\n var reqBody = req.serializeBody();\n // If progress events are enabled, response headers will be delivered\n // in two events - the HttpHeaderResponse event and the full HttpResponse\n // event. However, since response headers don't change in between these\n // two events, it doesn't make sense to parse them twice. So headerResponse\n // caches the data extracted from the response whenever it's first parsed,\n // to ensure parsing isn't duplicated.\n var headerResponse = null;\n // partialFromXhr extracts the HttpHeaderResponse from the current XMLHttpRequest\n // state, and memoizes it into headerResponse.\n var partialFromXhr = function () {\n if (headerResponse !== null) {\n return headerResponse;\n }\n // Read status and normalize an IE9 bug (http://bugs.jquery.com/ticket/1450).\n var status = xhr.status === 1223 ? 204 : xhr.status;\n var statusText = xhr.statusText || 'OK';\n // Parse headers from XMLHttpRequest - this step is lazy.\n var headers = new HttpHeaders(xhr.getAllResponseHeaders());\n // Read the response URL from the XMLHttpResponse instance and fall back on the\n // request URL.\n var url = getResponseUrl(xhr) || req.url;\n // Construct the HttpHeaderResponse and memoize it.\n headerResponse = new HttpHeaderResponse({ headers: headers, status: status, statusText: statusText, url: url });\n return headerResponse;\n };\n // Next, a few closures are defined for the various events which XMLHttpRequest can\n // emit. This allows them to be unregistered as event listeners later.\n // First up is the load event, which represents a response being fully available.\n var onLoad = function () {\n // Read response state from the memoized partial data.\n var _a = partialFromXhr(), headers = _a.headers, status = _a.status, statusText = _a.statusText, url = _a.url;\n // The body will be read out if present.\n var body = null;\n if (status !== 204) {\n // Use XMLHttpRequest.response if set, responseText otherwise.\n body = (typeof xhr.response === 'undefined') ? xhr.responseText : xhr.response;\n }\n // Normalize another potential bug (this one comes from CORS).\n if (status === 0) {\n status = !!body ? 200 : 0;\n }\n // ok determines whether the response will be transmitted on the event or\n // error channel. Unsuccessful status codes (not 2xx) will always be errors,\n // but a successful status code can still result in an error if the user\n // asked for JSON data and the body cannot be parsed as such.\n var ok = status >= 200 && status < 300;\n // Check whether the body needs to be parsed as JSON (in many cases the browser\n // will have done that already).\n if (req.responseType === 'json' && typeof body === 'string') {\n // Save the original body, before attempting XSSI prefix stripping.\n var originalBody = body;\n body = body.replace(XSSI_PREFIX, '');\n try {\n // Attempt the parse. If it fails, a parse error should be delivered to the user.\n body = body !== '' ? JSON.parse(body) : null;\n }\n catch (error) {\n // Since the JSON.parse failed, it's reasonable to assume this might not have been a\n // JSON response. Restore the original body (including any XSSI prefix) to deliver\n // a better error response.\n body = originalBody;\n // If this was an error request to begin with, leave it as a string, it probably\n // just isn't JSON. Otherwise, deliver the parsing error to the user.\n if (ok) {\n // Even though the response status was 2xx, this is still an error.\n ok = false;\n // The parse error contains the text of the body that failed to parse.\n body = { error: error, text: body };\n }\n }\n }\n if (ok) {\n // A successful response is delivered on the event stream.\n observer.next(new HttpResponse({\n body: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n // The full body has been received and delivered, no further events\n // are possible. This request is complete.\n observer.complete();\n }\n else {\n // An unsuccessful request is delivered on the error channel.\n observer.error(new HttpErrorResponse({\n // The error in this case is the response body (error from the server).\n error: body,\n headers: headers,\n status: status,\n statusText: statusText,\n url: url || undefined,\n }));\n }\n };\n // The onError callback is called when something goes wrong at the network level.\n // Connection timeout, DNS error, offline, etc. These are actual errors, and are\n // transmitted on the error channel.\n var onError = function (error) {\n var res = new HttpErrorResponse({\n error: error,\n status: xhr.status || 0,\n statusText: xhr.statusText || 'Unknown Error',\n });\n observer.error(res);\n };\n // The sentHeaders flag tracks whether the HttpResponseHeaders event\n // has been sent on the stream. This is necessary to track if progress\n // is enabled since the event will be sent on only the first download\n // progerss event.\n var sentHeaders = false;\n // The download progress event handler, which is only registered if\n // progress events are enabled.\n var onDownProgress = function (event) {\n // Send the HttpResponseHeaders event if it hasn't been sent already.\n if (!sentHeaders) {\n observer.next(partialFromXhr());\n sentHeaders = true;\n }\n // Start building the download progress event to deliver on the response\n // event stream.\n var progressEvent = {\n type: HttpEventType.DownloadProgress,\n loaded: event.loaded,\n };\n // Set the total number of bytes in the event if it's available.\n if (event.lengthComputable) {\n progressEvent.total = event.total;\n }\n // If the request was for text content and a partial response is\n // available on XMLHttpRequest, include it in the progress event\n // to allow for streaming reads.\n if (req.responseType === 'text' && !!xhr.responseText) {\n progressEvent.partialText = xhr.responseText;\n }\n // Finally, fire the event.\n observer.next(progressEvent);\n };\n // The upload progress event handler, which is only registered if\n // progress events are enabled.\n var onUpProgress = function (event) {\n // Upload progress events are simpler. Begin building the progress\n // event.\n var progress = {\n type: HttpEventType.UploadProgress,\n loaded: event.loaded,\n };\n // If the total number of bytes being uploaded is available, include\n // it.\n if (event.lengthComputable) {\n progress.total = event.total;\n }\n // Send the event.\n observer.next(progress);\n };\n // By default, register for load and error events.\n xhr.addEventListener('load', onLoad);\n xhr.addEventListener('error', onError);\n // Progress events are only enabled if requested.\n if (req.reportProgress) {\n // Download progress is always enabled if requested.\n xhr.addEventListener('progress', onDownProgress);\n // Upload progress depends on whether there is a body to upload.\n if (reqBody !== null && xhr.upload) {\n xhr.upload.addEventListener('progress', onUpProgress);\n }\n }\n // Fire the request, and notify the event stream that it was fired.\n xhr.send(reqBody);\n observer.next({ type: HttpEventType.Sent });\n // This is the return from the Observable function, which is the\n // request cancellation handler.\n return function () {\n // On a cancellation, remove all registered event listeners.\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n if (req.reportProgress) {\n xhr.removeEventListener('progress', onDownProgress);\n if (reqBody !== null && xhr.upload) {\n xhr.upload.removeEventListener('progress', onUpProgress);\n }\n }\n // Finally, abort the in-flight request.\n xhr.abort();\n };\n });\n };\n HttpXhrBackend.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HttpXhrBackend.ctorParameters = function () { return [\n { type: XhrFactory, },\n ]; };\n return HttpXhrBackend;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 XSRF_COOKIE_NAME = new InjectionToken('XSRF_COOKIE_NAME');\nvar XSRF_HEADER_NAME = new InjectionToken('XSRF_HEADER_NAME');\n/**\n * Retrieves the current XSRF token to use with the next outgoing request.\n *\n *\n */\nvar HttpXsrfTokenExtractor = /** @class */ (function () {\n function HttpXsrfTokenExtractor() {\n }\n return HttpXsrfTokenExtractor;\n}());\n/**\n * `HttpXsrfTokenExtractor` which retrieves the token from a cookie.\n */\nvar HttpXsrfCookieExtractor = /** @class */ (function () {\n function HttpXsrfCookieExtractor(doc, platform, cookieName) {\n this.doc = doc;\n this.platform = platform;\n this.cookieName = cookieName;\n this.lastCookieString = '';\n this.lastToken = null;\n /**\n * @internal for testing\n */\n this.parseCount = 0;\n }\n HttpXsrfCookieExtractor.prototype.getToken = function () {\n if (this.platform === 'server') {\n return null;\n }\n var cookieString = this.doc.cookie || '';\n if (cookieString !== this.lastCookieString) {\n this.parseCount++;\n this.lastToken = ɵparseCookieValue(cookieString, this.cookieName);\n this.lastCookieString = cookieString;\n }\n return this.lastToken;\n };\n HttpXsrfCookieExtractor.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HttpXsrfCookieExtractor.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] },] },\n { type: undefined, decorators: [{ type: Inject, args: [XSRF_COOKIE_NAME,] },] },\n ]; };\n return HttpXsrfCookieExtractor;\n}());\n/**\n * `HttpInterceptor` which adds an XSRF token to eligible outgoing requests.\n */\nvar HttpXsrfInterceptor = /** @class */ (function () {\n function HttpXsrfInterceptor(tokenService, headerName) {\n this.tokenService = tokenService;\n this.headerName = headerName;\n }\n HttpXsrfInterceptor.prototype.intercept = function (req, next) {\n var lcUrl = req.url.toLowerCase();\n // Skip both non-mutating requests and absolute URLs.\n // Non-mutating requests don't require a token, and absolute URLs require special handling\n // anyway as the cookie set\n // on our origin is not the same as the token expected by another origin.\n if (req.method === 'GET' || req.method === 'HEAD' || lcUrl.startsWith('http://') ||\n lcUrl.startsWith('https://')) {\n return next.handle(req);\n }\n var token = this.tokenService.getToken();\n // Be careful not to overwrite an existing header of the same name.\n if (token !== null && !req.headers.has(this.headerName)) {\n req = req.clone({ headers: req.headers.set(this.headerName, token) });\n }\n return next.handle(req);\n };\n HttpXsrfInterceptor.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HttpXsrfInterceptor.ctorParameters = function () { return [\n { type: HttpXsrfTokenExtractor, },\n { type: undefined, decorators: [{ type: Inject, args: [XSRF_HEADER_NAME,] },] },\n ]; };\n return HttpXsrfInterceptor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 `HttpHandler` that applies a bunch of `HttpInterceptor`s\n * to a request before passing it to the given `HttpBackend`.\n *\n * The interceptors are loaded lazily from the injector, to allow\n * interceptors to themselves inject classes depending indirectly\n * on `HttpInterceptingHandler` itself.\n */\nvar HttpInterceptingHandler = /** @class */ (function () {\n function HttpInterceptingHandler(backend, injector) {\n this.backend = backend;\n this.injector = injector;\n this.chain = null;\n }\n HttpInterceptingHandler.prototype.handle = function (req) {\n if (this.chain === null) {\n var interceptors = this.injector.get(HTTP_INTERCEPTORS, []);\n this.chain = interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, this.backend);\n }\n return this.chain.handle(req);\n };\n HttpInterceptingHandler.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HttpInterceptingHandler.ctorParameters = function () { return [\n { type: HttpBackend, },\n { type: Injector, },\n ]; };\n return HttpInterceptingHandler;\n}());\n/**\n * Constructs an `HttpHandler` that applies a bunch of `HttpInterceptor`s\n * to a request before passing it to the given `HttpBackend`.\n *\n * Meant to be used as a factory function within `HttpClientModule`.\n *\n *\n */\nfunction interceptingHandler(backend, interceptors) {\n if (interceptors === void 0) { interceptors = []; }\n if (!interceptors) {\n return backend;\n }\n return interceptors.reduceRight(function (next, interceptor) { return new HttpInterceptorHandler(next, interceptor); }, backend);\n}\n/**\n * Factory function that determines where to store JSONP callbacks.\n *\n * Ordinarily JSONP callbacks are stored on the `window` object, but this may not exist\n * in test environments. In that case, callbacks are stored on an anonymous object instead.\n *\n *\n */\nfunction jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}\n/**\n * `NgModule` which adds XSRF protection support to outgoing requests.\n *\n * Provided the server supports a cookie-based XSRF protection system, this\n * module can be used directly to configure XSRF protection with the correct\n * cookie and header names.\n *\n * If no such names are provided, the default is to use `X-XSRF-TOKEN` for\n * the header name and `XSRF-TOKEN` for the cookie name.\n *\n *\n */\nvar HttpClientXsrfModule = /** @class */ (function () {\n function HttpClientXsrfModule() {\n }\n /**\n * Disable the default XSRF protection.\n */\n /**\n * Disable the default XSRF protection.\n */\n HttpClientXsrfModule.disable = /**\n * Disable the default XSRF protection.\n */\n function () {\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n { provide: HttpXsrfInterceptor, useClass: NoopInterceptor },\n ],\n };\n };\n /**\n * Configure XSRF protection to use the given cookie name or header name,\n * or the default names (as described above) if not provided.\n */\n /**\n * Configure XSRF protection to use the given cookie name or header name,\n * or the default names (as described above) if not provided.\n */\n HttpClientXsrfModule.withOptions = /**\n * Configure XSRF protection to use the given cookie name or header name,\n * or the default names (as described above) if not provided.\n */\n function (options) {\n if (options === void 0) { options = {}; }\n return {\n ngModule: HttpClientXsrfModule,\n providers: [\n options.cookieName ? { provide: XSRF_COOKIE_NAME, useValue: options.cookieName } : [],\n options.headerName ? { provide: XSRF_HEADER_NAME, useValue: options.headerName } : [],\n ],\n };\n };\n HttpClientXsrfModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n HttpXsrfInterceptor,\n { provide: HTTP_INTERCEPTORS, useExisting: HttpXsrfInterceptor, multi: true },\n { provide: HttpXsrfTokenExtractor, useClass: HttpXsrfCookieExtractor },\n { provide: XSRF_COOKIE_NAME, useValue: 'XSRF-TOKEN' },\n { provide: XSRF_HEADER_NAME, useValue: 'X-XSRF-TOKEN' },\n ],\n },] }\n ];\n /** @nocollapse */\n HttpClientXsrfModule.ctorParameters = function () { return []; };\n return HttpClientXsrfModule;\n}());\n/**\n * `NgModule` which provides the `HttpClient` and associated services.\n *\n * Interceptors can be added to the chain behind `HttpClient` by binding them\n * to the multiprovider for `HTTP_INTERCEPTORS`.\n *\n *\n */\nvar HttpClientModule = /** @class */ (function () {\n function HttpClientModule() {\n }\n HttpClientModule.decorators = [\n { type: NgModule, args: [{\n imports: [\n HttpClientXsrfModule.withOptions({\n cookieName: 'XSRF-TOKEN',\n headerName: 'X-XSRF-TOKEN',\n }),\n ],\n providers: [\n HttpClient,\n { provide: HttpHandler, useClass: HttpInterceptingHandler },\n HttpXhrBackend,\n { provide: HttpBackend, useExisting: HttpXhrBackend },\n BrowserXhr,\n { provide: XhrFactory, useExisting: BrowserXhr },\n ],\n },] }\n ];\n /** @nocollapse */\n HttpClientModule.ctorParameters = function () { return []; };\n return HttpClientModule;\n}());\n/**\n * `NgModule` which enables JSONP support in `HttpClient`.\n *\n * Without this module, Jsonp requests will reach the backend\n * with method JSONP, where they'll be rejected.\n *\n *\n */\nvar HttpClientJsonpModule = /** @class */ (function () {\n function HttpClientJsonpModule() {\n }\n HttpClientJsonpModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n JsonpClientBackend,\n { provide: JsonpCallbackContext, useFactory: jsonpCallbackContext },\n { provide: HTTP_INTERCEPTORS, useClass: JsonpInterceptor, multi: true },\n ],\n },] }\n ];\n /** @nocollapse */\n HttpClientJsonpModule.ctorParameters = function () { return []; };\n return HttpClientJsonpModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 { NoopInterceptor as ɵangular_packages_common_http_http_a, JsonpCallbackContext as ɵangular_packages_common_http_http_b, HttpInterceptingHandler as ɵangular_packages_common_http_http_c, jsonpCallbackContext as ɵangular_packages_common_http_http_d, BrowserXhr as ɵangular_packages_common_http_http_e, HttpXsrfCookieExtractor as ɵangular_packages_common_http_http_h, HttpXsrfInterceptor as ɵangular_packages_common_http_http_i, XSRF_COOKIE_NAME as ɵangular_packages_common_http_http_f, XSRF_HEADER_NAME as ɵangular_packages_common_http_http_g, HttpBackend, HttpHandler, HttpClient, HttpHeaders, HTTP_INTERCEPTORS, JsonpClientBackend, JsonpInterceptor, HttpClientJsonpModule, HttpClientModule, HttpClientXsrfModule, interceptingHandler as ɵinterceptingHandler, HttpParams, HttpUrlEncodingCodec, HttpRequest, HttpErrorResponse, HttpEventType, HttpHeaderResponse, HttpResponse, HttpResponseBase, HttpXhrBackend, XhrFactory, HttpXsrfTokenExtractor };\n//# sourceMappingURL=http.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __assign, __extends, __read, __spread, __values } from 'tslib';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 createInject = makeMetadataFactory('Inject', function (token) { return ({ token: token }); });\nvar createInjectionToken = makeMetadataFactory('InjectionToken', function (desc) { return ({ _desc: desc, ngInjectableDef: undefined }); });\nvar createAttribute = makeMetadataFactory('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\nvar createContentChildren = makeMetadataFactory('ContentChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n});\nvar createContentChild = makeMetadataFactory('ContentChild', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n});\nvar createViewChildren = makeMetadataFactory('ViewChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n});\nvar createViewChild = makeMetadataFactory('ViewChild', function (selector, data) {\n return (__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n});\nvar createDirective = makeMetadataFactory('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n});\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 = {}));\nvar ChangeDetectionStrategy;\n(function (ChangeDetectionStrategy) {\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\nvar createComponent = makeMetadataFactory('Component', function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));\n});\nvar createPipe = makeMetadataFactory('Pipe', function (p) { return (__assign({ pure: true }, p)); });\nvar createInput = makeMetadataFactory('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\nvar createOutput = makeMetadataFactory('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\nvar createHostBinding = makeMetadataFactory('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\nvar createHostListener = makeMetadataFactory('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });\nvar createNgModule = makeMetadataFactory('NgModule', function (ngModule) { return ngModule; });\nvar createInjectable = makeMetadataFactory('Injectable', function (injectable) {\n if (injectable === void 0) { injectable = {}; }\n return injectable;\n});\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\nvar NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\nvar createOptional = makeMetadataFactory('Optional');\nvar createSelf = makeMetadataFactory('Self');\nvar createSkipSelf = makeMetadataFactory('SkipSelf');\nvar createHost = makeMetadataFactory('Host');\nvar Type = Function;\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 = {}));\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 = {}));\nfunction makeMetadataFactory(name, props) {\n var factory = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var values = props ? props.apply(void 0, __spread(args)) : {};\n return __assign({ ngMetadataName: name }, values);\n };\n factory.isTypeOf = function (obj) { return obj && obj.ngMetadataName === name; };\n factory.ngMetadataName = name;\n return factory;\n}\n\n\nvar core = Object.freeze({\n\tcreateInject: createInject,\n\tcreateInjectionToken: createInjectionToken,\n\tcreateAttribute: createAttribute,\n\tcreateContentChildren: createContentChildren,\n\tcreateContentChild: createContentChild,\n\tcreateViewChildren: createViewChildren,\n\tcreateViewChild: createViewChild,\n\tcreateDirective: createDirective,\n\tget ViewEncapsulation () { return ViewEncapsulation; },\n\tget ChangeDetectionStrategy () { return ChangeDetectionStrategy; },\n\tcreateComponent: createComponent,\n\tcreatePipe: createPipe,\n\tcreateInput: createInput,\n\tcreateOutput: createOutput,\n\tcreateHostBinding: createHostBinding,\n\tcreateHostListener: createHostListener,\n\tcreateNgModule: createNgModule,\n\tcreateInjectable: createInjectable,\n\tCUSTOM_ELEMENTS_SCHEMA: CUSTOM_ELEMENTS_SCHEMA,\n\tNO_ERRORS_SCHEMA: NO_ERRORS_SCHEMA,\n\tcreateOptional: createOptional,\n\tcreateSelf: createSelf,\n\tcreateSkipSelf: createSkipSelf,\n\tcreateHost: createHost,\n\tType: Type,\n\tget SecurityContext () { return SecurityContext; },\n\tget MissingTranslationStrategy () { return MissingTranslationStrategy; }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nfunction dashCaseToCamelCase(input) {\n return input.replace(DASH_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[1].toUpperCase();\n });\n}\nfunction splitAtColon(input, defaultValues) {\n return _splitAt(input, ':', defaultValues);\n}\nfunction splitAtPeriod(input, defaultValues) {\n return _splitAt(input, '.', defaultValues);\n}\nfunction _splitAt(input, character, defaultValues) {\n var characterIndex = input.indexOf(character);\n if (characterIndex == -1)\n return defaultValues;\n return [input.slice(0, characterIndex).trim(), input.slice(characterIndex + 1).trim()];\n}\nfunction visitValue(value, visitor, context) {\n if (Array.isArray(value)) {\n return visitor.visitArray(value, context);\n }\n if (isStrictStringMap(value)) {\n return visitor.visitStringMap(value, context);\n }\n if (value == null || typeof value == 'string' || typeof value == 'number' ||\n typeof value == 'boolean') {\n return visitor.visitPrimitive(value, context);\n }\n return visitor.visitOther(value, context);\n}\nfunction isDefined(val) {\n return val !== null && val !== undefined;\n}\nfunction noUndefined(val) {\n return val === undefined ? null : val;\n}\nvar ValueTransformer = /** @class */ (function () {\n function ValueTransformer() {\n }\n ValueTransformer.prototype.visitArray = function (arr, context) {\n var _this = this;\n return arr.map(function (value) { return visitValue(value, _this, context); });\n };\n ValueTransformer.prototype.visitStringMap = function (map, context) {\n var _this = this;\n var result = {};\n Object.keys(map).forEach(function (key) { result[key] = visitValue(map[key], _this, context); });\n return result;\n };\n ValueTransformer.prototype.visitPrimitive = function (value, context) { return value; };\n ValueTransformer.prototype.visitOther = function (value, context) { return value; };\n return ValueTransformer;\n}());\nvar SyncAsync = {\n assertSync: function (value) {\n if (isPromise(value)) {\n throw new Error(\"Illegal state: value cannot be a promise\");\n }\n return value;\n },\n then: function (value, cb) { return isPromise(value) ? value.then(cb) : cb(value); },\n all: function (syncAsyncValues) {\n return syncAsyncValues.some(isPromise) ? Promise.all(syncAsyncValues) : syncAsyncValues;\n }\n};\nfunction error(msg) {\n throw new Error(\"Internal Error: \" + msg);\n}\nfunction syntaxError(msg, parseErrors) {\n var error = Error(msg);\n error[ERROR_SYNTAX_ERROR] = true;\n if (parseErrors)\n error[ERROR_PARSE_ERRORS] = parseErrors;\n return error;\n}\nvar ERROR_SYNTAX_ERROR = 'ngSyntaxError';\nvar ERROR_PARSE_ERRORS = 'ngParseErrors';\nfunction isSyntaxError(error) {\n return error[ERROR_SYNTAX_ERROR];\n}\nfunction getParseErrors(error) {\n return error[ERROR_PARSE_ERRORS] || [];\n}\n// Escape characters that have a special meaning in Regular Expressions\nfunction escapeRegExp(s) {\n return s.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\nvar STRING_MAP_PROTO = Object.getPrototypeOf({});\nfunction isStrictStringMap(obj) {\n return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;\n}\nfunction utf8Encode(str) {\n var encoded = '';\n for (var index = 0; index < str.length; index++) {\n var codePoint = str.charCodeAt(index);\n // decode surrogate\n // see https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n if (codePoint >= 0xd800 && codePoint <= 0xdbff && str.length > (index + 1)) {\n var low = str.charCodeAt(index + 1);\n if (low >= 0xdc00 && low <= 0xdfff) {\n index++;\n codePoint = ((codePoint - 0xd800) << 10) + low - 0xdc00 + 0x10000;\n }\n }\n if (codePoint <= 0x7f) {\n encoded += String.fromCharCode(codePoint);\n }\n else if (codePoint <= 0x7ff) {\n encoded += String.fromCharCode(((codePoint >> 6) & 0x1F) | 0xc0, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0xffff) {\n encoded += String.fromCharCode((codePoint >> 12) | 0xe0, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n else if (codePoint <= 0x1fffff) {\n encoded += String.fromCharCode(((codePoint >> 18) & 0x07) | 0xf0, ((codePoint >> 12) & 0x3f) | 0x80, ((codePoint >> 6) & 0x3f) | 0x80, (codePoint & 0x3f) | 0x80);\n }\n }\n return encoded;\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\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 // WARNING: do not try to `JSON.stringify(token)` here\n // see https://github.com/angular/angular/issues/23440\n var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n/**\n * Lazily retrieves the reference value from a forwardRef.\n */\nfunction resolveForwardRef(type) {\n if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__')) {\n return type();\n }\n else {\n return type;\n }\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}\nvar Version = /** @class */ (function () {\n function Version(full) {\n this.full = full;\n var splits = full.split('.');\n this.major = splits[0];\n this.minor = splits[1];\n this.patch = splits.slice(2).join('.');\n }\n return Version;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @module\n * @description\n * Entry point for all public APIs of the common package.\n */\n/**\n *\n */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 segment of text within the template.\n */\nvar TextAst = /** @class */ (function () {\n function TextAst(value, ngContentIndex, sourceSpan) {\n this.value = value;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n TextAst.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };\n return TextAst;\n}());\n/**\n * A bound expression within the text of a template.\n */\nvar BoundTextAst = /** @class */ (function () {\n function BoundTextAst(value, ngContentIndex, sourceSpan) {\n this.value = value;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n BoundTextAst.prototype.visit = function (visitor, context) {\n return visitor.visitBoundText(this, context);\n };\n return BoundTextAst;\n}());\n/**\n * A plain attribute on an element.\n */\nvar AttrAst = /** @class */ (function () {\n function AttrAst(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n AttrAst.prototype.visit = function (visitor, context) { return visitor.visitAttr(this, context); };\n return AttrAst;\n}());\n/**\n * A binding for an element property (e.g. `[property]=\"expression\"`) or an animation trigger (e.g.\n * `[@trigger]=\"stateExp\"`)\n */\nvar BoundElementPropertyAst = /** @class */ (function () {\n function BoundElementPropertyAst(name, type, securityContext, value, unit, sourceSpan) {\n this.name = name;\n this.type = type;\n this.securityContext = securityContext;\n this.value = value;\n this.unit = unit;\n this.sourceSpan = sourceSpan;\n this.isAnimation = this.type === PropertyBindingType.Animation;\n }\n BoundElementPropertyAst.prototype.visit = function (visitor, context) {\n return visitor.visitElementProperty(this, context);\n };\n return BoundElementPropertyAst;\n}());\n/**\n * A binding for an element event (e.g. `(event)=\"handler()\"`) or an animation trigger event (e.g.\n * `(@trigger.phase)=\"callback($event)\"`).\n */\nvar BoundEventAst = /** @class */ (function () {\n function BoundEventAst(name, target, phase, handler, sourceSpan) {\n this.name = name;\n this.target = target;\n this.phase = phase;\n this.handler = handler;\n this.sourceSpan = sourceSpan;\n this.fullName = BoundEventAst.calcFullName(this.name, this.target, this.phase);\n this.isAnimation = !!this.phase;\n }\n BoundEventAst.calcFullName = function (name, target, phase) {\n if (target) {\n return target + \":\" + name;\n }\n else if (phase) {\n return \"@\" + name + \".\" + phase;\n }\n else {\n return name;\n }\n };\n BoundEventAst.prototype.visit = function (visitor, context) {\n return visitor.visitEvent(this, context);\n };\n return BoundEventAst;\n}());\n/**\n * A reference declaration on an element (e.g. `let someName=\"expression\"`).\n */\nvar ReferenceAst = /** @class */ (function () {\n function ReferenceAst(name, value, originalValue, sourceSpan) {\n this.name = name;\n this.value = value;\n this.originalValue = originalValue;\n this.sourceSpan = sourceSpan;\n }\n ReferenceAst.prototype.visit = function (visitor, context) {\n return visitor.visitReference(this, context);\n };\n return ReferenceAst;\n}());\n/**\n * A variable declaration on a <ng-template> (e.g. `var-someName=\"someLocalName\"`).\n */\nvar VariableAst = /** @class */ (function () {\n function VariableAst(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n VariableAst.prototype.visit = function (visitor, context) {\n return visitor.visitVariable(this, context);\n };\n return VariableAst;\n}());\n/**\n * An element declaration in a template.\n */\nvar ElementAst = /** @class */ (function () {\n function ElementAst(name, attrs, inputs, outputs, references, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan, endSourceSpan) {\n this.name = name;\n this.attrs = attrs;\n this.inputs = inputs;\n this.outputs = outputs;\n this.references = references;\n this.directives = directives;\n this.providers = providers;\n this.hasViewContainer = hasViewContainer;\n this.queryMatches = queryMatches;\n this.children = children;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n ElementAst.prototype.visit = function (visitor, context) {\n return visitor.visitElement(this, context);\n };\n return ElementAst;\n}());\n/**\n * A `<ng-template>` element included in an Angular template.\n */\nvar EmbeddedTemplateAst = /** @class */ (function () {\n function EmbeddedTemplateAst(attrs, outputs, references, variables, directives, providers, hasViewContainer, queryMatches, children, ngContentIndex, sourceSpan) {\n this.attrs = attrs;\n this.outputs = outputs;\n this.references = references;\n this.variables = variables;\n this.directives = directives;\n this.providers = providers;\n this.hasViewContainer = hasViewContainer;\n this.queryMatches = queryMatches;\n this.children = children;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n EmbeddedTemplateAst.prototype.visit = function (visitor, context) {\n return visitor.visitEmbeddedTemplate(this, context);\n };\n return EmbeddedTemplateAst;\n}());\n/**\n * A directive property with a bound value (e.g. `*ngIf=\"condition\").\n */\nvar BoundDirectivePropertyAst = /** @class */ (function () {\n function BoundDirectivePropertyAst(directiveName, templateName, value, sourceSpan) {\n this.directiveName = directiveName;\n this.templateName = templateName;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n BoundDirectivePropertyAst.prototype.visit = function (visitor, context) {\n return visitor.visitDirectiveProperty(this, context);\n };\n return BoundDirectivePropertyAst;\n}());\n/**\n * A directive declared on an element.\n */\nvar DirectiveAst = /** @class */ (function () {\n function DirectiveAst(directive, inputs, hostProperties, hostEvents, contentQueryStartId, sourceSpan) {\n this.directive = directive;\n this.inputs = inputs;\n this.hostProperties = hostProperties;\n this.hostEvents = hostEvents;\n this.contentQueryStartId = contentQueryStartId;\n this.sourceSpan = sourceSpan;\n }\n DirectiveAst.prototype.visit = function (visitor, context) {\n return visitor.visitDirective(this, context);\n };\n return DirectiveAst;\n}());\n/**\n * A provider declared on an element\n */\nvar ProviderAst = /** @class */ (function () {\n function ProviderAst(token, multiProvider, eager, providers, providerType, lifecycleHooks, sourceSpan, isModule) {\n this.token = token;\n this.multiProvider = multiProvider;\n this.eager = eager;\n this.providers = providers;\n this.providerType = providerType;\n this.lifecycleHooks = lifecycleHooks;\n this.sourceSpan = sourceSpan;\n this.isModule = isModule;\n }\n ProviderAst.prototype.visit = function (visitor, context) {\n // No visit method in the visitor for now...\n return null;\n };\n return ProviderAst;\n}());\nvar ProviderAstType;\n(function (ProviderAstType) {\n ProviderAstType[ProviderAstType[\"PublicService\"] = 0] = \"PublicService\";\n ProviderAstType[ProviderAstType[\"PrivateService\"] = 1] = \"PrivateService\";\n ProviderAstType[ProviderAstType[\"Component\"] = 2] = \"Component\";\n ProviderAstType[ProviderAstType[\"Directive\"] = 3] = \"Directive\";\n ProviderAstType[ProviderAstType[\"Builtin\"] = 4] = \"Builtin\";\n})(ProviderAstType || (ProviderAstType = {}));\n/**\n * Position where content is to be projected (instance of `<ng-content>` in a template).\n */\nvar NgContentAst = /** @class */ (function () {\n function NgContentAst(index, ngContentIndex, sourceSpan) {\n this.index = index;\n this.ngContentIndex = ngContentIndex;\n this.sourceSpan = sourceSpan;\n }\n NgContentAst.prototype.visit = function (visitor, context) {\n return visitor.visitNgContent(this, context);\n };\n return NgContentAst;\n}());\n/**\n * Enumeration of types of property bindings.\n */\nvar PropertyBindingType;\n(function (PropertyBindingType) {\n /**\n * A normal binding to a property (e.g. `[property]=\"expression\"`).\n */\n PropertyBindingType[PropertyBindingType[\"Property\"] = 0] = \"Property\";\n /**\n * A binding to an element attribute (e.g. `[attr.name]=\"expression\"`).\n */\n PropertyBindingType[PropertyBindingType[\"Attribute\"] = 1] = \"Attribute\";\n /**\n * A binding to a CSS class (e.g. `[class.name]=\"condition\"`).\n */\n PropertyBindingType[PropertyBindingType[\"Class\"] = 2] = \"Class\";\n /**\n * A binding to a style rule (e.g. `[style.rule]=\"expression\"`).\n */\n PropertyBindingType[PropertyBindingType[\"Style\"] = 3] = \"Style\";\n /**\n * A binding to an animation reference (e.g. `[animate.key]=\"expression\"`).\n */\n PropertyBindingType[PropertyBindingType[\"Animation\"] = 4] = \"Animation\";\n})(PropertyBindingType || (PropertyBindingType = {}));\n/**\n * A visitor that accepts each node but doesn't do anything. It is intended to be used\n * as the base class for a visitor that is only interested in a subset of the node types.\n */\nvar NullTemplateVisitor = /** @class */ (function () {\n function NullTemplateVisitor() {\n }\n NullTemplateVisitor.prototype.visitNgContent = function (ast, context) { };\n NullTemplateVisitor.prototype.visitEmbeddedTemplate = function (ast, context) { };\n NullTemplateVisitor.prototype.visitElement = function (ast, context) { };\n NullTemplateVisitor.prototype.visitReference = function (ast, context) { };\n NullTemplateVisitor.prototype.visitVariable = function (ast, context) { };\n NullTemplateVisitor.prototype.visitEvent = function (ast, context) { };\n NullTemplateVisitor.prototype.visitElementProperty = function (ast, context) { };\n NullTemplateVisitor.prototype.visitAttr = function (ast, context) { };\n NullTemplateVisitor.prototype.visitBoundText = function (ast, context) { };\n NullTemplateVisitor.prototype.visitText = function (ast, context) { };\n NullTemplateVisitor.prototype.visitDirective = function (ast, context) { };\n NullTemplateVisitor.prototype.visitDirectiveProperty = function (ast, context) { };\n return NullTemplateVisitor;\n}());\n/**\n * Base class that can be used to build a visitor that visits each node\n * in an template ast recursively.\n */\nvar RecursiveTemplateAstVisitor = /** @class */ (function (_super) {\n __extends(RecursiveTemplateAstVisitor, _super);\n function RecursiveTemplateAstVisitor() {\n return _super.call(this) || this;\n }\n // Nodes with children\n RecursiveTemplateAstVisitor.prototype.visitEmbeddedTemplate = function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.references);\n visit(ast.variables);\n visit(ast.directives);\n visit(ast.providers);\n visit(ast.children);\n });\n };\n RecursiveTemplateAstVisitor.prototype.visitElement = function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.inputs);\n visit(ast.outputs);\n visit(ast.references);\n visit(ast.directives);\n visit(ast.providers);\n visit(ast.children);\n });\n };\n RecursiveTemplateAstVisitor.prototype.visitDirective = function (ast, context) {\n return this.visitChildren(context, function (visit) {\n visit(ast.inputs);\n visit(ast.hostProperties);\n visit(ast.hostEvents);\n });\n };\n RecursiveTemplateAstVisitor.prototype.visitChildren = function (context, cb) {\n var results = [];\n var t = this;\n function visit(children) {\n if (children && children.length)\n results.push(templateVisitAll(t, children, context));\n }\n cb(visit);\n return [].concat.apply([], results);\n };\n return RecursiveTemplateAstVisitor;\n}(NullTemplateVisitor));\n/**\n * Visit every node in a list of {@link TemplateAst}s with the given {@link TemplateAstVisitor}.\n */\nfunction templateVisitAll(visitor, asts, context) {\n if (context === void 0) { context = null; }\n var result = [];\n var visit = visitor.visit ?\n function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :\n function (ast) { return ast.visit(visitor, context); };\n asts.forEach(function (ast) {\n var astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CompilerConfig = /** @class */ (function () {\n function CompilerConfig(_a) {\n var _b = _a === void 0 ? {} : _a, _c = _b.defaultEncapsulation, defaultEncapsulation = _c === void 0 ? ViewEncapsulation.Emulated : _c, _d = _b.useJit, useJit = _d === void 0 ? true : _d, _e = _b.jitDevMode, jitDevMode = _e === void 0 ? false : _e, _f = _b.missingTranslation, missingTranslation = _f === void 0 ? null : _f, preserveWhitespaces = _b.preserveWhitespaces, strictInjectionParameters = _b.strictInjectionParameters;\n this.defaultEncapsulation = defaultEncapsulation;\n this.useJit = !!useJit;\n this.jitDevMode = !!jitDevMode;\n this.missingTranslation = missingTranslation;\n this.preserveWhitespaces = preserveWhitespacesDefault(noUndefined(preserveWhitespaces));\n this.strictInjectionParameters = strictInjectionParameters === true;\n }\n return CompilerConfig;\n}());\nfunction preserveWhitespacesDefault(preserveWhitespacesOption, defaultSetting) {\n if (defaultSetting === void 0) { defaultSetting = false; }\n return preserveWhitespacesOption === null ? defaultSetting : preserveWhitespacesOption;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 token representing the a reference to a static type.\n *\n * This token is unique for a filePath and name and can be used as a hash table key.\n */\nvar StaticSymbol = /** @class */ (function () {\n function StaticSymbol(filePath, name, members) {\n this.filePath = filePath;\n this.name = name;\n this.members = members;\n }\n StaticSymbol.prototype.assertNoMembers = function () {\n if (this.members.length) {\n throw new Error(\"Illegal state: symbol without members expected, but got \" + JSON.stringify(this) + \".\");\n }\n };\n return StaticSymbol;\n}());\n/**\n * A cache of static symbol used by the StaticReflector to return the same symbol for the\n * same symbol values.\n */\nvar StaticSymbolCache = /** @class */ (function () {\n function StaticSymbolCache() {\n this.cache = new Map();\n }\n StaticSymbolCache.prototype.get = function (declarationFile, name, members) {\n members = members || [];\n var memberSuffix = members.length ? \".\" + members.join('.') : '';\n var key = \"\\\"\" + declarationFile + \"\\\".\" + name + memberSuffix;\n var result = this.cache.get(key);\n if (!result) {\n result = new StaticSymbol(declarationFile, name, members);\n this.cache.set(key, result);\n }\n return result;\n };\n return StaticSymbolCache;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// group 0: \"[prop] or (event) or @trigger\"\n// group 1: \"prop\" from \"[prop]\"\n// group 2: \"event\" from \"(event)\"\n// group 3: \"@trigger\" from \"@trigger\"\nvar HOST_REG_EXP = /^(?:(?:\\[([^\\]]+)\\])|(?:\\(([^\\)]+)\\)))|(\\@[-\\w]+)$/;\nfunction sanitizeIdentifier(name) {\n return name.replace(/\\W/g, '_');\n}\nvar _anonymousTypeIndex = 0;\nfunction identifierName(compileIdentifier) {\n if (!compileIdentifier || !compileIdentifier.reference) {\n return null;\n }\n var ref = compileIdentifier.reference;\n if (ref instanceof StaticSymbol) {\n return ref.name;\n }\n if (ref['__anonymousType']) {\n return ref['__anonymousType'];\n }\n var identifier = stringify(ref);\n if (identifier.indexOf('(') >= 0) {\n // case: anonymous functions!\n identifier = \"anonymous_\" + _anonymousTypeIndex++;\n ref['__anonymousType'] = identifier;\n }\n else {\n identifier = sanitizeIdentifier(identifier);\n }\n return identifier;\n}\nfunction identifierModuleUrl(compileIdentifier) {\n var ref = compileIdentifier.reference;\n if (ref instanceof StaticSymbol) {\n return ref.filePath;\n }\n // Runtime type\n return \"./\" + stringify(ref);\n}\nfunction viewClassName(compType, embeddedTemplateIndex) {\n return \"View_\" + identifierName({ reference: compType }) + \"_\" + embeddedTemplateIndex;\n}\nfunction rendererTypeName(compType) {\n return \"RenderType_\" + identifierName({ reference: compType });\n}\nfunction hostViewClassName(compType) {\n return \"HostView_\" + identifierName({ reference: compType });\n}\nfunction componentFactoryName(compType) {\n return identifierName({ reference: compType }) + \"NgFactory\";\n}\nvar CompileSummaryKind;\n(function (CompileSummaryKind) {\n CompileSummaryKind[CompileSummaryKind[\"Pipe\"] = 0] = \"Pipe\";\n CompileSummaryKind[CompileSummaryKind[\"Directive\"] = 1] = \"Directive\";\n CompileSummaryKind[CompileSummaryKind[\"NgModule\"] = 2] = \"NgModule\";\n CompileSummaryKind[CompileSummaryKind[\"Injectable\"] = 3] = \"Injectable\";\n})(CompileSummaryKind || (CompileSummaryKind = {}));\nfunction tokenName(token) {\n return token.value != null ? sanitizeIdentifier(token.value) : identifierName(token.identifier);\n}\nfunction tokenReference(token) {\n if (token.identifier != null) {\n return token.identifier.reference;\n }\n else {\n return token.value;\n }\n}\n/**\n * Metadata about a stylesheet\n */\nvar CompileStylesheetMetadata = /** @class */ (function () {\n function CompileStylesheetMetadata(_a) {\n var _b = _a === void 0 ? {} : _a, moduleUrl = _b.moduleUrl, styles = _b.styles, styleUrls = _b.styleUrls;\n this.moduleUrl = moduleUrl || null;\n this.styles = _normalizeArray(styles);\n this.styleUrls = _normalizeArray(styleUrls);\n }\n return CompileStylesheetMetadata;\n}());\n/**\n * Metadata regarding compilation of a template.\n */\nvar CompileTemplateMetadata = /** @class */ (function () {\n function CompileTemplateMetadata(_a) {\n var encapsulation = _a.encapsulation, template = _a.template, templateUrl = _a.templateUrl, htmlAst = _a.htmlAst, styles = _a.styles, styleUrls = _a.styleUrls, externalStylesheets = _a.externalStylesheets, animations = _a.animations, ngContentSelectors = _a.ngContentSelectors, interpolation = _a.interpolation, isInline = _a.isInline, preserveWhitespaces = _a.preserveWhitespaces;\n this.encapsulation = encapsulation;\n this.template = template;\n this.templateUrl = templateUrl;\n this.htmlAst = htmlAst;\n this.styles = _normalizeArray(styles);\n this.styleUrls = _normalizeArray(styleUrls);\n this.externalStylesheets = _normalizeArray(externalStylesheets);\n this.animations = animations ? flatten(animations) : [];\n this.ngContentSelectors = ngContentSelectors || [];\n if (interpolation && interpolation.length != 2) {\n throw new Error(\"'interpolation' should have a start and an end symbol.\");\n }\n this.interpolation = interpolation;\n this.isInline = isInline;\n this.preserveWhitespaces = preserveWhitespaces;\n }\n CompileTemplateMetadata.prototype.toSummary = function () {\n return {\n ngContentSelectors: this.ngContentSelectors,\n encapsulation: this.encapsulation,\n };\n };\n return CompileTemplateMetadata;\n}());\n/**\n * Metadata regarding compilation of a directive.\n */\nvar CompileDirectiveMetadata = /** @class */ (function () {\n function CompileDirectiveMetadata(_a) {\n var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, hostListeners = _a.hostListeners, hostProperties = _a.hostProperties, hostAttributes = _a.hostAttributes, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;\n this.isHost = !!isHost;\n this.type = type;\n this.isComponent = isComponent;\n this.selector = selector;\n this.exportAs = exportAs;\n this.changeDetection = changeDetection;\n this.inputs = inputs;\n this.outputs = outputs;\n this.hostListeners = hostListeners;\n this.hostProperties = hostProperties;\n this.hostAttributes = hostAttributes;\n this.providers = _normalizeArray(providers);\n this.viewProviders = _normalizeArray(viewProviders);\n this.queries = _normalizeArray(queries);\n this.guards = guards;\n this.viewQueries = _normalizeArray(viewQueries);\n this.entryComponents = _normalizeArray(entryComponents);\n this.template = template;\n this.componentViewType = componentViewType;\n this.rendererType = rendererType;\n this.componentFactory = componentFactory;\n }\n CompileDirectiveMetadata.create = function (_a) {\n var isHost = _a.isHost, type = _a.type, isComponent = _a.isComponent, selector = _a.selector, exportAs = _a.exportAs, changeDetection = _a.changeDetection, inputs = _a.inputs, outputs = _a.outputs, host = _a.host, providers = _a.providers, viewProviders = _a.viewProviders, queries = _a.queries, guards = _a.guards, viewQueries = _a.viewQueries, entryComponents = _a.entryComponents, template = _a.template, componentViewType = _a.componentViewType, rendererType = _a.rendererType, componentFactory = _a.componentFactory;\n var hostListeners = {};\n var hostProperties = {};\n var hostAttributes = {};\n if (host != null) {\n Object.keys(host).forEach(function (key) {\n var value = host[key];\n var matches = key.match(HOST_REG_EXP);\n if (matches === null) {\n hostAttributes[key] = value;\n }\n else if (matches[1] != null) {\n hostProperties[matches[1]] = value;\n }\n else if (matches[2] != null) {\n hostListeners[matches[2]] = value;\n }\n });\n }\n var inputsMap = {};\n if (inputs != null) {\n inputs.forEach(function (bindConfig) {\n // canonical syntax: `dirProp: elProp`\n // if there is no `:`, use dirProp = elProp\n var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n inputsMap[parts[0]] = parts[1];\n });\n }\n var outputsMap = {};\n if (outputs != null) {\n outputs.forEach(function (bindConfig) {\n // canonical syntax: `dirProp: elProp`\n // if there is no `:`, use dirProp = elProp\n var parts = splitAtColon(bindConfig, [bindConfig, bindConfig]);\n outputsMap[parts[0]] = parts[1];\n });\n }\n return new CompileDirectiveMetadata({\n isHost: isHost,\n type: type,\n isComponent: !!isComponent, selector: selector, exportAs: exportAs, changeDetection: changeDetection,\n inputs: inputsMap,\n outputs: outputsMap,\n hostListeners: hostListeners,\n hostProperties: hostProperties,\n hostAttributes: hostAttributes,\n providers: providers,\n viewProviders: viewProviders,\n queries: queries,\n guards: guards,\n viewQueries: viewQueries,\n entryComponents: entryComponents,\n template: template,\n componentViewType: componentViewType,\n rendererType: rendererType,\n componentFactory: componentFactory,\n });\n };\n CompileDirectiveMetadata.prototype.toSummary = function () {\n return {\n summaryKind: CompileSummaryKind.Directive,\n type: this.type,\n isComponent: this.isComponent,\n selector: this.selector,\n exportAs: this.exportAs,\n inputs: this.inputs,\n outputs: this.outputs,\n hostListeners: this.hostListeners,\n hostProperties: this.hostProperties,\n hostAttributes: this.hostAttributes,\n providers: this.providers,\n viewProviders: this.viewProviders,\n queries: this.queries,\n guards: this.guards,\n viewQueries: this.viewQueries,\n entryComponents: this.entryComponents,\n changeDetection: this.changeDetection,\n template: this.template && this.template.toSummary(),\n componentViewType: this.componentViewType,\n rendererType: this.rendererType,\n componentFactory: this.componentFactory\n };\n };\n return CompileDirectiveMetadata;\n}());\nvar CompilePipeMetadata = /** @class */ (function () {\n function CompilePipeMetadata(_a) {\n var type = _a.type, name = _a.name, pure = _a.pure;\n this.type = type;\n this.name = name;\n this.pure = !!pure;\n }\n CompilePipeMetadata.prototype.toSummary = function () {\n return {\n summaryKind: CompileSummaryKind.Pipe,\n type: this.type,\n name: this.name,\n pure: this.pure\n };\n };\n return CompilePipeMetadata;\n}());\nvar CompileShallowModuleMetadata = /** @class */ (function () {\n function CompileShallowModuleMetadata() {\n }\n return CompileShallowModuleMetadata;\n}());\n/**\n * Metadata regarding compilation of a module.\n */\nvar CompileNgModuleMetadata = /** @class */ (function () {\n function CompileNgModuleMetadata(_a) {\n var type = _a.type, providers = _a.providers, declaredDirectives = _a.declaredDirectives, exportedDirectives = _a.exportedDirectives, declaredPipes = _a.declaredPipes, exportedPipes = _a.exportedPipes, entryComponents = _a.entryComponents, bootstrapComponents = _a.bootstrapComponents, importedModules = _a.importedModules, exportedModules = _a.exportedModules, schemas = _a.schemas, transitiveModule = _a.transitiveModule, id = _a.id;\n this.type = type || null;\n this.declaredDirectives = _normalizeArray(declaredDirectives);\n this.exportedDirectives = _normalizeArray(exportedDirectives);\n this.declaredPipes = _normalizeArray(declaredPipes);\n this.exportedPipes = _normalizeArray(exportedPipes);\n this.providers = _normalizeArray(providers);\n this.entryComponents = _normalizeArray(entryComponents);\n this.bootstrapComponents = _normalizeArray(bootstrapComponents);\n this.importedModules = _normalizeArray(importedModules);\n this.exportedModules = _normalizeArray(exportedModules);\n this.schemas = _normalizeArray(schemas);\n this.id = id || null;\n this.transitiveModule = transitiveModule || null;\n }\n CompileNgModuleMetadata.prototype.toSummary = function () {\n var module = this.transitiveModule;\n return {\n summaryKind: CompileSummaryKind.NgModule,\n type: this.type,\n entryComponents: module.entryComponents,\n providers: module.providers,\n modules: module.modules,\n exportedDirectives: module.exportedDirectives,\n exportedPipes: module.exportedPipes\n };\n };\n return CompileNgModuleMetadata;\n}());\nvar TransitiveCompileNgModuleMetadata = /** @class */ (function () {\n function TransitiveCompileNgModuleMetadata() {\n this.directivesSet = new Set();\n this.directives = [];\n this.exportedDirectivesSet = new Set();\n this.exportedDirectives = [];\n this.pipesSet = new Set();\n this.pipes = [];\n this.exportedPipesSet = new Set();\n this.exportedPipes = [];\n this.modulesSet = new Set();\n this.modules = [];\n this.entryComponentsSet = new Set();\n this.entryComponents = [];\n this.providers = [];\n }\n TransitiveCompileNgModuleMetadata.prototype.addProvider = function (provider, module) {\n this.providers.push({ provider: provider, module: module });\n };\n TransitiveCompileNgModuleMetadata.prototype.addDirective = function (id) {\n if (!this.directivesSet.has(id.reference)) {\n this.directivesSet.add(id.reference);\n this.directives.push(id);\n }\n };\n TransitiveCompileNgModuleMetadata.prototype.addExportedDirective = function (id) {\n if (!this.exportedDirectivesSet.has(id.reference)) {\n this.exportedDirectivesSet.add(id.reference);\n this.exportedDirectives.push(id);\n }\n };\n TransitiveCompileNgModuleMetadata.prototype.addPipe = function (id) {\n if (!this.pipesSet.has(id.reference)) {\n this.pipesSet.add(id.reference);\n this.pipes.push(id);\n }\n };\n TransitiveCompileNgModuleMetadata.prototype.addExportedPipe = function (id) {\n if (!this.exportedPipesSet.has(id.reference)) {\n this.exportedPipesSet.add(id.reference);\n this.exportedPipes.push(id);\n }\n };\n TransitiveCompileNgModuleMetadata.prototype.addModule = function (id) {\n if (!this.modulesSet.has(id.reference)) {\n this.modulesSet.add(id.reference);\n this.modules.push(id);\n }\n };\n TransitiveCompileNgModuleMetadata.prototype.addEntryComponent = function (ec) {\n if (!this.entryComponentsSet.has(ec.componentType)) {\n this.entryComponentsSet.add(ec.componentType);\n this.entryComponents.push(ec);\n }\n };\n return TransitiveCompileNgModuleMetadata;\n}());\nfunction _normalizeArray(obj) {\n return obj || [];\n}\nvar ProviderMeta = /** @class */ (function () {\n function ProviderMeta(token, _a) {\n var useClass = _a.useClass, useValue = _a.useValue, useExisting = _a.useExisting, useFactory = _a.useFactory, deps = _a.deps, multi = _a.multi;\n this.token = token;\n this.useClass = useClass || null;\n this.useValue = useValue;\n this.useExisting = useExisting;\n this.useFactory = useFactory || null;\n this.dependencies = deps || null;\n this.multi = !!multi;\n }\n return ProviderMeta;\n}());\nfunction flatten(list) {\n return list.reduce(function (flat, item) {\n var flatItem = Array.isArray(item) ? flatten(item) : item;\n return flat.concat(flatItem);\n }, []);\n}\nfunction jitSourceUrl(url) {\n // Note: We need 3 \"/\" so that ng shows up as a separate domain\n // in the chrome dev tools.\n return url.replace(/(\\w+:\\/\\/[\\w:-]+)?(\\/+)?/, 'ng:///');\n}\nfunction templateSourceUrl(ngModuleType, compMeta, templateMeta) {\n var url;\n if (templateMeta.isInline) {\n if (compMeta.type.reference instanceof StaticSymbol) {\n // Note: a .ts file might contain multiple components with inline templates,\n // so we need to give them unique urls, as these will be used for sourcemaps.\n url = compMeta.type.reference.filePath + \".\" + compMeta.type.reference.name + \".html\";\n }\n else {\n url = identifierName(ngModuleType) + \"/\" + identifierName(compMeta.type) + \".html\";\n }\n }\n else {\n url = templateMeta.templateUrl;\n }\n return compMeta.type.reference instanceof StaticSymbol ? url : jitSourceUrl(url);\n}\nfunction sharedStylesheetJitUrl(meta, id) {\n var pathParts = meta.moduleUrl.split(/\\/\\\\/g);\n var baseName = pathParts[pathParts.length - 1];\n return jitSourceUrl(\"css/\" + id + baseName + \".ngstyle.js\");\n}\nfunction ngModuleJitUrl(moduleMeta) {\n return jitSourceUrl(identifierName(moduleMeta.type) + \"/module.ngfactory.js\");\n}\nfunction templateJitUrl(ngModuleType, compMeta) {\n return jitSourceUrl(identifierName(ngModuleType) + \"/\" + identifierName(compMeta.type) + \".ngfactory.js\");\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 path is an ordered set of elements. Typically a path is to a\n * particular offset in a source file. The head of the list is the top\n * most node. The tail is the node that contains the offset directly.\n *\n * For example, the expression `a + b + c` might have an ast that looks\n * like:\n * +\n * / \\\n * a +\n * / \\\n * b c\n *\n * The path to the node at offset 9 would be `['+' at 1-10, '+' at 7-10,\n * 'c' at 9-10]` and the path the node at offset 1 would be\n * `['+' at 1-10, 'a' at 1-2]`.\n */\nvar AstPath = /** @class */ (function () {\n function AstPath(path, position) {\n if (position === void 0) { position = -1; }\n this.path = path;\n this.position = position;\n }\n Object.defineProperty(AstPath.prototype, \"empty\", {\n get: function () { return !this.path || !this.path.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"head\", {\n get: function () { return this.path[0]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AstPath.prototype, \"tail\", {\n get: function () { return this.path[this.path.length - 1]; },\n enumerable: true,\n configurable: true\n });\n AstPath.prototype.parentOf = function (node) {\n return node && this.path[this.path.indexOf(node) - 1];\n };\n AstPath.prototype.childOf = function (node) { return this.path[this.path.indexOf(node) + 1]; };\n AstPath.prototype.first = function (ctor) {\n for (var i = this.path.length - 1; i >= 0; i--) {\n var item = this.path[i];\n if (item instanceof ctor)\n return item;\n }\n };\n AstPath.prototype.push = function (node) { this.path.push(node); };\n AstPath.prototype.pop = function () { return this.path.pop(); };\n return AstPath;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 Text = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };\n return Text;\n}());\nvar Expansion = /** @class */ (function () {\n function Expansion(switchValue, type, cases, sourceSpan, switchValueSourceSpan) {\n this.switchValue = switchValue;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n this.switchValueSourceSpan = switchValueSourceSpan;\n }\n Expansion.prototype.visit = function (visitor, context) { return visitor.visitExpansion(this, context); };\n return Expansion;\n}());\nvar ExpansionCase = /** @class */ (function () {\n function ExpansionCase(value, expression, sourceSpan, valueSourceSpan, expSourceSpan) {\n this.value = value;\n this.expression = expression;\n this.sourceSpan = sourceSpan;\n this.valueSourceSpan = valueSourceSpan;\n this.expSourceSpan = expSourceSpan;\n }\n ExpansionCase.prototype.visit = function (visitor, context) { return visitor.visitExpansionCase(this, context); };\n return ExpansionCase;\n}());\nvar Attribute = /** @class */ (function () {\n function Attribute(name, value, sourceSpan, valueSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n this.valueSpan = valueSpan;\n }\n Attribute.prototype.visit = function (visitor, context) { return visitor.visitAttribute(this, context); };\n return Attribute;\n}());\nvar Element = /** @class */ (function () {\n function Element(name, attrs, children, sourceSpan, startSourceSpan, endSourceSpan) {\n if (startSourceSpan === void 0) { startSourceSpan = null; }\n if (endSourceSpan === void 0) { endSourceSpan = null; }\n this.name = name;\n this.attrs = attrs;\n this.children = children;\n this.sourceSpan = sourceSpan;\n this.startSourceSpan = startSourceSpan;\n this.endSourceSpan = endSourceSpan;\n }\n Element.prototype.visit = function (visitor, context) { return visitor.visitElement(this, context); };\n return Element;\n}());\nvar Comment = /** @class */ (function () {\n function Comment(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Comment.prototype.visit = function (visitor, context) { return visitor.visitComment(this, context); };\n return Comment;\n}());\nfunction visitAll(visitor, nodes, context) {\n if (context === void 0) { context = null; }\n var result = [];\n var visit = visitor.visit ?\n function (ast) { return visitor.visit(ast, context) || ast.visit(visitor, context); } :\n function (ast) { return ast.visit(visitor, context); };\n nodes.forEach(function (ast) {\n var astResult = visit(ast);\n if (astResult) {\n result.push(astResult);\n }\n });\n return result;\n}\nvar RecursiveVisitor = /** @class */ (function () {\n function RecursiveVisitor() {\n }\n RecursiveVisitor.prototype.visitElement = function (ast, context) {\n this.visitChildren(context, function (visit) {\n visit(ast.attrs);\n visit(ast.children);\n });\n };\n RecursiveVisitor.prototype.visitAttribute = function (ast, context) { };\n RecursiveVisitor.prototype.visitText = function (ast, context) { };\n RecursiveVisitor.prototype.visitComment = function (ast, context) { };\n RecursiveVisitor.prototype.visitExpansion = function (ast, context) {\n return this.visitChildren(context, function (visit) { visit(ast.cases); });\n };\n RecursiveVisitor.prototype.visitExpansionCase = function (ast, context) { };\n RecursiveVisitor.prototype.visitChildren = function (context, cb) {\n var results = [];\n var t = this;\n function visit(children) {\n if (children)\n results.push(visitAll(t, children, context));\n }\n cb(visit);\n return [].concat.apply([], results);\n };\n return RecursiveVisitor;\n}());\nfunction spanOf(ast) {\n var start = ast.sourceSpan.start.offset;\n var end = ast.sourceSpan.end.offset;\n if (ast instanceof Element) {\n if (ast.endSourceSpan) {\n end = ast.endSourceSpan.end.offset;\n }\n else if (ast.children && ast.children.length) {\n end = spanOf(ast.children[ast.children.length - 1]).end;\n }\n }\n return { start: start, end: end };\n}\nfunction findNode(nodes, position) {\n var path = [];\n var visitor = new /** @class */ (function (_super) {\n __extends(class_1, _super);\n function class_1() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n class_1.prototype.visit = function (ast, context) {\n var span = spanOf(ast);\n if (span.start <= position && position < span.end) {\n path.push(ast);\n }\n else {\n // Returning a value here will result in the children being skipped.\n return true;\n }\n };\n return class_1;\n }(RecursiveVisitor));\n visitAll(visitor, nodes);\n return new AstPath(path, position);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 assertArrayOfStrings(identifier, value) {\n if (value == null) {\n return;\n }\n if (!Array.isArray(value)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n for (var i = 0; i < value.length; i += 1) {\n if (typeof value[i] !== 'string') {\n throw new Error(\"Expected '\" + identifier + \"' to be an array of strings.\");\n }\n }\n}\nvar INTERPOLATION_BLACKLIST_REGEXPS = [\n /^\\s*$/,\n /[<>]/,\n /^[{}]$/,\n /&(#|[a-z])/i,\n /^\\/\\//,\n];\nfunction assertInterpolationSymbols(identifier, value) {\n if (value != null && !(Array.isArray(value) && value.length == 2)) {\n throw new Error(\"Expected '\" + identifier + \"' to be an array, [start, end].\");\n }\n else if (value != null) {\n var start_1 = value[0];\n var end_1 = value[1];\n // black list checking\n INTERPOLATION_BLACKLIST_REGEXPS.forEach(function (regexp) {\n if (regexp.test(start_1) || regexp.test(end_1)) {\n throw new Error(\"['\" + start_1 + \"', '\" + end_1 + \"'] contains unusable interpolation symbol.\");\n }\n });\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 InterpolationConfig = /** @class */ (function () {\n function InterpolationConfig(start, end) {\n this.start = start;\n this.end = end;\n }\n InterpolationConfig.fromArray = function (markers) {\n if (!markers) {\n return DEFAULT_INTERPOLATION_CONFIG;\n }\n assertInterpolationSymbols('interpolation', markers);\n return new InterpolationConfig(markers[0], markers[1]);\n };\n return InterpolationConfig;\n}());\nvar DEFAULT_INTERPOLATION_CONFIG = new InterpolationConfig('{{', '}}');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 StyleWithImports = /** @class */ (function () {\n function StyleWithImports(style, styleUrls) {\n this.style = style;\n this.styleUrls = styleUrls;\n }\n return StyleWithImports;\n}());\nfunction isStyleUrlResolvable(url) {\n if (url == null || url.length === 0 || url[0] == '/')\n return false;\n var schemeMatch = url.match(URL_WITH_SCHEMA_REGEXP);\n return schemeMatch === null || schemeMatch[1] == 'package' || schemeMatch[1] == 'asset';\n}\n/**\n * Rewrites stylesheets by resolving and removing the @import urls that\n * are either relative or don't have a `package:` scheme\n */\nfunction extractStyleUrls(resolver, baseUrl, cssText) {\n var foundUrls = [];\n var modifiedCssText = cssText.replace(CSS_STRIPPABLE_COMMENT_REGEXP, '')\n .replace(CSS_IMPORT_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var url = m[1] || m[2];\n if (!isStyleUrlResolvable(url)) {\n // Do not attempt to resolve non-package absolute URLs with URI\n // scheme\n return m[0];\n }\n foundUrls.push(resolver.resolve(baseUrl, url));\n return '';\n });\n return new StyleWithImports(modifiedCssText, foundUrls);\n}\nvar CSS_IMPORT_REGEXP = /@import\\s+(?:url\\()?\\s*(?:(?:['\"]([^'\"]*))|([^;\\)\\s]*))[^;]*;?/g;\nvar CSS_STRIPPABLE_COMMENT_REGEXP = /\\/\\*(?!#\\s*(?:sourceURL|sourceMappingURL)=)[\\s\\S]+?\\*\\//g;\nvar URL_WITH_SCHEMA_REGEXP = /^([^:/?#]+):/;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TagContentType;\n(function (TagContentType) {\n TagContentType[TagContentType[\"RAW_TEXT\"] = 0] = \"RAW_TEXT\";\n TagContentType[TagContentType[\"ESCAPABLE_RAW_TEXT\"] = 1] = \"ESCAPABLE_RAW_TEXT\";\n TagContentType[TagContentType[\"PARSABLE_DATA\"] = 2] = \"PARSABLE_DATA\";\n})(TagContentType || (TagContentType = {}));\nfunction splitNsName(elementName) {\n if (elementName[0] != ':') {\n return [null, elementName];\n }\n var colonIndex = elementName.indexOf(':', 1);\n if (colonIndex == -1) {\n throw new Error(\"Unsupported format \\\"\" + elementName + \"\\\" expecting \\\":namespace:name\\\"\");\n }\n return [elementName.slice(1, colonIndex), elementName.slice(colonIndex + 1)];\n}\n// `<ng-container>` tags work the same regardless the namespace\nfunction isNgContainer(tagName) {\n return splitNsName(tagName)[1] === 'ng-container';\n}\n// `<ng-content>` tags work the same regardless the namespace\nfunction isNgContent(tagName) {\n return splitNsName(tagName)[1] === 'ng-content';\n}\n// `<ng-template>` tags work the same regardless the namespace\nfunction isNgTemplate(tagName) {\n return splitNsName(tagName)[1] === 'ng-template';\n}\nfunction getNsPrefix(fullName) {\n return fullName === null ? null : splitNsName(fullName)[0];\n}\nfunction mergeNsAndName(prefix, localName) {\n return prefix ? \":\" + prefix + \":\" + localName : localName;\n}\n// see http://www.w3.org/TR/html51/syntax.html#named-character-references\n// see https://html.spec.whatwg.org/multipage/entities.json\n// This list is not exhaustive to keep the compiler footprint low.\n// The `&#123;` / `&#x1ab;` syntax should be used when the named character reference does not\n// exist.\nvar NAMED_ENTITIES = {\n 'Aacute': '\\u00C1',\n 'aacute': '\\u00E1',\n 'Acirc': '\\u00C2',\n 'acirc': '\\u00E2',\n 'acute': '\\u00B4',\n 'AElig': '\\u00C6',\n 'aelig': '\\u00E6',\n 'Agrave': '\\u00C0',\n 'agrave': '\\u00E0',\n 'alefsym': '\\u2135',\n 'Alpha': '\\u0391',\n 'alpha': '\\u03B1',\n 'amp': '&',\n 'and': '\\u2227',\n 'ang': '\\u2220',\n 'apos': '\\u0027',\n 'Aring': '\\u00C5',\n 'aring': '\\u00E5',\n 'asymp': '\\u2248',\n 'Atilde': '\\u00C3',\n 'atilde': '\\u00E3',\n 'Auml': '\\u00C4',\n 'auml': '\\u00E4',\n 'bdquo': '\\u201E',\n 'Beta': '\\u0392',\n 'beta': '\\u03B2',\n 'brvbar': '\\u00A6',\n 'bull': '\\u2022',\n 'cap': '\\u2229',\n 'Ccedil': '\\u00C7',\n 'ccedil': '\\u00E7',\n 'cedil': '\\u00B8',\n 'cent': '\\u00A2',\n 'Chi': '\\u03A7',\n 'chi': '\\u03C7',\n 'circ': '\\u02C6',\n 'clubs': '\\u2663',\n 'cong': '\\u2245',\n 'copy': '\\u00A9',\n 'crarr': '\\u21B5',\n 'cup': '\\u222A',\n 'curren': '\\u00A4',\n 'dagger': '\\u2020',\n 'Dagger': '\\u2021',\n 'darr': '\\u2193',\n 'dArr': '\\u21D3',\n 'deg': '\\u00B0',\n 'Delta': '\\u0394',\n 'delta': '\\u03B4',\n 'diams': '\\u2666',\n 'divide': '\\u00F7',\n 'Eacute': '\\u00C9',\n 'eacute': '\\u00E9',\n 'Ecirc': '\\u00CA',\n 'ecirc': '\\u00EA',\n 'Egrave': '\\u00C8',\n 'egrave': '\\u00E8',\n 'empty': '\\u2205',\n 'emsp': '\\u2003',\n 'ensp': '\\u2002',\n 'Epsilon': '\\u0395',\n 'epsilon': '\\u03B5',\n 'equiv': '\\u2261',\n 'Eta': '\\u0397',\n 'eta': '\\u03B7',\n 'ETH': '\\u00D0',\n 'eth': '\\u00F0',\n 'Euml': '\\u00CB',\n 'euml': '\\u00EB',\n 'euro': '\\u20AC',\n 'exist': '\\u2203',\n 'fnof': '\\u0192',\n 'forall': '\\u2200',\n 'frac12': '\\u00BD',\n 'frac14': '\\u00BC',\n 'frac34': '\\u00BE',\n 'frasl': '\\u2044',\n 'Gamma': '\\u0393',\n 'gamma': '\\u03B3',\n 'ge': '\\u2265',\n 'gt': '>',\n 'harr': '\\u2194',\n 'hArr': '\\u21D4',\n 'hearts': '\\u2665',\n 'hellip': '\\u2026',\n 'Iacute': '\\u00CD',\n 'iacute': '\\u00ED',\n 'Icirc': '\\u00CE',\n 'icirc': '\\u00EE',\n 'iexcl': '\\u00A1',\n 'Igrave': '\\u00CC',\n 'igrave': '\\u00EC',\n 'image': '\\u2111',\n 'infin': '\\u221E',\n 'int': '\\u222B',\n 'Iota': '\\u0399',\n 'iota': '\\u03B9',\n 'iquest': '\\u00BF',\n 'isin': '\\u2208',\n 'Iuml': '\\u00CF',\n 'iuml': '\\u00EF',\n 'Kappa': '\\u039A',\n 'kappa': '\\u03BA',\n 'Lambda': '\\u039B',\n 'lambda': '\\u03BB',\n 'lang': '\\u27E8',\n 'laquo': '\\u00AB',\n 'larr': '\\u2190',\n 'lArr': '\\u21D0',\n 'lceil': '\\u2308',\n 'ldquo': '\\u201C',\n 'le': '\\u2264',\n 'lfloor': '\\u230A',\n 'lowast': '\\u2217',\n 'loz': '\\u25CA',\n 'lrm': '\\u200E',\n 'lsaquo': '\\u2039',\n 'lsquo': '\\u2018',\n 'lt': '<',\n 'macr': '\\u00AF',\n 'mdash': '\\u2014',\n 'micro': '\\u00B5',\n 'middot': '\\u00B7',\n 'minus': '\\u2212',\n 'Mu': '\\u039C',\n 'mu': '\\u03BC',\n 'nabla': '\\u2207',\n 'nbsp': '\\u00A0',\n 'ndash': '\\u2013',\n 'ne': '\\u2260',\n 'ni': '\\u220B',\n 'not': '\\u00AC',\n 'notin': '\\u2209',\n 'nsub': '\\u2284',\n 'Ntilde': '\\u00D1',\n 'ntilde': '\\u00F1',\n 'Nu': '\\u039D',\n 'nu': '\\u03BD',\n 'Oacute': '\\u00D3',\n 'oacute': '\\u00F3',\n 'Ocirc': '\\u00D4',\n 'ocirc': '\\u00F4',\n 'OElig': '\\u0152',\n 'oelig': '\\u0153',\n 'Ograve': '\\u00D2',\n 'ograve': '\\u00F2',\n 'oline': '\\u203E',\n 'Omega': '\\u03A9',\n 'omega': '\\u03C9',\n 'Omicron': '\\u039F',\n 'omicron': '\\u03BF',\n 'oplus': '\\u2295',\n 'or': '\\u2228',\n 'ordf': '\\u00AA',\n 'ordm': '\\u00BA',\n 'Oslash': '\\u00D8',\n 'oslash': '\\u00F8',\n 'Otilde': '\\u00D5',\n 'otilde': '\\u00F5',\n 'otimes': '\\u2297',\n 'Ouml': '\\u00D6',\n 'ouml': '\\u00F6',\n 'para': '\\u00B6',\n 'permil': '\\u2030',\n 'perp': '\\u22A5',\n 'Phi': '\\u03A6',\n 'phi': '\\u03C6',\n 'Pi': '\\u03A0',\n 'pi': '\\u03C0',\n 'piv': '\\u03D6',\n 'plusmn': '\\u00B1',\n 'pound': '\\u00A3',\n 'prime': '\\u2032',\n 'Prime': '\\u2033',\n 'prod': '\\u220F',\n 'prop': '\\u221D',\n 'Psi': '\\u03A8',\n 'psi': '\\u03C8',\n 'quot': '\\u0022',\n 'radic': '\\u221A',\n 'rang': '\\u27E9',\n 'raquo': '\\u00BB',\n 'rarr': '\\u2192',\n 'rArr': '\\u21D2',\n 'rceil': '\\u2309',\n 'rdquo': '\\u201D',\n 'real': '\\u211C',\n 'reg': '\\u00AE',\n 'rfloor': '\\u230B',\n 'Rho': '\\u03A1',\n 'rho': '\\u03C1',\n 'rlm': '\\u200F',\n 'rsaquo': '\\u203A',\n 'rsquo': '\\u2019',\n 'sbquo': '\\u201A',\n 'Scaron': '\\u0160',\n 'scaron': '\\u0161',\n 'sdot': '\\u22C5',\n 'sect': '\\u00A7',\n 'shy': '\\u00AD',\n 'Sigma': '\\u03A3',\n 'sigma': '\\u03C3',\n 'sigmaf': '\\u03C2',\n 'sim': '\\u223C',\n 'spades': '\\u2660',\n 'sub': '\\u2282',\n 'sube': '\\u2286',\n 'sum': '\\u2211',\n 'sup': '\\u2283',\n 'sup1': '\\u00B9',\n 'sup2': '\\u00B2',\n 'sup3': '\\u00B3',\n 'supe': '\\u2287',\n 'szlig': '\\u00DF',\n 'Tau': '\\u03A4',\n 'tau': '\\u03C4',\n 'there4': '\\u2234',\n 'Theta': '\\u0398',\n 'theta': '\\u03B8',\n 'thetasym': '\\u03D1',\n 'thinsp': '\\u2009',\n 'THORN': '\\u00DE',\n 'thorn': '\\u00FE',\n 'tilde': '\\u02DC',\n 'times': '\\u00D7',\n 'trade': '\\u2122',\n 'Uacute': '\\u00DA',\n 'uacute': '\\u00FA',\n 'uarr': '\\u2191',\n 'uArr': '\\u21D1',\n 'Ucirc': '\\u00DB',\n 'ucirc': '\\u00FB',\n 'Ugrave': '\\u00D9',\n 'ugrave': '\\u00F9',\n 'uml': '\\u00A8',\n 'upsih': '\\u03D2',\n 'Upsilon': '\\u03A5',\n 'upsilon': '\\u03C5',\n 'Uuml': '\\u00DC',\n 'uuml': '\\u00FC',\n 'weierp': '\\u2118',\n 'Xi': '\\u039E',\n 'xi': '\\u03BE',\n 'Yacute': '\\u00DD',\n 'yacute': '\\u00FD',\n 'yen': '\\u00A5',\n 'yuml': '\\u00FF',\n 'Yuml': '\\u0178',\n 'Zeta': '\\u0396',\n 'zeta': '\\u03B6',\n 'zwj': '\\u200D',\n 'zwnj': '\\u200C',\n};\n// The &ngsp; pseudo-entity is denoting a space. see:\n// https://github.com/dart-lang/angular/blob/0bb611387d29d65b5af7f9d2515ab571fd3fbee4/_tests/test/compiler/preserve_whitespace_test.dart\nvar NGSP_UNICODE = '\\uE500';\nNAMED_ENTITIES['ngsp'] = NGSP_UNICODE;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NG_CONTENT_SELECT_ATTR = 'select';\nvar LINK_ELEMENT = 'link';\nvar LINK_STYLE_REL_ATTR = 'rel';\nvar LINK_STYLE_HREF_ATTR = 'href';\nvar LINK_STYLE_REL_VALUE = 'stylesheet';\nvar STYLE_ELEMENT = 'style';\nvar SCRIPT_ELEMENT = 'script';\nvar NG_NON_BINDABLE_ATTR = 'ngNonBindable';\nvar NG_PROJECT_AS = 'ngProjectAs';\nfunction preparseElement(ast) {\n var selectAttr = null;\n var hrefAttr = null;\n var relAttr = null;\n var nonBindable = false;\n var projectAs = null;\n ast.attrs.forEach(function (attr) {\n var lcAttrName = attr.name.toLowerCase();\n if (lcAttrName == NG_CONTENT_SELECT_ATTR) {\n selectAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_HREF_ATTR) {\n hrefAttr = attr.value;\n }\n else if (lcAttrName == LINK_STYLE_REL_ATTR) {\n relAttr = attr.value;\n }\n else if (attr.name == NG_NON_BINDABLE_ATTR) {\n nonBindable = true;\n }\n else if (attr.name == NG_PROJECT_AS) {\n if (attr.value.length > 0) {\n projectAs = attr.value;\n }\n }\n });\n selectAttr = normalizeNgContentSelect(selectAttr);\n var nodeName = ast.name.toLowerCase();\n var type = PreparsedElementType.OTHER;\n if (isNgContent(nodeName)) {\n type = PreparsedElementType.NG_CONTENT;\n }\n else if (nodeName == STYLE_ELEMENT) {\n type = PreparsedElementType.STYLE;\n }\n else if (nodeName == SCRIPT_ELEMENT) {\n type = PreparsedElementType.SCRIPT;\n }\n else if (nodeName == LINK_ELEMENT && relAttr == LINK_STYLE_REL_VALUE) {\n type = PreparsedElementType.STYLESHEET;\n }\n return new PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs);\n}\nvar PreparsedElementType;\n(function (PreparsedElementType) {\n PreparsedElementType[PreparsedElementType[\"NG_CONTENT\"] = 0] = \"NG_CONTENT\";\n PreparsedElementType[PreparsedElementType[\"STYLE\"] = 1] = \"STYLE\";\n PreparsedElementType[PreparsedElementType[\"STYLESHEET\"] = 2] = \"STYLESHEET\";\n PreparsedElementType[PreparsedElementType[\"SCRIPT\"] = 3] = \"SCRIPT\";\n PreparsedElementType[PreparsedElementType[\"OTHER\"] = 4] = \"OTHER\";\n})(PreparsedElementType || (PreparsedElementType = {}));\nvar PreparsedElement = /** @class */ (function () {\n function PreparsedElement(type, selectAttr, hrefAttr, nonBindable, projectAs) {\n this.type = type;\n this.selectAttr = selectAttr;\n this.hrefAttr = hrefAttr;\n this.nonBindable = nonBindable;\n this.projectAs = projectAs;\n }\n return PreparsedElement;\n}());\nfunction normalizeNgContentSelect(selectAttr) {\n if (selectAttr === null || selectAttr.length === 0) {\n return '*';\n }\n return selectAttr;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 DirectiveNormalizer = /** @class */ (function () {\n function DirectiveNormalizer(_resourceLoader, _urlResolver, _htmlParser, _config) {\n this._resourceLoader = _resourceLoader;\n this._urlResolver = _urlResolver;\n this._htmlParser = _htmlParser;\n this._config = _config;\n this._resourceLoaderCache = new Map();\n }\n DirectiveNormalizer.prototype.clearCache = function () { this._resourceLoaderCache.clear(); };\n DirectiveNormalizer.prototype.clearCacheFor = function (normalizedDirective) {\n var _this = this;\n if (!normalizedDirective.isComponent) {\n return;\n }\n var template = normalizedDirective.template;\n this._resourceLoaderCache.delete(template.templateUrl);\n template.externalStylesheets.forEach(function (stylesheet) { _this._resourceLoaderCache.delete(stylesheet.moduleUrl); });\n };\n DirectiveNormalizer.prototype._fetch = function (url) {\n var result = this._resourceLoaderCache.get(url);\n if (!result) {\n result = this._resourceLoader.get(url);\n this._resourceLoaderCache.set(url, result);\n }\n return result;\n };\n DirectiveNormalizer.prototype.normalizeTemplate = function (prenormData) {\n var _this = this;\n if (isDefined(prenormData.template)) {\n if (isDefined(prenormData.templateUrl)) {\n throw syntaxError(\"'\" + stringify(prenormData.componentType) + \"' component cannot define both template and templateUrl\");\n }\n if (typeof prenormData.template !== 'string') {\n throw syntaxError(\"The template specified for component \" + stringify(prenormData.componentType) + \" is not a string\");\n }\n }\n else if (isDefined(prenormData.templateUrl)) {\n if (typeof prenormData.templateUrl !== 'string') {\n throw syntaxError(\"The templateUrl specified for component \" + stringify(prenormData.componentType) + \" is not a string\");\n }\n }\n else {\n throw syntaxError(\"No template specified for component \" + stringify(prenormData.componentType));\n }\n if (isDefined(prenormData.preserveWhitespaces) &&\n typeof prenormData.preserveWhitespaces !== 'boolean') {\n throw syntaxError(\"The preserveWhitespaces option for component \" + stringify(prenormData.componentType) + \" must be a boolean\");\n }\n return SyncAsync.then(this._preParseTemplate(prenormData), function (preparsedTemplate) { return _this._normalizeTemplateMetadata(prenormData, preparsedTemplate); });\n };\n DirectiveNormalizer.prototype._preParseTemplate = function (prenomData) {\n var _this = this;\n var template;\n var templateUrl;\n if (prenomData.template != null) {\n template = prenomData.template;\n templateUrl = prenomData.moduleUrl;\n }\n else {\n templateUrl = this._urlResolver.resolve(prenomData.moduleUrl, prenomData.templateUrl);\n template = this._fetch(templateUrl);\n }\n return SyncAsync.then(template, function (template) { return _this._preparseLoadedTemplate(prenomData, template, templateUrl); });\n };\n DirectiveNormalizer.prototype._preparseLoadedTemplate = function (prenormData, template, templateAbsUrl) {\n var isInline = !!prenormData.template;\n var interpolationConfig = InterpolationConfig.fromArray(prenormData.interpolation);\n var rootNodesAndErrors = this._htmlParser.parse(template, templateSourceUrl({ reference: prenormData.ngModuleType }, { type: { reference: prenormData.componentType } }, { isInline: isInline, templateUrl: templateAbsUrl }), true, interpolationConfig);\n if (rootNodesAndErrors.errors.length > 0) {\n var errorString = rootNodesAndErrors.errors.join('\\n');\n throw syntaxError(\"Template parse errors:\\n\" + errorString);\n }\n var templateMetadataStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: prenormData.styles, moduleUrl: prenormData.moduleUrl }));\n var visitor = new TemplatePreparseVisitor();\n visitAll(visitor, rootNodesAndErrors.rootNodes);\n var templateStyles = this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: visitor.styles, styleUrls: visitor.styleUrls, moduleUrl: templateAbsUrl }));\n var styles = templateMetadataStyles.styles.concat(templateStyles.styles);\n var inlineStyleUrls = templateMetadataStyles.styleUrls.concat(templateStyles.styleUrls);\n var styleUrls = this\n ._normalizeStylesheet(new CompileStylesheetMetadata({ styleUrls: prenormData.styleUrls, moduleUrl: prenormData.moduleUrl }))\n .styleUrls;\n return {\n template: template,\n templateUrl: templateAbsUrl, isInline: isInline,\n htmlAst: rootNodesAndErrors, styles: styles, inlineStyleUrls: inlineStyleUrls, styleUrls: styleUrls,\n ngContentSelectors: visitor.ngContentSelectors,\n };\n };\n DirectiveNormalizer.prototype._normalizeTemplateMetadata = function (prenormData, preparsedTemplate) {\n var _this = this;\n return SyncAsync.then(this._loadMissingExternalStylesheets(preparsedTemplate.styleUrls.concat(preparsedTemplate.inlineStyleUrls)), function (externalStylesheets) { return _this._normalizeLoadedTemplateMetadata(prenormData, preparsedTemplate, externalStylesheets); });\n };\n DirectiveNormalizer.prototype._normalizeLoadedTemplateMetadata = function (prenormData, preparsedTemplate, stylesheets) {\n // Algorithm:\n // - produce exactly 1 entry per original styleUrl in\n // CompileTemplateMetadata.externalStylesheets with all styles inlined\n // - inline all styles that are referenced by the template into CompileTemplateMetadata.styles.\n // Reason: be able to determine how many stylesheets there are even without loading\n // the template nor the stylesheets, so we can create a stub for TypeScript always synchronously\n // (as resource loading may be async)\n var _this = this;\n var styles = __spread(preparsedTemplate.styles);\n this._inlineStyles(preparsedTemplate.inlineStyleUrls, stylesheets, styles);\n var styleUrls = preparsedTemplate.styleUrls;\n var externalStylesheets = styleUrls.map(function (styleUrl) {\n var stylesheet = stylesheets.get(styleUrl);\n var styles = __spread(stylesheet.styles);\n _this._inlineStyles(stylesheet.styleUrls, stylesheets, styles);\n return new CompileStylesheetMetadata({ moduleUrl: styleUrl, styles: styles });\n });\n var encapsulation = prenormData.encapsulation;\n if (encapsulation == null) {\n encapsulation = this._config.defaultEncapsulation;\n }\n if (encapsulation === ViewEncapsulation.Emulated && styles.length === 0 &&\n styleUrls.length === 0) {\n encapsulation = ViewEncapsulation.None;\n }\n return new CompileTemplateMetadata({\n encapsulation: encapsulation,\n template: preparsedTemplate.template,\n templateUrl: preparsedTemplate.templateUrl,\n htmlAst: preparsedTemplate.htmlAst, styles: styles, styleUrls: styleUrls,\n ngContentSelectors: preparsedTemplate.ngContentSelectors,\n animations: prenormData.animations,\n interpolation: prenormData.interpolation,\n isInline: preparsedTemplate.isInline, externalStylesheets: externalStylesheets,\n preserveWhitespaces: preserveWhitespacesDefault(prenormData.preserveWhitespaces, this._config.preserveWhitespaces),\n });\n };\n DirectiveNormalizer.prototype._inlineStyles = function (styleUrls, stylesheets, targetStyles) {\n var _this = this;\n styleUrls.forEach(function (styleUrl) {\n var stylesheet = stylesheets.get(styleUrl);\n stylesheet.styles.forEach(function (style) { return targetStyles.push(style); });\n _this._inlineStyles(stylesheet.styleUrls, stylesheets, targetStyles);\n });\n };\n DirectiveNormalizer.prototype._loadMissingExternalStylesheets = function (styleUrls, loadedStylesheets) {\n var _this = this;\n if (loadedStylesheets === void 0) { loadedStylesheets = new Map(); }\n return SyncAsync.then(SyncAsync.all(styleUrls.filter(function (styleUrl) { return !loadedStylesheets.has(styleUrl); })\n .map(function (styleUrl) { return SyncAsync.then(_this._fetch(styleUrl), function (loadedStyle) {\n var stylesheet = _this._normalizeStylesheet(new CompileStylesheetMetadata({ styles: [loadedStyle], moduleUrl: styleUrl }));\n loadedStylesheets.set(styleUrl, stylesheet);\n return _this._loadMissingExternalStylesheets(stylesheet.styleUrls, loadedStylesheets);\n }); })), function (_) { return loadedStylesheets; });\n };\n DirectiveNormalizer.prototype._normalizeStylesheet = function (stylesheet) {\n var _this = this;\n var moduleUrl = stylesheet.moduleUrl;\n var allStyleUrls = stylesheet.styleUrls.filter(isStyleUrlResolvable)\n .map(function (url) { return _this._urlResolver.resolve(moduleUrl, url); });\n var allStyles = stylesheet.styles.map(function (style) {\n var styleWithImports = extractStyleUrls(_this._urlResolver, moduleUrl, style);\n allStyleUrls.push.apply(allStyleUrls, __spread(styleWithImports.styleUrls));\n return styleWithImports.style;\n });\n return new CompileStylesheetMetadata({ styles: allStyles, styleUrls: allStyleUrls, moduleUrl: moduleUrl });\n };\n return DirectiveNormalizer;\n}());\nvar TemplatePreparseVisitor = /** @class */ (function () {\n function TemplatePreparseVisitor() {\n this.ngContentSelectors = [];\n this.styles = [];\n this.styleUrls = [];\n this.ngNonBindableStackCount = 0;\n }\n TemplatePreparseVisitor.prototype.visitElement = function (ast, context) {\n var preparsedElement = preparseElement(ast);\n switch (preparsedElement.type) {\n case PreparsedElementType.NG_CONTENT:\n if (this.ngNonBindableStackCount === 0) {\n this.ngContentSelectors.push(preparsedElement.selectAttr);\n }\n break;\n case PreparsedElementType.STYLE:\n var textContent_1 = '';\n ast.children.forEach(function (child) {\n if (child instanceof Text) {\n textContent_1 += child.value;\n }\n });\n this.styles.push(textContent_1);\n break;\n case PreparsedElementType.STYLESHEET:\n this.styleUrls.push(preparsedElement.hrefAttr);\n break;\n default:\n break;\n }\n if (preparsedElement.nonBindable) {\n this.ngNonBindableStackCount++;\n }\n visitAll(this, ast.children);\n if (preparsedElement.nonBindable) {\n this.ngNonBindableStackCount--;\n }\n return null;\n };\n TemplatePreparseVisitor.prototype.visitExpansion = function (ast, context) { visitAll(this, ast.cases); };\n TemplatePreparseVisitor.prototype.visitExpansionCase = function (ast, context) {\n visitAll(this, ast.expression);\n };\n TemplatePreparseVisitor.prototype.visitComment = function (ast, context) { return null; };\n TemplatePreparseVisitor.prototype.visitAttribute = function (ast, context) { return null; };\n TemplatePreparseVisitor.prototype.visitText = function (ast, context) { return null; };\n return TemplatePreparseVisitor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 QUERY_METADATA_IDENTIFIERS = [\n createViewChild,\n createViewChildren,\n createContentChild,\n createContentChildren,\n];\n/*\n * Resolve a `Type` for {@link Directive}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\nvar DirectiveResolver = /** @class */ (function () {\n function DirectiveResolver(_reflector) {\n this._reflector = _reflector;\n }\n DirectiveResolver.prototype.isDirective = function (type) {\n var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n return typeMetadata && typeMetadata.some(isDirectiveMetadata);\n };\n DirectiveResolver.prototype.resolve = function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n if (typeMetadata) {\n var metadata = findLast(typeMetadata, isDirectiveMetadata);\n if (metadata) {\n var propertyMetadata = this._reflector.propMetadata(type);\n var guards = this._reflector.guards(type);\n return this._mergeWithPropertyMetadata(metadata, propertyMetadata, guards, type);\n }\n }\n if (throwIfNotFound) {\n throw new Error(\"No Directive annotation found on \" + stringify(type));\n }\n return null;\n };\n DirectiveResolver.prototype._mergeWithPropertyMetadata = function (dm, propertyMetadata, guards, directiveType) {\n var inputs = [];\n var outputs = [];\n var host = {};\n var queries = {};\n Object.keys(propertyMetadata).forEach(function (propName) {\n var input = findLast(propertyMetadata[propName], function (a) { return createInput.isTypeOf(a); });\n if (input) {\n if (input.bindingPropertyName) {\n inputs.push(propName + \": \" + input.bindingPropertyName);\n }\n else {\n inputs.push(propName);\n }\n }\n var output = findLast(propertyMetadata[propName], function (a) { return createOutput.isTypeOf(a); });\n if (output) {\n if (output.bindingPropertyName) {\n outputs.push(propName + \": \" + output.bindingPropertyName);\n }\n else {\n outputs.push(propName);\n }\n }\n var hostBindings = propertyMetadata[propName].filter(function (a) { return createHostBinding.isTypeOf(a); });\n hostBindings.forEach(function (hostBinding) {\n if (hostBinding.hostPropertyName) {\n var startWith = hostBinding.hostPropertyName[0];\n if (startWith === '(') {\n throw new Error(\"@HostBinding can not bind to events. Use @HostListener instead.\");\n }\n else if (startWith === '[') {\n throw new Error(\"@HostBinding parameter should be a property name, 'class.<name>', or 'attr.<name>'.\");\n }\n host[\"[\" + hostBinding.hostPropertyName + \"]\"] = propName;\n }\n else {\n host[\"[\" + propName + \"]\"] = propName;\n }\n });\n var hostListeners = propertyMetadata[propName].filter(function (a) { return createHostListener.isTypeOf(a); });\n hostListeners.forEach(function (hostListener) {\n var args = hostListener.args || [];\n host[\"(\" + hostListener.eventName + \")\"] = propName + \"(\" + args.join(',') + \")\";\n });\n var query = findLast(propertyMetadata[propName], function (a) { return QUERY_METADATA_IDENTIFIERS.some(function (i) { return i.isTypeOf(a); }); });\n if (query) {\n queries[propName] = query;\n }\n });\n return this._merge(dm, inputs, outputs, host, queries, guards, directiveType);\n };\n DirectiveResolver.prototype._extractPublicName = function (def) { return splitAtColon(def, [null, def])[1].trim(); };\n DirectiveResolver.prototype._dedupeBindings = function (bindings) {\n var names = new Set();\n var publicNames = new Set();\n var reversedResult = [];\n // go last to first to allow later entries to overwrite previous entries\n for (var i = bindings.length - 1; i >= 0; i--) {\n var binding = bindings[i];\n var name_1 = this._extractPublicName(binding);\n publicNames.add(name_1);\n if (!names.has(name_1)) {\n names.add(name_1);\n reversedResult.push(binding);\n }\n }\n return reversedResult.reverse();\n };\n DirectiveResolver.prototype._merge = function (directive, inputs, outputs, host, queries, guards, directiveType) {\n var mergedInputs = this._dedupeBindings(directive.inputs ? directive.inputs.concat(inputs) : inputs);\n var mergedOutputs = this._dedupeBindings(directive.outputs ? directive.outputs.concat(outputs) : outputs);\n var mergedHost = directive.host ? __assign({}, directive.host, host) : host;\n var mergedQueries = directive.queries ? __assign({}, directive.queries, queries) : queries;\n if (createComponent.isTypeOf(directive)) {\n var comp = directive;\n return createComponent({\n selector: comp.selector,\n inputs: mergedInputs,\n outputs: mergedOutputs,\n host: mergedHost,\n exportAs: comp.exportAs,\n moduleId: comp.moduleId,\n queries: mergedQueries,\n changeDetection: comp.changeDetection,\n providers: comp.providers,\n viewProviders: comp.viewProviders,\n entryComponents: comp.entryComponents,\n template: comp.template,\n templateUrl: comp.templateUrl,\n styles: comp.styles,\n styleUrls: comp.styleUrls,\n encapsulation: comp.encapsulation,\n animations: comp.animations,\n interpolation: comp.interpolation,\n preserveWhitespaces: directive.preserveWhitespaces,\n });\n }\n else {\n return createDirective({\n selector: directive.selector,\n inputs: mergedInputs,\n outputs: mergedOutputs,\n host: mergedHost,\n exportAs: directive.exportAs,\n queries: mergedQueries,\n providers: directive.providers, guards: guards\n });\n }\n };\n return DirectiveResolver;\n}());\nfunction isDirectiveMetadata(type) {\n return createDirective.isTypeOf(type) || createComponent.isTypeOf(type);\n}\nfunction findLast(arr, condition) {\n for (var i = arr.length - 1; i >= 0; i--) {\n if (condition(arr[i])) {\n return arr[i];\n }\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 $EOF = 0;\nvar $TAB = 9;\nvar $LF = 10;\nvar $VTAB = 11;\nvar $FF = 12;\nvar $CR = 13;\nvar $SPACE = 32;\nvar $BANG = 33;\nvar $DQ = 34;\nvar $HASH = 35;\nvar $$ = 36;\nvar $PERCENT = 37;\nvar $AMPERSAND = 38;\nvar $SQ = 39;\nvar $LPAREN = 40;\nvar $RPAREN = 41;\nvar $STAR = 42;\nvar $PLUS = 43;\nvar $COMMA = 44;\nvar $MINUS = 45;\nvar $PERIOD = 46;\nvar $SLASH = 47;\nvar $COLON = 58;\nvar $SEMICOLON = 59;\nvar $LT = 60;\nvar $EQ = 61;\nvar $GT = 62;\nvar $QUESTION = 63;\nvar $0 = 48;\nvar $9 = 57;\nvar $A = 65;\nvar $E = 69;\nvar $F = 70;\nvar $X = 88;\nvar $Z = 90;\nvar $LBRACKET = 91;\nvar $BACKSLASH = 92;\nvar $RBRACKET = 93;\nvar $CARET = 94;\nvar $_ = 95;\nvar $a = 97;\nvar $e = 101;\nvar $f = 102;\nvar $n = 110;\nvar $r = 114;\nvar $t = 116;\nvar $u = 117;\nvar $v = 118;\nvar $x = 120;\nvar $z = 122;\nvar $LBRACE = 123;\nvar $BAR = 124;\nvar $RBRACE = 125;\nvar $NBSP = 160;\n\n\n\nvar $BT = 96;\nfunction isWhitespace(code) {\n return (code >= $TAB && code <= $SPACE) || (code == $NBSP);\n}\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\nfunction isAsciiLetter(code) {\n return code >= $a && code <= $z || code >= $A && code <= $Z;\n}\nfunction isAsciiHexDigit(code) {\n return code >= $a && code <= $f || code >= $A && code <= $F || isDigit(code);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TokenType;\n(function (TokenType) {\n TokenType[TokenType[\"Character\"] = 0] = \"Character\";\n TokenType[TokenType[\"Identifier\"] = 1] = \"Identifier\";\n TokenType[TokenType[\"Keyword\"] = 2] = \"Keyword\";\n TokenType[TokenType[\"String\"] = 3] = \"String\";\n TokenType[TokenType[\"Operator\"] = 4] = \"Operator\";\n TokenType[TokenType[\"Number\"] = 5] = \"Number\";\n TokenType[TokenType[\"Error\"] = 6] = \"Error\";\n})(TokenType || (TokenType = {}));\nvar KEYWORDS = ['var', 'let', 'as', 'null', 'undefined', 'true', 'false', 'if', 'else', 'this'];\nvar Lexer = /** @class */ (function () {\n function Lexer() {\n }\n Lexer.prototype.tokenize = function (text) {\n var scanner = new _Scanner(text);\n var tokens = [];\n var token = scanner.scanToken();\n while (token != null) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n return tokens;\n };\n return Lexer;\n}());\nvar Token = /** @class */ (function () {\n function Token(index, type, numValue, strValue) {\n this.index = index;\n this.type = type;\n this.numValue = numValue;\n this.strValue = strValue;\n }\n Token.prototype.isCharacter = function (code) {\n return this.type == TokenType.Character && this.numValue == code;\n };\n Token.prototype.isNumber = function () { return this.type == TokenType.Number; };\n Token.prototype.isString = function () { return this.type == TokenType.String; };\n Token.prototype.isOperator = function (operater) {\n return this.type == TokenType.Operator && this.strValue == operater;\n };\n Token.prototype.isIdentifier = function () { return this.type == TokenType.Identifier; };\n Token.prototype.isKeyword = function () { return this.type == TokenType.Keyword; };\n Token.prototype.isKeywordLet = function () { return this.type == TokenType.Keyword && this.strValue == 'let'; };\n Token.prototype.isKeywordAs = function () { return this.type == TokenType.Keyword && this.strValue == 'as'; };\n Token.prototype.isKeywordNull = function () { return this.type == TokenType.Keyword && this.strValue == 'null'; };\n Token.prototype.isKeywordUndefined = function () {\n return this.type == TokenType.Keyword && this.strValue == 'undefined';\n };\n Token.prototype.isKeywordTrue = function () { return this.type == TokenType.Keyword && this.strValue == 'true'; };\n Token.prototype.isKeywordFalse = function () { return this.type == TokenType.Keyword && this.strValue == 'false'; };\n Token.prototype.isKeywordThis = function () { return this.type == TokenType.Keyword && this.strValue == 'this'; };\n Token.prototype.isError = function () { return this.type == TokenType.Error; };\n Token.prototype.toNumber = function () { return this.type == TokenType.Number ? this.numValue : -1; };\n Token.prototype.toString = function () {\n switch (this.type) {\n case TokenType.Character:\n case TokenType.Identifier:\n case TokenType.Keyword:\n case TokenType.Operator:\n case TokenType.String:\n case TokenType.Error:\n return this.strValue;\n case TokenType.Number:\n return this.numValue.toString();\n default:\n return null;\n }\n };\n return Token;\n}());\nfunction newCharacterToken(index, code) {\n return new Token(index, TokenType.Character, code, String.fromCharCode(code));\n}\nfunction newIdentifierToken(index, text) {\n return new Token(index, TokenType.Identifier, 0, text);\n}\nfunction newKeywordToken(index, text) {\n return new Token(index, TokenType.Keyword, 0, text);\n}\nfunction newOperatorToken(index, text) {\n return new Token(index, TokenType.Operator, 0, text);\n}\nfunction newStringToken(index, text) {\n return new Token(index, TokenType.String, 0, text);\n}\nfunction newNumberToken(index, n) {\n return new Token(index, TokenType.Number, n, '');\n}\nfunction newErrorToken(index, message) {\n return new Token(index, TokenType.Error, 0, message);\n}\nvar EOF = new Token(-1, TokenType.Character, 0, '');\nvar _Scanner = /** @class */ (function () {\n function _Scanner(input) {\n this.input = input;\n this.peek = 0;\n this.index = -1;\n this.length = input.length;\n this.advance();\n }\n _Scanner.prototype.advance = function () {\n this.peek = ++this.index >= this.length ? $EOF : this.input.charCodeAt(this.index);\n };\n _Scanner.prototype.scanToken = function () {\n var input = this.input, length = this.length;\n var peek = this.peek, index = this.index;\n // Skip whitespace.\n while (peek <= $SPACE) {\n if (++index >= length) {\n peek = $EOF;\n break;\n }\n else {\n peek = input.charCodeAt(index);\n }\n }\n this.peek = peek;\n this.index = index;\n if (index >= length) {\n return null;\n }\n // Handle identifiers and numbers.\n if (isIdentifierStart(peek))\n return this.scanIdentifier();\n if (isDigit(peek))\n return this.scanNumber(index);\n var start = index;\n switch (peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) :\n newCharacterToken(start, $PERIOD);\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, peek);\n case $SQ:\n case $DQ:\n return this.scanString();\n case $HASH:\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n return this.scanOperator(start, String.fromCharCode(peek));\n case $QUESTION:\n return this.scanComplexOperator(start, '?', $PERIOD, '.');\n case $LT:\n case $GT:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=');\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, String.fromCharCode(peek), $EQ, '=', $EQ, '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, '&', $AMPERSAND, '&');\n case $BAR:\n return this.scanComplexOperator(start, '|', $BAR, '|');\n case $NBSP:\n while (isWhitespace(this.peek))\n this.advance();\n return this.scanToken();\n }\n this.advance();\n return this.error(\"Unexpected character [\" + String.fromCharCode(peek) + \"]\", 0);\n };\n _Scanner.prototype.scanCharacter = function (start, code) {\n this.advance();\n return newCharacterToken(start, code);\n };\n _Scanner.prototype.scanOperator = function (start, str) {\n this.advance();\n return newOperatorToken(start, str);\n };\n /**\n * Tokenize a 2/3 char long operator\n *\n * @param start start index in the expression\n * @param one first symbol (always part of the operator)\n * @param twoCode code point for the second symbol\n * @param two second symbol (part of the operator when the second code point matches)\n * @param threeCode code point for the third symbol\n * @param three third symbol (part of the operator when provided and matches source expression)\n */\n _Scanner.prototype.scanComplexOperator = function (start, one, twoCode, two, threeCode, three) {\n this.advance();\n var str = one;\n if (this.peek == twoCode) {\n this.advance();\n str += two;\n }\n if (threeCode != null && this.peek == threeCode) {\n this.advance();\n str += three;\n }\n return newOperatorToken(start, str);\n };\n _Scanner.prototype.scanIdentifier = function () {\n var start = this.index;\n this.advance();\n while (isIdentifierPart(this.peek))\n this.advance();\n var str = this.input.substring(start, this.index);\n return KEYWORDS.indexOf(str) > -1 ? newKeywordToken(start, str) :\n newIdentifierToken(start, str);\n };\n _Scanner.prototype.scanNumber = function (start) {\n var simple = (this.index === start);\n this.advance(); // Skip initial digit.\n while (true) {\n if (isDigit(this.peek)) {\n // Do nothing.\n }\n else if (this.peek == $PERIOD) {\n simple = false;\n }\n else if (isExponentStart(this.peek)) {\n this.advance();\n if (isExponentSign(this.peek))\n this.advance();\n if (!isDigit(this.peek))\n return this.error('Invalid exponent', -1);\n simple = false;\n }\n else {\n break;\n }\n this.advance();\n }\n var str = this.input.substring(start, this.index);\n var value = simple ? parseIntAutoRadix(str) : parseFloat(str);\n return newNumberToken(start, value);\n };\n _Scanner.prototype.scanString = function () {\n var start = this.index;\n var quote = this.peek;\n this.advance(); // Skip initial quote.\n var buffer = '';\n var marker = this.index;\n var input = this.input;\n while (this.peek != quote) {\n if (this.peek == $BACKSLASH) {\n buffer += input.substring(marker, this.index);\n this.advance();\n var unescapedCode = void 0;\n // Workaround for TS2.1-introduced type strictness\n this.peek = this.peek;\n if (this.peek == $u) {\n // 4 character hex code for unicode character.\n var hex = input.substring(this.index + 1, this.index + 5);\n if (/^[0-9a-f]+$/i.test(hex)) {\n unescapedCode = parseInt(hex, 16);\n }\n else {\n return this.error(\"Invalid unicode escape [\\\\u\" + hex + \"]\", 0);\n }\n for (var i = 0; i < 5; i++) {\n this.advance();\n }\n }\n else {\n unescapedCode = unescape(this.peek);\n this.advance();\n }\n buffer += String.fromCharCode(unescapedCode);\n marker = this.index;\n }\n else if (this.peek == $EOF) {\n return this.error('Unterminated quote', 0);\n }\n else {\n this.advance();\n }\n }\n var last = input.substring(marker, this.index);\n this.advance(); // Skip terminating quote.\n return newStringToken(start, buffer + last);\n };\n _Scanner.prototype.error = function (message, offset) {\n var position = this.index + offset;\n return newErrorToken(position, \"Lexer Error: \" + message + \" at column \" + position + \" in expression [\" + this.input + \"]\");\n };\n return _Scanner;\n}());\nfunction isIdentifierStart(code) {\n return ($a <= code && code <= $z) || ($A <= code && code <= $Z) ||\n (code == $_) || (code == $$);\n}\nfunction isIdentifier(input) {\n if (input.length == 0)\n return false;\n var scanner = new _Scanner(input);\n if (!isIdentifierStart(scanner.peek))\n return false;\n scanner.advance();\n while (scanner.peek !== $EOF) {\n if (!isIdentifierPart(scanner.peek))\n return false;\n scanner.advance();\n }\n return true;\n}\nfunction isIdentifierPart(code) {\n return isAsciiLetter(code) || isDigit(code) || (code == $_) ||\n (code == $$);\n}\nfunction isExponentStart(code) {\n return code == $e || code == $E;\n}\nfunction isExponentSign(code) {\n return code == $MINUS || code == $PLUS;\n}\nfunction isQuote(code) {\n return code === $SQ || code === $DQ || code === $BT;\n}\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\nfunction parseIntAutoRadix(text) {\n var result = parseInt(text);\n if (isNaN(result)) {\n throw new Error('Invalid integer literal when parsing ' + text);\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ParserError = /** @class */ (function () {\n function ParserError(message, input, errLocation, ctxLocation) {\n this.input = input;\n this.errLocation = errLocation;\n this.ctxLocation = ctxLocation;\n this.message = \"Parser Error: \" + message + \" \" + errLocation + \" [\" + input + \"] in \" + ctxLocation;\n }\n return ParserError;\n}());\nvar ParseSpan = /** @class */ (function () {\n function ParseSpan(start, end) {\n this.start = start;\n this.end = end;\n }\n return ParseSpan;\n}());\nvar AST = /** @class */ (function () {\n function AST(span) {\n this.span = span;\n }\n AST.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return null;\n };\n AST.prototype.toString = function () { return 'AST'; };\n return AST;\n}());\n/**\n * Represents a quoted expression of the form:\n *\n * quote = prefix `:` uninterpretedExpression\n * prefix = identifier\n * uninterpretedExpression = arbitrary string\n *\n * A quoted expression is meant to be pre-processed by an AST transformer that\n * converts it into another AST that no longer contains quoted expressions.\n * It is meant to allow third-party developers to extend Angular template\n * expression language. The `uninterpretedExpression` part of the quote is\n * therefore not interpreted by the Angular's own expression parser.\n */\nvar Quote = /** @class */ (function (_super) {\n __extends(Quote, _super);\n function Quote(span, prefix, uninterpretedExpression, location) {\n var _this = _super.call(this, span) || this;\n _this.prefix = prefix;\n _this.uninterpretedExpression = uninterpretedExpression;\n _this.location = location;\n return _this;\n }\n Quote.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitQuote(this, context);\n };\n Quote.prototype.toString = function () { return 'Quote'; };\n return Quote;\n}(AST));\nvar EmptyExpr = /** @class */ (function (_super) {\n __extends(EmptyExpr, _super);\n function EmptyExpr() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n EmptyExpr.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n // do nothing\n };\n return EmptyExpr;\n}(AST));\nvar ImplicitReceiver = /** @class */ (function (_super) {\n __extends(ImplicitReceiver, _super);\n function ImplicitReceiver() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ImplicitReceiver.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitImplicitReceiver(this, context);\n };\n return ImplicitReceiver;\n}(AST));\n/**\n * Multiple expressions separated by a semicolon.\n */\nvar Chain = /** @class */ (function (_super) {\n __extends(Chain, _super);\n function Chain(span, expressions) {\n var _this = _super.call(this, span) || this;\n _this.expressions = expressions;\n return _this;\n }\n Chain.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitChain(this, context);\n };\n return Chain;\n}(AST));\nvar Conditional = /** @class */ (function (_super) {\n __extends(Conditional, _super);\n function Conditional(span, condition, trueExp, falseExp) {\n var _this = _super.call(this, span) || this;\n _this.condition = condition;\n _this.trueExp = trueExp;\n _this.falseExp = falseExp;\n return _this;\n }\n Conditional.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitConditional(this, context);\n };\n return Conditional;\n}(AST));\nvar PropertyRead = /** @class */ (function (_super) {\n __extends(PropertyRead, _super);\n function PropertyRead(span, receiver, name) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n PropertyRead.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPropertyRead(this, context);\n };\n return PropertyRead;\n}(AST));\nvar PropertyWrite = /** @class */ (function (_super) {\n __extends(PropertyWrite, _super);\n function PropertyWrite(span, receiver, name, value) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n PropertyWrite.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPropertyWrite(this, context);\n };\n return PropertyWrite;\n}(AST));\nvar SafePropertyRead = /** @class */ (function (_super) {\n __extends(SafePropertyRead, _super);\n function SafePropertyRead(span, receiver, name) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n SafePropertyRead.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitSafePropertyRead(this, context);\n };\n return SafePropertyRead;\n}(AST));\nvar KeyedRead = /** @class */ (function (_super) {\n __extends(KeyedRead, _super);\n function KeyedRead(span, obj, key) {\n var _this = _super.call(this, span) || this;\n _this.obj = obj;\n _this.key = key;\n return _this;\n }\n KeyedRead.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitKeyedRead(this, context);\n };\n return KeyedRead;\n}(AST));\nvar KeyedWrite = /** @class */ (function (_super) {\n __extends(KeyedWrite, _super);\n function KeyedWrite(span, obj, key, value) {\n var _this = _super.call(this, span) || this;\n _this.obj = obj;\n _this.key = key;\n _this.value = value;\n return _this;\n }\n KeyedWrite.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitKeyedWrite(this, context);\n };\n return KeyedWrite;\n}(AST));\nvar BindingPipe = /** @class */ (function (_super) {\n __extends(BindingPipe, _super);\n function BindingPipe(span, exp, name, args) {\n var _this = _super.call(this, span) || this;\n _this.exp = exp;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n BindingPipe.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPipe(this, context);\n };\n return BindingPipe;\n}(AST));\nvar LiteralPrimitive = /** @class */ (function (_super) {\n __extends(LiteralPrimitive, _super);\n function LiteralPrimitive(span, value) {\n var _this = _super.call(this, span) || this;\n _this.value = value;\n return _this;\n }\n LiteralPrimitive.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralPrimitive(this, context);\n };\n return LiteralPrimitive;\n}(AST));\nvar LiteralArray = /** @class */ (function (_super) {\n __extends(LiteralArray, _super);\n function LiteralArray(span, expressions) {\n var _this = _super.call(this, span) || this;\n _this.expressions = expressions;\n return _this;\n }\n LiteralArray.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralArray(this, context);\n };\n return LiteralArray;\n}(AST));\nvar LiteralMap = /** @class */ (function (_super) {\n __extends(LiteralMap, _super);\n function LiteralMap(span, keys, values) {\n var _this = _super.call(this, span) || this;\n _this.keys = keys;\n _this.values = values;\n return _this;\n }\n LiteralMap.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitLiteralMap(this, context);\n };\n return LiteralMap;\n}(AST));\nvar Interpolation = /** @class */ (function (_super) {\n __extends(Interpolation, _super);\n function Interpolation(span, strings, expressions) {\n var _this = _super.call(this, span) || this;\n _this.strings = strings;\n _this.expressions = expressions;\n return _this;\n }\n Interpolation.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitInterpolation(this, context);\n };\n return Interpolation;\n}(AST));\nvar Binary = /** @class */ (function (_super) {\n __extends(Binary, _super);\n function Binary(span, operation, left, right) {\n var _this = _super.call(this, span) || this;\n _this.operation = operation;\n _this.left = left;\n _this.right = right;\n return _this;\n }\n Binary.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitBinary(this, context);\n };\n return Binary;\n}(AST));\nvar PrefixNot = /** @class */ (function (_super) {\n __extends(PrefixNot, _super);\n function PrefixNot(span, expression) {\n var _this = _super.call(this, span) || this;\n _this.expression = expression;\n return _this;\n }\n PrefixNot.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitPrefixNot(this, context);\n };\n return PrefixNot;\n}(AST));\nvar NonNullAssert = /** @class */ (function (_super) {\n __extends(NonNullAssert, _super);\n function NonNullAssert(span, expression) {\n var _this = _super.call(this, span) || this;\n _this.expression = expression;\n return _this;\n }\n NonNullAssert.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitNonNullAssert(this, context);\n };\n return NonNullAssert;\n}(AST));\nvar MethodCall = /** @class */ (function (_super) {\n __extends(MethodCall, _super);\n function MethodCall(span, receiver, name, args) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n MethodCall.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitMethodCall(this, context);\n };\n return MethodCall;\n}(AST));\nvar SafeMethodCall = /** @class */ (function (_super) {\n __extends(SafeMethodCall, _super);\n function SafeMethodCall(span, receiver, name, args) {\n var _this = _super.call(this, span) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.args = args;\n return _this;\n }\n SafeMethodCall.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitSafeMethodCall(this, context);\n };\n return SafeMethodCall;\n}(AST));\nvar FunctionCall = /** @class */ (function (_super) {\n __extends(FunctionCall, _super);\n function FunctionCall(span, target, args) {\n var _this = _super.call(this, span) || this;\n _this.target = target;\n _this.args = args;\n return _this;\n }\n FunctionCall.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return visitor.visitFunctionCall(this, context);\n };\n return FunctionCall;\n}(AST));\nvar ASTWithSource = /** @class */ (function (_super) {\n __extends(ASTWithSource, _super);\n function ASTWithSource(ast, source, location, errors) {\n var _this = _super.call(this, new ParseSpan(0, source == null ? 0 : source.length)) || this;\n _this.ast = ast;\n _this.source = source;\n _this.location = location;\n _this.errors = errors;\n return _this;\n }\n ASTWithSource.prototype.visit = function (visitor, context) {\n if (context === void 0) { context = null; }\n return this.ast.visit(visitor, context);\n };\n ASTWithSource.prototype.toString = function () { return this.source + \" in \" + this.location; };\n return ASTWithSource;\n}(AST));\nvar TemplateBinding = /** @class */ (function () {\n function TemplateBinding(span, key, keyIsVar, name, expression) {\n this.span = span;\n this.key = key;\n this.keyIsVar = keyIsVar;\n this.name = name;\n this.expression = expression;\n }\n return TemplateBinding;\n}());\nvar NullAstVisitor = /** @class */ (function () {\n function NullAstVisitor() {\n }\n NullAstVisitor.prototype.visitBinary = function (ast, context) { };\n NullAstVisitor.prototype.visitChain = function (ast, context) { };\n NullAstVisitor.prototype.visitConditional = function (ast, context) { };\n NullAstVisitor.prototype.visitFunctionCall = function (ast, context) { };\n NullAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { };\n NullAstVisitor.prototype.visitInterpolation = function (ast, context) { };\n NullAstVisitor.prototype.visitKeyedRead = function (ast, context) { };\n NullAstVisitor.prototype.visitKeyedWrite = function (ast, context) { };\n NullAstVisitor.prototype.visitLiteralArray = function (ast, context) { };\n NullAstVisitor.prototype.visitLiteralMap = function (ast, context) { };\n NullAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { };\n NullAstVisitor.prototype.visitMethodCall = function (ast, context) { };\n NullAstVisitor.prototype.visitPipe = function (ast, context) { };\n NullAstVisitor.prototype.visitPrefixNot = function (ast, context) { };\n NullAstVisitor.prototype.visitNonNullAssert = function (ast, context) { };\n NullAstVisitor.prototype.visitPropertyRead = function (ast, context) { };\n NullAstVisitor.prototype.visitPropertyWrite = function (ast, context) { };\n NullAstVisitor.prototype.visitQuote = function (ast, context) { };\n NullAstVisitor.prototype.visitSafeMethodCall = function (ast, context) { };\n NullAstVisitor.prototype.visitSafePropertyRead = function (ast, context) { };\n return NullAstVisitor;\n}());\nvar RecursiveAstVisitor = /** @class */ (function () {\n function RecursiveAstVisitor() {\n }\n RecursiveAstVisitor.prototype.visitBinary = function (ast, context) {\n ast.left.visit(this);\n ast.right.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitChain = function (ast, context) { return this.visitAll(ast.expressions, context); };\n RecursiveAstVisitor.prototype.visitConditional = function (ast, context) {\n ast.condition.visit(this);\n ast.trueExp.visit(this);\n ast.falseExp.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitPipe = function (ast, context) {\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n RecursiveAstVisitor.prototype.visitFunctionCall = function (ast, context) {\n ast.target.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n RecursiveAstVisitor.prototype.visitImplicitReceiver = function (ast, context) { return null; };\n RecursiveAstVisitor.prototype.visitInterpolation = function (ast, context) {\n return this.visitAll(ast.expressions, context);\n };\n RecursiveAstVisitor.prototype.visitKeyedRead = function (ast, context) {\n ast.obj.visit(this);\n ast.key.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitKeyedWrite = function (ast, context) {\n ast.obj.visit(this);\n ast.key.visit(this);\n ast.value.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitLiteralArray = function (ast, context) {\n return this.visitAll(ast.expressions, context);\n };\n RecursiveAstVisitor.prototype.visitLiteralMap = function (ast, context) { return this.visitAll(ast.values, context); };\n RecursiveAstVisitor.prototype.visitLiteralPrimitive = function (ast, context) { return null; };\n RecursiveAstVisitor.prototype.visitMethodCall = function (ast, context) {\n ast.receiver.visit(this);\n return this.visitAll(ast.args, context);\n };\n RecursiveAstVisitor.prototype.visitPrefixNot = function (ast, context) {\n ast.expression.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitNonNullAssert = function (ast, context) {\n ast.expression.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitPropertyRead = function (ast, context) {\n ast.receiver.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitPropertyWrite = function (ast, context) {\n ast.receiver.visit(this);\n ast.value.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitSafePropertyRead = function (ast, context) {\n ast.receiver.visit(this);\n return null;\n };\n RecursiveAstVisitor.prototype.visitSafeMethodCall = function (ast, context) {\n ast.receiver.visit(this);\n return this.visitAll(ast.args, context);\n };\n RecursiveAstVisitor.prototype.visitAll = function (asts, context) {\n var _this = this;\n asts.forEach(function (ast) { return ast.visit(_this, context); });\n return null;\n };\n RecursiveAstVisitor.prototype.visitQuote = function (ast, context) { return null; };\n return RecursiveAstVisitor;\n}());\nvar AstTransformer = /** @class */ (function () {\n function AstTransformer() {\n }\n AstTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };\n AstTransformer.prototype.visitInterpolation = function (ast, context) {\n return new Interpolation(ast.span, ast.strings, this.visitAll(ast.expressions));\n };\n AstTransformer.prototype.visitLiteralPrimitive = function (ast, context) {\n return new LiteralPrimitive(ast.span, ast.value);\n };\n AstTransformer.prototype.visitPropertyRead = function (ast, context) {\n return new PropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n };\n AstTransformer.prototype.visitPropertyWrite = function (ast, context) {\n return new PropertyWrite(ast.span, ast.receiver.visit(this), ast.name, ast.value.visit(this));\n };\n AstTransformer.prototype.visitSafePropertyRead = function (ast, context) {\n return new SafePropertyRead(ast.span, ast.receiver.visit(this), ast.name);\n };\n AstTransformer.prototype.visitMethodCall = function (ast, context) {\n return new MethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n };\n AstTransformer.prototype.visitSafeMethodCall = function (ast, context) {\n return new SafeMethodCall(ast.span, ast.receiver.visit(this), ast.name, this.visitAll(ast.args));\n };\n AstTransformer.prototype.visitFunctionCall = function (ast, context) {\n return new FunctionCall(ast.span, ast.target.visit(this), this.visitAll(ast.args));\n };\n AstTransformer.prototype.visitLiteralArray = function (ast, context) {\n return new LiteralArray(ast.span, this.visitAll(ast.expressions));\n };\n AstTransformer.prototype.visitLiteralMap = function (ast, context) {\n return new LiteralMap(ast.span, ast.keys, this.visitAll(ast.values));\n };\n AstTransformer.prototype.visitBinary = function (ast, context) {\n return new Binary(ast.span, ast.operation, ast.left.visit(this), ast.right.visit(this));\n };\n AstTransformer.prototype.visitPrefixNot = function (ast, context) {\n return new PrefixNot(ast.span, ast.expression.visit(this));\n };\n AstTransformer.prototype.visitNonNullAssert = function (ast, context) {\n return new NonNullAssert(ast.span, ast.expression.visit(this));\n };\n AstTransformer.prototype.visitConditional = function (ast, context) {\n return new Conditional(ast.span, ast.condition.visit(this), ast.trueExp.visit(this), ast.falseExp.visit(this));\n };\n AstTransformer.prototype.visitPipe = function (ast, context) {\n return new BindingPipe(ast.span, ast.exp.visit(this), ast.name, this.visitAll(ast.args));\n };\n AstTransformer.prototype.visitKeyedRead = function (ast, context) {\n return new KeyedRead(ast.span, ast.obj.visit(this), ast.key.visit(this));\n };\n AstTransformer.prototype.visitKeyedWrite = function (ast, context) {\n return new KeyedWrite(ast.span, ast.obj.visit(this), ast.key.visit(this), ast.value.visit(this));\n };\n AstTransformer.prototype.visitAll = function (asts) {\n var res = new Array(asts.length);\n for (var i = 0; i < asts.length; ++i) {\n res[i] = asts[i].visit(this);\n }\n return res;\n };\n AstTransformer.prototype.visitChain = function (ast, context) {\n return new Chain(ast.span, this.visitAll(ast.expressions));\n };\n AstTransformer.prototype.visitQuote = function (ast, context) {\n return new Quote(ast.span, ast.prefix, ast.uninterpretedExpression, ast.location);\n };\n return AstTransformer;\n}());\n// A transformer that only creates new nodes if the transformer makes a change or\n// a change is made a child node.\nvar AstMemoryEfficientTransformer = /** @class */ (function () {\n function AstMemoryEfficientTransformer() {\n }\n AstMemoryEfficientTransformer.prototype.visitImplicitReceiver = function (ast, context) { return ast; };\n AstMemoryEfficientTransformer.prototype.visitInterpolation = function (ast, context) {\n var expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions)\n return new Interpolation(ast.span, ast.strings, expressions);\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitLiteralPrimitive = function (ast, context) { return ast; };\n AstMemoryEfficientTransformer.prototype.visitPropertyRead = function (ast, context) {\n var receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new PropertyRead(ast.span, receiver, ast.name);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitPropertyWrite = function (ast, context) {\n var receiver = ast.receiver.visit(this);\n var value = ast.value.visit(this);\n if (receiver !== ast.receiver || value !== ast.value) {\n return new PropertyWrite(ast.span, receiver, ast.name, value);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitSafePropertyRead = function (ast, context) {\n var receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new SafePropertyRead(ast.span, receiver, ast.name);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitMethodCall = function (ast, context) {\n var receiver = ast.receiver.visit(this);\n if (receiver !== ast.receiver) {\n return new MethodCall(ast.span, receiver, ast.name, this.visitAll(ast.args));\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitSafeMethodCall = function (ast, context) {\n var receiver = ast.receiver.visit(this);\n var args = this.visitAll(ast.args);\n if (receiver !== ast.receiver || args !== ast.args) {\n return new SafeMethodCall(ast.span, receiver, ast.name, args);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitFunctionCall = function (ast, context) {\n var target = ast.target && ast.target.visit(this);\n var args = this.visitAll(ast.args);\n if (target !== ast.target || args !== ast.args) {\n return new FunctionCall(ast.span, target, args);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitLiteralArray = function (ast, context) {\n var expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new LiteralArray(ast.span, expressions);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitLiteralMap = function (ast, context) {\n var values = this.visitAll(ast.values);\n if (values !== ast.values) {\n return new LiteralMap(ast.span, ast.keys, values);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitBinary = function (ast, context) {\n var left = ast.left.visit(this);\n var right = ast.right.visit(this);\n if (left !== ast.left || right !== ast.right) {\n return new Binary(ast.span, ast.operation, left, right);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitPrefixNot = function (ast, context) {\n var expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new PrefixNot(ast.span, expression);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitNonNullAssert = function (ast, context) {\n var expression = ast.expression.visit(this);\n if (expression !== ast.expression) {\n return new NonNullAssert(ast.span, expression);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitConditional = function (ast, context) {\n var condition = ast.condition.visit(this);\n var trueExp = ast.trueExp.visit(this);\n var falseExp = ast.falseExp.visit(this);\n if (condition !== ast.condition || trueExp !== ast.trueExp || falseExp !== falseExp) {\n return new Conditional(ast.span, condition, trueExp, falseExp);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitPipe = function (ast, context) {\n var exp = ast.exp.visit(this);\n var args = this.visitAll(ast.args);\n if (exp !== ast.exp || args !== ast.args) {\n return new BindingPipe(ast.span, exp, ast.name, args);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitKeyedRead = function (ast, context) {\n var obj = ast.obj.visit(this);\n var key = ast.key.visit(this);\n if (obj !== ast.obj || key !== ast.key) {\n return new KeyedRead(ast.span, obj, key);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitKeyedWrite = function (ast, context) {\n var obj = ast.obj.visit(this);\n var key = ast.key.visit(this);\n var value = ast.value.visit(this);\n if (obj !== ast.obj || key !== ast.key || value !== ast.value) {\n return new KeyedWrite(ast.span, obj, key, value);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitAll = function (asts) {\n var res = new Array(asts.length);\n var modified = false;\n for (var i = 0; i < asts.length; ++i) {\n var original = asts[i];\n var value = original.visit(this);\n res[i] = value;\n modified = modified || value !== original;\n }\n return modified ? res : asts;\n };\n AstMemoryEfficientTransformer.prototype.visitChain = function (ast, context) {\n var expressions = this.visitAll(ast.expressions);\n if (expressions !== ast.expressions) {\n return new Chain(ast.span, expressions);\n }\n return ast;\n };\n AstMemoryEfficientTransformer.prototype.visitQuote = function (ast, context) { return ast; };\n return AstMemoryEfficientTransformer;\n}());\nfunction visitAstChildren(ast, visitor, context) {\n function visit(ast) {\n visitor.visit && visitor.visit(ast, context) || ast.visit(visitor, context);\n }\n function visitAll(asts) { asts.forEach(visit); }\n ast.visit({\n visitBinary: function (ast) {\n visit(ast.left);\n visit(ast.right);\n },\n visitChain: function (ast) { visitAll(ast.expressions); },\n visitConditional: function (ast) {\n visit(ast.condition);\n visit(ast.trueExp);\n visit(ast.falseExp);\n },\n visitFunctionCall: function (ast) {\n if (ast.target) {\n visit(ast.target);\n }\n visitAll(ast.args);\n },\n visitImplicitReceiver: function (ast) { },\n visitInterpolation: function (ast) { visitAll(ast.expressions); },\n visitKeyedRead: function (ast) {\n visit(ast.obj);\n visit(ast.key);\n },\n visitKeyedWrite: function (ast) {\n visit(ast.obj);\n visit(ast.key);\n visit(ast.obj);\n },\n visitLiteralArray: function (ast) { visitAll(ast.expressions); },\n visitLiteralMap: function (ast) { },\n visitLiteralPrimitive: function (ast) { },\n visitMethodCall: function (ast) {\n visit(ast.receiver);\n visitAll(ast.args);\n },\n visitPipe: function (ast) {\n visit(ast.exp);\n visitAll(ast.args);\n },\n visitPrefixNot: function (ast) { visit(ast.expression); },\n visitNonNullAssert: function (ast) { visit(ast.expression); },\n visitPropertyRead: function (ast) { visit(ast.receiver); },\n visitPropertyWrite: function (ast) {\n visit(ast.receiver);\n visit(ast.value);\n },\n visitQuote: function (ast) { },\n visitSafeMethodCall: function (ast) {\n visit(ast.receiver);\n visitAll(ast.args);\n },\n visitSafePropertyRead: function (ast) { visit(ast.receiver); },\n });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SplitInterpolation = /** @class */ (function () {\n function SplitInterpolation(strings, expressions, offsets) {\n this.strings = strings;\n this.expressions = expressions;\n this.offsets = offsets;\n }\n return SplitInterpolation;\n}());\nvar TemplateBindingParseResult = /** @class */ (function () {\n function TemplateBindingParseResult(templateBindings, warnings, errors) {\n this.templateBindings = templateBindings;\n this.warnings = warnings;\n this.errors = errors;\n }\n return TemplateBindingParseResult;\n}());\nfunction _createInterpolateRegExp(config) {\n var pattern = escapeRegExp(config.start) + '([\\\\s\\\\S]*?)' + escapeRegExp(config.end);\n return new RegExp(pattern, 'g');\n}\nvar Parser = /** @class */ (function () {\n function Parser(_lexer) {\n this._lexer = _lexer;\n this.errors = [];\n }\n Parser.prototype.parseAction = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var sourceToLex = this._stripComments(input);\n var tokens = this._lexer.tokenize(this._stripComments(input));\n var ast = new _ParseAST(input, location, tokens, sourceToLex.length, true, this.errors, input.length - sourceToLex.length)\n .parseChain();\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype.parseBinding = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var ast = this._parseBindingAst(input, location, interpolationConfig);\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype.parseSimpleBinding = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var ast = this._parseBindingAst(input, location, interpolationConfig);\n var errors = SimpleExpressionChecker.check(ast);\n if (errors.length > 0) {\n this._reportError(\"Host binding expression cannot contain \" + errors.join(' '), input, location);\n }\n return new ASTWithSource(ast, input, location, this.errors);\n };\n Parser.prototype._reportError = function (message, input, errLocation, ctxLocation) {\n this.errors.push(new ParserError(message, input, errLocation, ctxLocation));\n };\n Parser.prototype._parseBindingAst = function (input, location, interpolationConfig) {\n // Quotes expressions use 3rd-party expression language. We don't want to use\n // our lexer or parser for that, so we check for that ahead of time.\n var quote = this._parseQuote(input, location);\n if (quote != null) {\n return quote;\n }\n this._checkNoInterpolation(input, location, interpolationConfig);\n var sourceToLex = this._stripComments(input);\n var tokens = this._lexer.tokenize(sourceToLex);\n return new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, input.length - sourceToLex.length)\n .parseChain();\n };\n Parser.prototype._parseQuote = function (input, location) {\n if (input == null)\n return null;\n var prefixSeparatorIndex = input.indexOf(':');\n if (prefixSeparatorIndex == -1)\n return null;\n var prefix = input.substring(0, prefixSeparatorIndex).trim();\n if (!isIdentifier(prefix))\n return null;\n var uninterpretedExpression = input.substring(prefixSeparatorIndex + 1);\n return new Quote(new ParseSpan(0, input.length), prefix, uninterpretedExpression, location);\n };\n Parser.prototype.parseTemplateBindings = function (prefixToken, input, location) {\n var tokens = this._lexer.tokenize(input);\n if (prefixToken) {\n // Prefix the tokens with the tokens from prefixToken but have them take no space (0 index).\n var prefixTokens = this._lexer.tokenize(prefixToken).map(function (t) {\n t.index = 0;\n return t;\n });\n tokens.unshift.apply(tokens, __spread(prefixTokens));\n }\n return new _ParseAST(input, location, tokens, input.length, false, this.errors, 0)\n .parseTemplateBindings();\n };\n Parser.prototype.parseInterpolation = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var split = this.splitInterpolation(input, location, interpolationConfig);\n if (split == null)\n return null;\n var expressions = [];\n for (var i = 0; i < split.expressions.length; ++i) {\n var expressionText = split.expressions[i];\n var sourceToLex = this._stripComments(expressionText);\n var tokens = this._lexer.tokenize(sourceToLex);\n var ast = new _ParseAST(input, location, tokens, sourceToLex.length, false, this.errors, split.offsets[i] + (expressionText.length - sourceToLex.length))\n .parseChain();\n expressions.push(ast);\n }\n return new ASTWithSource(new Interpolation(new ParseSpan(0, input == null ? 0 : input.length), split.strings, expressions), input, location, this.errors);\n };\n Parser.prototype.splitInterpolation = function (input, location, interpolationConfig) {\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var regexp = _createInterpolateRegExp(interpolationConfig);\n var parts = input.split(regexp);\n if (parts.length <= 1) {\n return null;\n }\n var strings = [];\n var expressions = [];\n var offsets = [];\n var offset = 0;\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n if (i % 2 === 0) {\n // fixed string\n strings.push(part);\n offset += part.length;\n }\n else if (part.trim().length > 0) {\n offset += interpolationConfig.start.length;\n expressions.push(part);\n offsets.push(offset);\n offset += part.length + interpolationConfig.end.length;\n }\n else {\n this._reportError('Blank expressions are not allowed in interpolated strings', input, \"at column \" + this._findInterpolationErrorColumn(parts, i, interpolationConfig) + \" in\", location);\n expressions.push('$implict');\n offsets.push(offset);\n }\n }\n return new SplitInterpolation(strings, expressions, offsets);\n };\n Parser.prototype.wrapLiteralPrimitive = function (input, location) {\n return new ASTWithSource(new LiteralPrimitive(new ParseSpan(0, input == null ? 0 : input.length), input), input, location, this.errors);\n };\n Parser.prototype._stripComments = function (input) {\n var i = this._commentStart(input);\n return i != null ? input.substring(0, i).trim() : input;\n };\n Parser.prototype._commentStart = function (input) {\n var outerQuote = null;\n for (var i = 0; i < input.length - 1; i++) {\n var char = input.charCodeAt(i);\n var nextChar = input.charCodeAt(i + 1);\n if (char === $SLASH && nextChar == $SLASH && outerQuote == null)\n return i;\n if (outerQuote === char) {\n outerQuote = null;\n }\n else if (outerQuote == null && isQuote(char)) {\n outerQuote = char;\n }\n }\n return null;\n };\n Parser.prototype._checkNoInterpolation = function (input, location, interpolationConfig) {\n var regexp = _createInterpolateRegExp(interpolationConfig);\n var parts = input.split(regexp);\n if (parts.length > 1) {\n this._reportError(\"Got interpolation (\" + interpolationConfig.start + interpolationConfig.end + \") where expression was expected\", input, \"at column \" + this._findInterpolationErrorColumn(parts, 1, interpolationConfig) + \" in\", location);\n }\n };\n Parser.prototype._findInterpolationErrorColumn = function (parts, partInErrIdx, interpolationConfig) {\n var errLocation = '';\n for (var j = 0; j < partInErrIdx; j++) {\n errLocation += j % 2 === 0 ?\n parts[j] :\n \"\" + interpolationConfig.start + parts[j] + interpolationConfig.end;\n }\n return errLocation.length;\n };\n return Parser;\n}());\nvar _ParseAST = /** @class */ (function () {\n function _ParseAST(input, location, tokens, inputLength, parseAction, errors, offset) {\n this.input = input;\n this.location = location;\n this.tokens = tokens;\n this.inputLength = inputLength;\n this.parseAction = parseAction;\n this.errors = errors;\n this.offset = offset;\n this.rparensExpected = 0;\n this.rbracketsExpected = 0;\n this.rbracesExpected = 0;\n this.index = 0;\n }\n _ParseAST.prototype.peek = function (offset) {\n var i = this.index + offset;\n return i < this.tokens.length ? this.tokens[i] : EOF;\n };\n Object.defineProperty(_ParseAST.prototype, \"next\", {\n get: function () { return this.peek(0); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(_ParseAST.prototype, \"inputIndex\", {\n get: function () {\n return (this.index < this.tokens.length) ? this.next.index + this.offset :\n this.inputLength + this.offset;\n },\n enumerable: true,\n configurable: true\n });\n _ParseAST.prototype.span = function (start) { return new ParseSpan(start, this.inputIndex); };\n _ParseAST.prototype.advance = function () { this.index++; };\n _ParseAST.prototype.optionalCharacter = function (code) {\n if (this.next.isCharacter(code)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n _ParseAST.prototype.peekKeywordLet = function () { return this.next.isKeywordLet(); };\n _ParseAST.prototype.peekKeywordAs = function () { return this.next.isKeywordAs(); };\n _ParseAST.prototype.expectCharacter = function (code) {\n if (this.optionalCharacter(code))\n return;\n this.error(\"Missing expected \" + String.fromCharCode(code));\n };\n _ParseAST.prototype.optionalOperator = function (op) {\n if (this.next.isOperator(op)) {\n this.advance();\n return true;\n }\n else {\n return false;\n }\n };\n _ParseAST.prototype.expectOperator = function (operator) {\n if (this.optionalOperator(operator))\n return;\n this.error(\"Missing expected operator \" + operator);\n };\n _ParseAST.prototype.expectIdentifierOrKeyword = function () {\n var n = this.next;\n if (!n.isIdentifier() && !n.isKeyword()) {\n this.error(\"Unexpected token \" + n + \", expected identifier or keyword\");\n return '';\n }\n this.advance();\n return n.toString();\n };\n _ParseAST.prototype.expectIdentifierOrKeywordOrString = function () {\n var n = this.next;\n if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {\n this.error(\"Unexpected token \" + n + \", expected identifier, keyword, or string\");\n return '';\n }\n this.advance();\n return n.toString();\n };\n _ParseAST.prototype.parseChain = function () {\n var exprs = [];\n var start = this.inputIndex;\n while (this.index < this.tokens.length) {\n var expr = this.parsePipe();\n exprs.push(expr);\n if (this.optionalCharacter($SEMICOLON)) {\n if (!this.parseAction) {\n this.error('Binding expression cannot contain chained expression');\n }\n while (this.optionalCharacter($SEMICOLON)) {\n } // read all semicolons\n }\n else if (this.index < this.tokens.length) {\n this.error(\"Unexpected token '\" + this.next + \"'\");\n }\n }\n if (exprs.length == 0)\n return new EmptyExpr(this.span(start));\n if (exprs.length == 1)\n return exprs[0];\n return new Chain(this.span(start), exprs);\n };\n _ParseAST.prototype.parsePipe = function () {\n var result = this.parseExpression();\n if (this.optionalOperator('|')) {\n if (this.parseAction) {\n this.error('Cannot have a pipe in an action expression');\n }\n do {\n var name_1 = this.expectIdentifierOrKeyword();\n var args = [];\n while (this.optionalCharacter($COLON)) {\n args.push(this.parseExpression());\n }\n result = new BindingPipe(this.span(result.span.start), result, name_1, args);\n } while (this.optionalOperator('|'));\n }\n return result;\n };\n _ParseAST.prototype.parseExpression = function () { return this.parseConditional(); };\n _ParseAST.prototype.parseConditional = function () {\n var start = this.inputIndex;\n var result = this.parseLogicalOr();\n if (this.optionalOperator('?')) {\n var yes = this.parsePipe();\n var no = void 0;\n if (!this.optionalCharacter($COLON)) {\n var end = this.inputIndex;\n var expression = this.input.substring(start, end);\n this.error(\"Conditional expression \" + expression + \" requires all 3 expressions\");\n no = new EmptyExpr(this.span(start));\n }\n else {\n no = this.parsePipe();\n }\n return new Conditional(this.span(start), result, yes, no);\n }\n else {\n return result;\n }\n };\n _ParseAST.prototype.parseLogicalOr = function () {\n // '||'\n var result = this.parseLogicalAnd();\n while (this.optionalOperator('||')) {\n var right = this.parseLogicalAnd();\n result = new Binary(this.span(result.span.start), '||', result, right);\n }\n return result;\n };\n _ParseAST.prototype.parseLogicalAnd = function () {\n // '&&'\n var result = this.parseEquality();\n while (this.optionalOperator('&&')) {\n var right = this.parseEquality();\n result = new Binary(this.span(result.span.start), '&&', result, right);\n }\n return result;\n };\n _ParseAST.prototype.parseEquality = function () {\n // '==','!=','===','!=='\n var result = this.parseRelational();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '==':\n case '===':\n case '!=':\n case '!==':\n this.advance();\n var right = this.parseRelational();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseRelational = function () {\n // '<', '>', '<=', '>='\n var result = this.parseAdditive();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n this.advance();\n var right = this.parseAdditive();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseAdditive = function () {\n // '+', '-'\n var result = this.parseMultiplicative();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '+':\n case '-':\n this.advance();\n var right = this.parseMultiplicative();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parseMultiplicative = function () {\n // '*', '%', '/'\n var result = this.parsePrefix();\n while (this.next.type == TokenType.Operator) {\n var operator = this.next.strValue;\n switch (operator) {\n case '*':\n case '%':\n case '/':\n this.advance();\n var right = this.parsePrefix();\n result = new Binary(this.span(result.span.start), operator, result, right);\n continue;\n }\n break;\n }\n return result;\n };\n _ParseAST.prototype.parsePrefix = function () {\n if (this.next.type == TokenType.Operator) {\n var start = this.inputIndex;\n var operator = this.next.strValue;\n var result = void 0;\n switch (operator) {\n case '+':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), '-', result, new LiteralPrimitive(new ParseSpan(start, start), 0));\n case '-':\n this.advance();\n result = this.parsePrefix();\n return new Binary(this.span(start), operator, new LiteralPrimitive(new ParseSpan(start, start), 0), result);\n case '!':\n this.advance();\n result = this.parsePrefix();\n return new PrefixNot(this.span(start), result);\n }\n }\n return this.parseCallChain();\n };\n _ParseAST.prototype.parseCallChain = function () {\n var result = this.parsePrimary();\n while (true) {\n if (this.optionalCharacter($PERIOD)) {\n result = this.parseAccessMemberOrMethodCall(result, false);\n }\n else if (this.optionalOperator('?.')) {\n result = this.parseAccessMemberOrMethodCall(result, true);\n }\n else if (this.optionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n var key = this.parsePipe();\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n if (this.optionalOperator('=')) {\n var value = this.parseConditional();\n result = new KeyedWrite(this.span(result.span.start), result, key, value);\n }\n else {\n result = new KeyedRead(this.span(result.span.start), result, key);\n }\n }\n else if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var args = this.parseCallArguments();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n result = new FunctionCall(this.span(result.span.start), result, args);\n }\n else if (this.optionalOperator('!')) {\n result = new NonNullAssert(this.span(result.span.start), result);\n }\n else {\n return result;\n }\n }\n };\n _ParseAST.prototype.parsePrimary = function () {\n var start = this.inputIndex;\n if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var result = this.parsePipe();\n this.rparensExpected--;\n this.expectCharacter($RPAREN);\n return result;\n }\n else if (this.next.isKeywordNull()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), null);\n }\n else if (this.next.isKeywordUndefined()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), void 0);\n }\n else if (this.next.isKeywordTrue()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), true);\n }\n else if (this.next.isKeywordFalse()) {\n this.advance();\n return new LiteralPrimitive(this.span(start), false);\n }\n else if (this.next.isKeywordThis()) {\n this.advance();\n return new ImplicitReceiver(this.span(start));\n }\n else if (this.optionalCharacter($LBRACKET)) {\n this.rbracketsExpected++;\n var elements = this.parseExpressionList($RBRACKET);\n this.rbracketsExpected--;\n this.expectCharacter($RBRACKET);\n return new LiteralArray(this.span(start), elements);\n }\n else if (this.next.isCharacter($LBRACE)) {\n return this.parseLiteralMap();\n }\n else if (this.next.isIdentifier()) {\n return this.parseAccessMemberOrMethodCall(new ImplicitReceiver(this.span(start)), false);\n }\n else if (this.next.isNumber()) {\n var value = this.next.toNumber();\n this.advance();\n return new LiteralPrimitive(this.span(start), value);\n }\n else if (this.next.isString()) {\n var literalValue = this.next.toString();\n this.advance();\n return new LiteralPrimitive(this.span(start), literalValue);\n }\n else if (this.index >= this.tokens.length) {\n this.error(\"Unexpected end of expression: \" + this.input);\n return new EmptyExpr(this.span(start));\n }\n else {\n this.error(\"Unexpected token \" + this.next);\n return new EmptyExpr(this.span(start));\n }\n };\n _ParseAST.prototype.parseExpressionList = function (terminator) {\n var result = [];\n if (!this.next.isCharacter(terminator)) {\n do {\n result.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n }\n return result;\n };\n _ParseAST.prototype.parseLiteralMap = function () {\n var keys = [];\n var values = [];\n var start = this.inputIndex;\n this.expectCharacter($LBRACE);\n if (!this.optionalCharacter($RBRACE)) {\n this.rbracesExpected++;\n do {\n var quoted = this.next.isString();\n var key = this.expectIdentifierOrKeywordOrString();\n keys.push({ key: key, quoted: quoted });\n this.expectCharacter($COLON);\n values.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n this.rbracesExpected--;\n this.expectCharacter($RBRACE);\n }\n return new LiteralMap(this.span(start), keys, values);\n };\n _ParseAST.prototype.parseAccessMemberOrMethodCall = function (receiver, isSafe) {\n if (isSafe === void 0) { isSafe = false; }\n var start = receiver.span.start;\n var id = this.expectIdentifierOrKeyword();\n if (this.optionalCharacter($LPAREN)) {\n this.rparensExpected++;\n var args = this.parseCallArguments();\n this.expectCharacter($RPAREN);\n this.rparensExpected--;\n var span = this.span(start);\n return isSafe ? new SafeMethodCall(span, receiver, id, args) :\n new MethodCall(span, receiver, id, args);\n }\n else {\n if (isSafe) {\n if (this.optionalOperator('=')) {\n this.error('The \\'?.\\' operator cannot be used in the assignment');\n return new EmptyExpr(this.span(start));\n }\n else {\n return new SafePropertyRead(this.span(start), receiver, id);\n }\n }\n else {\n if (this.optionalOperator('=')) {\n if (!this.parseAction) {\n this.error('Bindings cannot contain assignments');\n return new EmptyExpr(this.span(start));\n }\n var value = this.parseConditional();\n return new PropertyWrite(this.span(start), receiver, id, value);\n }\n else {\n return new PropertyRead(this.span(start), receiver, id);\n }\n }\n }\n };\n _ParseAST.prototype.parseCallArguments = function () {\n if (this.next.isCharacter($RPAREN))\n return [];\n var positionals = [];\n do {\n positionals.push(this.parsePipe());\n } while (this.optionalCharacter($COMMA));\n return positionals;\n };\n /**\n * An identifier, a keyword, a string with an optional `-` in between.\n */\n _ParseAST.prototype.expectTemplateBindingKey = function () {\n var result = '';\n var operatorFound = false;\n do {\n result += this.expectIdentifierOrKeywordOrString();\n operatorFound = this.optionalOperator('-');\n if (operatorFound) {\n result += '-';\n }\n } while (operatorFound);\n return result.toString();\n };\n _ParseAST.prototype.parseTemplateBindings = function () {\n var bindings = [];\n var prefix = null;\n var warnings = [];\n while (this.index < this.tokens.length) {\n var start = this.inputIndex;\n var keyIsVar = this.peekKeywordLet();\n if (keyIsVar) {\n this.advance();\n }\n var rawKey = this.expectTemplateBindingKey();\n var key = rawKey;\n if (!keyIsVar) {\n if (prefix == null) {\n prefix = key;\n }\n else {\n key = prefix + key[0].toUpperCase() + key.substring(1);\n }\n }\n this.optionalCharacter($COLON);\n var name_2 = null;\n var expression = null;\n if (keyIsVar) {\n if (this.optionalOperator('=')) {\n name_2 = this.expectTemplateBindingKey();\n }\n else {\n name_2 = '\\$implicit';\n }\n }\n else if (this.peekKeywordAs()) {\n var letStart = this.inputIndex;\n this.advance(); // consume `as`\n name_2 = rawKey;\n key = this.expectTemplateBindingKey(); // read local var name\n keyIsVar = true;\n }\n else if (this.next !== EOF && !this.peekKeywordLet()) {\n var start_1 = this.inputIndex;\n var ast = this.parsePipe();\n var source = this.input.substring(start_1 - this.offset, this.inputIndex - this.offset);\n expression = new ASTWithSource(ast, source, this.location, this.errors);\n }\n bindings.push(new TemplateBinding(this.span(start), key, keyIsVar, name_2, expression));\n if (this.peekKeywordAs() && !keyIsVar) {\n var letStart = this.inputIndex;\n this.advance(); // consume `as`\n var letName = this.expectTemplateBindingKey(); // read local var name\n bindings.push(new TemplateBinding(this.span(letStart), letName, true, key, null));\n }\n if (!this.optionalCharacter($SEMICOLON)) {\n this.optionalCharacter($COMMA);\n }\n }\n return new TemplateBindingParseResult(bindings, warnings, this.errors);\n };\n _ParseAST.prototype.error = function (message, index) {\n if (index === void 0) { index = null; }\n this.errors.push(new ParserError(message, this.input, this.locationText(index), this.location));\n this.skip();\n };\n _ParseAST.prototype.locationText = function (index) {\n if (index === void 0) { index = null; }\n if (index == null)\n index = this.index;\n return (index < this.tokens.length) ? \"at column \" + (this.tokens[index].index + 1) + \" in\" :\n \"at the end of the expression\";\n };\n // Error recovery should skip tokens until it encounters a recovery point. skip() treats\n // the end of input and a ';' as unconditionally a recovery point. It also treats ')',\n // '}' and ']' as conditional recovery points if one of calling productions is expecting\n // one of these symbols. This allows skip() to recover from errors such as '(a.) + 1' allowing\n // more of the AST to be retained (it doesn't skip any tokens as the ')' is retained because\n // of the '(' begins an '(' <expr> ')' production). The recovery points of grouping symbols\n // must be conditional as they must be skipped if none of the calling productions are not\n // expecting the closing token else we will never make progress in the case of an\n // extraneous group closing symbol (such as a stray ')'). This is not the case for ';' because\n // parseChain() is always the root production and it expects a ';'.\n // If a production expects one of these token it increments the corresponding nesting count,\n // and then decrements it just prior to checking if the token is in the input.\n _ParseAST.prototype.skip = function () {\n var n = this.next;\n while (this.index < this.tokens.length && !n.isCharacter($SEMICOLON) &&\n (this.rparensExpected <= 0 || !n.isCharacter($RPAREN)) &&\n (this.rbracesExpected <= 0 || !n.isCharacter($RBRACE)) &&\n (this.rbracketsExpected <= 0 || !n.isCharacter($RBRACKET))) {\n if (this.next.isError()) {\n this.errors.push(new ParserError(this.next.toString(), this.input, this.locationText(), this.location));\n }\n this.advance();\n n = this.next;\n }\n };\n return _ParseAST;\n}());\nvar SimpleExpressionChecker = /** @class */ (function () {\n function SimpleExpressionChecker() {\n this.errors = [];\n }\n SimpleExpressionChecker.check = function (ast) {\n var s = new SimpleExpressionChecker();\n ast.visit(s);\n return s.errors;\n };\n SimpleExpressionChecker.prototype.visitImplicitReceiver = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitInterpolation = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitLiteralPrimitive = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPropertyRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPropertyWrite = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitSafePropertyRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitMethodCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitSafeMethodCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitFunctionCall = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitLiteralArray = function (ast, context) { this.visitAll(ast.expressions); };\n SimpleExpressionChecker.prototype.visitLiteralMap = function (ast, context) { this.visitAll(ast.values); };\n SimpleExpressionChecker.prototype.visitBinary = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPrefixNot = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitNonNullAssert = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitConditional = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitPipe = function (ast, context) { this.errors.push('pipes'); };\n SimpleExpressionChecker.prototype.visitKeyedRead = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitKeyedWrite = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitAll = function (asts) {\n var _this = this;\n return asts.map(function (node) { return node.visit(_this); });\n };\n SimpleExpressionChecker.prototype.visitChain = function (ast, context) { };\n SimpleExpressionChecker.prototype.visitQuote = function (ast, context) { };\n return SimpleExpressionChecker;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ParseLocation = /** @class */ (function () {\n function ParseLocation(file, offset, line, col) {\n this.file = file;\n this.offset = offset;\n this.line = line;\n this.col = col;\n }\n ParseLocation.prototype.toString = function () {\n return this.offset != null ? this.file.url + \"@\" + this.line + \":\" + this.col : this.file.url;\n };\n ParseLocation.prototype.moveBy = function (delta) {\n var source = this.file.content;\n var len = source.length;\n var offset = this.offset;\n var line = this.line;\n var col = this.col;\n while (offset > 0 && delta < 0) {\n offset--;\n delta++;\n var ch = source.charCodeAt(offset);\n if (ch == $LF) {\n line--;\n var priorLine = source.substr(0, offset - 1).lastIndexOf(String.fromCharCode($LF));\n col = priorLine > 0 ? offset - priorLine : offset;\n }\n else {\n col--;\n }\n }\n while (offset < len && delta > 0) {\n var ch = source.charCodeAt(offset);\n offset++;\n delta--;\n if (ch == $LF) {\n line++;\n col = 0;\n }\n else {\n col++;\n }\n }\n return new ParseLocation(this.file, offset, line, col);\n };\n // Return the source around the location\n // Up to `maxChars` or `maxLines` on each side of the location\n ParseLocation.prototype.getContext = function (maxChars, maxLines) {\n var content = this.file.content;\n var startOffset = this.offset;\n if (startOffset != null) {\n if (startOffset > content.length - 1) {\n startOffset = content.length - 1;\n }\n var endOffset = startOffset;\n var ctxChars = 0;\n var ctxLines = 0;\n while (ctxChars < maxChars && startOffset > 0) {\n startOffset--;\n ctxChars++;\n if (content[startOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n ctxChars = 0;\n ctxLines = 0;\n while (ctxChars < maxChars && endOffset < content.length - 1) {\n endOffset++;\n ctxChars++;\n if (content[endOffset] == '\\n') {\n if (++ctxLines == maxLines) {\n break;\n }\n }\n }\n return {\n before: content.substring(startOffset, this.offset),\n after: content.substring(this.offset, endOffset + 1),\n };\n }\n return null;\n };\n return ParseLocation;\n}());\nvar ParseSourceFile = /** @class */ (function () {\n function ParseSourceFile(content, url) {\n this.content = content;\n this.url = url;\n }\n return ParseSourceFile;\n}());\nvar ParseSourceSpan = /** @class */ (function () {\n function ParseSourceSpan(start, end, details) {\n if (details === void 0) { details = null; }\n this.start = start;\n this.end = end;\n this.details = details;\n }\n ParseSourceSpan.prototype.toString = function () {\n return this.start.file.content.substring(this.start.offset, this.end.offset);\n };\n return ParseSourceSpan;\n}());\nvar ParseErrorLevel;\n(function (ParseErrorLevel) {\n ParseErrorLevel[ParseErrorLevel[\"WARNING\"] = 0] = \"WARNING\";\n ParseErrorLevel[ParseErrorLevel[\"ERROR\"] = 1] = \"ERROR\";\n})(ParseErrorLevel || (ParseErrorLevel = {}));\nvar ParseError = /** @class */ (function () {\n function ParseError(span, msg, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this.span = span;\n this.msg = msg;\n this.level = level;\n }\n ParseError.prototype.contextualMessage = function () {\n var ctx = this.span.start.getContext(100, 3);\n return ctx ? this.msg + \" (\\\"\" + ctx.before + \"[\" + ParseErrorLevel[this.level] + \" ->]\" + ctx.after + \"\\\")\" :\n this.msg;\n };\n ParseError.prototype.toString = function () {\n var details = this.span.details ? \", \" + this.span.details : '';\n return this.contextualMessage() + \": \" + this.span.start + details;\n };\n return ParseError;\n}());\nfunction typeSourceSpan(kind, type) {\n var moduleUrl = identifierModuleUrl(type);\n var sourceFileName = moduleUrl != null ? \"in \" + kind + \" \" + identifierName(type) + \" in \" + moduleUrl :\n \"in \" + kind + \" \" + identifierName(type);\n var sourceFile = new ParseSourceFile('', sourceFileName);\n return new ParseSourceSpan(new ParseLocation(sourceFile, -1, -1, -1), new ParseLocation(sourceFile, -1, -1, -1));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TokenType$1;\n(function (TokenType) {\n TokenType[TokenType[\"TAG_OPEN_START\"] = 0] = \"TAG_OPEN_START\";\n TokenType[TokenType[\"TAG_OPEN_END\"] = 1] = \"TAG_OPEN_END\";\n TokenType[TokenType[\"TAG_OPEN_END_VOID\"] = 2] = \"TAG_OPEN_END_VOID\";\n TokenType[TokenType[\"TAG_CLOSE\"] = 3] = \"TAG_CLOSE\";\n TokenType[TokenType[\"TEXT\"] = 4] = \"TEXT\";\n TokenType[TokenType[\"ESCAPABLE_RAW_TEXT\"] = 5] = \"ESCAPABLE_RAW_TEXT\";\n TokenType[TokenType[\"RAW_TEXT\"] = 6] = \"RAW_TEXT\";\n TokenType[TokenType[\"COMMENT_START\"] = 7] = \"COMMENT_START\";\n TokenType[TokenType[\"COMMENT_END\"] = 8] = \"COMMENT_END\";\n TokenType[TokenType[\"CDATA_START\"] = 9] = \"CDATA_START\";\n TokenType[TokenType[\"CDATA_END\"] = 10] = \"CDATA_END\";\n TokenType[TokenType[\"ATTR_NAME\"] = 11] = \"ATTR_NAME\";\n TokenType[TokenType[\"ATTR_VALUE\"] = 12] = \"ATTR_VALUE\";\n TokenType[TokenType[\"DOC_TYPE\"] = 13] = \"DOC_TYPE\";\n TokenType[TokenType[\"EXPANSION_FORM_START\"] = 14] = \"EXPANSION_FORM_START\";\n TokenType[TokenType[\"EXPANSION_CASE_VALUE\"] = 15] = \"EXPANSION_CASE_VALUE\";\n TokenType[TokenType[\"EXPANSION_CASE_EXP_START\"] = 16] = \"EXPANSION_CASE_EXP_START\";\n TokenType[TokenType[\"EXPANSION_CASE_EXP_END\"] = 17] = \"EXPANSION_CASE_EXP_END\";\n TokenType[TokenType[\"EXPANSION_FORM_END\"] = 18] = \"EXPANSION_FORM_END\";\n TokenType[TokenType[\"EOF\"] = 19] = \"EOF\";\n})(TokenType$1 || (TokenType$1 = {}));\nvar Token$1 = /** @class */ (function () {\n function Token(type, parts, sourceSpan) {\n this.type = type;\n this.parts = parts;\n this.sourceSpan = sourceSpan;\n }\n return Token;\n}());\nvar TokenError = /** @class */ (function (_super) {\n __extends(TokenError, _super);\n function TokenError(errorMsg, tokenType, span) {\n var _this = _super.call(this, span, errorMsg) || this;\n _this.tokenType = tokenType;\n return _this;\n }\n return TokenError;\n}(ParseError));\nvar TokenizeResult = /** @class */ (function () {\n function TokenizeResult(tokens, errors) {\n this.tokens = tokens;\n this.errors = errors;\n }\n return TokenizeResult;\n}());\nfunction tokenize(source, url, getTagDefinition, tokenizeExpansionForms, interpolationConfig) {\n if (tokenizeExpansionForms === void 0) { tokenizeExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return new _Tokenizer(new ParseSourceFile(source, url), getTagDefinition, tokenizeExpansionForms, interpolationConfig)\n .tokenize();\n}\nvar _CR_OR_CRLF_REGEXP = /\\r\\n?/g;\nfunction _unexpectedCharacterErrorMsg(charCode) {\n var char = charCode === $EOF ? 'EOF' : String.fromCharCode(charCode);\n return \"Unexpected character \\\"\" + char + \"\\\"\";\n}\nfunction _unknownEntityErrorMsg(entitySrc) {\n return \"Unknown entity \\\"\" + entitySrc + \"\\\" - use the \\\"&#<decimal>;\\\" or \\\"&#x<hex>;\\\" syntax\";\n}\nvar _ControlFlowError = /** @class */ (function () {\n function _ControlFlowError(error) {\n this.error = error;\n }\n return _ControlFlowError;\n}());\n// See http://www.w3.org/TR/html51/syntax.html#writing\nvar _Tokenizer = /** @class */ (function () {\n /**\n * @param _file The html source\n * @param _getTagDefinition\n * @param _tokenizeIcu Whether to tokenize ICU messages (considered as text nodes when false)\n * @param _interpolationConfig\n */\n function _Tokenizer(_file, _getTagDefinition, _tokenizeIcu, _interpolationConfig) {\n if (_interpolationConfig === void 0) { _interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n this._file = _file;\n this._getTagDefinition = _getTagDefinition;\n this._tokenizeIcu = _tokenizeIcu;\n this._interpolationConfig = _interpolationConfig;\n // Note: this is always lowercase!\n this._peek = -1;\n this._nextPeek = -1;\n this._index = -1;\n this._line = 0;\n this._column = -1;\n this._expansionCaseStack = [];\n this._inInterpolation = false;\n this.tokens = [];\n this.errors = [];\n this._input = _file.content;\n this._length = _file.content.length;\n this._advance();\n }\n _Tokenizer.prototype._processCarriageReturns = function (content) {\n // http://www.w3.org/TR/html5/syntax.html#preprocessing-the-input-stream\n // In order to keep the original position in the source, we can not\n // pre-process it.\n // Instead CRs are processed right before instantiating the tokens.\n return content.replace(_CR_OR_CRLF_REGEXP, '\\n');\n };\n _Tokenizer.prototype.tokenize = function () {\n while (this._peek !== $EOF) {\n var start = this._getLocation();\n try {\n if (this._attemptCharCode($LT)) {\n if (this._attemptCharCode($BANG)) {\n if (this._attemptCharCode($LBRACKET)) {\n this._consumeCdata(start);\n }\n else if (this._attemptCharCode($MINUS)) {\n this._consumeComment(start);\n }\n else {\n this._consumeDocType(start);\n }\n }\n else if (this._attemptCharCode($SLASH)) {\n this._consumeTagClose(start);\n }\n else {\n this._consumeTagOpen(start);\n }\n }\n else if (!(this._tokenizeIcu && this._tokenizeExpansionForm())) {\n this._consumeText();\n }\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n this.errors.push(e.error);\n }\n else {\n throw e;\n }\n }\n }\n this._beginToken(TokenType$1.EOF);\n this._endToken([]);\n return new TokenizeResult(mergeTextTokens(this.tokens), this.errors);\n };\n /**\n * @returns whether an ICU token has been created\n * @internal\n */\n _Tokenizer.prototype._tokenizeExpansionForm = function () {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n this._consumeExpansionFormStart();\n return true;\n }\n if (isExpansionCaseStart(this._peek) && this._isInExpansionForm()) {\n this._consumeExpansionCaseStart();\n return true;\n }\n if (this._peek === $RBRACE) {\n if (this._isInExpansionCase()) {\n this._consumeExpansionCaseEnd();\n return true;\n }\n if (this._isInExpansionForm()) {\n this._consumeExpansionFormEnd();\n return true;\n }\n }\n return false;\n };\n _Tokenizer.prototype._getLocation = function () {\n return new ParseLocation(this._file, this._index, this._line, this._column);\n };\n _Tokenizer.prototype._getSpan = function (start, end) {\n if (start === void 0) { start = this._getLocation(); }\n if (end === void 0) { end = this._getLocation(); }\n return new ParseSourceSpan(start, end);\n };\n _Tokenizer.prototype._beginToken = function (type, start) {\n if (start === void 0) { start = this._getLocation(); }\n this._currentTokenStart = start;\n this._currentTokenType = type;\n };\n _Tokenizer.prototype._endToken = function (parts, end) {\n if (end === void 0) { end = this._getLocation(); }\n var token = new Token$1(this._currentTokenType, parts, new ParseSourceSpan(this._currentTokenStart, end));\n this.tokens.push(token);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return token;\n };\n _Tokenizer.prototype._createError = function (msg, span) {\n if (this._isInExpansionForm()) {\n msg += \" (Do you have an unescaped \\\"{\\\" in your template? Use \\\"{{ '{' }}\\\") to escape it.)\";\n }\n var error = new TokenError(msg, this._currentTokenType, span);\n this._currentTokenStart = null;\n this._currentTokenType = null;\n return new _ControlFlowError(error);\n };\n _Tokenizer.prototype._advance = function () {\n if (this._index >= this._length) {\n throw this._createError(_unexpectedCharacterErrorMsg($EOF), this._getSpan());\n }\n if (this._peek === $LF) {\n this._line++;\n this._column = 0;\n }\n else if (this._peek !== $LF && this._peek !== $CR) {\n this._column++;\n }\n this._index++;\n this._peek = this._index >= this._length ? $EOF : this._input.charCodeAt(this._index);\n this._nextPeek =\n this._index + 1 >= this._length ? $EOF : this._input.charCodeAt(this._index + 1);\n };\n _Tokenizer.prototype._attemptCharCode = function (charCode) {\n if (this._peek === charCode) {\n this._advance();\n return true;\n }\n return false;\n };\n _Tokenizer.prototype._attemptCharCodeCaseInsensitive = function (charCode) {\n if (compareCharCodeCaseInsensitive(this._peek, charCode)) {\n this._advance();\n return true;\n }\n return false;\n };\n _Tokenizer.prototype._requireCharCode = function (charCode) {\n var location = this._getLocation();\n if (!this._attemptCharCode(charCode)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location, location));\n }\n };\n _Tokenizer.prototype._attemptStr = function (chars) {\n var len = chars.length;\n if (this._index + len > this._length) {\n return false;\n }\n var initialPosition = this._savePosition();\n for (var i = 0; i < len; i++) {\n if (!this._attemptCharCode(chars.charCodeAt(i))) {\n // If attempting to parse the string fails, we want to reset the parser\n // to where it was before the attempt\n this._restorePosition(initialPosition);\n return false;\n }\n }\n return true;\n };\n _Tokenizer.prototype._attemptStrCaseInsensitive = function (chars) {\n for (var i = 0; i < chars.length; i++) {\n if (!this._attemptCharCodeCaseInsensitive(chars.charCodeAt(i))) {\n return false;\n }\n }\n return true;\n };\n _Tokenizer.prototype._requireStr = function (chars) {\n var location = this._getLocation();\n if (!this._attemptStr(chars)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(location));\n }\n };\n _Tokenizer.prototype._attemptCharCodeUntilFn = function (predicate) {\n while (!predicate(this._peek)) {\n this._advance();\n }\n };\n _Tokenizer.prototype._requireCharCodeUntilFn = function (predicate, len) {\n var start = this._getLocation();\n this._attemptCharCodeUntilFn(predicate);\n if (this._index - start.offset < len) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan(start, start));\n }\n };\n _Tokenizer.prototype._attemptUntilChar = function (char) {\n while (this._peek !== char) {\n this._advance();\n }\n };\n _Tokenizer.prototype._readChar = function (decodeEntities) {\n if (decodeEntities && this._peek === $AMPERSAND) {\n return this._decodeEntity();\n }\n else {\n var index = this._index;\n this._advance();\n return this._input[index];\n }\n };\n _Tokenizer.prototype._decodeEntity = function () {\n var start = this._getLocation();\n this._advance();\n if (this._attemptCharCode($HASH)) {\n var isHex = this._attemptCharCode($x) || this._attemptCharCode($X);\n var numberStart = this._getLocation().offset;\n this._attemptCharCodeUntilFn(isDigitEntityEnd);\n if (this._peek != $SEMICOLON) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n this._advance();\n var strNum = this._input.substring(numberStart, this._index - 1);\n try {\n var charCode = parseInt(strNum, isHex ? 16 : 10);\n return String.fromCharCode(charCode);\n }\n catch (e) {\n var entity = this._input.substring(start.offset + 1, this._index - 1);\n throw this._createError(_unknownEntityErrorMsg(entity), this._getSpan(start));\n }\n }\n else {\n var startPosition = this._savePosition();\n this._attemptCharCodeUntilFn(isNamedEntityEnd);\n if (this._peek != $SEMICOLON) {\n this._restorePosition(startPosition);\n return '&';\n }\n this._advance();\n var name_1 = this._input.substring(start.offset + 1, this._index - 1);\n var char = NAMED_ENTITIES[name_1];\n if (!char) {\n throw this._createError(_unknownEntityErrorMsg(name_1), this._getSpan(start));\n }\n return char;\n }\n };\n _Tokenizer.prototype._consumeRawText = function (decodeEntities, firstCharOfEnd, attemptEndRest) {\n var tagCloseStart;\n var textStart = this._getLocation();\n this._beginToken(decodeEntities ? TokenType$1.ESCAPABLE_RAW_TEXT : TokenType$1.RAW_TEXT, textStart);\n var parts = [];\n while (true) {\n tagCloseStart = this._getLocation();\n if (this._attemptCharCode(firstCharOfEnd) && attemptEndRest()) {\n break;\n }\n if (this._index > tagCloseStart.offset) {\n // add the characters consumed by the previous if statement to the output\n parts.push(this._input.substring(tagCloseStart.offset, this._index));\n }\n while (this._peek !== firstCharOfEnd) {\n parts.push(this._readChar(decodeEntities));\n }\n }\n return this._endToken([this._processCarriageReturns(parts.join(''))], tagCloseStart);\n };\n _Tokenizer.prototype._consumeComment = function (start) {\n var _this = this;\n this._beginToken(TokenType$1.COMMENT_START, start);\n this._requireCharCode($MINUS);\n this._endToken([]);\n var textToken = this._consumeRawText(false, $MINUS, function () { return _this._attemptStr('->'); });\n this._beginToken(TokenType$1.COMMENT_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeCdata = function (start) {\n var _this = this;\n this._beginToken(TokenType$1.CDATA_START, start);\n this._requireStr('CDATA[');\n this._endToken([]);\n var textToken = this._consumeRawText(false, $RBRACKET, function () { return _this._attemptStr(']>'); });\n this._beginToken(TokenType$1.CDATA_END, textToken.sourceSpan.end);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeDocType = function (start) {\n this._beginToken(TokenType$1.DOC_TYPE, start);\n this._attemptUntilChar($GT);\n this._advance();\n this._endToken([this._input.substring(start.offset + 2, this._index - 1)]);\n };\n _Tokenizer.prototype._consumePrefixAndName = function () {\n var nameOrPrefixStart = this._index;\n var prefix = null;\n while (this._peek !== $COLON && !isPrefixEnd(this._peek)) {\n this._advance();\n }\n var nameStart;\n if (this._peek === $COLON) {\n this._advance();\n prefix = this._input.substring(nameOrPrefixStart, this._index - 1);\n nameStart = this._index;\n }\n else {\n nameStart = nameOrPrefixStart;\n }\n this._requireCharCodeUntilFn(isNameEnd, this._index === nameStart ? 1 : 0);\n var name = this._input.substring(nameStart, this._index);\n return [prefix, name];\n };\n _Tokenizer.prototype._consumeTagOpen = function (start) {\n var savedPos = this._savePosition();\n var tagName;\n var lowercaseTagName;\n try {\n if (!isAsciiLetter(this._peek)) {\n throw this._createError(_unexpectedCharacterErrorMsg(this._peek), this._getSpan());\n }\n var nameStart = this._index;\n this._consumeTagOpenStart(start);\n tagName = this._input.substring(nameStart, this._index);\n lowercaseTagName = tagName.toLowerCase();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n while (this._peek !== $SLASH && this._peek !== $GT) {\n this._consumeAttributeName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n if (this._attemptCharCode($EQ)) {\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._consumeAttributeValue();\n }\n this._attemptCharCodeUntilFn(isNotWhitespace);\n }\n this._consumeTagOpenEnd();\n }\n catch (e) {\n if (e instanceof _ControlFlowError) {\n // When the start tag is invalid, assume we want a \"<\"\n this._restorePosition(savedPos);\n // Back to back text tokens are merged at the end\n this._beginToken(TokenType$1.TEXT, start);\n this._endToken(['<']);\n return;\n }\n throw e;\n }\n var contentTokenType = this._getTagDefinition(tagName).contentType;\n if (contentTokenType === TagContentType.RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, false);\n }\n else if (contentTokenType === TagContentType.ESCAPABLE_RAW_TEXT) {\n this._consumeRawTextWithTagClose(lowercaseTagName, true);\n }\n };\n _Tokenizer.prototype._consumeRawTextWithTagClose = function (lowercaseTagName, decodeEntities) {\n var _this = this;\n var textToken = this._consumeRawText(decodeEntities, $LT, function () {\n if (!_this._attemptCharCode($SLASH))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n if (!_this._attemptStrCaseInsensitive(lowercaseTagName))\n return false;\n _this._attemptCharCodeUntilFn(isNotWhitespace);\n return _this._attemptCharCode($GT);\n });\n this._beginToken(TokenType$1.TAG_CLOSE, textToken.sourceSpan.end);\n this._endToken([null, lowercaseTagName]);\n };\n _Tokenizer.prototype._consumeTagOpenStart = function (start) {\n this._beginToken(TokenType$1.TAG_OPEN_START, start);\n var parts = this._consumePrefixAndName();\n this._endToken(parts);\n };\n _Tokenizer.prototype._consumeAttributeName = function () {\n this._beginToken(TokenType$1.ATTR_NAME);\n var prefixAndName = this._consumePrefixAndName();\n this._endToken(prefixAndName);\n };\n _Tokenizer.prototype._consumeAttributeValue = function () {\n this._beginToken(TokenType$1.ATTR_VALUE);\n var value;\n if (this._peek === $SQ || this._peek === $DQ) {\n var quoteChar = this._peek;\n this._advance();\n var parts = [];\n while (this._peek !== quoteChar) {\n parts.push(this._readChar(true));\n }\n value = parts.join('');\n this._advance();\n }\n else {\n var valueStart = this._index;\n this._requireCharCodeUntilFn(isNameEnd, 1);\n value = this._input.substring(valueStart, this._index);\n }\n this._endToken([this._processCarriageReturns(value)]);\n };\n _Tokenizer.prototype._consumeTagOpenEnd = function () {\n var tokenType = this._attemptCharCode($SLASH) ? TokenType$1.TAG_OPEN_END_VOID : TokenType$1.TAG_OPEN_END;\n this._beginToken(tokenType);\n this._requireCharCode($GT);\n this._endToken([]);\n };\n _Tokenizer.prototype._consumeTagClose = function (start) {\n this._beginToken(TokenType$1.TAG_CLOSE, start);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n var prefixAndName = this._consumePrefixAndName();\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._requireCharCode($GT);\n this._endToken(prefixAndName);\n };\n _Tokenizer.prototype._consumeExpansionFormStart = function () {\n this._beginToken(TokenType$1.EXPANSION_FORM_START, this._getLocation());\n this._requireCharCode($LBRACE);\n this._endToken([]);\n this._expansionCaseStack.push(TokenType$1.EXPANSION_FORM_START);\n this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());\n var condition = this._readUntil($COMMA);\n this._endToken([condition], this._getLocation());\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType$1.RAW_TEXT, this._getLocation());\n var type = this._readUntil($COMMA);\n this._endToken([type], this._getLocation());\n this._requireCharCode($COMMA);\n this._attemptCharCodeUntilFn(isNotWhitespace);\n };\n _Tokenizer.prototype._consumeExpansionCaseStart = function () {\n this._beginToken(TokenType$1.EXPANSION_CASE_VALUE, this._getLocation());\n var value = this._readUntil($LBRACE).trim();\n this._endToken([value], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._beginToken(TokenType$1.EXPANSION_CASE_EXP_START, this._getLocation());\n this._requireCharCode($LBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.push(TokenType$1.EXPANSION_CASE_EXP_START);\n };\n _Tokenizer.prototype._consumeExpansionCaseEnd = function () {\n this._beginToken(TokenType$1.EXPANSION_CASE_EXP_END, this._getLocation());\n this._requireCharCode($RBRACE);\n this._endToken([], this._getLocation());\n this._attemptCharCodeUntilFn(isNotWhitespace);\n this._expansionCaseStack.pop();\n };\n _Tokenizer.prototype._consumeExpansionFormEnd = function () {\n this._beginToken(TokenType$1.EXPANSION_FORM_END, this._getLocation());\n this._requireCharCode($RBRACE);\n this._endToken([]);\n this._expansionCaseStack.pop();\n };\n _Tokenizer.prototype._consumeText = function () {\n var start = this._getLocation();\n this._beginToken(TokenType$1.TEXT, start);\n var parts = [];\n do {\n if (this._interpolationConfig && this._attemptStr(this._interpolationConfig.start)) {\n parts.push(this._interpolationConfig.start);\n this._inInterpolation = true;\n }\n else if (this._interpolationConfig && this._inInterpolation &&\n this._attemptStr(this._interpolationConfig.end)) {\n parts.push(this._interpolationConfig.end);\n this._inInterpolation = false;\n }\n else {\n parts.push(this._readChar(true));\n }\n } while (!this._isTextEnd());\n this._endToken([this._processCarriageReturns(parts.join(''))]);\n };\n _Tokenizer.prototype._isTextEnd = function () {\n if (this._peek === $LT || this._peek === $EOF) {\n return true;\n }\n if (this._tokenizeIcu && !this._inInterpolation) {\n if (isExpansionFormStart(this._input, this._index, this._interpolationConfig)) {\n // start of an expansion form\n return true;\n }\n if (this._peek === $RBRACE && this._isInExpansionCase()) {\n // end of and expansion case\n return true;\n }\n }\n return false;\n };\n _Tokenizer.prototype._savePosition = function () {\n return [this._peek, this._index, this._column, this._line, this.tokens.length];\n };\n _Tokenizer.prototype._readUntil = function (char) {\n var start = this._index;\n this._attemptUntilChar(char);\n return this._input.substring(start, this._index);\n };\n _Tokenizer.prototype._restorePosition = function (position) {\n this._peek = position[0];\n this._index = position[1];\n this._column = position[2];\n this._line = position[3];\n var nbTokens = position[4];\n if (nbTokens < this.tokens.length) {\n // remove any extra tokens\n this.tokens = this.tokens.slice(0, nbTokens);\n }\n };\n _Tokenizer.prototype._isInExpansionCase = function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType$1.EXPANSION_CASE_EXP_START;\n };\n _Tokenizer.prototype._isInExpansionForm = function () {\n return this._expansionCaseStack.length > 0 &&\n this._expansionCaseStack[this._expansionCaseStack.length - 1] ===\n TokenType$1.EXPANSION_FORM_START;\n };\n return _Tokenizer;\n}());\nfunction isNotWhitespace(code) {\n return !isWhitespace(code) || code === $EOF;\n}\nfunction isNameEnd(code) {\n return isWhitespace(code) || code === $GT || code === $SLASH ||\n code === $SQ || code === $DQ || code === $EQ;\n}\nfunction isPrefixEnd(code) {\n return (code < $a || $z < code) && (code < $A || $Z < code) &&\n (code < $0 || code > $9);\n}\nfunction isDigitEntityEnd(code) {\n return code == $SEMICOLON || code == $EOF || !isAsciiHexDigit(code);\n}\nfunction isNamedEntityEnd(code) {\n return code == $SEMICOLON || code == $EOF || !isAsciiLetter(code);\n}\nfunction isExpansionFormStart(input, offset, interpolationConfig) {\n var isInterpolationStart = interpolationConfig ? input.indexOf(interpolationConfig.start, offset) == offset : false;\n return input.charCodeAt(offset) == $LBRACE && !isInterpolationStart;\n}\nfunction isExpansionCaseStart(peek) {\n return peek === $EQ || isAsciiLetter(peek) || isDigit(peek);\n}\nfunction compareCharCodeCaseInsensitive(code1, code2) {\n return toUpperCaseCharCode(code1) == toUpperCaseCharCode(code2);\n}\nfunction toUpperCaseCharCode(code) {\n return code >= $a && code <= $z ? code - $a + $A : code;\n}\nfunction mergeTextTokens(srcTokens) {\n var dstTokens = [];\n var lastDstToken = undefined;\n for (var i = 0; i < srcTokens.length; i++) {\n var token = srcTokens[i];\n if (lastDstToken && lastDstToken.type == TokenType$1.TEXT && token.type == TokenType$1.TEXT) {\n lastDstToken.parts[0] += token.parts[0];\n lastDstToken.sourceSpan.end = token.sourceSpan.end;\n }\n else {\n lastDstToken = token;\n dstTokens.push(lastDstToken);\n }\n }\n return dstTokens;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TreeError = /** @class */ (function (_super) {\n __extends(TreeError, _super);\n function TreeError(elementName, span, msg) {\n var _this = _super.call(this, span, msg) || this;\n _this.elementName = elementName;\n return _this;\n }\n TreeError.create = function (elementName, span, msg) {\n return new TreeError(elementName, span, msg);\n };\n return TreeError;\n}(ParseError));\nvar ParseTreeResult = /** @class */ (function () {\n function ParseTreeResult(rootNodes, errors) {\n this.rootNodes = rootNodes;\n this.errors = errors;\n }\n return ParseTreeResult;\n}());\nvar Parser$1 = /** @class */ (function () {\n function Parser(getTagDefinition) {\n this.getTagDefinition = getTagDefinition;\n }\n Parser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var tokensAndErrors = tokenize(source, url, this.getTagDefinition, parseExpansionForms, interpolationConfig);\n var treeAndErrors = new _TreeBuilder(tokensAndErrors.tokens, this.getTagDefinition).build();\n return new ParseTreeResult(treeAndErrors.rootNodes, tokensAndErrors.errors.concat(treeAndErrors.errors));\n };\n return Parser;\n}());\nvar _TreeBuilder = /** @class */ (function () {\n function _TreeBuilder(tokens, getTagDefinition) {\n this.tokens = tokens;\n this.getTagDefinition = getTagDefinition;\n this._index = -1;\n this._rootNodes = [];\n this._errors = [];\n this._elementStack = [];\n this._advance();\n }\n _TreeBuilder.prototype.build = function () {\n while (this._peek.type !== TokenType$1.EOF) {\n if (this._peek.type === TokenType$1.TAG_OPEN_START) {\n this._consumeStartTag(this._advance());\n }\n else if (this._peek.type === TokenType$1.TAG_CLOSE) {\n this._consumeEndTag(this._advance());\n }\n else if (this._peek.type === TokenType$1.CDATA_START) {\n this._closeVoidElement();\n this._consumeCdata(this._advance());\n }\n else if (this._peek.type === TokenType$1.COMMENT_START) {\n this._closeVoidElement();\n this._consumeComment(this._advance());\n }\n else if (this._peek.type === TokenType$1.TEXT || this._peek.type === TokenType$1.RAW_TEXT ||\n this._peek.type === TokenType$1.ESCAPABLE_RAW_TEXT) {\n this._closeVoidElement();\n this._consumeText(this._advance());\n }\n else if (this._peek.type === TokenType$1.EXPANSION_FORM_START) {\n this._consumeExpansion(this._advance());\n }\n else {\n // Skip all other tokens...\n this._advance();\n }\n }\n return new ParseTreeResult(this._rootNodes, this._errors);\n };\n _TreeBuilder.prototype._advance = function () {\n var prev = this._peek;\n if (this._index < this.tokens.length - 1) {\n // Note: there is always an EOF token at the end\n this._index++;\n }\n this._peek = this.tokens[this._index];\n return prev;\n };\n _TreeBuilder.prototype._advanceIf = function (type) {\n if (this._peek.type === type) {\n return this._advance();\n }\n return null;\n };\n _TreeBuilder.prototype._consumeCdata = function (startToken) {\n this._consumeText(this._advance());\n this._advanceIf(TokenType$1.CDATA_END);\n };\n _TreeBuilder.prototype._consumeComment = function (token) {\n var text = this._advanceIf(TokenType$1.RAW_TEXT);\n this._advanceIf(TokenType$1.COMMENT_END);\n var value = text != null ? text.parts[0].trim() : null;\n this._addToParent(new Comment(value, token.sourceSpan));\n };\n _TreeBuilder.prototype._consumeExpansion = function (token) {\n var switchValue = this._advance();\n var type = this._advance();\n var cases = [];\n // read =\n while (this._peek.type === TokenType$1.EXPANSION_CASE_VALUE) {\n var expCase = this._parseExpansionCase();\n if (!expCase)\n return; // error\n cases.push(expCase);\n }\n // read the final }\n if (this._peek.type !== TokenType$1.EXPANSION_FORM_END) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return;\n }\n var sourceSpan = new ParseSourceSpan(token.sourceSpan.start, this._peek.sourceSpan.end);\n this._addToParent(new Expansion(switchValue.parts[0], type.parts[0], cases, sourceSpan, switchValue.sourceSpan));\n this._advance();\n };\n _TreeBuilder.prototype._parseExpansionCase = function () {\n var value = this._advance();\n // read {\n if (this._peek.type !== TokenType$1.EXPANSION_CASE_EXP_START) {\n this._errors.push(TreeError.create(null, this._peek.sourceSpan, \"Invalid ICU message. Missing '{'.\"));\n return null;\n }\n // read until }\n var start = this._advance();\n var exp = this._collectExpansionExpTokens(start);\n if (!exp)\n return null;\n var end = this._advance();\n exp.push(new Token$1(TokenType$1.EOF, [], end.sourceSpan));\n // parse everything in between { and }\n var parsedExp = new _TreeBuilder(exp, this.getTagDefinition).build();\n if (parsedExp.errors.length > 0) {\n this._errors = this._errors.concat(parsedExp.errors);\n return null;\n }\n var sourceSpan = new ParseSourceSpan(value.sourceSpan.start, end.sourceSpan.end);\n var expSourceSpan = new ParseSourceSpan(start.sourceSpan.start, end.sourceSpan.end);\n return new ExpansionCase(value.parts[0], parsedExp.rootNodes, sourceSpan, value.sourceSpan, expSourceSpan);\n };\n _TreeBuilder.prototype._collectExpansionExpTokens = function (start) {\n var exp = [];\n var expansionFormStack = [TokenType$1.EXPANSION_CASE_EXP_START];\n while (true) {\n if (this._peek.type === TokenType$1.EXPANSION_FORM_START ||\n this._peek.type === TokenType$1.EXPANSION_CASE_EXP_START) {\n expansionFormStack.push(this._peek.type);\n }\n if (this._peek.type === TokenType$1.EXPANSION_CASE_EXP_END) {\n if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_CASE_EXP_START)) {\n expansionFormStack.pop();\n if (expansionFormStack.length == 0)\n return exp;\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === TokenType$1.EXPANSION_FORM_END) {\n if (lastOnStack(expansionFormStack, TokenType$1.EXPANSION_FORM_START)) {\n expansionFormStack.pop();\n }\n else {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n }\n if (this._peek.type === TokenType$1.EOF) {\n this._errors.push(TreeError.create(null, start.sourceSpan, \"Invalid ICU message. Missing '}'.\"));\n return null;\n }\n exp.push(this._advance());\n }\n };\n _TreeBuilder.prototype._consumeText = function (token) {\n var text = token.parts[0];\n if (text.length > 0 && text[0] == '\\n') {\n var parent_1 = this._getParentElement();\n if (parent_1 != null && parent_1.children.length == 0 &&\n this.getTagDefinition(parent_1.name).ignoreFirstLf) {\n text = text.substring(1);\n }\n }\n if (text.length > 0) {\n this._addToParent(new Text(text, token.sourceSpan));\n }\n };\n _TreeBuilder.prototype._closeVoidElement = function () {\n var el = this._getParentElement();\n if (el && this.getTagDefinition(el.name).isVoid) {\n this._elementStack.pop();\n }\n };\n _TreeBuilder.prototype._consumeStartTag = function (startTagToken) {\n var prefix = startTagToken.parts[0];\n var name = startTagToken.parts[1];\n var attrs = [];\n while (this._peek.type === TokenType$1.ATTR_NAME) {\n attrs.push(this._consumeAttr(this._advance()));\n }\n var fullName = this._getElementFullName(prefix, name, this._getParentElement());\n var selfClosing = false;\n // Note: There could have been a tokenizer error\n // so that we don't get a token for the end tag...\n if (this._peek.type === TokenType$1.TAG_OPEN_END_VOID) {\n this._advance();\n selfClosing = true;\n var tagDef = this.getTagDefinition(fullName);\n if (!(tagDef.canSelfClose || getNsPrefix(fullName) !== null || tagDef.isVoid)) {\n this._errors.push(TreeError.create(fullName, startTagToken.sourceSpan, \"Only void and foreign elements can be self closed \\\"\" + startTagToken.parts[1] + \"\\\"\"));\n }\n }\n else if (this._peek.type === TokenType$1.TAG_OPEN_END) {\n this._advance();\n selfClosing = false;\n }\n var end = this._peek.sourceSpan.start;\n var span = new ParseSourceSpan(startTagToken.sourceSpan.start, end);\n var el = new Element(fullName, attrs, [], span, span, undefined);\n this._pushElement(el);\n if (selfClosing) {\n this._popElement(fullName);\n el.endSourceSpan = span;\n }\n };\n _TreeBuilder.prototype._pushElement = function (el) {\n var parentEl = this._getParentElement();\n if (parentEl && this.getTagDefinition(parentEl.name).isClosedByChild(el.name)) {\n this._elementStack.pop();\n }\n var tagDef = this.getTagDefinition(el.name);\n var _a = this._getParentElementSkippingContainers(), parent = _a.parent, container = _a.container;\n if (parent && tagDef.requireExtraParent(parent.name)) {\n var newParent = new Element(tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n this._insertBeforeContainer(parent, container, newParent);\n }\n this._addToParent(el);\n this._elementStack.push(el);\n };\n _TreeBuilder.prototype._consumeEndTag = function (endTagToken) {\n var fullName = this._getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());\n if (this._getParentElement()) {\n this._getParentElement().endSourceSpan = endTagToken.sourceSpan;\n }\n if (this.getTagDefinition(fullName).isVoid) {\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, \"Void elements do not have end tags \\\"\" + endTagToken.parts[1] + \"\\\"\"));\n }\n else if (!this._popElement(fullName)) {\n var errMsg = \"Unexpected closing tag \\\"\" + fullName + \"\\\". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags\";\n this._errors.push(TreeError.create(fullName, endTagToken.sourceSpan, errMsg));\n }\n };\n _TreeBuilder.prototype._popElement = function (fullName) {\n for (var stackIndex = this._elementStack.length - 1; stackIndex >= 0; stackIndex--) {\n var el = this._elementStack[stackIndex];\n if (el.name == fullName) {\n this._elementStack.splice(stackIndex, this._elementStack.length - stackIndex);\n return true;\n }\n if (!this.getTagDefinition(el.name).closedByParent) {\n return false;\n }\n }\n return false;\n };\n _TreeBuilder.prototype._consumeAttr = function (attrName) {\n var fullName = mergeNsAndName(attrName.parts[0], attrName.parts[1]);\n var end = attrName.sourceSpan.end;\n var value = '';\n var valueSpan = undefined;\n if (this._peek.type === TokenType$1.ATTR_VALUE) {\n var valueToken = this._advance();\n value = valueToken.parts[0];\n end = valueToken.sourceSpan.end;\n valueSpan = valueToken.sourceSpan;\n }\n return new Attribute(fullName, value, new ParseSourceSpan(attrName.sourceSpan.start, end), valueSpan);\n };\n _TreeBuilder.prototype._getParentElement = function () {\n return this._elementStack.length > 0 ? this._elementStack[this._elementStack.length - 1] : null;\n };\n /**\n * Returns the parent in the DOM and the container.\n *\n * `<ng-container>` elements are skipped as they are not rendered as DOM element.\n */\n _TreeBuilder.prototype._getParentElementSkippingContainers = function () {\n var container = null;\n for (var i = this._elementStack.length - 1; i >= 0; i--) {\n if (!isNgContainer(this._elementStack[i].name)) {\n return { parent: this._elementStack[i], container: container };\n }\n container = this._elementStack[i];\n }\n return { parent: null, container: container };\n };\n _TreeBuilder.prototype._addToParent = function (node) {\n var parent = this._getParentElement();\n if (parent != null) {\n parent.children.push(node);\n }\n else {\n this._rootNodes.push(node);\n }\n };\n /**\n * Insert a node between the parent and the container.\n * When no container is given, the node is appended as a child of the parent.\n * Also updates the element stack accordingly.\n *\n * @internal\n */\n _TreeBuilder.prototype._insertBeforeContainer = function (parent, container, node) {\n if (!container) {\n this._addToParent(node);\n this._elementStack.push(node);\n }\n else {\n if (parent) {\n // replace the container with the new node in the children\n var index = parent.children.indexOf(container);\n parent.children[index] = node;\n }\n else {\n this._rootNodes.push(node);\n }\n node.children.push(container);\n this._elementStack.splice(this._elementStack.indexOf(container), 0, node);\n }\n };\n _TreeBuilder.prototype._getElementFullName = function (prefix, localName, parentElement) {\n if (prefix == null) {\n prefix = this.getTagDefinition(localName).implicitNamespacePrefix;\n if (prefix == null && parentElement != null) {\n prefix = getNsPrefix(parentElement.name);\n }\n }\n return mergeNsAndName(prefix, localName);\n };\n return _TreeBuilder;\n}());\nfunction lastOnStack(stack, element) {\n return stack.length > 0 && stack[stack.length - 1] === element;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 digest(message) {\n return message.id || sha1(serializeNodes(message.nodes).join('') + (\"[\" + message.meaning + \"]\"));\n}\nfunction decimalDigest(message) {\n if (message.id) {\n return message.id;\n }\n var visitor = new _SerializerIgnoreIcuExpVisitor();\n var parts = message.nodes.map(function (a) { return a.visit(visitor, null); });\n return computeMsgId(parts.join(''), message.meaning);\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * The visitor is also used in the i18n parser tests\n *\n * @internal\n */\nvar _SerializerVisitor = /** @class */ (function () {\n function _SerializerVisitor() {\n }\n _SerializerVisitor.prototype.visitText = function (text, context) { return text.value; };\n _SerializerVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n return \"[\" + container.children.map(function (child) { return child.visit(_this); }).join(', ') + \"]\";\n };\n _SerializerVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var strCases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n return \"{\" + icu.expression + \", \" + icu.type + \", \" + strCases.join(', ') + \"}\";\n };\n _SerializerVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var _this = this;\n return ph.isVoid ?\n \"<ph tag name=\\\"\" + ph.startName + \"\\\"/>\" :\n \"<ph tag name=\\\"\" + ph.startName + \"\\\">\" + ph.children.map(function (child) { return child.visit(_this); }).join(', ') + \"</ph name=\\\"\" + ph.closeName + \"\\\">\";\n };\n _SerializerVisitor.prototype.visitPlaceholder = function (ph, context) {\n return ph.value ? \"<ph name=\\\"\" + ph.name + \"\\\">\" + ph.value + \"</ph>\" : \"<ph name=\\\"\" + ph.name + \"\\\"/>\";\n };\n _SerializerVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n return \"<ph icu name=\\\"\" + ph.name + \"\\\">\" + ph.value.visit(this) + \"</ph>\";\n };\n return _SerializerVisitor;\n}());\nvar serializerVisitor = new _SerializerVisitor();\nfunction serializeNodes(nodes) {\n return nodes.map(function (a) { return a.visit(serializerVisitor, null); });\n}\n/**\n * Serialize the i18n ast to something xml-like in order to generate an UID.\n *\n * Ignore the ICU expressions so that message IDs stays identical if only the expression changes.\n *\n * @internal\n */\nvar _SerializerIgnoreIcuExpVisitor = /** @class */ (function (_super) {\n __extends(_SerializerIgnoreIcuExpVisitor, _super);\n function _SerializerIgnoreIcuExpVisitor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n _SerializerIgnoreIcuExpVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var strCases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n // Do not take the expression into account\n return \"{\" + icu.type + \", \" + strCases.join(', ') + \"}\";\n };\n return _SerializerIgnoreIcuExpVisitor;\n}(_SerializerVisitor));\n/**\n * Compute the SHA1 of the given string\n *\n * see http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf\n *\n * WARNING: this function has not been designed not tested with security in mind.\n * DO NOT USE IT IN A SECURITY SENSITIVE CONTEXT.\n */\nfunction sha1(str) {\n var utf8 = utf8Encode(str);\n var words32 = stringToWords32(utf8, Endian.Big);\n var len = utf8.length * 8;\n var w = new Array(80);\n var _a = __read([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0], 5), a = _a[0], b = _a[1], c = _a[2], d = _a[3], e = _a[4];\n words32[len >> 5] |= 0x80 << (24 - len % 32);\n words32[((len + 64 >> 9) << 4) + 15] = len;\n for (var i = 0; i < words32.length; i += 16) {\n var _b = __read([a, b, c, d, e], 5), h0 = _b[0], h1 = _b[1], h2 = _b[2], h3 = _b[3], h4 = _b[4];\n for (var j = 0; j < 80; j++) {\n if (j < 16) {\n w[j] = words32[i + j];\n }\n else {\n w[j] = rol32(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);\n }\n var _c = __read(fk(j, b, c, d), 2), f = _c[0], k = _c[1];\n var temp = [rol32(a, 5), f, e, k, w[j]].reduce(add32);\n _d = __read([d, c, rol32(b, 30), a, temp], 5), e = _d[0], d = _d[1], c = _d[2], b = _d[3], a = _d[4];\n }\n _e = __read([add32(a, h0), add32(b, h1), add32(c, h2), add32(d, h3), add32(e, h4)], 5), a = _e[0], b = _e[1], c = _e[2], d = _e[3], e = _e[4];\n }\n return byteStringToHexString(words32ToByteString([a, b, c, d, e]));\n var _d, _e;\n}\nfunction fk(index, b, c, d) {\n if (index < 20) {\n return [(b & c) | (~b & d), 0x5a827999];\n }\n if (index < 40) {\n return [b ^ c ^ d, 0x6ed9eba1];\n }\n if (index < 60) {\n return [(b & c) | (b & d) | (c & d), 0x8f1bbcdc];\n }\n return [b ^ c ^ d, 0xca62c1d6];\n}\n/**\n * Compute the fingerprint of the given string\n *\n * The output is 64 bit number encoded as a decimal string\n *\n * based on:\n * https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/GoogleJsMessageIdGenerator.java\n */\nfunction fingerprint(str) {\n var utf8 = utf8Encode(str);\n var _a = __read([hash32(utf8, 0), hash32(utf8, 102072)], 2), hi = _a[0], lo = _a[1];\n if (hi == 0 && (lo == 0 || lo == 1)) {\n hi = hi ^ 0x130f9bef;\n lo = lo ^ -0x6b5f56d8;\n }\n return [hi, lo];\n}\nfunction computeMsgId(msg, meaning) {\n var _a = __read(fingerprint(msg), 2), hi = _a[0], lo = _a[1];\n if (meaning) {\n var _b = __read(fingerprint(meaning), 2), him = _b[0], lom = _b[1];\n _c = __read(add64(rol64([hi, lo], 1), [him, lom]), 2), hi = _c[0], lo = _c[1];\n }\n return byteStringToDecString(words32ToByteString([hi & 0x7fffffff, lo]));\n var _c;\n}\nfunction hash32(str, c) {\n var _a = __read([0x9e3779b9, 0x9e3779b9], 2), a = _a[0], b = _a[1];\n var i;\n var len = str.length;\n for (i = 0; i + 12 <= len; i += 12) {\n a = add32(a, wordAt(str, i, Endian.Little));\n b = add32(b, wordAt(str, i + 4, Endian.Little));\n c = add32(c, wordAt(str, i + 8, Endian.Little));\n _b = __read(mix([a, b, c]), 3), a = _b[0], b = _b[1], c = _b[2];\n }\n a = add32(a, wordAt(str, i, Endian.Little));\n b = add32(b, wordAt(str, i + 4, Endian.Little));\n // the first byte of c is reserved for the length\n c = add32(c, len);\n c = add32(c, wordAt(str, i + 8, Endian.Little) << 8);\n return mix([a, b, c])[2];\n var _b;\n}\n// clang-format off\nfunction mix(_a) {\n var _b = __read(_a, 3), a = _b[0], b = _b[1], c = _b[2];\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 13;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 8;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 13;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 12;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 16;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 5;\n a = sub32(a, b);\n a = sub32(a, c);\n a ^= c >>> 3;\n b = sub32(b, c);\n b = sub32(b, a);\n b ^= a << 10;\n c = sub32(c, a);\n c = sub32(c, b);\n c ^= b >>> 15;\n return [a, b, c];\n}\n// clang-format on\n// Utils\nvar Endian;\n(function (Endian) {\n Endian[Endian[\"Little\"] = 0] = \"Little\";\n Endian[Endian[\"Big\"] = 1] = \"Big\";\n})(Endian || (Endian = {}));\nfunction add32(a, b) {\n return add32to64(a, b)[1];\n}\nfunction add32to64(a, b) {\n var low = (a & 0xffff) + (b & 0xffff);\n var high = (a >>> 16) + (b >>> 16) + (low >>> 16);\n return [high >>> 16, (high << 16) | (low & 0xffff)];\n}\nfunction add64(_a, _b) {\n var _c = __read(_a, 2), ah = _c[0], al = _c[1];\n var _d = __read(_b, 2), bh = _d[0], bl = _d[1];\n var _e = __read(add32to64(al, bl), 2), carry = _e[0], l = _e[1];\n var h = add32(add32(ah, bh), carry);\n return [h, l];\n}\nfunction sub32(a, b) {\n var low = (a & 0xffff) - (b & 0xffff);\n var high = (a >> 16) - (b >> 16) + (low >> 16);\n return (high << 16) | (low & 0xffff);\n}\n// Rotate a 32b number left `count` position\nfunction rol32(a, count) {\n return (a << count) | (a >>> (32 - count));\n}\n// Rotate a 64b number left `count` position\nfunction rol64(_a, count) {\n var _b = __read(_a, 2), hi = _b[0], lo = _b[1];\n var h = (hi << count) | (lo >>> (32 - count));\n var l = (lo << count) | (hi >>> (32 - count));\n return [h, l];\n}\nfunction stringToWords32(str, endian) {\n var words32 = Array((str.length + 3) >>> 2);\n for (var i = 0; i < words32.length; i++) {\n words32[i] = wordAt(str, i * 4, endian);\n }\n return words32;\n}\nfunction byteAt(str, index) {\n return index >= str.length ? 0 : str.charCodeAt(index) & 0xff;\n}\nfunction wordAt(str, index, endian) {\n var word = 0;\n if (endian === Endian.Big) {\n for (var i = 0; i < 4; i++) {\n word += byteAt(str, index + i) << (24 - 8 * i);\n }\n }\n else {\n for (var i = 0; i < 4; i++) {\n word += byteAt(str, index + i) << 8 * i;\n }\n }\n return word;\n}\nfunction words32ToByteString(words32) {\n return words32.reduce(function (str, word) { return str + word32ToByteString(word); }, '');\n}\nfunction word32ToByteString(word) {\n var str = '';\n for (var i = 0; i < 4; i++) {\n str += String.fromCharCode((word >>> 8 * (3 - i)) & 0xff);\n }\n return str;\n}\nfunction byteStringToHexString(str) {\n var hex = '';\n for (var i = 0; i < str.length; i++) {\n var b = byteAt(str, i);\n hex += (b >>> 4).toString(16) + (b & 0x0f).toString(16);\n }\n return hex.toLowerCase();\n}\n// based on http://www.danvk.org/hex2dec.html (JS can not handle more than 56b)\nfunction byteStringToDecString(str) {\n var decimal = '';\n var toThePower = '1';\n for (var i = str.length - 1; i >= 0; i--) {\n decimal = addBigInt(decimal, numberTimesBigInt(byteAt(str, i), toThePower));\n toThePower = numberTimesBigInt(256, toThePower);\n }\n return decimal.split('').reverse().join('');\n}\n// x and y decimal, lowest significant digit first\nfunction addBigInt(x, y) {\n var sum = '';\n var len = Math.max(x.length, y.length);\n for (var i = 0, carry = 0; i < len || carry; i++) {\n var tmpSum = carry + +(x[i] || 0) + +(y[i] || 0);\n if (tmpSum >= 10) {\n carry = 1;\n sum += tmpSum - 10;\n }\n else {\n carry = 0;\n sum += tmpSum;\n }\n }\n return sum;\n}\nfunction numberTimesBigInt(num, b) {\n var product = '';\n var bToThePower = b;\n for (; num !== 0; num = num >>> 1) {\n if (num & 1)\n product = addBigInt(product, bToThePower);\n bToThePower = addBigInt(bToThePower, bToThePower);\n }\n return product;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 Message = /** @class */ (function () {\n /**\n * @param nodes message AST\n * @param placeholders maps placeholder names to static content\n * @param placeholderToMessage maps placeholder names to messages (used for nested ICU messages)\n * @param meaning\n * @param description\n * @param id\n */\n function Message(nodes, placeholders, placeholderToMessage, meaning, description, id) {\n this.nodes = nodes;\n this.placeholders = placeholders;\n this.placeholderToMessage = placeholderToMessage;\n this.meaning = meaning;\n this.description = description;\n this.id = id;\n if (nodes.length) {\n this.sources = [{\n filePath: nodes[0].sourceSpan.start.file.url,\n startLine: nodes[0].sourceSpan.start.line + 1,\n startCol: nodes[0].sourceSpan.start.col + 1,\n endLine: nodes[nodes.length - 1].sourceSpan.end.line + 1,\n endCol: nodes[0].sourceSpan.start.col + 1\n }];\n }\n else {\n this.sources = [];\n }\n }\n return Message;\n}());\nvar Text$1 = /** @class */ (function () {\n function Text(value, sourceSpan) {\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n Text.prototype.visit = function (visitor, context) { return visitor.visitText(this, context); };\n return Text;\n}());\n// TODO(vicb): do we really need this node (vs an array) ?\nvar Container = /** @class */ (function () {\n function Container(children, sourceSpan) {\n this.children = children;\n this.sourceSpan = sourceSpan;\n }\n Container.prototype.visit = function (visitor, context) { return visitor.visitContainer(this, context); };\n return Container;\n}());\nvar Icu = /** @class */ (function () {\n function Icu(expression, type, cases, sourceSpan) {\n this.expression = expression;\n this.type = type;\n this.cases = cases;\n this.sourceSpan = sourceSpan;\n }\n Icu.prototype.visit = function (visitor, context) { return visitor.visitIcu(this, context); };\n return Icu;\n}());\nvar TagPlaceholder = /** @class */ (function () {\n function TagPlaceholder(tag, attrs, startName, closeName, children, isVoid, sourceSpan) {\n this.tag = tag;\n this.attrs = attrs;\n this.startName = startName;\n this.closeName = closeName;\n this.children = children;\n this.isVoid = isVoid;\n this.sourceSpan = sourceSpan;\n }\n TagPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitTagPlaceholder(this, context); };\n return TagPlaceholder;\n}());\nvar Placeholder = /** @class */ (function () {\n function Placeholder(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n Placeholder.prototype.visit = function (visitor, context) { return visitor.visitPlaceholder(this, context); };\n return Placeholder;\n}());\nvar IcuPlaceholder = /** @class */ (function () {\n function IcuPlaceholder(value, name, sourceSpan) {\n this.value = value;\n this.name = name;\n this.sourceSpan = sourceSpan;\n }\n IcuPlaceholder.prototype.visit = function (visitor, context) { return visitor.visitIcuPlaceholder(this, context); };\n return IcuPlaceholder;\n}());\n// Clone the AST\nvar CloneVisitor = /** @class */ (function () {\n function CloneVisitor() {\n }\n CloneVisitor.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };\n CloneVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var children = container.children.map(function (n) { return n.visit(_this, context); });\n return new Container(children, container.sourceSpan);\n };\n CloneVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var cases = {};\n Object.keys(icu.cases).forEach(function (key) { return cases[key] = icu.cases[key].visit(_this, context); });\n var msg = new Icu(icu.expression, icu.type, cases, icu.sourceSpan);\n msg.expressionPlaceholder = icu.expressionPlaceholder;\n return msg;\n };\n CloneVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var _this = this;\n var children = ph.children.map(function (n) { return n.visit(_this, context); });\n return new TagPlaceholder(ph.tag, ph.attrs, ph.startName, ph.closeName, children, ph.isVoid, ph.sourceSpan);\n };\n CloneVisitor.prototype.visitPlaceholder = function (ph, context) {\n return new Placeholder(ph.value, ph.name, ph.sourceSpan);\n };\n CloneVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n return new IcuPlaceholder(ph.value, ph.name, ph.sourceSpan);\n };\n return CloneVisitor;\n}());\n// Visit all the nodes recursively\nvar RecurseVisitor = /** @class */ (function () {\n function RecurseVisitor() {\n }\n RecurseVisitor.prototype.visitText = function (text, context) { };\n RecurseVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n container.children.forEach(function (child) { return child.visit(_this); });\n };\n RecurseVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n Object.keys(icu.cases).forEach(function (k) { icu.cases[k].visit(_this); });\n };\n RecurseVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var _this = this;\n ph.children.forEach(function (child) { return child.visit(_this); });\n };\n RecurseVisitor.prototype.visitPlaceholder = function (ph, context) { };\n RecurseVisitor.prototype.visitIcuPlaceholder = function (ph, context) { };\n return RecurseVisitor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 HtmlTagDefinition = /** @class */ (function () {\n function HtmlTagDefinition(_a) {\n var _b = _a === void 0 ? {} : _a, closedByChildren = _b.closedByChildren, requiredParents = _b.requiredParents, implicitNamespacePrefix = _b.implicitNamespacePrefix, _c = _b.contentType, contentType = _c === void 0 ? TagContentType.PARSABLE_DATA : _c, _d = _b.closedByParent, closedByParent = _d === void 0 ? false : _d, _e = _b.isVoid, isVoid = _e === void 0 ? false : _e, _f = _b.ignoreFirstLf, ignoreFirstLf = _f === void 0 ? false : _f;\n var _this = this;\n this.closedByChildren = {};\n this.closedByParent = false;\n this.canSelfClose = false;\n if (closedByChildren && closedByChildren.length > 0) {\n closedByChildren.forEach(function (tagName) { return _this.closedByChildren[tagName] = true; });\n }\n this.isVoid = isVoid;\n this.closedByParent = closedByParent || isVoid;\n if (requiredParents && requiredParents.length > 0) {\n this.requiredParents = {};\n // The first parent is the list is automatically when none of the listed parents are present\n this.parentToAdd = requiredParents[0];\n requiredParents.forEach(function (tagName) { return _this.requiredParents[tagName] = true; });\n }\n this.implicitNamespacePrefix = implicitNamespacePrefix || null;\n this.contentType = contentType;\n this.ignoreFirstLf = ignoreFirstLf;\n }\n HtmlTagDefinition.prototype.requireExtraParent = function (currentParent) {\n if (!this.requiredParents) {\n return false;\n }\n if (!currentParent) {\n return true;\n }\n var lcParent = currentParent.toLowerCase();\n var isParentTemplate = lcParent === 'template' || currentParent === 'ng-template';\n return !isParentTemplate && this.requiredParents[lcParent] != true;\n };\n HtmlTagDefinition.prototype.isClosedByChild = function (name) {\n return this.isVoid || name.toLowerCase() in this.closedByChildren;\n };\n return HtmlTagDefinition;\n}());\n// see http://www.w3.org/TR/html51/syntax.html#optional-tags\n// This implementation does not fully conform to the HTML5 spec.\nvar TAG_DEFINITIONS = {\n 'base': new HtmlTagDefinition({ isVoid: true }),\n 'meta': new HtmlTagDefinition({ isVoid: true }),\n 'area': new HtmlTagDefinition({ isVoid: true }),\n 'embed': new HtmlTagDefinition({ isVoid: true }),\n 'link': new HtmlTagDefinition({ isVoid: true }),\n 'img': new HtmlTagDefinition({ isVoid: true }),\n 'input': new HtmlTagDefinition({ isVoid: true }),\n 'param': new HtmlTagDefinition({ isVoid: true }),\n 'hr': new HtmlTagDefinition({ isVoid: true }),\n 'br': new HtmlTagDefinition({ isVoid: true }),\n 'source': new HtmlTagDefinition({ isVoid: true }),\n 'track': new HtmlTagDefinition({ isVoid: true }),\n 'wbr': new HtmlTagDefinition({ isVoid: true }),\n 'p': new HtmlTagDefinition({\n closedByChildren: [\n 'address', 'article', 'aside', 'blockquote', 'div', 'dl', 'fieldset', 'footer', 'form',\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr',\n 'main', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'\n ],\n closedByParent: true\n }),\n 'thead': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'] }),\n 'tbody': new HtmlTagDefinition({ closedByChildren: ['tbody', 'tfoot'], closedByParent: true }),\n 'tfoot': new HtmlTagDefinition({ closedByChildren: ['tbody'], closedByParent: true }),\n 'tr': new HtmlTagDefinition({\n closedByChildren: ['tr'],\n requiredParents: ['tbody', 'tfoot', 'thead'],\n closedByParent: true\n }),\n 'td': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'th': new HtmlTagDefinition({ closedByChildren: ['td', 'th'], closedByParent: true }),\n 'col': new HtmlTagDefinition({ requiredParents: ['colgroup'], isVoid: true }),\n 'svg': new HtmlTagDefinition({ implicitNamespacePrefix: 'svg' }),\n 'math': new HtmlTagDefinition({ implicitNamespacePrefix: 'math' }),\n 'li': new HtmlTagDefinition({ closedByChildren: ['li'], closedByParent: true }),\n 'dt': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'] }),\n 'dd': new HtmlTagDefinition({ closedByChildren: ['dt', 'dd'], closedByParent: true }),\n 'rb': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rt': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'rtc': new HtmlTagDefinition({ closedByChildren: ['rb', 'rtc', 'rp'], closedByParent: true }),\n 'rp': new HtmlTagDefinition({ closedByChildren: ['rb', 'rt', 'rtc', 'rp'], closedByParent: true }),\n 'optgroup': new HtmlTagDefinition({ closedByChildren: ['optgroup'], closedByParent: true }),\n 'option': new HtmlTagDefinition({ closedByChildren: ['option', 'optgroup'], closedByParent: true }),\n 'pre': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'listing': new HtmlTagDefinition({ ignoreFirstLf: true }),\n 'style': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'script': new HtmlTagDefinition({ contentType: TagContentType.RAW_TEXT }),\n 'title': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT }),\n 'textarea': new HtmlTagDefinition({ contentType: TagContentType.ESCAPABLE_RAW_TEXT, ignoreFirstLf: true }),\n};\nvar _DEFAULT_TAG_DEFINITION = new HtmlTagDefinition();\nfunction getHtmlTagDefinition(tagName) {\n return TAG_DEFINITIONS[tagName.toLowerCase()] || _DEFAULT_TAG_DEFINITION;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TAG_TO_PLACEHOLDER_NAMES = {\n 'A': 'LINK',\n 'B': 'BOLD_TEXT',\n 'BR': 'LINE_BREAK',\n 'EM': 'EMPHASISED_TEXT',\n 'H1': 'HEADING_LEVEL1',\n 'H2': 'HEADING_LEVEL2',\n 'H3': 'HEADING_LEVEL3',\n 'H4': 'HEADING_LEVEL4',\n 'H5': 'HEADING_LEVEL5',\n 'H6': 'HEADING_LEVEL6',\n 'HR': 'HORIZONTAL_RULE',\n 'I': 'ITALIC_TEXT',\n 'LI': 'LIST_ITEM',\n 'LINK': 'MEDIA_LINK',\n 'OL': 'ORDERED_LIST',\n 'P': 'PARAGRAPH',\n 'Q': 'QUOTATION',\n 'S': 'STRIKETHROUGH_TEXT',\n 'SMALL': 'SMALL_TEXT',\n 'SUB': 'SUBSTRIPT',\n 'SUP': 'SUPERSCRIPT',\n 'TBODY': 'TABLE_BODY',\n 'TD': 'TABLE_CELL',\n 'TFOOT': 'TABLE_FOOTER',\n 'TH': 'TABLE_HEADER_CELL',\n 'THEAD': 'TABLE_HEADER',\n 'TR': 'TABLE_ROW',\n 'TT': 'MONOSPACED_TEXT',\n 'U': 'UNDERLINED_TEXT',\n 'UL': 'UNORDERED_LIST',\n};\n/**\n * Creates unique names for placeholder with different content.\n *\n * Returns the same placeholder name when the content is identical.\n */\nvar PlaceholderRegistry = /** @class */ (function () {\n function PlaceholderRegistry() {\n // Count the occurrence of the base name top generate a unique name\n this._placeHolderNameCounts = {};\n // Maps signature to placeholder names\n this._signatureToName = {};\n }\n PlaceholderRegistry.prototype.getStartTagPlaceholderName = function (tag, attrs, isVoid) {\n var signature = this._hashTag(tag, attrs, isVoid);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var upperTag = tag.toUpperCase();\n var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\" + upperTag;\n var name = this._generateUniqueName(isVoid ? baseName : \"START_\" + baseName);\n this._signatureToName[signature] = name;\n return name;\n };\n PlaceholderRegistry.prototype.getCloseTagPlaceholderName = function (tag) {\n var signature = this._hashClosingTag(tag);\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var upperTag = tag.toUpperCase();\n var baseName = TAG_TO_PLACEHOLDER_NAMES[upperTag] || \"TAG_\" + upperTag;\n var name = this._generateUniqueName(\"CLOSE_\" + baseName);\n this._signatureToName[signature] = name;\n return name;\n };\n PlaceholderRegistry.prototype.getPlaceholderName = function (name, content) {\n var upperName = name.toUpperCase();\n var signature = \"PH: \" + upperName + \"=\" + content;\n if (this._signatureToName[signature]) {\n return this._signatureToName[signature];\n }\n var uniqueName = this._generateUniqueName(upperName);\n this._signatureToName[signature] = uniqueName;\n return uniqueName;\n };\n PlaceholderRegistry.prototype.getUniquePlaceholder = function (name) {\n return this._generateUniqueName(name.toUpperCase());\n };\n // Generate a hash for a tag - does not take attribute order into account\n PlaceholderRegistry.prototype._hashTag = function (tag, attrs, isVoid) {\n var start = \"<\" + tag;\n var strAttrs = Object.keys(attrs).sort().map(function (name) { return \" \" + name + \"=\" + attrs[name]; }).join('');\n var end = isVoid ? '/>' : \"></\" + tag + \">\";\n return start + strAttrs + end;\n };\n PlaceholderRegistry.prototype._hashClosingTag = function (tag) { return this._hashTag(\"/\" + tag, {}, false); };\n PlaceholderRegistry.prototype._generateUniqueName = function (base) {\n var seen = this._placeHolderNameCounts.hasOwnProperty(base);\n if (!seen) {\n this._placeHolderNameCounts[base] = 1;\n return base;\n }\n var id = this._placeHolderNameCounts[base];\n this._placeHolderNameCounts[base] = id + 1;\n return base + \"_\" + id;\n };\n return PlaceholderRegistry;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _expParser = new Parser(new Lexer());\n/**\n * Returns a function converting html nodes to an i18n Message given an interpolationConfig\n */\nfunction createI18nMessageFactory(interpolationConfig) {\n var visitor = new _I18nVisitor(_expParser, interpolationConfig);\n return function (nodes, meaning, description, id) {\n return visitor.toI18nMessage(nodes, meaning, description, id);\n };\n}\nvar _I18nVisitor = /** @class */ (function () {\n function _I18nVisitor(_expressionParser, _interpolationConfig) {\n this._expressionParser = _expressionParser;\n this._interpolationConfig = _interpolationConfig;\n }\n _I18nVisitor.prototype.toI18nMessage = function (nodes, meaning, description, id) {\n this._isIcu = nodes.length == 1 && nodes[0] instanceof Expansion;\n this._icuDepth = 0;\n this._placeholderRegistry = new PlaceholderRegistry();\n this._placeholderToContent = {};\n this._placeholderToMessage = {};\n var i18nodes = visitAll(this, nodes, {});\n return new Message(i18nodes, this._placeholderToContent, this._placeholderToMessage, meaning, description, id);\n };\n _I18nVisitor.prototype.visitElement = function (el, context) {\n var children = visitAll(this, el.children);\n var attrs = {};\n el.attrs.forEach(function (attr) {\n // Do not visit the attributes, translatable ones are top-level ASTs\n attrs[attr.name] = attr.value;\n });\n var isVoid = getHtmlTagDefinition(el.name).isVoid;\n var startPhName = this._placeholderRegistry.getStartTagPlaceholderName(el.name, attrs, isVoid);\n this._placeholderToContent[startPhName] = el.sourceSpan.toString();\n var closePhName = '';\n if (!isVoid) {\n closePhName = this._placeholderRegistry.getCloseTagPlaceholderName(el.name);\n this._placeholderToContent[closePhName] = \"</\" + el.name + \">\";\n }\n return new TagPlaceholder(el.name, attrs, startPhName, closePhName, children, isVoid, el.sourceSpan);\n };\n _I18nVisitor.prototype.visitAttribute = function (attribute, context) {\n return this._visitTextWithInterpolation(attribute.value, attribute.sourceSpan);\n };\n _I18nVisitor.prototype.visitText = function (text, context) {\n return this._visitTextWithInterpolation(text.value, text.sourceSpan);\n };\n _I18nVisitor.prototype.visitComment = function (comment, context) { return null; };\n _I18nVisitor.prototype.visitExpansion = function (icu, context) {\n var _this = this;\n this._icuDepth++;\n var i18nIcuCases = {};\n var i18nIcu = new Icu(icu.switchValue, icu.type, i18nIcuCases, icu.sourceSpan);\n icu.cases.forEach(function (caze) {\n i18nIcuCases[caze.value] = new Container(caze.expression.map(function (node) { return node.visit(_this, {}); }), caze.expSourceSpan);\n });\n this._icuDepth--;\n if (this._isIcu || this._icuDepth > 0) {\n // Returns an ICU node when:\n // - the message (vs a part of the message) is an ICU message, or\n // - the ICU message is nested.\n var expPh = this._placeholderRegistry.getUniquePlaceholder(\"VAR_\" + icu.type);\n i18nIcu.expressionPlaceholder = expPh;\n this._placeholderToContent[expPh] = icu.switchValue;\n return i18nIcu;\n }\n // Else returns a placeholder\n // ICU placeholders should not be replaced with their original content but with the their\n // translations. We need to create a new visitor (they are not re-entrant) to compute the\n // message id.\n // TODO(vicb): add a html.Node -> i18n.Message cache to avoid having to re-create the msg\n var phName = this._placeholderRegistry.getPlaceholderName('ICU', icu.sourceSpan.toString());\n var visitor = new _I18nVisitor(this._expressionParser, this._interpolationConfig);\n this._placeholderToMessage[phName] = visitor.toI18nMessage([icu], '', '', '');\n return new IcuPlaceholder(i18nIcu, phName, icu.sourceSpan);\n };\n _I18nVisitor.prototype.visitExpansionCase = function (icuCase, context) {\n throw new Error('Unreachable code');\n };\n _I18nVisitor.prototype._visitTextWithInterpolation = function (text, sourceSpan) {\n var splitInterpolation = this._expressionParser.splitInterpolation(text, sourceSpan.start.toString(), this._interpolationConfig);\n if (!splitInterpolation) {\n // No expression, return a single text\n return new Text$1(text, sourceSpan);\n }\n // Return a group of text + expressions\n var nodes = [];\n var container = new Container(nodes, sourceSpan);\n var _a = this._interpolationConfig, sDelimiter = _a.start, eDelimiter = _a.end;\n for (var i = 0; i < splitInterpolation.strings.length - 1; i++) {\n var expression = splitInterpolation.expressions[i];\n var baseName = _extractPlaceholderName(expression) || 'INTERPOLATION';\n var phName = this._placeholderRegistry.getPlaceholderName(baseName, expression);\n if (splitInterpolation.strings[i].length) {\n // No need to add empty strings\n nodes.push(new Text$1(splitInterpolation.strings[i], sourceSpan));\n }\n nodes.push(new Placeholder(expression, phName, sourceSpan));\n this._placeholderToContent[phName] = sDelimiter + expression + eDelimiter;\n }\n // The last index contains no expression\n var lastStringIdx = splitInterpolation.strings.length - 1;\n if (splitInterpolation.strings[lastStringIdx].length) {\n nodes.push(new Text$1(splitInterpolation.strings[lastStringIdx], sourceSpan));\n }\n return container;\n };\n return _I18nVisitor;\n}());\nvar _CUSTOM_PH_EXP = /\\/\\/[\\s\\S]*i18n[\\s\\S]*\\([\\s\\S]*ph[\\s\\S]*=[\\s\\S]*(\"|')([\\s\\S]*?)\\1[\\s\\S]*\\)/g;\nfunction _extractPlaceholderName(input) {\n return input.split(_CUSTOM_PH_EXP)[2];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 i18n error.\n */\nvar I18nError = /** @class */ (function (_super) {\n __extends(I18nError, _super);\n function I18nError(span, msg) {\n return _super.call(this, span, msg) || this;\n }\n return I18nError;\n}(ParseError));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _I18N_ATTR = 'i18n';\nvar _I18N_ATTR_PREFIX = 'i18n-';\nvar _I18N_COMMENT_PREFIX_REGEXP = /^i18n:?/;\nvar MEANING_SEPARATOR = '|';\nvar ID_SEPARATOR = '@@';\nvar i18nCommentsWarned = false;\n/**\n * Extract translatable messages from an html AST\n */\nfunction extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {\n var visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.extract(nodes, interpolationConfig);\n}\nfunction mergeTranslations(nodes, translations, interpolationConfig, implicitTags, implicitAttrs) {\n var visitor = new _Visitor(implicitTags, implicitAttrs);\n return visitor.merge(nodes, translations, interpolationConfig);\n}\nvar ExtractionResult = /** @class */ (function () {\n function ExtractionResult(messages, errors) {\n this.messages = messages;\n this.errors = errors;\n }\n return ExtractionResult;\n}());\nvar _VisitorMode;\n(function (_VisitorMode) {\n _VisitorMode[_VisitorMode[\"Extract\"] = 0] = \"Extract\";\n _VisitorMode[_VisitorMode[\"Merge\"] = 1] = \"Merge\";\n})(_VisitorMode || (_VisitorMode = {}));\n/**\n * This Visitor is used:\n * 1. to extract all the translatable strings from an html AST (see `extract()`),\n * 2. to replace the translatable strings with the actual translations (see `merge()`)\n *\n * @internal\n */\nvar _Visitor = /** @class */ (function () {\n function _Visitor(_implicitTags, _implicitAttrs) {\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n }\n /**\n * Extracts the messages from the tree\n */\n _Visitor.prototype.extract = function (nodes, interpolationConfig) {\n var _this = this;\n this._init(_VisitorMode.Extract, interpolationConfig);\n nodes.forEach(function (node) { return node.visit(_this, null); });\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ExtractionResult(this._messages, this._errors);\n };\n /**\n * Returns a tree where all translatable nodes are translated\n */\n _Visitor.prototype.merge = function (nodes, translations, interpolationConfig) {\n this._init(_VisitorMode.Merge, interpolationConfig);\n this._translations = translations;\n // Construct a single fake root element\n var wrapper = new Element('wrapper', [], nodes, undefined, undefined, undefined);\n var translatedNode = wrapper.visit(this, null);\n if (this._inI18nBlock) {\n this._reportError(nodes[nodes.length - 1], 'Unclosed block');\n }\n return new ParseTreeResult(translatedNode.children, this._errors);\n };\n _Visitor.prototype.visitExpansionCase = function (icuCase, context) {\n // Parse cases for translatable html attributes\n var expression = visitAll(this, icuCase.expression, context);\n if (this._mode === _VisitorMode.Merge) {\n return new ExpansionCase(icuCase.value, expression, icuCase.sourceSpan, icuCase.valueSourceSpan, icuCase.expSourceSpan);\n }\n };\n _Visitor.prototype.visitExpansion = function (icu, context) {\n this._mayBeAddBlockChildren(icu);\n var wasInIcu = this._inIcu;\n if (!this._inIcu) {\n // nested ICU messages should not be extracted but top-level translated as a whole\n if (this._isInTranslatableSection) {\n this._addMessage([icu]);\n }\n this._inIcu = true;\n }\n var cases = visitAll(this, icu.cases, context);\n if (this._mode === _VisitorMode.Merge) {\n icu = new Expansion(icu.switchValue, icu.type, cases, icu.sourceSpan, icu.switchValueSourceSpan);\n }\n this._inIcu = wasInIcu;\n return icu;\n };\n _Visitor.prototype.visitComment = function (comment, context) {\n var isOpening = _isOpeningComment(comment);\n if (isOpening && this._isInTranslatableSection) {\n this._reportError(comment, 'Could not start a block inside a translatable section');\n return;\n }\n var isClosing = _isClosingComment(comment);\n if (isClosing && !this._inI18nBlock) {\n this._reportError(comment, 'Trying to close an unopened block');\n return;\n }\n if (!this._inI18nNode && !this._inIcu) {\n if (!this._inI18nBlock) {\n if (isOpening) {\n // deprecated from v5 you should use <ng-container i18n> instead of i18n comments\n if (!i18nCommentsWarned && console && console.warn) {\n i18nCommentsWarned = true;\n var details = comment.sourceSpan.details ? \", \" + comment.sourceSpan.details : '';\n // TODO(ocombe): use a log service once there is a public one available\n console.warn(\"I18n comments are deprecated, use an <ng-container> element instead (\" + comment.sourceSpan.start + details + \")\");\n }\n this._inI18nBlock = true;\n this._blockStartDepth = this._depth;\n this._blockChildren = [];\n this._blockMeaningAndDesc =\n comment.value.replace(_I18N_COMMENT_PREFIX_REGEXP, '').trim();\n this._openTranslatableSection(comment);\n }\n }\n else {\n if (isClosing) {\n if (this._depth == this._blockStartDepth) {\n this._closeTranslatableSection(comment, this._blockChildren);\n this._inI18nBlock = false;\n var message = this._addMessage(this._blockChildren, this._blockMeaningAndDesc);\n // merge attributes in sections\n var nodes = this._translateMessage(comment, message);\n return visitAll(this, nodes);\n }\n else {\n this._reportError(comment, 'I18N blocks should not cross element boundaries');\n return;\n }\n }\n }\n }\n };\n _Visitor.prototype.visitText = function (text, context) {\n if (this._isInTranslatableSection) {\n this._mayBeAddBlockChildren(text);\n }\n return text;\n };\n _Visitor.prototype.visitElement = function (el, context) {\n var _this = this;\n this._mayBeAddBlockChildren(el);\n this._depth++;\n var wasInI18nNode = this._inI18nNode;\n var wasInImplicitNode = this._inImplicitNode;\n var childNodes = [];\n var translatedChildNodes = undefined;\n // Extract:\n // - top level nodes with the (implicit) \"i18n\" attribute if not already in a section\n // - ICU messages\n var i18nAttr = _getI18nAttr(el);\n var i18nMeta = i18nAttr ? i18nAttr.value : '';\n var isImplicit = this._implicitTags.some(function (tag) { return el.name === tag; }) && !this._inIcu &&\n !this._isInTranslatableSection;\n var isTopLevelImplicit = !wasInImplicitNode && isImplicit;\n this._inImplicitNode = wasInImplicitNode || isImplicit;\n if (!this._isInTranslatableSection && !this._inIcu) {\n if (i18nAttr || isTopLevelImplicit) {\n this._inI18nNode = true;\n var message = this._addMessage(el.children, i18nMeta);\n translatedChildNodes = this._translateMessage(el, message);\n }\n if (this._mode == _VisitorMode.Extract) {\n var isTranslatable = i18nAttr || isTopLevelImplicit;\n if (isTranslatable)\n this._openTranslatableSection(el);\n visitAll(this, el.children);\n if (isTranslatable)\n this._closeTranslatableSection(el, el.children);\n }\n }\n else {\n if (i18nAttr || isTopLevelImplicit) {\n this._reportError(el, 'Could not mark an element as translatable inside a translatable section');\n }\n if (this._mode == _VisitorMode.Extract) {\n // Descend into child nodes for extraction\n visitAll(this, el.children);\n }\n }\n if (this._mode === _VisitorMode.Merge) {\n var visitNodes = translatedChildNodes || el.children;\n visitNodes.forEach(function (child) {\n var visited = child.visit(_this, context);\n if (visited && !_this._isInTranslatableSection) {\n // Do not add the children from translatable sections (= i18n blocks here)\n // They will be added later in this loop when the block closes (i.e. on `<!-- /i18n -->`)\n childNodes = childNodes.concat(visited);\n }\n });\n }\n this._visitAttributesOf(el);\n this._depth--;\n this._inI18nNode = wasInI18nNode;\n this._inImplicitNode = wasInImplicitNode;\n if (this._mode === _VisitorMode.Merge) {\n var translatedAttrs = this._translateAttributes(el);\n return new Element(el.name, translatedAttrs, childNodes, el.sourceSpan, el.startSourceSpan, el.endSourceSpan);\n }\n return null;\n };\n _Visitor.prototype.visitAttribute = function (attribute, context) {\n throw new Error('unreachable code');\n };\n _Visitor.prototype._init = function (mode, interpolationConfig) {\n this._mode = mode;\n this._inI18nBlock = false;\n this._inI18nNode = false;\n this._depth = 0;\n this._inIcu = false;\n this._msgCountAtSectionStart = undefined;\n this._errors = [];\n this._messages = [];\n this._inImplicitNode = false;\n this._createI18nMessage = createI18nMessageFactory(interpolationConfig);\n };\n // looks for translatable attributes\n _Visitor.prototype._visitAttributesOf = function (el) {\n var _this = this;\n var explicitAttrNameToValue = {};\n var implicitAttrNames = this._implicitAttrs[el.name] || [];\n el.attrs.filter(function (attr) { return attr.name.startsWith(_I18N_ATTR_PREFIX); })\n .forEach(function (attr) { return explicitAttrNameToValue[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n attr.value; });\n el.attrs.forEach(function (attr) {\n if (attr.name in explicitAttrNameToValue) {\n _this._addMessage([attr], explicitAttrNameToValue[attr.name]);\n }\n else if (implicitAttrNames.some(function (name) { return attr.name === name; })) {\n _this._addMessage([attr]);\n }\n });\n };\n // add a translatable message\n _Visitor.prototype._addMessage = function (ast, msgMeta) {\n if (ast.length == 0 ||\n ast.length == 1 && ast[0] instanceof Attribute && !ast[0].value) {\n // Do not create empty messages\n return null;\n }\n var _a = _parseMessageMeta(msgMeta), meaning = _a.meaning, description = _a.description, id = _a.id;\n var message = this._createI18nMessage(ast, meaning, description, id);\n this._messages.push(message);\n return message;\n };\n // Translates the given message given the `TranslationBundle`\n // This is used for translating elements / blocks - see `_translateAttributes` for attributes\n // no-op when called in extraction mode (returns [])\n _Visitor.prototype._translateMessage = function (el, message) {\n if (message && this._mode === _VisitorMode.Merge) {\n var nodes = this._translations.get(message);\n if (nodes) {\n return nodes;\n }\n this._reportError(el, \"Translation unavailable for message id=\\\"\" + this._translations.digest(message) + \"\\\"\");\n }\n return [];\n };\n // translate the attributes of an element and remove i18n specific attributes\n _Visitor.prototype._translateAttributes = function (el) {\n var _this = this;\n var attributes = el.attrs;\n var i18nParsedMessageMeta = {};\n attributes.forEach(function (attr) {\n if (attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n i18nParsedMessageMeta[attr.name.slice(_I18N_ATTR_PREFIX.length)] =\n _parseMessageMeta(attr.value);\n }\n });\n var translatedAttributes = [];\n attributes.forEach(function (attr) {\n if (attr.name === _I18N_ATTR || attr.name.startsWith(_I18N_ATTR_PREFIX)) {\n // strip i18n specific attributes\n return;\n }\n if (attr.value && attr.value != '' && i18nParsedMessageMeta.hasOwnProperty(attr.name)) {\n var _a = i18nParsedMessageMeta[attr.name], meaning = _a.meaning, description = _a.description, id = _a.id;\n var message = _this._createI18nMessage([attr], meaning, description, id);\n var nodes = _this._translations.get(message);\n if (nodes) {\n if (nodes.length == 0) {\n translatedAttributes.push(new Attribute(attr.name, '', attr.sourceSpan));\n }\n else if (nodes[0] instanceof Text) {\n var value = nodes[0].value;\n translatedAttributes.push(new Attribute(attr.name, value, attr.sourceSpan));\n }\n else {\n _this._reportError(el, \"Unexpected translation for attribute \\\"\" + attr.name + \"\\\" (id=\\\"\" + (id || _this._translations.digest(message)) + \"\\\")\");\n }\n }\n else {\n _this._reportError(el, \"Translation unavailable for attribute \\\"\" + attr.name + \"\\\" (id=\\\"\" + (id || _this._translations.digest(message)) + \"\\\")\");\n }\n }\n else {\n translatedAttributes.push(attr);\n }\n });\n return translatedAttributes;\n };\n /**\n * Add the node as a child of the block when:\n * - we are in a block,\n * - we are not inside a ICU message (those are handled separately),\n * - the node is a \"direct child\" of the block\n */\n _Visitor.prototype._mayBeAddBlockChildren = function (node) {\n if (this._inI18nBlock && !this._inIcu && this._depth == this._blockStartDepth) {\n this._blockChildren.push(node);\n }\n };\n /**\n * Marks the start of a section, see `_closeTranslatableSection`\n */\n _Visitor.prototype._openTranslatableSection = function (node) {\n if (this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section start');\n }\n else {\n this._msgCountAtSectionStart = this._messages.length;\n }\n };\n Object.defineProperty(_Visitor.prototype, \"_isInTranslatableSection\", {\n /**\n * A translatable section could be:\n * - the content of translatable element,\n * - nodes between `<!-- i18n -->` and `<!-- /i18n -->` comments\n */\n get: function () {\n return this._msgCountAtSectionStart !== void 0;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Terminates a section.\n *\n * If a section has only one significant children (comments not significant) then we should not\n * keep the message from this children:\n *\n * `<p i18n=\"meaning|description\">{ICU message}</p>` would produce two messages:\n * - one for the <p> content with meaning and description,\n * - another one for the ICU message.\n *\n * In this case the last message is discarded as it contains less information (the AST is\n * otherwise identical).\n *\n * Note that we should still keep messages extracted from attributes inside the section (ie in the\n * ICU message here)\n */\n _Visitor.prototype._closeTranslatableSection = function (node, directChildren) {\n if (!this._isInTranslatableSection) {\n this._reportError(node, 'Unexpected section end');\n return;\n }\n var startIndex = this._msgCountAtSectionStart;\n var significantChildren = directChildren.reduce(function (count, node) { return count + (node instanceof Comment ? 0 : 1); }, 0);\n if (significantChildren == 1) {\n for (var i = this._messages.length - 1; i >= startIndex; i--) {\n var ast = this._messages[i].nodes;\n if (!(ast.length == 1 && ast[0] instanceof Text$1)) {\n this._messages.splice(i, 1);\n break;\n }\n }\n }\n this._msgCountAtSectionStart = undefined;\n };\n _Visitor.prototype._reportError = function (node, msg) {\n this._errors.push(new I18nError(node.sourceSpan, msg));\n };\n return _Visitor;\n}());\nfunction _isOpeningComment(n) {\n return !!(n instanceof Comment && n.value && n.value.startsWith('i18n'));\n}\nfunction _isClosingComment(n) {\n return !!(n instanceof Comment && n.value && n.value === '/i18n');\n}\nfunction _getI18nAttr(p) {\n return p.attrs.find(function (attr) { return attr.name === _I18N_ATTR; }) || null;\n}\nfunction _parseMessageMeta(i18n) {\n if (!i18n)\n return { meaning: '', description: '', id: '' };\n var idIndex = i18n.indexOf(ID_SEPARATOR);\n var descIndex = i18n.indexOf(MEANING_SEPARATOR);\n var _a = __read((idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], 2), meaningAndDesc = _a[0], id = _a[1];\n var _b = __read((descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc], 2), meaning = _b[0], description = _b[1];\n return { meaning: meaning, description: description, id: id };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 XmlTagDefinition = /** @class */ (function () {\n function XmlTagDefinition() {\n this.closedByParent = false;\n this.contentType = TagContentType.PARSABLE_DATA;\n this.isVoid = false;\n this.ignoreFirstLf = false;\n this.canSelfClose = true;\n }\n XmlTagDefinition.prototype.requireExtraParent = function (currentParent) { return false; };\n XmlTagDefinition.prototype.isClosedByChild = function (name) { return false; };\n return XmlTagDefinition;\n}());\nvar _TAG_DEFINITION = new XmlTagDefinition();\nfunction getXmlTagDefinition(tagName) {\n return _TAG_DEFINITION;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 XmlParser = /** @class */ (function (_super) {\n __extends(XmlParser, _super);\n function XmlParser() {\n return _super.call(this, getXmlTagDefinition) || this;\n }\n XmlParser.prototype.parse = function (source, url, parseExpansionForms) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms);\n };\n return XmlParser;\n}(Parser$1));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 Serializer = /** @class */ (function () {\n function Serializer() {\n }\n // Creates a name mapper, see `PlaceholderMapper`\n // Returning `null` means that no name mapping is used.\n Serializer.prototype.createNameMapper = function (message) { return null; };\n return Serializer;\n}());\n/**\n * A simple mapper that take a function to transform an internal name to a public name\n */\nvar SimplePlaceholderMapper = /** @class */ (function (_super) {\n __extends(SimplePlaceholderMapper, _super);\n // create a mapping from the message\n function SimplePlaceholderMapper(message, mapName) {\n var _this = _super.call(this) || this;\n _this.mapName = mapName;\n _this.internalToPublic = {};\n _this.publicToNextId = {};\n _this.publicToInternal = {};\n message.nodes.forEach(function (node) { return node.visit(_this); });\n return _this;\n }\n SimplePlaceholderMapper.prototype.toPublicName = function (internalName) {\n return this.internalToPublic.hasOwnProperty(internalName) ?\n this.internalToPublic[internalName] :\n null;\n };\n SimplePlaceholderMapper.prototype.toInternalName = function (publicName) {\n return this.publicToInternal.hasOwnProperty(publicName) ? this.publicToInternal[publicName] :\n null;\n };\n SimplePlaceholderMapper.prototype.visitText = function (text, context) { return null; };\n SimplePlaceholderMapper.prototype.visitTagPlaceholder = function (ph, context) {\n this.visitPlaceholderName(ph.startName);\n _super.prototype.visitTagPlaceholder.call(this, ph, context);\n this.visitPlaceholderName(ph.closeName);\n };\n SimplePlaceholderMapper.prototype.visitPlaceholder = function (ph, context) { this.visitPlaceholderName(ph.name); };\n SimplePlaceholderMapper.prototype.visitIcuPlaceholder = function (ph, context) {\n this.visitPlaceholderName(ph.name);\n };\n // XMB placeholders could only contains A-Z, 0-9 and _\n SimplePlaceholderMapper.prototype.visitPlaceholderName = function (internalName) {\n if (!internalName || this.internalToPublic.hasOwnProperty(internalName)) {\n return;\n }\n var publicName = this.mapName(internalName);\n if (this.publicToInternal.hasOwnProperty(publicName)) {\n // Create a new XMB when it has already been used\n var nextId = this.publicToNextId[publicName];\n this.publicToNextId[publicName] = nextId + 1;\n publicName = publicName + \"_\" + nextId;\n }\n else {\n this.publicToNextId[publicName] = 1;\n }\n this.internalToPublic[internalName] = publicName;\n this.publicToInternal[publicName] = internalName;\n };\n return SimplePlaceholderMapper;\n}(RecurseVisitor));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _Visitor$1 = /** @class */ (function () {\n function _Visitor() {\n }\n _Visitor.prototype.visitTag = function (tag) {\n var _this = this;\n var strAttrs = this._serializeAttributes(tag.attrs);\n if (tag.children.length == 0) {\n return \"<\" + tag.name + strAttrs + \"/>\";\n }\n var strChildren = tag.children.map(function (node) { return node.visit(_this); });\n return \"<\" + tag.name + strAttrs + \">\" + strChildren.join('') + \"</\" + tag.name + \">\";\n };\n _Visitor.prototype.visitText = function (text) { return text.value; };\n _Visitor.prototype.visitDeclaration = function (decl) {\n return \"<?xml\" + this._serializeAttributes(decl.attrs) + \" ?>\";\n };\n _Visitor.prototype._serializeAttributes = function (attrs) {\n var strAttrs = Object.keys(attrs).map(function (name) { return name + \"=\\\"\" + attrs[name] + \"\\\"\"; }).join(' ');\n return strAttrs.length > 0 ? ' ' + strAttrs : '';\n };\n _Visitor.prototype.visitDoctype = function (doctype) {\n return \"<!DOCTYPE \" + doctype.rootTag + \" [\\n\" + doctype.dtd + \"\\n]>\";\n };\n return _Visitor;\n}());\nvar _visitor = new _Visitor$1();\nfunction serialize(nodes) {\n return nodes.map(function (node) { return node.visit(_visitor); }).join('');\n}\nvar Declaration = /** @class */ (function () {\n function Declaration(unescapedAttrs) {\n var _this = this;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n Declaration.prototype.visit = function (visitor) { return visitor.visitDeclaration(this); };\n return Declaration;\n}());\nvar Doctype = /** @class */ (function () {\n function Doctype(rootTag, dtd) {\n this.rootTag = rootTag;\n this.dtd = dtd;\n }\n Doctype.prototype.visit = function (visitor) { return visitor.visitDoctype(this); };\n return Doctype;\n}());\nvar Tag = /** @class */ (function () {\n function Tag(name, unescapedAttrs, children) {\n if (unescapedAttrs === void 0) { unescapedAttrs = {}; }\n if (children === void 0) { children = []; }\n var _this = this;\n this.name = name;\n this.children = children;\n this.attrs = {};\n Object.keys(unescapedAttrs).forEach(function (k) {\n _this.attrs[k] = escapeXml(unescapedAttrs[k]);\n });\n }\n Tag.prototype.visit = function (visitor) { return visitor.visitTag(this); };\n return Tag;\n}());\nvar Text$2 = /** @class */ (function () {\n function Text(unescapedValue) {\n this.value = escapeXml(unescapedValue);\n }\n Text.prototype.visit = function (visitor) { return visitor.visitText(this); };\n return Text;\n}());\nvar CR = /** @class */ (function (_super) {\n __extends(CR, _super);\n function CR(ws) {\n if (ws === void 0) { ws = 0; }\n return _super.call(this, \"\\n\" + new Array(ws + 1).join(' ')) || this;\n }\n return CR;\n}(Text$2));\nvar _ESCAPED_CHARS = [\n [/&/g, '&amp;'],\n [/\"/g, '&quot;'],\n [/'/g, '&apos;'],\n [/</g, '&lt;'],\n [/>/g, '&gt;'],\n];\n// Escape `_ESCAPED_CHARS` characters in the given text with encoded entities\nfunction escapeXml(text) {\n return _ESCAPED_CHARS.reduce(function (text, entry) { return text.replace(entry[0], entry[1]); }, text);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _VERSION = '1.2';\nvar _XMLNS = 'urn:oasis:names:tc:xliff:document:1.2';\n// TODO(vicb): make this a param (s/_/-/)\nvar _DEFAULT_SOURCE_LANG = 'en';\nvar _PLACEHOLDER_TAG = 'x';\nvar _MARKER_TAG = 'mrk';\nvar _FILE_TAG = 'file';\nvar _SOURCE_TAG = 'source';\nvar _SEGMENT_SOURCE_TAG = 'seg-source';\nvar _TARGET_TAG = 'target';\nvar _UNIT_TAG = 'trans-unit';\nvar _CONTEXT_GROUP_TAG = 'context-group';\nvar _CONTEXT_TAG = 'context';\n// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html\n// http://docs.oasis-open.org/xliff/v1.2/xliff-profile-html/xliff-profile-html-1.2.html\nvar Xliff = /** @class */ (function (_super) {\n __extends(Xliff, _super);\n function Xliff() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Xliff.prototype.write = function (messages, locale) {\n var visitor = new _WriteVisitor();\n var transUnits = [];\n messages.forEach(function (message) {\n var contextTags = [];\n message.sources.forEach(function (source) {\n var contextGroupTag = new Tag(_CONTEXT_GROUP_TAG, { purpose: 'location' });\n contextGroupTag.children.push(new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'sourcefile' }, [new Text$2(source.filePath)]), new CR(10), new Tag(_CONTEXT_TAG, { 'context-type': 'linenumber' }, [new Text$2(\"\" + source.startLine)]), new CR(8));\n contextTags.push(new CR(8), contextGroupTag);\n });\n var transUnit = new Tag(_UNIT_TAG, { id: message.id, datatype: 'html' });\n (_a = transUnit.children).push.apply(_a, __spread([new CR(8), new Tag(_SOURCE_TAG, {}, visitor.serialize(message.nodes))], contextTags));\n if (message.description) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'description' }, [new Text$2(message.description)]));\n }\n if (message.meaning) {\n transUnit.children.push(new CR(8), new Tag('note', { priority: '1', from: 'meaning' }, [new Text$2(message.meaning)]));\n }\n transUnit.children.push(new CR(6));\n transUnits.push(new CR(6), transUnit);\n var _a;\n });\n var body = new Tag('body', {}, __spread(transUnits, [new CR(4)]));\n var file = new Tag('file', {\n 'source-language': locale || _DEFAULT_SOURCE_LANG,\n datatype: 'plaintext',\n original: 'ng2.template',\n }, [new CR(4), body, new CR(2)]);\n var xliff = new Tag('xliff', { version: _VERSION, xmlns: _XMLNS }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n };\n Xliff.prototype.load = function (content, url) {\n // xliff to xml nodes\n var xliffParser = new XliffParser();\n var _a = xliffParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var i18nNodesByMsgId = {};\n var converter = new XmlToI18n();\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;\n errors.push.apply(errors, __spread(e));\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(\"xliff parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };\n };\n Xliff.prototype.digest = function (message) { return digest(message); };\n return Xliff;\n}(Serializer));\nvar _WriteVisitor = /** @class */ (function () {\n function _WriteVisitor() {\n }\n _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };\n _WriteVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, __spread(node.visit(_this))); });\n return nodes;\n };\n _WriteVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var nodes = [new Text$2(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, __spread([new Text$2(c + \" {\")], icu.cases[c].visit(_this), [new Text$2(\"} \")]));\n });\n nodes.push(new Text$2(\"}\"));\n return nodes;\n };\n _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var ctype = getCtypeForTag(ph.tag);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': \"<\" + ph.tag + \"/>\" })];\n }\n var startTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.startName, ctype: ctype, 'equiv-text': \"<\" + ph.tag + \">\" });\n var closeTagPh = new Tag(_PLACEHOLDER_TAG, { id: ph.closeName, ctype: ctype, 'equiv-text': \"</\" + ph.tag + \">\" });\n return __spread([startTagPh], this.serialize(ph.children), [closeTagPh]);\n };\n _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {\n return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': \"{{\" + ph.value + \"}}\" })];\n };\n _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n var equivText = \"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + \"}\";\n return [new Tag(_PLACEHOLDER_TAG, { id: ph.name, 'equiv-text': equivText })];\n };\n _WriteVisitor.prototype.serialize = function (nodes) {\n var _this = this;\n return [].concat.apply([], __spread(nodes.map(function (node) { return node.visit(_this); })));\n };\n return _WriteVisitor;\n}());\n// TODO(vicb): add error management (structure)\n// Extract messages as xml nodes from the xliff file\nvar XliffParser = /** @class */ (function () {\n function XliffParser() {\n this._locale = null;\n }\n XliffParser.prototype.parse = function (xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n var xml = new XmlParser().parse(xliff, url, false);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n XliffParser.prototype.visitElement = function (element, context) {\n switch (element.name) {\n case _UNIT_TAG:\n this._unitMlString = null;\n var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _UNIT_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, \"Message \" + id + \" misses a translation\");\n }\n }\n }\n break;\n // ignore those tags\n case _SOURCE_TAG:\n case _SEGMENT_SOURCE_TAG:\n break;\n case _TARGET_TAG:\n var innerTextStart = element.startSourceSpan.end.offset;\n var innerTextEnd = element.endSourceSpan.start.offset;\n var content = element.startSourceSpan.start.file.content;\n var innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _FILE_TAG:\n var localeAttr = element.attrs.find(function (attr) { return attr.name === 'target-language'; });\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n visitAll(this, element.children, null);\n break;\n default:\n // TODO(vicb): assert file structure, xliff version\n // For now only recurse on unhandled nodes\n visitAll(this, element.children, null);\n }\n };\n XliffParser.prototype.visitAttribute = function (attribute, context) { };\n XliffParser.prototype.visitText = function (text, context) { };\n XliffParser.prototype.visitComment = function (comment, context) { };\n XliffParser.prototype.visitExpansion = function (expansion, context) { };\n XliffParser.prototype.visitExpansionCase = function (expansionCase, context) { };\n XliffParser.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XliffParser;\n}());\n// Convert ml nodes (xliff syntax) to i18n nodes\nvar XmlToI18n = /** @class */ (function () {\n function XmlToI18n() {\n }\n XmlToI18n.prototype.convert = function (message, url) {\n var xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] : [].concat.apply([], __spread(visitAll(this, xmlIcu.rootNodes)));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };\n XmlToI18n.prototype.visitElement = function (el, context) {\n if (el.name === _PLACEHOLDER_TAG) {\n var nameAttr = el.attrs.find(function (attr) { return attr.name === 'id'; });\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG + \"> misses the \\\"id\\\" attribute\");\n return null;\n }\n if (el.name === _MARKER_TAG) {\n return [].concat.apply([], __spread(visitAll(this, el.children)));\n }\n this._addError(el, \"Unexpected tag\");\n return null;\n };\n XmlToI18n.prototype.visitExpansion = function (icu, context) {\n var caseMap = {};\n visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n };\n XmlToI18n.prototype.visitComment = function (comment, context) { };\n XmlToI18n.prototype.visitAttribute = function (attribute, context) { };\n XmlToI18n.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XmlToI18n;\n}());\nfunction getCtypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n return 'lb';\n case 'img':\n return 'image';\n default:\n return \"x-\" + tag;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _VERSION$1 = '2.0';\nvar _XMLNS$1 = 'urn:oasis:names:tc:xliff:document:2.0';\n// TODO(vicb): make this a param (s/_/-/)\nvar _DEFAULT_SOURCE_LANG$1 = 'en';\nvar _PLACEHOLDER_TAG$1 = 'ph';\nvar _PLACEHOLDER_SPANNING_TAG = 'pc';\nvar _MARKER_TAG$1 = 'mrk';\nvar _XLIFF_TAG = 'xliff';\nvar _SOURCE_TAG$1 = 'source';\nvar _TARGET_TAG$1 = 'target';\nvar _UNIT_TAG$1 = 'unit';\n// http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html\nvar Xliff2 = /** @class */ (function (_super) {\n __extends(Xliff2, _super);\n function Xliff2() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Xliff2.prototype.write = function (messages, locale) {\n var visitor = new _WriteVisitor$1();\n var units = [];\n messages.forEach(function (message) {\n var unit = new Tag(_UNIT_TAG$1, { id: message.id });\n var notes = new Tag('notes');\n if (message.description || message.meaning) {\n if (message.description) {\n notes.children.push(new CR(8), new Tag('note', { category: 'description' }, [new Text$2(message.description)]));\n }\n if (message.meaning) {\n notes.children.push(new CR(8), new Tag('note', { category: 'meaning' }, [new Text$2(message.meaning)]));\n }\n }\n message.sources.forEach(function (source) {\n notes.children.push(new CR(8), new Tag('note', { category: 'location' }, [\n new Text$2(source.filePath + \":\" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))\n ]));\n });\n notes.children.push(new CR(6));\n unit.children.push(new CR(6), notes);\n var segment = new Tag('segment');\n segment.children.push(new CR(8), new Tag(_SOURCE_TAG$1, {}, visitor.serialize(message.nodes)), new CR(6));\n unit.children.push(new CR(6), segment, new CR(4));\n units.push(new CR(4), unit);\n });\n var file = new Tag('file', { 'original': 'ng.template', id: 'ngi18n' }, __spread(units, [new CR(2)]));\n var xliff = new Tag(_XLIFF_TAG, { version: _VERSION$1, xmlns: _XMLNS$1, srcLang: locale || _DEFAULT_SOURCE_LANG$1 }, [new CR(2), file, new CR()]);\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }), new CR(), xliff, new CR()\n ]);\n };\n Xliff2.prototype.load = function (content, url) {\n // xliff to xml nodes\n var xliff2Parser = new Xliff2Parser();\n var _a = xliff2Parser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var i18nNodesByMsgId = {};\n var converter = new XmlToI18n$1();\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, e = _a.errors;\n errors.push.apply(errors, __spread(e));\n i18nNodesByMsgId[msgId] = i18nNodes;\n });\n if (errors.length) {\n throw new Error(\"xliff2 parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };\n };\n Xliff2.prototype.digest = function (message) { return decimalDigest(message); };\n return Xliff2;\n}(Serializer));\nvar _WriteVisitor$1 = /** @class */ (function () {\n function _WriteVisitor() {\n }\n _WriteVisitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };\n _WriteVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, __spread(node.visit(_this))); });\n return nodes;\n };\n _WriteVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var nodes = [new Text$2(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, __spread([new Text$2(c + \" {\")], icu.cases[c].visit(_this), [new Text$2(\"} \")]));\n });\n nodes.push(new Text$2(\"}\"));\n return nodes;\n };\n _WriteVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var _this = this;\n var type = getTypeForTag(ph.tag);\n if (ph.isVoid) {\n var tagPh = new Tag(_PLACEHOLDER_TAG$1, {\n id: (this._nextPlaceholderId++).toString(),\n equiv: ph.startName,\n type: type,\n disp: \"<\" + ph.tag + \"/>\",\n });\n return [tagPh];\n }\n var tagPc = new Tag(_PLACEHOLDER_SPANNING_TAG, {\n id: (this._nextPlaceholderId++).toString(),\n equivStart: ph.startName,\n equivEnd: ph.closeName,\n type: type,\n dispStart: \"<\" + ph.tag + \">\",\n dispEnd: \"</\" + ph.tag + \">\",\n });\n var nodes = [].concat.apply([], __spread(ph.children.map(function (node) { return node.visit(_this); })));\n if (nodes.length) {\n nodes.forEach(function (node) { return tagPc.children.push(node); });\n }\n else {\n tagPc.children.push(new Text$2(''));\n }\n return [tagPc];\n };\n _WriteVisitor.prototype.visitPlaceholder = function (ph, context) {\n var idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, {\n id: idStr,\n equiv: ph.name,\n disp: \"{{\" + ph.value + \"}}\",\n })];\n };\n _WriteVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n var cases = Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ');\n var idStr = (this._nextPlaceholderId++).toString();\n return [new Tag(_PLACEHOLDER_TAG$1, { id: idStr, equiv: ph.name, disp: \"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + cases + \"}\" })];\n };\n _WriteVisitor.prototype.serialize = function (nodes) {\n var _this = this;\n this._nextPlaceholderId = 0;\n return [].concat.apply([], __spread(nodes.map(function (node) { return node.visit(_this); })));\n };\n return _WriteVisitor;\n}());\n// Extract messages as xml nodes from the xliff file\nvar Xliff2Parser = /** @class */ (function () {\n function Xliff2Parser() {\n this._locale = null;\n }\n Xliff2Parser.prototype.parse = function (xliff, url) {\n this._unitMlString = null;\n this._msgIdToHtml = {};\n var xml = new XmlParser().parse(xliff, url, false);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes, null);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n Xliff2Parser.prototype.visitElement = function (element, context) {\n switch (element.name) {\n case _UNIT_TAG$1:\n this._unitMlString = null;\n var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _UNIT_TAG$1 + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n visitAll(this, element.children, null);\n if (typeof this._unitMlString === 'string') {\n this._msgIdToHtml[id] = this._unitMlString;\n }\n else {\n this._addError(element, \"Message \" + id + \" misses a translation\");\n }\n }\n }\n break;\n case _SOURCE_TAG$1:\n // ignore source message\n break;\n case _TARGET_TAG$1:\n var innerTextStart = element.startSourceSpan.end.offset;\n var innerTextEnd = element.endSourceSpan.start.offset;\n var content = element.startSourceSpan.start.file.content;\n var innerText = content.slice(innerTextStart, innerTextEnd);\n this._unitMlString = innerText;\n break;\n case _XLIFF_TAG:\n var localeAttr = element.attrs.find(function (attr) { return attr.name === 'trgLang'; });\n if (localeAttr) {\n this._locale = localeAttr.value;\n }\n var versionAttr = element.attrs.find(function (attr) { return attr.name === 'version'; });\n if (versionAttr) {\n var version = versionAttr.value;\n if (version !== '2.0') {\n this._addError(element, \"The XLIFF file version \" + version + \" is not compatible with XLIFF 2.0 serializer\");\n }\n else {\n visitAll(this, element.children, null);\n }\n }\n break;\n default:\n visitAll(this, element.children, null);\n }\n };\n Xliff2Parser.prototype.visitAttribute = function (attribute, context) { };\n Xliff2Parser.prototype.visitText = function (text, context) { };\n Xliff2Parser.prototype.visitComment = function (comment, context) { };\n Xliff2Parser.prototype.visitExpansion = function (expansion, context) { };\n Xliff2Parser.prototype.visitExpansionCase = function (expansionCase, context) { };\n Xliff2Parser.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return Xliff2Parser;\n}());\n// Convert ml nodes (xliff syntax) to i18n nodes\nvar XmlToI18n$1 = /** @class */ (function () {\n function XmlToI18n() {\n }\n XmlToI18n.prototype.convert = function (message, url) {\n var xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] : [].concat.apply([], __spread(visitAll(this, xmlIcu.rootNodes)));\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };\n XmlToI18n.prototype.visitElement = function (el, context) {\n var _this = this;\n switch (el.name) {\n case _PLACEHOLDER_TAG$1:\n var nameAttr = el.attrs.find(function (attr) { return attr.name === 'equiv'; });\n if (nameAttr) {\n return [new Placeholder('', nameAttr.value, el.sourceSpan)];\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG$1 + \"> misses the \\\"equiv\\\" attribute\");\n break;\n case _PLACEHOLDER_SPANNING_TAG:\n var startAttr = el.attrs.find(function (attr) { return attr.name === 'equivStart'; });\n var endAttr = el.attrs.find(function (attr) { return attr.name === 'equivEnd'; });\n if (!startAttr) {\n this._addError(el, \"<\" + _PLACEHOLDER_TAG$1 + \"> misses the \\\"equivStart\\\" attribute\");\n }\n else if (!endAttr) {\n this._addError(el, \"<\" + _PLACEHOLDER_TAG$1 + \"> misses the \\\"equivEnd\\\" attribute\");\n }\n else {\n var startId = startAttr.value;\n var endId = endAttr.value;\n var nodes = [];\n return nodes.concat.apply(nodes, __spread([new Placeholder('', startId, el.sourceSpan)], el.children.map(function (node) { return node.visit(_this, null); }), [new Placeholder('', endId, el.sourceSpan)]));\n }\n break;\n case _MARKER_TAG$1:\n return [].concat.apply([], __spread(visitAll(this, el.children)));\n default:\n this._addError(el, \"Unexpected tag\");\n }\n return null;\n };\n XmlToI18n.prototype.visitExpansion = function (icu, context) {\n var caseMap = {};\n visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: [].concat.apply([], __spread(visitAll(this, icuCase.expression))),\n };\n };\n XmlToI18n.prototype.visitComment = function (comment, context) { };\n XmlToI18n.prototype.visitAttribute = function (attribute, context) { };\n XmlToI18n.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XmlToI18n;\n}());\nfunction getTypeForTag(tag) {\n switch (tag.toLowerCase()) {\n case 'br':\n case 'b':\n case 'i':\n case 'u':\n return 'fmt';\n case 'img':\n return 'image';\n case 'a':\n return 'link';\n default:\n return 'other';\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _MESSAGES_TAG = 'messagebundle';\nvar _MESSAGE_TAG = 'msg';\nvar _PLACEHOLDER_TAG$2 = 'ph';\nvar _EXEMPLE_TAG = 'ex';\nvar _SOURCE_TAG$2 = 'source';\nvar _DOCTYPE = \"<!ELEMENT messagebundle (msg)*>\\n<!ATTLIST messagebundle class CDATA #IMPLIED>\\n\\n<!ELEMENT msg (#PCDATA|ph|source)*>\\n<!ATTLIST msg id CDATA #IMPLIED>\\n<!ATTLIST msg seq CDATA #IMPLIED>\\n<!ATTLIST msg name CDATA #IMPLIED>\\n<!ATTLIST msg desc CDATA #IMPLIED>\\n<!ATTLIST msg meaning CDATA #IMPLIED>\\n<!ATTLIST msg obsolete (obsolete) #IMPLIED>\\n<!ATTLIST msg xml:space (default|preserve) \\\"default\\\">\\n<!ATTLIST msg is_hidden CDATA #IMPLIED>\\n\\n<!ELEMENT source (#PCDATA)>\\n\\n<!ELEMENT ph (#PCDATA|ex)*>\\n<!ATTLIST ph name CDATA #REQUIRED>\\n\\n<!ELEMENT ex (#PCDATA)>\";\nvar Xmb = /** @class */ (function (_super) {\n __extends(Xmb, _super);\n function Xmb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Xmb.prototype.write = function (messages, locale) {\n var exampleVisitor = new ExampleVisitor();\n var visitor = new _Visitor$2();\n var rootNode = new Tag(_MESSAGES_TAG);\n messages.forEach(function (message) {\n var attrs = { id: message.id };\n if (message.description) {\n attrs['desc'] = message.description;\n }\n if (message.meaning) {\n attrs['meaning'] = message.meaning;\n }\n var sourceTags = [];\n message.sources.forEach(function (source) {\n sourceTags.push(new Tag(_SOURCE_TAG$2, {}, [\n new Text$2(source.filePath + \":\" + source.startLine + (source.endLine !== source.startLine ? ',' + source.endLine : ''))\n ]));\n });\n rootNode.children.push(new CR(2), new Tag(_MESSAGE_TAG, attrs, __spread(sourceTags, visitor.serialize(message.nodes))));\n });\n rootNode.children.push(new CR());\n return serialize([\n new Declaration({ version: '1.0', encoding: 'UTF-8' }),\n new CR(),\n new Doctype(_MESSAGES_TAG, _DOCTYPE),\n new CR(),\n exampleVisitor.addDefaultExamples(rootNode),\n new CR(),\n ]);\n };\n Xmb.prototype.load = function (content, url) {\n throw new Error('Unsupported');\n };\n Xmb.prototype.digest = function (message) { return digest$1(message); };\n Xmb.prototype.createNameMapper = function (message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n };\n return Xmb;\n}(Serializer));\nvar _Visitor$2 = /** @class */ (function () {\n function _Visitor() {\n }\n _Visitor.prototype.visitText = function (text, context) { return [new Text$2(text.value)]; };\n _Visitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n var nodes = [];\n container.children.forEach(function (node) { return nodes.push.apply(nodes, __spread(node.visit(_this))); });\n return nodes;\n };\n _Visitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var nodes = [new Text$2(\"{\" + icu.expressionPlaceholder + \", \" + icu.type + \", \")];\n Object.keys(icu.cases).forEach(function (c) {\n nodes.push.apply(nodes, __spread([new Text$2(c + \" {\")], icu.cases[c].visit(_this), [new Text$2(\"} \")]));\n });\n nodes.push(new Text$2(\"}\"));\n return nodes;\n };\n _Visitor.prototype.visitTagPlaceholder = function (ph, context) {\n var startEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2(\"<\" + ph.tag + \">\")]);\n var startTagPh = new Tag(_PLACEHOLDER_TAG$2, { name: ph.startName }, [startEx]);\n if (ph.isVoid) {\n // void tags have no children nor closing tags\n return [startTagPh];\n }\n var closeEx = new Tag(_EXEMPLE_TAG, {}, [new Text$2(\"</\" + ph.tag + \">\")]);\n var closeTagPh = new Tag(_PLACEHOLDER_TAG$2, { name: ph.closeName }, [closeEx]);\n return __spread([startTagPh], this.serialize(ph.children), [closeTagPh]);\n };\n _Visitor.prototype.visitPlaceholder = function (ph, context) {\n var exTag = new Tag(_EXEMPLE_TAG, {}, [new Text$2(\"{{\" + ph.value + \"}}\")]);\n return [new Tag(_PLACEHOLDER_TAG$2, { name: ph.name }, [exTag])];\n };\n _Visitor.prototype.visitIcuPlaceholder = function (ph, context) {\n var exTag = new Tag(_EXEMPLE_TAG, {}, [\n new Text$2(\"{\" + ph.value.expression + \", \" + ph.value.type + \", \" + Object.keys(ph.value.cases).map(function (value) { return value + ' {...}'; }).join(' ') + \"}\")\n ]);\n return [new Tag(_PLACEHOLDER_TAG$2, { name: ph.name }, [exTag])];\n };\n _Visitor.prototype.serialize = function (nodes) {\n var _this = this;\n return [].concat.apply([], __spread(nodes.map(function (node) { return node.visit(_this); })));\n };\n return _Visitor;\n}());\nfunction digest$1(message) {\n return decimalDigest(message);\n}\n// TC requires at least one non-empty example on placeholders\nvar ExampleVisitor = /** @class */ (function () {\n function ExampleVisitor() {\n }\n ExampleVisitor.prototype.addDefaultExamples = function (node) {\n node.visit(this);\n return node;\n };\n ExampleVisitor.prototype.visitTag = function (tag) {\n var _this = this;\n if (tag.name === _PLACEHOLDER_TAG$2) {\n if (!tag.children || tag.children.length == 0) {\n var exText = new Text$2(tag.attrs['name'] || '...');\n tag.children = [new Tag(_EXEMPLE_TAG, {}, [exText])];\n }\n }\n else if (tag.children) {\n tag.children.forEach(function (node) { return node.visit(_this); });\n }\n };\n ExampleVisitor.prototype.visitText = function (text) { };\n ExampleVisitor.prototype.visitDeclaration = function (decl) { };\n ExampleVisitor.prototype.visitDoctype = function (doctype) { };\n return ExampleVisitor;\n}());\n// XMB/XTB placeholders can only contain A-Z, 0-9 and _\nfunction toPublicName(internalName) {\n return internalName.toUpperCase().replace(/[^A-Z0-9_]/g, '_');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _TRANSLATIONS_TAG = 'translationbundle';\nvar _TRANSLATION_TAG = 'translation';\nvar _PLACEHOLDER_TAG$3 = 'ph';\nvar Xtb = /** @class */ (function (_super) {\n __extends(Xtb, _super);\n function Xtb() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Xtb.prototype.write = function (messages, locale) { throw new Error('Unsupported'); };\n Xtb.prototype.load = function (content, url) {\n // xtb to xml nodes\n var xtbParser = new XtbParser();\n var _a = xtbParser.parse(content, url), locale = _a.locale, msgIdToHtml = _a.msgIdToHtml, errors = _a.errors;\n // xml nodes to i18n nodes\n var i18nNodesByMsgId = {};\n var converter = new XmlToI18n$2();\n // Because we should be able to load xtb files that rely on features not supported by angular,\n // we need to delay the conversion of html to i18n nodes so that non angular messages are not\n // converted\n Object.keys(msgIdToHtml).forEach(function (msgId) {\n var valueFn = function () {\n var _a = converter.convert(msgIdToHtml[msgId], url), i18nNodes = _a.i18nNodes, errors = _a.errors;\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n return i18nNodes;\n };\n createLazyProperty(i18nNodesByMsgId, msgId, valueFn);\n });\n if (errors.length) {\n throw new Error(\"xtb parse errors:\\n\" + errors.join('\\n'));\n }\n return { locale: locale, i18nNodesByMsgId: i18nNodesByMsgId };\n };\n Xtb.prototype.digest = function (message) { return digest$1(message); };\n Xtb.prototype.createNameMapper = function (message) {\n return new SimplePlaceholderMapper(message, toPublicName);\n };\n return Xtb;\n}(Serializer));\nfunction createLazyProperty(messages, id, valueFn) {\n Object.defineProperty(messages, id, {\n configurable: true,\n enumerable: true,\n get: function () {\n var value = valueFn();\n Object.defineProperty(messages, id, { enumerable: true, value: value });\n return value;\n },\n set: function (_) { throw new Error('Could not overwrite an XTB translation'); },\n });\n}\n// Extract messages as xml nodes from the xtb file\nvar XtbParser = /** @class */ (function () {\n function XtbParser() {\n this._locale = null;\n }\n XtbParser.prototype.parse = function (xtb, url) {\n this._bundleDepth = 0;\n this._msgIdToHtml = {};\n // We can not parse the ICU messages at this point as some messages might not originate\n // from Angular that could not be lex'd.\n var xml = new XmlParser().parse(xtb, url, false);\n this._errors = xml.errors;\n visitAll(this, xml.rootNodes);\n return {\n msgIdToHtml: this._msgIdToHtml,\n errors: this._errors,\n locale: this._locale,\n };\n };\n XtbParser.prototype.visitElement = function (element, context) {\n switch (element.name) {\n case _TRANSLATIONS_TAG:\n this._bundleDepth++;\n if (this._bundleDepth > 1) {\n this._addError(element, \"<\" + _TRANSLATIONS_TAG + \"> elements can not be nested\");\n }\n var langAttr = element.attrs.find(function (attr) { return attr.name === 'lang'; });\n if (langAttr) {\n this._locale = langAttr.value;\n }\n visitAll(this, element.children, null);\n this._bundleDepth--;\n break;\n case _TRANSLATION_TAG:\n var idAttr = element.attrs.find(function (attr) { return attr.name === 'id'; });\n if (!idAttr) {\n this._addError(element, \"<\" + _TRANSLATION_TAG + \"> misses the \\\"id\\\" attribute\");\n }\n else {\n var id = idAttr.value;\n if (this._msgIdToHtml.hasOwnProperty(id)) {\n this._addError(element, \"Duplicated translations for msg \" + id);\n }\n else {\n var innerTextStart = element.startSourceSpan.end.offset;\n var innerTextEnd = element.endSourceSpan.start.offset;\n var content = element.startSourceSpan.start.file.content;\n var innerText = content.slice(innerTextStart, innerTextEnd);\n this._msgIdToHtml[id] = innerText;\n }\n }\n break;\n default:\n this._addError(element, 'Unexpected tag');\n }\n };\n XtbParser.prototype.visitAttribute = function (attribute, context) { };\n XtbParser.prototype.visitText = function (text, context) { };\n XtbParser.prototype.visitComment = function (comment, context) { };\n XtbParser.prototype.visitExpansion = function (expansion, context) { };\n XtbParser.prototype.visitExpansionCase = function (expansionCase, context) { };\n XtbParser.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XtbParser;\n}());\n// Convert ml nodes (xtb syntax) to i18n nodes\nvar XmlToI18n$2 = /** @class */ (function () {\n function XmlToI18n() {\n }\n XmlToI18n.prototype.convert = function (message, url) {\n var xmlIcu = new XmlParser().parse(message, url, true);\n this._errors = xmlIcu.errors;\n var i18nNodes = this._errors.length > 0 || xmlIcu.rootNodes.length == 0 ?\n [] :\n visitAll(this, xmlIcu.rootNodes);\n return {\n i18nNodes: i18nNodes,\n errors: this._errors,\n };\n };\n XmlToI18n.prototype.visitText = function (text, context) { return new Text$1(text.value, text.sourceSpan); };\n XmlToI18n.prototype.visitExpansion = function (icu, context) {\n var caseMap = {};\n visitAll(this, icu.cases).forEach(function (c) {\n caseMap[c.value] = new Container(c.nodes, icu.sourceSpan);\n });\n return new Icu(icu.switchValue, icu.type, caseMap, icu.sourceSpan);\n };\n XmlToI18n.prototype.visitExpansionCase = function (icuCase, context) {\n return {\n value: icuCase.value,\n nodes: visitAll(this, icuCase.expression),\n };\n };\n XmlToI18n.prototype.visitElement = function (el, context) {\n if (el.name === _PLACEHOLDER_TAG$3) {\n var nameAttr = el.attrs.find(function (attr) { return attr.name === 'name'; });\n if (nameAttr) {\n return new Placeholder('', nameAttr.value, el.sourceSpan);\n }\n this._addError(el, \"<\" + _PLACEHOLDER_TAG$3 + \"> misses the \\\"name\\\" attribute\");\n }\n else {\n this._addError(el, \"Unexpected tag\");\n }\n return null;\n };\n XmlToI18n.prototype.visitComment = function (comment, context) { };\n XmlToI18n.prototype.visitAttribute = function (attribute, context) { };\n XmlToI18n.prototype._addError = function (node, message) {\n this._errors.push(new I18nError(node.sourceSpan, message));\n };\n return XmlToI18n;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 HtmlParser = /** @class */ (function (_super) {\n __extends(HtmlParser, _super);\n function HtmlParser() {\n return _super.call(this, getHtmlTagDefinition) || this;\n }\n HtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n return _super.prototype.parse.call(this, source, url, parseExpansionForms, interpolationConfig);\n };\n return HtmlParser;\n}(Parser$1));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 container for translated messages\n */\nvar TranslationBundle = /** @class */ (function () {\n function TranslationBundle(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console) {\n if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }\n if (missingTranslationStrategy === void 0) { missingTranslationStrategy = MissingTranslationStrategy.Warning; }\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this.digest = digest;\n this.mapperFactory = mapperFactory;\n this._i18nToHtml = new I18nToHtmlVisitor(_i18nNodesByMsgId, locale, digest, mapperFactory, missingTranslationStrategy, console);\n }\n // Creates a `TranslationBundle` by parsing the given `content` with the `serializer`.\n TranslationBundle.load = function (content, url, serializer, missingTranslationStrategy, console) {\n var _a = serializer.load(content, url), locale = _a.locale, i18nNodesByMsgId = _a.i18nNodesByMsgId;\n var digestFn = function (m) { return serializer.digest(m); };\n var mapperFactory = function (m) { return serializer.createNameMapper(m); };\n return new TranslationBundle(i18nNodesByMsgId, locale, digestFn, mapperFactory, missingTranslationStrategy, console);\n };\n // Returns the translation as HTML nodes from the given source message.\n TranslationBundle.prototype.get = function (srcMsg) {\n var html = this._i18nToHtml.convert(srcMsg);\n if (html.errors.length) {\n throw new Error(html.errors.join('\\n'));\n }\n return html.nodes;\n };\n TranslationBundle.prototype.has = function (srcMsg) { return this.digest(srcMsg) in this._i18nNodesByMsgId; };\n return TranslationBundle;\n}());\nvar I18nToHtmlVisitor = /** @class */ (function () {\n function I18nToHtmlVisitor(_i18nNodesByMsgId, _locale, _digest, _mapperFactory, _missingTranslationStrategy, _console) {\n if (_i18nNodesByMsgId === void 0) { _i18nNodesByMsgId = {}; }\n this._i18nNodesByMsgId = _i18nNodesByMsgId;\n this._locale = _locale;\n this._digest = _digest;\n this._mapperFactory = _mapperFactory;\n this._missingTranslationStrategy = _missingTranslationStrategy;\n this._console = _console;\n this._contextStack = [];\n this._errors = [];\n }\n I18nToHtmlVisitor.prototype.convert = function (srcMsg) {\n this._contextStack.length = 0;\n this._errors.length = 0;\n // i18n to text\n var text = this._convertToText(srcMsg);\n // text to html\n var url = srcMsg.nodes[0].sourceSpan.start.file.url;\n var html = new HtmlParser().parse(text, url, true);\n return {\n nodes: html.rootNodes,\n errors: __spread(this._errors, html.errors),\n };\n };\n I18nToHtmlVisitor.prototype.visitText = function (text, context) {\n // `convert()` uses an `HtmlParser` to return `html.Node`s\n // we should then make sure that any special characters are escaped\n return escapeXml(text.value);\n };\n I18nToHtmlVisitor.prototype.visitContainer = function (container, context) {\n var _this = this;\n return container.children.map(function (n) { return n.visit(_this); }).join('');\n };\n I18nToHtmlVisitor.prototype.visitIcu = function (icu, context) {\n var _this = this;\n var cases = Object.keys(icu.cases).map(function (k) { return k + \" {\" + icu.cases[k].visit(_this) + \"}\"; });\n // TODO(vicb): Once all format switch to using expression placeholders\n // we should throw when the placeholder is not in the source message\n var exp = this._srcMsg.placeholders.hasOwnProperty(icu.expression) ?\n this._srcMsg.placeholders[icu.expression] :\n icu.expression;\n return \"{\" + exp + \", \" + icu.type + \", \" + cases.join(' ') + \"}\";\n };\n I18nToHtmlVisitor.prototype.visitPlaceholder = function (ph, context) {\n var phName = this._mapper(ph.name);\n if (this._srcMsg.placeholders.hasOwnProperty(phName)) {\n return this._srcMsg.placeholders[phName];\n }\n if (this._srcMsg.placeholderToMessage.hasOwnProperty(phName)) {\n return this._convertToText(this._srcMsg.placeholderToMessage[phName]);\n }\n this._addError(ph, \"Unknown placeholder \\\"\" + ph.name + \"\\\"\");\n return '';\n };\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n I18nToHtmlVisitor.prototype.visitTagPlaceholder = function (ph, context) {\n var _this = this;\n var tag = \"\" + ph.tag;\n var attrs = Object.keys(ph.attrs).map(function (name) { return name + \"=\\\"\" + ph.attrs[name] + \"\\\"\"; }).join(' ');\n if (ph.isVoid) {\n return \"<\" + tag + \" \" + attrs + \"/>\";\n }\n var children = ph.children.map(function (c) { return c.visit(_this); }).join('');\n return \"<\" + tag + \" \" + attrs + \">\" + children + \"</\" + tag + \">\";\n };\n // Loaded message contains only placeholders (vs tag and icu placeholders).\n // However when a translation can not be found, we need to serialize the source message\n // which can contain tag placeholders\n I18nToHtmlVisitor.prototype.visitIcuPlaceholder = function (ph, context) {\n // An ICU placeholder references the source message to be serialized\n return this._convertToText(this._srcMsg.placeholderToMessage[ph.name]);\n };\n /**\n * Convert a source message to a translated text string:\n * - text nodes are replaced with their translation,\n * - placeholders are replaced with their content,\n * - ICU nodes are converted to ICU expressions.\n */\n I18nToHtmlVisitor.prototype._convertToText = function (srcMsg) {\n var _this = this;\n var id = this._digest(srcMsg);\n var mapper = this._mapperFactory ? this._mapperFactory(srcMsg) : null;\n var nodes;\n this._contextStack.push({ msg: this._srcMsg, mapper: this._mapper });\n this._srcMsg = srcMsg;\n if (this._i18nNodesByMsgId.hasOwnProperty(id)) {\n // When there is a translation use its nodes as the source\n // And create a mapper to convert serialized placeholder names to internal names\n nodes = this._i18nNodesByMsgId[id];\n this._mapper = function (name) { return mapper ? mapper.toInternalName(name) : name; };\n }\n else {\n // When no translation has been found\n // - report an error / a warning / nothing,\n // - use the nodes from the original message\n // - placeholders are already internal and need no mapper\n if (this._missingTranslationStrategy === MissingTranslationStrategy.Error) {\n var ctx = this._locale ? \" for locale \\\"\" + this._locale + \"\\\"\" : '';\n this._addError(srcMsg.nodes[0], \"Missing translation for message \\\"\" + id + \"\\\"\" + ctx);\n }\n else if (this._console &&\n this._missingTranslationStrategy === MissingTranslationStrategy.Warning) {\n var ctx = this._locale ? \" for locale \\\"\" + this._locale + \"\\\"\" : '';\n this._console.warn(\"Missing translation for message \\\"\" + id + \"\\\"\" + ctx);\n }\n nodes = srcMsg.nodes;\n this._mapper = function (name) { return name; };\n }\n var text = nodes.map(function (node) { return node.visit(_this); }).join('');\n var context = this._contextStack.pop();\n this._srcMsg = context.msg;\n this._mapper = context.mapper;\n return text;\n };\n I18nToHtmlVisitor.prototype._addError = function (el, msg) {\n this._errors.push(new I18nError(el.sourceSpan, msg));\n };\n return I18nToHtmlVisitor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 I18NHtmlParser = /** @class */ (function () {\n function I18NHtmlParser(_htmlParser, translations, translationsFormat, missingTranslation, console) {\n if (missingTranslation === void 0) { missingTranslation = MissingTranslationStrategy.Warning; }\n this._htmlParser = _htmlParser;\n if (translations) {\n var serializer = createSerializer(translationsFormat);\n this._translationBundle =\n TranslationBundle.load(translations, 'i18n', serializer, missingTranslation, console);\n }\n else {\n this._translationBundle =\n new TranslationBundle({}, null, digest, undefined, missingTranslation, console);\n }\n }\n I18NHtmlParser.prototype.parse = function (source, url, parseExpansionForms, interpolationConfig) {\n if (parseExpansionForms === void 0) { parseExpansionForms = false; }\n if (interpolationConfig === void 0) { interpolationConfig = DEFAULT_INTERPOLATION_CONFIG; }\n var parseResult = this._htmlParser.parse(source, url, parseExpansionForms, interpolationConfig);\n if (parseResult.errors.length) {\n return new ParseTreeResult(parseResult.rootNodes, parseResult.errors);\n }\n return mergeTranslations(parseResult.rootNodes, this._translationBundle, interpolationConfig, [], {});\n };\n return I18NHtmlParser;\n}());\nfunction createSerializer(format) {\n format = (format || 'xlf').toLowerCase();\n switch (format) {\n case 'xmb':\n return new Xmb();\n case 'xtb':\n return new Xtb();\n case 'xliff2':\n case 'xlf2':\n return new Xliff2();\n case 'xliff':\n case 'xlf':\n default:\n return new Xliff();\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CORE = '@angular/core';\nvar Identifiers = /** @class */ (function () {\n function Identifiers() {\n }\n Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS = {\n name: 'ANALYZE_FOR_ENTRY_COMPONENTS',\n moduleName: CORE,\n };\n Identifiers.ElementRef = { name: 'ElementRef', moduleName: CORE };\n Identifiers.NgModuleRef = { name: 'NgModuleRef', moduleName: CORE };\n Identifiers.ViewContainerRef = { name: 'ViewContainerRef', moduleName: CORE };\n Identifiers.ChangeDetectorRef = {\n name: 'ChangeDetectorRef',\n moduleName: CORE,\n };\n Identifiers.QueryList = { name: 'QueryList', moduleName: CORE };\n Identifiers.TemplateRef = { name: 'TemplateRef', moduleName: CORE };\n Identifiers.CodegenComponentFactoryResolver = {\n name: 'ɵCodegenComponentFactoryResolver',\n moduleName: CORE,\n };\n Identifiers.ComponentFactoryResolver = {\n name: 'ComponentFactoryResolver',\n moduleName: CORE,\n };\n Identifiers.ComponentFactory = { name: 'ComponentFactory', moduleName: CORE };\n Identifiers.ComponentRef = { name: 'ComponentRef', moduleName: CORE };\n Identifiers.NgModuleFactory = { name: 'NgModuleFactory', moduleName: CORE };\n Identifiers.createModuleFactory = {\n name: 'ɵcmf',\n moduleName: CORE,\n };\n Identifiers.moduleDef = {\n name: 'ɵmod',\n moduleName: CORE,\n };\n Identifiers.moduleProviderDef = {\n name: 'ɵmpd',\n moduleName: CORE,\n };\n Identifiers.RegisterModuleFactoryFn = {\n name: 'ɵregisterModuleFactory',\n moduleName: CORE,\n };\n Identifiers.inject = { name: 'inject', moduleName: CORE };\n Identifiers.INJECTOR = { name: 'INJECTOR', moduleName: CORE };\n Identifiers.Injector = { name: 'Injector', moduleName: CORE };\n Identifiers.defineInjectable = { name: 'defineInjectable', moduleName: CORE };\n Identifiers.ViewEncapsulation = {\n name: 'ViewEncapsulation',\n moduleName: CORE,\n };\n Identifiers.ChangeDetectionStrategy = {\n name: 'ChangeDetectionStrategy',\n moduleName: CORE,\n };\n Identifiers.SecurityContext = {\n name: 'SecurityContext',\n moduleName: CORE,\n };\n Identifiers.LOCALE_ID = { name: 'LOCALE_ID', moduleName: CORE };\n Identifiers.TRANSLATIONS_FORMAT = {\n name: 'TRANSLATIONS_FORMAT',\n moduleName: CORE,\n };\n Identifiers.inlineInterpolate = {\n name: 'ɵinlineInterpolate',\n moduleName: CORE,\n };\n Identifiers.interpolate = { name: 'ɵinterpolate', moduleName: CORE };\n Identifiers.EMPTY_ARRAY = { name: 'ɵEMPTY_ARRAY', moduleName: CORE };\n Identifiers.EMPTY_MAP = { name: 'ɵEMPTY_MAP', moduleName: CORE };\n Identifiers.Renderer = { name: 'Renderer', moduleName: CORE };\n Identifiers.viewDef = { name: 'ɵvid', moduleName: CORE };\n Identifiers.elementDef = { name: 'ɵeld', moduleName: CORE };\n Identifiers.anchorDef = { name: 'ɵand', moduleName: CORE };\n Identifiers.textDef = { name: 'ɵted', moduleName: CORE };\n Identifiers.directiveDef = { name: 'ɵdid', moduleName: CORE };\n Identifiers.providerDef = { name: 'ɵprd', moduleName: CORE };\n Identifiers.queryDef = { name: 'ɵqud', moduleName: CORE };\n Identifiers.pureArrayDef = { name: 'ɵpad', moduleName: CORE };\n Identifiers.pureObjectDef = { name: 'ɵpod', moduleName: CORE };\n Identifiers.purePipeDef = { name: 'ɵppd', moduleName: CORE };\n Identifiers.pipeDef = { name: 'ɵpid', moduleName: CORE };\n Identifiers.nodeValue = { name: 'ɵnov', moduleName: CORE };\n Identifiers.ngContentDef = { name: 'ɵncd', moduleName: CORE };\n Identifiers.unwrapValue = { name: 'ɵunv', moduleName: CORE };\n Identifiers.createRendererType2 = { name: 'ɵcrt', moduleName: CORE };\n // type only\n Identifiers.RendererType2 = {\n name: 'RendererType2',\n moduleName: CORE,\n };\n // type only\n Identifiers.ViewDefinition = {\n name: 'ɵViewDefinition',\n moduleName: CORE,\n };\n Identifiers.createComponentFactory = { name: 'ɵccf', moduleName: CORE };\n return Identifiers;\n}());\nfunction createTokenForReference(reference) {\n return { identifier: { reference: reference } };\n}\nfunction createTokenForExternalReference(reflector, reference) {\n return createTokenForReference(reflector.resolveExternalReference(reference));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n//// Types\nvar TypeModifier;\n(function (TypeModifier) {\n TypeModifier[TypeModifier[\"Const\"] = 0] = \"Const\";\n})(TypeModifier || (TypeModifier = {}));\nvar Type$1 = /** @class */ (function () {\n function Type(modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n this.modifiers = modifiers;\n if (!modifiers) {\n this.modifiers = [];\n }\n }\n Type.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };\n return Type;\n}());\nvar BuiltinTypeName;\n(function (BuiltinTypeName) {\n BuiltinTypeName[BuiltinTypeName[\"Dynamic\"] = 0] = \"Dynamic\";\n BuiltinTypeName[BuiltinTypeName[\"Bool\"] = 1] = \"Bool\";\n BuiltinTypeName[BuiltinTypeName[\"String\"] = 2] = \"String\";\n BuiltinTypeName[BuiltinTypeName[\"Int\"] = 3] = \"Int\";\n BuiltinTypeName[BuiltinTypeName[\"Number\"] = 4] = \"Number\";\n BuiltinTypeName[BuiltinTypeName[\"Function\"] = 5] = \"Function\";\n BuiltinTypeName[BuiltinTypeName[\"Inferred\"] = 6] = \"Inferred\";\n})(BuiltinTypeName || (BuiltinTypeName = {}));\nvar BuiltinType = /** @class */ (function (_super) {\n __extends(BuiltinType, _super);\n function BuiltinType(name, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.name = name;\n return _this;\n }\n BuiltinType.prototype.visitType = function (visitor, context) {\n return visitor.visitBuiltinType(this, context);\n };\n return BuiltinType;\n}(Type$1));\nvar ExpressionType = /** @class */ (function (_super) {\n __extends(ExpressionType, _super);\n function ExpressionType(value, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.value = value;\n return _this;\n }\n ExpressionType.prototype.visitType = function (visitor, context) {\n return visitor.visitExpressionType(this, context);\n };\n return ExpressionType;\n}(Type$1));\nvar ArrayType = /** @class */ (function (_super) {\n __extends(ArrayType, _super);\n function ArrayType(of, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.of = of;\n return _this;\n }\n ArrayType.prototype.visitType = function (visitor, context) {\n return visitor.visitArrayType(this, context);\n };\n return ArrayType;\n}(Type$1));\nvar MapType = /** @class */ (function (_super) {\n __extends(MapType, _super);\n function MapType(valueType, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers) || this;\n _this.valueType = valueType || null;\n return _this;\n }\n MapType.prototype.visitType = function (visitor, context) { return visitor.visitMapType(this, context); };\n return MapType;\n}(Type$1));\nvar DYNAMIC_TYPE = new BuiltinType(BuiltinTypeName.Dynamic);\nvar INFERRED_TYPE = new BuiltinType(BuiltinTypeName.Inferred);\nvar BOOL_TYPE = new BuiltinType(BuiltinTypeName.Bool);\nvar INT_TYPE = new BuiltinType(BuiltinTypeName.Int);\nvar NUMBER_TYPE = new BuiltinType(BuiltinTypeName.Number);\nvar STRING_TYPE = new BuiltinType(BuiltinTypeName.String);\nvar FUNCTION_TYPE = new BuiltinType(BuiltinTypeName.Function);\n///// Expressions\nvar BinaryOperator;\n(function (BinaryOperator) {\n BinaryOperator[BinaryOperator[\"Equals\"] = 0] = \"Equals\";\n BinaryOperator[BinaryOperator[\"NotEquals\"] = 1] = \"NotEquals\";\n BinaryOperator[BinaryOperator[\"Identical\"] = 2] = \"Identical\";\n BinaryOperator[BinaryOperator[\"NotIdentical\"] = 3] = \"NotIdentical\";\n BinaryOperator[BinaryOperator[\"Minus\"] = 4] = \"Minus\";\n BinaryOperator[BinaryOperator[\"Plus\"] = 5] = \"Plus\";\n BinaryOperator[BinaryOperator[\"Divide\"] = 6] = \"Divide\";\n BinaryOperator[BinaryOperator[\"Multiply\"] = 7] = \"Multiply\";\n BinaryOperator[BinaryOperator[\"Modulo\"] = 8] = \"Modulo\";\n BinaryOperator[BinaryOperator[\"And\"] = 9] = \"And\";\n BinaryOperator[BinaryOperator[\"Or\"] = 10] = \"Or\";\n BinaryOperator[BinaryOperator[\"BitwiseAnd\"] = 11] = \"BitwiseAnd\";\n BinaryOperator[BinaryOperator[\"Lower\"] = 12] = \"Lower\";\n BinaryOperator[BinaryOperator[\"LowerEquals\"] = 13] = \"LowerEquals\";\n BinaryOperator[BinaryOperator[\"Bigger\"] = 14] = \"Bigger\";\n BinaryOperator[BinaryOperator[\"BiggerEquals\"] = 15] = \"BiggerEquals\";\n})(BinaryOperator || (BinaryOperator = {}));\nfunction nullSafeIsEquivalent(base, other) {\n if (base == null || other == null) {\n return base == other;\n }\n return base.isEquivalent(other);\n}\nfunction areAllEquivalent(base, other) {\n var len = base.length;\n if (len !== other.length) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n if (!base[i].isEquivalent(other[i])) {\n return false;\n }\n }\n return true;\n}\nvar Expression = /** @class */ (function () {\n function Expression(type, sourceSpan) {\n this.type = type || null;\n this.sourceSpan = sourceSpan || null;\n }\n Expression.prototype.prop = function (name, sourceSpan) {\n return new ReadPropExpr(this, name, null, sourceSpan);\n };\n Expression.prototype.key = function (index, type, sourceSpan) {\n return new ReadKeyExpr(this, index, type, sourceSpan);\n };\n Expression.prototype.callMethod = function (name, params, sourceSpan) {\n return new InvokeMethodExpr(this, name, params, null, sourceSpan);\n };\n Expression.prototype.callFn = function (params, sourceSpan) {\n return new InvokeFunctionExpr(this, params, null, sourceSpan);\n };\n Expression.prototype.instantiate = function (params, type, sourceSpan) {\n return new InstantiateExpr(this, params, type, sourceSpan);\n };\n Expression.prototype.conditional = function (trueCase, falseCase, sourceSpan) {\n if (falseCase === void 0) { falseCase = null; }\n return new ConditionalExpr(this, trueCase, falseCase, null, sourceSpan);\n };\n Expression.prototype.equals = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Equals, this, rhs, null, sourceSpan);\n };\n Expression.prototype.notEquals = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotEquals, this, rhs, null, sourceSpan);\n };\n Expression.prototype.identical = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Identical, this, rhs, null, sourceSpan);\n };\n Expression.prototype.notIdentical = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.NotIdentical, this, rhs, null, sourceSpan);\n };\n Expression.prototype.minus = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Minus, this, rhs, null, sourceSpan);\n };\n Expression.prototype.plus = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Plus, this, rhs, null, sourceSpan);\n };\n Expression.prototype.divide = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Divide, this, rhs, null, sourceSpan);\n };\n Expression.prototype.multiply = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Multiply, this, rhs, null, sourceSpan);\n };\n Expression.prototype.modulo = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Modulo, this, rhs, null, sourceSpan);\n };\n Expression.prototype.and = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.And, this, rhs, null, sourceSpan);\n };\n Expression.prototype.bitwiseAnd = function (rhs, sourceSpan, parens) {\n if (parens === void 0) { parens = true; }\n return new BinaryOperatorExpr(BinaryOperator.BitwiseAnd, this, rhs, null, sourceSpan, parens);\n };\n Expression.prototype.or = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Or, this, rhs, null, sourceSpan);\n };\n Expression.prototype.lower = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Lower, this, rhs, null, sourceSpan);\n };\n Expression.prototype.lowerEquals = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.LowerEquals, this, rhs, null, sourceSpan);\n };\n Expression.prototype.bigger = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.Bigger, this, rhs, null, sourceSpan);\n };\n Expression.prototype.biggerEquals = function (rhs, sourceSpan) {\n return new BinaryOperatorExpr(BinaryOperator.BiggerEquals, this, rhs, null, sourceSpan);\n };\n Expression.prototype.isBlank = function (sourceSpan) {\n // Note: We use equals by purpose here to compare to null and undefined in JS.\n // We use the typed null to allow strictNullChecks to narrow types.\n return this.equals(TYPED_NULL_EXPR, sourceSpan);\n };\n Expression.prototype.cast = function (type, sourceSpan) {\n return new CastExpr(this, type, sourceSpan);\n };\n Expression.prototype.toStmt = function () { return new ExpressionStatement(this, null); };\n return Expression;\n}());\nvar BuiltinVar;\n(function (BuiltinVar) {\n BuiltinVar[BuiltinVar[\"This\"] = 0] = \"This\";\n BuiltinVar[BuiltinVar[\"Super\"] = 1] = \"Super\";\n BuiltinVar[BuiltinVar[\"CatchError\"] = 2] = \"CatchError\";\n BuiltinVar[BuiltinVar[\"CatchStack\"] = 3] = \"CatchStack\";\n})(BuiltinVar || (BuiltinVar = {}));\nvar ReadVarExpr = /** @class */ (function (_super) {\n __extends(ReadVarExpr, _super);\n function ReadVarExpr(name, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n if (typeof name === 'string') {\n _this.name = name;\n _this.builtin = null;\n }\n else {\n _this.name = null;\n _this.builtin = name;\n }\n return _this;\n }\n ReadVarExpr.prototype.isEquivalent = function (e) {\n return e instanceof ReadVarExpr && this.name === e.name && this.builtin === e.builtin;\n };\n ReadVarExpr.prototype.isConstant = function () { return false; };\n ReadVarExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitReadVarExpr(this, context);\n };\n ReadVarExpr.prototype.set = function (value) {\n if (!this.name) {\n throw new Error(\"Built in variable \" + this.builtin + \" can not be assigned to.\");\n }\n return new WriteVarExpr(this.name, value, null, this.sourceSpan);\n };\n return ReadVarExpr;\n}(Expression));\nvar WriteVarExpr = /** @class */ (function (_super) {\n __extends(WriteVarExpr, _super);\n function WriteVarExpr(name, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n WriteVarExpr.prototype.isEquivalent = function (e) {\n return e instanceof WriteVarExpr && this.name === e.name && this.value.isEquivalent(e.value);\n };\n WriteVarExpr.prototype.isConstant = function () { return false; };\n WriteVarExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitWriteVarExpr(this, context);\n };\n WriteVarExpr.prototype.toDeclStmt = function (type, modifiers) {\n return new DeclareVarStmt(this.name, this.value, type, modifiers, this.sourceSpan);\n };\n return WriteVarExpr;\n}(Expression));\nvar WriteKeyExpr = /** @class */ (function (_super) {\n __extends(WriteKeyExpr, _super);\n function WriteKeyExpr(receiver, index, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.index = index;\n _this.value = value;\n return _this;\n }\n WriteKeyExpr.prototype.isEquivalent = function (e) {\n return e instanceof WriteKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index) && this.value.isEquivalent(e.value);\n };\n WriteKeyExpr.prototype.isConstant = function () { return false; };\n WriteKeyExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitWriteKeyExpr(this, context);\n };\n return WriteKeyExpr;\n}(Expression));\nvar WritePropExpr = /** @class */ (function (_super) {\n __extends(WritePropExpr, _super);\n function WritePropExpr(receiver, name, value, type, sourceSpan) {\n var _this = _super.call(this, type || value.type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.name = name;\n _this.value = value;\n return _this;\n }\n WritePropExpr.prototype.isEquivalent = function (e) {\n return e instanceof WritePropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.value.isEquivalent(e.value);\n };\n WritePropExpr.prototype.isConstant = function () { return false; };\n WritePropExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitWritePropExpr(this, context);\n };\n return WritePropExpr;\n}(Expression));\nvar BuiltinMethod;\n(function (BuiltinMethod) {\n BuiltinMethod[BuiltinMethod[\"ConcatArray\"] = 0] = \"ConcatArray\";\n BuiltinMethod[BuiltinMethod[\"SubscribeObservable\"] = 1] = \"SubscribeObservable\";\n BuiltinMethod[BuiltinMethod[\"Bind\"] = 2] = \"Bind\";\n})(BuiltinMethod || (BuiltinMethod = {}));\nvar InvokeMethodExpr = /** @class */ (function (_super) {\n __extends(InvokeMethodExpr, _super);\n function InvokeMethodExpr(receiver, method, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.args = args;\n if (typeof method === 'string') {\n _this.name = method;\n _this.builtin = null;\n }\n else {\n _this.name = null;\n _this.builtin = method;\n }\n return _this;\n }\n InvokeMethodExpr.prototype.isEquivalent = function (e) {\n return e instanceof InvokeMethodExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name && this.builtin === e.builtin && areAllEquivalent(this.args, e.args);\n };\n InvokeMethodExpr.prototype.isConstant = function () { return false; };\n InvokeMethodExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitInvokeMethodExpr(this, context);\n };\n return InvokeMethodExpr;\n}(Expression));\nvar InvokeFunctionExpr = /** @class */ (function (_super) {\n __extends(InvokeFunctionExpr, _super);\n function InvokeFunctionExpr(fn, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.fn = fn;\n _this.args = args;\n return _this;\n }\n InvokeFunctionExpr.prototype.isEquivalent = function (e) {\n return e instanceof InvokeFunctionExpr && this.fn.isEquivalent(e.fn) &&\n areAllEquivalent(this.args, e.args);\n };\n InvokeFunctionExpr.prototype.isConstant = function () { return false; };\n InvokeFunctionExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitInvokeFunctionExpr(this, context);\n };\n return InvokeFunctionExpr;\n}(Expression));\nvar InstantiateExpr = /** @class */ (function (_super) {\n __extends(InstantiateExpr, _super);\n function InstantiateExpr(classExpr, args, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.classExpr = classExpr;\n _this.args = args;\n return _this;\n }\n InstantiateExpr.prototype.isEquivalent = function (e) {\n return e instanceof InstantiateExpr && this.classExpr.isEquivalent(e.classExpr) &&\n areAllEquivalent(this.args, e.args);\n };\n InstantiateExpr.prototype.isConstant = function () { return false; };\n InstantiateExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitInstantiateExpr(this, context);\n };\n return InstantiateExpr;\n}(Expression));\nvar LiteralExpr = /** @class */ (function (_super) {\n __extends(LiteralExpr, _super);\n function LiteralExpr(value, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n LiteralExpr.prototype.isEquivalent = function (e) {\n return e instanceof LiteralExpr && this.value === e.value;\n };\n LiteralExpr.prototype.isConstant = function () { return true; };\n LiteralExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitLiteralExpr(this, context);\n };\n return LiteralExpr;\n}(Expression));\nvar ExternalExpr = /** @class */ (function (_super) {\n __extends(ExternalExpr, _super);\n function ExternalExpr(value, type, typeParams, sourceSpan) {\n if (typeParams === void 0) { typeParams = null; }\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n _this.typeParams = typeParams;\n return _this;\n }\n ExternalExpr.prototype.isEquivalent = function (e) {\n return e instanceof ExternalExpr && this.value.name === e.value.name &&\n this.value.moduleName === e.value.moduleName && this.value.runtime === e.value.runtime;\n };\n ExternalExpr.prototype.isConstant = function () { return false; };\n ExternalExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitExternalExpr(this, context);\n };\n return ExternalExpr;\n}(Expression));\nvar ExternalReference = /** @class */ (function () {\n function ExternalReference(moduleName, name, runtime) {\n this.moduleName = moduleName;\n this.name = name;\n this.runtime = runtime;\n }\n return ExternalReference;\n}());\nvar ConditionalExpr = /** @class */ (function (_super) {\n __extends(ConditionalExpr, _super);\n function ConditionalExpr(condition, trueCase, falseCase, type, sourceSpan) {\n if (falseCase === void 0) { falseCase = null; }\n var _this = _super.call(this, type || trueCase.type, sourceSpan) || this;\n _this.condition = condition;\n _this.falseCase = falseCase;\n _this.trueCase = trueCase;\n return _this;\n }\n ConditionalExpr.prototype.isEquivalent = function (e) {\n return e instanceof ConditionalExpr && this.condition.isEquivalent(e.condition) &&\n this.trueCase.isEquivalent(e.trueCase) && nullSafeIsEquivalent(this.falseCase, e.falseCase);\n };\n ConditionalExpr.prototype.isConstant = function () { return false; };\n ConditionalExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitConditionalExpr(this, context);\n };\n return ConditionalExpr;\n}(Expression));\nvar NotExpr = /** @class */ (function (_super) {\n __extends(NotExpr, _super);\n function NotExpr(condition, sourceSpan) {\n var _this = _super.call(this, BOOL_TYPE, sourceSpan) || this;\n _this.condition = condition;\n return _this;\n }\n NotExpr.prototype.isEquivalent = function (e) {\n return e instanceof NotExpr && this.condition.isEquivalent(e.condition);\n };\n NotExpr.prototype.isConstant = function () { return false; };\n NotExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitNotExpr(this, context);\n };\n return NotExpr;\n}(Expression));\nvar AssertNotNull = /** @class */ (function (_super) {\n __extends(AssertNotNull, _super);\n function AssertNotNull(condition, sourceSpan) {\n var _this = _super.call(this, condition.type, sourceSpan) || this;\n _this.condition = condition;\n return _this;\n }\n AssertNotNull.prototype.isEquivalent = function (e) {\n return e instanceof AssertNotNull && this.condition.isEquivalent(e.condition);\n };\n AssertNotNull.prototype.isConstant = function () { return false; };\n AssertNotNull.prototype.visitExpression = function (visitor, context) {\n return visitor.visitAssertNotNullExpr(this, context);\n };\n return AssertNotNull;\n}(Expression));\nvar CastExpr = /** @class */ (function (_super) {\n __extends(CastExpr, _super);\n function CastExpr(value, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n CastExpr.prototype.isEquivalent = function (e) {\n return e instanceof CastExpr && this.value.isEquivalent(e.value);\n };\n CastExpr.prototype.isConstant = function () { return false; };\n CastExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitCastExpr(this, context);\n };\n return CastExpr;\n}(Expression));\nvar FnParam = /** @class */ (function () {\n function FnParam(name, type) {\n if (type === void 0) { type = null; }\n this.name = name;\n this.type = type;\n }\n FnParam.prototype.isEquivalent = function (param) { return this.name === param.name; };\n return FnParam;\n}());\nvar FunctionExpr = /** @class */ (function (_super) {\n __extends(FunctionExpr, _super);\n function FunctionExpr(params, statements, type, sourceSpan, name) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.params = params;\n _this.statements = statements;\n _this.name = name;\n return _this;\n }\n FunctionExpr.prototype.isEquivalent = function (e) {\n return e instanceof FunctionExpr && areAllEquivalent(this.params, e.params) &&\n areAllEquivalent(this.statements, e.statements);\n };\n FunctionExpr.prototype.isConstant = function () { return false; };\n FunctionExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitFunctionExpr(this, context);\n };\n FunctionExpr.prototype.toDeclStmt = function (name, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n return new DeclareFunctionStmt(name, this.params, this.statements, this.type, modifiers, this.sourceSpan);\n };\n return FunctionExpr;\n}(Expression));\nvar BinaryOperatorExpr = /** @class */ (function (_super) {\n __extends(BinaryOperatorExpr, _super);\n function BinaryOperatorExpr(operator, lhs, rhs, type, sourceSpan, parens) {\n if (parens === void 0) { parens = true; }\n var _this = _super.call(this, type || lhs.type, sourceSpan) || this;\n _this.operator = operator;\n _this.rhs = rhs;\n _this.parens = parens;\n _this.lhs = lhs;\n return _this;\n }\n BinaryOperatorExpr.prototype.isEquivalent = function (e) {\n return e instanceof BinaryOperatorExpr && this.operator === e.operator &&\n this.lhs.isEquivalent(e.lhs) && this.rhs.isEquivalent(e.rhs);\n };\n BinaryOperatorExpr.prototype.isConstant = function () { return false; };\n BinaryOperatorExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitBinaryOperatorExpr(this, context);\n };\n return BinaryOperatorExpr;\n}(Expression));\nvar ReadPropExpr = /** @class */ (function (_super) {\n __extends(ReadPropExpr, _super);\n function ReadPropExpr(receiver, name, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.name = name;\n return _this;\n }\n ReadPropExpr.prototype.isEquivalent = function (e) {\n return e instanceof ReadPropExpr && this.receiver.isEquivalent(e.receiver) &&\n this.name === e.name;\n };\n ReadPropExpr.prototype.isConstant = function () { return false; };\n ReadPropExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitReadPropExpr(this, context);\n };\n ReadPropExpr.prototype.set = function (value) {\n return new WritePropExpr(this.receiver, this.name, value, null, this.sourceSpan);\n };\n return ReadPropExpr;\n}(Expression));\nvar ReadKeyExpr = /** @class */ (function (_super) {\n __extends(ReadKeyExpr, _super);\n function ReadKeyExpr(receiver, index, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.receiver = receiver;\n _this.index = index;\n return _this;\n }\n ReadKeyExpr.prototype.isEquivalent = function (e) {\n return e instanceof ReadKeyExpr && this.receiver.isEquivalent(e.receiver) &&\n this.index.isEquivalent(e.index);\n };\n ReadKeyExpr.prototype.isConstant = function () { return false; };\n ReadKeyExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitReadKeyExpr(this, context);\n };\n ReadKeyExpr.prototype.set = function (value) {\n return new WriteKeyExpr(this.receiver, this.index, value, null, this.sourceSpan);\n };\n return ReadKeyExpr;\n}(Expression));\nvar LiteralArrayExpr = /** @class */ (function (_super) {\n __extends(LiteralArrayExpr, _super);\n function LiteralArrayExpr(entries, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.entries = entries;\n return _this;\n }\n LiteralArrayExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.isConstant(); }); };\n LiteralArrayExpr.prototype.isEquivalent = function (e) {\n return e instanceof LiteralArrayExpr && areAllEquivalent(this.entries, e.entries);\n };\n LiteralArrayExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitLiteralArrayExpr(this, context);\n };\n return LiteralArrayExpr;\n}(Expression));\nvar LiteralMapEntry = /** @class */ (function () {\n function LiteralMapEntry(key, value, quoted) {\n this.key = key;\n this.value = value;\n this.quoted = quoted;\n }\n LiteralMapEntry.prototype.isEquivalent = function (e) {\n return this.key === e.key && this.value.isEquivalent(e.value);\n };\n return LiteralMapEntry;\n}());\nvar LiteralMapExpr = /** @class */ (function (_super) {\n __extends(LiteralMapExpr, _super);\n function LiteralMapExpr(entries, type, sourceSpan) {\n var _this = _super.call(this, type, sourceSpan) || this;\n _this.entries = entries;\n _this.valueType = null;\n if (type) {\n _this.valueType = type.valueType;\n }\n return _this;\n }\n LiteralMapExpr.prototype.isEquivalent = function (e) {\n return e instanceof LiteralMapExpr && areAllEquivalent(this.entries, e.entries);\n };\n LiteralMapExpr.prototype.isConstant = function () { return this.entries.every(function (e) { return e.value.isConstant(); }); };\n LiteralMapExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitLiteralMapExpr(this, context);\n };\n return LiteralMapExpr;\n}(Expression));\nvar CommaExpr = /** @class */ (function (_super) {\n __extends(CommaExpr, _super);\n function CommaExpr(parts, sourceSpan) {\n var _this = _super.call(this, parts[parts.length - 1].type, sourceSpan) || this;\n _this.parts = parts;\n return _this;\n }\n CommaExpr.prototype.isEquivalent = function (e) {\n return e instanceof CommaExpr && areAllEquivalent(this.parts, e.parts);\n };\n CommaExpr.prototype.isConstant = function () { return false; };\n CommaExpr.prototype.visitExpression = function (visitor, context) {\n return visitor.visitCommaExpr(this, context);\n };\n return CommaExpr;\n}(Expression));\nvar THIS_EXPR = new ReadVarExpr(BuiltinVar.This, null, null);\nvar SUPER_EXPR = new ReadVarExpr(BuiltinVar.Super, null, null);\nvar CATCH_ERROR_VAR = new ReadVarExpr(BuiltinVar.CatchError, null, null);\nvar CATCH_STACK_VAR = new ReadVarExpr(BuiltinVar.CatchStack, null, null);\nvar NULL_EXPR = new LiteralExpr(null, null, null);\nvar TYPED_NULL_EXPR = new LiteralExpr(null, INFERRED_TYPE, null);\n//// Statements\nvar StmtModifier;\n(function (StmtModifier) {\n StmtModifier[StmtModifier[\"Final\"] = 0] = \"Final\";\n StmtModifier[StmtModifier[\"Private\"] = 1] = \"Private\";\n StmtModifier[StmtModifier[\"Exported\"] = 2] = \"Exported\";\n StmtModifier[StmtModifier[\"Static\"] = 3] = \"Static\";\n})(StmtModifier || (StmtModifier = {}));\nvar Statement = /** @class */ (function () {\n function Statement(modifiers, sourceSpan) {\n this.modifiers = modifiers || [];\n this.sourceSpan = sourceSpan || null;\n }\n Statement.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };\n return Statement;\n}());\nvar DeclareVarStmt = /** @class */ (function (_super) {\n __extends(DeclareVarStmt, _super);\n function DeclareVarStmt(name, value, type, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.value = value;\n _this.type = type || (value && value.type) || null;\n return _this;\n }\n DeclareVarStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof DeclareVarStmt && this.name === stmt.name &&\n (this.value ? !!stmt.value && this.value.isEquivalent(stmt.value) : !stmt.value);\n };\n DeclareVarStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitDeclareVarStmt(this, context);\n };\n return DeclareVarStmt;\n}(Statement));\nvar DeclareFunctionStmt = /** @class */ (function (_super) {\n __extends(DeclareFunctionStmt, _super);\n function DeclareFunctionStmt(name, params, statements, type, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.params = params;\n _this.statements = statements;\n _this.type = type || null;\n return _this;\n }\n DeclareFunctionStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof DeclareFunctionStmt && areAllEquivalent(this.params, stmt.params) &&\n areAllEquivalent(this.statements, stmt.statements);\n };\n DeclareFunctionStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitDeclareFunctionStmt(this, context);\n };\n return DeclareFunctionStmt;\n}(Statement));\nvar ExpressionStatement = /** @class */ (function (_super) {\n __extends(ExpressionStatement, _super);\n function ExpressionStatement(expr, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.expr = expr;\n return _this;\n }\n ExpressionStatement.prototype.isEquivalent = function (stmt) {\n return stmt instanceof ExpressionStatement && this.expr.isEquivalent(stmt.expr);\n };\n ExpressionStatement.prototype.visitStatement = function (visitor, context) {\n return visitor.visitExpressionStmt(this, context);\n };\n return ExpressionStatement;\n}(Statement));\nvar ReturnStatement = /** @class */ (function (_super) {\n __extends(ReturnStatement, _super);\n function ReturnStatement(value, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.value = value;\n return _this;\n }\n ReturnStatement.prototype.isEquivalent = function (stmt) {\n return stmt instanceof ReturnStatement && this.value.isEquivalent(stmt.value);\n };\n ReturnStatement.prototype.visitStatement = function (visitor, context) {\n return visitor.visitReturnStmt(this, context);\n };\n return ReturnStatement;\n}(Statement));\nvar AbstractClassPart = /** @class */ (function () {\n function AbstractClassPart(type, modifiers) {\n this.modifiers = modifiers;\n if (!modifiers) {\n this.modifiers = [];\n }\n this.type = type || null;\n }\n AbstractClassPart.prototype.hasModifier = function (modifier) { return this.modifiers.indexOf(modifier) !== -1; };\n return AbstractClassPart;\n}());\nvar ClassField = /** @class */ (function (_super) {\n __extends(ClassField, _super);\n function ClassField(name, type, modifiers, initializer) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n _this.initializer = initializer;\n return _this;\n }\n ClassField.prototype.isEquivalent = function (f) { return this.name === f.name; };\n return ClassField;\n}(AbstractClassPart));\nvar ClassMethod = /** @class */ (function (_super) {\n __extends(ClassMethod, _super);\n function ClassMethod(name, params, body, type, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n _this.params = params;\n _this.body = body;\n return _this;\n }\n ClassMethod.prototype.isEquivalent = function (m) {\n return this.name === m.name && areAllEquivalent(this.body, m.body);\n };\n return ClassMethod;\n}(AbstractClassPart));\nvar ClassGetter = /** @class */ (function (_super) {\n __extends(ClassGetter, _super);\n function ClassGetter(name, body, type, modifiers) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, type, modifiers) || this;\n _this.name = name;\n _this.body = body;\n return _this;\n }\n ClassGetter.prototype.isEquivalent = function (m) {\n return this.name === m.name && areAllEquivalent(this.body, m.body);\n };\n return ClassGetter;\n}(AbstractClassPart));\nvar ClassStmt = /** @class */ (function (_super) {\n __extends(ClassStmt, _super);\n function ClassStmt(name, parent, fields, getters, constructorMethod, methods, modifiers, sourceSpan) {\n if (modifiers === void 0) { modifiers = null; }\n var _this = _super.call(this, modifiers, sourceSpan) || this;\n _this.name = name;\n _this.parent = parent;\n _this.fields = fields;\n _this.getters = getters;\n _this.constructorMethod = constructorMethod;\n _this.methods = methods;\n return _this;\n }\n ClassStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof ClassStmt && this.name === stmt.name &&\n nullSafeIsEquivalent(this.parent, stmt.parent) &&\n areAllEquivalent(this.fields, stmt.fields) &&\n areAllEquivalent(this.getters, stmt.getters) &&\n this.constructorMethod.isEquivalent(stmt.constructorMethod) &&\n areAllEquivalent(this.methods, stmt.methods);\n };\n ClassStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitDeclareClassStmt(this, context);\n };\n return ClassStmt;\n}(Statement));\nvar IfStmt = /** @class */ (function (_super) {\n __extends(IfStmt, _super);\n function IfStmt(condition, trueCase, falseCase, sourceSpan) {\n if (falseCase === void 0) { falseCase = []; }\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.condition = condition;\n _this.trueCase = trueCase;\n _this.falseCase = falseCase;\n return _this;\n }\n IfStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof IfStmt && this.condition.isEquivalent(stmt.condition) &&\n areAllEquivalent(this.trueCase, stmt.trueCase) &&\n areAllEquivalent(this.falseCase, stmt.falseCase);\n };\n IfStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitIfStmt(this, context);\n };\n return IfStmt;\n}(Statement));\nvar CommentStmt = /** @class */ (function (_super) {\n __extends(CommentStmt, _super);\n function CommentStmt(comment, multiline, sourceSpan) {\n if (multiline === void 0) { multiline = false; }\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.comment = comment;\n _this.multiline = multiline;\n return _this;\n }\n CommentStmt.prototype.isEquivalent = function (stmt) { return stmt instanceof CommentStmt; };\n CommentStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitCommentStmt(this, context);\n };\n return CommentStmt;\n}(Statement));\nvar JSDocCommentStmt = /** @class */ (function (_super) {\n __extends(JSDocCommentStmt, _super);\n function JSDocCommentStmt(tags, sourceSpan) {\n if (tags === void 0) { tags = []; }\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.tags = tags;\n return _this;\n }\n JSDocCommentStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof JSDocCommentStmt && this.toString() === stmt.toString();\n };\n JSDocCommentStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitJSDocCommentStmt(this, context);\n };\n JSDocCommentStmt.prototype.toString = function () { return serializeTags(this.tags); };\n return JSDocCommentStmt;\n}(Statement));\nvar TryCatchStmt = /** @class */ (function (_super) {\n __extends(TryCatchStmt, _super);\n function TryCatchStmt(bodyStmts, catchStmts, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.bodyStmts = bodyStmts;\n _this.catchStmts = catchStmts;\n return _this;\n }\n TryCatchStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof TryCatchStmt && areAllEquivalent(this.bodyStmts, stmt.bodyStmts) &&\n areAllEquivalent(this.catchStmts, stmt.catchStmts);\n };\n TryCatchStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitTryCatchStmt(this, context);\n };\n return TryCatchStmt;\n}(Statement));\nvar ThrowStmt = /** @class */ (function (_super) {\n __extends(ThrowStmt, _super);\n function ThrowStmt(error, sourceSpan) {\n var _this = _super.call(this, null, sourceSpan) || this;\n _this.error = error;\n return _this;\n }\n ThrowStmt.prototype.isEquivalent = function (stmt) {\n return stmt instanceof TryCatchStmt && this.error.isEquivalent(stmt.error);\n };\n ThrowStmt.prototype.visitStatement = function (visitor, context) {\n return visitor.visitThrowStmt(this, context);\n };\n return ThrowStmt;\n}(Statement));\nvar AstTransformer$1 = /** @class */ (function () {\n function AstTransformer() {\n }\n AstTransformer.prototype.transformExpr = function (expr, context) { return expr; };\n AstTransformer.prototype.transformStmt = function (stmt, context) { return stmt; };\n AstTransformer.prototype.visitReadVarExpr = function (ast, context) { return this.transformExpr(ast, context); };\n AstTransformer.prototype.visitWriteVarExpr = function (expr, context) {\n return this.transformExpr(new WriteVarExpr(expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n AstTransformer.prototype.visitWriteKeyExpr = function (expr, context) {\n return this.transformExpr(new WriteKeyExpr(expr.receiver.visitExpression(this, context), expr.index.visitExpression(this, context), expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n AstTransformer.prototype.visitWritePropExpr = function (expr, context) {\n return this.transformExpr(new WritePropExpr(expr.receiver.visitExpression(this, context), expr.name, expr.value.visitExpression(this, context), expr.type, expr.sourceSpan), context);\n };\n AstTransformer.prototype.visitInvokeMethodExpr = function (ast, context) {\n var method = ast.builtin || ast.name;\n return this.transformExpr(new InvokeMethodExpr(ast.receiver.visitExpression(this, context), method, this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitInvokeFunctionExpr = function (ast, context) {\n return this.transformExpr(new InvokeFunctionExpr(ast.fn.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitInstantiateExpr = function (ast, context) {\n return this.transformExpr(new InstantiateExpr(ast.classExpr.visitExpression(this, context), this.visitAllExpressions(ast.args, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitLiteralExpr = function (ast, context) { return this.transformExpr(ast, context); };\n AstTransformer.prototype.visitExternalExpr = function (ast, context) {\n return this.transformExpr(ast, context);\n };\n AstTransformer.prototype.visitConditionalExpr = function (ast, context) {\n return this.transformExpr(new ConditionalExpr(ast.condition.visitExpression(this, context), ast.trueCase.visitExpression(this, context), ast.falseCase.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitNotExpr = function (ast, context) {\n return this.transformExpr(new NotExpr(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitAssertNotNullExpr = function (ast, context) {\n return this.transformExpr(new AssertNotNull(ast.condition.visitExpression(this, context), ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitCastExpr = function (ast, context) {\n return this.transformExpr(new CastExpr(ast.value.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitFunctionExpr = function (ast, context) {\n return this.transformExpr(new FunctionExpr(ast.params, this.visitAllStatements(ast.statements, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitBinaryOperatorExpr = function (ast, context) {\n return this.transformExpr(new BinaryOperatorExpr(ast.operator, ast.lhs.visitExpression(this, context), ast.rhs.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitReadPropExpr = function (ast, context) {\n return this.transformExpr(new ReadPropExpr(ast.receiver.visitExpression(this, context), ast.name, ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitReadKeyExpr = function (ast, context) {\n return this.transformExpr(new ReadKeyExpr(ast.receiver.visitExpression(this, context), ast.index.visitExpression(this, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitLiteralArrayExpr = function (ast, context) {\n return this.transformExpr(new LiteralArrayExpr(this.visitAllExpressions(ast.entries, context), ast.type, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitLiteralMapExpr = function (ast, context) {\n var _this = this;\n var entries = ast.entries.map(function (entry) { return new LiteralMapEntry(entry.key, entry.value.visitExpression(_this, context), entry.quoted); });\n var mapType = new MapType(ast.valueType, null);\n return this.transformExpr(new LiteralMapExpr(entries, mapType, ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitCommaExpr = function (ast, context) {\n return this.transformExpr(new CommaExpr(this.visitAllExpressions(ast.parts, context), ast.sourceSpan), context);\n };\n AstTransformer.prototype.visitAllExpressions = function (exprs, context) {\n var _this = this;\n return exprs.map(function (expr) { return expr.visitExpression(_this, context); });\n };\n AstTransformer.prototype.visitDeclareVarStmt = function (stmt, context) {\n var value = stmt.value && stmt.value.visitExpression(this, context);\n return this.transformStmt(new DeclareVarStmt(stmt.name, value, stmt.type, stmt.modifiers, stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitDeclareFunctionStmt = function (stmt, context) {\n return this.transformStmt(new DeclareFunctionStmt(stmt.name, stmt.params, this.visitAllStatements(stmt.statements, context), stmt.type, stmt.modifiers, stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitExpressionStmt = function (stmt, context) {\n return this.transformStmt(new ExpressionStatement(stmt.expr.visitExpression(this, context), stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitReturnStmt = function (stmt, context) {\n return this.transformStmt(new ReturnStatement(stmt.value.visitExpression(this, context), stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitDeclareClassStmt = function (stmt, context) {\n var _this = this;\n var parent = stmt.parent.visitExpression(this, context);\n var getters = stmt.getters.map(function (getter) { return new ClassGetter(getter.name, _this.visitAllStatements(getter.body, context), getter.type, getter.modifiers); });\n var ctorMethod = stmt.constructorMethod &&\n new ClassMethod(stmt.constructorMethod.name, stmt.constructorMethod.params, this.visitAllStatements(stmt.constructorMethod.body, context), stmt.constructorMethod.type, stmt.constructorMethod.modifiers);\n var methods = stmt.methods.map(function (method) { return new ClassMethod(method.name, method.params, _this.visitAllStatements(method.body, context), method.type, method.modifiers); });\n return this.transformStmt(new ClassStmt(stmt.name, parent, stmt.fields, getters, ctorMethod, methods, stmt.modifiers, stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitIfStmt = function (stmt, context) {\n return this.transformStmt(new IfStmt(stmt.condition.visitExpression(this, context), this.visitAllStatements(stmt.trueCase, context), this.visitAllStatements(stmt.falseCase, context), stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitTryCatchStmt = function (stmt, context) {\n return this.transformStmt(new TryCatchStmt(this.visitAllStatements(stmt.bodyStmts, context), this.visitAllStatements(stmt.catchStmts, context), stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitThrowStmt = function (stmt, context) {\n return this.transformStmt(new ThrowStmt(stmt.error.visitExpression(this, context), stmt.sourceSpan), context);\n };\n AstTransformer.prototype.visitCommentStmt = function (stmt, context) {\n return this.transformStmt(stmt, context);\n };\n AstTransformer.prototype.visitJSDocCommentStmt = function (stmt, context) {\n return this.transformStmt(stmt, context);\n };\n AstTransformer.prototype.visitAllStatements = function (stmts, context) {\n var _this = this;\n return stmts.map(function (stmt) { return stmt.visitStatement(_this, context); });\n };\n return AstTransformer;\n}());\nvar RecursiveAstVisitor$1 = /** @class */ (function () {\n function RecursiveAstVisitor() {\n }\n RecursiveAstVisitor.prototype.visitType = function (ast, context) { return ast; };\n RecursiveAstVisitor.prototype.visitExpression = function (ast, context) {\n if (ast.type) {\n ast.type.visitType(this, context);\n }\n return ast;\n };\n RecursiveAstVisitor.prototype.visitBuiltinType = function (type, context) { return this.visitType(type, context); };\n RecursiveAstVisitor.prototype.visitExpressionType = function (type, context) {\n type.value.visitExpression(this, context);\n return this.visitType(type, context);\n };\n RecursiveAstVisitor.prototype.visitArrayType = function (type, context) { return this.visitType(type, context); };\n RecursiveAstVisitor.prototype.visitMapType = function (type, context) { return this.visitType(type, context); };\n RecursiveAstVisitor.prototype.visitReadVarExpr = function (ast, context) {\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitWriteVarExpr = function (ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitWriteKeyExpr = function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitWritePropExpr = function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitInvokeMethodExpr = function (ast, context) {\n ast.receiver.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitInvokeFunctionExpr = function (ast, context) {\n ast.fn.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitInstantiateExpr = function (ast, context) {\n ast.classExpr.visitExpression(this, context);\n this.visitAllExpressions(ast.args, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitLiteralExpr = function (ast, context) {\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitExternalExpr = function (ast, context) {\n var _this = this;\n if (ast.typeParams) {\n ast.typeParams.forEach(function (type) { return type.visitType(_this, context); });\n }\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitConditionalExpr = function (ast, context) {\n ast.condition.visitExpression(this, context);\n ast.trueCase.visitExpression(this, context);\n ast.falseCase.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitNotExpr = function (ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitAssertNotNullExpr = function (ast, context) {\n ast.condition.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitCastExpr = function (ast, context) {\n ast.value.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitFunctionExpr = function (ast, context) {\n this.visitAllStatements(ast.statements, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitBinaryOperatorExpr = function (ast, context) {\n ast.lhs.visitExpression(this, context);\n ast.rhs.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitReadPropExpr = function (ast, context) {\n ast.receiver.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitReadKeyExpr = function (ast, context) {\n ast.receiver.visitExpression(this, context);\n ast.index.visitExpression(this, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {\n this.visitAllExpressions(ast.entries, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitLiteralMapExpr = function (ast, context) {\n var _this = this;\n ast.entries.forEach(function (entry) { return entry.value.visitExpression(_this, context); });\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitCommaExpr = function (ast, context) {\n this.visitAllExpressions(ast.parts, context);\n return this.visitExpression(ast, context);\n };\n RecursiveAstVisitor.prototype.visitAllExpressions = function (exprs, context) {\n var _this = this;\n exprs.forEach(function (expr) { return expr.visitExpression(_this, context); });\n };\n RecursiveAstVisitor.prototype.visitDeclareVarStmt = function (stmt, context) {\n if (stmt.value) {\n stmt.value.visitExpression(this, context);\n }\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {\n this.visitAllStatements(stmt.statements, context);\n if (stmt.type) {\n stmt.type.visitType(this, context);\n }\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitExpressionStmt = function (stmt, context) {\n stmt.expr.visitExpression(this, context);\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitReturnStmt = function (stmt, context) {\n stmt.value.visitExpression(this, context);\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {\n var _this = this;\n stmt.parent.visitExpression(this, context);\n stmt.getters.forEach(function (getter) { return _this.visitAllStatements(getter.body, context); });\n if (stmt.constructorMethod) {\n this.visitAllStatements(stmt.constructorMethod.body, context);\n }\n stmt.methods.forEach(function (method) { return _this.visitAllStatements(method.body, context); });\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitIfStmt = function (stmt, context) {\n stmt.condition.visitExpression(this, context);\n this.visitAllStatements(stmt.trueCase, context);\n this.visitAllStatements(stmt.falseCase, context);\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitTryCatchStmt = function (stmt, context) {\n this.visitAllStatements(stmt.bodyStmts, context);\n this.visitAllStatements(stmt.catchStmts, context);\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitThrowStmt = function (stmt, context) {\n stmt.error.visitExpression(this, context);\n return stmt;\n };\n RecursiveAstVisitor.prototype.visitCommentStmt = function (stmt, context) { return stmt; };\n RecursiveAstVisitor.prototype.visitJSDocCommentStmt = function (stmt, context) { return stmt; };\n RecursiveAstVisitor.prototype.visitAllStatements = function (stmts, context) {\n var _this = this;\n stmts.forEach(function (stmt) { return stmt.visitStatement(_this, context); });\n };\n return RecursiveAstVisitor;\n}());\nfunction findReadVarNames(stmts) {\n var visitor = new _ReadVarVisitor();\n visitor.visitAllStatements(stmts, null);\n return visitor.varNames;\n}\nvar _ReadVarVisitor = /** @class */ (function (_super) {\n __extends(_ReadVarVisitor, _super);\n function _ReadVarVisitor() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.varNames = new Set();\n return _this;\n }\n _ReadVarVisitor.prototype.visitDeclareFunctionStmt = function (stmt, context) {\n // Don't descend into nested functions\n return stmt;\n };\n _ReadVarVisitor.prototype.visitDeclareClassStmt = function (stmt, context) {\n // Don't descend into nested classes\n return stmt;\n };\n _ReadVarVisitor.prototype.visitReadVarExpr = function (ast, context) {\n if (ast.name) {\n this.varNames.add(ast.name);\n }\n return null;\n };\n return _ReadVarVisitor;\n}(RecursiveAstVisitor$1));\nfunction collectExternalReferences(stmts) {\n var visitor = new _FindExternalReferencesVisitor();\n visitor.visitAllStatements(stmts, null);\n return visitor.externalReferences;\n}\nvar _FindExternalReferencesVisitor = /** @class */ (function (_super) {\n __extends(_FindExternalReferencesVisitor, _super);\n function _FindExternalReferencesVisitor() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.externalReferences = [];\n return _this;\n }\n _FindExternalReferencesVisitor.prototype.visitExternalExpr = function (e, context) {\n this.externalReferences.push(e.value);\n return _super.prototype.visitExternalExpr.call(this, e, context);\n };\n return _FindExternalReferencesVisitor;\n}(RecursiveAstVisitor$1));\nfunction applySourceSpanToStatementIfNeeded(stmt, sourceSpan) {\n if (!sourceSpan) {\n return stmt;\n }\n var transformer = new _ApplySourceSpanTransformer(sourceSpan);\n return stmt.visitStatement(transformer, null);\n}\nfunction applySourceSpanToExpressionIfNeeded(expr, sourceSpan) {\n if (!sourceSpan) {\n return expr;\n }\n var transformer = new _ApplySourceSpanTransformer(sourceSpan);\n return expr.visitExpression(transformer, null);\n}\nvar _ApplySourceSpanTransformer = /** @class */ (function (_super) {\n __extends(_ApplySourceSpanTransformer, _super);\n function _ApplySourceSpanTransformer(sourceSpan) {\n var _this = _super.call(this) || this;\n _this.sourceSpan = sourceSpan;\n return _this;\n }\n _ApplySourceSpanTransformer.prototype._clone = function (obj) {\n var clone = Object.create(obj.constructor.prototype);\n for (var prop in obj) {\n clone[prop] = obj[prop];\n }\n return clone;\n };\n _ApplySourceSpanTransformer.prototype.transformExpr = function (expr, context) {\n if (!expr.sourceSpan) {\n expr = this._clone(expr);\n expr.sourceSpan = this.sourceSpan;\n }\n return expr;\n };\n _ApplySourceSpanTransformer.prototype.transformStmt = function (stmt, context) {\n if (!stmt.sourceSpan) {\n stmt = this._clone(stmt);\n stmt.sourceSpan = this.sourceSpan;\n }\n return stmt;\n };\n return _ApplySourceSpanTransformer;\n}(AstTransformer$1));\nfunction variable(name, type, sourceSpan) {\n return new ReadVarExpr(name, type, sourceSpan);\n}\nfunction importExpr(id, typeParams, sourceSpan) {\n if (typeParams === void 0) { typeParams = null; }\n return new ExternalExpr(id, null, typeParams, sourceSpan);\n}\nfunction importType(id, typeParams, typeModifiers) {\n if (typeParams === void 0) { typeParams = null; }\n if (typeModifiers === void 0) { typeModifiers = null; }\n return id != null ? expressionType(importExpr(id, typeParams, null), typeModifiers) : null;\n}\nfunction expressionType(expr, typeModifiers) {\n if (typeModifiers === void 0) { typeModifiers = null; }\n return new ExpressionType(expr, typeModifiers);\n}\nfunction literalArr(values, type, sourceSpan) {\n return new LiteralArrayExpr(values, type, sourceSpan);\n}\nfunction literalMap(values, type) {\n if (type === void 0) { type = null; }\n return new LiteralMapExpr(values.map(function (e) { return new LiteralMapEntry(e.key, e.value, e.quoted); }), type, null);\n}\nfunction not(expr, sourceSpan) {\n return new NotExpr(expr, sourceSpan);\n}\nfunction assertNotNull(expr, sourceSpan) {\n return new AssertNotNull(expr, sourceSpan);\n}\nfunction fn(params, body, type, sourceSpan, name) {\n return new FunctionExpr(params, body, type, sourceSpan, name);\n}\nfunction ifStmt(condition, thenClause, elseClause) {\n return new IfStmt(condition, thenClause, elseClause);\n}\nfunction literal(value, type, sourceSpan) {\n return new LiteralExpr(value, type, sourceSpan);\n}\nfunction isNull(exp) {\n return exp instanceof LiteralExpr && exp.value === null;\n}\n/*\n * Serializes a `Tag` into a string.\n * Returns a string like \" @foo {bar} baz\" (note the leading whitespace before `@foo`).\n */\nfunction tagToString(tag) {\n var out = '';\n if (tag.tagName) {\n out += \" @\" + tag.tagName;\n }\n if (tag.text) {\n if (tag.text.match(/\\/\\*|\\*\\//)) {\n throw new Error('JSDoc text cannot contain \"/*\" and \"*/\"');\n }\n out += ' ' + tag.text.replace(/@/g, '\\\\@');\n }\n return out;\n}\nfunction serializeTags(tags) {\n if (tags.length === 0)\n return '';\n var out = '*\\n';\n try {\n for (var tags_1 = __values(tags), tags_1_1 = tags_1.next(); !tags_1_1.done; tags_1_1 = tags_1.next()) {\n var tag = tags_1_1.value;\n out += ' *';\n // If the tagToString is multi-line, insert \" * \" prefixes on subsequent lines.\n out += tagToString(tag).replace(/\\n/g, '\\n * ');\n out += '\\n';\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (tags_1_1 && !tags_1_1.done && (_a = tags_1.return)) _a.call(tags_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n out += ' ';\n return out;\n var e_1, _a;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 QUOTED_KEYS = '$quoted$';\nfunction convertValueToOutputAst(ctx, value, type) {\n if (type === void 0) { type = null; }\n return visitValue(value, new _ValueOutputAstTransformer(ctx), type);\n}\nvar _ValueOutputAstTransformer = /** @class */ (function () {\n function _ValueOutputAstTransformer(ctx) {\n this.ctx = ctx;\n }\n _ValueOutputAstTransformer.prototype.visitArray = function (arr, type) {\n var _this = this;\n return literalArr(arr.map(function (value) { return visitValue(value, _this, null); }), type);\n };\n _ValueOutputAstTransformer.prototype.visitStringMap = function (map, type) {\n var _this = this;\n var entries = [];\n var quotedSet = new Set(map && map[QUOTED_KEYS]);\n Object.keys(map).forEach(function (key) {\n entries.push(new LiteralMapEntry(key, visitValue(map[key], _this, null), quotedSet.has(key)));\n });\n return new LiteralMapExpr(entries, type);\n };\n _ValueOutputAstTransformer.prototype.visitPrimitive = function (value, type) { return literal(value, type); };\n _ValueOutputAstTransformer.prototype.visitOther = function (value, type) {\n if (value instanceof Expression) {\n return value;\n }\n else {\n return this.ctx.importExpr(value);\n }\n };\n return _ValueOutputAstTransformer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 mapEntry(key, value) {\n return { key: key, value: value, quoted: false };\n}\nvar InjectableCompiler = /** @class */ (function () {\n function InjectableCompiler(reflector, alwaysGenerateDef) {\n this.reflector = reflector;\n this.alwaysGenerateDef = alwaysGenerateDef;\n this.tokenInjector = reflector.resolveExternalReference(Identifiers.Injector);\n }\n InjectableCompiler.prototype.depsArray = function (deps, ctx) {\n var _this = this;\n return deps.map(function (dep) {\n var token = dep;\n var args = [token];\n var flags = 0;\n if (Array.isArray(dep)) {\n for (var i = 0; i < dep.length; i++) {\n var v = dep[i];\n if (v) {\n if (v.ngMetadataName === 'Optional') {\n flags |= 8 /* Optional */;\n }\n else if (v.ngMetadataName === 'SkipSelf') {\n flags |= 4 /* SkipSelf */;\n }\n else if (v.ngMetadataName === 'Self') {\n flags |= 2 /* Self */;\n }\n else if (v.ngMetadataName === 'Inject') {\n token = v.token;\n }\n else {\n token = v;\n }\n }\n }\n }\n var tokenExpr;\n if (typeof token === 'string') {\n tokenExpr = literal(token);\n }\n else if (token === _this.tokenInjector) {\n tokenExpr = importExpr(Identifiers.INJECTOR);\n }\n else {\n tokenExpr = ctx.importExpr(token);\n }\n if (flags !== 0 /* Default */) {\n args = [tokenExpr, literal(flags)];\n }\n else {\n args = [tokenExpr];\n }\n return importExpr(Identifiers.inject).callFn(args);\n });\n };\n InjectableCompiler.prototype.factoryFor = function (injectable, ctx) {\n var retValue;\n if (injectable.useExisting) {\n retValue = importExpr(Identifiers.inject).callFn([ctx.importExpr(injectable.useExisting)]);\n }\n else if (injectable.useFactory) {\n var deps = injectable.deps || [];\n if (deps.length > 0) {\n retValue = ctx.importExpr(injectable.useFactory).callFn(this.depsArray(deps, ctx));\n }\n else {\n return ctx.importExpr(injectable.useFactory);\n }\n }\n else if (injectable.useValue) {\n retValue = convertValueToOutputAst(ctx, injectable.useValue);\n }\n else {\n var clazz = injectable.useClass || injectable.symbol;\n var depArgs = this.depsArray(this.reflector.parameters(clazz), ctx);\n retValue = new InstantiateExpr(ctx.importExpr(clazz), depArgs);\n }\n return fn([], [new ReturnStatement(retValue)], undefined, undefined, injectable.symbol.name + '_Factory');\n };\n InjectableCompiler.prototype.injectableDef = function (injectable, ctx) {\n var providedIn = NULL_EXPR;\n if (injectable.providedIn !== undefined) {\n if (injectable.providedIn === null) {\n providedIn = NULL_EXPR;\n }\n else if (typeof injectable.providedIn === 'string') {\n providedIn = literal(injectable.providedIn);\n }\n else {\n providedIn = ctx.importExpr(injectable.providedIn);\n }\n }\n var def = [\n mapEntry('factory', this.factoryFor(injectable, ctx)),\n mapEntry('token', ctx.importExpr(injectable.type.reference)),\n mapEntry('providedIn', providedIn),\n ];\n return importExpr(Identifiers.defineInjectable).callFn([literalMap(def)]);\n };\n InjectableCompiler.prototype.compile = function (injectable, ctx) {\n if (this.alwaysGenerateDef || injectable.providedIn !== undefined) {\n var className = identifierName(injectable.type);\n var clazz = new ClassStmt(className, null, [\n new ClassField('ngInjectableDef', INFERRED_TYPE, [StmtModifier.Static], this.injectableDef(injectable, ctx)),\n ], [], new ClassMethod(null, [], []), []);\n ctx.statements.push(clazz);\n }\n };\n return InjectableCompiler;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 STRIP_SRC_FILE_SUFFIXES = /(\\.ts|\\.d\\.ts|\\.js|\\.jsx|\\.tsx)$/;\nvar GENERATED_FILE = /\\.ngfactory\\.|\\.ngsummary\\./;\nvar JIT_SUMMARY_FILE = /\\.ngsummary\\./;\nvar JIT_SUMMARY_NAME = /NgSummary$/;\nfunction ngfactoryFilePath(filePath, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n var urlWithSuffix = splitTypescriptSuffix(filePath, forceSourceFile);\n return urlWithSuffix[0] + \".ngfactory\" + normalizeGenFileSuffix(urlWithSuffix[1]);\n}\nfunction stripGeneratedFileSuffix(filePath) {\n return filePath.replace(GENERATED_FILE, '.');\n}\nfunction isGeneratedFile(filePath) {\n return GENERATED_FILE.test(filePath);\n}\nfunction splitTypescriptSuffix(path, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n if (path.endsWith('.d.ts')) {\n return [path.slice(0, -5), forceSourceFile ? '.ts' : '.d.ts'];\n }\n var lastDot = path.lastIndexOf('.');\n if (lastDot !== -1) {\n return [path.substring(0, lastDot), path.substring(lastDot)];\n }\n return [path, ''];\n}\nfunction normalizeGenFileSuffix(srcFileSuffix) {\n return srcFileSuffix === '.tsx' ? '.ts' : srcFileSuffix;\n}\nfunction summaryFileName(fileName) {\n var fileNameWithoutSuffix = fileName.replace(STRIP_SRC_FILE_SUFFIXES, '');\n return fileNameWithoutSuffix + \".ngsummary.json\";\n}\nfunction summaryForJitFileName(fileName, forceSourceFile) {\n if (forceSourceFile === void 0) { forceSourceFile = false; }\n var urlWithSuffix = splitTypescriptSuffix(stripGeneratedFileSuffix(fileName), forceSourceFile);\n return urlWithSuffix[0] + \".ngsummary\" + urlWithSuffix[1];\n}\nfunction stripSummaryForJitFileSuffix(filePath) {\n return filePath.replace(JIT_SUMMARY_FILE, '.');\n}\nfunction summaryForJitName(symbolName) {\n return symbolName + \"NgSummary\";\n}\nfunction stripSummaryForJitNameSuffix(symbolName) {\n return symbolName.replace(JIT_SUMMARY_NAME, '');\n}\nvar LOWERED_SYMBOL = /\\u0275\\d+/;\nfunction isLoweredSymbol(name) {\n return LOWERED_SYMBOL.test(name);\n}\nfunction createLoweredSymbol(id) {\n return \"\\u0275\" + id;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 LifecycleHooks;\n(function (LifecycleHooks) {\n LifecycleHooks[LifecycleHooks[\"OnInit\"] = 0] = \"OnInit\";\n LifecycleHooks[LifecycleHooks[\"OnDestroy\"] = 1] = \"OnDestroy\";\n LifecycleHooks[LifecycleHooks[\"DoCheck\"] = 2] = \"DoCheck\";\n LifecycleHooks[LifecycleHooks[\"OnChanges\"] = 3] = \"OnChanges\";\n LifecycleHooks[LifecycleHooks[\"AfterContentInit\"] = 4] = \"AfterContentInit\";\n LifecycleHooks[LifecycleHooks[\"AfterContentChecked\"] = 5] = \"AfterContentChecked\";\n LifecycleHooks[LifecycleHooks[\"AfterViewInit\"] = 6] = \"AfterViewInit\";\n LifecycleHooks[LifecycleHooks[\"AfterViewChecked\"] = 7] = \"AfterViewChecked\";\n})(LifecycleHooks || (LifecycleHooks = {}));\nvar LIFECYCLE_HOOKS_VALUES = [\n LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,\n LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,\n LifecycleHooks.AfterViewChecked\n];\nfunction hasLifecycleHook(reflector, hook, token) {\n return reflector.hasLifecycleHook(token, getHookName(hook));\n}\nfunction getAllLifecycleHooks(reflector, token) {\n return LIFECYCLE_HOOKS_VALUES.filter(function (hook) { return hasLifecycleHook(reflector, hook, token); });\n}\nfunction getHookName(hook) {\n switch (hook) {\n case LifecycleHooks.OnInit:\n return 'ngOnInit';\n case LifecycleHooks.OnDestroy:\n return 'ngOnDestroy';\n case LifecycleHooks.DoCheck:\n return 'ngDoCheck';\n case LifecycleHooks.OnChanges:\n return 'ngOnChanges';\n case LifecycleHooks.AfterContentInit:\n return 'ngAfterContentInit';\n case LifecycleHooks.AfterContentChecked:\n return 'ngAfterContentChecked';\n case LifecycleHooks.AfterViewInit:\n return 'ngAfterViewInit';\n case LifecycleHooks.AfterViewChecked:\n return 'ngAfterViewChecked';\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _SELECTOR_REGEXP = new RegExp('(\\\\:not\\\\()|' + //\":not(\"\n '([-\\\\w]+)|' + // \"tag\"\n '(?:\\\\.([-\\\\w]+))|' + // \".class\"\n // \"-\" should appear first in the regexp below as FF31 parses \"[.-\\w]\" as a range\n '(?:\\\\[([-.\\\\w*]+)(?:=([\\\"\\']?)([^\\\\]\\\"\\']*)\\\\5)?\\\\])|' + // \"[name]\", \"[name=value]\",\n // \"[name=\"value\"]\",\n // \"[name='value']\"\n '(\\\\))|' + // \")\"\n '(\\\\s*,\\\\s*)', // \",\"\n'g');\n/**\n * A css selector contains an element name,\n * css classes and attribute/value pairs with the purpose\n * of selecting subsets out of them.\n */\nvar CssSelector = /** @class */ (function () {\n function CssSelector() {\n this.element = null;\n this.classNames = [];\n /**\n * The selectors are encoded in pairs where:\n * - even locations are attribute names\n * - odd locations are attribute values.\n *\n * Example:\n * Selector: `[key1=value1][key2]` would parse to:\n * ```\n * ['key1', 'value1', 'key2', '']\n * ```\n */\n this.attrs = [];\n this.notSelectors = [];\n }\n CssSelector.parse = function (selector) {\n var results = [];\n var _addResult = function (res, cssSel) {\n if (cssSel.notSelectors.length > 0 && !cssSel.element && cssSel.classNames.length == 0 &&\n cssSel.attrs.length == 0) {\n cssSel.element = '*';\n }\n res.push(cssSel);\n };\n var cssSelector = new CssSelector();\n var match;\n var current = cssSelector;\n var inNot = false;\n _SELECTOR_REGEXP.lastIndex = 0;\n while (match = _SELECTOR_REGEXP.exec(selector)) {\n if (match[1]) {\n if (inNot) {\n throw new Error('Nesting :not is not allowed in a selector');\n }\n inNot = true;\n current = new CssSelector();\n cssSelector.notSelectors.push(current);\n }\n if (match[2]) {\n current.setElement(match[2]);\n }\n if (match[3]) {\n current.addClassName(match[3]);\n }\n if (match[4]) {\n current.addAttribute(match[4], match[6]);\n }\n if (match[7]) {\n inNot = false;\n current = cssSelector;\n }\n if (match[8]) {\n if (inNot) {\n throw new Error('Multiple selectors in :not are not supported');\n }\n _addResult(results, cssSelector);\n cssSelector = current = new CssSelector();\n }\n }\n _addResult(results, cssSelector);\n return results;\n };\n CssSelector.prototype.isElementSelector = function () {\n return this.hasElementSelector() && this.classNames.length == 0 && this.attrs.length == 0 &&\n this.notSelectors.length === 0;\n };\n CssSelector.prototype.hasElementSelector = function () { return !!this.element; };\n CssSelector.prototype.setElement = function (element) {\n if (element === void 0) { element = null; }\n this.element = element;\n };\n /** Gets a template string for an element that matches the selector. */\n CssSelector.prototype.getMatchingElementTemplate = function () {\n var tagName = this.element || 'div';\n var classAttr = this.classNames.length > 0 ? \" class=\\\"\" + this.classNames.join(' ') + \"\\\"\" : '';\n var attrs = '';\n for (var i = 0; i < this.attrs.length; i += 2) {\n var attrName = this.attrs[i];\n var attrValue = this.attrs[i + 1] !== '' ? \"=\\\"\" + this.attrs[i + 1] + \"\\\"\" : '';\n attrs += \" \" + attrName + attrValue;\n }\n return getHtmlTagDefinition(tagName).isVoid ? \"<\" + tagName + classAttr + attrs + \"/>\" :\n \"<\" + tagName + classAttr + attrs + \"></\" + tagName + \">\";\n };\n CssSelector.prototype.getAttrs = function () {\n var result = [];\n if (this.classNames.length > 0) {\n result.push('class', this.classNames.join(' '));\n }\n return result.concat(this.attrs);\n };\n CssSelector.prototype.addAttribute = function (name, value) {\n if (value === void 0) { value = ''; }\n this.attrs.push(name, value && value.toLowerCase() || '');\n };\n CssSelector.prototype.addClassName = function (name) { this.classNames.push(name.toLowerCase()); };\n CssSelector.prototype.toString = function () {\n var res = this.element || '';\n if (this.classNames) {\n this.classNames.forEach(function (klass) { return res += \".\" + klass; });\n }\n if (this.attrs) {\n for (var i = 0; i < this.attrs.length; i += 2) {\n var name_1 = this.attrs[i];\n var value = this.attrs[i + 1];\n res += \"[\" + name_1 + (value ? '=' + value : '') + \"]\";\n }\n }\n this.notSelectors.forEach(function (notSelector) { return res += \":not(\" + notSelector + \")\"; });\n return res;\n };\n return CssSelector;\n}());\n/**\n * Reads a list of CssSelectors and allows to calculate which ones\n * are contained in a given CssSelector.\n */\nvar SelectorMatcher = /** @class */ (function () {\n function SelectorMatcher() {\n this._elementMap = new Map();\n this._elementPartialMap = new Map();\n this._classMap = new Map();\n this._classPartialMap = new Map();\n this._attrValueMap = new Map();\n this._attrValuePartialMap = new Map();\n this._listContexts = [];\n }\n SelectorMatcher.createNotMatcher = function (notSelectors) {\n var notMatcher = new SelectorMatcher();\n notMatcher.addSelectables(notSelectors, null);\n return notMatcher;\n };\n SelectorMatcher.prototype.addSelectables = function (cssSelectors, callbackCtxt) {\n var listContext = null;\n if (cssSelectors.length > 1) {\n listContext = new SelectorListContext(cssSelectors);\n this._listContexts.push(listContext);\n }\n for (var i = 0; i < cssSelectors.length; i++) {\n this._addSelectable(cssSelectors[i], callbackCtxt, listContext);\n }\n };\n /**\n * Add an object that can be found later on by calling `match`.\n * @param cssSelector A css selector\n * @param callbackCtxt An opaque object that will be given to the callback of the `match` function\n */\n SelectorMatcher.prototype._addSelectable = function (cssSelector, callbackCtxt, listContext) {\n var matcher = this;\n var element = cssSelector.element;\n var classNames = cssSelector.classNames;\n var attrs = cssSelector.attrs;\n var selectable = new SelectorContext(cssSelector, callbackCtxt, listContext);\n if (element) {\n var isTerminal = attrs.length === 0 && classNames.length === 0;\n if (isTerminal) {\n this._addTerminal(matcher._elementMap, element, selectable);\n }\n else {\n matcher = this._addPartial(matcher._elementPartialMap, element);\n }\n }\n if (classNames) {\n for (var i = 0; i < classNames.length; i++) {\n var isTerminal = attrs.length === 0 && i === classNames.length - 1;\n var className = classNames[i];\n if (isTerminal) {\n this._addTerminal(matcher._classMap, className, selectable);\n }\n else {\n matcher = this._addPartial(matcher._classPartialMap, className);\n }\n }\n }\n if (attrs) {\n for (var i = 0; i < attrs.length; i += 2) {\n var isTerminal = i === attrs.length - 2;\n var name_2 = attrs[i];\n var value = attrs[i + 1];\n if (isTerminal) {\n var terminalMap = matcher._attrValueMap;\n var terminalValuesMap = terminalMap.get(name_2);\n if (!terminalValuesMap) {\n terminalValuesMap = new Map();\n terminalMap.set(name_2, terminalValuesMap);\n }\n this._addTerminal(terminalValuesMap, value, selectable);\n }\n else {\n var partialMap = matcher._attrValuePartialMap;\n var partialValuesMap = partialMap.get(name_2);\n if (!partialValuesMap) {\n partialValuesMap = new Map();\n partialMap.set(name_2, partialValuesMap);\n }\n matcher = this._addPartial(partialValuesMap, value);\n }\n }\n }\n };\n SelectorMatcher.prototype._addTerminal = function (map, name, selectable) {\n var terminalList = map.get(name);\n if (!terminalList) {\n terminalList = [];\n map.set(name, terminalList);\n }\n terminalList.push(selectable);\n };\n SelectorMatcher.prototype._addPartial = function (map, name) {\n var matcher = map.get(name);\n if (!matcher) {\n matcher = new SelectorMatcher();\n map.set(name, matcher);\n }\n return matcher;\n };\n /**\n * Find the objects that have been added via `addSelectable`\n * whose css selector is contained in the given css selector.\n * @param cssSelector A css selector\n * @param matchedCallback This callback will be called with the object handed into `addSelectable`\n * @return boolean true if a match was found\n */\n SelectorMatcher.prototype.match = function (cssSelector, matchedCallback) {\n var result = false;\n var element = cssSelector.element;\n var classNames = cssSelector.classNames;\n var attrs = cssSelector.attrs;\n for (var i = 0; i < this._listContexts.length; i++) {\n this._listContexts[i].alreadyMatched = false;\n }\n result = this._matchTerminal(this._elementMap, element, cssSelector, matchedCallback) || result;\n result = this._matchPartial(this._elementPartialMap, element, cssSelector, matchedCallback) ||\n result;\n if (classNames) {\n for (var i = 0; i < classNames.length; i++) {\n var className = classNames[i];\n result =\n this._matchTerminal(this._classMap, className, cssSelector, matchedCallback) || result;\n result =\n this._matchPartial(this._classPartialMap, className, cssSelector, matchedCallback) ||\n result;\n }\n }\n if (attrs) {\n for (var i = 0; i < attrs.length; i += 2) {\n var name_3 = attrs[i];\n var value = attrs[i + 1];\n var terminalValuesMap = this._attrValueMap.get(name_3);\n if (value) {\n result =\n this._matchTerminal(terminalValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchTerminal(terminalValuesMap, value, cssSelector, matchedCallback) || result;\n var partialValuesMap = this._attrValuePartialMap.get(name_3);\n if (value) {\n result = this._matchPartial(partialValuesMap, '', cssSelector, matchedCallback) || result;\n }\n result =\n this._matchPartial(partialValuesMap, value, cssSelector, matchedCallback) || result;\n }\n }\n return result;\n };\n /** @internal */\n SelectorMatcher.prototype._matchTerminal = function (map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n var selectables = map.get(name) || [];\n var starSelectables = map.get('*');\n if (starSelectables) {\n selectables = selectables.concat(starSelectables);\n }\n if (selectables.length === 0) {\n return false;\n }\n var selectable;\n var result = false;\n for (var i = 0; i < selectables.length; i++) {\n selectable = selectables[i];\n result = selectable.finalize(cssSelector, matchedCallback) || result;\n }\n return result;\n };\n /** @internal */\n SelectorMatcher.prototype._matchPartial = function (map, name, cssSelector, matchedCallback) {\n if (!map || typeof name !== 'string') {\n return false;\n }\n var nestedSelector = map.get(name);\n if (!nestedSelector) {\n return false;\n }\n // TODO(perf): get rid of recursion and measure again\n // TODO(perf): don't pass the whole selector into the recursion,\n // but only the not processed parts\n return nestedSelector.match(cssSelector, matchedCallback);\n };\n return SelectorMatcher;\n}());\nvar SelectorListContext = /** @class */ (function () {\n function SelectorListContext(selectors) {\n this.selectors = selectors;\n this.alreadyMatched = false;\n }\n return SelectorListContext;\n}());\n// Store context to pass back selector and context when a selector is matched\nvar SelectorContext = /** @class */ (function () {\n function SelectorContext(selector, cbContext, listContext) {\n this.selector = selector;\n this.cbContext = cbContext;\n this.listContext = listContext;\n this.notSelectors = selector.notSelectors;\n }\n SelectorContext.prototype.finalize = function (cssSelector, callback) {\n var result = true;\n if (this.notSelectors.length > 0 && (!this.listContext || !this.listContext.alreadyMatched)) {\n var notMatcher = SelectorMatcher.createNotMatcher(this.notSelectors);\n result = !notMatcher.match(cssSelector, null);\n }\n if (result && callback && (!this.listContext || !this.listContext.alreadyMatched)) {\n if (this.listContext) {\n this.listContext.alreadyMatched = true;\n }\n callback(this.selector, this.cbContext);\n }\n return result;\n };\n return SelectorContext;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ERROR_COMPONENT_TYPE = 'ngComponentType';\n// Design notes:\n// - don't lazily create metadata:\n// For some metadata, we need to do async work sometimes,\n// so the user has to kick off this loading.\n// But we want to report errors even when the async work is\n// not required to check that the user would have been able\n// to wait correctly.\nvar CompileMetadataResolver = /** @class */ (function () {\n function CompileMetadataResolver(_config, _htmlParser, _ngModuleResolver, _directiveResolver, _pipeResolver, _summaryResolver, _schemaRegistry, _directiveNormalizer, _console, _staticSymbolCache, _reflector, _errorCollector) {\n this._config = _config;\n this._htmlParser = _htmlParser;\n this._ngModuleResolver = _ngModuleResolver;\n this._directiveResolver = _directiveResolver;\n this._pipeResolver = _pipeResolver;\n this._summaryResolver = _summaryResolver;\n this._schemaRegistry = _schemaRegistry;\n this._directiveNormalizer = _directiveNormalizer;\n this._console = _console;\n this._staticSymbolCache = _staticSymbolCache;\n this._reflector = _reflector;\n this._errorCollector = _errorCollector;\n this._nonNormalizedDirectiveCache = new Map();\n this._directiveCache = new Map();\n this._summaryCache = new Map();\n this._pipeCache = new Map();\n this._ngModuleCache = new Map();\n this._ngModuleOfTypes = new Map();\n this._shallowModuleCache = new Map();\n }\n CompileMetadataResolver.prototype.getReflector = function () { return this._reflector; };\n CompileMetadataResolver.prototype.clearCacheFor = function (type) {\n var dirMeta = this._directiveCache.get(type);\n this._directiveCache.delete(type);\n this._nonNormalizedDirectiveCache.delete(type);\n this._summaryCache.delete(type);\n this._pipeCache.delete(type);\n this._ngModuleOfTypes.delete(type);\n // Clear all of the NgModule as they contain transitive information!\n this._ngModuleCache.clear();\n if (dirMeta) {\n this._directiveNormalizer.clearCacheFor(dirMeta);\n }\n };\n CompileMetadataResolver.prototype.clearCache = function () {\n this._directiveCache.clear();\n this._nonNormalizedDirectiveCache.clear();\n this._summaryCache.clear();\n this._pipeCache.clear();\n this._ngModuleCache.clear();\n this._ngModuleOfTypes.clear();\n this._directiveNormalizer.clearCache();\n };\n CompileMetadataResolver.prototype._createProxyClass = function (baseType, name) {\n var delegate = null;\n var proxyClass = function () {\n if (!delegate) {\n throw new Error(\"Illegal state: Class \" + name + \" for type \" + stringify(baseType) + \" is not compiled yet!\");\n }\n return delegate.apply(this, arguments);\n };\n proxyClass.setDelegate = function (d) {\n delegate = d;\n proxyClass.prototype = d.prototype;\n };\n // Make stringify work correctly\n proxyClass.overriddenName = name;\n return proxyClass;\n };\n CompileMetadataResolver.prototype.getGeneratedClass = function (dirType, name) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), name);\n }\n else {\n return this._createProxyClass(dirType, name);\n }\n };\n CompileMetadataResolver.prototype.getComponentViewClass = function (dirType) {\n return this.getGeneratedClass(dirType, viewClassName(dirType, 0));\n };\n CompileMetadataResolver.prototype.getHostComponentViewClass = function (dirType) {\n return this.getGeneratedClass(dirType, hostViewClassName(dirType));\n };\n CompileMetadataResolver.prototype.getHostComponentType = function (dirType) {\n var name = identifierName({ reference: dirType }) + \"_Host\";\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(dirType.filePath, name);\n }\n else {\n var HostClass = function HostClass() { };\n HostClass.overriddenName = name;\n return HostClass;\n }\n };\n CompileMetadataResolver.prototype.getRendererType = function (dirType) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), rendererTypeName(dirType));\n }\n else {\n // returning an object as proxy,\n // that we fill later during runtime compilation.\n return {};\n }\n };\n CompileMetadataResolver.prototype.getComponentFactory = function (selector, dirType, inputs, outputs) {\n if (dirType instanceof StaticSymbol) {\n return this._staticSymbolCache.get(ngfactoryFilePath(dirType.filePath), componentFactoryName(dirType));\n }\n else {\n var hostView = this.getHostComponentViewClass(dirType);\n // Note: ngContentSelectors will be filled later once the template is\n // loaded.\n var createComponentFactory = this._reflector.resolveExternalReference(Identifiers.createComponentFactory);\n return createComponentFactory(selector, dirType, hostView, inputs, outputs, []);\n }\n };\n CompileMetadataResolver.prototype.initComponentFactory = function (factory, ngContentSelectors) {\n if (!(factory instanceof StaticSymbol)) {\n (_a = factory.ngContentSelectors).push.apply(_a, __spread(ngContentSelectors));\n }\n var _a;\n };\n CompileMetadataResolver.prototype._loadSummary = function (type, kind) {\n var typeSummary = this._summaryCache.get(type);\n if (!typeSummary) {\n var summary = this._summaryResolver.resolveSummary(type);\n typeSummary = summary ? summary.type : null;\n this._summaryCache.set(type, typeSummary || null);\n }\n return typeSummary && typeSummary.summaryKind === kind ? typeSummary : null;\n };\n CompileMetadataResolver.prototype.getHostComponentMetadata = function (compMeta, hostViewType) {\n var hostType = this.getHostComponentType(compMeta.type.reference);\n if (!hostViewType) {\n hostViewType = this.getHostComponentViewClass(hostType);\n }\n // Note: ! is ok here as this method should only be called with normalized directive\n // metadata, which always fills in the selector.\n var template = CssSelector.parse(compMeta.selector)[0].getMatchingElementTemplate();\n var templateUrl = '';\n var htmlAst = this._htmlParser.parse(template, templateUrl);\n return CompileDirectiveMetadata.create({\n isHost: true,\n type: { reference: hostType, diDeps: [], lifecycleHooks: [] },\n template: new CompileTemplateMetadata({\n encapsulation: ViewEncapsulation.None,\n template: template,\n templateUrl: templateUrl,\n htmlAst: htmlAst,\n styles: [],\n styleUrls: [],\n ngContentSelectors: [],\n animations: [],\n isInline: true,\n externalStylesheets: [],\n interpolation: null,\n preserveWhitespaces: false,\n }),\n exportAs: null,\n changeDetection: ChangeDetectionStrategy.Default,\n inputs: [],\n outputs: [],\n host: {},\n isComponent: true,\n selector: '*',\n providers: [],\n viewProviders: [],\n queries: [],\n guards: {},\n viewQueries: [],\n componentViewType: hostViewType,\n rendererType: { id: '__Host__', encapsulation: ViewEncapsulation.None, styles: [], data: {} },\n entryComponents: [],\n componentFactory: null\n });\n };\n CompileMetadataResolver.prototype.loadDirectiveMetadata = function (ngModuleType, directiveType, isSync) {\n var _this = this;\n if (this._directiveCache.has(directiveType)) {\n return null;\n }\n directiveType = resolveForwardRef(directiveType);\n var _a = this.getNonNormalizedDirectiveMetadata(directiveType), annotation = _a.annotation, metadata = _a.metadata;\n var createDirectiveMetadata = function (templateMetadata) {\n var normalizedDirMeta = new CompileDirectiveMetadata({\n isHost: false,\n type: metadata.type,\n isComponent: metadata.isComponent,\n selector: metadata.selector,\n exportAs: metadata.exportAs,\n changeDetection: metadata.changeDetection,\n inputs: metadata.inputs,\n outputs: metadata.outputs,\n hostListeners: metadata.hostListeners,\n hostProperties: metadata.hostProperties,\n hostAttributes: metadata.hostAttributes,\n providers: metadata.providers,\n viewProviders: metadata.viewProviders,\n queries: metadata.queries,\n guards: metadata.guards,\n viewQueries: metadata.viewQueries,\n entryComponents: metadata.entryComponents,\n componentViewType: metadata.componentViewType,\n rendererType: metadata.rendererType,\n componentFactory: metadata.componentFactory,\n template: templateMetadata\n });\n if (templateMetadata) {\n _this.initComponentFactory(metadata.componentFactory, templateMetadata.ngContentSelectors);\n }\n _this._directiveCache.set(directiveType, normalizedDirMeta);\n _this._summaryCache.set(directiveType, normalizedDirMeta.toSummary());\n return null;\n };\n if (metadata.isComponent) {\n var template = metadata.template;\n var templateMeta = this._directiveNormalizer.normalizeTemplate({\n ngModuleType: ngModuleType,\n componentType: directiveType,\n moduleUrl: this._reflector.componentModuleUrl(directiveType, annotation),\n encapsulation: template.encapsulation,\n template: template.template,\n templateUrl: template.templateUrl,\n styles: template.styles,\n styleUrls: template.styleUrls,\n animations: template.animations,\n interpolation: template.interpolation,\n preserveWhitespaces: template.preserveWhitespaces\n });\n if (isPromise(templateMeta) && isSync) {\n this._reportError(componentStillLoadingError(directiveType), directiveType);\n return null;\n }\n return SyncAsync.then(templateMeta, createDirectiveMetadata);\n }\n else {\n // directive\n createDirectiveMetadata(null);\n return null;\n }\n };\n CompileMetadataResolver.prototype.getNonNormalizedDirectiveMetadata = function (directiveType) {\n var _this = this;\n directiveType = resolveForwardRef(directiveType);\n if (!directiveType) {\n return null;\n }\n var cacheEntry = this._nonNormalizedDirectiveCache.get(directiveType);\n if (cacheEntry) {\n return cacheEntry;\n }\n var dirMeta = this._directiveResolver.resolve(directiveType, false);\n if (!dirMeta) {\n return null;\n }\n var nonNormalizedTemplateMetadata = undefined;\n if (createComponent.isTypeOf(dirMeta)) {\n // component\n var compMeta = dirMeta;\n assertArrayOfStrings('styles', compMeta.styles);\n assertArrayOfStrings('styleUrls', compMeta.styleUrls);\n assertInterpolationSymbols('interpolation', compMeta.interpolation);\n var animations = compMeta.animations;\n nonNormalizedTemplateMetadata = new CompileTemplateMetadata({\n encapsulation: noUndefined(compMeta.encapsulation),\n template: noUndefined(compMeta.template),\n templateUrl: noUndefined(compMeta.templateUrl),\n htmlAst: null,\n styles: compMeta.styles || [],\n styleUrls: compMeta.styleUrls || [],\n animations: animations || [],\n interpolation: noUndefined(compMeta.interpolation),\n isInline: !!compMeta.template,\n externalStylesheets: [],\n ngContentSelectors: [],\n preserveWhitespaces: noUndefined(dirMeta.preserveWhitespaces),\n });\n }\n var changeDetectionStrategy = null;\n var viewProviders = [];\n var entryComponentMetadata = [];\n var selector = dirMeta.selector;\n if (createComponent.isTypeOf(dirMeta)) {\n // Component\n var compMeta = dirMeta;\n changeDetectionStrategy = compMeta.changeDetection;\n if (compMeta.viewProviders) {\n viewProviders = this._getProvidersMetadata(compMeta.viewProviders, entryComponentMetadata, \"viewProviders for \\\"\" + stringifyType(directiveType) + \"\\\"\", [], directiveType);\n }\n if (compMeta.entryComponents) {\n entryComponentMetadata = flattenAndDedupeArray(compMeta.entryComponents)\n .map(function (type) { return _this._getEntryComponentMetadata(type); })\n .concat(entryComponentMetadata);\n }\n if (!selector) {\n selector = this._schemaRegistry.getDefaultComponentElementName();\n }\n }\n else {\n // Directive\n if (!selector) {\n this._reportError(syntaxError(\"Directive \" + stringifyType(directiveType) + \" has no selector, please add it!\"), directiveType);\n selector = 'error';\n }\n }\n var providers = [];\n if (dirMeta.providers != null) {\n providers = this._getProvidersMetadata(dirMeta.providers, entryComponentMetadata, \"providers for \\\"\" + stringifyType(directiveType) + \"\\\"\", [], directiveType);\n }\n var queries = [];\n var viewQueries = [];\n if (dirMeta.queries != null) {\n queries = this._getQueriesMetadata(dirMeta.queries, false, directiveType);\n viewQueries = this._getQueriesMetadata(dirMeta.queries, true, directiveType);\n }\n var metadata = CompileDirectiveMetadata.create({\n isHost: false,\n selector: selector,\n exportAs: noUndefined(dirMeta.exportAs),\n isComponent: !!nonNormalizedTemplateMetadata,\n type: this._getTypeMetadata(directiveType),\n template: nonNormalizedTemplateMetadata,\n changeDetection: changeDetectionStrategy,\n inputs: dirMeta.inputs || [],\n outputs: dirMeta.outputs || [],\n host: dirMeta.host || {},\n providers: providers || [],\n viewProviders: viewProviders || [],\n queries: queries || [],\n guards: dirMeta.guards || {},\n viewQueries: viewQueries || [],\n entryComponents: entryComponentMetadata,\n componentViewType: nonNormalizedTemplateMetadata ? this.getComponentViewClass(directiveType) :\n null,\n rendererType: nonNormalizedTemplateMetadata ? this.getRendererType(directiveType) : null,\n componentFactory: null\n });\n if (nonNormalizedTemplateMetadata) {\n metadata.componentFactory =\n this.getComponentFactory(selector, directiveType, metadata.inputs, metadata.outputs);\n }\n cacheEntry = { metadata: metadata, annotation: dirMeta };\n this._nonNormalizedDirectiveCache.set(directiveType, cacheEntry);\n return cacheEntry;\n };\n /**\n * Gets the metadata for the given directive.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n */\n CompileMetadataResolver.prototype.getDirectiveMetadata = function (directiveType) {\n var dirMeta = this._directiveCache.get(directiveType);\n if (!dirMeta) {\n this._reportError(syntaxError(\"Illegal state: getDirectiveMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Directive \" + stringifyType(directiveType) + \".\"), directiveType);\n }\n return dirMeta;\n };\n CompileMetadataResolver.prototype.getDirectiveSummary = function (dirType) {\n var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);\n if (!dirSummary) {\n this._reportError(syntaxError(\"Illegal state: Could not load the summary for directive \" + stringifyType(dirType) + \".\"), dirType);\n }\n return dirSummary;\n };\n CompileMetadataResolver.prototype.isDirective = function (type) {\n return !!this._loadSummary(type, CompileSummaryKind.Directive) ||\n this._directiveResolver.isDirective(type);\n };\n CompileMetadataResolver.prototype.isPipe = function (type) {\n return !!this._loadSummary(type, CompileSummaryKind.Pipe) ||\n this._pipeResolver.isPipe(type);\n };\n CompileMetadataResolver.prototype.isNgModule = function (type) {\n return !!this._loadSummary(type, CompileSummaryKind.NgModule) ||\n this._ngModuleResolver.isNgModule(type);\n };\n CompileMetadataResolver.prototype.getNgModuleSummary = function (moduleType, alreadyCollecting) {\n if (alreadyCollecting === void 0) { alreadyCollecting = null; }\n var moduleSummary = this._loadSummary(moduleType, CompileSummaryKind.NgModule);\n if (!moduleSummary) {\n var moduleMeta = this.getNgModuleMetadata(moduleType, false, alreadyCollecting);\n moduleSummary = moduleMeta ? moduleMeta.toSummary() : null;\n if (moduleSummary) {\n this._summaryCache.set(moduleType, moduleSummary);\n }\n }\n return moduleSummary;\n };\n /**\n * Loads the declared directives and pipes of an NgModule.\n */\n CompileMetadataResolver.prototype.loadNgModuleDirectiveAndPipeMetadata = function (moduleType, isSync, throwIfNotFound) {\n var _this = this;\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var ngModule = this.getNgModuleMetadata(moduleType, throwIfNotFound);\n var loading = [];\n if (ngModule) {\n ngModule.declaredDirectives.forEach(function (id) {\n var promise = _this.loadDirectiveMetadata(moduleType, id.reference, isSync);\n if (promise) {\n loading.push(promise);\n }\n });\n ngModule.declaredPipes.forEach(function (id) { return _this._loadPipeMetadata(id.reference); });\n }\n return Promise.all(loading);\n };\n CompileMetadataResolver.prototype.getShallowModuleMetadata = function (moduleType) {\n var compileMeta = this._shallowModuleCache.get(moduleType);\n if (compileMeta) {\n return compileMeta;\n }\n var ngModuleMeta = findLast(this._reflector.shallowAnnotations(moduleType), createNgModule.isTypeOf);\n compileMeta = {\n type: this._getTypeMetadata(moduleType),\n rawExports: ngModuleMeta.exports,\n rawImports: ngModuleMeta.imports,\n rawProviders: ngModuleMeta.providers,\n };\n this._shallowModuleCache.set(moduleType, compileMeta);\n return compileMeta;\n };\n CompileMetadataResolver.prototype.getNgModuleMetadata = function (moduleType, throwIfNotFound, alreadyCollecting) {\n var _this = this;\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n if (alreadyCollecting === void 0) { alreadyCollecting = null; }\n moduleType = resolveForwardRef(moduleType);\n var compileMeta = this._ngModuleCache.get(moduleType);\n if (compileMeta) {\n return compileMeta;\n }\n var meta = this._ngModuleResolver.resolve(moduleType, throwIfNotFound);\n if (!meta) {\n return null;\n }\n var declaredDirectives = [];\n var exportedNonModuleIdentifiers = [];\n var declaredPipes = [];\n var importedModules = [];\n var exportedModules = [];\n var providers = [];\n var entryComponents = [];\n var bootstrapComponents = [];\n var schemas = [];\n if (meta.imports) {\n flattenAndDedupeArray(meta.imports).forEach(function (importedType) {\n var importedModuleType = undefined;\n if (isValidType(importedType)) {\n importedModuleType = importedType;\n }\n else if (importedType && importedType.ngModule) {\n var moduleWithProviders = importedType;\n importedModuleType = moduleWithProviders.ngModule;\n if (moduleWithProviders.providers) {\n providers.push.apply(providers, __spread(_this._getProvidersMetadata(moduleWithProviders.providers, entryComponents, \"provider for the NgModule '\" + stringifyType(importedModuleType) + \"'\", [], importedType)));\n }\n }\n if (importedModuleType) {\n if (_this._checkSelfImport(moduleType, importedModuleType))\n return;\n if (!alreadyCollecting)\n alreadyCollecting = new Set();\n if (alreadyCollecting.has(importedModuleType)) {\n _this._reportError(syntaxError(_this._getTypeDescriptor(importedModuleType) + \" '\" + stringifyType(importedType) + \"' is imported recursively by the module '\" + stringifyType(moduleType) + \"'.\"), moduleType);\n return;\n }\n alreadyCollecting.add(importedModuleType);\n var importedModuleSummary = _this.getNgModuleSummary(importedModuleType, alreadyCollecting);\n alreadyCollecting.delete(importedModuleType);\n if (!importedModuleSummary) {\n _this._reportError(syntaxError(\"Unexpected \" + _this._getTypeDescriptor(importedType) + \" '\" + stringifyType(importedType) + \"' imported by the module '\" + stringifyType(moduleType) + \"'. Please add a @NgModule annotation.\"), moduleType);\n return;\n }\n importedModules.push(importedModuleSummary);\n }\n else {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(importedType) + \"' imported by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n });\n }\n if (meta.exports) {\n flattenAndDedupeArray(meta.exports).forEach(function (exportedType) {\n if (!isValidType(exportedType)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(exportedType) + \"' exported by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n if (!alreadyCollecting)\n alreadyCollecting = new Set();\n if (alreadyCollecting.has(exportedType)) {\n _this._reportError(syntaxError(_this._getTypeDescriptor(exportedType) + \" '\" + stringify(exportedType) + \"' is exported recursively by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n alreadyCollecting.add(exportedType);\n var exportedModuleSummary = _this.getNgModuleSummary(exportedType, alreadyCollecting);\n alreadyCollecting.delete(exportedType);\n if (exportedModuleSummary) {\n exportedModules.push(exportedModuleSummary);\n }\n else {\n exportedNonModuleIdentifiers.push(_this._getIdentifierMetadata(exportedType));\n }\n });\n }\n // Note: This will be modified later, so we rely on\n // getting a new instance every time!\n var transitiveModule = this._getTransitiveNgModuleMetadata(importedModules, exportedModules);\n if (meta.declarations) {\n flattenAndDedupeArray(meta.declarations).forEach(function (declaredType) {\n if (!isValidType(declaredType)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(declaredType) + \"' declared by the module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n var declaredIdentifier = _this._getIdentifierMetadata(declaredType);\n if (_this.isDirective(declaredType)) {\n transitiveModule.addDirective(declaredIdentifier);\n declaredDirectives.push(declaredIdentifier);\n _this._addTypeToModule(declaredType, moduleType);\n }\n else if (_this.isPipe(declaredType)) {\n transitiveModule.addPipe(declaredIdentifier);\n transitiveModule.pipes.push(declaredIdentifier);\n declaredPipes.push(declaredIdentifier);\n _this._addTypeToModule(declaredType, moduleType);\n }\n else {\n _this._reportError(syntaxError(\"Unexpected \" + _this._getTypeDescriptor(declaredType) + \" '\" + stringifyType(declaredType) + \"' declared by the module '\" + stringifyType(moduleType) + \"'. Please add a @Pipe/@Directive/@Component annotation.\"), moduleType);\n return;\n }\n });\n }\n var exportedDirectives = [];\n var exportedPipes = [];\n exportedNonModuleIdentifiers.forEach(function (exportedId) {\n if (transitiveModule.directivesSet.has(exportedId.reference)) {\n exportedDirectives.push(exportedId);\n transitiveModule.addExportedDirective(exportedId);\n }\n else if (transitiveModule.pipesSet.has(exportedId.reference)) {\n exportedPipes.push(exportedId);\n transitiveModule.addExportedPipe(exportedId);\n }\n else {\n _this._reportError(syntaxError(\"Can't export \" + _this._getTypeDescriptor(exportedId.reference) + \" \" + stringifyType(exportedId.reference) + \" from \" + stringifyType(moduleType) + \" as it was neither declared nor imported!\"), moduleType);\n return;\n }\n });\n // The providers of the module have to go last\n // so that they overwrite any other provider we already added.\n if (meta.providers) {\n providers.push.apply(providers, __spread(this._getProvidersMetadata(meta.providers, entryComponents, \"provider for the NgModule '\" + stringifyType(moduleType) + \"'\", [], moduleType)));\n }\n if (meta.entryComponents) {\n entryComponents.push.apply(entryComponents, __spread(flattenAndDedupeArray(meta.entryComponents)\n .map(function (type) { return _this._getEntryComponentMetadata(type); })));\n }\n if (meta.bootstrap) {\n flattenAndDedupeArray(meta.bootstrap).forEach(function (type) {\n if (!isValidType(type)) {\n _this._reportError(syntaxError(\"Unexpected value '\" + stringifyType(type) + \"' used in the bootstrap property of module '\" + stringifyType(moduleType) + \"'\"), moduleType);\n return;\n }\n bootstrapComponents.push(_this._getIdentifierMetadata(type));\n });\n }\n entryComponents.push.apply(entryComponents, __spread(bootstrapComponents.map(function (type) { return _this._getEntryComponentMetadata(type.reference); })));\n if (meta.schemas) {\n schemas.push.apply(schemas, __spread(flattenAndDedupeArray(meta.schemas)));\n }\n compileMeta = new CompileNgModuleMetadata({\n type: this._getTypeMetadata(moduleType),\n providers: providers,\n entryComponents: entryComponents,\n bootstrapComponents: bootstrapComponents,\n schemas: schemas,\n declaredDirectives: declaredDirectives,\n exportedDirectives: exportedDirectives,\n declaredPipes: declaredPipes,\n exportedPipes: exportedPipes,\n importedModules: importedModules,\n exportedModules: exportedModules,\n transitiveModule: transitiveModule,\n id: meta.id || null,\n });\n entryComponents.forEach(function (id) { return transitiveModule.addEntryComponent(id); });\n providers.forEach(function (provider) { return transitiveModule.addProvider(provider, compileMeta.type); });\n transitiveModule.addModule(compileMeta.type);\n this._ngModuleCache.set(moduleType, compileMeta);\n return compileMeta;\n };\n CompileMetadataResolver.prototype._checkSelfImport = function (moduleType, importedModuleType) {\n if (moduleType === importedModuleType) {\n this._reportError(syntaxError(\"'\" + stringifyType(moduleType) + \"' module can't import itself\"), moduleType);\n return true;\n }\n return false;\n };\n CompileMetadataResolver.prototype._getTypeDescriptor = function (type) {\n if (isValidType(type)) {\n if (this.isDirective(type)) {\n return 'directive';\n }\n if (this.isPipe(type)) {\n return 'pipe';\n }\n if (this.isNgModule(type)) {\n return 'module';\n }\n }\n if (type.provide) {\n return 'provider';\n }\n return 'value';\n };\n CompileMetadataResolver.prototype._addTypeToModule = function (type, moduleType) {\n var oldModule = this._ngModuleOfTypes.get(type);\n if (oldModule && oldModule !== moduleType) {\n this._reportError(syntaxError(\"Type \" + stringifyType(type) + \" is part of the declarations of 2 modules: \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \"! \" +\n (\"Please consider moving \" + stringifyType(type) + \" to a higher module that imports \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \". \") +\n (\"You can also create a new NgModule that exports and includes \" + stringifyType(type) + \" then import that NgModule in \" + stringifyType(oldModule) + \" and \" + stringifyType(moduleType) + \".\")), moduleType);\n return;\n }\n this._ngModuleOfTypes.set(type, moduleType);\n };\n CompileMetadataResolver.prototype._getTransitiveNgModuleMetadata = function (importedModules, exportedModules) {\n // collect `providers` / `entryComponents` from all imported and all exported modules\n var result = new TransitiveCompileNgModuleMetadata();\n var modulesByToken = new Map();\n importedModules.concat(exportedModules).forEach(function (modSummary) {\n modSummary.modules.forEach(function (mod) { return result.addModule(mod); });\n modSummary.entryComponents.forEach(function (comp) { return result.addEntryComponent(comp); });\n var addedTokens = new Set();\n modSummary.providers.forEach(function (entry) {\n var tokenRef = tokenReference(entry.provider.token);\n var prevModules = modulesByToken.get(tokenRef);\n if (!prevModules) {\n prevModules = new Set();\n modulesByToken.set(tokenRef, prevModules);\n }\n var moduleRef = entry.module.reference;\n // Note: the providers of one module may still contain multiple providers\n // per token (e.g. for multi providers), and we need to preserve these.\n if (addedTokens.has(tokenRef) || !prevModules.has(moduleRef)) {\n prevModules.add(moduleRef);\n addedTokens.add(tokenRef);\n result.addProvider(entry.provider, entry.module);\n }\n });\n });\n exportedModules.forEach(function (modSummary) {\n modSummary.exportedDirectives.forEach(function (id) { return result.addExportedDirective(id); });\n modSummary.exportedPipes.forEach(function (id) { return result.addExportedPipe(id); });\n });\n importedModules.forEach(function (modSummary) {\n modSummary.exportedDirectives.forEach(function (id) { return result.addDirective(id); });\n modSummary.exportedPipes.forEach(function (id) { return result.addPipe(id); });\n });\n return result;\n };\n CompileMetadataResolver.prototype._getIdentifierMetadata = function (type) {\n type = resolveForwardRef(type);\n return { reference: type };\n };\n CompileMetadataResolver.prototype.isInjectable = function (type) {\n var annotations = this._reflector.tryAnnotations(type);\n return annotations.some(function (ann) { return createInjectable.isTypeOf(ann); });\n };\n CompileMetadataResolver.prototype.getInjectableSummary = function (type) {\n return {\n summaryKind: CompileSummaryKind.Injectable,\n type: this._getTypeMetadata(type, null, false)\n };\n };\n CompileMetadataResolver.prototype.getInjectableMetadata = function (type, dependencies, throwOnUnknownDeps) {\n if (dependencies === void 0) { dependencies = null; }\n if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }\n var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);\n var typeMetadata = typeSummary ?\n typeSummary.type :\n this._getTypeMetadata(type, dependencies, throwOnUnknownDeps);\n var annotations = this._reflector.annotations(type).filter(function (ann) { return createInjectable.isTypeOf(ann); });\n if (annotations.length === 0) {\n return null;\n }\n var meta = annotations[annotations.length - 1];\n return {\n symbol: type,\n type: typeMetadata,\n providedIn: meta.providedIn,\n useValue: meta.useValue,\n useClass: meta.useClass,\n useExisting: meta.useExisting,\n useFactory: meta.useFactory,\n deps: meta.deps,\n };\n };\n CompileMetadataResolver.prototype._getTypeMetadata = function (type, dependencies, throwOnUnknownDeps) {\n if (dependencies === void 0) { dependencies = null; }\n if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }\n var identifier = this._getIdentifierMetadata(type);\n return {\n reference: identifier.reference,\n diDeps: this._getDependenciesMetadata(identifier.reference, dependencies, throwOnUnknownDeps),\n lifecycleHooks: getAllLifecycleHooks(this._reflector, identifier.reference),\n };\n };\n CompileMetadataResolver.prototype._getFactoryMetadata = function (factory, dependencies) {\n if (dependencies === void 0) { dependencies = null; }\n factory = resolveForwardRef(factory);\n return { reference: factory, diDeps: this._getDependenciesMetadata(factory, dependencies) };\n };\n /**\n * Gets the metadata for the given pipe.\n * This assumes `loadNgModuleDirectiveAndPipeMetadata` has been called first.\n */\n CompileMetadataResolver.prototype.getPipeMetadata = function (pipeType) {\n var pipeMeta = this._pipeCache.get(pipeType);\n if (!pipeMeta) {\n this._reportError(syntaxError(\"Illegal state: getPipeMetadata can only be called after loadNgModuleDirectiveAndPipeMetadata for a module that declares it. Pipe \" + stringifyType(pipeType) + \".\"), pipeType);\n }\n return pipeMeta || null;\n };\n CompileMetadataResolver.prototype.getPipeSummary = function (pipeType) {\n var pipeSummary = this._loadSummary(pipeType, CompileSummaryKind.Pipe);\n if (!pipeSummary) {\n this._reportError(syntaxError(\"Illegal state: Could not load the summary for pipe \" + stringifyType(pipeType) + \".\"), pipeType);\n }\n return pipeSummary;\n };\n CompileMetadataResolver.prototype.getOrLoadPipeMetadata = function (pipeType) {\n var pipeMeta = this._pipeCache.get(pipeType);\n if (!pipeMeta) {\n pipeMeta = this._loadPipeMetadata(pipeType);\n }\n return pipeMeta;\n };\n CompileMetadataResolver.prototype._loadPipeMetadata = function (pipeType) {\n pipeType = resolveForwardRef(pipeType);\n var pipeAnnotation = this._pipeResolver.resolve(pipeType);\n var pipeMeta = new CompilePipeMetadata({\n type: this._getTypeMetadata(pipeType),\n name: pipeAnnotation.name,\n pure: !!pipeAnnotation.pure\n });\n this._pipeCache.set(pipeType, pipeMeta);\n this._summaryCache.set(pipeType, pipeMeta.toSummary());\n return pipeMeta;\n };\n CompileMetadataResolver.prototype._getDependenciesMetadata = function (typeOrFunc, dependencies, throwOnUnknownDeps) {\n var _this = this;\n if (throwOnUnknownDeps === void 0) { throwOnUnknownDeps = true; }\n var hasUnknownDeps = false;\n var params = dependencies || this._reflector.parameters(typeOrFunc) || [];\n var dependenciesMetadata = params.map(function (param) {\n var isAttribute = false;\n var isHost = false;\n var isSelf = false;\n var isSkipSelf = false;\n var isOptional = false;\n var token = null;\n if (Array.isArray(param)) {\n param.forEach(function (paramEntry) {\n if (createHost.isTypeOf(paramEntry)) {\n isHost = true;\n }\n else if (createSelf.isTypeOf(paramEntry)) {\n isSelf = true;\n }\n else if (createSkipSelf.isTypeOf(paramEntry)) {\n isSkipSelf = true;\n }\n else if (createOptional.isTypeOf(paramEntry)) {\n isOptional = true;\n }\n else if (createAttribute.isTypeOf(paramEntry)) {\n isAttribute = true;\n token = paramEntry.attributeName;\n }\n else if (createInject.isTypeOf(paramEntry)) {\n token = paramEntry.token;\n }\n else if (createInjectionToken.isTypeOf(paramEntry) || paramEntry instanceof StaticSymbol) {\n token = paramEntry;\n }\n else if (isValidType(paramEntry) && token == null) {\n token = paramEntry;\n }\n });\n }\n else {\n token = param;\n }\n if (token == null) {\n hasUnknownDeps = true;\n return null;\n }\n return {\n isAttribute: isAttribute,\n isHost: isHost,\n isSelf: isSelf,\n isSkipSelf: isSkipSelf,\n isOptional: isOptional,\n token: _this._getTokenMetadata(token)\n };\n });\n if (hasUnknownDeps) {\n var depsTokens = dependenciesMetadata.map(function (dep) { return dep ? stringifyType(dep.token) : '?'; }).join(', ');\n var message = \"Can't resolve all parameters for \" + stringifyType(typeOrFunc) + \": (\" + depsTokens + \").\";\n if (throwOnUnknownDeps || this._config.strictInjectionParameters) {\n this._reportError(syntaxError(message), typeOrFunc);\n }\n else {\n this._console.warn(\"Warning: \" + message + \" This will become an error in Angular v6.x\");\n }\n }\n return dependenciesMetadata;\n };\n CompileMetadataResolver.prototype._getTokenMetadata = function (token) {\n token = resolveForwardRef(token);\n var compileToken;\n if (typeof token === 'string') {\n compileToken = { value: token };\n }\n else {\n compileToken = { identifier: { reference: token } };\n }\n return compileToken;\n };\n CompileMetadataResolver.prototype._getProvidersMetadata = function (providers, targetEntryComponents, debugInfo, compileProviders, type) {\n var _this = this;\n if (compileProviders === void 0) { compileProviders = []; }\n providers.forEach(function (provider, providerIdx) {\n if (Array.isArray(provider)) {\n _this._getProvidersMetadata(provider, targetEntryComponents, debugInfo, compileProviders);\n }\n else {\n provider = resolveForwardRef(provider);\n var providerMeta = undefined;\n if (provider && typeof provider === 'object' && provider.hasOwnProperty('provide')) {\n _this._validateProvider(provider);\n providerMeta = new ProviderMeta(provider.provide, provider);\n }\n else if (isValidType(provider)) {\n providerMeta = new ProviderMeta(provider, { useClass: provider });\n }\n else if (provider === void 0) {\n _this._reportError(syntaxError(\"Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.\"));\n return;\n }\n else {\n var providersInfo = providers.reduce(function (soFar, seenProvider, seenProviderIdx) {\n if (seenProviderIdx < providerIdx) {\n soFar.push(\"\" + stringifyType(seenProvider));\n }\n else if (seenProviderIdx == providerIdx) {\n soFar.push(\"?\" + stringifyType(seenProvider) + \"?\");\n }\n else if (seenProviderIdx == providerIdx + 1) {\n soFar.push('...');\n }\n return soFar;\n }, [])\n .join(', ');\n _this._reportError(syntaxError(\"Invalid \" + (debugInfo ? debugInfo : 'provider') + \" - only instances of Provider and Type are allowed, got: [\" + providersInfo + \"]\"), type);\n return;\n }\n if (providerMeta.token ===\n _this._reflector.resolveExternalReference(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS)) {\n targetEntryComponents.push.apply(targetEntryComponents, __spread(_this._getEntryComponentsFromProvider(providerMeta, type)));\n }\n else {\n compileProviders.push(_this.getProviderMetadata(providerMeta));\n }\n }\n });\n return compileProviders;\n };\n CompileMetadataResolver.prototype._validateProvider = function (provider) {\n if (provider.hasOwnProperty('useClass') && provider.useClass == null) {\n this._reportError(syntaxError(\"Invalid provider for \" + stringifyType(provider.provide) + \". useClass cannot be \" + provider.useClass + \".\\n Usually it happens when:\\n 1. There's a circular dependency (might be caused by using index.ts (barrel) files).\\n 2. Class was used before it was declared. Use forwardRef in this case.\"));\n }\n };\n CompileMetadataResolver.prototype._getEntryComponentsFromProvider = function (provider, type) {\n var _this = this;\n var components = [];\n var collectedIdentifiers = [];\n if (provider.useFactory || provider.useExisting || provider.useClass) {\n this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports useValue!\"), type);\n return [];\n }\n if (!provider.multi) {\n this._reportError(syntaxError(\"The ANALYZE_FOR_ENTRY_COMPONENTS token only supports 'multi = true'!\"), type);\n return [];\n }\n extractIdentifiers(provider.useValue, collectedIdentifiers);\n collectedIdentifiers.forEach(function (identifier) {\n var entry = _this._getEntryComponentMetadata(identifier.reference, false);\n if (entry) {\n components.push(entry);\n }\n });\n return components;\n };\n CompileMetadataResolver.prototype._getEntryComponentMetadata = function (dirType, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var dirMeta = this.getNonNormalizedDirectiveMetadata(dirType);\n if (dirMeta && dirMeta.metadata.isComponent) {\n return { componentType: dirType, componentFactory: dirMeta.metadata.componentFactory };\n }\n var dirSummary = this._loadSummary(dirType, CompileSummaryKind.Directive);\n if (dirSummary && dirSummary.isComponent) {\n return { componentType: dirType, componentFactory: dirSummary.componentFactory };\n }\n if (throwIfNotFound) {\n throw syntaxError(dirType.name + \" cannot be used as an entry component.\");\n }\n return null;\n };\n CompileMetadataResolver.prototype._getInjectableTypeMetadata = function (type, dependencies) {\n if (dependencies === void 0) { dependencies = null; }\n var typeSummary = this._loadSummary(type, CompileSummaryKind.Injectable);\n if (typeSummary) {\n return typeSummary.type;\n }\n return this._getTypeMetadata(type, dependencies);\n };\n CompileMetadataResolver.prototype.getProviderMetadata = function (provider) {\n var compileDeps = undefined;\n var compileTypeMetadata = null;\n var compileFactoryMetadata = null;\n var token = this._getTokenMetadata(provider.token);\n if (provider.useClass) {\n compileTypeMetadata =\n this._getInjectableTypeMetadata(provider.useClass, provider.dependencies);\n compileDeps = compileTypeMetadata.diDeps;\n if (provider.token === provider.useClass) {\n // use the compileTypeMetadata as it contains information about lifecycleHooks...\n token = { identifier: compileTypeMetadata };\n }\n }\n else if (provider.useFactory) {\n compileFactoryMetadata = this._getFactoryMetadata(provider.useFactory, provider.dependencies);\n compileDeps = compileFactoryMetadata.diDeps;\n }\n return {\n token: token,\n useClass: compileTypeMetadata,\n useValue: provider.useValue,\n useFactory: compileFactoryMetadata,\n useExisting: provider.useExisting ? this._getTokenMetadata(provider.useExisting) : undefined,\n deps: compileDeps,\n multi: provider.multi\n };\n };\n CompileMetadataResolver.prototype._getQueriesMetadata = function (queries, isViewQuery, directiveType) {\n var _this = this;\n var res = [];\n Object.keys(queries).forEach(function (propertyName) {\n var query = queries[propertyName];\n if (query.isViewQuery === isViewQuery) {\n res.push(_this._getQueryMetadata(query, propertyName, directiveType));\n }\n });\n return res;\n };\n CompileMetadataResolver.prototype._queryVarBindings = function (selector) { return selector.split(/\\s*,\\s*/); };\n CompileMetadataResolver.prototype._getQueryMetadata = function (q, propertyName, typeOrFunc) {\n var _this = this;\n var selectors;\n if (typeof q.selector === 'string') {\n selectors =\n this._queryVarBindings(q.selector).map(function (varName) { return _this._getTokenMetadata(varName); });\n }\n else {\n if (!q.selector) {\n this._reportError(syntaxError(\"Can't construct a query for the property \\\"\" + propertyName + \"\\\" of \\\"\" + stringifyType(typeOrFunc) + \"\\\" since the query selector wasn't defined.\"), typeOrFunc);\n selectors = [];\n }\n else {\n selectors = [this._getTokenMetadata(q.selector)];\n }\n }\n return {\n selectors: selectors,\n first: q.first,\n descendants: q.descendants, propertyName: propertyName,\n read: q.read ? this._getTokenMetadata(q.read) : null\n };\n };\n CompileMetadataResolver.prototype._reportError = function (error$$1, type, otherType) {\n if (this._errorCollector) {\n this._errorCollector(error$$1, type);\n if (otherType) {\n this._errorCollector(error$$1, otherType);\n }\n }\n else {\n throw error$$1;\n }\n };\n return CompileMetadataResolver;\n}());\nfunction flattenArray(tree, out) {\n if (out === void 0) { out = []; }\n if (tree) {\n for (var i = 0; i < tree.length; i++) {\n var item = resolveForwardRef(tree[i]);\n if (Array.isArray(item)) {\n flattenArray(item, out);\n }\n else {\n out.push(item);\n }\n }\n }\n return out;\n}\nfunction dedupeArray(array) {\n if (array) {\n return Array.from(new Set(array));\n }\n return [];\n}\nfunction flattenAndDedupeArray(tree) {\n return dedupeArray(flattenArray(tree));\n}\nfunction isValidType(value) {\n return (value instanceof StaticSymbol) || (value instanceof Type);\n}\nfunction extractIdentifiers(value, targetIdentifiers) {\n visitValue(value, new _CompileValueConverter(), targetIdentifiers);\n}\nvar _CompileValueConverter = /** @class */ (function (_super) {\n __extends(_CompileValueConverter, _super);\n function _CompileValueConverter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n _CompileValueConverter.prototype.visitOther = function (value, targetIdentifiers) {\n targetIdentifiers.push({ reference: value });\n };\n return _CompileValueConverter;\n}(ValueTransformer));\nfunction stringifyType(type) {\n if (type instanceof StaticSymbol) {\n return type.name + \" in \" + type.filePath;\n }\n else {\n return stringify(type);\n }\n}\n/**\n * Indicates that a component is still being loaded in a synchronous compile.\n */\nfunction componentStillLoadingError(compType) {\n var error$$1 = Error(\"Can't compile synchronously as \" + stringify(compType) + \" is still being loaded!\");\n error$$1[ERROR_COMPONENT_TYPE] = compType;\n return error$$1;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ProviderError = /** @class */ (function (_super) {\n __extends(ProviderError, _super);\n function ProviderError(message, span) {\n return _super.call(this, span, message) || this;\n }\n return ProviderError;\n}(ParseError));\nvar ProviderViewContext = /** @class */ (function () {\n function ProviderViewContext(reflector, component) {\n var _this = this;\n this.reflector = reflector;\n this.component = component;\n this.errors = [];\n this.viewQueries = _getViewQueries(component);\n this.viewProviders = new Map();\n component.viewProviders.forEach(function (provider) {\n if (_this.viewProviders.get(tokenReference(provider.token)) == null) {\n _this.viewProviders.set(tokenReference(provider.token), true);\n }\n });\n }\n return ProviderViewContext;\n}());\nvar ProviderElementContext = /** @class */ (function () {\n function ProviderElementContext(viewContext, _parent, _isViewRoot, _directiveAsts, attrs, refs, isTemplate, contentQueryStartId, _sourceSpan) {\n var _this = this;\n this.viewContext = viewContext;\n this._parent = _parent;\n this._isViewRoot = _isViewRoot;\n this._directiveAsts = _directiveAsts;\n this._sourceSpan = _sourceSpan;\n this._transformedProviders = new Map();\n this._seenProviders = new Map();\n this._queriedTokens = new Map();\n this.transformedHasViewContainer = false;\n this._attrs = {};\n attrs.forEach(function (attrAst) { return _this._attrs[attrAst.name] = attrAst.value; });\n var directivesMeta = _directiveAsts.map(function (directiveAst) { return directiveAst.directive; });\n this._allProviders =\n _resolveProvidersFromDirectives(directivesMeta, _sourceSpan, viewContext.errors);\n this._contentQueries = _getContentQueries(contentQueryStartId, directivesMeta);\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._addQueryReadsTo(provider.token, provider.token, _this._queriedTokens);\n });\n if (isTemplate) {\n var templateRefId = createTokenForExternalReference(this.viewContext.reflector, Identifiers.TemplateRef);\n this._addQueryReadsTo(templateRefId, templateRefId, this._queriedTokens);\n }\n refs.forEach(function (refAst) {\n var defaultQueryValue = refAst.value ||\n createTokenForExternalReference(_this.viewContext.reflector, Identifiers.ElementRef);\n _this._addQueryReadsTo({ value: refAst.name }, defaultQueryValue, _this._queriedTokens);\n });\n if (this._queriedTokens.get(this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef))) {\n this.transformedHasViewContainer = true;\n }\n // create the providers that we know are eager first\n Array.from(this._allProviders.values()).forEach(function (provider) {\n var eager = provider.eager || _this._queriedTokens.get(tokenReference(provider.token));\n if (eager) {\n _this._getOrCreateLocalProvider(provider.providerType, provider.token, true);\n }\n });\n }\n ProviderElementContext.prototype.afterElement = function () {\n var _this = this;\n // collect lazy providers\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._getOrCreateLocalProvider(provider.providerType, provider.token, false);\n });\n };\n Object.defineProperty(ProviderElementContext.prototype, \"transformProviders\", {\n get: function () {\n // Note: Maps keep their insertion order.\n var lazyProviders = [];\n var eagerProviders = [];\n this._transformedProviders.forEach(function (provider) {\n if (provider.eager) {\n eagerProviders.push(provider);\n }\n else {\n lazyProviders.push(provider);\n }\n });\n return lazyProviders.concat(eagerProviders);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProviderElementContext.prototype, \"transformedDirectiveAsts\", {\n get: function () {\n var sortedProviderTypes = this.transformProviders.map(function (provider) { return provider.token.identifier; });\n var sortedDirectives = this._directiveAsts.slice();\n sortedDirectives.sort(function (dir1, dir2) { return sortedProviderTypes.indexOf(dir1.directive.type) -\n sortedProviderTypes.indexOf(dir2.directive.type); });\n return sortedDirectives;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ProviderElementContext.prototype, \"queryMatches\", {\n get: function () {\n var allMatches = [];\n this._queriedTokens.forEach(function (matches) { allMatches.push.apply(allMatches, __spread(matches)); });\n return allMatches;\n },\n enumerable: true,\n configurable: true\n });\n ProviderElementContext.prototype._addQueryReadsTo = function (token, defaultValue, queryReadTokens) {\n this._getQueriesFor(token).forEach(function (query) {\n var queryValue = query.meta.read || defaultValue;\n var tokenRef = tokenReference(queryValue);\n var queryMatches = queryReadTokens.get(tokenRef);\n if (!queryMatches) {\n queryMatches = [];\n queryReadTokens.set(tokenRef, queryMatches);\n }\n queryMatches.push({ queryId: query.queryId, value: queryValue });\n });\n };\n ProviderElementContext.prototype._getQueriesFor = function (token) {\n var result = [];\n var currentEl = this;\n var distance = 0;\n var queries;\n while (currentEl !== null) {\n queries = currentEl._contentQueries.get(tokenReference(token));\n if (queries) {\n result.push.apply(result, __spread(queries.filter(function (query) { return query.meta.descendants || distance <= 1; })));\n }\n if (currentEl._directiveAsts.length > 0) {\n distance++;\n }\n currentEl = currentEl._parent;\n }\n queries = this.viewContext.viewQueries.get(tokenReference(token));\n if (queries) {\n result.push.apply(result, __spread(queries));\n }\n return result;\n };\n ProviderElementContext.prototype._getOrCreateLocalProvider = function (requestingProviderType, token, eager) {\n var _this = this;\n var resolvedProvider = this._allProviders.get(tokenReference(token));\n if (!resolvedProvider || ((requestingProviderType === ProviderAstType.Directive ||\n requestingProviderType === ProviderAstType.PublicService) &&\n resolvedProvider.providerType === ProviderAstType.PrivateService) ||\n ((requestingProviderType === ProviderAstType.PrivateService ||\n requestingProviderType === ProviderAstType.PublicService) &&\n resolvedProvider.providerType === ProviderAstType.Builtin)) {\n return null;\n }\n var transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n if (transformedProviderAst) {\n return transformedProviderAst;\n }\n if (this._seenProviders.get(tokenReference(token)) != null) {\n this.viewContext.errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \" + tokenName(token), this._sourceSpan));\n return null;\n }\n this._seenProviders.set(tokenReference(token), true);\n var transformedProviders = resolvedProvider.providers.map(function (provider) {\n var transformedUseValue = provider.useValue;\n var transformedUseExisting = provider.useExisting;\n var transformedDeps = undefined;\n if (provider.useExisting != null) {\n var existingDiDep = _this._getDependency(resolvedProvider.providerType, { token: provider.useExisting }, eager);\n if (existingDiDep.token != null) {\n transformedUseExisting = existingDiDep.token;\n }\n else {\n transformedUseExisting = null;\n transformedUseValue = existingDiDep.value;\n }\n }\n else if (provider.useFactory) {\n var deps = provider.deps || provider.useFactory.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep, eager); });\n }\n else if (provider.useClass) {\n var deps = provider.deps || provider.useClass.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep, eager); });\n }\n return _transformProvider(provider, {\n useExisting: transformedUseExisting,\n useValue: transformedUseValue,\n deps: transformedDeps\n });\n });\n transformedProviderAst =\n _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });\n this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n return transformedProviderAst;\n };\n ProviderElementContext.prototype._getLocalDependency = function (requestingProviderType, dep, eager) {\n if (eager === void 0) { eager = false; }\n if (dep.isAttribute) {\n var attrValue = this._attrs[dep.token.value];\n return { isValue: true, value: attrValue == null ? null : attrValue };\n }\n if (dep.token != null) {\n // access builtints\n if ((requestingProviderType === ProviderAstType.Directive ||\n requestingProviderType === ProviderAstType.Component)) {\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.Renderer) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ElementRef) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ChangeDetectorRef) ||\n tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n return dep;\n }\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {\n this.transformedHasViewContainer = true;\n }\n }\n // access the injector\n if (tokenReference(dep.token) ===\n this.viewContext.reflector.resolveExternalReference(Identifiers.Injector)) {\n return dep;\n }\n // access providers\n if (this._getOrCreateLocalProvider(requestingProviderType, dep.token, eager) != null) {\n return dep;\n }\n }\n return null;\n };\n ProviderElementContext.prototype._getDependency = function (requestingProviderType, dep, eager) {\n if (eager === void 0) { eager = false; }\n var currElement = this;\n var currEager = eager;\n var result = null;\n if (!dep.isSkipSelf) {\n result = this._getLocalDependency(requestingProviderType, dep, eager);\n }\n if (dep.isSelf) {\n if (!result && dep.isOptional) {\n result = { isValue: true, value: null };\n }\n }\n else {\n // check parent elements\n while (!result && currElement._parent) {\n var prevElement = currElement;\n currElement = currElement._parent;\n if (prevElement._isViewRoot) {\n currEager = false;\n }\n result = currElement._getLocalDependency(ProviderAstType.PublicService, dep, currEager);\n }\n // check @Host restriction\n if (!result) {\n if (!dep.isHost || this.viewContext.component.isHost ||\n this.viewContext.component.type.reference === tokenReference(dep.token) ||\n this.viewContext.viewProviders.get(tokenReference(dep.token)) != null) {\n result = dep;\n }\n else {\n result = dep.isOptional ? { isValue: true, value: null } : null;\n }\n }\n }\n if (!result) {\n this.viewContext.errors.push(new ProviderError(\"No provider for \" + tokenName(dep.token), this._sourceSpan));\n }\n return result;\n };\n return ProviderElementContext;\n}());\nvar NgModuleProviderAnalyzer = /** @class */ (function () {\n function NgModuleProviderAnalyzer(reflector, ngModule, extraProviders, sourceSpan) {\n var _this = this;\n this.reflector = reflector;\n this._transformedProviders = new Map();\n this._seenProviders = new Map();\n this._errors = [];\n this._allProviders = new Map();\n ngModule.transitiveModule.modules.forEach(function (ngModuleType) {\n var ngModuleProvider = { token: { identifier: ngModuleType }, useClass: ngModuleType };\n _resolveProviders([ngModuleProvider], ProviderAstType.PublicService, true, sourceSpan, _this._errors, _this._allProviders, /* isModule */ true);\n });\n _resolveProviders(ngModule.transitiveModule.providers.map(function (entry) { return entry.provider; }).concat(extraProviders), ProviderAstType.PublicService, false, sourceSpan, this._errors, this._allProviders, \n /* isModule */ false);\n }\n NgModuleProviderAnalyzer.prototype.parse = function () {\n var _this = this;\n Array.from(this._allProviders.values()).forEach(function (provider) {\n _this._getOrCreateLocalProvider(provider.token, provider.eager);\n });\n if (this._errors.length > 0) {\n var errorString = this._errors.join('\\n');\n throw new Error(\"Provider parse errors:\\n\" + errorString);\n }\n // Note: Maps keep their insertion order.\n var lazyProviders = [];\n var eagerProviders = [];\n this._transformedProviders.forEach(function (provider) {\n if (provider.eager) {\n eagerProviders.push(provider);\n }\n else {\n lazyProviders.push(provider);\n }\n });\n return lazyProviders.concat(eagerProviders);\n };\n NgModuleProviderAnalyzer.prototype._getOrCreateLocalProvider = function (token, eager) {\n var _this = this;\n var resolvedProvider = this._allProviders.get(tokenReference(token));\n if (!resolvedProvider) {\n return null;\n }\n var transformedProviderAst = this._transformedProviders.get(tokenReference(token));\n if (transformedProviderAst) {\n return transformedProviderAst;\n }\n if (this._seenProviders.get(tokenReference(token)) != null) {\n this._errors.push(new ProviderError(\"Cannot instantiate cyclic dependency! \" + tokenName(token), resolvedProvider.sourceSpan));\n return null;\n }\n this._seenProviders.set(tokenReference(token), true);\n var transformedProviders = resolvedProvider.providers.map(function (provider) {\n var transformedUseValue = provider.useValue;\n var transformedUseExisting = provider.useExisting;\n var transformedDeps = undefined;\n if (provider.useExisting != null) {\n var existingDiDep = _this._getDependency({ token: provider.useExisting }, eager, resolvedProvider.sourceSpan);\n if (existingDiDep.token != null) {\n transformedUseExisting = existingDiDep.token;\n }\n else {\n transformedUseExisting = null;\n transformedUseValue = existingDiDep.value;\n }\n }\n else if (provider.useFactory) {\n var deps = provider.deps || provider.useFactory.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });\n }\n else if (provider.useClass) {\n var deps = provider.deps || provider.useClass.diDeps;\n transformedDeps =\n deps.map(function (dep) { return _this._getDependency(dep, eager, resolvedProvider.sourceSpan); });\n }\n return _transformProvider(provider, {\n useExisting: transformedUseExisting,\n useValue: transformedUseValue,\n deps: transformedDeps\n });\n });\n transformedProviderAst =\n _transformProviderAst(resolvedProvider, { eager: eager, providers: transformedProviders });\n this._transformedProviders.set(tokenReference(token), transformedProviderAst);\n return transformedProviderAst;\n };\n NgModuleProviderAnalyzer.prototype._getDependency = function (dep, eager, requestorSourceSpan) {\n if (eager === void 0) { eager = false; }\n if (!dep.isSkipSelf && dep.token != null) {\n // access the injector\n if (tokenReference(dep.token) ===\n this.reflector.resolveExternalReference(Identifiers.Injector) ||\n tokenReference(dep.token) ===\n this.reflector.resolveExternalReference(Identifiers.ComponentFactoryResolver)) {\n \n // access providers\n }\n else if (this._getOrCreateLocalProvider(dep.token, eager) != null) {\n \n }\n }\n return dep;\n };\n return NgModuleProviderAnalyzer;\n}());\nfunction _transformProvider(provider, _a) {\n var useExisting = _a.useExisting, useValue = _a.useValue, deps = _a.deps;\n return {\n token: provider.token,\n useClass: provider.useClass,\n useExisting: useExisting,\n useFactory: provider.useFactory,\n useValue: useValue,\n deps: deps,\n multi: provider.multi\n };\n}\nfunction _transformProviderAst(provider, _a) {\n var eager = _a.eager, providers = _a.providers;\n return new ProviderAst(provider.token, provider.multiProvider, provider.eager || eager, providers, provider.providerType, provider.lifecycleHooks, provider.sourceSpan, provider.isModule);\n}\nfunction _resolveProvidersFromDirectives(directives, sourceSpan, targetErrors) {\n var providersByToken = new Map();\n directives.forEach(function (directive) {\n var dirProvider = { token: { identifier: directive.type }, useClass: directive.type };\n _resolveProviders([dirProvider], directive.isComponent ? ProviderAstType.Component : ProviderAstType.Directive, true, sourceSpan, targetErrors, providersByToken, /* isModule */ false);\n });\n // Note: directives need to be able to overwrite providers of a component!\n var directivesWithComponentFirst = directives.filter(function (dir) { return dir.isComponent; }).concat(directives.filter(function (dir) { return !dir.isComponent; }));\n directivesWithComponentFirst.forEach(function (directive) {\n _resolveProviders(directive.providers, ProviderAstType.PublicService, false, sourceSpan, targetErrors, providersByToken, /* isModule */ false);\n _resolveProviders(directive.viewProviders, ProviderAstType.PrivateService, false, sourceSpan, targetErrors, providersByToken, /* isModule */ false);\n });\n return providersByToken;\n}\nfunction _resolveProviders(providers, providerType, eager, sourceSpan, targetErrors, targetProvidersByToken, isModule) {\n providers.forEach(function (provider) {\n var resolvedProvider = targetProvidersByToken.get(tokenReference(provider.token));\n if (resolvedProvider != null && !!resolvedProvider.multiProvider !== !!provider.multi) {\n targetErrors.push(new ProviderError(\"Mixing multi and non multi provider is not possible for token \" + tokenName(resolvedProvider.token), sourceSpan));\n }\n if (!resolvedProvider) {\n var lifecycleHooks = provider.token.identifier &&\n provider.token.identifier.lifecycleHooks ?\n provider.token.identifier.lifecycleHooks :\n [];\n var isUseValue = !(provider.useClass || provider.useExisting || provider.useFactory);\n resolvedProvider = new ProviderAst(provider.token, !!provider.multi, eager || isUseValue, [provider], providerType, lifecycleHooks, sourceSpan, isModule);\n targetProvidersByToken.set(tokenReference(provider.token), resolvedProvider);\n }\n else {\n if (!provider.multi) {\n resolvedProvider.providers.length = 0;\n }\n resolvedProvider.providers.push(provider);\n }\n });\n}\nfunction _getViewQueries(component) {\n // Note: queries start with id 1 so we can use the number in a Bloom filter!\n var viewQueryId = 1;\n var viewQueries = new Map();\n if (component.viewQueries) {\n component.viewQueries.forEach(function (query) { return _addQueryToTokenMap(viewQueries, { meta: query, queryId: viewQueryId++ }); });\n }\n return viewQueries;\n}\nfunction _getContentQueries(contentQueryStartId, directives) {\n var contentQueryId = contentQueryStartId;\n var contentQueries = new Map();\n directives.forEach(function (directive, directiveIndex) {\n if (directive.queries) {\n directive.queries.forEach(function (query) { return _addQueryToTokenMap(contentQueries, { meta: query, queryId: contentQueryId++ }); });\n }\n });\n return contentQueries;\n}\nfunction _addQueryToTokenMap(map, query) {\n query.meta.selectors.forEach(function (token) {\n var entry = map.get(tokenReference(token));\n if (!entry) {\n entry = [];\n map.set(tokenReference(token), entry);\n }\n entry.push(query);\n });\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 providerDef(ctx, providerAst) {\n var flags = 0;\n if (!providerAst.eager) {\n flags |= 4096 /* LazyProvider */;\n }\n if (providerAst.providerType === ProviderAstType.PrivateService) {\n flags |= 8192 /* PrivateProvider */;\n }\n if (providerAst.isModule) {\n flags |= 1073741824 /* TypeModuleProvider */;\n }\n providerAst.lifecycleHooks.forEach(function (lifecycleHook) {\n // for regular providers, we only support ngOnDestroy\n if (lifecycleHook === LifecycleHooks.OnDestroy ||\n providerAst.providerType === ProviderAstType.Directive ||\n providerAst.providerType === ProviderAstType.Component) {\n flags |= lifecycleHookToNodeFlag(lifecycleHook);\n }\n });\n var _a = providerAst.multiProvider ?\n multiProviderDef(ctx, flags, providerAst.providers) :\n singleProviderDef(ctx, flags, providerAst.providerType, providerAst.providers[0]), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;\n return {\n providerExpr: providerExpr,\n flags: providerFlags, depsExpr: depsExpr,\n tokenExpr: tokenExpr(ctx, providerAst.token),\n };\n}\nfunction multiProviderDef(ctx, flags, providers) {\n var allDepDefs = [];\n var allParams = [];\n var exprs = providers.map(function (provider, providerIndex) {\n var expr;\n if (provider.useClass) {\n var depExprs = convertDeps(providerIndex, provider.deps || provider.useClass.diDeps);\n expr = ctx.importExpr(provider.useClass.reference).instantiate(depExprs);\n }\n else if (provider.useFactory) {\n var depExprs = convertDeps(providerIndex, provider.deps || provider.useFactory.diDeps);\n expr = ctx.importExpr(provider.useFactory.reference).callFn(depExprs);\n }\n else if (provider.useExisting) {\n var depExprs = convertDeps(providerIndex, [{ token: provider.useExisting }]);\n expr = depExprs[0];\n }\n else {\n expr = convertValueToOutputAst(ctx, provider.useValue);\n }\n return expr;\n });\n var providerExpr = fn(allParams, [new ReturnStatement(literalArr(exprs))], INFERRED_TYPE);\n return {\n providerExpr: providerExpr,\n flags: flags | 1024 /* TypeFactoryProvider */,\n depsExpr: literalArr(allDepDefs)\n };\n function convertDeps(providerIndex, deps) {\n return deps.map(function (dep, depIndex) {\n var paramName = \"p\" + providerIndex + \"_\" + depIndex;\n allParams.push(new FnParam(paramName, DYNAMIC_TYPE));\n allDepDefs.push(depDef(ctx, dep));\n return variable(paramName);\n });\n }\n}\nfunction singleProviderDef(ctx, flags, providerType, providerMeta) {\n var providerExpr;\n var deps;\n if (providerType === ProviderAstType.Directive || providerType === ProviderAstType.Component) {\n providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n flags |= 16384 /* TypeDirective */;\n deps = providerMeta.deps || providerMeta.useClass.diDeps;\n }\n else {\n if (providerMeta.useClass) {\n providerExpr = ctx.importExpr(providerMeta.useClass.reference);\n flags |= 512 /* TypeClassProvider */;\n deps = providerMeta.deps || providerMeta.useClass.diDeps;\n }\n else if (providerMeta.useFactory) {\n providerExpr = ctx.importExpr(providerMeta.useFactory.reference);\n flags |= 1024 /* TypeFactoryProvider */;\n deps = providerMeta.deps || providerMeta.useFactory.diDeps;\n }\n else if (providerMeta.useExisting) {\n providerExpr = NULL_EXPR;\n flags |= 2048 /* TypeUseExistingProvider */;\n deps = [{ token: providerMeta.useExisting }];\n }\n else {\n providerExpr = convertValueToOutputAst(ctx, providerMeta.useValue);\n flags |= 256 /* TypeValueProvider */;\n deps = [];\n }\n }\n var depsExpr = literalArr(deps.map(function (dep) { return depDef(ctx, dep); }));\n return { providerExpr: providerExpr, flags: flags, depsExpr: depsExpr };\n}\nfunction tokenExpr(ctx, tokenMeta) {\n return tokenMeta.identifier ? ctx.importExpr(tokenMeta.identifier.reference) :\n literal(tokenMeta.value);\n}\nfunction depDef(ctx, dep) {\n // Note: the following fields have already been normalized out by provider_analyzer:\n // - isAttribute, isHost\n var expr = dep.isValue ? convertValueToOutputAst(ctx, dep.value) : tokenExpr(ctx, dep.token);\n var flags = 0;\n if (dep.isSkipSelf) {\n flags |= 1 /* SkipSelf */;\n }\n if (dep.isOptional) {\n flags |= 2 /* Optional */;\n }\n if (dep.isSelf) {\n flags |= 4 /* Self */;\n }\n if (dep.isValue) {\n flags |= 8 /* Value */;\n }\n return flags === 0 /* None */ ? expr : literalArr([literal(flags), expr]);\n}\nfunction lifecycleHookToNodeFlag(lifecycleHook) {\n var nodeFlag = 0;\n switch (lifecycleHook) {\n case LifecycleHooks.AfterContentChecked:\n nodeFlag = 2097152 /* AfterContentChecked */;\n break;\n case LifecycleHooks.AfterContentInit:\n nodeFlag = 1048576 /* AfterContentInit */;\n break;\n case LifecycleHooks.AfterViewChecked:\n nodeFlag = 8388608 /* AfterViewChecked */;\n break;\n case LifecycleHooks.AfterViewInit:\n nodeFlag = 4194304 /* AfterViewInit */;\n break;\n case LifecycleHooks.DoCheck:\n nodeFlag = 262144 /* DoCheck */;\n break;\n case LifecycleHooks.OnChanges:\n nodeFlag = 524288 /* OnChanges */;\n break;\n case LifecycleHooks.OnDestroy:\n nodeFlag = 131072 /* OnDestroy */;\n break;\n case LifecycleHooks.OnInit:\n nodeFlag = 65536 /* OnInit */;\n break;\n }\n return nodeFlag;\n}\nfunction componentFactoryResolverProviderDef(reflector, ctx, flags, entryComponents) {\n var entryComponentFactories = entryComponents.map(function (entryComponent) { return ctx.importExpr(entryComponent.componentFactory); });\n var token = createTokenForExternalReference(reflector, Identifiers.ComponentFactoryResolver);\n var classMeta = {\n diDeps: [\n { isValue: true, value: literalArr(entryComponentFactories) },\n { token: token, isSkipSelf: true, isOptional: true },\n { token: createTokenForExternalReference(reflector, Identifiers.NgModuleRef) },\n ],\n lifecycleHooks: [],\n reference: reflector.resolveExternalReference(Identifiers.CodegenComponentFactoryResolver)\n };\n var _a = singleProviderDef(ctx, flags, ProviderAstType.PrivateService, {\n token: token,\n multi: false,\n useClass: classMeta,\n }), providerExpr = _a.providerExpr, providerFlags = _a.flags, depsExpr = _a.depsExpr;\n return { providerExpr: providerExpr, flags: providerFlags, depsExpr: depsExpr, tokenExpr: tokenExpr(ctx, token) };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NgModuleCompileResult = /** @class */ (function () {\n function NgModuleCompileResult(ngModuleFactoryVar) {\n this.ngModuleFactoryVar = ngModuleFactoryVar;\n }\n return NgModuleCompileResult;\n}());\nvar LOG_VAR = variable('_l');\nvar NgModuleCompiler = /** @class */ (function () {\n function NgModuleCompiler(reflector) {\n this.reflector = reflector;\n }\n NgModuleCompiler.prototype.compile = function (ctx, ngModuleMeta, extraProviders) {\n var sourceSpan = typeSourceSpan('NgModule', ngModuleMeta.type);\n var entryComponentFactories = ngModuleMeta.transitiveModule.entryComponents;\n var bootstrapComponents = ngModuleMeta.bootstrapComponents;\n var providerParser = new NgModuleProviderAnalyzer(this.reflector, ngModuleMeta, extraProviders, sourceSpan);\n var providerDefs = [componentFactoryResolverProviderDef(this.reflector, ctx, 0 /* None */, entryComponentFactories)]\n .concat(providerParser.parse().map(function (provider) { return providerDef(ctx, provider); }))\n .map(function (_a) {\n var providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;\n return importExpr(Identifiers.moduleProviderDef).callFn([\n literal(flags), tokenExpr, providerExpr, depsExpr\n ]);\n });\n var ngModuleDef = importExpr(Identifiers.moduleDef).callFn([literalArr(providerDefs)]);\n var ngModuleDefFactory = fn([new FnParam(LOG_VAR.name)], [new ReturnStatement(ngModuleDef)], INFERRED_TYPE);\n var ngModuleFactoryVar = identifierName(ngModuleMeta.type) + \"NgFactory\";\n this._createNgModuleFactory(ctx, ngModuleMeta.type.reference, importExpr(Identifiers.createModuleFactory).callFn([\n ctx.importExpr(ngModuleMeta.type.reference),\n literalArr(bootstrapComponents.map(function (id) { return ctx.importExpr(id.reference); })),\n ngModuleDefFactory\n ]));\n if (ngModuleMeta.id) {\n var id = typeof ngModuleMeta.id === 'string' ? literal(ngModuleMeta.id) :\n ctx.importExpr(ngModuleMeta.id);\n var registerFactoryStmt = importExpr(Identifiers.RegisterModuleFactoryFn)\n .callFn([id, variable(ngModuleFactoryVar)])\n .toStmt();\n ctx.statements.push(registerFactoryStmt);\n }\n return new NgModuleCompileResult(ngModuleFactoryVar);\n };\n NgModuleCompiler.prototype.createStub = function (ctx, ngModuleReference) {\n this._createNgModuleFactory(ctx, ngModuleReference, NULL_EXPR);\n };\n NgModuleCompiler.prototype._createNgModuleFactory = function (ctx, reference, value) {\n var ngModuleFactoryVar = identifierName({ reference: reference }) + \"NgFactory\";\n var ngModuleFactoryStmt = variable(ngModuleFactoryVar)\n .set(value)\n .toDeclStmt(importType(Identifiers.NgModuleFactory, [expressionType(ctx.importExpr(reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]);\n ctx.statements.push(ngModuleFactoryStmt);\n };\n return NgModuleCompiler;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 types to {@link NgModule}.\n */\nvar NgModuleResolver = /** @class */ (function () {\n function NgModuleResolver(_reflector) {\n this._reflector = _reflector;\n }\n NgModuleResolver.prototype.isNgModule = function (type) { return this._reflector.annotations(type).some(createNgModule.isTypeOf); };\n NgModuleResolver.prototype.resolve = function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var ngModuleMeta = findLast(this._reflector.annotations(type), createNgModule.isTypeOf);\n if (ngModuleMeta) {\n return ngModuleMeta;\n }\n else {\n if (throwIfNotFound) {\n throw new Error(\"No NgModule metadata found for '\" + stringify(type) + \"'.\");\n }\n return null;\n }\n };\n return NgModuleResolver;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit\nvar VERSION$1 = 3;\nvar JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';\nvar SourceMapGenerator = /** @class */ (function () {\n function SourceMapGenerator(file) {\n if (file === void 0) { file = null; }\n this.file = file;\n this.sourcesContent = new Map();\n this.lines = [];\n this.lastCol0 = 0;\n this.hasMappings = false;\n }\n // The content is `null` when the content is expected to be loaded using the URL\n SourceMapGenerator.prototype.addSource = function (url, content) {\n if (content === void 0) { content = null; }\n if (!this.sourcesContent.has(url)) {\n this.sourcesContent.set(url, content);\n }\n return this;\n };\n SourceMapGenerator.prototype.addLine = function () {\n this.lines.push([]);\n this.lastCol0 = 0;\n return this;\n };\n SourceMapGenerator.prototype.addMapping = function (col0, sourceUrl, sourceLine0, sourceCol0) {\n if (!this.currentLine) {\n throw new Error(\"A line must be added before mappings can be added\");\n }\n if (sourceUrl != null && !this.sourcesContent.has(sourceUrl)) {\n throw new Error(\"Unknown source file \\\"\" + sourceUrl + \"\\\"\");\n }\n if (col0 == null) {\n throw new Error(\"The column in the generated code must be provided\");\n }\n if (col0 < this.lastCol0) {\n throw new Error(\"Mapping should be added in output order\");\n }\n if (sourceUrl && (sourceLine0 == null || sourceCol0 == null)) {\n throw new Error(\"The source location must be provided when a source url is provided\");\n }\n this.hasMappings = true;\n this.lastCol0 = col0;\n this.currentLine.push({ col0: col0, sourceUrl: sourceUrl, sourceLine0: sourceLine0, sourceCol0: sourceCol0 });\n return this;\n };\n Object.defineProperty(SourceMapGenerator.prototype, \"currentLine\", {\n get: function () { return this.lines.slice(-1)[0]; },\n enumerable: true,\n configurable: true\n });\n SourceMapGenerator.prototype.toJSON = function () {\n var _this = this;\n if (!this.hasMappings) {\n return null;\n }\n var sourcesIndex = new Map();\n var sources = [];\n var sourcesContent = [];\n Array.from(this.sourcesContent.keys()).forEach(function (url, i) {\n sourcesIndex.set(url, i);\n sources.push(url);\n sourcesContent.push(_this.sourcesContent.get(url) || null);\n });\n var mappings = '';\n var lastCol0 = 0;\n var lastSourceIndex = 0;\n var lastSourceLine0 = 0;\n var lastSourceCol0 = 0;\n this.lines.forEach(function (segments) {\n lastCol0 = 0;\n mappings += segments\n .map(function (segment) {\n // zero-based starting column of the line in the generated code\n var segAsStr = toBase64VLQ(segment.col0 - lastCol0);\n lastCol0 = segment.col0;\n if (segment.sourceUrl != null) {\n // zero-based index into the “sources” list\n segAsStr +=\n toBase64VLQ(sourcesIndex.get(segment.sourceUrl) - lastSourceIndex);\n lastSourceIndex = sourcesIndex.get(segment.sourceUrl);\n // the zero-based starting line in the original source\n segAsStr += toBase64VLQ(segment.sourceLine0 - lastSourceLine0);\n lastSourceLine0 = segment.sourceLine0;\n // the zero-based starting column in the original source\n segAsStr += toBase64VLQ(segment.sourceCol0 - lastSourceCol0);\n lastSourceCol0 = segment.sourceCol0;\n }\n return segAsStr;\n })\n .join(',');\n mappings += ';';\n });\n mappings = mappings.slice(0, -1);\n return {\n 'file': this.file || '',\n 'version': VERSION$1,\n 'sourceRoot': '',\n 'sources': sources,\n 'sourcesContent': sourcesContent,\n 'mappings': mappings,\n };\n };\n SourceMapGenerator.prototype.toJsComment = function () {\n return this.hasMappings ? '//' + JS_B64_PREFIX + toBase64String(JSON.stringify(this, null, 0)) :\n '';\n };\n return SourceMapGenerator;\n}());\nfunction toBase64String(value) {\n var b64 = '';\n value = utf8Encode(value);\n for (var i = 0; i < value.length;) {\n var i1 = value.charCodeAt(i++);\n var i2 = value.charCodeAt(i++);\n var i3 = value.charCodeAt(i++);\n b64 += toBase64Digit(i1 >> 2);\n b64 += toBase64Digit(((i1 & 3) << 4) | (isNaN(i2) ? 0 : i2 >> 4));\n b64 += isNaN(i2) ? '=' : toBase64Digit(((i2 & 15) << 2) | (i3 >> 6));\n b64 += isNaN(i2) || isNaN(i3) ? '=' : toBase64Digit(i3 & 63);\n }\n return b64;\n}\nfunction toBase64VLQ(value) {\n value = value < 0 ? ((-value) << 1) + 1 : value << 1;\n var out = '';\n do {\n var digit = value & 31;\n value = value >> 5;\n if (value > 0) {\n digit = digit | 32;\n }\n out += toBase64Digit(digit);\n } while (value > 0);\n return out;\n}\nvar B64_DIGITS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nfunction toBase64Digit(value) {\n if (value < 0 || value >= 64) {\n throw new Error(\"Can only encode value in the range [0, 63]\");\n }\n return B64_DIGITS[value];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _SINGLE_QUOTE_ESCAPE_STRING_RE = /'|\\\\|\\n|\\r|\\$/g;\nvar _LEGAL_IDENTIFIER_RE = /^[$A-Z_][0-9A-Z_$]*$/i;\nvar _INDENT_WITH = ' ';\nvar CATCH_ERROR_VAR$1 = variable('error', null, null);\nvar CATCH_STACK_VAR$1 = variable('stack', null, null);\nvar _EmittedLine = /** @class */ (function () {\n function _EmittedLine(indent) {\n this.indent = indent;\n this.partsLength = 0;\n this.parts = [];\n this.srcSpans = [];\n }\n return _EmittedLine;\n}());\nvar EmitterVisitorContext = /** @class */ (function () {\n function EmitterVisitorContext(_indent) {\n this._indent = _indent;\n this._classes = [];\n this._preambleLineCount = 0;\n this._lines = [new _EmittedLine(_indent)];\n }\n EmitterVisitorContext.createRoot = function () { return new EmitterVisitorContext(0); };\n Object.defineProperty(EmitterVisitorContext.prototype, \"_currentLine\", {\n get: function () { return this._lines[this._lines.length - 1]; },\n enumerable: true,\n configurable: true\n });\n EmitterVisitorContext.prototype.println = function (from, lastPart) {\n if (lastPart === void 0) { lastPart = ''; }\n this.print(from || null, lastPart, true);\n };\n EmitterVisitorContext.prototype.lineIsEmpty = function () { return this._currentLine.parts.length === 0; };\n EmitterVisitorContext.prototype.lineLength = function () {\n return this._currentLine.indent * _INDENT_WITH.length + this._currentLine.partsLength;\n };\n EmitterVisitorContext.prototype.print = function (from, part, newLine) {\n if (newLine === void 0) { newLine = false; }\n if (part.length > 0) {\n this._currentLine.parts.push(part);\n this._currentLine.partsLength += part.length;\n this._currentLine.srcSpans.push(from && from.sourceSpan || null);\n }\n if (newLine) {\n this._lines.push(new _EmittedLine(this._indent));\n }\n };\n EmitterVisitorContext.prototype.removeEmptyLastLine = function () {\n if (this.lineIsEmpty()) {\n this._lines.pop();\n }\n };\n EmitterVisitorContext.prototype.incIndent = function () {\n this._indent++;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n };\n EmitterVisitorContext.prototype.decIndent = function () {\n this._indent--;\n if (this.lineIsEmpty()) {\n this._currentLine.indent = this._indent;\n }\n };\n EmitterVisitorContext.prototype.pushClass = function (clazz) { this._classes.push(clazz); };\n EmitterVisitorContext.prototype.popClass = function () { return this._classes.pop(); };\n Object.defineProperty(EmitterVisitorContext.prototype, \"currentClass\", {\n get: function () {\n return this._classes.length > 0 ? this._classes[this._classes.length - 1] : null;\n },\n enumerable: true,\n configurable: true\n });\n EmitterVisitorContext.prototype.toSource = function () {\n return this.sourceLines\n .map(function (l) { return l.parts.length > 0 ? _createIndent(l.indent) + l.parts.join('') : ''; })\n .join('\\n');\n };\n EmitterVisitorContext.prototype.toSourceMapGenerator = function (genFilePath, startsAtLine) {\n if (startsAtLine === void 0) { startsAtLine = 0; }\n var map = new SourceMapGenerator(genFilePath);\n var firstOffsetMapped = false;\n var mapFirstOffsetIfNeeded = function () {\n if (!firstOffsetMapped) {\n // Add a single space so that tools won't try to load the file from disk.\n // Note: We are using virtual urls like `ng:///`, so we have to\n // provide a content here.\n map.addSource(genFilePath, ' ').addMapping(0, genFilePath, 0, 0);\n firstOffsetMapped = true;\n }\n };\n for (var i = 0; i < startsAtLine; i++) {\n map.addLine();\n mapFirstOffsetIfNeeded();\n }\n this.sourceLines.forEach(function (line, lineIdx) {\n map.addLine();\n var spans = line.srcSpans;\n var parts = line.parts;\n var col0 = line.indent * _INDENT_WITH.length;\n var spanIdx = 0;\n // skip leading parts without source spans\n while (spanIdx < spans.length && !spans[spanIdx]) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n if (spanIdx < spans.length && lineIdx === 0 && col0 === 0) {\n firstOffsetMapped = true;\n }\n else {\n mapFirstOffsetIfNeeded();\n }\n while (spanIdx < spans.length) {\n var span = spans[spanIdx];\n var source = span.start.file;\n var sourceLine = span.start.line;\n var sourceCol = span.start.col;\n map.addSource(source.url, source.content)\n .addMapping(col0, source.url, sourceLine, sourceCol);\n col0 += parts[spanIdx].length;\n spanIdx++;\n // assign parts without span or the same span to the previous segment\n while (spanIdx < spans.length && (span === spans[spanIdx] || !spans[spanIdx])) {\n col0 += parts[spanIdx].length;\n spanIdx++;\n }\n }\n });\n return map;\n };\n EmitterVisitorContext.prototype.setPreambleLineCount = function (count) { return this._preambleLineCount = count; };\n EmitterVisitorContext.prototype.spanOf = function (line, column) {\n var emittedLine = this._lines[line - this._preambleLineCount];\n if (emittedLine) {\n var columnsLeft = column - _createIndent(emittedLine.indent).length;\n for (var partIndex = 0; partIndex < emittedLine.parts.length; partIndex++) {\n var part = emittedLine.parts[partIndex];\n if (part.length > columnsLeft) {\n return emittedLine.srcSpans[partIndex];\n }\n columnsLeft -= part.length;\n }\n }\n return null;\n };\n Object.defineProperty(EmitterVisitorContext.prototype, \"sourceLines\", {\n get: function () {\n if (this._lines.length && this._lines[this._lines.length - 1].parts.length === 0) {\n return this._lines.slice(0, -1);\n }\n return this._lines;\n },\n enumerable: true,\n configurable: true\n });\n return EmitterVisitorContext;\n}());\nvar AbstractEmitterVisitor = /** @class */ (function () {\n function AbstractEmitterVisitor(_escapeDollarInStrings) {\n this._escapeDollarInStrings = _escapeDollarInStrings;\n }\n AbstractEmitterVisitor.prototype.visitExpressionStmt = function (stmt, ctx) {\n stmt.expr.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n };\n AbstractEmitterVisitor.prototype.visitReturnStmt = function (stmt, ctx) {\n ctx.print(stmt, \"return \");\n stmt.value.visitExpression(this, ctx);\n ctx.println(stmt, ';');\n return null;\n };\n AbstractEmitterVisitor.prototype.visitIfStmt = function (stmt, ctx) {\n ctx.print(stmt, \"if (\");\n stmt.condition.visitExpression(this, ctx);\n ctx.print(stmt, \") {\");\n var hasElseCase = stmt.falseCase != null && stmt.falseCase.length > 0;\n if (stmt.trueCase.length <= 1 && !hasElseCase) {\n ctx.print(stmt, \" \");\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.removeEmptyLastLine();\n ctx.print(stmt, \" \");\n }\n else {\n ctx.println();\n ctx.incIndent();\n this.visitAllStatements(stmt.trueCase, ctx);\n ctx.decIndent();\n if (hasElseCase) {\n ctx.println(stmt, \"} else {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.falseCase, ctx);\n ctx.decIndent();\n }\n }\n ctx.println(stmt, \"}\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitThrowStmt = function (stmt, ctx) {\n ctx.print(stmt, \"throw \");\n stmt.error.visitExpression(this, ctx);\n ctx.println(stmt, \";\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitCommentStmt = function (stmt, ctx) {\n if (stmt.multiline) {\n ctx.println(stmt, \"/* \" + stmt.comment + \" */\");\n }\n else {\n stmt.comment.split('\\n').forEach(function (line) { ctx.println(stmt, \"// \" + line); });\n }\n return null;\n };\n AbstractEmitterVisitor.prototype.visitJSDocCommentStmt = function (stmt, ctx) {\n ctx.println(stmt, \"/*\" + stmt.toString() + \"*/\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitWriteVarExpr = function (expr, ctx) {\n var lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n ctx.print(expr, expr.name + \" = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n AbstractEmitterVisitor.prototype.visitWriteKeyExpr = function (expr, ctx) {\n var lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, \"[\");\n expr.index.visitExpression(this, ctx);\n ctx.print(expr, \"] = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n AbstractEmitterVisitor.prototype.visitWritePropExpr = function (expr, ctx) {\n var lineWasEmpty = ctx.lineIsEmpty();\n if (!lineWasEmpty) {\n ctx.print(expr, '(');\n }\n expr.receiver.visitExpression(this, ctx);\n ctx.print(expr, \".\" + expr.name + \" = \");\n expr.value.visitExpression(this, ctx);\n if (!lineWasEmpty) {\n ctx.print(expr, ')');\n }\n return null;\n };\n AbstractEmitterVisitor.prototype.visitInvokeMethodExpr = function (expr, ctx) {\n expr.receiver.visitExpression(this, ctx);\n var name = expr.name;\n if (expr.builtin != null) {\n name = this.getBuiltinMethodName(expr.builtin);\n if (name == null) {\n // some builtins just mean to skip the call.\n return null;\n }\n }\n ctx.print(expr, \".\" + name + \"(\");\n this.visitAllExpressions(expr.args, ctx, \",\");\n ctx.print(expr, \")\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitInvokeFunctionExpr = function (expr, ctx) {\n expr.fn.visitExpression(this, ctx);\n ctx.print(expr, \"(\");\n this.visitAllExpressions(expr.args, ctx, ',');\n ctx.print(expr, \")\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitReadVarExpr = function (ast, ctx) {\n var varName = ast.name;\n if (ast.builtin != null) {\n switch (ast.builtin) {\n case BuiltinVar.Super:\n varName = 'super';\n break;\n case BuiltinVar.This:\n varName = 'this';\n break;\n case BuiltinVar.CatchError:\n varName = CATCH_ERROR_VAR$1.name;\n break;\n case BuiltinVar.CatchStack:\n varName = CATCH_STACK_VAR$1.name;\n break;\n default:\n throw new Error(\"Unknown builtin variable \" + ast.builtin);\n }\n }\n ctx.print(ast, varName);\n return null;\n };\n AbstractEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {\n ctx.print(ast, \"new \");\n ast.classExpr.visitExpression(this, ctx);\n ctx.print(ast, \"(\");\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, \")\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {\n var value = ast.value;\n if (typeof value === 'string') {\n ctx.print(ast, escapeIdentifier(value, this._escapeDollarInStrings));\n }\n else {\n ctx.print(ast, \"\" + value);\n }\n return null;\n };\n AbstractEmitterVisitor.prototype.visitConditionalExpr = function (ast, ctx) {\n ctx.print(ast, \"(\");\n ast.condition.visitExpression(this, ctx);\n ctx.print(ast, '? ');\n ast.trueCase.visitExpression(this, ctx);\n ctx.print(ast, ': ');\n ast.falseCase.visitExpression(this, ctx);\n ctx.print(ast, \")\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitNotExpr = function (ast, ctx) {\n ctx.print(ast, '!');\n ast.condition.visitExpression(this, ctx);\n return null;\n };\n AbstractEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {\n ast.condition.visitExpression(this, ctx);\n return null;\n };\n AbstractEmitterVisitor.prototype.visitBinaryOperatorExpr = function (ast, ctx) {\n var opStr;\n switch (ast.operator) {\n case BinaryOperator.Equals:\n opStr = '==';\n break;\n case BinaryOperator.Identical:\n opStr = '===';\n break;\n case BinaryOperator.NotEquals:\n opStr = '!=';\n break;\n case BinaryOperator.NotIdentical:\n opStr = '!==';\n break;\n case BinaryOperator.And:\n opStr = '&&';\n break;\n case BinaryOperator.BitwiseAnd:\n opStr = '&';\n break;\n case BinaryOperator.Or:\n opStr = '||';\n break;\n case BinaryOperator.Plus:\n opStr = '+';\n break;\n case BinaryOperator.Minus:\n opStr = '-';\n break;\n case BinaryOperator.Divide:\n opStr = '/';\n break;\n case BinaryOperator.Multiply:\n opStr = '*';\n break;\n case BinaryOperator.Modulo:\n opStr = '%';\n break;\n case BinaryOperator.Lower:\n opStr = '<';\n break;\n case BinaryOperator.LowerEquals:\n opStr = '<=';\n break;\n case BinaryOperator.Bigger:\n opStr = '>';\n break;\n case BinaryOperator.BiggerEquals:\n opStr = '>=';\n break;\n default:\n throw new Error(\"Unknown operator \" + ast.operator);\n }\n if (ast.parens)\n ctx.print(ast, \"(\");\n ast.lhs.visitExpression(this, ctx);\n ctx.print(ast, \" \" + opStr + \" \");\n ast.rhs.visitExpression(this, ctx);\n if (ast.parens)\n ctx.print(ast, \")\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitReadPropExpr = function (ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, \".\");\n ctx.print(ast, ast.name);\n return null;\n };\n AbstractEmitterVisitor.prototype.visitReadKeyExpr = function (ast, ctx) {\n ast.receiver.visitExpression(this, ctx);\n ctx.print(ast, \"[\");\n ast.index.visitExpression(this, ctx);\n ctx.print(ast, \"]\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {\n ctx.print(ast, \"[\");\n this.visitAllExpressions(ast.entries, ctx, ',');\n ctx.print(ast, \"]\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitLiteralMapExpr = function (ast, ctx) {\n var _this = this;\n ctx.print(ast, \"{\");\n this.visitAllObjects(function (entry) {\n ctx.print(ast, escapeIdentifier(entry.key, _this._escapeDollarInStrings, entry.quoted) + \":\");\n entry.value.visitExpression(_this, ctx);\n }, ast.entries, ctx, ',');\n ctx.print(ast, \"}\");\n return null;\n };\n AbstractEmitterVisitor.prototype.visitCommaExpr = function (ast, ctx) {\n ctx.print(ast, '(');\n this.visitAllExpressions(ast.parts, ctx, ',');\n ctx.print(ast, ')');\n return null;\n };\n AbstractEmitterVisitor.prototype.visitAllExpressions = function (expressions, ctx, separator) {\n var _this = this;\n this.visitAllObjects(function (expr) { return expr.visitExpression(_this, ctx); }, expressions, ctx, separator);\n };\n AbstractEmitterVisitor.prototype.visitAllObjects = function (handler, expressions, ctx, separator) {\n var incrementedIndent = false;\n for (var i = 0; i < expressions.length; i++) {\n if (i > 0) {\n if (ctx.lineLength() > 80) {\n ctx.print(null, separator, true);\n if (!incrementedIndent) {\n // continuation are marked with double indent.\n ctx.incIndent();\n ctx.incIndent();\n incrementedIndent = true;\n }\n }\n else {\n ctx.print(null, separator, false);\n }\n }\n handler(expressions[i]);\n }\n if (incrementedIndent) {\n // continuation are marked with double indent.\n ctx.decIndent();\n ctx.decIndent();\n }\n };\n AbstractEmitterVisitor.prototype.visitAllStatements = function (statements, ctx) {\n var _this = this;\n statements.forEach(function (stmt) { return stmt.visitStatement(_this, ctx); });\n };\n return AbstractEmitterVisitor;\n}());\nfunction escapeIdentifier(input, escapeDollar, alwaysQuote) {\n if (alwaysQuote === void 0) { alwaysQuote = true; }\n if (input == null) {\n return null;\n }\n var body = input.replace(_SINGLE_QUOTE_ESCAPE_STRING_RE, function () {\n var match = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n match[_i] = arguments[_i];\n }\n if (match[0] == '$') {\n return escapeDollar ? '\\\\$' : '$';\n }\n else if (match[0] == '\\n') {\n return '\\\\n';\n }\n else if (match[0] == '\\r') {\n return '\\\\r';\n }\n else {\n return \"\\\\\" + match[0];\n }\n });\n var requiresQuotes = alwaysQuote || !_LEGAL_IDENTIFIER_RE.test(body);\n return requiresQuotes ? \"'\" + body + \"'\" : body;\n}\nfunction _createIndent(count) {\n var res = '';\n for (var i = 0; i < count; i++) {\n res += _INDENT_WITH;\n }\n return res;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 debugOutputAstAsTypeScript(ast) {\n var converter = new _TsEmitterVisitor();\n var ctx = EmitterVisitorContext.createRoot();\n var asts = Array.isArray(ast) ? ast : [ast];\n asts.forEach(function (ast) {\n if (ast instanceof Statement) {\n ast.visitStatement(converter, ctx);\n }\n else if (ast instanceof Expression) {\n ast.visitExpression(converter, ctx);\n }\n else if (ast instanceof Type$1) {\n ast.visitType(converter, ctx);\n }\n else {\n throw new Error(\"Don't know how to print debug info for \" + ast);\n }\n });\n return ctx.toSource();\n}\nvar TypeScriptEmitter = /** @class */ (function () {\n function TypeScriptEmitter() {\n }\n TypeScriptEmitter.prototype.emitStatementsAndContext = function (genFilePath, stmts, preamble, emitSourceMaps, referenceFilter, importFilter) {\n if (preamble === void 0) { preamble = ''; }\n if (emitSourceMaps === void 0) { emitSourceMaps = true; }\n var converter = new _TsEmitterVisitor(referenceFilter, importFilter);\n var ctx = EmitterVisitorContext.createRoot();\n converter.visitAllStatements(stmts, ctx);\n var preambleLines = preamble ? preamble.split('\\n') : [];\n converter.reexports.forEach(function (reexports, exportedModuleName) {\n var reexportsCode = reexports.map(function (reexport) { return reexport.name + \" as \" + reexport.as; }).join(',');\n preambleLines.push(\"export {\" + reexportsCode + \"} from '\" + exportedModuleName + \"';\");\n });\n converter.importsWithPrefixes.forEach(function (prefix, importedModuleName) {\n // Note: can't write the real word for import as it screws up system.js auto detection...\n preambleLines.push(\"imp\" +\n (\"ort * as \" + prefix + \" from '\" + importedModuleName + \"';\"));\n });\n var sm = emitSourceMaps ?\n ctx.toSourceMapGenerator(genFilePath, preambleLines.length).toJsComment() :\n '';\n var lines = __spread(preambleLines, [ctx.toSource(), sm]);\n if (sm) {\n // always add a newline at the end, as some tools have bugs without it.\n lines.push('');\n }\n ctx.setPreambleLineCount(preambleLines.length);\n return { sourceText: lines.join('\\n'), context: ctx };\n };\n TypeScriptEmitter.prototype.emitStatements = function (genFilePath, stmts, preamble) {\n if (preamble === void 0) { preamble = ''; }\n return this.emitStatementsAndContext(genFilePath, stmts, preamble).sourceText;\n };\n return TypeScriptEmitter;\n}());\nvar _TsEmitterVisitor = /** @class */ (function (_super) {\n __extends(_TsEmitterVisitor, _super);\n function _TsEmitterVisitor(referenceFilter, importFilter) {\n var _this = _super.call(this, false) || this;\n _this.referenceFilter = referenceFilter;\n _this.importFilter = importFilter;\n _this.typeExpression = 0;\n _this.importsWithPrefixes = new Map();\n _this.reexports = new Map();\n return _this;\n }\n _TsEmitterVisitor.prototype.visitType = function (t, ctx, defaultType) {\n if (defaultType === void 0) { defaultType = 'any'; }\n if (t) {\n this.typeExpression++;\n t.visitType(this, ctx);\n this.typeExpression--;\n }\n else {\n ctx.print(null, defaultType);\n }\n };\n _TsEmitterVisitor.prototype.visitLiteralExpr = function (ast, ctx) {\n var value = ast.value;\n if (value == null && ast.type != INFERRED_TYPE) {\n ctx.print(ast, \"(\" + value + \" as any)\");\n return null;\n }\n return _super.prototype.visitLiteralExpr.call(this, ast, ctx);\n };\n // Temporary workaround to support strictNullCheck enabled consumers of ngc emit.\n // In SNC mode, [] have the type never[], so we cast here to any[].\n // TODO: narrow the cast to a more explicit type, or use a pattern that does not\n // start with [].concat. see https://github.com/angular/angular/pull/11846\n _TsEmitterVisitor.prototype.visitLiteralArrayExpr = function (ast, ctx) {\n if (ast.entries.length === 0) {\n ctx.print(ast, '(');\n }\n var result = _super.prototype.visitLiteralArrayExpr.call(this, ast, ctx);\n if (ast.entries.length === 0) {\n ctx.print(ast, ' as any[])');\n }\n return result;\n };\n _TsEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {\n this._visitIdentifier(ast.value, ast.typeParams, ctx);\n return null;\n };\n _TsEmitterVisitor.prototype.visitAssertNotNullExpr = function (ast, ctx) {\n var result = _super.prototype.visitAssertNotNullExpr.call(this, ast, ctx);\n ctx.print(ast, '!');\n return result;\n };\n _TsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported) && stmt.value instanceof ExternalExpr &&\n !stmt.type) {\n // check for a reexport\n var _a = stmt.value.value, name_1 = _a.name, moduleName = _a.moduleName;\n if (moduleName) {\n var reexports = this.reexports.get(moduleName);\n if (!reexports) {\n reexports = [];\n this.reexports.set(moduleName, reexports);\n }\n reexports.push({ name: name_1, as: stmt.name });\n return null;\n }\n }\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n if (stmt.hasModifier(StmtModifier.Final)) {\n ctx.print(stmt, \"const\");\n }\n else {\n ctx.print(stmt, \"var\");\n }\n ctx.print(stmt, \" \" + stmt.name);\n this._printColonType(stmt.type, ctx);\n if (stmt.value) {\n ctx.print(stmt, \" = \");\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, \";\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {\n ctx.print(ast, \"(<\");\n ast.type.visitType(this, ctx);\n ctx.print(ast, \">\");\n ast.value.visitExpression(this, ctx);\n ctx.print(ast, \")\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitInstantiateExpr = function (ast, ctx) {\n ctx.print(ast, \"new \");\n this.typeExpression++;\n ast.classExpr.visitExpression(this, ctx);\n this.typeExpression--;\n ctx.print(ast, \"(\");\n this.visitAllExpressions(ast.args, ctx, ',');\n ctx.print(ast, \")\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {\n var _this = this;\n ctx.pushClass(stmt);\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n ctx.print(stmt, \"class \" + stmt.name);\n if (stmt.parent != null) {\n ctx.print(stmt, \" extends \");\n this.typeExpression++;\n stmt.parent.visitExpression(this, ctx);\n this.typeExpression--;\n }\n ctx.println(stmt, \" {\");\n ctx.incIndent();\n stmt.fields.forEach(function (field) { return _this._visitClassField(field, ctx); });\n if (stmt.constructorMethod != null) {\n this._visitClassConstructor(stmt, ctx);\n }\n stmt.getters.forEach(function (getter) { return _this._visitClassGetter(getter, ctx); });\n stmt.methods.forEach(function (method) { return _this._visitClassMethod(method, ctx); });\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n ctx.popClass();\n return null;\n };\n _TsEmitterVisitor.prototype._visitClassField = function (field, ctx) {\n if (field.hasModifier(StmtModifier.Private)) {\n // comment out as a workaround for #10967\n ctx.print(null, \"/*private*/ \");\n }\n if (field.hasModifier(StmtModifier.Static)) {\n ctx.print(null, 'static ');\n }\n ctx.print(null, field.name);\n this._printColonType(field.type, ctx);\n if (field.initializer) {\n ctx.print(null, ' = ');\n field.initializer.visitExpression(this, ctx);\n }\n ctx.println(null, \";\");\n };\n _TsEmitterVisitor.prototype._visitClassGetter = function (getter, ctx) {\n if (getter.hasModifier(StmtModifier.Private)) {\n ctx.print(null, \"private \");\n }\n ctx.print(null, \"get \" + getter.name + \"()\");\n this._printColonType(getter.type, ctx);\n ctx.println(null, \" {\");\n ctx.incIndent();\n this.visitAllStatements(getter.body, ctx);\n ctx.decIndent();\n ctx.println(null, \"}\");\n };\n _TsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {\n ctx.print(stmt, \"constructor(\");\n this._visitParams(stmt.constructorMethod.params, ctx);\n ctx.println(stmt, \") {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.constructorMethod.body, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n };\n _TsEmitterVisitor.prototype._visitClassMethod = function (method, ctx) {\n if (method.hasModifier(StmtModifier.Private)) {\n ctx.print(null, \"private \");\n }\n ctx.print(null, method.name + \"(\");\n this._visitParams(method.params, ctx);\n ctx.print(null, \")\");\n this._printColonType(method.type, ctx, 'void');\n ctx.println(null, \" {\");\n ctx.incIndent();\n this.visitAllStatements(method.body, ctx);\n ctx.decIndent();\n ctx.println(null, \"}\");\n };\n _TsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {\n if (ast.name) {\n ctx.print(ast, 'function ');\n ctx.print(ast, ast.name);\n }\n ctx.print(ast, \"(\");\n this._visitParams(ast.params, ctx);\n ctx.print(ast, \")\");\n this._printColonType(ast.type, ctx, 'void');\n if (!ast.name) {\n ctx.print(ast, \" => \");\n }\n ctx.println(ast, '{');\n ctx.incIndent();\n this.visitAllStatements(ast.statements, ctx);\n ctx.decIndent();\n ctx.print(ast, \"}\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.print(stmt, \"export \");\n }\n ctx.print(stmt, \"function \" + stmt.name + \"(\");\n this._visitParams(stmt.params, ctx);\n ctx.print(stmt, \")\");\n this._printColonType(stmt.type, ctx, 'void');\n ctx.println(stmt, \" {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.statements, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {\n ctx.println(stmt, \"try {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.bodyStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"} catch (\" + CATCH_ERROR_VAR$1.name + \") {\");\n ctx.incIndent();\n var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack', null)).toDeclStmt(null, [\n StmtModifier.Final\n ])].concat(stmt.catchStmts);\n this.visitAllStatements(catchStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitBuiltinType = function (type, ctx) {\n var typeStr;\n switch (type.name) {\n case BuiltinTypeName.Bool:\n typeStr = 'boolean';\n break;\n case BuiltinTypeName.Dynamic:\n typeStr = 'any';\n break;\n case BuiltinTypeName.Function:\n typeStr = 'Function';\n break;\n case BuiltinTypeName.Number:\n typeStr = 'number';\n break;\n case BuiltinTypeName.Int:\n typeStr = 'number';\n break;\n case BuiltinTypeName.String:\n typeStr = 'string';\n break;\n default:\n throw new Error(\"Unsupported builtin type \" + type.name);\n }\n ctx.print(null, typeStr);\n return null;\n };\n _TsEmitterVisitor.prototype.visitExpressionType = function (ast, ctx) {\n ast.value.visitExpression(this, ctx);\n return null;\n };\n _TsEmitterVisitor.prototype.visitArrayType = function (type, ctx) {\n this.visitType(type.of, ctx);\n ctx.print(null, \"[]\");\n return null;\n };\n _TsEmitterVisitor.prototype.visitMapType = function (type, ctx) {\n ctx.print(null, \"{[key: string]:\");\n this.visitType(type.valueType, ctx);\n ctx.print(null, \"}\");\n return null;\n };\n _TsEmitterVisitor.prototype.getBuiltinMethodName = function (method) {\n var name;\n switch (method) {\n case BuiltinMethod.ConcatArray:\n name = 'concat';\n break;\n case BuiltinMethod.SubscribeObservable:\n name = 'subscribe';\n break;\n case BuiltinMethod.Bind:\n name = 'bind';\n break;\n default:\n throw new Error(\"Unknown builtin method: \" + method);\n }\n return name;\n };\n _TsEmitterVisitor.prototype._visitParams = function (params, ctx) {\n var _this = this;\n this.visitAllObjects(function (param) {\n ctx.print(null, param.name);\n _this._printColonType(param.type, ctx);\n }, params, ctx, ',');\n };\n _TsEmitterVisitor.prototype._visitIdentifier = function (value, typeParams, ctx) {\n var _this = this;\n var name = value.name, moduleName = value.moduleName;\n if (this.referenceFilter && this.referenceFilter(value)) {\n ctx.print(null, '(null as any)');\n return;\n }\n if (moduleName && (!this.importFilter || !this.importFilter(value))) {\n var prefix = this.importsWithPrefixes.get(moduleName);\n if (prefix == null) {\n prefix = \"i\" + this.importsWithPrefixes.size;\n this.importsWithPrefixes.set(moduleName, prefix);\n }\n ctx.print(null, prefix + \".\");\n }\n ctx.print(null, name);\n if (this.typeExpression > 0) {\n // If we are in a type expression that refers to a generic type then supply\n // the required type parameters. If there were not enough type parameters\n // supplied, supply any as the type. Outside a type expression the reference\n // should not supply type parameters and be treated as a simple value reference\n // to the constructor function itself.\n var suppliedParameters = typeParams || [];\n if (suppliedParameters.length > 0) {\n ctx.print(null, \"<\");\n this.visitAllObjects(function (type) { return type.visitType(_this, ctx); }, typeParams, ctx, ',');\n ctx.print(null, \">\");\n }\n }\n };\n _TsEmitterVisitor.prototype._printColonType = function (type, ctx, defaultType) {\n if (type !== INFERRED_TYPE) {\n ctx.print(null, ':');\n this.visitType(type, ctx, defaultType);\n }\n };\n return _TsEmitterVisitor;\n}(AbstractEmitterVisitor));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Resolve a `Type` for {@link Pipe}.\n *\n * This interface can be overridden by the application developer to create custom behavior.\n *\n * See {@link Compiler}\n */\nvar PipeResolver = /** @class */ (function () {\n function PipeResolver(_reflector) {\n this._reflector = _reflector;\n }\n PipeResolver.prototype.isPipe = function (type) {\n var typeMetadata = this._reflector.annotations(resolveForwardRef(type));\n return typeMetadata && typeMetadata.some(createPipe.isTypeOf);\n };\n /**\n * Return {@link Pipe} for a given `Type`.\n */\n PipeResolver.prototype.resolve = function (type, throwIfNotFound) {\n if (throwIfNotFound === void 0) { throwIfNotFound = true; }\n var metas = this._reflector.annotations(resolveForwardRef(type));\n if (metas) {\n var annotation = findLast(metas, createPipe.isTypeOf);\n if (annotation) {\n return annotation;\n }\n }\n if (throwIfNotFound) {\n throw new Error(\"No Pipe decorator found on \" + stringify(type));\n }\n return null;\n };\n return PipeResolver;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS LIST OF SECURITY SENSITIVE PROPERTIES WITHOUT A SECURITY REVIEW!\n// Reach out to mprobst for details.\n//\n// =================================================================================================\n/** Map from tagName|propertyName SecurityContext. Properties applying to all tags use '*'. */\nvar SECURITY_SCHEMA = {};\nfunction registerContext(ctx, specs) {\n try {\n for (var specs_1 = __values(specs), specs_1_1 = specs_1.next(); !specs_1_1.done; specs_1_1 = specs_1.next()) {\n var spec = specs_1_1.value;\n SECURITY_SCHEMA[spec.toLowerCase()] = ctx;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (specs_1_1 && !specs_1_1.done && (_a = specs_1.return)) _a.call(specs_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var e_1, _a;\n}\n// Case is insignificant below, all element and attribute names are lower-cased for lookup.\nregisterContext(SecurityContext.HTML, [\n 'iframe|srcdoc',\n '*|innerHTML',\n '*|outerHTML',\n]);\nregisterContext(SecurityContext.STYLE, ['*|style']);\n// NB: no SCRIPT contexts here, they are never allowed due to the parser stripping them.\nregisterContext(SecurityContext.URL, [\n '*|formAction', 'area|href', 'area|ping', 'audio|src', 'a|href',\n 'a|ping', 'blockquote|cite', 'body|background', 'del|cite', 'form|action',\n 'img|src', 'img|srcset', 'input|src', 'ins|cite', 'q|cite',\n 'source|src', 'source|srcset', 'track|src', 'video|poster', 'video|src',\n]);\nregisterContext(SecurityContext.RESOURCE_URL, [\n 'applet|code',\n 'applet|codebase',\n 'base|href',\n 'embed|src',\n 'frame|src',\n 'head|profile',\n 'html|manifest',\n 'iframe|src',\n 'link|href',\n 'media|src',\n 'object|codebase',\n 'object|data',\n 'script|src',\n]);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ElementSchemaRegistry = /** @class */ (function () {\n function ElementSchemaRegistry() {\n }\n return ElementSchemaRegistry;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 BOOLEAN = 'boolean';\nvar NUMBER = 'number';\nvar STRING = 'string';\nvar OBJECT = 'object';\n/**\n * This array represents the DOM schema. It encodes inheritance, properties, and events.\n *\n * ## Overview\n *\n * Each line represents one kind of element. The `element_inheritance` and properties are joined\n * using `element_inheritance|properties` syntax.\n *\n * ## Element Inheritance\n *\n * The `element_inheritance` can be further subdivided as `element1,element2,...^parentElement`.\n * Here the individual elements are separated by `,` (commas). Every element in the list\n * has identical properties.\n *\n * An `element` may inherit additional properties from `parentElement` If no `^parentElement` is\n * specified then `\"\"` (blank) element is assumed.\n *\n * NOTE: The blank element inherits from root `[Element]` element, the super element of all\n * elements.\n *\n * NOTE an element prefix such as `:svg:` has no special meaning to the schema.\n *\n * ## Properties\n *\n * Each element has a set of properties separated by `,` (commas). Each property can be prefixed\n * by a special character designating its type:\n *\n * - (no prefix): property is a string.\n * - `*`: property represents an event.\n * - `!`: property is a boolean.\n * - `#`: property is a number.\n * - `%`: property is an object.\n *\n * ## Query\n *\n * The class creates an internal squas representation which allows to easily answer the query of\n * if a given property exist on a given element.\n *\n * NOTE: We don't yet support querying for types or events.\n * NOTE: This schema is auto extracted from `schema_extractor.ts` located in the test folder,\n * see dom_element_schema_registry_spec.ts\n */\n// =================================================================================================\n// =================================================================================================\n// =========== S T O P - S T O P - S T O P - S T O P - S T O P - S T O P ===========\n// =================================================================================================\n// =================================================================================================\n//\n// DO NOT EDIT THIS DOM SCHEMA WITHOUT A SECURITY REVIEW!\n//\n// Newly added properties must be security reviewed and assigned an appropriate SecurityContext in\n// dom_security_schema.ts. Reach out to mprobst & rjamet for details.\n//\n// =================================================================================================\nvar SCHEMA = [\n '[Element]|textContent,%classList,className,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*copy,*cut,*paste,*search,*selectstart,*webkitfullscreenchange,*webkitfullscreenerror,*wheel,outerHTML,#scrollLeft,#scrollTop,slot' +\n /* added manually to avoid breaking changes */\n ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',\n '[HTMLElement]^[Element]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'abbr,address,article,aside,b,bdi,bdo,cite,code,dd,dfn,dt,em,figcaption,figure,footer,header,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,contentEditable,dir,!draggable,!hidden,innerText,lang,*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,outerText,!spellcheck,%style,#tabIndex,title,!translate',\n 'media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,src,%srcObject,#volume',\n ':svg:^[HTMLElement]|*abort,*auxclick,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*cuechange,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*seeked,*seeking,*select,*show,*stalled,*submit,*suspend,*timeupdate,*toggle,*volumechange,*waiting,%style,#tabIndex',\n ':svg:graphics^:svg:|',\n ':svg:animation^:svg:|*begin,*end,*repeat',\n ':svg:geometry^:svg:|',\n ':svg:componentTransferFunction^:svg:|',\n ':svg:gradient^:svg:|',\n ':svg:textContent^:svg:graphics|',\n ':svg:textPositioning^:svg:textContent|',\n 'a^[HTMLElement]|charset,coords,download,hash,host,hostname,href,hreflang,name,password,pathname,ping,port,protocol,referrerPolicy,rel,rev,search,shape,target,text,type,username',\n 'area^[HTMLElement]|alt,coords,download,hash,host,hostname,href,!noHref,password,pathname,ping,port,protocol,referrerPolicy,rel,search,shape,target,username',\n 'audio^media|',\n 'br^[HTMLElement]|clear',\n 'base^[HTMLElement]|href,target',\n 'body^[HTMLElement]|aLink,background,bgColor,link,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,text,vLink',\n 'button^[HTMLElement]|!autofocus,!disabled,formAction,formEnctype,formMethod,!formNoValidate,formTarget,name,type,value',\n 'canvas^[HTMLElement]|#height,#width',\n 'content^[HTMLElement]|select',\n 'dl^[HTMLElement]|!compact',\n 'datalist^[HTMLElement]|',\n 'details^[HTMLElement]|!open',\n 'dialog^[HTMLElement]|!open,returnValue',\n 'dir^[HTMLElement]|!compact',\n 'div^[HTMLElement]|align',\n 'embed^[HTMLElement]|align,height,name,src,type,width',\n 'fieldset^[HTMLElement]|!disabled,name',\n 'font^[HTMLElement]|color,face,size',\n 'form^[HTMLElement]|acceptCharset,action,autocomplete,encoding,enctype,method,name,!noValidate,target',\n 'frame^[HTMLElement]|frameBorder,longDesc,marginHeight,marginWidth,name,!noResize,scrolling,src',\n 'frameset^[HTMLElement]|cols,*beforeunload,*blur,*error,*focus,*hashchange,*languagechange,*load,*message,*offline,*online,*pagehide,*pageshow,*popstate,*rejectionhandled,*resize,*scroll,*storage,*unhandledrejection,*unload,rows',\n 'hr^[HTMLElement]|align,color,!noShade,size,width',\n 'head^[HTMLElement]|',\n 'h1,h2,h3,h4,h5,h6^[HTMLElement]|align',\n 'html^[HTMLElement]|version',\n 'iframe^[HTMLElement]|align,!allowFullscreen,frameBorder,height,longDesc,marginHeight,marginWidth,name,referrerPolicy,%sandbox,scrolling,src,srcdoc,width',\n 'img^[HTMLElement]|align,alt,border,%crossOrigin,#height,#hspace,!isMap,longDesc,lowsrc,name,referrerPolicy,sizes,src,srcset,useMap,#vspace,#width',\n 'input^[HTMLElement]|accept,align,alt,autocapitalize,autocomplete,!autofocus,!checked,!defaultChecked,defaultValue,dirName,!disabled,%files,formAction,formEnctype,formMethod,!formNoValidate,formTarget,#height,!incremental,!indeterminate,max,#maxLength,min,#minLength,!multiple,name,pattern,placeholder,!readOnly,!required,selectionDirection,#selectionEnd,#selectionStart,#size,src,step,type,useMap,value,%valueAsDate,#valueAsNumber,#width',\n 'li^[HTMLElement]|type,#value',\n 'label^[HTMLElement]|htmlFor',\n 'legend^[HTMLElement]|align',\n 'link^[HTMLElement]|as,charset,%crossOrigin,!disabled,href,hreflang,integrity,media,referrerPolicy,rel,%relList,rev,%sizes,target,type',\n 'map^[HTMLElement]|name',\n 'marquee^[HTMLElement]|behavior,bgColor,direction,height,#hspace,#loop,#scrollAmount,#scrollDelay,!trueSpeed,#vspace,width',\n 'menu^[HTMLElement]|!compact',\n 'meta^[HTMLElement]|content,httpEquiv,name,scheme',\n 'meter^[HTMLElement]|#high,#low,#max,#min,#optimum,#value',\n 'ins,del^[HTMLElement]|cite,dateTime',\n 'ol^[HTMLElement]|!compact,!reversed,#start,type',\n 'object^[HTMLElement]|align,archive,border,code,codeBase,codeType,data,!declare,height,#hspace,name,standby,type,useMap,#vspace,width',\n 'optgroup^[HTMLElement]|!disabled,label',\n 'option^[HTMLElement]|!defaultSelected,!disabled,label,!selected,text,value',\n 'output^[HTMLElement]|defaultValue,%htmlFor,name,value',\n 'p^[HTMLElement]|align',\n 'param^[HTMLElement]|name,type,value,valueType',\n 'picture^[HTMLElement]|',\n 'pre^[HTMLElement]|#width',\n 'progress^[HTMLElement]|#max,#value',\n 'q,blockquote,cite^[HTMLElement]|',\n 'script^[HTMLElement]|!async,charset,%crossOrigin,!defer,event,htmlFor,integrity,src,text,type',\n 'select^[HTMLElement]|!autofocus,!disabled,#length,!multiple,name,!required,#selectedIndex,#size,value',\n 'shadow^[HTMLElement]|',\n 'slot^[HTMLElement]|name',\n 'source^[HTMLElement]|media,sizes,src,srcset,type',\n 'span^[HTMLElement]|',\n 'style^[HTMLElement]|!disabled,media,type',\n 'caption^[HTMLElement]|align',\n 'th,td^[HTMLElement]|abbr,align,axis,bgColor,ch,chOff,#colSpan,headers,height,!noWrap,#rowSpan,scope,vAlign,width',\n 'col,colgroup^[HTMLElement]|align,ch,chOff,#span,vAlign,width',\n 'table^[HTMLElement]|align,bgColor,border,%caption,cellPadding,cellSpacing,frame,rules,summary,%tFoot,%tHead,width',\n 'tr^[HTMLElement]|align,bgColor,ch,chOff,vAlign',\n 'tfoot,thead,tbody^[HTMLElement]|align,ch,chOff,vAlign',\n 'template^[HTMLElement]|',\n 'textarea^[HTMLElement]|autocapitalize,!autofocus,#cols,defaultValue,dirName,!disabled,#maxLength,#minLength,name,placeholder,!readOnly,!required,#rows,selectionDirection,#selectionEnd,#selectionStart,value,wrap',\n 'title^[HTMLElement]|text',\n 'track^[HTMLElement]|!default,kind,label,src,srclang',\n 'ul^[HTMLElement]|!compact,type',\n 'unknown^[HTMLElement]|',\n 'video^media|#height,poster,#width',\n ':svg:a^:svg:graphics|',\n ':svg:animate^:svg:animation|',\n ':svg:animateMotion^:svg:animation|',\n ':svg:animateTransform^:svg:animation|',\n ':svg:circle^:svg:geometry|',\n ':svg:clipPath^:svg:graphics|',\n ':svg:defs^:svg:graphics|',\n ':svg:desc^:svg:|',\n ':svg:discard^:svg:|',\n ':svg:ellipse^:svg:geometry|',\n ':svg:feBlend^:svg:|',\n ':svg:feColorMatrix^:svg:|',\n ':svg:feComponentTransfer^:svg:|',\n ':svg:feComposite^:svg:|',\n ':svg:feConvolveMatrix^:svg:|',\n ':svg:feDiffuseLighting^:svg:|',\n ':svg:feDisplacementMap^:svg:|',\n ':svg:feDistantLight^:svg:|',\n ':svg:feDropShadow^:svg:|',\n ':svg:feFlood^:svg:|',\n ':svg:feFuncA^:svg:componentTransferFunction|',\n ':svg:feFuncB^:svg:componentTransferFunction|',\n ':svg:feFuncG^:svg:componentTransferFunction|',\n ':svg:feFuncR^:svg:componentTransferFunction|',\n ':svg:feGaussianBlur^:svg:|',\n ':svg:feImage^:svg:|',\n ':svg:feMerge^:svg:|',\n ':svg:feMergeNode^:svg:|',\n ':svg:feMorphology^:svg:|',\n ':svg:feOffset^:svg:|',\n ':svg:fePointLight^:svg:|',\n ':svg:feSpecularLighting^:svg:|',\n ':svg:feSpotLight^:svg:|',\n ':svg:feTile^:svg:|',\n ':svg:feTurbulence^:svg:|',\n ':svg:filter^:svg:|',\n ':svg:foreignObject^:svg:graphics|',\n ':svg:g^:svg:graphics|',\n ':svg:image^:svg:graphics|',\n ':svg:line^:svg:geometry|',\n ':svg:linearGradient^:svg:gradient|',\n ':svg:mpath^:svg:|',\n ':svg:marker^:svg:|',\n ':svg:mask^:svg:|',\n ':svg:metadata^:svg:|',\n ':svg:path^:svg:geometry|',\n ':svg:pattern^:svg:|',\n ':svg:polygon^:svg:geometry|',\n ':svg:polyline^:svg:geometry|',\n ':svg:radialGradient^:svg:gradient|',\n ':svg:rect^:svg:geometry|',\n ':svg:svg^:svg:graphics|#currentScale,#zoomAndPan',\n ':svg:script^:svg:|type',\n ':svg:set^:svg:animation|',\n ':svg:stop^:svg:|',\n ':svg:style^:svg:|!disabled,media,title,type',\n ':svg:switch^:svg:graphics|',\n ':svg:symbol^:svg:|',\n ':svg:tspan^:svg:textPositioning|',\n ':svg:text^:svg:textPositioning|',\n ':svg:textPath^:svg:textContent|',\n ':svg:title^:svg:|',\n ':svg:use^:svg:graphics|',\n ':svg:view^:svg:|#zoomAndPan',\n 'data^[HTMLElement]|value',\n 'keygen^[HTMLElement]|!autofocus,challenge,!disabled,form,keytype,name',\n 'menuitem^[HTMLElement]|type,label,icon,!disabled,!checked,radiogroup,!default',\n 'summary^[HTMLElement]|',\n 'time^[HTMLElement]|dateTime',\n ':svg:cursor^:svg:|',\n];\nvar _ATTR_TO_PROP = {\n 'class': 'className',\n 'for': 'htmlFor',\n 'formaction': 'formAction',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\nvar DomElementSchemaRegistry = /** @class */ (function (_super) {\n __extends(DomElementSchemaRegistry, _super);\n function DomElementSchemaRegistry() {\n var _this = _super.call(this) || this;\n _this._schema = {};\n SCHEMA.forEach(function (encodedType) {\n var type = {};\n var _a = __read(encodedType.split('|'), 2), strType = _a[0], strProperties = _a[1];\n var properties = strProperties.split(',');\n var _b = __read(strType.split('^'), 2), typeNames = _b[0], superName = _b[1];\n typeNames.split(',').forEach(function (tag) { return _this._schema[tag.toLowerCase()] = type; });\n var superType = superName && _this._schema[superName.toLowerCase()];\n if (superType) {\n Object.keys(superType).forEach(function (prop) { type[prop] = superType[prop]; });\n }\n properties.forEach(function (property) {\n if (property.length > 0) {\n switch (property[0]) {\n case '*':\n // We don't yet support events.\n // If ever allowing to bind to events, GO THROUGH A SECURITY REVIEW, allowing events\n // will\n // almost certainly introduce bad XSS vulnerabilities.\n // type[property.substring(1)] = EVENT;\n break;\n case '!':\n type[property.substring(1)] = BOOLEAN;\n break;\n case '#':\n type[property.substring(1)] = NUMBER;\n break;\n case '%':\n type[property.substring(1)] = OBJECT;\n break;\n default:\n type[property] = STRING;\n }\n }\n });\n });\n return _this;\n }\n DomElementSchemaRegistry.prototype.hasProperty = function (tagName, propName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return false;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Can't tell now as we don't know which properties a custom element will get\n // once it is instantiated\n return true;\n }\n }\n var elementProperties = this._schema[tagName.toLowerCase()] || this._schema['unknown'];\n return !!elementProperties[propName];\n };\n DomElementSchemaRegistry.prototype.hasElement = function (tagName, schemaMetas) {\n if (schemaMetas.some(function (schema) { return schema.name === NO_ERRORS_SCHEMA.name; })) {\n return true;\n }\n if (tagName.indexOf('-') > -1) {\n if (isNgContainer(tagName) || isNgContent(tagName)) {\n return true;\n }\n if (schemaMetas.some(function (schema) { return schema.name === CUSTOM_ELEMENTS_SCHEMA.name; })) {\n // Allow any custom elements\n return true;\n }\n }\n return !!this._schema[tagName.toLowerCase()];\n };\n /**\n * securityContext returns the security context for the given property on the given DOM tag.\n *\n * Tag and property name are statically known and cannot change at runtime, i.e. it is not\n * possible to bind a value into a changing attribute or tag name.\n *\n * The filtering is white list based. All attributes in the schema above are assumed to have the\n * 'NONE' security context, i.e. that they are safe inert string values. Only specific well known\n * attack vectors are assigned their appropriate context.\n */\n DomElementSchemaRegistry.prototype.securityContext = function (tagName, propName, isAttribute) {\n if (isAttribute) {\n // NB: For security purposes, use the mapped property name, not the attribute name.\n propName = this.getMappedPropName(propName);\n }\n // Make sure comparisons are case insensitive, so that case differences between attribute and\n // property names do not have a security impact.\n tagName = tagName.toLowerCase();\n propName = propName.toLowerCase();\n var ctx = SECURITY_SCHEMA[tagName + '|' + propName];\n if (ctx) {\n return ctx;\n }\n ctx = SECURITY_SCHEMA['*|' + propName];\n return ctx ? ctx : SecurityContext.NONE;\n };\n DomElementSchemaRegistry.prototype.getMappedPropName = function (propName) { return _ATTR_TO_PROP[propName] || propName; };\n DomElementSchemaRegistry.prototype.getDefaultComponentElementName = function () { return 'ng-component'; };\n DomElementSchemaRegistry.prototype.validateProperty = function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var 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 return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n DomElementSchemaRegistry.prototype.validateAttribute = function (name) {\n if (name.toLowerCase().startsWith('on')) {\n var msg = \"Binding to event attribute '\" + name + \"' is disallowed for security reasons, \" +\n (\"please use (\" + name.slice(2) + \")=...\");\n return { error: true, msg: msg };\n }\n else {\n return { error: false };\n }\n };\n DomElementSchemaRegistry.prototype.allKnownElementNames = function () { return Object.keys(this._schema); };\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleProperty = function (propName) {\n return dashCaseToCamelCase(propName);\n };\n DomElementSchemaRegistry.prototype.normalizeAnimationStyleValue = function (camelCaseProp, userProvidedProp, val) {\n var unit = '';\n var strVal = val.toString().trim();\n var errorMsg = null;\n if (_isPixelDimensionStyle(camelCaseProp) && val !== 0 && val !== '0') {\n if (typeof val === 'number') {\n unit = 'px';\n }\n else {\n var valAndSuffixMatch = val.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errorMsg = \"Please provide a CSS unit value for \" + userProvidedProp + \":\" + val;\n }\n }\n }\n return { error: errorMsg, value: strVal + unit };\n };\n return DomElementSchemaRegistry;\n}(ElementSchemaRegistry));\nfunction _isPixelDimensionStyle(prop) {\n switch (prop) {\n case 'width':\n case 'height':\n case 'minWidth':\n case 'minHeight':\n case 'maxWidth':\n case 'maxHeight':\n case 'left':\n case 'top':\n case 'bottom':\n case 'right':\n case 'fontSize':\n case 'outlineWidth':\n case 'outlineOffset':\n case 'paddingTop':\n case 'paddingLeft':\n case 'paddingBottom':\n case 'paddingRight':\n case 'marginTop':\n case 'marginLeft':\n case 'marginBottom':\n case 'marginRight':\n case 'borderRadius':\n case 'borderWidth':\n case 'borderTopWidth':\n case 'borderLeftWidth':\n case 'borderRightWidth':\n case 'borderBottomWidth':\n case 'textIndent':\n return true;\n default:\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 a port of shadowCSS from webcomponents.js to TypeScript.\n *\n * Please make sure to keep to edits in sync with the source file.\n *\n * Source:\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n *\n * The original file level comment is reproduced below\n */\n/*\n This is a limited shim for ShadowDOM css styling.\n https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles\n\n The intention here is to support only the styling features which can be\n relatively simply implemented. The goal is to allow users to avoid the\n most obvious pitfalls and do so without compromising performance significantly.\n For ShadowDOM styling that's not covered here, a set of best practices\n can be provided that should allow users to accomplish more complex styling.\n\n The following is a list of specific ShadowDOM styling features and a brief\n discussion of the approach used to shim.\n\n Shimmed features:\n\n * :host, :host-context: ShadowDOM allows styling of the shadowRoot's host\n element using the :host rule. To shim this feature, the :host styles are\n reformatted and prefixed with a given scope name and promoted to a\n document level stylesheet.\n For example, given a scope name of .foo, a rule like this:\n\n :host {\n background: red;\n }\n }\n\n becomes:\n\n .foo {\n background: red;\n }\n\n * encapsulation: Styles defined within ShadowDOM, apply only to\n dom inside the ShadowDOM. Polymer uses one of two techniques to implement\n this feature.\n\n By default, rules are prefixed with the host element tag name\n as a descendant selector. This ensures styling does not leak out of the 'top'\n of the element's ShadowDOM. For example,\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n x-foo div {\n font-weight: bold;\n }\n\n becomes:\n\n\n Alternatively, if WebComponents.ShadowCSS.strictStyling is set to true then\n selectors are scoped by adding an attribute selector suffix to each\n simple selector that contains the host element tag name. Each element\n in the element's ShadowDOM template is also given the scope attribute.\n Thus, these rules match only elements that have the scope attribute.\n For example, given a scope name of x-foo, a rule like this:\n\n div {\n font-weight: bold;\n }\n\n becomes:\n\n div[x-foo] {\n font-weight: bold;\n }\n\n Note that elements that are dynamically added to a scope must have the scope\n selector added to them manually.\n\n * upper/lower bound encapsulation: Styles which are defined outside a\n shadowRoot should not cross the ShadowDOM boundary and should not apply\n inside a shadowRoot.\n\n This styling behavior is not emulated. Some possible ways to do this that\n were rejected due to complexity and/or performance concerns include: (1) reset\n every possible property for every possible selector for a given scope name;\n (2) re-implement css in javascript.\n\n As an alternative, users should make sure to use selectors\n specific to the scope in which they are working.\n\n * ::distributed: This behavior is not emulated. It's often not necessary\n to style the contents of a specific insertion point and instead, descendants\n of the host element can be styled selectively. Users can also create an\n extra node around an insertion point and style that node's contents\n via descendent selectors. For example, with a shadowRoot like this:\n\n <style>\n ::content(div) {\n background: red;\n }\n </style>\n <content></content>\n\n could become:\n\n <style>\n / *@polyfill .content-container div * /\n ::content(div) {\n background: red;\n }\n </style>\n <div class=\"content-container\">\n <content></content>\n </div>\n\n Note the use of @polyfill in the comment above a ShadowDOM specific style\n declaration. This is a directive to the styling shim to use the selector\n in comments in lieu of the next selector when running under polyfill.\n*/\nvar ShadowCss = /** @class */ (function () {\n function ShadowCss() {\n this.strictStyling = true;\n }\n /*\n * Shim some cssText with the given selector. Returns cssText that can\n * be included in the document via WebComponents.ShadowCSS.addCssToDocument(css).\n *\n * When strictStyling is true:\n * - selector is the attribute added to all elements inside the host,\n * - hostSelector is the attribute added to the host itself.\n */\n ShadowCss.prototype.shimCssText = function (cssText, selector, hostSelector) {\n if (hostSelector === void 0) { hostSelector = ''; }\n var commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n cssText = this._insertDirectives(cssText);\n var scopedCssText = this._scopeCssText(cssText, selector, hostSelector);\n return __spread([scopedCssText], commentsWithHash).join('\\n');\n };\n ShadowCss.prototype._insertDirectives = function (cssText) {\n cssText = this._insertPolyfillDirectivesInCssText(cssText);\n return this._insertPolyfillRulesInCssText(cssText);\n };\n /*\n * Process styles to convert native ShadowDOM rules that will trip\n * up the css parser; we rely on decorating the stylesheet with inert rules.\n *\n * For example, we convert this rule:\n *\n * polyfill-next-selector { content: ':host menu-item'; }\n * ::content menu-item {\n *\n * to this:\n *\n * scopeName menu-item {\n *\n **/\n ShadowCss.prototype._insertPolyfillDirectivesInCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentNextSelectorRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return m[2] + '{';\n });\n };\n /*\n * Process styles to add rules which will only apply under the polyfill\n *\n * For example, we convert this rule:\n *\n * polyfill-rule {\n * content: ':host menu-item';\n * ...\n * }\n *\n * to this:\n *\n * scopeName menu-item {...}\n *\n **/\n ShadowCss.prototype._insertPolyfillRulesInCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n return cssText.replace(_cssContentRuleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var rule = m[0].replace(m[1], '').replace(m[2], '');\n return m[4] + rule;\n });\n };\n /* Ensure styles are scoped. Pseudo-scoping takes a rule like:\n *\n * .foo {... }\n *\n * and converts this to\n *\n * scopeName .foo { ... }\n */\n ShadowCss.prototype._scopeCssText = function (cssText, scopeSelector, hostSelector) {\n var unscopedRules = this._extractUnscopedRulesFromCssText(cssText);\n // replace :host and :host-context -shadowcsshost and -shadowcsshost respectively\n cssText = this._insertPolyfillHostInCssText(cssText);\n cssText = this._convertColonHost(cssText);\n cssText = this._convertColonHostContext(cssText);\n cssText = this._convertShadowDOMSelectors(cssText);\n if (scopeSelector) {\n cssText = this._scopeSelectors(cssText, scopeSelector, hostSelector);\n }\n cssText = cssText + '\\n' + unscopedRules;\n return cssText.trim();\n };\n /*\n * Process styles to add rules which will only apply under the polyfill\n * and do not process via CSSOM. (CSSOM is destructive to rules on rare\n * occasions, e.g. -webkit-calc on Safari.)\n * For example, we convert this rule:\n *\n * @polyfill-unscoped-rule {\n * content: 'menu-item';\n * ... }\n *\n * to this:\n *\n * menu-item {...}\n *\n **/\n ShadowCss.prototype._extractUnscopedRulesFromCssText = function (cssText) {\n // Difference with webcomponents.js: does not handle comments\n var r = '';\n var m;\n _cssContentUnscopedRuleRe.lastIndex = 0;\n while ((m = _cssContentUnscopedRuleRe.exec(cssText)) !== null) {\n var rule = m[0].replace(m[2], '').replace(m[1], m[4]);\n r += rule + '\\n\\n';\n }\n return r;\n };\n /*\n * convert a rule like :host(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar\n */\n ShadowCss.prototype._convertColonHost = function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostRe, this._colonHostPartReplacer);\n };\n /*\n * convert a rule like :host-context(.foo) > .bar { }\n *\n * to\n *\n * .foo<scopeName> > .bar, .foo scopeName > .bar { }\n *\n * and\n *\n * :host-context(.foo:host) .bar { ... }\n *\n * to\n *\n * .foo<scopeName> .bar { ... }\n */\n ShadowCss.prototype._convertColonHostContext = function (cssText) {\n return this._convertColonRule(cssText, _cssColonHostContextRe, this._colonHostContextPartReplacer);\n };\n ShadowCss.prototype._convertColonRule = function (cssText, regExp, partReplacer) {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n if (m[2]) {\n var parts = m[2].split(',');\n var r = [];\n for (var i = 0; i < parts.length; i++) {\n var p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n };\n ShadowCss.prototype._colonHostContextPartReplacer = function (host, part, suffix) {\n if (part.indexOf(_polyfillHost) > -1) {\n return this._colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n };\n ShadowCss.prototype._colonHostPartReplacer = function (host, part, suffix) {\n return host + part.replace(_polyfillHost, '') + suffix;\n };\n /*\n * Convert combinators like ::shadow and pseudo-elements like ::content\n * by replacing with space.\n */\n ShadowCss.prototype._convertShadowDOMSelectors = function (cssText) {\n return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);\n };\n // change a selector like 'div' to 'name div'\n ShadowCss.prototype._scopeSelectors = function (cssText, scopeSelector, hostSelector) {\n var _this = this;\n return processRules(cssText, function (rule) {\n var selector = rule.selector;\n var content = rule.content;\n if (rule.selector[0] != '@') {\n selector =\n _this._scopeSelector(rule.selector, scopeSelector, hostSelector, _this.strictStyling);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = _this._scopeSelectors(rule.content, scopeSelector, hostSelector);\n }\n return new CssRule(selector, content);\n });\n };\n ShadowCss.prototype._scopeSelector = function (selector, scopeSelector, hostSelector, strict) {\n var _this = this;\n return selector.split(',')\n .map(function (part) { return part.trim().split(_shadowDeepSelectors); })\n .map(function (deepParts) {\n var _a = __read(deepParts), shallowPart = _a[0], otherParts = _a.slice(1);\n var applyScope = function (shallowPart) {\n if (_this._selectorNeedsScoping(shallowPart, scopeSelector)) {\n return strict ?\n _this._applyStrictSelectorScope(shallowPart, scopeSelector, hostSelector) :\n _this._applySelectorScope(shallowPart, scopeSelector, hostSelector);\n }\n else {\n return shallowPart;\n }\n };\n return __spread([applyScope(shallowPart)], otherParts).join(' ');\n })\n .join(', ');\n };\n ShadowCss.prototype._selectorNeedsScoping = function (selector, scopeSelector) {\n var re = this._makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n };\n ShadowCss.prototype._makeScopeMatcher = function (scopeSelector) {\n var lre = /\\[/g;\n var rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n };\n ShadowCss.prototype._applySelectorScope = function (selector, scopeSelector, hostSelector) {\n // Difference from webcomponents.js: scopeSelector could not be an array\n return this._applySimpleSelectorScope(selector, scopeSelector, hostSelector);\n };\n // scope via name and [is=name]\n ShadowCss.prototype._applySimpleSelectorScope = function (selector, scopeSelector, hostSelector) {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n var replaceBy_1 = this.strictStyling ? \"[\" + hostSelector + \"]\" : scopeSelector;\n return selector\n .replace(_polyfillHostNoCombinatorRe, function (hnc, selector) {\n return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {\n return before + replaceBy_1 + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy_1 + ' ');\n }\n return scopeSelector + ' ' + selector;\n };\n // return a selector with [name] suffix on each simple selector\n // e.g. .foo.bar > .zot becomes .foo[name].bar[name] > .zot[name] /** @internal */\n ShadowCss.prototype._applyStrictSelectorScope = function (selector, scopeSelector, hostSelector) {\n var _this = this;\n var isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, function (_) {\n var parts = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n parts[_i - 1] = arguments[_i];\n }\n return parts[0];\n });\n var attrName = '[' + scopeSelector + ']';\n var _scopeSelectorPart = function (p) {\n var scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = _this._applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n var t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n var matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + attrName + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n var safeContent = new SafeSelector(selector);\n selector = safeContent.content();\n var scopedSelector = '';\n var startIndex = 0;\n var res;\n var sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n var shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n var separator = res[1];\n var part_1 = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;\n var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;\n scopedSelector += scopedPart + \" \" + separator + \" \";\n startIndex = sep.lastIndex;\n }\n var part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return safeContent.restore(scopedSelector);\n };\n ShadowCss.prototype._insertPolyfillHostInCssText = function (selector) {\n return selector.replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost);\n };\n return ShadowCss;\n}());\nvar SafeSelector = /** @class */ (function () {\n function SafeSelector(selector) {\n var _this = this;\n this.placeholders = [];\n this.index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, function (_, keep) {\n var replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(keep);\n _this.index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n this._content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, function (_, pseudo, exp) {\n var replaceBy = \"__ph-\" + _this.index + \"__\";\n _this.placeholders.push(exp);\n _this.index++;\n return pseudo + replaceBy;\n });\n }\n SafeSelector.prototype.restore = function (content) {\n var _this = this;\n return content.replace(/__ph-(\\d+)__/g, function (ph, index) { return _this.placeholders[+index]; });\n };\n SafeSelector.prototype.content = function () { return this._content; };\n return SafeSelector;\n}());\nvar _cssContentNextSelectorRe = /polyfill-next-selector[^}]*content:[\\s]*?(['\"])(.*?)\\1[;\\s]*}([^{]*?){/gim;\nvar _cssContentRuleRe = /(polyfill-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content:[\\s]*(['\"])(.*?)\\3)[;\\s]*[^}]*}/gim;\nvar _polyfillHost = '-shadowcsshost';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nvar _polyfillHostContext = '-shadowcsscontext';\nvar _parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nvar _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nvar _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nvar _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nvar _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nvar _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g,\n // Deprecated selectors\n /\\/shadow-deep\\//g,\n /\\/shadow\\//g,\n];\n// The deep combinator is deprecated in the CSS spec\n// Support for `>>>`, `deep`, `::ng-deep` is then also deprecated and will be removed in the future.\n// see https://github.com/angular/angular/pull/17677\nvar _shadowDeepSelectors = /(?:>>>)|(?:\\/deep\\/)|(?:::ng-deep)/g;\nvar _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nvar _polyfillHostRe = /-shadowcsshost/gim;\nvar _colonHostRe = /:host/gim;\nvar _colonHostContextRe = /:host-context/gim;\nvar _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nfunction stripComments(input) {\n return input.replace(_commentRe, '');\n}\nvar _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nfunction extractCommentsWithHash(input) {\n return input.match(_commentWithHashRe) || [];\n}\nvar _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nvar _curlyRe = /([{}])/g;\nvar OPEN_CURLY = '{';\nvar CLOSE_CURLY = '}';\nvar BLOCK_PLACEHOLDER = '%BLOCK%';\nvar CssRule = /** @class */ (function () {\n function CssRule(selector, content) {\n this.selector = selector;\n this.content = content;\n }\n return CssRule;\n}());\nfunction processRules(input, ruleCallback) {\n var inputWithEscapedBlocks = escapeBlocks(input);\n var nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n var selector = m[2];\n var content = '';\n var suffix = m[4];\n var contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n var rule = ruleCallback(new CssRule(selector, content));\n return \"\" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;\n });\n}\nvar StringWithEscapedBlocks = /** @class */ (function () {\n function StringWithEscapedBlocks(escapedString, blocks) {\n this.escapedString = escapedString;\n this.blocks = blocks;\n }\n return StringWithEscapedBlocks;\n}());\nfunction escapeBlocks(input) {\n var inputParts = input.split(_curlyRe);\n var resultParts = [];\n var escapedBlocks = [];\n var bracketCount = 0;\n var currentBlockParts = [];\n for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {\n var part = inputParts[partIndex];\n if (part == CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part == OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n return new StringWithEscapedBlocks(resultParts.join(''), escapedBlocks);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nvar StylesCompileDependency = /** @class */ (function () {\n function StylesCompileDependency(name, moduleUrl, setValue) {\n this.name = name;\n this.moduleUrl = moduleUrl;\n this.setValue = setValue;\n }\n return StylesCompileDependency;\n}());\nvar CompiledStylesheet = /** @class */ (function () {\n function CompiledStylesheet(outputCtx, stylesVar, dependencies, isShimmed, meta) {\n this.outputCtx = outputCtx;\n this.stylesVar = stylesVar;\n this.dependencies = dependencies;\n this.isShimmed = isShimmed;\n this.meta = meta;\n }\n return CompiledStylesheet;\n}());\nvar StyleCompiler = /** @class */ (function () {\n function StyleCompiler(_urlResolver) {\n this._urlResolver = _urlResolver;\n this._shadowCss = new ShadowCss();\n }\n StyleCompiler.prototype.compileComponent = function (outputCtx, comp) {\n var template = comp.template;\n return this._compileStyles(outputCtx, comp, new CompileStylesheetMetadata({\n styles: template.styles,\n styleUrls: template.styleUrls,\n moduleUrl: identifierModuleUrl(comp.type)\n }), this.needsStyleShim(comp), true);\n };\n StyleCompiler.prototype.compileStyles = function (outputCtx, comp, stylesheet, shim) {\n if (shim === void 0) { shim = this.needsStyleShim(comp); }\n return this._compileStyles(outputCtx, comp, stylesheet, shim, false);\n };\n StyleCompiler.prototype.needsStyleShim = function (comp) {\n return comp.template.encapsulation === ViewEncapsulation.Emulated;\n };\n StyleCompiler.prototype._compileStyles = function (outputCtx, comp, stylesheet, shim, isComponentStylesheet) {\n var _this = this;\n var styleExpressions = stylesheet.styles.map(function (plainStyle) { return literal(_this._shimIfNeeded(plainStyle, shim)); });\n var dependencies = [];\n stylesheet.styleUrls.forEach(function (styleUrl) {\n var exprIndex = styleExpressions.length;\n // Note: This placeholder will be filled later.\n styleExpressions.push(null);\n dependencies.push(new StylesCompileDependency(getStylesVarName(null), styleUrl, function (value) { return styleExpressions[exprIndex] = outputCtx.importExpr(value); }));\n });\n // styles variable contains plain strings and arrays of other styles arrays (recursive),\n // so we set its type to dynamic.\n var stylesVar = getStylesVarName(isComponentStylesheet ? comp : null);\n var stmt = variable(stylesVar)\n .set(literalArr(styleExpressions, new ArrayType(DYNAMIC_TYPE, [TypeModifier.Const])))\n .toDeclStmt(null, isComponentStylesheet ? [StmtModifier.Final] : [\n StmtModifier.Final, StmtModifier.Exported\n ]);\n outputCtx.statements.push(stmt);\n return new CompiledStylesheet(outputCtx, stylesVar, dependencies, shim, stylesheet);\n };\n StyleCompiler.prototype._shimIfNeeded = function (style, shim) {\n return shim ? this._shadowCss.shimCssText(style, CONTENT_ATTR, HOST_ATTR) : style;\n };\n return StyleCompiler;\n}());\nfunction getStylesVarName(component) {\n var result = \"styles\";\n if (component) {\n result += \"_\" + identifierName(component.type);\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 PRESERVE_WS_ATTR_NAME = 'ngPreserveWhitespaces';\nvar SKIP_WS_TRIM_TAGS = new Set(['pre', 'template', 'textarea', 'script', 'style']);\n// Equivalent to \\s with \\u00a0 (non-breaking space) excluded.\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\nvar WS_CHARS = ' \\f\\n\\r\\t\\v\\u1680\\u180e\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff';\nvar NO_WS_REGEXP = new RegExp(\"[^\" + WS_CHARS + \"]\");\nvar WS_REPLACE_REGEXP = new RegExp(\"[\" + WS_CHARS + \"]{2,}\", 'g');\nfunction hasPreserveWhitespacesAttr(attrs) {\n return attrs.some(function (attr) { return attr.name === PRESERVE_WS_ATTR_NAME; });\n}\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.\n */\nfunction replaceNgsp(value) {\n // lexer is replacing the &ngsp; pseudo-entity with NGSP_UNICODE\n return value.replace(new RegExp(NGSP_UNICODE, 'g'), ' ');\n}\n/**\n * This visitor can walk HTML parse tree and remove / trim text nodes using the following rules:\n * - consider spaces, tabs and new lines as whitespace characters;\n * - drop text nodes consisting of whitespace characters only;\n * - for all other text nodes replace consecutive whitespace characters with one space;\n * - convert &ngsp; pseudo-entity to a single space;\n *\n * Removal and trimming of whitespaces have positive performance impact (less code to generate\n * while compiling templates, faster view creation). At the same time it can be \"destructive\"\n * in some cases (whitespaces can influence layout). Because of the potential of breaking layout\n * this visitor is not activated by default in Angular 5 and people need to explicitly opt-in for\n * whitespace removal. The default option for whitespace removal will be revisited in Angular 6\n * and might be changed to \"on\" by default.\n */\nvar WhitespaceVisitor = /** @class */ (function () {\n function WhitespaceVisitor() {\n }\n WhitespaceVisitor.prototype.visitElement = function (element, context) {\n if (SKIP_WS_TRIM_TAGS.has(element.name) || hasPreserveWhitespacesAttr(element.attrs)) {\n // don't descent into elements where we need to preserve whitespaces\n // but still visit all attributes to eliminate one used as a market to preserve WS\n return new Element(element.name, visitAll(this, element.attrs), element.children, element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n }\n return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n };\n WhitespaceVisitor.prototype.visitAttribute = function (attribute, context) {\n return attribute.name !== PRESERVE_WS_ATTR_NAME ? attribute : null;\n };\n WhitespaceVisitor.prototype.visitText = function (text, context) {\n var isNotBlank = text.value.match(NO_WS_REGEXP);\n if (isNotBlank) {\n return new Text(replaceNgsp(text.value).replace(WS_REPLACE_REGEXP, ' '), text.sourceSpan);\n }\n return null;\n };\n WhitespaceVisitor.prototype.visitComment = function (comment, context) { return comment; };\n WhitespaceVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };\n WhitespaceVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };\n return WhitespaceVisitor;\n}());\nfunction removeWhitespaces(htmlAstWithErrors) {\n return new ParseTreeResult(visitAll(new WhitespaceVisitor(), htmlAstWithErrors.rootNodes), htmlAstWithErrors.errors);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// http://cldr.unicode.org/index/cldr-spec/plural-rules\nvar PLURAL_CASES = ['zero', 'one', 'two', 'few', 'many', 'other'];\n/**\n * Expands special forms into elements.\n *\n * For example,\n *\n * ```\n * { messages.length, plural,\n * =0 {zero}\n * =1 {one}\n * other {more than one}\n * }\n * ```\n *\n * will be expanded into\n *\n * ```\n * <ng-container [ngPlural]=\"messages.length\">\n * <ng-template ngPluralCase=\"=0\">zero</ng-template>\n * <ng-template ngPluralCase=\"=1\">one</ng-template>\n * <ng-template ngPluralCase=\"other\">more than one</ng-template>\n * </ng-container>\n * ```\n */\nfunction expandNodes(nodes) {\n var expander = new _Expander();\n return new ExpansionResult(visitAll(expander, nodes), expander.isExpanded, expander.errors);\n}\nvar ExpansionResult = /** @class */ (function () {\n function ExpansionResult(nodes, expanded, errors) {\n this.nodes = nodes;\n this.expanded = expanded;\n this.errors = errors;\n }\n return ExpansionResult;\n}());\nvar ExpansionError = /** @class */ (function (_super) {\n __extends(ExpansionError, _super);\n function ExpansionError(span, errorMsg) {\n return _super.call(this, span, errorMsg) || this;\n }\n return ExpansionError;\n}(ParseError));\n/**\n * Expand expansion forms (plural, select) to directives\n *\n * @internal\n */\nvar _Expander = /** @class */ (function () {\n function _Expander() {\n this.isExpanded = false;\n this.errors = [];\n }\n _Expander.prototype.visitElement = function (element, context) {\n return new Element(element.name, element.attrs, visitAll(this, element.children), element.sourceSpan, element.startSourceSpan, element.endSourceSpan);\n };\n _Expander.prototype.visitAttribute = function (attribute, context) { return attribute; };\n _Expander.prototype.visitText = function (text, context) { return text; };\n _Expander.prototype.visitComment = function (comment, context) { return comment; };\n _Expander.prototype.visitExpansion = function (icu, context) {\n this.isExpanded = true;\n return icu.type == 'plural' ? _expandPluralForm(icu, this.errors) :\n _expandDefaultForm(icu, this.errors);\n };\n _Expander.prototype.visitExpansionCase = function (icuCase, context) {\n throw new Error('Should not be reached');\n };\n return _Expander;\n}());\n// Plural forms are expanded to `NgPlural` and `NgPluralCase`s\nfunction _expandPluralForm(ast, errors) {\n var children = ast.cases.map(function (c) {\n if (PLURAL_CASES.indexOf(c.value) == -1 && !c.value.match(/^=\\d+$/)) {\n errors.push(new ExpansionError(c.valueSourceSpan, \"Plural cases should be \\\"=<number>\\\" or one of \" + PLURAL_CASES.join(\", \")));\n }\n var expansionResult = expandNodes(c.expression);\n errors.push.apply(errors, __spread(expansionResult.errors));\n return new Element(\"ng-template\", [new Attribute('ngPluralCase', \"\" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n });\n var switchAttr = new Attribute('[ngPlural]', ast.switchValue, ast.switchValueSourceSpan);\n return new Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n// ICU messages (excluding plural form) are expanded to `NgSwitch` and `NgSwitchCase`s\nfunction _expandDefaultForm(ast, errors) {\n var children = ast.cases.map(function (c) {\n var expansionResult = expandNodes(c.expression);\n errors.push.apply(errors, __spread(expansionResult.errors));\n if (c.value === 'other') {\n // other is the default case when no values match\n return new Element(\"ng-template\", [new Attribute('ngSwitchDefault', '', c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n }\n return new Element(\"ng-template\", [new Attribute('ngSwitchCase', \"\" + c.value, c.valueSourceSpan)], expansionResult.nodes, c.sourceSpan, c.sourceSpan, c.sourceSpan);\n });\n var switchAttr = new Attribute('[ngSwitch]', ast.switchValue, ast.switchValueSourceSpan);\n return new Element('ng-container', [switchAttr], children, ast.sourceSpan, ast.sourceSpan, ast.sourceSpan);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 PROPERTY_PARTS_SEPARATOR = '.';\nvar ATTRIBUTE_PREFIX = 'attr';\nvar CLASS_PREFIX = 'class';\nvar STYLE_PREFIX = 'style';\nvar ANIMATE_PROP_PREFIX = 'animate-';\nvar BoundPropertyType;\n(function (BoundPropertyType) {\n BoundPropertyType[BoundPropertyType[\"DEFAULT\"] = 0] = \"DEFAULT\";\n BoundPropertyType[BoundPropertyType[\"LITERAL_ATTR\"] = 1] = \"LITERAL_ATTR\";\n BoundPropertyType[BoundPropertyType[\"ANIMATION\"] = 2] = \"ANIMATION\";\n})(BoundPropertyType || (BoundPropertyType = {}));\n/**\n * Represents a parsed property.\n */\nvar BoundProperty = /** @class */ (function () {\n function BoundProperty(name, expression, type, sourceSpan) {\n this.name = name;\n this.expression = expression;\n this.type = type;\n this.sourceSpan = sourceSpan;\n this.isLiteral = this.type === BoundPropertyType.LITERAL_ATTR;\n this.isAnimation = this.type === BoundPropertyType.ANIMATION;\n }\n return BoundProperty;\n}());\n/**\n * Parses bindings in templates and in the directive host area.\n */\nvar BindingParser = /** @class */ (function () {\n function BindingParser(_exprParser, _interpolationConfig, _schemaRegistry, pipes, _targetErrors) {\n var _this = this;\n this._exprParser = _exprParser;\n this._interpolationConfig = _interpolationConfig;\n this._schemaRegistry = _schemaRegistry;\n this._targetErrors = _targetErrors;\n this.pipesByName = new Map();\n this._usedPipes = new Map();\n pipes.forEach(function (pipe) { return _this.pipesByName.set(pipe.name, pipe); });\n }\n BindingParser.prototype.getUsedPipes = function () { return Array.from(this._usedPipes.values()); };\n BindingParser.prototype.createBoundHostProperties = function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostProperties) {\n var boundProps_1 = [];\n Object.keys(dirMeta.hostProperties).forEach(function (propName) {\n var expression = dirMeta.hostProperties[propName];\n if (typeof expression === 'string') {\n _this.parsePropertyBinding(propName, expression, true, sourceSpan, [], boundProps_1);\n }\n else {\n _this._reportError(\"Value of the host property binding \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return boundProps_1;\n }\n return null;\n };\n BindingParser.prototype.createDirectiveHostPropertyAsts = function (dirMeta, elementSelector, sourceSpan) {\n var _this = this;\n var boundProps = this.createBoundHostProperties(dirMeta, sourceSpan);\n return boundProps &&\n boundProps.map(function (prop) { return _this.createElementPropertyAst(elementSelector, prop); });\n };\n BindingParser.prototype.createDirectiveHostEventAsts = function (dirMeta, sourceSpan) {\n var _this = this;\n if (dirMeta.hostListeners) {\n var targetEventAsts_1 = [];\n Object.keys(dirMeta.hostListeners).forEach(function (propName) {\n var expression = dirMeta.hostListeners[propName];\n if (typeof expression === 'string') {\n _this.parseEvent(propName, expression, sourceSpan, [], targetEventAsts_1);\n }\n else {\n _this._reportError(\"Value of the host listener \\\"\" + propName + \"\\\" needs to be a string representing an expression but got \\\"\" + expression + \"\\\" (\" + typeof expression + \")\", sourceSpan);\n }\n });\n return targetEventAsts_1;\n }\n return null;\n };\n BindingParser.prototype.parseInterpolation = function (value, sourceSpan) {\n var sourceInfo = sourceSpan.start.toString();\n try {\n var ast = this._exprParser.parseInterpolation(value, sourceInfo, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n BindingParser.prototype.parseInlineTemplateBinding = function (prefixToken, value, sourceSpan, targetMatchableAttrs, targetProps, targetVars) {\n var bindings = this._parseTemplateBindings(prefixToken, value, sourceSpan);\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n if (binding.keyIsVar) {\n targetVars.push(new VariableAst(binding.key, binding.name, sourceSpan));\n }\n else if (binding.expression) {\n this._parsePropertyAst(binding.key, binding.expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetMatchableAttrs.push([binding.key, '']);\n this.parseLiteralAttr(binding.key, null, sourceSpan, targetMatchableAttrs, targetProps);\n }\n }\n };\n BindingParser.prototype._parseTemplateBindings = function (prefixToken, value, sourceSpan) {\n var _this = this;\n var sourceInfo = sourceSpan.start.toString();\n try {\n var bindingsResult = this._exprParser.parseTemplateBindings(prefixToken, value, sourceInfo);\n this._reportExpressionParserErrors(bindingsResult.errors, sourceSpan);\n bindingsResult.templateBindings.forEach(function (binding) {\n if (binding.expression) {\n _this._checkPipes(binding.expression, sourceSpan);\n }\n });\n bindingsResult.warnings.forEach(function (warning) { _this._reportError(warning, sourceSpan, ParseErrorLevel.WARNING); });\n return bindingsResult.templateBindings;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return [];\n }\n };\n BindingParser.prototype.parseLiteralAttr = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n if (_isAnimationLabel(name)) {\n name = name.substring(1);\n if (value) {\n this._reportError(\"Assigning animation triggers via @prop=\\\"exp\\\" attributes with an expression is invalid.\" +\n \" Use property bindings (e.g. [@prop]=\\\"exp\\\") or use an attribute without a value (e.g. @prop) instead.\", sourceSpan, ParseErrorLevel.ERROR);\n }\n this._parseAnimation(name, value, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n targetProps.push(new BoundProperty(name, this._exprParser.wrapLiteralPrimitive(value, ''), BoundPropertyType.LITERAL_ATTR, sourceSpan));\n }\n };\n BindingParser.prototype.parsePropertyBinding = function (name, expression, isHost, sourceSpan, targetMatchableAttrs, targetProps) {\n var isAnimationProp = false;\n if (name.startsWith(ANIMATE_PROP_PREFIX)) {\n isAnimationProp = true;\n name = name.substring(ANIMATE_PROP_PREFIX.length);\n }\n else if (_isAnimationLabel(name)) {\n isAnimationProp = true;\n name = name.substring(1);\n }\n if (isAnimationProp) {\n this._parseAnimation(name, expression, sourceSpan, targetMatchableAttrs, targetProps);\n }\n else {\n this._parsePropertyAst(name, this._parseBinding(expression, isHost, sourceSpan), sourceSpan, targetMatchableAttrs, targetProps);\n }\n };\n BindingParser.prototype.parsePropertyInterpolation = function (name, value, sourceSpan, targetMatchableAttrs, targetProps) {\n var expr = this.parseInterpolation(value, sourceSpan);\n if (expr) {\n this._parsePropertyAst(name, expr, sourceSpan, targetMatchableAttrs, targetProps);\n return true;\n }\n return false;\n };\n BindingParser.prototype._parsePropertyAst = function (name, ast, sourceSpan, targetMatchableAttrs, targetProps) {\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new BoundProperty(name, ast, BoundPropertyType.DEFAULT, sourceSpan));\n };\n BindingParser.prototype._parseAnimation = function (name, expression, sourceSpan, targetMatchableAttrs, targetProps) {\n // This will occur when a @trigger is not paired with an expression.\n // For animations it is valid to not have an expression since */void\n // states will be applied by angular when the element is attached/detached\n var ast = this._parseBinding(expression || 'undefined', false, sourceSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetProps.push(new BoundProperty(name, ast, BoundPropertyType.ANIMATION, sourceSpan));\n };\n BindingParser.prototype._parseBinding = function (value, isHostBinding, sourceSpan) {\n var sourceInfo = sourceSpan.start.toString();\n try {\n var ast = isHostBinding ?\n this._exprParser.parseSimpleBinding(value, sourceInfo, this._interpolationConfig) :\n this._exprParser.parseBinding(value, sourceInfo, this._interpolationConfig);\n if (ast)\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n BindingParser.prototype.createElementPropertyAst = function (elementSelector, boundProp) {\n if (boundProp.isAnimation) {\n return new BoundElementPropertyAst(boundProp.name, PropertyBindingType.Animation, SecurityContext.NONE, boundProp.expression, null, boundProp.sourceSpan);\n }\n var unit = null;\n var bindingType = undefined;\n var boundPropertyName = null;\n var parts = boundProp.name.split(PROPERTY_PARTS_SEPARATOR);\n var securityContexts = undefined;\n // Check check for special cases (prefix style, attr, class)\n if (parts.length > 1) {\n if (parts[0] == ATTRIBUTE_PREFIX) {\n boundPropertyName = parts[1];\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, true);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, true);\n var nsSeparatorIdx = boundPropertyName.indexOf(':');\n if (nsSeparatorIdx > -1) {\n var ns = boundPropertyName.substring(0, nsSeparatorIdx);\n var name_1 = boundPropertyName.substring(nsSeparatorIdx + 1);\n boundPropertyName = mergeNsAndName(ns, name_1);\n }\n bindingType = PropertyBindingType.Attribute;\n }\n else if (parts[0] == CLASS_PREFIX) {\n boundPropertyName = parts[1];\n bindingType = PropertyBindingType.Class;\n securityContexts = [SecurityContext.NONE];\n }\n else if (parts[0] == STYLE_PREFIX) {\n unit = parts.length > 2 ? parts[2] : null;\n boundPropertyName = parts[1];\n bindingType = PropertyBindingType.Style;\n securityContexts = [SecurityContext.STYLE];\n }\n }\n // If not a special case, use the full property name\n if (boundPropertyName === null) {\n boundPropertyName = this._schemaRegistry.getMappedPropName(boundProp.name);\n securityContexts = calcPossibleSecurityContexts(this._schemaRegistry, elementSelector, boundPropertyName, false);\n bindingType = PropertyBindingType.Property;\n this._validatePropertyOrAttributeName(boundPropertyName, boundProp.sourceSpan, false);\n }\n return new BoundElementPropertyAst(boundPropertyName, bindingType, securityContexts[0], boundProp.expression, unit, boundProp.sourceSpan);\n };\n BindingParser.prototype.parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n if (_isAnimationLabel(name)) {\n name = name.substr(1);\n this._parseAnimationEvent(name, expression, sourceSpan, targetEvents);\n }\n else {\n this._parseEvent(name, expression, sourceSpan, targetMatchableAttrs, targetEvents);\n }\n };\n BindingParser.prototype._parseAnimationEvent = function (name, expression, sourceSpan, targetEvents) {\n var matches = splitAtPeriod(name, [name, '']);\n var eventName = matches[0];\n var phase = matches[1].toLowerCase();\n if (phase) {\n switch (phase) {\n case 'start':\n case 'done':\n var ast = this._parseAction(expression, sourceSpan);\n targetEvents.push(new BoundEventAst(eventName, null, phase, ast, sourceSpan));\n break;\n default:\n this._reportError(\"The provided animation output phase value \\\"\" + phase + \"\\\" for \\\"@\" + eventName + \"\\\" is not supported (use start or done)\", sourceSpan);\n break;\n }\n }\n else {\n this._reportError(\"The animation trigger output event (@\" + eventName + \") is missing its phase value name (start or done are currently supported)\", sourceSpan);\n }\n };\n BindingParser.prototype._parseEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n // long format: 'target: eventName'\n var _a = __read(splitAtColon(name, [null, name]), 2), target = _a[0], eventName = _a[1];\n var ast = this._parseAction(expression, sourceSpan);\n targetMatchableAttrs.push([name, ast.source]);\n targetEvents.push(new BoundEventAst(eventName, target, null, ast, sourceSpan));\n // Don't detect directives for event names for now,\n // so don't add the event name to the matchableAttrs\n };\n BindingParser.prototype._parseAction = function (value, sourceSpan) {\n var sourceInfo = sourceSpan.start.toString();\n try {\n var ast = this._exprParser.parseAction(value, sourceInfo, this._interpolationConfig);\n if (ast) {\n this._reportExpressionParserErrors(ast.errors, sourceSpan);\n }\n if (!ast || ast.ast instanceof EmptyExpr) {\n this._reportError(\"Empty expressions are not allowed\", sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n this._checkPipes(ast, sourceSpan);\n return ast;\n }\n catch (e) {\n this._reportError(\"\" + e, sourceSpan);\n return this._exprParser.wrapLiteralPrimitive('ERROR', sourceInfo);\n }\n };\n BindingParser.prototype._reportError = function (message, sourceSpan, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this._targetErrors.push(new ParseError(sourceSpan, message, level));\n };\n BindingParser.prototype._reportExpressionParserErrors = function (errors, sourceSpan) {\n try {\n for (var errors_1 = __values(errors), errors_1_1 = errors_1.next(); !errors_1_1.done; errors_1_1 = errors_1.next()) {\n var error$$1 = errors_1_1.value;\n this._reportError(error$$1.message, sourceSpan);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (errors_1_1 && !errors_1_1.done && (_a = errors_1.return)) _a.call(errors_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var e_1, _a;\n };\n BindingParser.prototype._checkPipes = function (ast, sourceSpan) {\n var _this = this;\n if (ast) {\n var collector = new PipeCollector();\n ast.visit(collector);\n collector.pipes.forEach(function (ast, pipeName) {\n var pipeMeta = _this.pipesByName.get(pipeName);\n if (!pipeMeta) {\n _this._reportError(\"The pipe '\" + pipeName + \"' could not be found\", new ParseSourceSpan(sourceSpan.start.moveBy(ast.span.start), sourceSpan.start.moveBy(ast.span.end)));\n }\n else {\n _this._usedPipes.set(pipeName, pipeMeta);\n }\n });\n }\n };\n /**\n * @param propName the name of the property / attribute\n * @param sourceSpan\n * @param isAttr true when binding to an attribute\n */\n BindingParser.prototype._validatePropertyOrAttributeName = function (propName, sourceSpan, isAttr) {\n var report = isAttr ? this._schemaRegistry.validateAttribute(propName) :\n this._schemaRegistry.validateProperty(propName);\n if (report.error) {\n this._reportError(report.msg, sourceSpan, ParseErrorLevel.ERROR);\n }\n };\n return BindingParser;\n}());\nvar PipeCollector = /** @class */ (function (_super) {\n __extends(PipeCollector, _super);\n function PipeCollector() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.pipes = new Map();\n return _this;\n }\n PipeCollector.prototype.visitPipe = function (ast, context) {\n this.pipes.set(ast.name, ast);\n ast.exp.visit(this);\n this.visitAll(ast.args, context);\n return null;\n };\n return PipeCollector;\n}(RecursiveAstVisitor));\nfunction _isAnimationLabel(name) {\n return name[0] == '@';\n}\nfunction calcPossibleSecurityContexts(registry, selector, propName, isAttribute) {\n var ctxs = [];\n CssSelector.parse(selector).forEach(function (selector) {\n var elementNames = selector.element ? [selector.element] : registry.allKnownElementNames();\n var notElementNames = new Set(selector.notSelectors.filter(function (selector) { return selector.isElementSelector(); })\n .map(function (selector) { return selector.element; }));\n var possibleElementNames = elementNames.filter(function (elementName) { return !notElementNames.has(elementName); });\n ctxs.push.apply(ctxs, __spread(possibleElementNames.map(function (elementName) { return registry.securityContext(elementName, propName, isAttribute); })));\n });\n return ctxs.length === 0 ? [SecurityContext.NONE] : Array.from(new Set(ctxs)).sort();\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 BIND_NAME_REGEXP = /^(?:(?:(?:(bind-)|(let-)|(ref-|#)|(on-)|(bindon-)|(@))(.+))|\\[\\(([^\\)]+)\\)\\]|\\[([^\\]]+)\\]|\\(([^\\)]+)\\))$/;\n// Group 1 = \"bind-\"\nvar KW_BIND_IDX = 1;\n// Group 2 = \"let-\"\nvar KW_LET_IDX = 2;\n// Group 3 = \"ref-/#\"\nvar KW_REF_IDX = 3;\n// Group 4 = \"on-\"\nvar KW_ON_IDX = 4;\n// Group 5 = \"bindon-\"\nvar KW_BINDON_IDX = 5;\n// Group 6 = \"@\"\nvar KW_AT_IDX = 6;\n// Group 7 = the identifier after \"bind-\", \"let-\", \"ref-/#\", \"on-\", \"bindon-\" or \"@\"\nvar IDENT_KW_IDX = 7;\n// Group 8 = identifier inside [()]\nvar IDENT_BANANA_BOX_IDX = 8;\n// Group 9 = identifier inside []\nvar IDENT_PROPERTY_IDX = 9;\n// Group 10 = identifier inside ()\nvar IDENT_EVENT_IDX = 10;\nvar TEMPLATE_ATTR_PREFIX = '*';\nvar CLASS_ATTR = 'class';\nvar TEXT_CSS_SELECTOR = CssSelector.parse('*')[0];\nvar TemplateParseError = /** @class */ (function (_super) {\n __extends(TemplateParseError, _super);\n function TemplateParseError(message, span, level) {\n return _super.call(this, span, message, level) || this;\n }\n return TemplateParseError;\n}(ParseError));\nvar TemplateParseResult = /** @class */ (function () {\n function TemplateParseResult(templateAst, usedPipes, errors) {\n this.templateAst = templateAst;\n this.usedPipes = usedPipes;\n this.errors = errors;\n }\n return TemplateParseResult;\n}());\nvar TemplateParser = /** @class */ (function () {\n function TemplateParser(_config, _reflector, _exprParser, _schemaRegistry, _htmlParser, _console, transforms) {\n this._config = _config;\n this._reflector = _reflector;\n this._exprParser = _exprParser;\n this._schemaRegistry = _schemaRegistry;\n this._htmlParser = _htmlParser;\n this._console = _console;\n this.transforms = transforms;\n }\n Object.defineProperty(TemplateParser.prototype, \"expressionParser\", {\n get: function () { return this._exprParser; },\n enumerable: true,\n configurable: true\n });\n TemplateParser.prototype.parse = function (component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {\n var result = this.tryParse(component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces);\n var warnings = result.errors.filter(function (error$$1) { return error$$1.level === ParseErrorLevel.WARNING; });\n var errors = result.errors.filter(function (error$$1) { return error$$1.level === ParseErrorLevel.ERROR; });\n if (warnings.length > 0) {\n this._console.warn(\"Template parse warnings:\\n\" + warnings.join('\\n'));\n }\n if (errors.length > 0) {\n var errorString = errors.join('\\n');\n throw syntaxError(\"Template parse errors:\\n\" + errorString, errors);\n }\n return { template: result.templateAst, pipes: result.usedPipes };\n };\n TemplateParser.prototype.tryParse = function (component, template, directives, pipes, schemas, templateUrl, preserveWhitespaces) {\n var htmlParseResult = typeof template === 'string' ?\n this._htmlParser.parse(template, templateUrl, true, this.getInterpolationConfig(component)) :\n template;\n if (!preserveWhitespaces) {\n htmlParseResult = removeWhitespaces(htmlParseResult);\n }\n return this.tryParseHtml(this.expandHtml(htmlParseResult), component, directives, pipes, schemas);\n };\n TemplateParser.prototype.tryParseHtml = function (htmlAstWithErrors, component, directives, pipes, schemas) {\n var result;\n var errors = htmlAstWithErrors.errors;\n var usedPipes = [];\n if (htmlAstWithErrors.rootNodes.length > 0) {\n var uniqDirectives = removeSummaryDuplicates(directives);\n var uniqPipes = removeSummaryDuplicates(pipes);\n var providerViewContext = new ProviderViewContext(this._reflector, component);\n var interpolationConfig = undefined;\n if (component.template && component.template.interpolation) {\n interpolationConfig = {\n start: component.template.interpolation[0],\n end: component.template.interpolation[1]\n };\n }\n var bindingParser = new BindingParser(this._exprParser, interpolationConfig, this._schemaRegistry, uniqPipes, errors);\n var parseVisitor = new TemplateParseVisitor(this._reflector, this._config, providerViewContext, uniqDirectives, bindingParser, this._schemaRegistry, schemas, errors);\n result = visitAll(parseVisitor, htmlAstWithErrors.rootNodes, EMPTY_ELEMENT_CONTEXT);\n errors.push.apply(errors, __spread(providerViewContext.errors));\n usedPipes.push.apply(usedPipes, __spread(bindingParser.getUsedPipes()));\n }\n else {\n result = [];\n }\n this._assertNoReferenceDuplicationOnTemplate(result, errors);\n if (errors.length > 0) {\n return new TemplateParseResult(result, usedPipes, errors);\n }\n if (this.transforms) {\n this.transforms.forEach(function (transform) { result = templateVisitAll(transform, result); });\n }\n return new TemplateParseResult(result, usedPipes, errors);\n };\n TemplateParser.prototype.expandHtml = function (htmlAstWithErrors, forced) {\n if (forced === void 0) { forced = false; }\n var errors = htmlAstWithErrors.errors;\n if (errors.length == 0 || forced) {\n // Transform ICU messages to angular directives\n var expandedHtmlAst = expandNodes(htmlAstWithErrors.rootNodes);\n errors.push.apply(errors, __spread(expandedHtmlAst.errors));\n htmlAstWithErrors = new ParseTreeResult(expandedHtmlAst.nodes, errors);\n }\n return htmlAstWithErrors;\n };\n TemplateParser.prototype.getInterpolationConfig = function (component) {\n if (component.template) {\n return InterpolationConfig.fromArray(component.template.interpolation);\n }\n return undefined;\n };\n /** @internal */\n TemplateParser.prototype._assertNoReferenceDuplicationOnTemplate = function (result, errors) {\n var existingReferences = [];\n result.filter(function (element) { return !!element.references; })\n .forEach(function (element) { return element.references.forEach(function (reference) {\n var name = reference.name;\n if (existingReferences.indexOf(name) < 0) {\n existingReferences.push(name);\n }\n else {\n var error$$1 = new TemplateParseError(\"Reference \\\"#\" + name + \"\\\" is defined several times\", reference.sourceSpan, ParseErrorLevel.ERROR);\n errors.push(error$$1);\n }\n }); });\n };\n return TemplateParser;\n}());\nvar TemplateParseVisitor = /** @class */ (function () {\n function TemplateParseVisitor(reflector, config, providerViewContext, directives, _bindingParser, _schemaRegistry, _schemas, _targetErrors) {\n var _this = this;\n this.reflector = reflector;\n this.config = config;\n this.providerViewContext = providerViewContext;\n this._bindingParser = _bindingParser;\n this._schemaRegistry = _schemaRegistry;\n this._schemas = _schemas;\n this._targetErrors = _targetErrors;\n this.selectorMatcher = new SelectorMatcher();\n this.directivesIndex = new Map();\n this.ngContentCount = 0;\n // Note: queries start with id 1 so we can use the number in a Bloom filter!\n this.contentQueryStartId = providerViewContext.component.viewQueries.length + 1;\n directives.forEach(function (directive, index) {\n var selector = CssSelector.parse(directive.selector);\n _this.selectorMatcher.addSelectables(selector, directive);\n _this.directivesIndex.set(directive, index);\n });\n }\n TemplateParseVisitor.prototype.visitExpansion = function (expansion, context) { return null; };\n TemplateParseVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return null; };\n TemplateParseVisitor.prototype.visitText = function (text, parent) {\n var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR);\n var valueNoNgsp = replaceNgsp(text.value);\n var expr = this._bindingParser.parseInterpolation(valueNoNgsp, text.sourceSpan);\n return expr ? new BoundTextAst(expr, ngContentIndex, text.sourceSpan) :\n new TextAst(valueNoNgsp, ngContentIndex, text.sourceSpan);\n };\n TemplateParseVisitor.prototype.visitAttribute = function (attribute, context) {\n return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n };\n TemplateParseVisitor.prototype.visitComment = function (comment, context) { return null; };\n TemplateParseVisitor.prototype.visitElement = function (element, parent) {\n var _this = this;\n var queryStartIndex = this.contentQueryStartId;\n var nodeName = element.name;\n var preparsedElement = preparseElement(element);\n if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n preparsedElement.type === PreparsedElementType.STYLE) {\n // Skipping <script> for security reasons\n // Skipping <style> as we already processed them\n // in the StyleCompiler\n return null;\n }\n if (preparsedElement.type === PreparsedElementType.STYLESHEET &&\n isStyleUrlResolvable(preparsedElement.hrefAttr)) {\n // Skipping stylesheets with either relative urls or package scheme as we already processed\n // them in the StyleCompiler\n return null;\n }\n var matchableAttrs = [];\n var elementOrDirectiveProps = [];\n var elementOrDirectiveRefs = [];\n var elementVars = [];\n var events = [];\n var templateElementOrDirectiveProps = [];\n var templateMatchableAttrs = [];\n var templateElementVars = [];\n var hasInlineTemplates = false;\n var attrs = [];\n var isTemplateElement = isNgTemplate(element.name);\n element.attrs.forEach(function (attr) {\n var hasBinding = _this._parseAttr(isTemplateElement, attr, matchableAttrs, elementOrDirectiveProps, events, elementOrDirectiveRefs, elementVars);\n var templateBindingsSource;\n var prefixToken;\n var normalizedName = _this._normalizeAttributeName(attr.name);\n if (normalizedName.startsWith(TEMPLATE_ATTR_PREFIX)) {\n templateBindingsSource = attr.value;\n prefixToken = normalizedName.substring(TEMPLATE_ATTR_PREFIX.length) + ':';\n }\n var hasTemplateBinding = templateBindingsSource != null;\n if (hasTemplateBinding) {\n if (hasInlineTemplates) {\n _this._reportError(\"Can't have multiple template bindings on one element. Use only one attribute prefixed with *\", attr.sourceSpan);\n }\n hasInlineTemplates = true;\n _this._bindingParser.parseInlineTemplateBinding(prefixToken, templateBindingsSource, attr.sourceSpan, templateMatchableAttrs, templateElementOrDirectiveProps, templateElementVars);\n }\n if (!hasBinding && !hasTemplateBinding) {\n // don't include the bindings as attributes as well in the AST\n attrs.push(_this.visitAttribute(attr, null));\n matchableAttrs.push([attr.name, attr.value]);\n }\n });\n var elementCssSelector = createElementCssSelector(nodeName, matchableAttrs);\n var _a = this._parseDirectives(this.selectorMatcher, elementCssSelector), directiveMetas = _a.directives, matchElement = _a.matchElement;\n var references = [];\n var boundDirectivePropNames = new Set();\n var directiveAsts = this._createDirectiveAsts(isTemplateElement, element.name, directiveMetas, elementOrDirectiveProps, elementOrDirectiveRefs, element.sourceSpan, references, boundDirectivePropNames);\n var elementProps = this._createElementPropertyAsts(element.name, elementOrDirectiveProps, boundDirectivePropNames);\n var isViewRoot = parent.isTemplateElement || hasInlineTemplates;\n var providerContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, isViewRoot, directiveAsts, attrs, references, isTemplateElement, queryStartIndex, element.sourceSpan);\n var children = visitAll(preparsedElement.nonBindable ? NON_BINDABLE_VISITOR : this, element.children, ElementContext.create(isTemplateElement, directiveAsts, isTemplateElement ? parent.providerContext : providerContext));\n providerContext.afterElement();\n // Override the actual selector when the `ngProjectAs` attribute is provided\n var projectionSelector = preparsedElement.projectAs != null ?\n CssSelector.parse(preparsedElement.projectAs)[0] :\n elementCssSelector;\n var ngContentIndex = parent.findNgContentIndex(projectionSelector);\n var parsedElement;\n if (preparsedElement.type === PreparsedElementType.NG_CONTENT) {\n if (element.children && !element.children.every(_isEmptyTextNode)) {\n this._reportError(\"<ng-content> element cannot have content.\", element.sourceSpan);\n }\n parsedElement = new NgContentAst(this.ngContentCount++, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);\n }\n else if (isTemplateElement) {\n this._assertAllEventsPublishedByDirectives(directiveAsts, events);\n this._assertNoComponentsNorElementBindingsOnTemplate(directiveAsts, elementProps, element.sourceSpan);\n parsedElement = new EmbeddedTemplateAst(attrs, events, references, elementVars, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex, element.sourceSpan);\n }\n else {\n this._assertElementExists(matchElement, element);\n this._assertOnlyOneComponent(directiveAsts, element.sourceSpan);\n var ngContentIndex_1 = hasInlineTemplates ? null : parent.findNgContentIndex(projectionSelector);\n parsedElement = new ElementAst(nodeName, attrs, elementProps, events, references, providerContext.transformedDirectiveAsts, providerContext.transformProviders, providerContext.transformedHasViewContainer, providerContext.queryMatches, children, hasInlineTemplates ? null : ngContentIndex_1, element.sourceSpan, element.endSourceSpan || null);\n }\n if (hasInlineTemplates) {\n var templateQueryStartIndex = this.contentQueryStartId;\n var templateSelector = createElementCssSelector('ng-template', templateMatchableAttrs);\n var templateDirectiveMetas = this._parseDirectives(this.selectorMatcher, templateSelector).directives;\n var templateBoundDirectivePropNames = new Set();\n var templateDirectiveAsts = this._createDirectiveAsts(true, element.name, templateDirectiveMetas, templateElementOrDirectiveProps, [], element.sourceSpan, [], templateBoundDirectivePropNames);\n var templateElementProps = this._createElementPropertyAsts(element.name, templateElementOrDirectiveProps, templateBoundDirectivePropNames);\n this._assertNoComponentsNorElementBindingsOnTemplate(templateDirectiveAsts, templateElementProps, element.sourceSpan);\n var templateProviderContext = new ProviderElementContext(this.providerViewContext, parent.providerContext, parent.isTemplateElement, templateDirectiveAsts, [], [], true, templateQueryStartIndex, element.sourceSpan);\n templateProviderContext.afterElement();\n parsedElement = new EmbeddedTemplateAst([], [], [], templateElementVars, templateProviderContext.transformedDirectiveAsts, templateProviderContext.transformProviders, templateProviderContext.transformedHasViewContainer, templateProviderContext.queryMatches, [parsedElement], ngContentIndex, element.sourceSpan);\n }\n return parsedElement;\n };\n TemplateParseVisitor.prototype._parseAttr = function (isTemplateElement, attr, targetMatchableAttrs, targetProps, targetEvents, targetRefs, targetVars) {\n var name = this._normalizeAttributeName(attr.name);\n var value = attr.value;\n var srcSpan = attr.sourceSpan;\n var bindParts = name.match(BIND_NAME_REGEXP);\n var hasBinding = false;\n if (bindParts !== null) {\n hasBinding = true;\n if (bindParts[KW_BIND_IDX] != null) {\n this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);\n }\n else if (bindParts[KW_LET_IDX]) {\n if (isTemplateElement) {\n var identifier = bindParts[IDENT_KW_IDX];\n this._parseVariable(identifier, value, srcSpan, targetVars);\n }\n else {\n this._reportError(\"\\\"let-\\\" is only supported on ng-template elements.\", srcSpan);\n }\n }\n else if (bindParts[KW_REF_IDX]) {\n var identifier = bindParts[IDENT_KW_IDX];\n this._parseReference(identifier, value, srcSpan, targetRefs);\n }\n else if (bindParts[KW_ON_IDX]) {\n this._bindingParser.parseEvent(bindParts[IDENT_KW_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);\n }\n else if (bindParts[KW_BINDON_IDX]) {\n this._bindingParser.parsePropertyBinding(bindParts[IDENT_KW_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);\n this._parseAssignmentEvent(bindParts[IDENT_KW_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);\n }\n else if (bindParts[KW_AT_IDX]) {\n this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);\n }\n else if (bindParts[IDENT_BANANA_BOX_IDX]) {\n this._bindingParser.parsePropertyBinding(bindParts[IDENT_BANANA_BOX_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);\n this._parseAssignmentEvent(bindParts[IDENT_BANANA_BOX_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);\n }\n else if (bindParts[IDENT_PROPERTY_IDX]) {\n this._bindingParser.parsePropertyBinding(bindParts[IDENT_PROPERTY_IDX], value, false, srcSpan, targetMatchableAttrs, targetProps);\n }\n else if (bindParts[IDENT_EVENT_IDX]) {\n this._bindingParser.parseEvent(bindParts[IDENT_EVENT_IDX], value, srcSpan, targetMatchableAttrs, targetEvents);\n }\n }\n else {\n hasBinding = this._bindingParser.parsePropertyInterpolation(name, value, srcSpan, targetMatchableAttrs, targetProps);\n }\n if (!hasBinding) {\n this._bindingParser.parseLiteralAttr(name, value, srcSpan, targetMatchableAttrs, targetProps);\n }\n return hasBinding;\n };\n TemplateParseVisitor.prototype._normalizeAttributeName = function (attrName) {\n return /^data-/i.test(attrName) ? attrName.substring(5) : attrName;\n };\n TemplateParseVisitor.prototype._parseVariable = function (identifier, value, sourceSpan, targetVars) {\n if (identifier.indexOf('-') > -1) {\n this._reportError(\"\\\"-\\\" is not allowed in variable names\", sourceSpan);\n }\n targetVars.push(new VariableAst(identifier, value, sourceSpan));\n };\n TemplateParseVisitor.prototype._parseReference = function (identifier, value, sourceSpan, targetRefs) {\n if (identifier.indexOf('-') > -1) {\n this._reportError(\"\\\"-\\\" is not allowed in reference names\", sourceSpan);\n }\n targetRefs.push(new ElementOrDirectiveRef(identifier, value, sourceSpan));\n };\n TemplateParseVisitor.prototype._parseAssignmentEvent = function (name, expression, sourceSpan, targetMatchableAttrs, targetEvents) {\n this._bindingParser.parseEvent(name + \"Change\", expression + \"=$event\", sourceSpan, targetMatchableAttrs, targetEvents);\n };\n TemplateParseVisitor.prototype._parseDirectives = function (selectorMatcher, elementCssSelector) {\n var _this = this;\n // Need to sort the directives so that we get consistent results throughout,\n // as selectorMatcher uses Maps inside.\n // Also deduplicate directives as they might match more than one time!\n var directives = new Array(this.directivesIndex.size);\n // Whether any directive selector matches on the element name\n var matchElement = false;\n selectorMatcher.match(elementCssSelector, function (selector, directive) {\n directives[_this.directivesIndex.get(directive)] = directive;\n matchElement = matchElement || selector.hasElementSelector();\n });\n return {\n directives: directives.filter(function (dir) { return !!dir; }),\n matchElement: matchElement,\n };\n };\n TemplateParseVisitor.prototype._createDirectiveAsts = function (isTemplateElement, elementName, directives, props, elementOrDirectiveRefs, elementSourceSpan, targetReferences, targetBoundDirectivePropNames) {\n var _this = this;\n var matchedReferences = new Set();\n var component = null;\n var directiveAsts = directives.map(function (directive) {\n var sourceSpan = new ParseSourceSpan(elementSourceSpan.start, elementSourceSpan.end, \"Directive \" + identifierName(directive.type));\n if (directive.isComponent) {\n component = directive;\n }\n var directiveProperties = [];\n var hostProperties = _this._bindingParser.createDirectiveHostPropertyAsts(directive, elementName, sourceSpan);\n // Note: We need to check the host properties here as well,\n // as we don't know the element name in the DirectiveWrapperCompiler yet.\n hostProperties = _this._checkPropertiesInSchema(elementName, hostProperties);\n var hostEvents = _this._bindingParser.createDirectiveHostEventAsts(directive, sourceSpan);\n _this._createDirectivePropertyAsts(directive.inputs, props, directiveProperties, targetBoundDirectivePropNames);\n elementOrDirectiveRefs.forEach(function (elOrDirRef) {\n if ((elOrDirRef.value.length === 0 && directive.isComponent) ||\n (elOrDirRef.isReferenceToDirective(directive))) {\n targetReferences.push(new ReferenceAst(elOrDirRef.name, createTokenForReference(directive.type.reference), elOrDirRef.value, elOrDirRef.sourceSpan));\n matchedReferences.add(elOrDirRef.name);\n }\n });\n var contentQueryStartId = _this.contentQueryStartId;\n _this.contentQueryStartId += directive.queries.length;\n return new DirectiveAst(directive, directiveProperties, hostProperties, hostEvents, contentQueryStartId, sourceSpan);\n });\n elementOrDirectiveRefs.forEach(function (elOrDirRef) {\n if (elOrDirRef.value.length > 0) {\n if (!matchedReferences.has(elOrDirRef.name)) {\n _this._reportError(\"There is no directive with \\\"exportAs\\\" set to \\\"\" + elOrDirRef.value + \"\\\"\", elOrDirRef.sourceSpan);\n }\n }\n else if (!component) {\n var refToken = null;\n if (isTemplateElement) {\n refToken = createTokenForExternalReference(_this.reflector, Identifiers.TemplateRef);\n }\n targetReferences.push(new ReferenceAst(elOrDirRef.name, refToken, elOrDirRef.value, elOrDirRef.sourceSpan));\n }\n });\n return directiveAsts;\n };\n TemplateParseVisitor.prototype._createDirectivePropertyAsts = function (directiveProperties, boundProps, targetBoundDirectiveProps, targetBoundDirectivePropNames) {\n if (directiveProperties) {\n var boundPropsByName_1 = new Map();\n boundProps.forEach(function (boundProp) {\n var prevValue = boundPropsByName_1.get(boundProp.name);\n if (!prevValue || prevValue.isLiteral) {\n // give [a]=\"b\" a higher precedence than a=\"b\" on the same element\n boundPropsByName_1.set(boundProp.name, boundProp);\n }\n });\n Object.keys(directiveProperties).forEach(function (dirProp) {\n var elProp = directiveProperties[dirProp];\n var boundProp = boundPropsByName_1.get(elProp);\n // Bindings are optional, so this binding only needs to be set up if an expression is given.\n if (boundProp) {\n targetBoundDirectivePropNames.add(boundProp.name);\n if (!isEmptyExpression(boundProp.expression)) {\n targetBoundDirectiveProps.push(new BoundDirectivePropertyAst(dirProp, boundProp.name, boundProp.expression, boundProp.sourceSpan));\n }\n }\n });\n }\n };\n TemplateParseVisitor.prototype._createElementPropertyAsts = function (elementName, props, boundDirectivePropNames) {\n var _this = this;\n var boundElementProps = [];\n props.forEach(function (prop) {\n if (!prop.isLiteral && !boundDirectivePropNames.has(prop.name)) {\n boundElementProps.push(_this._bindingParser.createElementPropertyAst(elementName, prop));\n }\n });\n return this._checkPropertiesInSchema(elementName, boundElementProps);\n };\n TemplateParseVisitor.prototype._findComponentDirectives = function (directives) {\n return directives.filter(function (directive) { return directive.directive.isComponent; });\n };\n TemplateParseVisitor.prototype._findComponentDirectiveNames = function (directives) {\n return this._findComponentDirectives(directives)\n .map(function (directive) { return identifierName(directive.directive.type); });\n };\n TemplateParseVisitor.prototype._assertOnlyOneComponent = function (directives, sourceSpan) {\n var componentTypeNames = this._findComponentDirectiveNames(directives);\n if (componentTypeNames.length > 1) {\n this._reportError(\"More than one component matched on this element.\\n\" +\n \"Make sure that only one component's selector can match a given element.\\n\" +\n (\"Conflicting components: \" + componentTypeNames.join(',')), sourceSpan);\n }\n };\n /**\n * Make sure that non-angular tags conform to the schemas.\n *\n * Note: An element is considered an angular tag when at least one directive selector matches the\n * tag name.\n *\n * @param matchElement Whether any directive has matched on the tag name\n * @param element the html element\n */\n TemplateParseVisitor.prototype._assertElementExists = function (matchElement, element) {\n var elName = element.name.replace(/^:xhtml:/, '');\n if (!matchElement && !this._schemaRegistry.hasElement(elName, this._schemas)) {\n var errorMsg = \"'\" + elName + \"' is not a known element:\\n\";\n errorMsg +=\n \"1. If '\" + elName + \"' is an Angular component, then verify that it is part of this module.\\n\";\n if (elName.indexOf('-') > -1) {\n errorMsg +=\n \"2. If '\" + elName + \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\";\n }\n else {\n errorMsg +=\n \"2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n }\n this._reportError(errorMsg, element.sourceSpan);\n }\n };\n TemplateParseVisitor.prototype._assertNoComponentsNorElementBindingsOnTemplate = function (directives, elementProps, sourceSpan) {\n var _this = this;\n var componentTypeNames = this._findComponentDirectiveNames(directives);\n if (componentTypeNames.length > 0) {\n this._reportError(\"Components on an embedded template: \" + componentTypeNames.join(','), sourceSpan);\n }\n elementProps.forEach(function (prop) {\n _this._reportError(\"Property binding \" + prop.name + \" not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the \\\"@NgModule.declarations\\\".\", sourceSpan);\n });\n };\n TemplateParseVisitor.prototype._assertAllEventsPublishedByDirectives = function (directives, events) {\n var _this = this;\n var allDirectiveEvents = new Set();\n directives.forEach(function (directive) {\n Object.keys(directive.directive.outputs).forEach(function (k) {\n var eventName = directive.directive.outputs[k];\n allDirectiveEvents.add(eventName);\n });\n });\n events.forEach(function (event) {\n if (event.target != null || !allDirectiveEvents.has(event.name)) {\n _this._reportError(\"Event binding \" + event.fullName + \" not emitted by any directive on an embedded template. Make sure that the event name is spelled correctly and all directives are listed in the \\\"@NgModule.declarations\\\".\", event.sourceSpan);\n }\n });\n };\n TemplateParseVisitor.prototype._checkPropertiesInSchema = function (elementName, boundProps) {\n var _this = this;\n // Note: We can't filter out empty expressions before this method,\n // as we still want to validate them!\n return boundProps.filter(function (boundProp) {\n if (boundProp.type === PropertyBindingType.Property &&\n !_this._schemaRegistry.hasProperty(elementName, boundProp.name, _this._schemas)) {\n var errorMsg = \"Can't bind to '\" + boundProp.name + \"' since it isn't a known property of '\" + elementName + \"'.\";\n if (elementName.startsWith('ng-')) {\n errorMsg +=\n \"\\n1. If '\" + boundProp.name + \"' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.\" +\n \"\\n2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n }\n else if (elementName.indexOf('-') > -1) {\n errorMsg +=\n \"\\n1. If '\" + elementName + \"' is an Angular component and it has '\" + boundProp.name + \"' input, then verify that it is part of this module.\" +\n (\"\\n2. If '\" + elementName + \"' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.\") +\n \"\\n3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.\";\n }\n _this._reportError(errorMsg, boundProp.sourceSpan);\n }\n return !isEmptyExpression(boundProp.value);\n });\n };\n TemplateParseVisitor.prototype._reportError = function (message, sourceSpan, level) {\n if (level === void 0) { level = ParseErrorLevel.ERROR; }\n this._targetErrors.push(new ParseError(sourceSpan, message, level));\n };\n return TemplateParseVisitor;\n}());\nvar NonBindableVisitor = /** @class */ (function () {\n function NonBindableVisitor() {\n }\n NonBindableVisitor.prototype.visitElement = function (ast, parent) {\n var preparsedElement = preparseElement(ast);\n if (preparsedElement.type === PreparsedElementType.SCRIPT ||\n preparsedElement.type === PreparsedElementType.STYLE ||\n preparsedElement.type === PreparsedElementType.STYLESHEET) {\n // Skipping <script> for security reasons\n // Skipping <style> and stylesheets as we already processed them\n // in the StyleCompiler\n return null;\n }\n var attrNameAndValues = ast.attrs.map(function (attr) { return [attr.name, attr.value]; });\n var selector = createElementCssSelector(ast.name, attrNameAndValues);\n var ngContentIndex = parent.findNgContentIndex(selector);\n var children = visitAll(this, ast.children, EMPTY_ELEMENT_CONTEXT);\n return new ElementAst(ast.name, visitAll(this, ast.attrs), [], [], [], [], [], false, [], children, ngContentIndex, ast.sourceSpan, ast.endSourceSpan);\n };\n NonBindableVisitor.prototype.visitComment = function (comment, context) { return null; };\n NonBindableVisitor.prototype.visitAttribute = function (attribute, context) {\n return new AttrAst(attribute.name, attribute.value, attribute.sourceSpan);\n };\n NonBindableVisitor.prototype.visitText = function (text, parent) {\n var ngContentIndex = parent.findNgContentIndex(TEXT_CSS_SELECTOR);\n return new TextAst(text.value, ngContentIndex, text.sourceSpan);\n };\n NonBindableVisitor.prototype.visitExpansion = function (expansion, context) { return expansion; };\n NonBindableVisitor.prototype.visitExpansionCase = function (expansionCase, context) { return expansionCase; };\n return NonBindableVisitor;\n}());\n/**\n * A reference to an element or directive in a template. E.g., the reference in this template:\n *\n * <div #myMenu=\"coolMenu\">\n *\n * would be {name: 'myMenu', value: 'coolMenu', sourceSpan: ...}\n */\nvar ElementOrDirectiveRef = /** @class */ (function () {\n function ElementOrDirectiveRef(name, value, sourceSpan) {\n this.name = name;\n this.value = value;\n this.sourceSpan = sourceSpan;\n }\n /** Gets whether this is a reference to the given directive. */\n ElementOrDirectiveRef.prototype.isReferenceToDirective = function (directive) {\n return splitExportAs(directive.exportAs).indexOf(this.value) !== -1;\n };\n return ElementOrDirectiveRef;\n}());\n/** Splits a raw, potentially comma-delimited `exportAs` value into an array of names. */\nfunction splitExportAs(exportAs) {\n return exportAs ? exportAs.split(',').map(function (e) { return e.trim(); }) : [];\n}\nfunction splitClasses(classAttrValue) {\n return classAttrValue.trim().split(/\\s+/g);\n}\nvar ElementContext = /** @class */ (function () {\n function ElementContext(isTemplateElement, _ngContentIndexMatcher, _wildcardNgContentIndex, providerContext) {\n this.isTemplateElement = isTemplateElement;\n this._ngContentIndexMatcher = _ngContentIndexMatcher;\n this._wildcardNgContentIndex = _wildcardNgContentIndex;\n this.providerContext = providerContext;\n }\n ElementContext.create = function (isTemplateElement, directives, providerContext) {\n var matcher = new SelectorMatcher();\n var wildcardNgContentIndex = null;\n var component = directives.find(function (directive) { return directive.directive.isComponent; });\n if (component) {\n var ngContentSelectors = component.directive.template.ngContentSelectors;\n for (var i = 0; i < ngContentSelectors.length; i++) {\n var selector = ngContentSelectors[i];\n if (selector === '*') {\n wildcardNgContentIndex = i;\n }\n else {\n matcher.addSelectables(CssSelector.parse(ngContentSelectors[i]), i);\n }\n }\n }\n return new ElementContext(isTemplateElement, matcher, wildcardNgContentIndex, providerContext);\n };\n ElementContext.prototype.findNgContentIndex = function (selector) {\n var ngContentIndices = [];\n this._ngContentIndexMatcher.match(selector, function (selector, ngContentIndex) { ngContentIndices.push(ngContentIndex); });\n ngContentIndices.sort();\n if (this._wildcardNgContentIndex != null) {\n ngContentIndices.push(this._wildcardNgContentIndex);\n }\n return ngContentIndices.length > 0 ? ngContentIndices[0] : null;\n };\n return ElementContext;\n}());\nfunction createElementCssSelector(elementName, attributes) {\n var cssSelector = new CssSelector();\n var elNameNoNs = splitNsName(elementName)[1];\n cssSelector.setElement(elNameNoNs);\n for (var i = 0; i < attributes.length; i++) {\n var attrName = attributes[i][0];\n var attrNameNoNs = splitNsName(attrName)[1];\n var attrValue = attributes[i][1];\n cssSelector.addAttribute(attrNameNoNs, attrValue);\n if (attrName.toLowerCase() == CLASS_ATTR) {\n var classes = splitClasses(attrValue);\n classes.forEach(function (className) { return cssSelector.addClassName(className); });\n }\n }\n return cssSelector;\n}\nvar EMPTY_ELEMENT_CONTEXT = new ElementContext(true, new SelectorMatcher(), null, null);\nvar NON_BINDABLE_VISITOR = new NonBindableVisitor();\nfunction _isEmptyTextNode(node) {\n return node instanceof Text && node.value.trim().length == 0;\n}\nfunction removeSummaryDuplicates(items) {\n var map = new Map();\n items.forEach(function (item) {\n if (!map.get(item.type.reference)) {\n map.set(item.type.reference, item);\n }\n });\n return Array.from(map.values());\n}\nfunction isEmptyExpression(ast) {\n if (ast instanceof ASTWithSource) {\n ast = ast.ast;\n }\n return ast instanceof EmptyExpr;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 EventHandlerVars = /** @class */ (function () {\n function EventHandlerVars() {\n }\n EventHandlerVars.event = variable('$event');\n return EventHandlerVars;\n}());\nvar ConvertActionBindingResult = /** @class */ (function () {\n function ConvertActionBindingResult(\n /**\n * Render2 compatible statements,\n */\n stmts, \n /**\n * Variable name used with render2 compatible statements.\n */\n allowDefault) {\n this.stmts = stmts;\n this.allowDefault = allowDefault;\n /**\n * This is bit of a hack. It converts statements which render2 expects to statements which are\n * expected by render3.\n *\n * Example: `<div click=\"doSomething($event)\">` will generate:\n *\n * Render3:\n * ```\n * const pd_b:any = ((<any>ctx.doSomething($event)) !== false);\n * return pd_b;\n * ```\n *\n * but render2 expects:\n * ```\n * return ctx.doSomething($event);\n * ```\n */\n // TODO(misko): remove this hack once we no longer support ViewEngine.\n this.render3Stmts = stmts.map(function (statement) {\n if (statement instanceof DeclareVarStmt && statement.name == allowDefault.name &&\n statement.value instanceof BinaryOperatorExpr) {\n var lhs = statement.value.lhs;\n return new ReturnStatement(lhs.value);\n }\n return statement;\n });\n }\n return ConvertActionBindingResult;\n}());\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression is\n * used in an action binding (e.g. an event handler).\n */\nfunction convertActionBinding(localResolver, implicitReceiver, action, bindingId, interpolationFunction) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n var actionWithoutBuiltins = convertPropertyBindingBuiltins({\n createLiteralArrayConverter: function (argCount) {\n // Note: no caching for literal arrays in actions.\n return function (args) { return literalArr(args); };\n },\n createLiteralMapConverter: function (keys) {\n // Note: no caching for literal maps in actions.\n return function (values) {\n var entries = keys.map(function (k, i) { return ({\n key: k.key,\n value: values[i],\n quoted: k.quoted,\n }); });\n return literalMap(entries);\n };\n },\n createPipeConverter: function (name) {\n throw new Error(\"Illegal State: Actions are not allowed to contain pipes. Pipe: \" + name);\n }\n }, action);\n var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);\n var actionStmts = [];\n flattenStatements(actionWithoutBuiltins.visit(visitor, _Mode.Statement), actionStmts);\n prependTemporaryDecls(visitor.temporaryCount, bindingId, actionStmts);\n var lastIndex = actionStmts.length - 1;\n var preventDefaultVar = null;\n if (lastIndex >= 0) {\n var lastStatement = actionStmts[lastIndex];\n var returnExpr = convertStmtIntoExpression(lastStatement);\n if (returnExpr) {\n // Note: We need to cast the result of the method call to dynamic,\n // as it might be a void method!\n preventDefaultVar = createPreventDefaultVar(bindingId);\n actionStmts[lastIndex] =\n preventDefaultVar.set(returnExpr.cast(DYNAMIC_TYPE).notIdentical(literal(false)))\n .toDeclStmt(null, [StmtModifier.Final]);\n }\n }\n return new ConvertActionBindingResult(actionStmts, preventDefaultVar);\n}\nfunction convertPropertyBindingBuiltins(converterFactory, ast) {\n return convertBuiltins(converterFactory, ast);\n}\nvar ConvertPropertyBindingResult = /** @class */ (function () {\n function ConvertPropertyBindingResult(stmts, currValExpr) {\n this.stmts = stmts;\n this.currValExpr = currValExpr;\n }\n return ConvertPropertyBindingResult;\n}());\nvar BindingForm;\n(function (BindingForm) {\n // The general form of binding expression, supports all expressions.\n BindingForm[BindingForm[\"General\"] = 0] = \"General\";\n // Try to generate a simple binding (no temporaries or statements)\n // otherwise generate a general binding\n BindingForm[BindingForm[\"TrySimple\"] = 1] = \"TrySimple\";\n})(BindingForm || (BindingForm = {}));\n/**\n * Converts the given expression AST into an executable output AST, assuming the expression\n * is used in property binding. The expression has to be preprocessed via\n * `convertPropertyBindingBuiltins`.\n */\nfunction convertPropertyBinding(localResolver, implicitReceiver, expressionWithoutBuiltins, bindingId, form, interpolationFunction) {\n if (!localResolver) {\n localResolver = new DefaultLocalResolver();\n }\n var currValExpr = createCurrValueExpr(bindingId);\n var stmts = [];\n var visitor = new _AstToIrVisitor(localResolver, implicitReceiver, bindingId, interpolationFunction);\n var outputExpr = expressionWithoutBuiltins.visit(visitor, _Mode.Expression);\n if (visitor.temporaryCount) {\n for (var i = 0; i < visitor.temporaryCount; i++) {\n stmts.push(temporaryDeclaration(bindingId, i));\n }\n }\n else if (form == BindingForm.TrySimple) {\n return new ConvertPropertyBindingResult([], outputExpr);\n }\n stmts.push(currValExpr.set(outputExpr).toDeclStmt(DYNAMIC_TYPE, [StmtModifier.Final]));\n return new ConvertPropertyBindingResult(stmts, currValExpr);\n}\nfunction convertBuiltins(converterFactory, ast) {\n var visitor = new _BuiltinAstConverter(converterFactory);\n return ast.visit(visitor);\n}\nfunction temporaryName(bindingId, temporaryNumber) {\n return \"tmp_\" + bindingId + \"_\" + temporaryNumber;\n}\nfunction temporaryDeclaration(bindingId, temporaryNumber) {\n return new DeclareVarStmt(temporaryName(bindingId, temporaryNumber), NULL_EXPR);\n}\nfunction prependTemporaryDecls(temporaryCount, bindingId, statements) {\n for (var i = temporaryCount - 1; i >= 0; i--) {\n statements.unshift(temporaryDeclaration(bindingId, i));\n }\n}\nvar _Mode;\n(function (_Mode) {\n _Mode[_Mode[\"Statement\"] = 0] = \"Statement\";\n _Mode[_Mode[\"Expression\"] = 1] = \"Expression\";\n})(_Mode || (_Mode = {}));\nfunction ensureStatementMode(mode, ast) {\n if (mode !== _Mode.Statement) {\n throw new Error(\"Expected a statement, but saw \" + ast);\n }\n}\nfunction ensureExpressionMode(mode, ast) {\n if (mode !== _Mode.Expression) {\n throw new Error(\"Expected an expression, but saw \" + ast);\n }\n}\nfunction convertToStatementIfNeeded(mode, expr) {\n if (mode === _Mode.Statement) {\n return expr.toStmt();\n }\n else {\n return expr;\n }\n}\nvar _BuiltinAstConverter = /** @class */ (function (_super) {\n __extends(_BuiltinAstConverter, _super);\n function _BuiltinAstConverter(_converterFactory) {\n var _this = _super.call(this) || this;\n _this._converterFactory = _converterFactory;\n return _this;\n }\n _BuiltinAstConverter.prototype.visitPipe = function (ast, context) {\n var _this = this;\n var args = __spread([ast.exp], ast.args).map(function (ast) { return ast.visit(_this, context); });\n return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createPipeConverter(ast.name, args.length));\n };\n _BuiltinAstConverter.prototype.visitLiteralArray = function (ast, context) {\n var _this = this;\n var args = ast.expressions.map(function (ast) { return ast.visit(_this, context); });\n return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralArrayConverter(ast.expressions.length));\n };\n _BuiltinAstConverter.prototype.visitLiteralMap = function (ast, context) {\n var _this = this;\n var args = ast.values.map(function (ast) { return ast.visit(_this, context); });\n return new BuiltinFunctionCall(ast.span, args, this._converterFactory.createLiteralMapConverter(ast.keys));\n };\n return _BuiltinAstConverter;\n}(AstTransformer));\nvar _AstToIrVisitor = /** @class */ (function () {\n function _AstToIrVisitor(_localResolver, _implicitReceiver, bindingId, interpolationFunction) {\n this._localResolver = _localResolver;\n this._implicitReceiver = _implicitReceiver;\n this.bindingId = bindingId;\n this.interpolationFunction = interpolationFunction;\n this._nodeMap = new Map();\n this._resultMap = new Map();\n this._currentTemporary = 0;\n this.temporaryCount = 0;\n }\n _AstToIrVisitor.prototype.visitBinary = function (ast, mode) {\n var op;\n switch (ast.operation) {\n case '+':\n op = BinaryOperator.Plus;\n break;\n case '-':\n op = BinaryOperator.Minus;\n break;\n case '*':\n op = BinaryOperator.Multiply;\n break;\n case '/':\n op = BinaryOperator.Divide;\n break;\n case '%':\n op = BinaryOperator.Modulo;\n break;\n case '&&':\n op = BinaryOperator.And;\n break;\n case '||':\n op = BinaryOperator.Or;\n break;\n case '==':\n op = BinaryOperator.Equals;\n break;\n case '!=':\n op = BinaryOperator.NotEquals;\n break;\n case '===':\n op = BinaryOperator.Identical;\n break;\n case '!==':\n op = BinaryOperator.NotIdentical;\n break;\n case '<':\n op = BinaryOperator.Lower;\n break;\n case '>':\n op = BinaryOperator.Bigger;\n break;\n case '<=':\n op = BinaryOperator.LowerEquals;\n break;\n case '>=':\n op = BinaryOperator.BiggerEquals;\n break;\n default:\n throw new Error(\"Unsupported operation \" + ast.operation);\n }\n return convertToStatementIfNeeded(mode, new BinaryOperatorExpr(op, this._visit(ast.left, _Mode.Expression), this._visit(ast.right, _Mode.Expression)));\n };\n _AstToIrVisitor.prototype.visitChain = function (ast, mode) {\n ensureStatementMode(mode, ast);\n return this.visitAll(ast.expressions, mode);\n };\n _AstToIrVisitor.prototype.visitConditional = function (ast, mode) {\n var value = this._visit(ast.condition, _Mode.Expression);\n return convertToStatementIfNeeded(mode, value.conditional(this._visit(ast.trueExp, _Mode.Expression), this._visit(ast.falseExp, _Mode.Expression)));\n };\n _AstToIrVisitor.prototype.visitPipe = function (ast, mode) {\n throw new Error(\"Illegal state: Pipes should have been converted into functions. Pipe: \" + ast.name);\n };\n _AstToIrVisitor.prototype.visitFunctionCall = function (ast, mode) {\n var convertedArgs = this.visitAll(ast.args, _Mode.Expression);\n var fnResult;\n if (ast instanceof BuiltinFunctionCall) {\n fnResult = ast.converter(convertedArgs);\n }\n else {\n fnResult = this._visit(ast.target, _Mode.Expression).callFn(convertedArgs);\n }\n return convertToStatementIfNeeded(mode, fnResult);\n };\n _AstToIrVisitor.prototype.visitImplicitReceiver = function (ast, mode) {\n ensureExpressionMode(mode, ast);\n return this._implicitReceiver;\n };\n _AstToIrVisitor.prototype.visitInterpolation = function (ast, mode) {\n ensureExpressionMode(mode, ast);\n var args = [literal(ast.expressions.length)];\n for (var i = 0; i < ast.strings.length - 1; i++) {\n args.push(literal(ast.strings[i]));\n args.push(this._visit(ast.expressions[i], _Mode.Expression));\n }\n args.push(literal(ast.strings[ast.strings.length - 1]));\n if (this.interpolationFunction) {\n return this.interpolationFunction(args);\n }\n return ast.expressions.length <= 9 ?\n importExpr(Identifiers.inlineInterpolate).callFn(args) :\n importExpr(Identifiers.interpolate).callFn([args[0], literalArr(args.slice(1))]);\n };\n _AstToIrVisitor.prototype.visitKeyedRead = function (ast, mode) {\n var leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n return convertToStatementIfNeeded(mode, this._visit(ast.obj, _Mode.Expression).key(this._visit(ast.key, _Mode.Expression)));\n }\n };\n _AstToIrVisitor.prototype.visitKeyedWrite = function (ast, mode) {\n var obj = this._visit(ast.obj, _Mode.Expression);\n var key = this._visit(ast.key, _Mode.Expression);\n var value = this._visit(ast.value, _Mode.Expression);\n return convertToStatementIfNeeded(mode, obj.key(key).set(value));\n };\n _AstToIrVisitor.prototype.visitLiteralArray = function (ast, mode) {\n throw new Error(\"Illegal State: literal arrays should have been converted into functions\");\n };\n _AstToIrVisitor.prototype.visitLiteralMap = function (ast, mode) {\n throw new Error(\"Illegal State: literal maps should have been converted into functions\");\n };\n _AstToIrVisitor.prototype.visitLiteralPrimitive = function (ast, mode) {\n // For literal values of null, undefined, true, or false allow type interference\n // to infer the type.\n var type = ast.value === null || ast.value === undefined || ast.value === true || ast.value === true ?\n INFERRED_TYPE :\n undefined;\n return convertToStatementIfNeeded(mode, literal(ast.value, type));\n };\n _AstToIrVisitor.prototype._getLocal = function (name) { return this._localResolver.getLocal(name); };\n _AstToIrVisitor.prototype.visitMethodCall = function (ast, mode) {\n if (ast.receiver instanceof ImplicitReceiver && ast.name == '$any') {\n var args = this.visitAll(ast.args, _Mode.Expression);\n if (args.length != 1) {\n throw new Error(\"Invalid call to $any, expected 1 argument but received \" + (args.length || 'none'));\n }\n return args[0].cast(DYNAMIC_TYPE);\n }\n var leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n var args = this.visitAll(ast.args, _Mode.Expression);\n var result = null;\n var receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n var varExpr = this._getLocal(ast.name);\n if (varExpr) {\n result = varExpr.callFn(args);\n }\n }\n if (result == null) {\n result = receiver.callMethod(ast.name, args);\n }\n return convertToStatementIfNeeded(mode, result);\n }\n };\n _AstToIrVisitor.prototype.visitPrefixNot = function (ast, mode) {\n return convertToStatementIfNeeded(mode, not(this._visit(ast.expression, _Mode.Expression)));\n };\n _AstToIrVisitor.prototype.visitNonNullAssert = function (ast, mode) {\n return convertToStatementIfNeeded(mode, assertNotNull(this._visit(ast.expression, _Mode.Expression)));\n };\n _AstToIrVisitor.prototype.visitPropertyRead = function (ast, mode) {\n var leftMostSafe = this.leftMostSafeNode(ast);\n if (leftMostSafe) {\n return this.convertSafeAccess(ast, leftMostSafe, mode);\n }\n else {\n var result = null;\n var receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n result = this._getLocal(ast.name);\n }\n if (result == null) {\n result = receiver.prop(ast.name);\n }\n return convertToStatementIfNeeded(mode, result);\n }\n };\n _AstToIrVisitor.prototype.visitPropertyWrite = function (ast, mode) {\n var receiver = this._visit(ast.receiver, _Mode.Expression);\n if (receiver === this._implicitReceiver) {\n var varExpr = this._getLocal(ast.name);\n if (varExpr) {\n throw new Error('Cannot assign to a reference or variable!');\n }\n }\n return convertToStatementIfNeeded(mode, receiver.prop(ast.name).set(this._visit(ast.value, _Mode.Expression)));\n };\n _AstToIrVisitor.prototype.visitSafePropertyRead = function (ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n };\n _AstToIrVisitor.prototype.visitSafeMethodCall = function (ast, mode) {\n return this.convertSafeAccess(ast, this.leftMostSafeNode(ast), mode);\n };\n _AstToIrVisitor.prototype.visitAll = function (asts, mode) {\n var _this = this;\n return asts.map(function (ast) { return _this._visit(ast, mode); });\n };\n _AstToIrVisitor.prototype.visitQuote = function (ast, mode) {\n throw new Error(\"Quotes are not supported for evaluation!\\n Statement: \" + ast.uninterpretedExpression + \" located at \" + ast.location);\n };\n _AstToIrVisitor.prototype._visit = function (ast, mode) {\n var result = this._resultMap.get(ast);\n if (result)\n return result;\n return (this._nodeMap.get(ast) || ast).visit(this, mode);\n };\n _AstToIrVisitor.prototype.convertSafeAccess = function (ast, leftMostSafe, mode) {\n // If the expression contains a safe access node on the left it needs to be converted to\n // an expression that guards the access to the member by checking the receiver for blank. As\n // execution proceeds from left to right, the left most part of the expression must be guarded\n // first but, because member access is left associative, the right side of the expression is at\n // the top of the AST. The desired result requires lifting a copy of the the left part of the\n // expression up to test it for blank before generating the unguarded version.\n // Consider, for example the following expression: a?.b.c?.d.e\n // This results in the ast:\n // .\n // / \\\n // ?. e\n // / \\\n // . d\n // / \\\n // ?. c\n // / \\\n // a b\n // The following tree should be generated:\n //\n // /---- ? ----\\\n // / | \\\n // a /--- ? ---\\ null\n // / | \\\n // . . null\n // / \\ / \\\n // . c . e\n // / \\ / \\\n // a b , d\n // / \\\n // . c\n // / \\\n // a b\n //\n // Notice that the first guard condition is the left hand of the left most safe access node\n // which comes in as leftMostSafe to this routine.\n var guardedExpression = this._visit(leftMostSafe.receiver, _Mode.Expression);\n var temporary = undefined;\n if (this.needsTemporary(leftMostSafe.receiver)) {\n // If the expression has method calls or pipes then we need to save the result into a\n // temporary variable to avoid calling stateful or impure code more than once.\n temporary = this.allocateTemporary();\n // Preserve the result in the temporary variable\n guardedExpression = temporary.set(guardedExpression);\n // Ensure all further references to the guarded expression refer to the temporary instead.\n this._resultMap.set(leftMostSafe.receiver, temporary);\n }\n var condition = guardedExpression.isBlank();\n // Convert the ast to an unguarded access to the receiver's member. The map will substitute\n // leftMostNode with its unguarded version in the call to `this.visit()`.\n if (leftMostSafe instanceof SafeMethodCall) {\n this._nodeMap.set(leftMostSafe, new MethodCall(leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name, leftMostSafe.args));\n }\n else {\n this._nodeMap.set(leftMostSafe, new PropertyRead(leftMostSafe.span, leftMostSafe.receiver, leftMostSafe.name));\n }\n // Recursively convert the node now without the guarded member access.\n var access = this._visit(ast, _Mode.Expression);\n // Remove the mapping. This is not strictly required as the converter only traverses each node\n // once but is safer if the conversion is changed to traverse the nodes more than once.\n this._nodeMap.delete(leftMostSafe);\n // If we allocated a temporary, release it.\n if (temporary) {\n this.releaseTemporary(temporary);\n }\n // Produce the conditional\n return convertToStatementIfNeeded(mode, condition.conditional(literal(null), access));\n };\n // Given a expression of the form a?.b.c?.d.e the the left most safe node is\n // the (a?.b). The . and ?. are left associative thus can be rewritten as:\n // ((((a?.c).b).c)?.d).e. This returns the most deeply nested safe read or\n // safe method call as this needs be transform initially to:\n // a == null ? null : a.c.b.c?.d.e\n // then to:\n // a == null ? null : a.b.c == null ? null : a.b.c.d.e\n _AstToIrVisitor.prototype.leftMostSafeNode = function (ast) {\n var _this = this;\n var visit = function (visitor, ast) {\n return (_this._nodeMap.get(ast) || ast).visit(visitor);\n };\n return ast.visit({\n visitBinary: function (ast) { return null; },\n visitChain: function (ast) { return null; },\n visitConditional: function (ast) { return null; },\n visitFunctionCall: function (ast) { return null; },\n visitImplicitReceiver: function (ast) { return null; },\n visitInterpolation: function (ast) { return null; },\n visitKeyedRead: function (ast) { return visit(this, ast.obj); },\n visitKeyedWrite: function (ast) { return null; },\n visitLiteralArray: function (ast) { return null; },\n visitLiteralMap: function (ast) { return null; },\n visitLiteralPrimitive: function (ast) { return null; },\n visitMethodCall: function (ast) { return visit(this, ast.receiver); },\n visitPipe: function (ast) { return null; },\n visitPrefixNot: function (ast) { return null; },\n visitNonNullAssert: function (ast) { return null; },\n visitPropertyRead: function (ast) { return visit(this, ast.receiver); },\n visitPropertyWrite: function (ast) { return null; },\n visitQuote: function (ast) { return null; },\n visitSafeMethodCall: function (ast) { return visit(this, ast.receiver) || ast; },\n visitSafePropertyRead: function (ast) {\n return visit(this, ast.receiver) || ast;\n }\n });\n };\n // Returns true of the AST includes a method or a pipe indicating that, if the\n // expression is used as the target of a safe property or method access then\n // the expression should be stored into a temporary variable.\n _AstToIrVisitor.prototype.needsTemporary = function (ast) {\n var _this = this;\n var visit = function (visitor, ast) {\n return ast && (_this._nodeMap.get(ast) || ast).visit(visitor);\n };\n var visitSome = function (visitor, ast) {\n return ast.some(function (ast) { return visit(visitor, ast); });\n };\n return ast.visit({\n visitBinary: function (ast) { return visit(this, ast.left) || visit(this, ast.right); },\n visitChain: function (ast) { return false; },\n visitConditional: function (ast) {\n return visit(this, ast.condition) || visit(this, ast.trueExp) ||\n visit(this, ast.falseExp);\n },\n visitFunctionCall: function (ast) { return true; },\n visitImplicitReceiver: function (ast) { return false; },\n visitInterpolation: function (ast) { return visitSome(this, ast.expressions); },\n visitKeyedRead: function (ast) { return false; },\n visitKeyedWrite: function (ast) { return false; },\n visitLiteralArray: function (ast) { return true; },\n visitLiteralMap: function (ast) { return true; },\n visitLiteralPrimitive: function (ast) { return false; },\n visitMethodCall: function (ast) { return true; },\n visitPipe: function (ast) { return true; },\n visitPrefixNot: function (ast) { return visit(this, ast.expression); },\n visitNonNullAssert: function (ast) { return visit(this, ast.expression); },\n visitPropertyRead: function (ast) { return false; },\n visitPropertyWrite: function (ast) { return false; },\n visitQuote: function (ast) { return false; },\n visitSafeMethodCall: function (ast) { return true; },\n visitSafePropertyRead: function (ast) { return false; }\n });\n };\n _AstToIrVisitor.prototype.allocateTemporary = function () {\n var tempNumber = this._currentTemporary++;\n this.temporaryCount = Math.max(this._currentTemporary, this.temporaryCount);\n return new ReadVarExpr(temporaryName(this.bindingId, tempNumber));\n };\n _AstToIrVisitor.prototype.releaseTemporary = function (temporary) {\n this._currentTemporary--;\n if (temporary.name != temporaryName(this.bindingId, this._currentTemporary)) {\n throw new Error(\"Temporary \" + temporary.name + \" released out of order\");\n }\n };\n return _AstToIrVisitor;\n}());\nfunction flattenStatements(arg, output) {\n if (Array.isArray(arg)) {\n arg.forEach(function (entry) { return flattenStatements(entry, output); });\n }\n else {\n output.push(arg);\n }\n}\nvar DefaultLocalResolver = /** @class */ (function () {\n function DefaultLocalResolver() {\n }\n DefaultLocalResolver.prototype.getLocal = function (name) {\n if (name === EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n return null;\n };\n return DefaultLocalResolver;\n}());\nfunction createCurrValueExpr(bindingId) {\n return variable(\"currVal_\" + bindingId); // fix syntax highlighting: `\n}\nfunction createPreventDefaultVar(bindingId) {\n return variable(\"pd_\" + bindingId);\n}\nfunction convertStmtIntoExpression(stmt) {\n if (stmt instanceof ExpressionStatement) {\n return stmt.expr;\n }\n else if (stmt instanceof ReturnStatement) {\n return stmt.value;\n }\n return null;\n}\nvar BuiltinFunctionCall = /** @class */ (function (_super) {\n __extends(BuiltinFunctionCall, _super);\n function BuiltinFunctionCall(span, args, converter) {\n var _this = _super.call(this, span, null, args) || this;\n _this.args = args;\n _this.converter = converter;\n return _this;\n }\n return BuiltinFunctionCall;\n}(FunctionCall));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Generates code that is used to type check templates.\n */\nvar TypeCheckCompiler = /** @class */ (function () {\n function TypeCheckCompiler(options, reflector) {\n this.options = options;\n this.reflector = reflector;\n }\n /**\n * Important notes:\n * - This must not produce new `import` statements, but only refer to types outside\n * of the file via the variables provided via externalReferenceVars.\n * This allows Typescript to reuse the old program's structure as no imports have changed.\n * - This must not produce any exports, as this would pollute the .d.ts file\n * and also violate the point above.\n */\n TypeCheckCompiler.prototype.compileComponent = function (componentId, component, template, usedPipes, externalReferenceVars, ctx) {\n var _this = this;\n var pipes = new Map();\n usedPipes.forEach(function (p) { return pipes.set(p.name, p.type.reference); });\n var embeddedViewCount = 0;\n var viewBuilderFactory = function (parent, guards) {\n var embeddedViewIndex = embeddedViewCount++;\n return new ViewBuilder(_this.options, _this.reflector, externalReferenceVars, parent, component.type.reference, component.isHost, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory);\n };\n var visitor = viewBuilderFactory(null, []);\n visitor.visitAll([], template);\n return visitor.build(componentId);\n };\n return TypeCheckCompiler;\n}());\nvar DYNAMIC_VAR_NAME = '_any';\nvar TypeCheckLocalResolver = /** @class */ (function () {\n function TypeCheckLocalResolver() {\n }\n TypeCheckLocalResolver.prototype.getLocal = function (name) {\n if (name === EventHandlerVars.event.name) {\n // References to the event should not be type-checked.\n // TODO(chuckj): determine a better type for the event.\n return variable(DYNAMIC_VAR_NAME);\n }\n return null;\n };\n return TypeCheckLocalResolver;\n}());\nvar defaultResolver = new TypeCheckLocalResolver();\nvar ViewBuilder = /** @class */ (function () {\n function ViewBuilder(options, reflector, externalReferenceVars, parent, component, isHostComponent, embeddedViewIndex, pipes, guards, ctx, viewBuilderFactory) {\n this.options = options;\n this.reflector = reflector;\n this.externalReferenceVars = externalReferenceVars;\n this.parent = parent;\n this.component = component;\n this.isHostComponent = isHostComponent;\n this.embeddedViewIndex = embeddedViewIndex;\n this.pipes = pipes;\n this.guards = guards;\n this.ctx = ctx;\n this.viewBuilderFactory = viewBuilderFactory;\n this.refOutputVars = new Map();\n this.variables = [];\n this.children = [];\n this.updates = [];\n this.actions = [];\n }\n ViewBuilder.prototype.getOutputVar = function (type) {\n var varName;\n if (type === this.component && this.isHostComponent) {\n varName = DYNAMIC_VAR_NAME;\n }\n else if (type instanceof StaticSymbol) {\n varName = this.externalReferenceVars.get(type);\n }\n else {\n varName = DYNAMIC_VAR_NAME;\n }\n if (!varName) {\n throw new Error(\"Illegal State: referring to a type without a variable \" + JSON.stringify(type));\n }\n return varName;\n };\n ViewBuilder.prototype.getTypeGuardExpressions = function (ast) {\n var result = __spread(this.guards);\n try {\n for (var _a = __values(ast.directives), _b = _a.next(); !_b.done; _b = _a.next()) {\n var directive = _b.value;\n try {\n for (var _c = __values(directive.inputs), _d = _c.next(); !_d.done; _d = _c.next()) {\n var input = _d.value;\n var guard = directive.directive.guards[input.directiveName];\n if (guard) {\n var useIf = guard === 'UseIf';\n result.push({\n guard: guard,\n useIf: useIf,\n expression: { context: this.component, value: input.value }\n });\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_e = _c.return)) _e.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_f = _a.return)) _f.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return result;\n var e_2, _f, e_1, _e;\n };\n ViewBuilder.prototype.visitAll = function (variables, astNodes) {\n this.variables = variables;\n templateVisitAll(this, astNodes);\n };\n ViewBuilder.prototype.build = function (componentId, targetStatements) {\n var _this = this;\n if (targetStatements === void 0) { targetStatements = []; }\n this.children.forEach(function (child) { return child.build(componentId, targetStatements); });\n var viewStmts = [variable(DYNAMIC_VAR_NAME).set(NULL_EXPR).toDeclStmt(DYNAMIC_TYPE)];\n var bindingCount = 0;\n this.updates.forEach(function (expression) {\n var _a = _this.preprocessUpdateExpression(expression), sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;\n var bindingId = \"\" + bindingCount++;\n var nameResolver = context === _this.component ? _this : defaultResolver;\n var _b = convertPropertyBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;\n stmts.push(new ExpressionStatement(currValExpr));\n viewStmts.push.apply(viewStmts, __spread(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));\n });\n this.actions.forEach(function (_a) {\n var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;\n var bindingId = \"\" + bindingCount++;\n var nameResolver = context === _this.component ? _this : defaultResolver;\n var stmts = convertActionBinding(nameResolver, variable(_this.getOutputVar(context)), value, bindingId).stmts;\n viewStmts.push.apply(viewStmts, __spread(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));\n });\n if (this.guards.length) {\n var guardExpression = undefined;\n try {\n for (var _a = __values(this.guards), _b = _a.next(); !_b.done; _b = _a.next()) {\n var guard = _b.value;\n var _c = this.preprocessUpdateExpression(guard.expression), context = _c.context, value = _c.value;\n var bindingId = \"\" + bindingCount++;\n var nameResolver = context === this.component ? this : defaultResolver;\n // We only support support simple expressions and ignore others as they\n // are unlikely to affect type narrowing.\n var _d = convertPropertyBinding(nameResolver, variable(this.getOutputVar(context)), value, bindingId, BindingForm.TrySimple), stmts = _d.stmts, currValExpr = _d.currValExpr;\n if (stmts.length == 0) {\n var guardClause = guard.useIf ? currValExpr : this.ctx.importExpr(guard.guard).callFn([currValExpr]);\n guardExpression = guardExpression ? guardExpression.and(guardClause) : guardClause;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_e = _a.return)) _e.call(_a);\n }\n finally { if (e_3) throw e_3.error; }\n }\n if (guardExpression) {\n viewStmts = [new IfStmt(guardExpression, viewStmts)];\n }\n }\n var viewName = \"_View_\" + componentId + \"_\" + this.embeddedViewIndex;\n var viewFactory = new DeclareFunctionStmt(viewName, [], viewStmts);\n targetStatements.push(viewFactory);\n return targetStatements;\n var e_3, _e;\n };\n ViewBuilder.prototype.visitBoundText = function (ast, context) {\n var _this = this;\n var astWithSource = ast.value;\n var inter = astWithSource.ast;\n inter.expressions.forEach(function (expr) {\n return _this.updates.push({ context: _this.component, value: expr, sourceSpan: ast.sourceSpan });\n });\n };\n ViewBuilder.prototype.visitEmbeddedTemplate = function (ast, context) {\n this.visitElementOrTemplate(ast);\n // Note: The old view compiler used to use an `any` type\n // for the context in any embedded view.\n // We keep this behaivor behind a flag for now.\n if (this.options.fullTemplateTypeCheck) {\n // Find any applicable type guards. For example, NgIf has a type guard on ngIf\n // (see NgIf.ngIfTypeGuard) that can be used to indicate that a template is only\n // stamped out if ngIf is truthy so any bindings in the template can assume that,\n // if a nullable type is used for ngIf, that expression is not null or undefined.\n var guards = this.getTypeGuardExpressions(ast);\n var childVisitor = this.viewBuilderFactory(this, guards);\n this.children.push(childVisitor);\n childVisitor.visitAll(ast.variables, ast.children);\n }\n };\n ViewBuilder.prototype.visitElement = function (ast, context) {\n var _this = this;\n this.visitElementOrTemplate(ast);\n ast.inputs.forEach(function (inputAst) {\n _this.updates.push({ context: _this.component, value: inputAst.value, sourceSpan: inputAst.sourceSpan });\n });\n templateVisitAll(this, ast.children);\n };\n ViewBuilder.prototype.visitElementOrTemplate = function (ast) {\n var _this = this;\n ast.directives.forEach(function (dirAst) { _this.visitDirective(dirAst); });\n ast.references.forEach(function (ref) {\n var outputVarType = null;\n // Note: The old view compiler used to use an `any` type\n // for directives exposed via `exportAs`.\n // We keep this behaivor behind a flag for now.\n if (ref.value && ref.value.identifier && _this.options.fullTemplateTypeCheck) {\n outputVarType = ref.value.identifier.reference;\n }\n else {\n outputVarType = BuiltinTypeName.Dynamic;\n }\n _this.refOutputVars.set(ref.name, outputVarType);\n });\n ast.outputs.forEach(function (outputAst) {\n _this.actions.push({ context: _this.component, value: outputAst.handler, sourceSpan: outputAst.sourceSpan });\n });\n };\n ViewBuilder.prototype.visitDirective = function (dirAst) {\n var _this = this;\n var dirType = dirAst.directive.type.reference;\n dirAst.inputs.forEach(function (input) { return _this.updates.push({ context: _this.component, value: input.value, sourceSpan: input.sourceSpan }); });\n // Note: The old view compiler used to use an `any` type\n // for expressions in host properties / events.\n // We keep this behaivor behind a flag for now.\n if (this.options.fullTemplateTypeCheck) {\n dirAst.hostProperties.forEach(function (inputAst) { return _this.updates.push({ context: dirType, value: inputAst.value, sourceSpan: inputAst.sourceSpan }); });\n dirAst.hostEvents.forEach(function (hostEventAst) { return _this.actions.push({\n context: dirType,\n value: hostEventAst.handler,\n sourceSpan: hostEventAst.sourceSpan\n }); });\n }\n };\n ViewBuilder.prototype.getLocal = function (name) {\n if (name == EventHandlerVars.event.name) {\n return variable(this.getOutputVar(BuiltinTypeName.Dynamic));\n }\n for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent) {\n var outputVarType = void 0;\n // check references\n outputVarType = currBuilder.refOutputVars.get(name);\n if (outputVarType == null) {\n // check variables\n var varAst = currBuilder.variables.find(function (varAst) { return varAst.name === name; });\n if (varAst) {\n outputVarType = BuiltinTypeName.Dynamic;\n }\n }\n if (outputVarType != null) {\n return variable(this.getOutputVar(outputVarType));\n }\n }\n return null;\n };\n ViewBuilder.prototype.pipeOutputVar = function (name) {\n var pipe = this.pipes.get(name);\n if (!pipe) {\n throw new Error(\"Illegal State: Could not find pipe \" + name + \" in template of \" + this.component);\n }\n return this.getOutputVar(pipe);\n };\n ViewBuilder.prototype.preprocessUpdateExpression = function (expression) {\n var _this = this;\n return {\n sourceSpan: expression.sourceSpan,\n context: expression.context,\n value: convertPropertyBindingBuiltins({\n createLiteralArrayConverter: function (argCount) { return function (args) {\n var arr = literalArr(args);\n // Note: The old view compiler used to use an `any` type\n // for arrays.\n return _this.options.fullTemplateTypeCheck ? arr : arr.cast(DYNAMIC_TYPE);\n }; },\n createLiteralMapConverter: function (keys) { return function (values) {\n var entries = keys.map(function (k, i) { return ({\n key: k.key,\n value: values[i],\n quoted: k.quoted,\n }); });\n var map = literalMap(entries);\n // Note: The old view compiler used to use an `any` type\n // for maps.\n return _this.options.fullTemplateTypeCheck ? map : map.cast(DYNAMIC_TYPE);\n }; },\n createPipeConverter: function (name, argCount) { return function (args) {\n // Note: The old view compiler used to use an `any` type\n // for pipes.\n var pipeExpr = _this.options.fullTemplateTypeCheck ?\n variable(_this.pipeOutputVar(name)) :\n variable(_this.getOutputVar(BuiltinTypeName.Dynamic));\n return pipeExpr.callMethod('transform', args);\n }; },\n }, expression.value)\n };\n };\n ViewBuilder.prototype.visitNgContent = function (ast, context) { };\n ViewBuilder.prototype.visitText = function (ast, context) { };\n ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };\n ViewBuilder.prototype.visitReference = function (ast, context) { };\n ViewBuilder.prototype.visitVariable = function (ast, context) { };\n ViewBuilder.prototype.visitEvent = function (ast, context) { };\n ViewBuilder.prototype.visitElementProperty = function (ast, context) { };\n ViewBuilder.prototype.visitAttr = function (ast, context) { };\n return ViewBuilder;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CLASS_ATTR$1 = 'class';\nvar STYLE_ATTR = 'style';\nvar IMPLICIT_TEMPLATE_VAR = '\\$implicit';\nvar ViewCompileResult = /** @class */ (function () {\n function ViewCompileResult(viewClassVar, rendererTypeVar) {\n this.viewClassVar = viewClassVar;\n this.rendererTypeVar = rendererTypeVar;\n }\n return ViewCompileResult;\n}());\nvar ViewCompiler = /** @class */ (function () {\n function ViewCompiler(_reflector) {\n this._reflector = _reflector;\n }\n ViewCompiler.prototype.compileComponent = function (outputCtx, component, template, styles, usedPipes) {\n var _this = this;\n var embeddedViewCount = 0;\n var staticQueryIds = findStaticQueryIds(template);\n var renderComponentVarName = undefined;\n if (!component.isHost) {\n var template_1 = component.template;\n var customRenderData = [];\n if (template_1.animations && template_1.animations.length) {\n customRenderData.push(new LiteralMapEntry('animation', convertValueToOutputAst(outputCtx, template_1.animations), true));\n }\n var renderComponentVar = variable(rendererTypeName(component.type.reference));\n renderComponentVarName = renderComponentVar.name;\n outputCtx.statements.push(renderComponentVar\n .set(importExpr(Identifiers.createRendererType2).callFn([new LiteralMapExpr([\n new LiteralMapEntry('encapsulation', literal(template_1.encapsulation), false),\n new LiteralMapEntry('styles', styles, false),\n new LiteralMapEntry('data', new LiteralMapExpr(customRenderData), false)\n ])]))\n .toDeclStmt(importType(Identifiers.RendererType2), [StmtModifier.Final, StmtModifier.Exported]));\n }\n var viewBuilderFactory = function (parent) {\n var embeddedViewIndex = embeddedViewCount++;\n return new ViewBuilder$1(_this._reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory);\n };\n var visitor = viewBuilderFactory(null);\n visitor.visitAll([], template);\n (_a = outputCtx.statements).push.apply(_a, __spread(visitor.build()));\n return new ViewCompileResult(visitor.viewName, renderComponentVarName);\n var _a;\n };\n return ViewCompiler;\n}());\nvar LOG_VAR$1 = variable('_l');\nvar VIEW_VAR = variable('_v');\nvar CHECK_VAR = variable('_ck');\nvar COMP_VAR = variable('_co');\nvar EVENT_NAME_VAR = variable('en');\nvar ALLOW_DEFAULT_VAR = variable(\"ad\");\nvar ViewBuilder$1 = /** @class */ (function () {\n function ViewBuilder(reflector, outputCtx, parent, component, embeddedViewIndex, usedPipes, staticQueryIds, viewBuilderFactory) {\n this.reflector = reflector;\n this.outputCtx = outputCtx;\n this.parent = parent;\n this.component = component;\n this.embeddedViewIndex = embeddedViewIndex;\n this.usedPipes = usedPipes;\n this.staticQueryIds = staticQueryIds;\n this.viewBuilderFactory = viewBuilderFactory;\n this.nodes = [];\n this.purePipeNodeIndices = Object.create(null);\n // Need Object.create so that we don't have builtin values...\n this.refNodeIndices = Object.create(null);\n this.variables = [];\n this.children = [];\n // TODO(tbosch): The old view compiler used to use an `any` type\n // for the context in any embedded view. We keep this behaivor for now\n // to be able to introduce the new view compiler without too many errors.\n this.compType = this.embeddedViewIndex > 0 ?\n DYNAMIC_TYPE :\n expressionType(outputCtx.importExpr(this.component.type.reference));\n this.viewName = viewClassName(this.component.type.reference, this.embeddedViewIndex);\n }\n ViewBuilder.prototype.visitAll = function (variables, astNodes) {\n var _this = this;\n this.variables = variables;\n // create the pipes for the pure pipes immediately, so that we know their indices.\n if (!this.parent) {\n this.usedPipes.forEach(function (pipe) {\n if (pipe.pure) {\n _this.purePipeNodeIndices[pipe.name] = _this._createPipe(null, pipe);\n }\n });\n }\n if (!this.parent) {\n var queryIds_1 = staticViewQueryIds(this.staticQueryIds);\n this.component.viewQueries.forEach(function (query, queryIndex) {\n // Note: queries start with id 1 so we can use the number in a Bloom filter!\n var queryId = queryIndex + 1;\n var bindingType = query.first ? 0 /* First */ : 1;\n var flags = 134217728 /* TypeViewQuery */ | calcStaticDynamicQueryFlags(queryIds_1, queryId, query.first);\n _this.nodes.push(function () { return ({\n sourceSpan: null,\n nodeFlags: flags,\n nodeDef: importExpr(Identifiers.queryDef).callFn([\n literal(flags), literal(queryId),\n new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])\n ])\n }); });\n });\n }\n templateVisitAll(this, astNodes);\n if (this.parent && (astNodes.length === 0 || needsAdditionalRootNode(astNodes))) {\n // if the view is an embedded view, then we need to add an additional root node in some cases\n this.nodes.push(function () { return ({\n sourceSpan: null,\n nodeFlags: 1 /* TypeElement */,\n nodeDef: importExpr(Identifiers.anchorDef).callFn([\n literal(0 /* None */), NULL_EXPR, NULL_EXPR, literal(0)\n ])\n }); });\n }\n };\n ViewBuilder.prototype.build = function (targetStatements) {\n if (targetStatements === void 0) { targetStatements = []; }\n this.children.forEach(function (child) { return child.build(targetStatements); });\n var _a = this._createNodeExpressions(), updateRendererStmts = _a.updateRendererStmts, updateDirectivesStmts = _a.updateDirectivesStmts, nodeDefExprs = _a.nodeDefExprs;\n var updateRendererFn = this._createUpdateFn(updateRendererStmts);\n var updateDirectivesFn = this._createUpdateFn(updateDirectivesStmts);\n var viewFlags = 0;\n if (!this.parent && this.component.changeDetection === ChangeDetectionStrategy.OnPush) {\n viewFlags |= 2 /* OnPush */;\n }\n var viewFactory = new DeclareFunctionStmt(this.viewName, [new FnParam(LOG_VAR$1.name)], [new ReturnStatement(importExpr(Identifiers.viewDef).callFn([\n literal(viewFlags),\n literalArr(nodeDefExprs),\n updateDirectivesFn,\n updateRendererFn,\n ]))], importType(Identifiers.ViewDefinition), this.embeddedViewIndex === 0 ? [StmtModifier.Exported] : []);\n targetStatements.push(viewFactory);\n return targetStatements;\n };\n ViewBuilder.prototype._createUpdateFn = function (updateStmts) {\n var updateFn;\n if (updateStmts.length > 0) {\n var preStmts = [];\n if (!this.component.isHost && findReadVarNames(updateStmts).has(COMP_VAR.name)) {\n preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n }\n updateFn = fn([\n new FnParam(CHECK_VAR.name, INFERRED_TYPE),\n new FnParam(VIEW_VAR.name, INFERRED_TYPE)\n ], __spread(preStmts, updateStmts), INFERRED_TYPE);\n }\n else {\n updateFn = NULL_EXPR;\n }\n return updateFn;\n };\n ViewBuilder.prototype.visitNgContent = function (ast, context) {\n // ngContentDef(ngContentIndex: number, index: number): NodeDef;\n this.nodes.push(function () { return ({\n sourceSpan: ast.sourceSpan,\n nodeFlags: 8 /* TypeNgContent */,\n nodeDef: importExpr(Identifiers.ngContentDef).callFn([\n literal(ast.ngContentIndex), literal(ast.index)\n ])\n }); });\n };\n ViewBuilder.prototype.visitText = function (ast, context) {\n // Static text nodes have no check function\n var checkIndex = -1;\n this.nodes.push(function () { return ({\n sourceSpan: ast.sourceSpan,\n nodeFlags: 2 /* TypeText */,\n nodeDef: importExpr(Identifiers.textDef).callFn([\n literal(checkIndex),\n literal(ast.ngContentIndex),\n literalArr([literal(ast.value)]),\n ])\n }); });\n };\n ViewBuilder.prototype.visitBoundText = function (ast, context) {\n var _this = this;\n var nodeIndex = this.nodes.length;\n // reserve the space in the nodeDefs array\n this.nodes.push(null);\n var astWithSource = ast.value;\n var inter = astWithSource.ast;\n var updateRendererExpressions = inter.expressions.map(function (expr, bindingIndex) { return _this._preprocessUpdateExpression({ nodeIndex: nodeIndex, bindingIndex: bindingIndex, sourceSpan: ast.sourceSpan, context: COMP_VAR, value: expr }); });\n // Check index is the same as the node index during compilation\n // They might only differ at runtime\n var checkIndex = nodeIndex;\n this.nodes[nodeIndex] = function () { return ({\n sourceSpan: ast.sourceSpan,\n nodeFlags: 2 /* TypeText */,\n nodeDef: importExpr(Identifiers.textDef).callFn([\n literal(checkIndex),\n literal(ast.ngContentIndex),\n literalArr(inter.strings.map(function (s) { return literal(s); })),\n ]),\n updateRenderer: updateRendererExpressions\n }); };\n };\n ViewBuilder.prototype.visitEmbeddedTemplate = function (ast, context) {\n var _this = this;\n var nodeIndex = this.nodes.length;\n // reserve the space in the nodeDefs array\n this.nodes.push(null);\n var _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, queryMatchesExpr = _a.queryMatchesExpr, hostEvents = _a.hostEvents;\n var childVisitor = this.viewBuilderFactory(this);\n this.children.push(childVisitor);\n childVisitor.visitAll(ast.variables, ast.children);\n var childCount = this.nodes.length - nodeIndex - 1;\n // anchorDef(\n // flags: NodeFlags, matchedQueries: [string, QueryValueType][], ngContentIndex: number,\n // childCount: number, handleEventFn?: ElementHandleEventFn, templateFactory?:\n // ViewDefinitionFactory): NodeDef;\n this.nodes[nodeIndex] = function () { return ({\n sourceSpan: ast.sourceSpan,\n nodeFlags: 1 /* TypeElement */ | flags,\n nodeDef: importExpr(Identifiers.anchorDef).callFn([\n literal(flags),\n queryMatchesExpr,\n literal(ast.ngContentIndex),\n literal(childCount),\n _this._createElementHandleEventFn(nodeIndex, hostEvents),\n variable(childVisitor.viewName),\n ])\n }); };\n };\n ViewBuilder.prototype.visitElement = function (ast, context) {\n var _this = this;\n var nodeIndex = this.nodes.length;\n // reserve the space in the nodeDefs array so we can add children\n this.nodes.push(null);\n // Using a null element name creates an anchor.\n var elName = isNgContainer(ast.name) ? null : ast.name;\n var _a = this._visitElementOrTemplate(nodeIndex, ast), flags = _a.flags, usedEvents = _a.usedEvents, queryMatchesExpr = _a.queryMatchesExpr, dirHostBindings = _a.hostBindings, hostEvents = _a.hostEvents;\n var inputDefs = [];\n var updateRendererExpressions = [];\n var outputDefs = [];\n if (elName) {\n var hostBindings = ast.inputs\n .map(function (inputAst) { return ({\n context: COMP_VAR,\n inputAst: inputAst,\n dirAst: null,\n }); })\n .concat(dirHostBindings);\n if (hostBindings.length) {\n updateRendererExpressions =\n hostBindings.map(function (hostBinding, bindingIndex) { return _this._preprocessUpdateExpression({\n context: hostBinding.context,\n nodeIndex: nodeIndex,\n bindingIndex: bindingIndex,\n sourceSpan: hostBinding.inputAst.sourceSpan,\n value: hostBinding.inputAst.value\n }); });\n inputDefs = hostBindings.map(function (hostBinding) { return elementBindingDef(hostBinding.inputAst, hostBinding.dirAst); });\n }\n outputDefs = usedEvents.map(function (_a) {\n var _b = __read(_a, 2), target = _b[0], eventName = _b[1];\n return literalArr([literal(target), literal(eventName)]);\n });\n }\n templateVisitAll(this, ast.children);\n var childCount = this.nodes.length - nodeIndex - 1;\n var compAst = ast.directives.find(function (dirAst) { return dirAst.directive.isComponent; });\n var compRendererType = NULL_EXPR;\n var compView = NULL_EXPR;\n if (compAst) {\n compView = this.outputCtx.importExpr(compAst.directive.componentViewType);\n compRendererType = this.outputCtx.importExpr(compAst.directive.rendererType);\n }\n // Check index is the same as the node index during compilation\n // They might only differ at runtime\n var checkIndex = nodeIndex;\n this.nodes[nodeIndex] = function () { return ({\n sourceSpan: ast.sourceSpan,\n nodeFlags: 1 /* TypeElement */ | flags,\n nodeDef: importExpr(Identifiers.elementDef).callFn([\n literal(checkIndex),\n literal(flags),\n queryMatchesExpr,\n literal(ast.ngContentIndex),\n literal(childCount),\n literal(elName),\n elName ? fixedAttrsDef(ast) : NULL_EXPR,\n inputDefs.length ? literalArr(inputDefs) : NULL_EXPR,\n outputDefs.length ? literalArr(outputDefs) : NULL_EXPR,\n _this._createElementHandleEventFn(nodeIndex, hostEvents),\n compView,\n compRendererType,\n ]),\n updateRenderer: updateRendererExpressions\n }); };\n };\n ViewBuilder.prototype._visitElementOrTemplate = function (nodeIndex, ast) {\n var _this = this;\n var flags = 0;\n if (ast.hasViewContainer) {\n flags |= 16777216 /* EmbeddedViews */;\n }\n var usedEvents = new Map();\n ast.outputs.forEach(function (event) {\n var _a = elementEventNameAndTarget(event, null), name = _a.name, target = _a.target;\n usedEvents.set(elementEventFullName(target, name), [target, name]);\n });\n ast.directives.forEach(function (dirAst) {\n dirAst.hostEvents.forEach(function (event) {\n var _a = elementEventNameAndTarget(event, dirAst), name = _a.name, target = _a.target;\n usedEvents.set(elementEventFullName(target, name), [target, name]);\n });\n });\n var hostBindings = [];\n var hostEvents = [];\n this._visitComponentFactoryResolverProvider(ast.directives);\n ast.providers.forEach(function (providerAst, providerIndex) {\n var dirAst = undefined;\n var dirIndex = undefined;\n ast.directives.forEach(function (localDirAst, i) {\n if (localDirAst.directive.type.reference === tokenReference(providerAst.token)) {\n dirAst = localDirAst;\n dirIndex = i;\n }\n });\n if (dirAst) {\n var _a = _this._visitDirective(providerAst, dirAst, dirIndex, nodeIndex, ast.references, ast.queryMatches, usedEvents, _this.staticQueryIds.get(ast)), dirHostBindings = _a.hostBindings, dirHostEvents = _a.hostEvents;\n hostBindings.push.apply(hostBindings, __spread(dirHostBindings));\n hostEvents.push.apply(hostEvents, __spread(dirHostEvents));\n }\n else {\n _this._visitProvider(providerAst, ast.queryMatches);\n }\n });\n var queryMatchExprs = [];\n ast.queryMatches.forEach(function (match) {\n var valueType = undefined;\n if (tokenReference(match.value) ===\n _this.reflector.resolveExternalReference(Identifiers.ElementRef)) {\n valueType = 0 /* ElementRef */;\n }\n else if (tokenReference(match.value) ===\n _this.reflector.resolveExternalReference(Identifiers.ViewContainerRef)) {\n valueType = 3 /* ViewContainerRef */;\n }\n else if (tokenReference(match.value) ===\n _this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n valueType = 2 /* TemplateRef */;\n }\n if (valueType != null) {\n queryMatchExprs.push(literalArr([literal(match.queryId), literal(valueType)]));\n }\n });\n ast.references.forEach(function (ref) {\n var valueType = undefined;\n if (!ref.value) {\n valueType = 1 /* RenderElement */;\n }\n else if (tokenReference(ref.value) ===\n _this.reflector.resolveExternalReference(Identifiers.TemplateRef)) {\n valueType = 2 /* TemplateRef */;\n }\n if (valueType != null) {\n _this.refNodeIndices[ref.name] = nodeIndex;\n queryMatchExprs.push(literalArr([literal(ref.name), literal(valueType)]));\n }\n });\n ast.outputs.forEach(function (outputAst) {\n hostEvents.push({ context: COMP_VAR, eventAst: outputAst, dirAst: null });\n });\n return {\n flags: flags,\n usedEvents: Array.from(usedEvents.values()),\n queryMatchesExpr: queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,\n hostBindings: hostBindings,\n hostEvents: hostEvents\n };\n };\n ViewBuilder.prototype._visitDirective = function (providerAst, dirAst, directiveIndex, elementNodeIndex, refs, queryMatches, usedEvents, queryIds) {\n var _this = this;\n var nodeIndex = this.nodes.length;\n // reserve the space in the nodeDefs array so we can add children\n this.nodes.push(null);\n dirAst.directive.queries.forEach(function (query, queryIndex) {\n var queryId = dirAst.contentQueryStartId + queryIndex;\n var flags = 67108864 /* TypeContentQuery */ | calcStaticDynamicQueryFlags(queryIds, queryId, query.first);\n var bindingType = query.first ? 0 /* First */ : 1;\n _this.nodes.push(function () { return ({\n sourceSpan: dirAst.sourceSpan,\n nodeFlags: flags,\n nodeDef: importExpr(Identifiers.queryDef).callFn([\n literal(flags), literal(queryId),\n new LiteralMapExpr([new LiteralMapEntry(query.propertyName, literal(bindingType), false)])\n ]),\n }); });\n });\n // Note: the operation below might also create new nodeDefs,\n // but we don't want them to be a child of a directive,\n // as they might be a provider/pipe on their own.\n // I.e. we only allow queries as children of directives nodes.\n var childCount = this.nodes.length - nodeIndex - 1;\n var _a = this._visitProviderOrDirective(providerAst, queryMatches), flags = _a.flags, queryMatchExprs = _a.queryMatchExprs, providerExpr = _a.providerExpr, depsExpr = _a.depsExpr;\n refs.forEach(function (ref) {\n if (ref.value && tokenReference(ref.value) === tokenReference(providerAst.token)) {\n _this.refNodeIndices[ref.name] = nodeIndex;\n queryMatchExprs.push(literalArr([literal(ref.name), literal(4 /* Provider */)]));\n }\n });\n if (dirAst.directive.isComponent) {\n flags |= 32768 /* Component */;\n }\n var inputDefs = dirAst.inputs.map(function (inputAst, inputIndex) {\n var mapValue = literalArr([literal(inputIndex), literal(inputAst.directiveName)]);\n // Note: it's important to not quote the key so that we can capture renames by minifiers!\n return new LiteralMapEntry(inputAst.directiveName, mapValue, false);\n });\n var outputDefs = [];\n var dirMeta = dirAst.directive;\n Object.keys(dirMeta.outputs).forEach(function (propName) {\n var eventName = dirMeta.outputs[propName];\n if (usedEvents.has(eventName)) {\n // Note: it's important to not quote the key so that we can capture renames by minifiers!\n outputDefs.push(new LiteralMapEntry(propName, literal(eventName), false));\n }\n });\n var updateDirectiveExpressions = [];\n if (dirAst.inputs.length || (flags & (262144 /* DoCheck */ | 65536 /* OnInit */)) > 0) {\n updateDirectiveExpressions =\n dirAst.inputs.map(function (input, bindingIndex) { return _this._preprocessUpdateExpression({\n nodeIndex: nodeIndex,\n bindingIndex: bindingIndex,\n sourceSpan: input.sourceSpan,\n context: COMP_VAR,\n value: input.value\n }); });\n }\n var dirContextExpr = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);\n var hostBindings = dirAst.hostProperties.map(function (inputAst) { return ({\n context: dirContextExpr,\n dirAst: dirAst,\n inputAst: inputAst,\n }); });\n var hostEvents = dirAst.hostEvents.map(function (hostEventAst) { return ({\n context: dirContextExpr,\n eventAst: hostEventAst, dirAst: dirAst,\n }); });\n // Check index is the same as the node index during compilation\n // They might only differ at runtime\n var checkIndex = nodeIndex;\n this.nodes[nodeIndex] = function () { return ({\n sourceSpan: dirAst.sourceSpan,\n nodeFlags: 16384 /* TypeDirective */ | flags,\n nodeDef: importExpr(Identifiers.directiveDef).callFn([\n literal(checkIndex),\n literal(flags),\n queryMatchExprs.length ? literalArr(queryMatchExprs) : NULL_EXPR,\n literal(childCount),\n providerExpr,\n depsExpr,\n inputDefs.length ? new LiteralMapExpr(inputDefs) : NULL_EXPR,\n outputDefs.length ? new LiteralMapExpr(outputDefs) : NULL_EXPR,\n ]),\n updateDirectives: updateDirectiveExpressions,\n directive: dirAst.directive.type,\n }); };\n return { hostBindings: hostBindings, hostEvents: hostEvents };\n };\n ViewBuilder.prototype._visitProvider = function (providerAst, queryMatches) {\n this._addProviderNode(this._visitProviderOrDirective(providerAst, queryMatches));\n };\n ViewBuilder.prototype._visitComponentFactoryResolverProvider = function (directives) {\n var componentDirMeta = directives.find(function (dirAst) { return dirAst.directive.isComponent; });\n if (componentDirMeta && componentDirMeta.directive.entryComponents.length) {\n var _a = componentFactoryResolverProviderDef(this.reflector, this.outputCtx, 8192 /* PrivateProvider */, componentDirMeta.directive.entryComponents), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, flags = _a.flags, tokenExpr = _a.tokenExpr;\n this._addProviderNode({\n providerExpr: providerExpr,\n depsExpr: depsExpr,\n flags: flags,\n tokenExpr: tokenExpr,\n queryMatchExprs: [],\n sourceSpan: componentDirMeta.sourceSpan\n });\n }\n };\n ViewBuilder.prototype._addProviderNode = function (data) {\n var nodeIndex = this.nodes.length;\n // providerDef(\n // flags: NodeFlags, matchedQueries: [string, QueryValueType][], token:any,\n // value: any, deps: ([DepFlags, any] | any)[]): NodeDef;\n this.nodes.push(function () { return ({\n sourceSpan: data.sourceSpan,\n nodeFlags: data.flags,\n nodeDef: importExpr(Identifiers.providerDef).callFn([\n literal(data.flags),\n data.queryMatchExprs.length ? literalArr(data.queryMatchExprs) : NULL_EXPR,\n data.tokenExpr, data.providerExpr, data.depsExpr\n ])\n }); });\n };\n ViewBuilder.prototype._visitProviderOrDirective = function (providerAst, queryMatches) {\n var flags = 0;\n var queryMatchExprs = [];\n queryMatches.forEach(function (match) {\n if (tokenReference(match.value) === tokenReference(providerAst.token)) {\n queryMatchExprs.push(literalArr([literal(match.queryId), literal(4 /* Provider */)]));\n }\n });\n var _a = providerDef(this.outputCtx, providerAst), providerExpr = _a.providerExpr, depsExpr = _a.depsExpr, providerFlags = _a.flags, tokenExpr = _a.tokenExpr;\n return {\n flags: flags | providerFlags,\n queryMatchExprs: queryMatchExprs,\n providerExpr: providerExpr,\n depsExpr: depsExpr,\n tokenExpr: tokenExpr,\n sourceSpan: providerAst.sourceSpan\n };\n };\n ViewBuilder.prototype.getLocal = function (name) {\n if (name == EventHandlerVars.event.name) {\n return EventHandlerVars.event;\n }\n var currViewExpr = VIEW_VAR;\n for (var currBuilder = this; currBuilder; currBuilder = currBuilder.parent, currViewExpr = currViewExpr.prop('parent').cast(DYNAMIC_TYPE)) {\n // check references\n var refNodeIndex = currBuilder.refNodeIndices[name];\n if (refNodeIndex != null) {\n return importExpr(Identifiers.nodeValue).callFn([currViewExpr, literal(refNodeIndex)]);\n }\n // check variables\n var varAst = currBuilder.variables.find(function (varAst) { return varAst.name === name; });\n if (varAst) {\n var varValue = varAst.value || IMPLICIT_TEMPLATE_VAR;\n return currViewExpr.prop('context').prop(varValue);\n }\n }\n return null;\n };\n ViewBuilder.prototype._createLiteralArrayConverter = function (sourceSpan, argCount) {\n if (argCount === 0) {\n var valueExpr_1 = importExpr(Identifiers.EMPTY_ARRAY);\n return function () { return valueExpr_1; };\n }\n var checkIndex = this.nodes.length;\n this.nodes.push(function () { return ({\n sourceSpan: sourceSpan,\n nodeFlags: 32 /* TypePureArray */,\n nodeDef: importExpr(Identifiers.pureArrayDef).callFn([\n literal(checkIndex),\n literal(argCount),\n ])\n }); });\n return function (args) { return callCheckStmt(checkIndex, args); };\n };\n ViewBuilder.prototype._createLiteralMapConverter = function (sourceSpan, keys) {\n if (keys.length === 0) {\n var valueExpr_2 = importExpr(Identifiers.EMPTY_MAP);\n return function () { return valueExpr_2; };\n }\n var map = literalMap(keys.map(function (e, i) { return (__assign({}, e, { value: literal(i) })); }));\n var checkIndex = this.nodes.length;\n this.nodes.push(function () { return ({\n sourceSpan: sourceSpan,\n nodeFlags: 64 /* TypePureObject */,\n nodeDef: importExpr(Identifiers.pureObjectDef).callFn([\n literal(checkIndex),\n map,\n ])\n }); });\n return function (args) { return callCheckStmt(checkIndex, args); };\n };\n ViewBuilder.prototype._createPipeConverter = function (expression, name, argCount) {\n var pipe = this.usedPipes.find(function (pipeSummary) { return pipeSummary.name === name; });\n if (pipe.pure) {\n var checkIndex_1 = this.nodes.length;\n this.nodes.push(function () { return ({\n sourceSpan: expression.sourceSpan,\n nodeFlags: 128 /* TypePurePipe */,\n nodeDef: importExpr(Identifiers.purePipeDef).callFn([\n literal(checkIndex_1),\n literal(argCount),\n ])\n }); });\n // find underlying pipe in the component view\n var compViewExpr = VIEW_VAR;\n var compBuilder = this;\n while (compBuilder.parent) {\n compBuilder = compBuilder.parent;\n compViewExpr = compViewExpr.prop('parent').cast(DYNAMIC_TYPE);\n }\n var pipeNodeIndex = compBuilder.purePipeNodeIndices[name];\n var pipeValueExpr_1 = importExpr(Identifiers.nodeValue).callFn([compViewExpr, literal(pipeNodeIndex)]);\n return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, callCheckStmt(checkIndex_1, [pipeValueExpr_1].concat(args))); };\n }\n else {\n var nodeIndex = this._createPipe(expression.sourceSpan, pipe);\n var nodeValueExpr_1 = importExpr(Identifiers.nodeValue).callFn([VIEW_VAR, literal(nodeIndex)]);\n return function (args) { return callUnwrapValue(expression.nodeIndex, expression.bindingIndex, nodeValueExpr_1.callMethod('transform', args)); };\n }\n };\n ViewBuilder.prototype._createPipe = function (sourceSpan, pipe) {\n var _this = this;\n var nodeIndex = this.nodes.length;\n var flags = 0;\n pipe.type.lifecycleHooks.forEach(function (lifecycleHook) {\n // for pipes, we only support ngOnDestroy\n if (lifecycleHook === LifecycleHooks.OnDestroy) {\n flags |= lifecycleHookToNodeFlag(lifecycleHook);\n }\n });\n var depExprs = pipe.type.diDeps.map(function (diDep) { return depDef(_this.outputCtx, diDep); });\n // function pipeDef(\n // flags: NodeFlags, ctor: any, deps: ([DepFlags, any] | any)[]): NodeDef\n this.nodes.push(function () { return ({\n sourceSpan: sourceSpan,\n nodeFlags: 16 /* TypePipe */,\n nodeDef: importExpr(Identifiers.pipeDef).callFn([\n literal(flags), _this.outputCtx.importExpr(pipe.type.reference), literalArr(depExprs)\n ])\n }); });\n return nodeIndex;\n };\n /**\n * For the AST in `UpdateExpression.value`:\n * - create nodes for pipes, literal arrays and, literal maps,\n * - update the AST to replace pipes, literal arrays and, literal maps with calls to check fn.\n *\n * WARNING: This might create new nodeDefs (for pipes and literal arrays and literal maps)!\n */\n ViewBuilder.prototype._preprocessUpdateExpression = function (expression) {\n var _this = this;\n return {\n nodeIndex: expression.nodeIndex,\n bindingIndex: expression.bindingIndex,\n sourceSpan: expression.sourceSpan,\n context: expression.context,\n value: convertPropertyBindingBuiltins({\n createLiteralArrayConverter: function (argCount) { return _this._createLiteralArrayConverter(expression.sourceSpan, argCount); },\n createLiteralMapConverter: function (keys) {\n return _this._createLiteralMapConverter(expression.sourceSpan, keys);\n },\n createPipeConverter: function (name, argCount) {\n return _this._createPipeConverter(expression, name, argCount);\n }\n }, expression.value)\n };\n };\n ViewBuilder.prototype._createNodeExpressions = function () {\n var self = this;\n var updateBindingCount = 0;\n var updateRendererStmts = [];\n var updateDirectivesStmts = [];\n var nodeDefExprs = this.nodes.map(function (factory, nodeIndex) {\n var _a = factory(), nodeDef = _a.nodeDef, nodeFlags = _a.nodeFlags, updateDirectives = _a.updateDirectives, updateRenderer = _a.updateRenderer, sourceSpan = _a.sourceSpan;\n if (updateRenderer) {\n updateRendererStmts.push.apply(updateRendererStmts, __spread(createUpdateStatements(nodeIndex, sourceSpan, updateRenderer, false)));\n }\n if (updateDirectives) {\n updateDirectivesStmts.push.apply(updateDirectivesStmts, __spread(createUpdateStatements(nodeIndex, sourceSpan, updateDirectives, (nodeFlags & (262144 /* DoCheck */ | 65536 /* OnInit */)) > 0)));\n }\n // We use a comma expression to call the log function before\n // the nodeDef function, but still use the result of the nodeDef function\n // as the value.\n // Note: We only add the logger to elements / text nodes,\n // so we don't generate too much code.\n var logWithNodeDef = nodeFlags & 3 /* CatRenderNode */ ?\n new CommaExpr([LOG_VAR$1.callFn([]).callFn([]), nodeDef]) :\n nodeDef;\n return applySourceSpanToExpressionIfNeeded(logWithNodeDef, sourceSpan);\n });\n return { updateRendererStmts: updateRendererStmts, updateDirectivesStmts: updateDirectivesStmts, nodeDefExprs: nodeDefExprs };\n function createUpdateStatements(nodeIndex, sourceSpan, expressions, allowEmptyExprs) {\n var updateStmts = [];\n var exprs = expressions.map(function (_a) {\n var sourceSpan = _a.sourceSpan, context = _a.context, value = _a.value;\n var bindingId = \"\" + updateBindingCount++;\n var nameResolver = context === COMP_VAR ? self : null;\n var _b = convertPropertyBinding(nameResolver, context, value, bindingId, BindingForm.General), stmts = _b.stmts, currValExpr = _b.currValExpr;\n updateStmts.push.apply(updateStmts, __spread(stmts.map(function (stmt) { return applySourceSpanToStatementIfNeeded(stmt, sourceSpan); })));\n return applySourceSpanToExpressionIfNeeded(currValExpr, sourceSpan);\n });\n if (expressions.length || allowEmptyExprs) {\n updateStmts.push(applySourceSpanToStatementIfNeeded(callCheckStmt(nodeIndex, exprs).toStmt(), sourceSpan));\n }\n return updateStmts;\n }\n };\n ViewBuilder.prototype._createElementHandleEventFn = function (nodeIndex, handlers) {\n var _this = this;\n var handleEventStmts = [];\n var handleEventBindingCount = 0;\n handlers.forEach(function (_a) {\n var context = _a.context, eventAst = _a.eventAst, dirAst = _a.dirAst;\n var bindingId = \"\" + handleEventBindingCount++;\n var nameResolver = context === COMP_VAR ? _this : null;\n var _b = convertActionBinding(nameResolver, context, eventAst.handler, bindingId), stmts = _b.stmts, allowDefault = _b.allowDefault;\n var trueStmts = stmts;\n if (allowDefault) {\n trueStmts.push(ALLOW_DEFAULT_VAR.set(allowDefault.and(ALLOW_DEFAULT_VAR)).toStmt());\n }\n var _c = elementEventNameAndTarget(eventAst, dirAst), eventTarget = _c.target, eventName = _c.name;\n var fullEventName = elementEventFullName(eventTarget, eventName);\n handleEventStmts.push(applySourceSpanToStatementIfNeeded(new IfStmt(literal(fullEventName).identical(EVENT_NAME_VAR), trueStmts), eventAst.sourceSpan));\n });\n var handleEventFn;\n if (handleEventStmts.length > 0) {\n var preStmts = [ALLOW_DEFAULT_VAR.set(literal(true)).toDeclStmt(BOOL_TYPE)];\n if (!this.component.isHost && findReadVarNames(handleEventStmts).has(COMP_VAR.name)) {\n preStmts.push(COMP_VAR.set(VIEW_VAR.prop('component')).toDeclStmt(this.compType));\n }\n handleEventFn = fn([\n new FnParam(VIEW_VAR.name, INFERRED_TYPE),\n new FnParam(EVENT_NAME_VAR.name, INFERRED_TYPE),\n new FnParam(EventHandlerVars.event.name, INFERRED_TYPE)\n ], __spread(preStmts, handleEventStmts, [new ReturnStatement(ALLOW_DEFAULT_VAR)]), INFERRED_TYPE);\n }\n else {\n handleEventFn = NULL_EXPR;\n }\n return handleEventFn;\n };\n ViewBuilder.prototype.visitDirective = function (ast, context) { };\n ViewBuilder.prototype.visitDirectiveProperty = function (ast, context) { };\n ViewBuilder.prototype.visitReference = function (ast, context) { };\n ViewBuilder.prototype.visitVariable = function (ast, context) { };\n ViewBuilder.prototype.visitEvent = function (ast, context) { };\n ViewBuilder.prototype.visitElementProperty = function (ast, context) { };\n ViewBuilder.prototype.visitAttr = function (ast, context) { };\n return ViewBuilder;\n}());\nfunction needsAdditionalRootNode(astNodes) {\n var lastAstNode = astNodes[astNodes.length - 1];\n if (lastAstNode instanceof EmbeddedTemplateAst) {\n return lastAstNode.hasViewContainer;\n }\n if (lastAstNode instanceof ElementAst) {\n if (isNgContainer(lastAstNode.name) && lastAstNode.children.length) {\n return needsAdditionalRootNode(lastAstNode.children);\n }\n return lastAstNode.hasViewContainer;\n }\n return lastAstNode instanceof NgContentAst;\n}\nfunction elementBindingDef(inputAst, dirAst) {\n switch (inputAst.type) {\n case PropertyBindingType.Attribute:\n return literalArr([\n literal(1 /* TypeElementAttribute */), literal(inputAst.name),\n literal(inputAst.securityContext)\n ]);\n case PropertyBindingType.Property:\n return literalArr([\n literal(8 /* TypeProperty */), literal(inputAst.name),\n literal(inputAst.securityContext)\n ]);\n case PropertyBindingType.Animation:\n var bindingType = 8 /* TypeProperty */ |\n (dirAst && dirAst.directive.isComponent ? 32 /* SyntheticHostProperty */ :\n 16 /* SyntheticProperty */);\n return literalArr([\n literal(bindingType), literal('@' + inputAst.name), literal(inputAst.securityContext)\n ]);\n case PropertyBindingType.Class:\n return literalArr([literal(2 /* TypeElementClass */), literal(inputAst.name), NULL_EXPR]);\n case PropertyBindingType.Style:\n return literalArr([\n literal(4 /* TypeElementStyle */), literal(inputAst.name), literal(inputAst.unit)\n ]);\n }\n}\nfunction fixedAttrsDef(elementAst) {\n var mapResult = Object.create(null);\n elementAst.attrs.forEach(function (attrAst) { mapResult[attrAst.name] = attrAst.value; });\n elementAst.directives.forEach(function (dirAst) {\n Object.keys(dirAst.directive.hostAttributes).forEach(function (name) {\n var value = dirAst.directive.hostAttributes[name];\n var prevValue = mapResult[name];\n mapResult[name] = prevValue != null ? mergeAttributeValue(name, prevValue, value) : value;\n });\n });\n // Note: We need to sort to get a defined output order\n // for tests and for caching generated artifacts...\n return literalArr(Object.keys(mapResult).sort().map(function (attrName) { return literalArr([literal(attrName), literal(mapResult[attrName])]); }));\n}\nfunction mergeAttributeValue(attrName, attrValue1, attrValue2) {\n if (attrName == CLASS_ATTR$1 || attrName == STYLE_ATTR) {\n return attrValue1 + \" \" + attrValue2;\n }\n else {\n return attrValue2;\n }\n}\nfunction callCheckStmt(nodeIndex, exprs) {\n if (exprs.length > 10) {\n return CHECK_VAR.callFn([VIEW_VAR, literal(nodeIndex), literal(1 /* Dynamic */), literalArr(exprs)]);\n }\n else {\n return CHECK_VAR.callFn(__spread([VIEW_VAR, literal(nodeIndex), literal(0 /* Inline */)], exprs));\n }\n}\nfunction callUnwrapValue(nodeIndex, bindingIdx, expr) {\n return importExpr(Identifiers.unwrapValue).callFn([\n VIEW_VAR, literal(nodeIndex), literal(bindingIdx), expr\n ]);\n}\nfunction findStaticQueryIds(nodes, result) {\n if (result === void 0) { result = new Map(); }\n nodes.forEach(function (node) {\n var staticQueryIds = new Set();\n var dynamicQueryIds = new Set();\n var queryMatches = undefined;\n if (node instanceof ElementAst) {\n findStaticQueryIds(node.children, result);\n node.children.forEach(function (child) {\n var childData = result.get(child);\n childData.staticQueryIds.forEach(function (queryId) { return staticQueryIds.add(queryId); });\n childData.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });\n });\n queryMatches = node.queryMatches;\n }\n else if (node instanceof EmbeddedTemplateAst) {\n findStaticQueryIds(node.children, result);\n node.children.forEach(function (child) {\n var childData = result.get(child);\n childData.staticQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });\n childData.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });\n });\n queryMatches = node.queryMatches;\n }\n if (queryMatches) {\n queryMatches.forEach(function (match) { return staticQueryIds.add(match.queryId); });\n }\n dynamicQueryIds.forEach(function (queryId) { return staticQueryIds.delete(queryId); });\n result.set(node, { staticQueryIds: staticQueryIds, dynamicQueryIds: dynamicQueryIds });\n });\n return result;\n}\nfunction staticViewQueryIds(nodeStaticQueryIds) {\n var staticQueryIds = new Set();\n var dynamicQueryIds = new Set();\n Array.from(nodeStaticQueryIds.values()).forEach(function (entry) {\n entry.staticQueryIds.forEach(function (queryId) { return staticQueryIds.add(queryId); });\n entry.dynamicQueryIds.forEach(function (queryId) { return dynamicQueryIds.add(queryId); });\n });\n dynamicQueryIds.forEach(function (queryId) { return staticQueryIds.delete(queryId); });\n return { staticQueryIds: staticQueryIds, dynamicQueryIds: dynamicQueryIds };\n}\nfunction elementEventNameAndTarget(eventAst, dirAst) {\n if (eventAst.isAnimation) {\n return {\n name: \"@\" + eventAst.name + \".\" + eventAst.phase,\n target: dirAst && dirAst.directive.isComponent ? 'component' : null\n };\n }\n else {\n return eventAst;\n }\n}\nfunction calcStaticDynamicQueryFlags(queryIds, queryId, isFirst) {\n var flags = 0;\n // Note: We only make queries static that query for a single item.\n // This is because of backwards compatibility with the old view compiler...\n if (isFirst && (queryIds.staticQueryIds.has(queryId) || !queryIds.dynamicQueryIds.has(queryId))) {\n flags |= 268435456 /* StaticQuery */;\n }\n else {\n flags |= 536870912 /* DynamicQuery */;\n }\n return flags;\n}\nfunction elementEventFullName(target, name) {\n return target ? target + \":\" + name : name;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CONSTANT_PREFIX = '_c';\n// Closure variables holding messages must be named `MSG_[A-Z0-9]+`\nvar TRANSLATION_PREFIX = 'MSG_';\n/**\n * Closure uses `goog.getMsg(message)` to lookup translations\n */\nvar GOOG_GET_MSG = 'goog.getMsg';\n/**\n * Context to use when producing a key.\n *\n * This ensures we see the constant not the reference variable when producing\n * a key.\n */\nvar KEY_CONTEXT = {};\n/**\n * A node that is a place-holder that allows the node to be replaced when the actual\n * node is known.\n *\n * This allows the constant pool to change an expression from a direct reference to\n * a constant to a shared constant. It returns a fix-up node that is later allowed to\n * change the referenced expression.\n */\nvar FixupExpression = /** @class */ (function (_super) {\n __extends(FixupExpression, _super);\n function FixupExpression(resolved) {\n var _this = _super.call(this, resolved.type) || this;\n _this.resolved = resolved;\n _this.original = resolved;\n return _this;\n }\n FixupExpression.prototype.visitExpression = function (visitor, context) {\n if (context === KEY_CONTEXT) {\n // When producing a key we want to traverse the constant not the\n // variable used to refer to it.\n return this.original.visitExpression(visitor, context);\n }\n else {\n return this.resolved.visitExpression(visitor, context);\n }\n };\n FixupExpression.prototype.isEquivalent = function (e) {\n return e instanceof FixupExpression && this.resolved.isEquivalent(e.resolved);\n };\n FixupExpression.prototype.isConstant = function () { return true; };\n FixupExpression.prototype.fixup = function (expression) {\n this.resolved = expression;\n this.shared = true;\n };\n return FixupExpression;\n}(Expression));\n/**\n * A constant pool allows a code emitter to share constant in an output context.\n *\n * The constant pool also supports sharing access to ivy definitions references.\n */\nvar ConstantPool = /** @class */ (function () {\n function ConstantPool() {\n this.statements = [];\n this.translations = new Map();\n this.literals = new Map();\n this.literalFactories = new Map();\n this.injectorDefinitions = new Map();\n this.directiveDefinitions = new Map();\n this.componentDefinitions = new Map();\n this.pipeDefinitions = new Map();\n this.nextNameIndex = 0;\n }\n ConstantPool.prototype.getConstLiteral = function (literal$$1, forceShared) {\n if (literal$$1 instanceof LiteralExpr || literal$$1 instanceof FixupExpression) {\n // Do no put simple literals into the constant pool or try to produce a constant for a\n // reference to a constant.\n return literal$$1;\n }\n var key = this.keyOf(literal$$1);\n var fixup = this.literals.get(key);\n var newValue = false;\n if (!fixup) {\n fixup = new FixupExpression(literal$$1);\n this.literals.set(key, fixup);\n newValue = true;\n }\n if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n // Replace the expression with a variable\n var name_1 = this.freshName();\n this.statements.push(variable(name_1).set(literal$$1).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n fixup.fixup(variable(name_1));\n }\n return fixup;\n };\n // Generates closure specific code for translation.\n //\n // ```\n // /**\n // * @desc description?\n // * @meaning meaning?\n // */\n // const MSG_XYZ = goog.getMsg('message');\n // ```\n ConstantPool.prototype.getTranslation = function (message, meta) {\n // The identity of an i18n message depends on the message and its meaning\n var key = meta.meaning ? message + \"\\0\\0\" + meta.meaning : message;\n var exp = this.translations.get(key);\n if (exp) {\n return exp;\n }\n var docStmt = i18nMetaToDocStmt(meta);\n if (docStmt) {\n this.statements.push(docStmt);\n }\n // Call closure to get the translation\n var variable$$1 = variable(this.freshTranslationName());\n var fnCall = variable(GOOG_GET_MSG).callFn([literal(message)]);\n var msgStmt = variable$$1.set(fnCall).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);\n this.statements.push(msgStmt);\n this.translations.set(key, variable$$1);\n return variable$$1;\n };\n ConstantPool.prototype.getDefinition = function (type, kind, ctx, forceShared) {\n if (forceShared === void 0) { forceShared = false; }\n var definitions = this.definitionsOf(kind);\n var fixup = definitions.get(type);\n var newValue = false;\n if (!fixup) {\n var property = this.propertyNameOf(kind);\n fixup = new FixupExpression(ctx.importExpr(type).prop(property));\n definitions.set(type, fixup);\n newValue = true;\n }\n if ((!newValue && !fixup.shared) || (newValue && forceShared)) {\n var name_2 = this.freshName();\n this.statements.push(variable(name_2).set(fixup.resolved).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n fixup.fixup(variable(name_2));\n }\n return fixup;\n };\n ConstantPool.prototype.getLiteralFactory = function (literal$$1) {\n // Create a pure function that builds an array of a mix of constant and variable expressions\n if (literal$$1 instanceof LiteralArrayExpr) {\n var argumentsForKey = literal$$1.entries.map(function (e) { return e.isConstant() ? e : literal(null); });\n var key = this.keyOf(literalArr(argumentsForKey));\n return this._getLiteralFactory(key, literal$$1.entries, function (entries) { return literalArr(entries); });\n }\n else {\n var expressionForKey = literalMap(literal$$1.entries.map(function (e) { return ({\n key: e.key,\n value: e.value.isConstant() ? e.value : literal(null),\n quoted: e.quoted\n }); }));\n var key = this.keyOf(expressionForKey);\n return this._getLiteralFactory(key, literal$$1.entries.map(function (e) { return e.value; }), function (entries) { return literalMap(entries.map(function (value, index) { return ({\n key: literal$$1.entries[index].key,\n value: value,\n quoted: literal$$1.entries[index].quoted\n }); })); });\n }\n };\n ConstantPool.prototype._getLiteralFactory = function (key, values, resultMap) {\n var _this = this;\n var literalFactory = this.literalFactories.get(key);\n var literalFactoryArguments = values.filter((function (e) { return !e.isConstant(); }));\n if (!literalFactory) {\n var resultExpressions = values.map(function (e, index) { return e.isConstant() ? _this.getConstLiteral(e, true) : variable(\"a\" + index); });\n var parameters = resultExpressions.filter(isVariable).map(function (e) { return new FnParam(e.name, DYNAMIC_TYPE); });\n var pureFunctionDeclaration = fn(parameters, [new ReturnStatement(resultMap(resultExpressions))], INFERRED_TYPE);\n var name_3 = this.freshName();\n this.statements.push(variable(name_3).set(pureFunctionDeclaration).toDeclStmt(INFERRED_TYPE, [\n StmtModifier.Final\n ]));\n literalFactory = variable(name_3);\n this.literalFactories.set(key, literalFactory);\n }\n return { literalFactory: literalFactory, literalFactoryArguments: literalFactoryArguments };\n };\n /**\n * Produce a unique name.\n *\n * The name might be unique among different prefixes if any of the prefixes end in\n * a digit so the prefix should be a constant string (not based on user input) and\n * must not end in a digit.\n */\n ConstantPool.prototype.uniqueName = function (prefix) { return \"\" + prefix + this.nextNameIndex++; };\n ConstantPool.prototype.definitionsOf = function (kind) {\n switch (kind) {\n case 2 /* Component */:\n return this.componentDefinitions;\n case 1 /* Directive */:\n return this.directiveDefinitions;\n case 0 /* Injector */:\n return this.injectorDefinitions;\n case 3 /* Pipe */:\n return this.pipeDefinitions;\n }\n error(\"Unknown definition kind \" + kind);\n return this.componentDefinitions;\n };\n ConstantPool.prototype.propertyNameOf = function (kind) {\n switch (kind) {\n case 2 /* Component */:\n return 'ngComponentDef';\n case 1 /* Directive */:\n return 'ngDirectiveDef';\n case 0 /* Injector */:\n return 'ngInjectorDef';\n case 3 /* Pipe */:\n return 'ngPipeDef';\n }\n error(\"Unknown definition kind \" + kind);\n return '<unknown>';\n };\n ConstantPool.prototype.freshName = function () { return this.uniqueName(CONSTANT_PREFIX); };\n ConstantPool.prototype.freshTranslationName = function () {\n return this.uniqueName(TRANSLATION_PREFIX).toUpperCase();\n };\n ConstantPool.prototype.keyOf = function (expression) {\n return expression.visitExpression(new KeyVisitor(), KEY_CONTEXT);\n };\n return ConstantPool;\n}());\n/**\n * Visitor used to determine if 2 expressions are equivalent and can be shared in the\n * `ConstantPool`.\n *\n * When the id (string) generated by the visitor is equal, expressions are considered equivalent.\n */\nvar KeyVisitor = /** @class */ (function () {\n function KeyVisitor() {\n this.visitReadVarExpr = invalid;\n this.visitWriteVarExpr = invalid;\n this.visitWriteKeyExpr = invalid;\n this.visitWritePropExpr = invalid;\n this.visitInvokeMethodExpr = invalid;\n this.visitInvokeFunctionExpr = invalid;\n this.visitInstantiateExpr = invalid;\n this.visitConditionalExpr = invalid;\n this.visitNotExpr = invalid;\n this.visitAssertNotNullExpr = invalid;\n this.visitCastExpr = invalid;\n this.visitFunctionExpr = invalid;\n this.visitBinaryOperatorExpr = invalid;\n this.visitReadPropExpr = invalid;\n this.visitReadKeyExpr = invalid;\n this.visitCommaExpr = invalid;\n }\n KeyVisitor.prototype.visitLiteralExpr = function (ast) {\n return \"\" + (typeof ast.value === 'string' ? '\"' + ast.value + '\"' : ast.value);\n };\n KeyVisitor.prototype.visitLiteralArrayExpr = function (ast, context) {\n var _this = this;\n return \"[\" + ast.entries.map(function (entry) { return entry.visitExpression(_this, context); }).join(',') + \"]\";\n };\n KeyVisitor.prototype.visitLiteralMapExpr = function (ast, context) {\n var _this = this;\n var mapKey = function (entry) {\n var quote = entry.quoted ? '\"' : '';\n return \"\" + quote + entry.key + quote;\n };\n var mapEntry = function (entry) {\n return mapKey(entry) + \":\" + entry.value.visitExpression(_this, context);\n };\n return \"{\" + ast.entries.map(mapEntry).join(',');\n };\n KeyVisitor.prototype.visitExternalExpr = function (ast) {\n return ast.value.moduleName ? \"EX:\" + ast.value.moduleName + \":\" + ast.value.name :\n \"EX:\" + ast.value.runtime.name;\n };\n return KeyVisitor;\n}());\nfunction invalid(arg) {\n throw new Error(\"Invalid state: Visitor \" + this.constructor.name + \" doesn't handle \" + arg.constructor.name);\n}\nfunction isVariable(e) {\n return e instanceof ReadVarExpr;\n}\n// Converts i18n meta informations for a message (description, meaning) to a JsDoc statement\n// formatted as expected by the Closure compiler.\nfunction i18nMetaToDocStmt(meta) {\n var tags = [];\n if (meta.description) {\n tags.push({ tagName: \"desc\" /* Desc */, text: meta.description });\n }\n if (meta.meaning) {\n tags.push({ tagName: \"meaning\" /* Meaning */, text: meta.meaning });\n }\n return tags.length == 0 ? null : new JSDocCommentStmt(tags);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 container for message extracted from the templates.\n */\nvar MessageBundle = /** @class */ (function () {\n function MessageBundle(_htmlParser, _implicitTags, _implicitAttrs, _locale) {\n if (_locale === void 0) { _locale = null; }\n this._htmlParser = _htmlParser;\n this._implicitTags = _implicitTags;\n this._implicitAttrs = _implicitAttrs;\n this._locale = _locale;\n this._messages = [];\n }\n MessageBundle.prototype.updateFromTemplate = function (html, url, interpolationConfig) {\n var htmlParserResult = this._htmlParser.parse(html, url, true, interpolationConfig);\n if (htmlParserResult.errors.length) {\n return htmlParserResult.errors;\n }\n var i18nParserResult = extractMessages(htmlParserResult.rootNodes, interpolationConfig, this._implicitTags, this._implicitAttrs);\n if (i18nParserResult.errors.length) {\n return i18nParserResult.errors;\n }\n (_a = this._messages).push.apply(_a, __spread(i18nParserResult.messages));\n return [];\n var _a;\n };\n // Return the message in the internal format\n // The public (serialized) format might be different, see the `write` method.\n MessageBundle.prototype.getMessages = function () { return this._messages; };\n MessageBundle.prototype.write = function (serializer, filterSources) {\n var messages = {};\n var mapperVisitor = new MapPlaceholderNames();\n // Deduplicate messages based on their ID\n this._messages.forEach(function (message) {\n var id = serializer.digest(message);\n if (!messages.hasOwnProperty(id)) {\n messages[id] = message;\n }\n else {\n (_a = messages[id].sources).push.apply(_a, __spread(message.sources));\n }\n var _a;\n });\n // Transform placeholder names using the serializer mapping\n var msgList = Object.keys(messages).map(function (id) {\n var mapper = serializer.createNameMapper(messages[id]);\n var src = messages[id];\n var nodes = mapper ? mapperVisitor.convert(src.nodes, mapper) : src.nodes;\n var transformedMessage = new Message(nodes, {}, {}, src.meaning, src.description, id);\n transformedMessage.sources = src.sources;\n if (filterSources) {\n transformedMessage.sources.forEach(function (source) { return source.filePath = filterSources(source.filePath); });\n }\n return transformedMessage;\n });\n return serializer.write(msgList, this._locale);\n };\n return MessageBundle;\n}());\n// Transform an i18n AST by renaming the placeholder nodes with the given mapper\nvar MapPlaceholderNames = /** @class */ (function (_super) {\n __extends(MapPlaceholderNames, _super);\n function MapPlaceholderNames() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n MapPlaceholderNames.prototype.convert = function (nodes, mapper) {\n var _this = this;\n return mapper ? nodes.map(function (n) { return n.visit(_this, mapper); }) : nodes;\n };\n MapPlaceholderNames.prototype.visitTagPlaceholder = function (ph, mapper) {\n var _this = this;\n var startName = mapper.toPublicName(ph.startName);\n var closeName = ph.closeName ? mapper.toPublicName(ph.closeName) : ph.closeName;\n var children = ph.children.map(function (n) { return n.visit(_this, mapper); });\n return new TagPlaceholder(ph.tag, ph.attrs, startName, closeName, children, ph.isVoid, ph.sourceSpan);\n };\n MapPlaceholderNames.prototype.visitPlaceholder = function (ph, mapper) {\n return new Placeholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n };\n MapPlaceholderNames.prototype.visitIcuPlaceholder = function (ph, mapper) {\n return new IcuPlaceholder(ph.value, mapper.toPublicName(ph.name), ph.sourceSpan);\n };\n return MapPlaceholderNames;\n}(CloneVisitor));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nfunction mapLiteral(obj) {\n return literalMap(Object.keys(obj).map(function (key) { return ({\n key: key,\n quoted: false,\n value: obj[key],\n }); }));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CORE$1 = '@angular/core';\nvar Identifiers$1 = /** @class */ (function () {\n function Identifiers() {\n }\n /* Methods */\n Identifiers.NEW_METHOD = 'factory';\n Identifiers.TRANSFORM_METHOD = 'transform';\n Identifiers.PATCH_DEPS = 'patchedDeps';\n /* Instructions */\n Identifiers.createElement = { name: 'ɵE', moduleName: CORE$1 };\n Identifiers.elementEnd = { name: 'ɵe', moduleName: CORE$1 };\n Identifiers.elementProperty = { name: 'ɵp', moduleName: CORE$1 };\n Identifiers.elementAttribute = { name: 'ɵa', moduleName: CORE$1 };\n Identifiers.elementClassNamed = { name: 'ɵkn', moduleName: CORE$1 };\n Identifiers.elementStyleNamed = { name: 'ɵsn', moduleName: CORE$1 };\n Identifiers.containerCreate = { name: 'ɵC', moduleName: CORE$1 };\n Identifiers.containerEnd = { name: 'ɵc', moduleName: CORE$1 };\n Identifiers.directiveCreate = { name: 'ɵD', moduleName: CORE$1 };\n Identifiers.text = { name: 'ɵT', moduleName: CORE$1 };\n Identifiers.directiveInput = { name: 'ɵi', moduleName: CORE$1 };\n Identifiers.textCreateBound = { name: 'ɵt', moduleName: CORE$1 };\n Identifiers.bind = { name: 'ɵb', moduleName: CORE$1 };\n Identifiers.interpolation1 = { name: 'ɵi1', moduleName: CORE$1 };\n Identifiers.interpolation2 = { name: 'ɵi2', moduleName: CORE$1 };\n Identifiers.interpolation3 = { name: 'ɵi3', moduleName: CORE$1 };\n Identifiers.interpolation4 = { name: 'ɵi4', moduleName: CORE$1 };\n Identifiers.interpolation5 = { name: 'ɵi5', moduleName: CORE$1 };\n Identifiers.interpolation6 = { name: 'ɵi6', moduleName: CORE$1 };\n Identifiers.interpolation7 = { name: 'ɵi7', moduleName: CORE$1 };\n Identifiers.interpolation8 = { name: 'ɵi8', moduleName: CORE$1 };\n Identifiers.interpolationV = { name: 'ɵiV', moduleName: CORE$1 };\n Identifiers.pureFunction0 = { name: 'ɵf0', moduleName: CORE$1 };\n Identifiers.pureFunction1 = { name: 'ɵf1', moduleName: CORE$1 };\n Identifiers.pureFunction2 = { name: 'ɵf2', moduleName: CORE$1 };\n Identifiers.pureFunction3 = { name: 'ɵf3', moduleName: CORE$1 };\n Identifiers.pureFunction4 = { name: 'ɵf4', moduleName: CORE$1 };\n Identifiers.pureFunction5 = { name: 'ɵf5', moduleName: CORE$1 };\n Identifiers.pureFunction6 = { name: 'ɵf6', moduleName: CORE$1 };\n Identifiers.pureFunction7 = { name: 'ɵf7', moduleName: CORE$1 };\n Identifiers.pureFunction8 = { name: 'ɵf8', moduleName: CORE$1 };\n Identifiers.pureFunctionV = { name: 'ɵfV', moduleName: CORE$1 };\n Identifiers.pipeBind1 = { name: 'ɵpb1', moduleName: CORE$1 };\n Identifiers.pipeBind2 = { name: 'ɵpb2', moduleName: CORE$1 };\n Identifiers.pipeBind3 = { name: 'ɵpb3', moduleName: CORE$1 };\n Identifiers.pipeBind4 = { name: 'ɵpb4', moduleName: CORE$1 };\n Identifiers.pipeBindV = { name: 'ɵpbV', moduleName: CORE$1 };\n Identifiers.load = { name: 'ɵld', moduleName: CORE$1 };\n Identifiers.pipe = { name: 'ɵPp', moduleName: CORE$1 };\n Identifiers.projection = { name: 'ɵP', moduleName: CORE$1 };\n Identifiers.projectionDef = { name: 'ɵpD', moduleName: CORE$1 };\n Identifiers.refreshComponent = { name: 'ɵr', moduleName: CORE$1 };\n Identifiers.directiveLifeCycle = { name: 'ɵl', moduleName: CORE$1 };\n Identifiers.injectAttribute = { name: 'ɵinjectAttribute', moduleName: CORE$1 };\n Identifiers.injectElementRef = { name: 'ɵinjectElementRef', moduleName: CORE$1 };\n Identifiers.injectTemplateRef = { name: 'ɵinjectTemplateRef', moduleName: CORE$1 };\n Identifiers.injectViewContainerRef = { name: 'ɵinjectViewContainerRef', moduleName: CORE$1 };\n Identifiers.directiveInject = { name: 'ɵdirectiveInject', moduleName: CORE$1 };\n Identifiers.defineComponent = { name: 'ɵdefineComponent', moduleName: CORE$1 };\n Identifiers.defineDirective = {\n name: 'ɵdefineDirective',\n moduleName: CORE$1,\n };\n Identifiers.defineInjector = {\n name: 'defineInjector',\n moduleName: CORE$1,\n };\n Identifiers.definePipe = { name: 'ɵdefinePipe', moduleName: CORE$1 };\n Identifiers.query = { name: 'ɵQ', moduleName: CORE$1 };\n Identifiers.queryRefresh = { name: 'ɵqR', moduleName: CORE$1 };\n Identifiers.NgOnChangesFeature = { name: 'ɵNgOnChangesFeature', moduleName: CORE$1 };\n Identifiers.listener = { name: 'ɵL', moduleName: CORE$1 };\n return Identifiers;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 EMPTY_ARRAY = literalArr([]);\nfunction convertMetaToOutput(meta, ctx) {\n if (Array.isArray(meta)) {\n return literalArr(meta.map(function (entry) { return convertMetaToOutput(entry, ctx); }));\n }\n else if (meta instanceof StaticSymbol) {\n return ctx.importExpr(meta);\n }\n else if (meta == null) {\n return literal(meta);\n }\n else {\n throw new Error(\"Internal error: Unsupported or unknown metadata: \" + meta);\n }\n}\nfunction compileNgModule(ctx, ngModule, injectableCompiler) {\n var className = identifierName(ngModule.type);\n var rawImports = ngModule.rawImports ? [ngModule.rawImports] : [];\n var rawExports = ngModule.rawExports ? [ngModule.rawExports] : [];\n var injectorDefArg = mapLiteral({\n 'factory': injectableCompiler.factoryFor({ type: ngModule.type, symbol: ngModule.type.reference }, ctx),\n 'providers': convertMetaToOutput(ngModule.rawProviders, ctx),\n 'imports': convertMetaToOutput(__spread(rawImports, rawExports), ctx),\n });\n var injectorDef = importExpr(Identifiers$1.defineInjector).callFn([injectorDefArg]);\n ctx.statements.push(new ClassStmt(\n /* name */ className, \n /* parent */ null, \n /* fields */ [new ClassField(\n /* name */ 'ngInjectorDef', \n /* type */ INFERRED_TYPE, \n /* modifiers */ [StmtModifier.Static], \n /* initializer */ injectorDef)], \n /* getters */ [], \n /* constructorMethod */ new ClassMethod(null, [], []), \n /* methods */ []));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Comment to insert above back-patch\n */\nvar BUILD_OPTIMIZER_COLOCATE = '@__BUILD_OPTIMIZER_COLOCATE__';\n/**\n * Comment to mark removable expressions\n */\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/** Name of the context parameter passed into a template function */\nvar CONTEXT_NAME = 'ctx';\n/** Name of the RenderFlag passed into a template function */\nvar RENDER_FLAGS = 'rf';\n/** Name of the temporary to use during data binding */\nvar TEMPORARY_NAME = '_t';\n/** The prefix reference variables */\nvar REFERENCE_PREFIX = '_r';\n/** The name of the implicit context reference */\nvar IMPLICIT_REFERENCE = '$implicit';\n/** Name of the i18n attributes **/\nvar I18N_ATTR = 'i18n';\nvar I18N_ATTR_PREFIX = 'i18n-';\n/** I18n separators for metadata **/\nvar MEANING_SEPARATOR$1 = '|';\nvar ID_SEPARATOR$1 = '@@';\nfunction compileDirective(outputCtx, directive, reflector, bindingParser, mode) {\n var definitionMapValues = [];\n var field = function (key, value) {\n if (value) {\n definitionMapValues.push({ key: key, value: value, quoted: false });\n }\n };\n // e.g. 'type: MyDirective`\n field('type', outputCtx.importExpr(directive.type.reference));\n // e.g. `selectors: [['', 'someDir', '']]`\n field('selectors', createDirectiveSelector(directive.selector));\n // e.g. `factory: () => new MyApp(injectElementRef())`\n field('factory', createFactory(directive.type, outputCtx, reflector, directive.queries));\n // e.g. `hostBindings: (dirIndex, elIndex) => { ... }\n field('hostBindings', createHostBindingsFunction(directive, outputCtx, bindingParser));\n // e.g. `attributes: ['role', 'listbox']`\n field('attributes', createHostAttributesArray(directive, outputCtx));\n // e.g 'inputs: {a: 'a'}`\n field('inputs', conditionallyCreateMapObjectLiteral(directive.inputs, outputCtx));\n // e.g 'outputs: {a: 'a'}`\n field('outputs', conditionallyCreateMapObjectLiteral(directive.outputs, outputCtx));\n var className = identifierName(directive.type);\n className || error(\"Cannot resolver the name of \" + directive.type);\n var definitionField = outputCtx.constantPool.propertyNameOf(1 /* Directive */);\n var definitionFunction = importExpr(Identifiers$1.defineDirective).callFn([literalMap(definitionMapValues)]);\n if (mode === 0 /* PartialClass */) {\n // Create the partial class to be merged with the actual class.\n outputCtx.statements.push(new ClassStmt(\n /* name */ className, \n /* parent */ null, \n /* fields */ [new ClassField(\n /* name */ definitionField, \n /* type */ INFERRED_TYPE, \n /* modifiers */ [StmtModifier.Static], \n /* initializer */ definitionFunction)], \n /* getters */ [], \n /* constructorMethod */ new ClassMethod(null, [], []), \n /* methods */ []));\n }\n else {\n // Create back-patch definition.\n var classReference = outputCtx.importExpr(directive.type.reference);\n // Create the back-patch statement\n outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE));\n outputCtx.statements.push(classReference.prop(definitionField).set(definitionFunction).toStmt());\n }\n}\nfunction compileComponent(outputCtx, component, pipeSummaries, template, reflector, bindingParser, mode) {\n var definitionMapValues = [];\n // Pipes and Directives found in the template\n var pipes = new Set();\n var directives = new Set();\n var field = function (key, value) {\n if (value) {\n definitionMapValues.push({ key: key, value: value, quoted: false });\n }\n };\n // e.g. `type: MyApp`\n field('type', outputCtx.importExpr(component.type.reference));\n // e.g. `selectors: [['my-app']]`\n field('selectors', createDirectiveSelector(component.selector));\n var selector = component.selector && CssSelector.parse(component.selector);\n var firstSelector = selector && selector[0];\n // e.g. `attr: [\"class\", \".my.app\"]\n // This is optional an only included if the first selector of a component specifies attributes.\n if (firstSelector) {\n var selectorAttributes = firstSelector.getAttrs();\n if (selectorAttributes.length) {\n field('attrs', outputCtx.constantPool.getConstLiteral(literalArr(selectorAttributes.map(function (value) { return value != null ? literal(value) : literal(undefined); })), \n /* forceShared */ true));\n }\n }\n // e.g. `factory: function MyApp_Factory() { return new MyApp(injectElementRef()); }`\n field('factory', createFactory(component.type, outputCtx, reflector, component.queries));\n // e.g `hostBindings: function MyApp_HostBindings { ... }\n field('hostBindings', createHostBindingsFunction(component, outputCtx, bindingParser));\n // e.g. `template: function MyComponent_Template(_ctx, _cm) {...}`\n var templateTypeName = component.type.reference.name;\n var templateName = templateTypeName ? templateTypeName + \"_Template\" : null;\n var pipeMap = new Map(pipeSummaries.map(function (pipe) { return [pipe.name, pipe]; }));\n var templateFunctionExpression = new TemplateDefinitionBuilder(outputCtx, outputCtx.constantPool, reflector, CONTEXT_NAME, BindingScope.ROOT_SCOPE, 0, component.template.ngContentSelectors, templateTypeName, templateName, pipeMap, component.viewQueries, directives, pipes)\n .buildTemplateFunction(template, []);\n field('template', templateFunctionExpression);\n // e.g. `directives: [MyDirective]`\n if (directives.size) {\n var expressions = Array.from(directives).map(function (d) { return outputCtx.importExpr(d); });\n field('directives', literalArr(expressions));\n }\n // e.g. `pipes: [MyPipe]`\n if (pipes.size) {\n var expressions = Array.from(pipes).map(function (p) { return outputCtx.importExpr(p); });\n field('pipes', literalArr(expressions));\n }\n // e.g `inputs: {a: 'a'}`\n field('inputs', conditionallyCreateMapObjectLiteral(component.inputs, outputCtx));\n // e.g 'outputs: {a: 'a'}`\n field('outputs', conditionallyCreateMapObjectLiteral(component.outputs, outputCtx));\n // e.g. `features: [NgOnChangesFeature(MyComponent)]`\n var features = [];\n if (component.type.lifecycleHooks.some(function (lifecycle) { return lifecycle == LifecycleHooks.OnChanges; })) {\n features.push(importExpr(Identifiers$1.NgOnChangesFeature, null, null).callFn([outputCtx.importExpr(component.type.reference)]));\n }\n if (features.length) {\n field('features', literalArr(features));\n }\n var definitionField = outputCtx.constantPool.propertyNameOf(2 /* Component */);\n var definitionFunction = importExpr(Identifiers$1.defineComponent).callFn([literalMap(definitionMapValues)]);\n if (mode === 0 /* PartialClass */) {\n var className = identifierName(component.type);\n className || error(\"Cannot resolver the name of \" + component.type);\n // Create the partial class to be merged with the actual class.\n outputCtx.statements.push(new ClassStmt(\n /* name */ className, \n /* parent */ null, \n /* fields */ [new ClassField(\n /* name */ definitionField, \n /* type */ INFERRED_TYPE, \n /* modifiers */ [StmtModifier.Static], \n /* initializer */ definitionFunction)], \n /* getters */ [], \n /* constructorMethod */ new ClassMethod(null, [], []), \n /* methods */ []));\n }\n else {\n var classReference = outputCtx.importExpr(component.type.reference);\n // Create the back-patch statement\n outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE), classReference.prop(definitionField).set(definitionFunction).toStmt());\n }\n}\nfunction unsupported(feature) {\n if (this) {\n throw new Error(\"Builder \" + this.constructor.name + \" doesn't support \" + feature + \" yet\");\n }\n throw new Error(\"Feature \" + feature + \" is not supported yet\");\n}\nvar BINDING_INSTRUCTION_MAP = (_a = {}, _a[PropertyBindingType.Property] = Identifiers$1.elementProperty, _a[PropertyBindingType.Attribute] = Identifiers$1.elementAttribute, _a[PropertyBindingType.Class] = Identifiers$1.elementClassNamed, _a[PropertyBindingType.Style] = Identifiers$1.elementStyleNamed, _a);\nfunction interpolate(args) {\n args = args.slice(1); // Ignore the length prefix added for render2\n switch (args.length) {\n case 3:\n return importExpr(Identifiers$1.interpolation1).callFn(args);\n case 5:\n return importExpr(Identifiers$1.interpolation2).callFn(args);\n case 7:\n return importExpr(Identifiers$1.interpolation3).callFn(args);\n case 9:\n return importExpr(Identifiers$1.interpolation4).callFn(args);\n case 11:\n return importExpr(Identifiers$1.interpolation5).callFn(args);\n case 13:\n return importExpr(Identifiers$1.interpolation6).callFn(args);\n case 15:\n return importExpr(Identifiers$1.interpolation7).callFn(args);\n case 17:\n return importExpr(Identifiers$1.interpolation8).callFn(args);\n }\n (args.length >= 19 && args.length % 2 == 1) ||\n error(\"Invalid interpolation argument length \" + args.length);\n return importExpr(Identifiers$1.interpolationV).callFn([literalArr(args)]);\n}\nfunction pipeBinding(args) {\n switch (args.length) {\n case 0:\n // The first parameter to pipeBind is always the value to be transformed followed\n // by arg.length arguments so the total number of arguments to pipeBind are\n // arg.length + 1.\n return Identifiers$1.pipeBind1;\n case 1:\n return Identifiers$1.pipeBind2;\n case 2:\n return Identifiers$1.pipeBind3;\n default:\n return Identifiers$1.pipeBindV;\n }\n}\nvar pureFunctionIdentifiers = [\n Identifiers$1.pureFunction0, Identifiers$1.pureFunction1, Identifiers$1.pureFunction2, Identifiers$1.pureFunction3, Identifiers$1.pureFunction4,\n Identifiers$1.pureFunction5, Identifiers$1.pureFunction6, Identifiers$1.pureFunction7, Identifiers$1.pureFunction8\n];\nfunction getLiteralFactory(outputContext, literal$$1) {\n var _a = outputContext.constantPool.getLiteralFactory(literal$$1), literalFactory = _a.literalFactory, literalFactoryArguments = _a.literalFactoryArguments;\n literalFactoryArguments.length > 0 || error(\"Expected arguments to a literal factory function\");\n var pureFunctionIdent = pureFunctionIdentifiers[literalFactoryArguments.length] || Identifiers$1.pureFunctionV;\n // Literal factories are pure functions that only need to be re-invoked when the parameters\n // change.\n return importExpr(pureFunctionIdent).callFn(__spread([literalFactory], literalFactoryArguments));\n}\nfunction noop() { }\nvar BindingScope = /** @class */ (function () {\n function BindingScope(parent, declareLocalVarCallback) {\n if (parent === void 0) { parent = null; }\n if (declareLocalVarCallback === void 0) { declareLocalVarCallback = noop; }\n this.parent = parent;\n this.declareLocalVarCallback = declareLocalVarCallback;\n /**\n * Keeps a map from local variables to their expressions.\n *\n * This is used when one refers to variable such as: 'let abc = a.b.c`.\n * - key to the map is the string literal `\"abc\"`.\n * - value `lhs` is the left hand side which is an AST representing `abc`.\n * - value `rhs` is the right hand side which is an AST representing `a.b.c`.\n * - value `declared` is true if the `declareLocalVarCallback` has been called for this scope\n * already.\n */\n this.map = new Map();\n this.referenceNameIndex = 0;\n }\n BindingScope.prototype.get = function (name) {\n var current = this;\n while (current) {\n var value = current.map.get(name);\n if (value != null) {\n if (current !== this) {\n // make a local copy and reset the `declared` state.\n value = { lhs: value.lhs, rhs: value.rhs, declared: false };\n // Cache the value locally.\n this.map.set(name, value);\n }\n if (value.rhs && !value.declared) {\n // if it is first time we are referencing the variable in the scope\n // than invoke the callback to insert variable declaration.\n this.declareLocalVarCallback(value.lhs, value.rhs);\n value.declared = true;\n }\n return value.lhs;\n }\n current = current.parent;\n }\n return null;\n };\n /**\n * Create a local variable for later reference.\n *\n * @param name Name of the variable.\n * @param lhs AST representing the left hand side of the `let lhs = rhs;`.\n * @param rhs AST representing the right hand side of the `let lhs = rhs;`. The `rhs` can be\n * `undefined` for variable that are ambient such as `$event` and which don't have `rhs`\n * declaration.\n */\n BindingScope.prototype.set = function (name, lhs, rhs) {\n !this.map.has(name) ||\n error(\"The name \" + name + \" is already defined in scope to be \" + this.map.get(name));\n this.map.set(name, { lhs: lhs, rhs: rhs, declared: false });\n return this;\n };\n BindingScope.prototype.getLocal = function (name) { return this.get(name); };\n BindingScope.prototype.nestedScope = function (declareCallback) {\n return new BindingScope(this, declareCallback);\n };\n BindingScope.prototype.freshReferenceName = function () {\n var current = this;\n // Find the top scope as it maintains the global reference count\n while (current.parent)\n current = current.parent;\n var ref = \"\" + REFERENCE_PREFIX + current.referenceNameIndex++;\n return ref;\n };\n BindingScope.ROOT_SCOPE = new BindingScope().set('$event', variable('$event'));\n return BindingScope;\n}());\nvar TemplateDefinitionBuilder = /** @class */ (function () {\n function TemplateDefinitionBuilder(outputCtx, constantPool, reflector, contextParameter, parentBindingScope, level, ngContentSelectors, contextName, templateName, pipeMap, viewQueries, directives, pipes) {\n if (level === void 0) { level = 0; }\n var _this = this;\n this.outputCtx = outputCtx;\n this.constantPool = constantPool;\n this.reflector = reflector;\n this.contextParameter = contextParameter;\n this.level = level;\n this.ngContentSelectors = ngContentSelectors;\n this.contextName = contextName;\n this.templateName = templateName;\n this.pipeMap = pipeMap;\n this.viewQueries = viewQueries;\n this.directives = directives;\n this.pipes = pipes;\n this._dataIndex = 0;\n this._bindingContext = 0;\n this._temporaryAllocated = false;\n this._prefix = [];\n this._creationMode = [];\n this._variableMode = [];\n this._bindingMode = [];\n this._postfix = [];\n this._projectionDefinitionIndex = 0;\n this.unsupported = unsupported;\n this.invalid = invalid$1;\n // Whether we are inside a translatable element (`<p i18n>... somewhere here ... </p>)\n this._inI18nSection = false;\n this._i18nSectionIndex = -1;\n // Maps of placeholder to node indexes for each of the i18n section\n this._phToNodeIdxes = [{}];\n // These should be handled in the template or element directly.\n this.visitReference = invalid$1;\n this.visitVariable = invalid$1;\n this.visitEvent = invalid$1;\n this.visitElementProperty = invalid$1;\n this.visitAttr = invalid$1;\n // These should be handled in the template or element directly\n this.visitDirective = invalid$1;\n this.visitDirectiveProperty = invalid$1;\n this.bindingScope =\n parentBindingScope.nestedScope(function (lhsVar, expression) {\n _this._bindingMode.push(lhsVar.set(expression).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n });\n this._valueConverter = new ValueConverter(outputCtx, function () { return _this.allocateDataSlot(); }, function (name, localName, slot, value) {\n _this.bindingScope.set(localName, value);\n var pipe = pipeMap.get(name);\n pipe || error(\"Could not find pipe \" + name);\n _this.pipes.add(pipe.type.reference);\n _this._creationMode.push(importExpr(Identifiers$1.pipe).callFn([literal(slot), literal(name)]).toStmt());\n });\n }\n TemplateDefinitionBuilder.prototype.buildTemplateFunction = function (nodes, variables) {\n try {\n // Create variable bindings\n for (var variables_1 = __values(variables), variables_1_1 = variables_1.next(); !variables_1_1.done; variables_1_1 = variables_1.next()) {\n var variable$$1 = variables_1_1.value;\n var variableName = variable$$1.name;\n var expression = variable(this.contextParameter).prop(variable$$1.value || IMPLICIT_REFERENCE);\n var scopedName = this.bindingScope.freshReferenceName();\n // Add the reference to the local scope.\n this.bindingScope.set(variableName, variable(variableName + scopedName), expression);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (variables_1_1 && !variables_1_1.done && (_a = variables_1.return)) _a.call(variables_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n // Collect content projections\n if (this.ngContentSelectors && this.ngContentSelectors.length > 0) {\n var contentProjections = getContentProjection(nodes, this.ngContentSelectors);\n this._contentProjections = contentProjections;\n if (contentProjections.size > 0) {\n var selectors_1 = [];\n Array.from(contentProjections.values()).forEach(function (info) {\n if (info.selector) {\n selectors_1[info.index - 1] = info.selector;\n }\n });\n var projectionIndex = this._projectionDefinitionIndex = this.allocateDataSlot();\n var parameters = [literal(projectionIndex)];\n if (selectors_1.some(function (value) { return !value; })) {\n error(\"content project information skipped an index\");\n }\n if (selectors_1.length > 1) {\n var r3Selectors = selectors_1.map(function (s) { return parseSelectorToR3Selector(s); });\n // `projectionDef` needs both the parsed and raw value of the selectors\n var parsed = this.outputCtx.constantPool.getConstLiteral(asLiteral(r3Selectors), true);\n var unParsed = this.outputCtx.constantPool.getConstLiteral(asLiteral(selectors_1), true);\n parameters.push(parsed, unParsed);\n }\n this.instruction.apply(this, __spread([this._creationMode, null, Identifiers$1.projectionDef], parameters));\n }\n }\n try {\n // Define and update any view queries\n for (var _b = __values(this.viewQueries), _c = _b.next(); !_c.done; _c = _b.next()) {\n var query = _c.value;\n // e.g. r3.Q(0, somePredicate, true);\n var querySlot = this.allocateDataSlot();\n var predicate = getQueryPredicate(query, this.outputCtx);\n var args = [\n /* memoryIndex */ literal(querySlot, INFERRED_TYPE),\n /* predicate */ predicate,\n /* descend */ literal(query.descendants, INFERRED_TYPE)\n ];\n if (query.read) {\n args.push(this.outputCtx.importExpr(query.read.identifier.reference));\n }\n this.instruction.apply(this, __spread([this._creationMode, null, Identifiers$1.query], args));\n // (r3.qR(tmp = r3.ɵld(0)) && (ctx.someDir = tmp));\n var temporary = this.temp();\n var getQueryList = importExpr(Identifiers$1.load).callFn([literal(querySlot)]);\n var refresh = importExpr(Identifiers$1.queryRefresh).callFn([temporary.set(getQueryList)]);\n var updateDirective = variable(CONTEXT_NAME)\n .prop(query.propertyName)\n .set(query.first ? temporary.prop('first') : temporary);\n this._bindingMode.push(refresh.and(updateDirective).toStmt());\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_d = _b.return)) _d.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n templateVisitAll(this, nodes);\n var creationMode = this._creationMode.length > 0 ?\n [ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(1 /* Create */), null, false), this._creationMode)] :\n [];\n var updateMode = this._bindingMode.length > 0 ?\n [ifStmt(variable(RENDER_FLAGS).bitwiseAnd(literal(2 /* Update */), null, false), this._bindingMode)] :\n [];\n try {\n // Generate maps of placeholder name to node indexes\n // TODO(vicb): This is a WIP, not fully supported yet\n for (var _e = __values(this._phToNodeIdxes), _f = _e.next(); !_f.done; _f = _e.next()) {\n var phToNodeIdx = _f.value;\n if (Object.keys(phToNodeIdx).length > 0) {\n var scopedName = this.bindingScope.freshReferenceName();\n var phMap = variable(scopedName)\n .set(mapToExpression(phToNodeIdx, true))\n .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]);\n this._prefix.push(phMap);\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_g = _e.return)) _g.call(_e);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return fn([new FnParam(RENDER_FLAGS, NUMBER_TYPE), new FnParam(this.contextParameter, null)], __spread(this._prefix, creationMode, this._variableMode, updateMode, this._postfix), INFERRED_TYPE, null, this.templateName);\n var e_1, _a, e_2, _d, e_3, _g;\n };\n // LocalResolver\n TemplateDefinitionBuilder.prototype.getLocal = function (name) { return this.bindingScope.get(name); };\n // TemplateAstVisitor\n TemplateDefinitionBuilder.prototype.visitNgContent = function (ngContent) {\n var info = this._contentProjections.get(ngContent);\n info ||\n error(\"Expected \" + ngContent.sourceSpan + \" to be included in content projection collection\");\n var slot = this.allocateDataSlot();\n var parameters = [literal(slot), literal(this._projectionDefinitionIndex)];\n if (info.index !== 0) {\n parameters.push(literal(info.index));\n }\n this.instruction.apply(this, __spread([this._creationMode, ngContent.sourceSpan, Identifiers$1.projection], parameters));\n };\n // TemplateAstVisitor\n TemplateDefinitionBuilder.prototype.visitElement = function (element) {\n var _this = this;\n var elementIndex = this.allocateDataSlot();\n var referenceDataSlots = new Map();\n var wasInI18nSection = this._inI18nSection;\n var outputAttrs = {};\n var attrI18nMetas = {};\n var i18nMeta = '';\n // Elements inside i18n sections are replaced with placeholders\n // TODO(vicb): nested elements are a WIP in this phase\n if (this._inI18nSection) {\n var phName = element.name.toLowerCase();\n if (!this._phToNodeIdxes[this._i18nSectionIndex][phName]) {\n this._phToNodeIdxes[this._i18nSectionIndex][phName] = [];\n }\n this._phToNodeIdxes[this._i18nSectionIndex][phName].push(elementIndex);\n }\n try {\n // Handle i18n attributes\n for (var _a = __values(element.attrs), _b = _a.next(); !_b.done; _b = _a.next()) {\n var attr = _b.value;\n var name_1 = attr.name;\n var value = attr.value;\n if (name_1 === I18N_ATTR) {\n if (this._inI18nSection) {\n throw new Error(\"Could not mark an element as translatable inside of a translatable section\");\n }\n this._inI18nSection = true;\n this._i18nSectionIndex++;\n this._phToNodeIdxes[this._i18nSectionIndex] = {};\n i18nMeta = value;\n }\n else if (name_1.startsWith(I18N_ATTR_PREFIX)) {\n attrI18nMetas[name_1.slice(I18N_ATTR_PREFIX.length)] = value;\n }\n else {\n outputAttrs[name_1] = value;\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_4) throw e_4.error; }\n }\n // Element creation mode\n var parameters = [\n literal(elementIndex),\n literal(element.name),\n ];\n element.directives.forEach(function (directive) { return _this.directives.add(directive.directive.type.reference); });\n // Add the attributes\n var i18nMessages = [];\n var attributes = [];\n var hasI18nAttr = false;\n Object.getOwnPropertyNames(outputAttrs).forEach(function (name) {\n var value = outputAttrs[name];\n attributes.push(literal(name));\n if (attrI18nMetas.hasOwnProperty(name)) {\n hasI18nAttr = true;\n var meta = parseI18nMeta(attrI18nMetas[name]);\n var variable$$1 = _this.constantPool.getTranslation(value, meta);\n attributes.push(variable$$1);\n }\n else {\n attributes.push(literal(value));\n }\n });\n var attrArg = TYPED_NULL_EXPR;\n if (attributes.length > 0) {\n attrArg = hasI18nAttr ? getLiteralFactory(this.outputCtx, literalArr(attributes)) :\n this.constantPool.getConstLiteral(literalArr(attributes), true);\n }\n parameters.push(attrArg);\n if (element.references && element.references.length > 0) {\n var references = flatten(element.references.map(function (reference) {\n var slot = _this.allocateDataSlot();\n referenceDataSlots.set(reference.name, slot);\n // Generate the update temporary.\n var variableName = _this.bindingScope.freshReferenceName();\n _this._variableMode.push(variable(variableName, INFERRED_TYPE)\n .set(importExpr(Identifiers$1.load).callFn([literal(slot)]))\n .toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n _this.bindingScope.set(reference.name, variable(variableName));\n return [reference.name, reference.originalValue];\n })).map(function (value) { return literal(value); });\n parameters.push(this.constantPool.getConstLiteral(literalArr(references), /* forceShared */ true));\n }\n else {\n parameters.push(TYPED_NULL_EXPR);\n }\n // Generate the instruction create element instruction\n if (i18nMessages.length > 0) {\n (_d = this._creationMode).push.apply(_d, __spread(i18nMessages));\n }\n this.instruction.apply(this, __spread([this._creationMode, element.sourceSpan, Identifiers$1.createElement], trimTrailingNulls(parameters)));\n var implicit = variable(CONTEXT_NAME);\n // Generate Listeners (outputs)\n element.outputs.forEach(function (outputAst) {\n var functionName = _this.templateName + \"_\" + element.name + \"_\" + outputAst.name + \"_listener\";\n var localVars = [];\n var bindingScope = _this.bindingScope.nestedScope(function (lhsVar, rhsExpression) {\n localVars.push(lhsVar.set(rhsExpression).toDeclStmt(INFERRED_TYPE, [StmtModifier.Final]));\n });\n var bindingExpr = convertActionBinding(bindingScope, variable(CONTEXT_NAME), outputAst.handler, 'b', function () { return error('Unexpected interpolation'); });\n var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], __spread(localVars, bindingExpr.render3Stmts), INFERRED_TYPE, null, functionName);\n _this.instruction(_this._creationMode, outputAst.sourceSpan, Identifiers$1.listener, literal(outputAst.name), handler);\n });\n try {\n // Generate element input bindings\n for (var _e = __values(element.inputs), _f = _e.next(); !_f.done; _f = _e.next()) {\n var input = _f.value;\n if (input.isAnimation) {\n this.unsupported('animations');\n }\n var convertedBinding = this.convertPropertyBinding(implicit, input.value);\n var instruction = BINDING_INSTRUCTION_MAP[input.type];\n if (instruction) {\n // TODO(chuckj): runtime: security context?\n this.instruction(this._bindingMode, input.sourceSpan, instruction, literal(elementIndex), literal(input.name), convertedBinding);\n }\n else {\n this.unsupported(\"binding \" + PropertyBindingType[input.type]);\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_g = _e.return)) _g.call(_e);\n }\n finally { if (e_5) throw e_5.error; }\n }\n // Generate directives input bindings\n this._visitDirectives(element.directives, implicit, elementIndex);\n // Traverse element child nodes\n if (this._inI18nSection && element.children.length == 1 &&\n element.children[0] instanceof TextAst) {\n var text = element.children[0];\n this.visitSingleI18nTextChild(text, i18nMeta);\n }\n else {\n templateVisitAll(this, element.children);\n }\n // Finish element construction mode.\n this.instruction(this._creationMode, element.endSourceSpan || element.sourceSpan, Identifiers$1.elementEnd);\n // Restore the state before exiting this node\n this._inI18nSection = wasInI18nSection;\n var e_4, _c, _d, e_5, _g;\n };\n TemplateDefinitionBuilder.prototype._visitDirectives = function (directives, implicit, nodeIndex) {\n try {\n for (var directives_1 = __values(directives), directives_1_1 = directives_1.next(); !directives_1_1.done; directives_1_1 = directives_1.next()) {\n var directive = directives_1_1.value;\n // Creation mode\n // e.g. D(0, TodoComponentDef.n(), TodoComponentDef);\n var directiveType = directive.directive.type.reference;\n var kind = directive.directive.isComponent ? 2 /* Component */ : 1;\n try {\n // Note: *do not cache* calls to this.directiveOf() as the constant pool needs to know if the\n // node is referenced multiple times to know that it must generate the reference into a\n // temporary.\n // Bindings\n for (var _a = __values(directive.inputs), _b = _a.next(); !_b.done; _b = _a.next()) {\n var input = _b.value;\n var convertedBinding = this.convertPropertyBinding(implicit, input.value);\n this.instruction(this._bindingMode, directive.sourceSpan, Identifiers$1.elementProperty, literal(nodeIndex), literal(input.templateName), importExpr(Identifiers$1.bind).callFn([convertedBinding]));\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_6) throw e_6.error; }\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (directives_1_1 && !directives_1_1.done && (_d = directives_1.return)) _d.call(directives_1);\n }\n finally { if (e_7) throw e_7.error; }\n }\n var e_7, _d, e_6, _c;\n };\n // TemplateAstVisitor\n TemplateDefinitionBuilder.prototype.visitEmbeddedTemplate = function (template) {\n var _this = this;\n var templateIndex = this.allocateDataSlot();\n var templateRef = this.reflector.resolveExternalReference(Identifiers.TemplateRef);\n var templateDirective = template.directives.find(function (directive) { return directive.directive.type.diDeps.some(function (dependency) {\n return dependency.token != null && (tokenReference(dependency.token) == templateRef);\n }); });\n var contextName = this.contextName && templateDirective && templateDirective.directive.type.reference.name ?\n this.contextName + \"_\" + templateDirective.directive.type.reference.name :\n null;\n var templateName = contextName ? contextName + \"_Template_\" + templateIndex : \"Template_\" + templateIndex;\n var templateContext = \"ctx\" + this.level;\n var parameters = [variable(templateName), literal(null, INFERRED_TYPE)];\n var attributeNames = [];\n template.directives.forEach(function (directiveAst) {\n _this.directives.add(directiveAst.directive.type.reference);\n CssSelector.parse(directiveAst.directive.selector).forEach(function (selector) {\n selector.attrs.forEach(function (value) {\n // Convert '' (falsy) strings into `null`. This is needed because we want\n // to communicate to runtime that these attributes are present for\n // selector matching, but should not actually be added to the DOM.\n // attributeNames.push(o.literal(value ? value : null));\n // TODO(misko): make the above comment true, for now just write to DOM because\n // the runtime selectors have not been updated.\n attributeNames.push(literal(value));\n });\n });\n });\n if (attributeNames.length) {\n parameters.push(this.constantPool.getConstLiteral(literalArr(attributeNames), /* forcedShared */ true));\n }\n // e.g. C(1, C1Template)\n this.instruction.apply(this, __spread([this._creationMode, template.sourceSpan, Identifiers$1.containerCreate, literal(templateIndex)], trimTrailingNulls(parameters)));\n // Generate directives\n this._visitDirectives(template.directives, variable(CONTEXT_NAME), templateIndex);\n // Create the template function\n var templateVisitor = new TemplateDefinitionBuilder(this.outputCtx, this.constantPool, this.reflector, templateContext, this.bindingScope, this.level + 1, this.ngContentSelectors, contextName, templateName, this.pipeMap, [], this.directives, this.pipes);\n var templateFunctionExpr = templateVisitor.buildTemplateFunction(template.children, template.variables);\n this._postfix.push(templateFunctionExpr.toDeclStmt(templateName, null));\n };\n // TemplateAstVisitor\n TemplateDefinitionBuilder.prototype.visitBoundText = function (text) {\n var nodeIndex = this.allocateDataSlot();\n // Creation mode\n this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(nodeIndex));\n this.instruction(this._bindingMode, text.sourceSpan, Identifiers$1.textCreateBound, literal(nodeIndex), this.convertPropertyBinding(variable(CONTEXT_NAME), text.value));\n };\n // TemplateAstVisitor\n TemplateDefinitionBuilder.prototype.visitText = function (text) {\n // Text is defined in creation mode only.\n this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(this.allocateDataSlot()), literal(text.value));\n };\n // When the content of the element is a single text node the translation can be inlined:\n //\n // `<p i18n=\"desc|mean\">some content</p>`\n // compiles to\n // ```\n // /**\n // * @desc desc\n // * @meaning mean\n // */\n // const MSG_XYZ = goog.getMsg('some content');\n // i0.ɵT(1, MSG_XYZ);\n // ```\n TemplateDefinitionBuilder.prototype.visitSingleI18nTextChild = function (text, i18nMeta) {\n var meta = parseI18nMeta(i18nMeta);\n var variable$$1 = this.constantPool.getTranslation(text.value, meta);\n this.instruction(this._creationMode, text.sourceSpan, Identifiers$1.text, literal(this.allocateDataSlot()), variable$$1);\n };\n TemplateDefinitionBuilder.prototype.allocateDataSlot = function () { return this._dataIndex++; };\n TemplateDefinitionBuilder.prototype.bindingContext = function () { return \"\" + this._bindingContext++; };\n TemplateDefinitionBuilder.prototype.instruction = function (statements, span, reference) {\n var params = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n params[_i - 3] = arguments[_i];\n }\n statements.push(importExpr(reference, null, span).callFn(params, span).toStmt());\n };\n TemplateDefinitionBuilder.prototype.definitionOf = function (type, kind) {\n return this.constantPool.getDefinition(type, kind, this.outputCtx);\n };\n TemplateDefinitionBuilder.prototype.temp = function () {\n if (!this._temporaryAllocated) {\n this._prefix.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n this._temporaryAllocated = true;\n }\n return variable(TEMPORARY_NAME);\n };\n TemplateDefinitionBuilder.prototype.convertPropertyBinding = function (implicit, value) {\n var pipesConvertedValue = value.visit(this._valueConverter);\n var convertedPropertyBinding = convertPropertyBinding(this, implicit, pipesConvertedValue, this.bindingContext(), BindingForm.TrySimple, interpolate);\n (_a = this._bindingMode).push.apply(_a, __spread(convertedPropertyBinding.stmts));\n return convertedPropertyBinding.currValExpr;\n var _a;\n };\n return TemplateDefinitionBuilder;\n}());\nfunction getQueryPredicate(query, outputCtx) {\n if (query.selectors.length > 1 || (query.selectors.length == 1 && query.selectors[0].value)) {\n var selectors = query.selectors.map(function (value) { return value.value; });\n selectors.some(function (value) { return !value; }) && error('Found a type among the string selectors expected');\n return outputCtx.constantPool.getConstLiteral(literalArr(selectors.map(function (value) { return literal(value); })));\n }\n if (query.selectors.length == 1) {\n var first = query.selectors[0];\n if (first.identifier) {\n return outputCtx.importExpr(first.identifier.reference);\n }\n }\n error('Unexpected query form');\n return NULL_EXPR;\n}\nfunction createFactory(type, outputCtx, reflector, queries) {\n var args = [];\n var elementRef = reflector.resolveExternalReference(Identifiers.ElementRef);\n var templateRef = reflector.resolveExternalReference(Identifiers.TemplateRef);\n var viewContainerRef = reflector.resolveExternalReference(Identifiers.ViewContainerRef);\n try {\n for (var _a = __values(type.diDeps), _b = _a.next(); !_b.done; _b = _a.next()) {\n var dependency = _b.value;\n var token = dependency.token;\n if (token) {\n var tokenRef = tokenReference(token);\n if (tokenRef === elementRef) {\n args.push(importExpr(Identifiers$1.injectElementRef).callFn([]));\n }\n else if (tokenRef === templateRef) {\n args.push(importExpr(Identifiers$1.injectTemplateRef).callFn([]));\n }\n else if (tokenRef === viewContainerRef) {\n args.push(importExpr(Identifiers$1.injectViewContainerRef).callFn([]));\n }\n else if (dependency.isAttribute) {\n args.push(importExpr(Identifiers$1.injectAttribute).callFn([literal(dependency.token.value)]));\n }\n else {\n var tokenValue = token.identifier != null ? outputCtx.importExpr(tokenRef) : literal(tokenRef);\n var directiveInjectArgs = [tokenValue];\n var flags = extractFlags(dependency);\n if (flags != 0 /* Default */) {\n // Append flag information if other than default.\n directiveInjectArgs.push(literal(flags));\n }\n args.push(importExpr(Identifiers$1.directiveInject).callFn(directiveInjectArgs));\n }\n }\n else {\n unsupported('dependency without a token');\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_8) throw e_8.error; }\n }\n var queryDefinitions = [];\n try {\n for (var queries_1 = __values(queries), queries_1_1 = queries_1.next(); !queries_1_1.done; queries_1_1 = queries_1.next()) {\n var query = queries_1_1.value;\n var predicate = getQueryPredicate(query, outputCtx);\n // e.g. r3.Q(null, somePredicate, false) or r3.Q(null, ['div'], false)\n var parameters = [\n /* memoryIndex */ literal(null, INFERRED_TYPE),\n /* predicate */ predicate,\n /* descend */ literal(query.descendants)\n ];\n if (query.read) {\n parameters.push(outputCtx.importExpr(query.read.identifier.reference));\n }\n queryDefinitions.push(importExpr(Identifiers$1.query).callFn(parameters));\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (queries_1_1 && !queries_1_1.done && (_d = queries_1.return)) _d.call(queries_1);\n }\n finally { if (e_9) throw e_9.error; }\n }\n var createInstance = new InstantiateExpr(outputCtx.importExpr(type.reference), args);\n var result = queryDefinitions.length > 0 ? literalArr(__spread([createInstance], queryDefinitions)) :\n createInstance;\n return fn([], [new ReturnStatement(result)], INFERRED_TYPE, null, type.reference.name ? type.reference.name + \"_Factory\" : null);\n var e_8, _c, e_9, _d;\n}\nfunction extractFlags(dependency) {\n var flags = 0;\n if (dependency.isHost) {\n flags |= 1 /* Host */;\n }\n if (dependency.isOptional) {\n flags |= 8 /* Optional */;\n }\n if (dependency.isSelf) {\n flags |= 2 /* Self */;\n }\n if (dependency.isSkipSelf) {\n flags |= 4 /* SkipSelf */;\n }\n if (dependency.isValue) {\n unsupported('value dependencies');\n }\n return flags;\n}\n/**\n * Remove trailing null nodes as they are implied.\n */\nfunction trimTrailingNulls(parameters) {\n while (isNull(parameters[parameters.length - 1])) {\n parameters.pop();\n }\n return parameters;\n}\n// Turn a directive selector into an R3-compatible selector for directive def\nfunction createDirectiveSelector(selector) {\n return asLiteral(parseSelectorToR3Selector(selector));\n}\nfunction createHostAttributesArray(directiveMetadata, outputCtx) {\n var values = [];\n var attributes = directiveMetadata.hostAttributes;\n try {\n for (var _a = __values(Object.getOwnPropertyNames(attributes)), _b = _a.next(); !_b.done; _b = _a.next()) {\n var key = _b.value;\n var value = attributes[key];\n values.push(literal(key), literal(value));\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_10) throw e_10.error; }\n }\n if (values.length > 0) {\n return outputCtx.constantPool.getConstLiteral(literalArr(values));\n }\n return null;\n var e_10, _c;\n}\n// Return a host binding function or null if one is not necessary.\nfunction createHostBindingsFunction(directiveMetadata, outputCtx, bindingParser) {\n var statements = [];\n var temporary = function () {\n var declared = false;\n return function () {\n if (!declared) {\n statements.push(new DeclareVarStmt(TEMPORARY_NAME, undefined, DYNAMIC_TYPE));\n declared = true;\n }\n return variable(TEMPORARY_NAME);\n };\n }();\n var hostBindingSourceSpan = typeSourceSpan(directiveMetadata.isComponent ? 'Component' : 'Directive', directiveMetadata.type);\n // Calculate the queries\n for (var index = 0; index < directiveMetadata.queries.length; index++) {\n var query = directiveMetadata.queries[index];\n // e.g. r3.qR(tmp = r3.ld(dirIndex)[1]) && (r3.ld(dirIndex)[0].someDir = tmp);\n var getDirectiveMemory = importExpr(Identifiers$1.load).callFn([variable('dirIndex')]);\n // The query list is at the query index + 1 because the directive itself is in slot 0.\n var getQueryList = getDirectiveMemory.key(literal(index + 1));\n var assignToTemporary = temporary().set(getQueryList);\n var callQueryRefresh = importExpr(Identifiers$1.queryRefresh).callFn([assignToTemporary]);\n var updateDirective = getDirectiveMemory.key(literal(0, INFERRED_TYPE))\n .prop(query.propertyName)\n .set(query.first ? temporary().prop('first') : temporary());\n var andExpression = callQueryRefresh.and(updateDirective);\n statements.push(andExpression.toStmt());\n }\n var directiveSummary = directiveMetadata.toSummary();\n // Calculate the host property bindings\n var bindings = bindingParser.createBoundHostProperties(directiveSummary, hostBindingSourceSpan);\n var bindingContext = importExpr(Identifiers$1.load).callFn([variable('dirIndex')]);\n if (bindings) {\n try {\n for (var bindings_1 = __values(bindings), bindings_1_1 = bindings_1.next(); !bindings_1_1.done; bindings_1_1 = bindings_1.next()) {\n var binding = bindings_1_1.value;\n var bindingExpr = convertPropertyBinding(null, bindingContext, binding.expression, 'b', BindingForm.TrySimple, function () { return error('Unexpected interpolation'); });\n statements.push.apply(statements, __spread(bindingExpr.stmts));\n statements.push(importExpr(Identifiers$1.elementProperty)\n .callFn([\n variable('elIndex'), literal(binding.name),\n importExpr(Identifiers$1.bind).callFn([bindingExpr.currValExpr])\n ])\n .toStmt());\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (bindings_1_1 && !bindings_1_1.done && (_a = bindings_1.return)) _a.call(bindings_1);\n }\n finally { if (e_11) throw e_11.error; }\n }\n }\n // Calculate host event bindings\n var eventBindings = bindingParser.createDirectiveHostEventAsts(directiveSummary, hostBindingSourceSpan);\n if (eventBindings) {\n try {\n for (var eventBindings_1 = __values(eventBindings), eventBindings_1_1 = eventBindings_1.next(); !eventBindings_1_1.done; eventBindings_1_1 = eventBindings_1.next()) {\n var binding = eventBindings_1_1.value;\n var bindingExpr = convertActionBinding(null, bindingContext, binding.handler, 'b', function () { return error('Unexpected interpolation'); });\n var bindingName = binding.name && sanitizeIdentifier(binding.name);\n var typeName = identifierName(directiveMetadata.type);\n var functionName = typeName && bindingName ? typeName + \"_\" + bindingName + \"_HostBindingHandler\" : null;\n var handler = fn([new FnParam('$event', DYNAMIC_TYPE)], __spread(bindingExpr.stmts, [new ReturnStatement(bindingExpr.allowDefault)]), INFERRED_TYPE, null, functionName);\n statements.push(importExpr(Identifiers$1.listener).callFn([literal(binding.name), handler]).toStmt());\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (eventBindings_1_1 && !eventBindings_1_1.done && (_b = eventBindings_1.return)) _b.call(eventBindings_1);\n }\n finally { if (e_12) throw e_12.error; }\n }\n }\n if (statements.length > 0) {\n var typeName = directiveMetadata.type.reference.name;\n return fn([new FnParam('dirIndex', NUMBER_TYPE), new FnParam('elIndex', NUMBER_TYPE)], statements, INFERRED_TYPE, null, typeName ? typeName + \"_HostBindings\" : null);\n }\n return null;\n var e_11, _a, e_12, _b;\n}\nfunction conditionallyCreateMapObjectLiteral(keys, outputCtx) {\n if (Object.getOwnPropertyNames(keys).length > 0) {\n return mapToExpression(keys);\n }\n return null;\n}\nvar ValueConverter = /** @class */ (function (_super) {\n __extends(ValueConverter, _super);\n function ValueConverter(outputCtx, allocateSlot, definePipe) {\n var _this = _super.call(this) || this;\n _this.outputCtx = outputCtx;\n _this.allocateSlot = allocateSlot;\n _this.definePipe = definePipe;\n _this.pipeSlots = new Map();\n return _this;\n }\n // AstMemoryEfficientTransformer\n ValueConverter.prototype.visitPipe = function (pipe, context) {\n // Allocate a slot to create the pipe\n var slot = this.allocateSlot();\n var slotPseudoLocal = \"PIPE:\" + slot;\n var target = new PropertyRead(pipe.span, new ImplicitReceiver(pipe.span), slotPseudoLocal);\n var bindingId = pipeBinding(pipe.args);\n this.definePipe(pipe.name, slotPseudoLocal, slot, importExpr(bindingId));\n var value = pipe.exp.visit(this);\n var args = this.visitAll(pipe.args);\n return new FunctionCall(pipe.span, target, __spread([new LiteralPrimitive(pipe.span, slot), value], args));\n };\n ValueConverter.prototype.visitLiteralArray = function (array, context) {\n var _this = this;\n return new BuiltinFunctionCall(array.span, this.visitAll(array.expressions), function (values) {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values. Otherwise, just return an literal array that contains the values.\n var literal$$1 = literalArr(values);\n return values.every(function (a) { return a.isConstant(); }) ?\n _this.outputCtx.constantPool.getConstLiteral(literal$$1, true) :\n getLiteralFactory(_this.outputCtx, literal$$1);\n });\n };\n ValueConverter.prototype.visitLiteralMap = function (map, context) {\n var _this = this;\n return new BuiltinFunctionCall(map.span, this.visitAll(map.values), function (values) {\n // If the literal has calculated (non-literal) elements transform it into\n // calls to literal factories that compose the literal and will cache intermediate\n // values. Otherwise, just return an literal array that contains the values.\n var literal$$1 = literalMap(values.map(function (value, index) { return ({ key: map.keys[index].key, value: value, quoted: map.keys[index].quoted }); }));\n return values.every(function (a) { return a.isConstant(); }) ?\n _this.outputCtx.constantPool.getConstLiteral(literal$$1, true) :\n getLiteralFactory(_this.outputCtx, literal$$1);\n });\n };\n return ValueConverter;\n}(AstMemoryEfficientTransformer));\nfunction invalid$1(arg) {\n throw new Error(\"Invalid state: Visitor \" + this.constructor.name + \" doesn't handle \" + undefined);\n}\nvar ContentProjectionVisitor = /** @class */ (function (_super) {\n __extends(ContentProjectionVisitor, _super);\n function ContentProjectionVisitor(projectionMap, ngContentSelectors) {\n var _this = _super.call(this) || this;\n _this.projectionMap = projectionMap;\n _this.ngContentSelectors = ngContentSelectors;\n _this.index = 1;\n return _this;\n }\n ContentProjectionVisitor.prototype.visitNgContent = function (ngContent) {\n var selector = this.ngContentSelectors[ngContent.index];\n if (selector == null) {\n error(\"could not find selector for index \" + ngContent.index + \" in \" + ngContent);\n }\n if (!selector || selector === '*') {\n this.projectionMap.set(ngContent, { index: 0 });\n }\n else {\n this.projectionMap.set(ngContent, { index: this.index++, selector: selector });\n }\n };\n return ContentProjectionVisitor;\n}(RecursiveTemplateAstVisitor));\nfunction getContentProjection(nodes, ngContentSelectors) {\n var projectIndexMap = new Map();\n var visitor = new ContentProjectionVisitor(projectIndexMap, ngContentSelectors);\n templateVisitAll(visitor, nodes);\n return projectIndexMap;\n}\nfunction parserSelectorToSimpleSelector(selector) {\n var classes = selector.classNames && selector.classNames.length ? __spread([8 /* CLASS */], selector.classNames) :\n [];\n var elementName = selector.element && selector.element !== '*' ? selector.element : '';\n return __spread([elementName], selector.attrs, classes);\n}\nfunction parserSelectorToNegativeSelector(selector) {\n var classes = selector.classNames && selector.classNames.length ? __spread([8 /* CLASS */], selector.classNames) :\n [];\n if (selector.element) {\n return __spread([\n 1 /* NOT */ | 4 /* ELEMENT */, selector.element\n ], selector.attrs, classes);\n }\n else if (selector.attrs.length) {\n return __spread([1 /* NOT */ | 2 /* ATTRIBUTE */], selector.attrs, classes);\n }\n else {\n return selector.classNames && selector.classNames.length ? __spread([1 /* NOT */ | 8 /* CLASS */], selector.classNames) :\n [];\n }\n}\nfunction parserSelectorToR3Selector(selector) {\n var positive = parserSelectorToSimpleSelector(selector);\n var negative = selector.notSelectors && selector.notSelectors.length ?\n selector.notSelectors.map(function (notSelector) { return parserSelectorToNegativeSelector(notSelector); }) :\n [];\n return positive.concat.apply(positive, __spread(negative));\n}\nfunction parseSelectorToR3Selector(selector) {\n var selectors = CssSelector.parse(selector);\n return selectors.map(parserSelectorToR3Selector);\n}\nfunction asLiteral(value) {\n if (Array.isArray(value)) {\n return literalArr(value.map(asLiteral));\n }\n return literal(value, INFERRED_TYPE);\n}\nfunction mapToExpression(map, quoted) {\n if (quoted === void 0) { quoted = false; }\n return literalMap(Object.getOwnPropertyNames(map).map(function (key) { return ({ key: key, quoted: quoted, value: asLiteral(map[key]) }); }));\n}\n// Parse i18n metas like:\n// - \"@@id\",\n// - \"description[@@id]\",\n// - \"meaning|description[@@id]\"\nfunction parseI18nMeta(i18n) {\n var meaning;\n var description;\n var id;\n if (i18n) {\n // TODO(vicb): figure out how to force a message ID with closure ?\n var idIndex = i18n.indexOf(ID_SEPARATOR$1);\n var descIndex = i18n.indexOf(MEANING_SEPARATOR$1);\n var meaningAndDesc = void 0;\n _a = __read((idIndex > -1) ? [i18n.slice(0, idIndex), i18n.slice(idIndex + 2)] : [i18n, ''], 2), meaningAndDesc = _a[0], id = _a[1];\n _b = __read((descIndex > -1) ?\n [meaningAndDesc.slice(0, descIndex), meaningAndDesc.slice(descIndex + 1)] :\n ['', meaningAndDesc], 2), meaning = _b[0], description = _b[1];\n }\n return { description: description, id: id, meaning: meaning };\n var _a, _b;\n}\nvar _a;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Write a pipe definition to the output context.\n */\nfunction compilePipe(outputCtx, pipe, reflector, mode) {\n var definitionMapValues = [];\n // e.g. `name: 'myPipe'`\n definitionMapValues.push({ key: 'name', value: literal(pipe.name), quoted: false });\n // e.g. `type: MyPipe`\n definitionMapValues.push({ key: 'type', value: outputCtx.importExpr(pipe.type.reference), quoted: false });\n // e.g. factory: function MyPipe_Factory() { return new MyPipe(); },\n var templateFactory = createFactory(pipe.type, outputCtx, reflector, []);\n definitionMapValues.push({ key: 'factory', value: templateFactory, quoted: false });\n // e.g. pure: true\n if (pipe.pure) {\n definitionMapValues.push({ key: 'pure', value: literal(true), quoted: false });\n }\n var className = identifierName(pipe.type);\n className || error(\"Cannot resolve the name of \" + pipe.type);\n var definitionField = outputCtx.constantPool.propertyNameOf(3 /* Pipe */);\n var definitionFunction = importExpr(Identifiers$1.definePipe).callFn([literalMap(definitionMapValues)]);\n if (mode === 0 /* PartialClass */) {\n outputCtx.statements.push(new ClassStmt(\n /* name */ className, \n /* parent */ null, \n /* fields */ [new ClassField(\n /* name */ definitionField, \n /* type */ INFERRED_TYPE, \n /* modifiers */ [StmtModifier.Static], \n /* initializer */ definitionFunction)], \n /* getters */ [], \n /* constructorMethod */ new ClassMethod(null, [], []), \n /* methods */ []));\n }\n else {\n // Create back-patch definition.\n var classReference = outputCtx.importExpr(pipe.type.reference);\n // Create the back-patch statement\n outputCtx.statements.push(new CommentStmt(BUILD_OPTIMIZER_COLOCATE), classReference.prop(definitionField).set(definitionFunction).toStmt());\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 GeneratedFile = /** @class */ (function () {\n function GeneratedFile(srcFileUrl, genFileUrl, sourceOrStmts) {\n this.srcFileUrl = srcFileUrl;\n this.genFileUrl = genFileUrl;\n if (typeof sourceOrStmts === 'string') {\n this.source = sourceOrStmts;\n this.stmts = null;\n }\n else {\n this.source = null;\n this.stmts = sourceOrStmts;\n }\n }\n GeneratedFile.prototype.isEquivalent = function (other) {\n if (this.genFileUrl !== other.genFileUrl) {\n return false;\n }\n if (this.source) {\n return this.source === other.source;\n }\n if (other.stmts == null) {\n return false;\n }\n // Note: the constructor guarantees that if this.source is not filled,\n // then this.stmts is.\n return areAllEquivalent(this.stmts, other.stmts);\n };\n return GeneratedFile;\n}());\nfunction toTypeScript(file, preamble) {\n if (preamble === void 0) { preamble = ''; }\n if (!file.stmts) {\n throw new Error(\"Illegal state: No stmts present on GeneratedFile \" + file.genFileUrl);\n }\n return new TypeScriptEmitter().emitStatements(file.genFileUrl, file.stmts, preamble);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 listLazyRoutes(moduleMeta, reflector) {\n var allLazyRoutes = [];\n try {\n for (var _a = __values(moduleMeta.transitiveModule.providers), _b = _a.next(); !_b.done; _b = _a.next()) {\n var _c = _b.value, provider = _c.provider, module = _c.module;\n if (tokenReference(provider.token) === reflector.ROUTES) {\n var loadChildren = _collectLoadChildren(provider.useValue);\n try {\n for (var loadChildren_1 = __values(loadChildren), loadChildren_1_1 = loadChildren_1.next(); !loadChildren_1_1.done; loadChildren_1_1 = loadChildren_1.next()) {\n var route = loadChildren_1_1.value;\n allLazyRoutes.push(parseLazyRoute(route, reflector, module.reference));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (loadChildren_1_1 && !loadChildren_1_1.done && (_d = loadChildren_1.return)) _d.call(loadChildren_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_e = _a.return)) _e.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return allLazyRoutes;\n var e_2, _e, e_1, _d;\n}\nfunction _collectLoadChildren(routes, target) {\n if (target === void 0) { target = []; }\n if (typeof routes === 'string') {\n target.push(routes);\n }\n else if (Array.isArray(routes)) {\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var route = routes_1_1.value;\n _collectLoadChildren(route, target);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n else if (routes.loadChildren) {\n _collectLoadChildren(routes.loadChildren, target);\n }\n else if (routes.children) {\n _collectLoadChildren(routes.children, target);\n }\n return target;\n var e_3, _a;\n}\nfunction parseLazyRoute(route, reflector, module) {\n var _a = __read(route.split('#'), 2), routePath = _a[0], routeName = _a[1];\n var referencedModule = reflector.resolveExternalReference({\n moduleName: routePath,\n name: routeName,\n }, module ? module.filePath : undefined);\n return { route: route, module: module || referencedModule, referencedModule: referencedModule };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TS = /^(?!.*\\.d\\.ts$).*\\.ts$/;\nvar ResolvedStaticSymbol = /** @class */ (function () {\n function ResolvedStaticSymbol(symbol, metadata) {\n this.symbol = symbol;\n this.metadata = metadata;\n }\n return ResolvedStaticSymbol;\n}());\nvar SUPPORTED_SCHEMA_VERSION = 4;\n/**\n * This class is responsible for loading metadata per symbol,\n * and normalizing references between symbols.\n *\n * Internally, it only uses symbols without members,\n * and deduces the values for symbols with members based\n * on these symbols.\n */\nvar StaticSymbolResolver = /** @class */ (function () {\n function StaticSymbolResolver(host, staticSymbolCache, summaryResolver, errorRecorder) {\n this.host = host;\n this.staticSymbolCache = staticSymbolCache;\n this.summaryResolver = summaryResolver;\n this.errorRecorder = errorRecorder;\n this.metadataCache = new Map();\n // Note: this will only contain StaticSymbols without members!\n this.resolvedSymbols = new Map();\n this.resolvedFilePaths = new Set();\n // Note: this will only contain StaticSymbols without members!\n this.importAs = new Map();\n this.symbolResourcePaths = new Map();\n this.symbolFromFile = new Map();\n this.knownFileNameToModuleNames = new Map();\n }\n StaticSymbolResolver.prototype.resolveSymbol = function (staticSymbol) {\n if (staticSymbol.members.length > 0) {\n return this._resolveSymbolMembers(staticSymbol);\n }\n // Note: always ask for a summary first,\n // as we might have read shallow metadata via a .d.ts file\n // for the symbol.\n var resultFromSummary = this._resolveSymbolFromSummary(staticSymbol);\n if (resultFromSummary) {\n return resultFromSummary;\n }\n var resultFromCache = this.resolvedSymbols.get(staticSymbol);\n if (resultFromCache) {\n return resultFromCache;\n }\n // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n // have summaries, only .d.ts files. So we always need to check both, the summary\n // and metadata.\n this._createSymbolsOf(staticSymbol.filePath);\n return this.resolvedSymbols.get(staticSymbol);\n };\n /**\n * getImportAs produces a symbol that can be used to import the given symbol.\n * The import might be different than the symbol if the symbol is exported from\n * a library with a summary; in which case we want to import the symbol from the\n * ngfactory re-export instead of directly to avoid introducing a direct dependency\n * on an otherwise indirect dependency.\n *\n * @param staticSymbol the symbol for which to generate a import symbol\n */\n StaticSymbolResolver.prototype.getImportAs = function (staticSymbol, useSummaries) {\n if (useSummaries === void 0) { useSummaries = true; }\n if (staticSymbol.members.length) {\n var baseSymbol = this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name);\n var baseImportAs = this.getImportAs(baseSymbol, useSummaries);\n return baseImportAs ?\n this.getStaticSymbol(baseImportAs.filePath, baseImportAs.name, staticSymbol.members) :\n null;\n }\n var summarizedFileName = stripSummaryForJitFileSuffix(staticSymbol.filePath);\n if (summarizedFileName !== staticSymbol.filePath) {\n var summarizedName = stripSummaryForJitNameSuffix(staticSymbol.name);\n var baseSymbol = this.getStaticSymbol(summarizedFileName, summarizedName, staticSymbol.members);\n var baseImportAs = this.getImportAs(baseSymbol, useSummaries);\n return baseImportAs ?\n this.getStaticSymbol(summaryForJitFileName(baseImportAs.filePath), summaryForJitName(baseImportAs.name), baseSymbol.members) :\n null;\n }\n var result = (useSummaries && this.summaryResolver.getImportAs(staticSymbol)) || null;\n if (!result) {\n result = this.importAs.get(staticSymbol);\n }\n return result;\n };\n /**\n * getResourcePath produces the path to the original location of the symbol and should\n * be used to determine the relative location of resource references recorded in\n * symbol metadata.\n */\n StaticSymbolResolver.prototype.getResourcePath = function (staticSymbol) {\n return this.symbolResourcePaths.get(staticSymbol) || staticSymbol.filePath;\n };\n /**\n * getTypeArity returns the number of generic type parameters the given symbol\n * has. If the symbol is not a type the result is null.\n */\n StaticSymbolResolver.prototype.getTypeArity = function (staticSymbol) {\n // If the file is a factory/ngsummary file, don't resolve the symbol as doing so would\n // cause the metadata for an factory/ngsummary file to be loaded which doesn't exist.\n // All references to generated classes must include the correct arity whenever\n // generating code.\n if (isGeneratedFile(staticSymbol.filePath)) {\n return null;\n }\n var resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(staticSymbol));\n while (resolvedSymbol && resolvedSymbol.metadata instanceof StaticSymbol) {\n resolvedSymbol = unwrapResolvedMetadata(this.resolveSymbol(resolvedSymbol.metadata));\n }\n return (resolvedSymbol && resolvedSymbol.metadata && resolvedSymbol.metadata.arity) || null;\n };\n StaticSymbolResolver.prototype.getKnownModuleName = function (filePath) {\n return this.knownFileNameToModuleNames.get(filePath) || null;\n };\n StaticSymbolResolver.prototype.recordImportAs = function (sourceSymbol, targetSymbol) {\n sourceSymbol.assertNoMembers();\n targetSymbol.assertNoMembers();\n this.importAs.set(sourceSymbol, targetSymbol);\n };\n StaticSymbolResolver.prototype.recordModuleNameForFileName = function (fileName, moduleName) {\n this.knownFileNameToModuleNames.set(fileName, moduleName);\n };\n /**\n * Invalidate all information derived from the given file.\n *\n * @param fileName the file to invalidate\n */\n StaticSymbolResolver.prototype.invalidateFile = function (fileName) {\n this.metadataCache.delete(fileName);\n this.resolvedFilePaths.delete(fileName);\n var symbols = this.symbolFromFile.get(fileName);\n if (symbols) {\n this.symbolFromFile.delete(fileName);\n try {\n for (var symbols_1 = __values(symbols), symbols_1_1 = symbols_1.next(); !symbols_1_1.done; symbols_1_1 = symbols_1.next()) {\n var symbol = symbols_1_1.value;\n this.resolvedSymbols.delete(symbol);\n this.importAs.delete(symbol);\n this.symbolResourcePaths.delete(symbol);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (symbols_1_1 && !symbols_1_1.done && (_a = symbols_1.return)) _a.call(symbols_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n var e_1, _a;\n };\n /* @internal */\n StaticSymbolResolver.prototype.ignoreErrorsFor = function (cb) {\n var recorder = this.errorRecorder;\n this.errorRecorder = function () { };\n try {\n return cb();\n }\n finally {\n this.errorRecorder = recorder;\n }\n };\n StaticSymbolResolver.prototype._resolveSymbolMembers = function (staticSymbol) {\n var members = staticSymbol.members;\n var baseResolvedSymbol = this.resolveSymbol(this.getStaticSymbol(staticSymbol.filePath, staticSymbol.name));\n if (!baseResolvedSymbol) {\n return null;\n }\n var baseMetadata = unwrapResolvedMetadata(baseResolvedSymbol.metadata);\n if (baseMetadata instanceof StaticSymbol) {\n return new ResolvedStaticSymbol(staticSymbol, this.getStaticSymbol(baseMetadata.filePath, baseMetadata.name, members));\n }\n else if (baseMetadata && baseMetadata.__symbolic === 'class') {\n if (baseMetadata.statics && members.length === 1) {\n return new ResolvedStaticSymbol(staticSymbol, baseMetadata.statics[members[0]]);\n }\n }\n else {\n var value = baseMetadata;\n for (var i = 0; i < members.length && value; i++) {\n value = value[members[i]];\n }\n return new ResolvedStaticSymbol(staticSymbol, value);\n }\n return null;\n };\n StaticSymbolResolver.prototype._resolveSymbolFromSummary = function (staticSymbol) {\n var summary = this.summaryResolver.resolveSummary(staticSymbol);\n return summary ? new ResolvedStaticSymbol(staticSymbol, summary.metadata) : null;\n };\n /**\n * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n * All types passed to the StaticResolver should be pseudo-types returned by this method.\n *\n * @param declarationFile the absolute path of the file where the symbol is declared\n * @param name the name of the type.\n * @param members a symbol for a static member of the named type\n */\n StaticSymbolResolver.prototype.getStaticSymbol = function (declarationFile, name, members) {\n return this.staticSymbolCache.get(declarationFile, name, members);\n };\n /**\n * hasDecorators checks a file's metadata for the presence of decorators without evaluating the\n * metadata.\n *\n * @param filePath the absolute path to examine for decorators.\n * @returns true if any class in the file has a decorator.\n */\n StaticSymbolResolver.prototype.hasDecorators = function (filePath) {\n var metadata = this.getModuleMetadata(filePath);\n if (metadata['metadata']) {\n return Object.keys(metadata['metadata']).some(function (metadataKey) {\n var entry = metadata['metadata'][metadataKey];\n return entry && entry.__symbolic === 'class' && entry.decorators;\n });\n }\n return false;\n };\n StaticSymbolResolver.prototype.getSymbolsOf = function (filePath) {\n var summarySymbols = this.summaryResolver.getSymbolsOf(filePath);\n if (summarySymbols) {\n return summarySymbols;\n }\n // Note: Some users use libraries that were not compiled with ngc, i.e. they don't\n // have summaries, only .d.ts files, but `summaryResolver.isLibraryFile` returns true.\n this._createSymbolsOf(filePath);\n var metadataSymbols = [];\n this.resolvedSymbols.forEach(function (resolvedSymbol) {\n if (resolvedSymbol.symbol.filePath === filePath) {\n metadataSymbols.push(resolvedSymbol.symbol);\n }\n });\n return metadataSymbols;\n };\n StaticSymbolResolver.prototype._createSymbolsOf = function (filePath) {\n var _this = this;\n if (this.resolvedFilePaths.has(filePath)) {\n return;\n }\n this.resolvedFilePaths.add(filePath);\n var resolvedSymbols = [];\n var metadata = this.getModuleMetadata(filePath);\n if (metadata['importAs']) {\n // Index bundle indices should use the importAs module name defined\n // in the bundle.\n this.knownFileNameToModuleNames.set(filePath, metadata['importAs']);\n }\n // handle the symbols in one of the re-export location\n if (metadata['exports']) {\n var _loop_1 = function (moduleExport) {\n // handle the symbols in the list of explicitly re-exported symbols.\n if (moduleExport.export) {\n moduleExport.export.forEach(function (exportSymbol) {\n var symbolName;\n if (typeof exportSymbol === 'string') {\n symbolName = exportSymbol;\n }\n else {\n symbolName = exportSymbol.as;\n }\n symbolName = unescapeIdentifier(symbolName);\n var symName = symbolName;\n if (typeof exportSymbol !== 'string') {\n symName = unescapeIdentifier(exportSymbol.name);\n }\n var resolvedModule = _this.resolveModule(moduleExport.from, filePath);\n if (resolvedModule) {\n var targetSymbol = _this.getStaticSymbol(resolvedModule, symName);\n var sourceSymbol = _this.getStaticSymbol(filePath, symbolName);\n resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));\n }\n });\n }\n else {\n // handle the symbols via export * directives.\n var resolvedModule = this_1.resolveModule(moduleExport.from, filePath);\n if (resolvedModule) {\n var nestedExports = this_1.getSymbolsOf(resolvedModule);\n nestedExports.forEach(function (targetSymbol) {\n var sourceSymbol = _this.getStaticSymbol(filePath, targetSymbol.name);\n resolvedSymbols.push(_this.createExport(sourceSymbol, targetSymbol));\n });\n }\n }\n };\n var this_1 = this;\n try {\n for (var _a = __values(metadata['exports']), _b = _a.next(); !_b.done; _b = _a.next()) {\n var moduleExport = _b.value;\n _loop_1(moduleExport);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n // handle the actual metadata. Has to be after the exports\n // as there migth be collisions in the names, and we want the symbols\n // of the current module to win ofter reexports.\n if (metadata['metadata']) {\n // handle direct declarations of the symbol\n var topLevelSymbolNames_1 = new Set(Object.keys(metadata['metadata']).map(unescapeIdentifier));\n var origins_1 = metadata['origins'] || {};\n Object.keys(metadata['metadata']).forEach(function (metadataKey) {\n var symbolMeta = metadata['metadata'][metadataKey];\n var name = unescapeIdentifier(metadataKey);\n var symbol = _this.getStaticSymbol(filePath, name);\n var origin = origins_1.hasOwnProperty(metadataKey) && origins_1[metadataKey];\n if (origin) {\n // If the symbol is from a bundled index, use the declaration location of the\n // symbol so relative references (such as './my.html') will be calculated\n // correctly.\n var originFilePath = _this.resolveModule(origin, filePath);\n if (!originFilePath) {\n _this.reportError(new Error(\"Couldn't resolve original symbol for \" + origin + \" from \" + filePath));\n }\n else {\n _this.symbolResourcePaths.set(symbol, originFilePath);\n }\n }\n resolvedSymbols.push(_this.createResolvedSymbol(symbol, filePath, topLevelSymbolNames_1, symbolMeta));\n });\n }\n resolvedSymbols.forEach(function (resolvedSymbol) { return _this.resolvedSymbols.set(resolvedSymbol.symbol, resolvedSymbol); });\n this.symbolFromFile.set(filePath, resolvedSymbols.map(function (resolvedSymbol) { return resolvedSymbol.symbol; }));\n var e_2, _c;\n };\n StaticSymbolResolver.prototype.createResolvedSymbol = function (sourceSymbol, topLevelPath, topLevelSymbolNames, metadata) {\n var _this = this;\n // For classes that don't have Angular summaries / metadata,\n // we only keep their arity, but nothing else\n // (e.g. their constructor parameters).\n // We do this to prevent introducing deep imports\n // as we didn't generate .ngfactory.ts files with proper reexports.\n var isTsFile = TS.test(sourceSymbol.filePath);\n if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) && !isTsFile && metadata &&\n metadata['__symbolic'] === 'class') {\n var transformedMeta_1 = { __symbolic: 'class', arity: metadata.arity };\n return new ResolvedStaticSymbol(sourceSymbol, transformedMeta_1);\n }\n var _originalFileMemo;\n var getOriginalName = function () {\n if (!_originalFileMemo) {\n // Guess what hte original file name is from the reference. If it has a `.d.ts` extension\n // replace it with `.ts`. If it already has `.ts` just leave it in place. If it doesn't have\n // .ts or .d.ts, append `.ts'. Also, if it is in `node_modules`, trim the `node_module`\n // location as it is not important to finding the file.\n _originalFileMemo =\n _this.host.getOutputName(topLevelPath.replace(/((\\.ts)|(\\.d\\.ts)|)$/, '.ts')\n .replace(/^.*node_modules[/\\\\]/, ''));\n }\n return _originalFileMemo;\n };\n var self = this;\n var ReferenceTransformer = /** @class */ (function (_super) {\n __extends(ReferenceTransformer, _super);\n function ReferenceTransformer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ReferenceTransformer.prototype.visitStringMap = function (map, functionParams) {\n var symbolic = map['__symbolic'];\n if (symbolic === 'function') {\n var oldLen = functionParams.length;\n functionParams.push.apply(functionParams, __spread((map['parameters'] || [])));\n var result = _super.prototype.visitStringMap.call(this, map, functionParams);\n functionParams.length = oldLen;\n return result;\n }\n else if (symbolic === 'reference') {\n var module = map['module'];\n var name_1 = map['name'] ? unescapeIdentifier(map['name']) : map['name'];\n if (!name_1) {\n return null;\n }\n var filePath = void 0;\n if (module) {\n filePath = self.resolveModule(module, sourceSymbol.filePath);\n if (!filePath) {\n return {\n __symbolic: 'error',\n message: \"Could not resolve \" + module + \" relative to \" + sourceSymbol.filePath + \".\",\n line: map.line,\n character: map.character,\n fileName: getOriginalName()\n };\n }\n return {\n __symbolic: 'resolved',\n symbol: self.getStaticSymbol(filePath, name_1),\n line: map.line,\n character: map.character,\n fileName: getOriginalName()\n };\n }\n else if (functionParams.indexOf(name_1) >= 0) {\n // reference to a function parameter\n return { __symbolic: 'reference', name: name_1 };\n }\n else {\n if (topLevelSymbolNames.has(name_1)) {\n return self.getStaticSymbol(topLevelPath, name_1);\n }\n // ambient value\n \n }\n }\n else if (symbolic === 'error') {\n return __assign({}, map, { fileName: getOriginalName() });\n }\n else {\n return _super.prototype.visitStringMap.call(this, map, functionParams);\n }\n };\n return ReferenceTransformer;\n }(ValueTransformer));\n var transformedMeta = visitValue(metadata, new ReferenceTransformer(), []);\n var unwrappedTransformedMeta = unwrapResolvedMetadata(transformedMeta);\n if (unwrappedTransformedMeta instanceof StaticSymbol) {\n return this.createExport(sourceSymbol, unwrappedTransformedMeta);\n }\n return new ResolvedStaticSymbol(sourceSymbol, transformedMeta);\n };\n StaticSymbolResolver.prototype.createExport = function (sourceSymbol, targetSymbol) {\n sourceSymbol.assertNoMembers();\n targetSymbol.assertNoMembers();\n if (this.summaryResolver.isLibraryFile(sourceSymbol.filePath) &&\n this.summaryResolver.isLibraryFile(targetSymbol.filePath)) {\n // This case is for an ng library importing symbols from a plain ts library\n // transitively.\n // Note: We rely on the fact that we discover symbols in the direction\n // from source files to library files\n this.importAs.set(targetSymbol, this.getImportAs(sourceSymbol) || sourceSymbol);\n }\n return new ResolvedStaticSymbol(sourceSymbol, targetSymbol);\n };\n StaticSymbolResolver.prototype.reportError = function (error$$1, context, path) {\n if (this.errorRecorder) {\n this.errorRecorder(error$$1, (context && context.filePath) || path);\n }\n else {\n throw error$$1;\n }\n };\n /**\n * @param module an absolute path to a module file.\n */\n StaticSymbolResolver.prototype.getModuleMetadata = function (module) {\n var moduleMetadata = this.metadataCache.get(module);\n if (!moduleMetadata) {\n var moduleMetadatas = this.host.getMetadataFor(module);\n if (moduleMetadatas) {\n var maxVersion_1 = -1;\n moduleMetadatas.forEach(function (md) {\n if (md && md['version'] > maxVersion_1) {\n maxVersion_1 = md['version'];\n moduleMetadata = md;\n }\n });\n }\n if (!moduleMetadata) {\n moduleMetadata =\n { __symbolic: 'module', version: SUPPORTED_SCHEMA_VERSION, module: module, metadata: {} };\n }\n if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION) {\n var errorMessage = moduleMetadata['version'] == 2 ?\n \"Unsupported metadata version \" + moduleMetadata['version'] + \" for module \" + module + \". This module should be compiled with a newer version of ngc\" :\n \"Metadata version mismatch for module \" + module + \", found version \" + moduleMetadata['version'] + \", expected \" + SUPPORTED_SCHEMA_VERSION;\n this.reportError(new Error(errorMessage));\n }\n this.metadataCache.set(module, moduleMetadata);\n }\n return moduleMetadata;\n };\n StaticSymbolResolver.prototype.getSymbolByModule = function (module, symbolName, containingFile) {\n var filePath = this.resolveModule(module, containingFile);\n if (!filePath) {\n this.reportError(new Error(\"Could not resolve module \" + module + (containingFile ? ' relative to ' +\n containingFile : '')));\n return this.getStaticSymbol(\"ERROR:\" + module, symbolName);\n }\n return this.getStaticSymbol(filePath, symbolName);\n };\n StaticSymbolResolver.prototype.resolveModule = function (module, containingFile) {\n try {\n return this.host.moduleNameToFileName(module, containingFile);\n }\n catch (e) {\n console.error(\"Could not resolve module '\" + module + \"' relative to file \" + containingFile);\n this.reportError(e, undefined, containingFile);\n }\n return null;\n };\n return StaticSymbolResolver;\n}());\n// Remove extra underscore from escaped identifier.\n// See https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts\nfunction unescapeIdentifier(identifier) {\n return identifier.startsWith('___') ? identifier.substr(1) : identifier;\n}\nfunction unwrapResolvedMetadata(metadata) {\n if (metadata && metadata.__symbolic === 'resolved') {\n return metadata.symbol;\n }\n return metadata;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 serializeSummaries(srcFileName, forJitCtx, summaryResolver, symbolResolver, symbols, types) {\n var toJsonSerializer = new ToJsonSerializer(symbolResolver, summaryResolver, srcFileName);\n // for symbols, we use everything except for the class metadata itself\n // (we keep the statics though), as the class metadata is contained in the\n // CompileTypeSummary.\n symbols.forEach(function (resolvedSymbol) { return toJsonSerializer.addSummary({ symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata }); });\n // Add type summaries.\n types.forEach(function (_a) {\n var summary = _a.summary, metadata = _a.metadata;\n toJsonSerializer.addSummary({ symbol: summary.type.reference, metadata: undefined, type: summary });\n });\n var _a = toJsonSerializer.serialize(), json = _a.json, exportAs = _a.exportAs;\n if (forJitCtx) {\n var forJitSerializer_1 = new ForJitSerializer(forJitCtx, symbolResolver, summaryResolver);\n types.forEach(function (_a) {\n var summary = _a.summary, metadata = _a.metadata;\n forJitSerializer_1.addSourceType(summary, metadata);\n });\n toJsonSerializer.unprocessedSymbolSummariesBySymbol.forEach(function (summary) {\n if (summaryResolver.isLibraryFile(summary.symbol.filePath) && summary.type) {\n forJitSerializer_1.addLibType(summary.type);\n }\n });\n forJitSerializer_1.serialize(exportAs);\n }\n return { json: json, exportAs: exportAs };\n}\nfunction deserializeSummaries(symbolCache, summaryResolver, libraryFileName, json) {\n var deserializer = new FromJsonDeserializer(symbolCache, summaryResolver);\n return deserializer.deserialize(libraryFileName, json);\n}\nfunction createForJitStub(outputCtx, reference) {\n return createSummaryForJitFunction(outputCtx, reference, NULL_EXPR);\n}\nfunction createSummaryForJitFunction(outputCtx, reference, value) {\n var fnName = summaryForJitName(reference.name);\n outputCtx.statements.push(fn([], [new ReturnStatement(value)], new ArrayType(DYNAMIC_TYPE)).toDeclStmt(fnName, [\n StmtModifier.Final, StmtModifier.Exported\n ]));\n}\nvar ToJsonSerializer = /** @class */ (function (_super) {\n __extends(ToJsonSerializer, _super);\n function ToJsonSerializer(symbolResolver, summaryResolver, srcFileName) {\n var _this = _super.call(this) || this;\n _this.symbolResolver = symbolResolver;\n _this.summaryResolver = summaryResolver;\n _this.srcFileName = srcFileName;\n // Note: This only contains symbols without members.\n _this.symbols = [];\n _this.indexBySymbol = new Map();\n _this.reexportedBy = new Map();\n // This now contains a `__symbol: number` in the place of\n // StaticSymbols, but otherwise has the same shape as the original objects.\n _this.processedSummaryBySymbol = new Map();\n _this.processedSummaries = [];\n _this.unprocessedSymbolSummariesBySymbol = new Map();\n _this.moduleName = symbolResolver.getKnownModuleName(srcFileName);\n return _this;\n }\n ToJsonSerializer.prototype.addSummary = function (summary) {\n var _this = this;\n var unprocessedSummary = this.unprocessedSymbolSummariesBySymbol.get(summary.symbol);\n var processedSummary = this.processedSummaryBySymbol.get(summary.symbol);\n if (!unprocessedSummary) {\n unprocessedSummary = { symbol: summary.symbol, metadata: undefined };\n this.unprocessedSymbolSummariesBySymbol.set(summary.symbol, unprocessedSummary);\n processedSummary = { symbol: this.processValue(summary.symbol, 0 /* None */) };\n this.processedSummaries.push(processedSummary);\n this.processedSummaryBySymbol.set(summary.symbol, processedSummary);\n }\n if (!unprocessedSummary.metadata && summary.metadata) {\n var metadata_1 = summary.metadata || {};\n if (metadata_1.__symbolic === 'class') {\n // For classes, we keep everything except their class decorators.\n // We need to keep e.g. the ctor args, method names, method decorators\n // so that the class can be extended in another compilation unit.\n // We don't keep the class decorators as\n // 1) they refer to data\n // that should not cause a rebuild of downstream compilation units\n // (e.g. inline templates of @Component, or @NgModule.declarations)\n // 2) their data is already captured in TypeSummaries, e.g. DirectiveSummary.\n var clone_1 = {};\n Object.keys(metadata_1).forEach(function (propName) {\n if (propName !== 'decorators') {\n clone_1[propName] = metadata_1[propName];\n }\n });\n metadata_1 = clone_1;\n }\n else if (isCall(metadata_1)) {\n if (!isFunctionCall(metadata_1) && !isMethodCallOnVariable(metadata_1)) {\n // Don't store complex calls as we won't be able to simplify them anyways later on.\n metadata_1 = {\n __symbolic: 'error',\n message: 'Complex function calls are not supported.',\n };\n }\n }\n // Note: We need to keep storing ctor calls for e.g.\n // `export const x = new InjectionToken(...)`\n unprocessedSummary.metadata = metadata_1;\n processedSummary.metadata = this.processValue(metadata_1, 1 /* ResolveValue */);\n if (metadata_1 instanceof StaticSymbol &&\n this.summaryResolver.isLibraryFile(metadata_1.filePath)) {\n var declarationSymbol = this.symbols[this.indexBySymbol.get(metadata_1)];\n if (!isLoweredSymbol(declarationSymbol.name)) {\n // Note: symbols that were introduced during codegen in the user file can have a reexport\n // if a user used `export *`. However, we can't rely on this as tsickle will change\n // `export *` into named exports, using only the information from the typechecker.\n // As we introduce the new symbols after typecheck, Tsickle does not know about them,\n // and omits them when expanding `export *`.\n // So we have to keep reexporting these symbols manually via .ngfactory files.\n this.reexportedBy.set(declarationSymbol, summary.symbol);\n }\n }\n }\n if (!unprocessedSummary.type && summary.type) {\n unprocessedSummary.type = summary.type;\n // Note: We don't add the summaries of all referenced symbols as for the ResolvedSymbols,\n // as the type summaries already contain the transitive data that they require\n // (in a minimal way).\n processedSummary.type = this.processValue(summary.type, 0 /* None */);\n // except for reexported directives / pipes, so we need to store\n // their summaries explicitly.\n if (summary.type.summaryKind === CompileSummaryKind.NgModule) {\n var ngModuleSummary = summary.type;\n ngModuleSummary.exportedDirectives.concat(ngModuleSummary.exportedPipes).forEach(function (id) {\n var symbol = id.reference;\n if (_this.summaryResolver.isLibraryFile(symbol.filePath) &&\n !_this.unprocessedSymbolSummariesBySymbol.has(symbol)) {\n var summary_1 = _this.summaryResolver.resolveSummary(symbol);\n if (summary_1) {\n _this.addSummary(summary_1);\n }\n }\n });\n }\n }\n };\n ToJsonSerializer.prototype.serialize = function () {\n var _this = this;\n var exportAs = [];\n var json = JSON.stringify({\n moduleName: this.moduleName,\n summaries: this.processedSummaries,\n symbols: this.symbols.map(function (symbol, index) {\n symbol.assertNoMembers();\n var importAs = undefined;\n if (_this.summaryResolver.isLibraryFile(symbol.filePath)) {\n var reexportSymbol = _this.reexportedBy.get(symbol);\n if (reexportSymbol) {\n importAs = _this.indexBySymbol.get(reexportSymbol);\n }\n else {\n var summary = _this.unprocessedSymbolSummariesBySymbol.get(symbol);\n if (!summary || !summary.metadata || summary.metadata.__symbolic !== 'interface') {\n importAs = symbol.name + \"_\" + index;\n exportAs.push({ symbol: symbol, exportAs: importAs });\n }\n }\n }\n return {\n __symbol: index,\n name: symbol.name,\n filePath: _this.summaryResolver.toSummaryFileName(symbol.filePath, _this.srcFileName),\n importAs: importAs\n };\n })\n });\n return { json: json, exportAs: exportAs };\n };\n ToJsonSerializer.prototype.processValue = function (value, flags) {\n return visitValue(value, this, flags);\n };\n ToJsonSerializer.prototype.visitOther = function (value, context) {\n if (value instanceof StaticSymbol) {\n var baseSymbol = this.symbolResolver.getStaticSymbol(value.filePath, value.name);\n var index = this.visitStaticSymbol(baseSymbol, context);\n return { __symbol: index, members: value.members };\n }\n };\n /**\n * Strip line and character numbers from ngsummaries.\n * Emitting them causes white spaces changes to retrigger upstream\n * recompilations in bazel.\n * TODO: find out a way to have line and character numbers in errors without\n * excessive recompilation in bazel.\n */\n ToJsonSerializer.prototype.visitStringMap = function (map, context) {\n if (map['__symbolic'] === 'resolved') {\n return visitValue(map.symbol, this, context);\n }\n if (map['__symbolic'] === 'error') {\n delete map['line'];\n delete map['character'];\n }\n return _super.prototype.visitStringMap.call(this, map, context);\n };\n /**\n * Returns null if the options.resolveValue is true, and the summary for the symbol\n * resolved to a type or could not be resolved.\n */\n ToJsonSerializer.prototype.visitStaticSymbol = function (baseSymbol, flags) {\n var index = this.indexBySymbol.get(baseSymbol);\n var summary = null;\n if (flags & 1 /* ResolveValue */ &&\n this.summaryResolver.isLibraryFile(baseSymbol.filePath)) {\n if (this.unprocessedSymbolSummariesBySymbol.has(baseSymbol)) {\n // the summary for this symbol was already added\n // -> nothing to do.\n return index;\n }\n summary = this.loadSummary(baseSymbol);\n if (summary && summary.metadata instanceof StaticSymbol) {\n // The summary is a reexport\n index = this.visitStaticSymbol(summary.metadata, flags);\n // reset the summary as it is just a reexport, so we don't want to store it.\n summary = null;\n }\n }\n else if (index != null) {\n // Note: == on purpose to compare with undefined!\n // No summary and the symbol is already added -> nothing to do.\n return index;\n }\n // Note: == on purpose to compare with undefined!\n if (index == null) {\n index = this.symbols.length;\n this.symbols.push(baseSymbol);\n }\n this.indexBySymbol.set(baseSymbol, index);\n if (summary) {\n this.addSummary(summary);\n }\n return index;\n };\n ToJsonSerializer.prototype.loadSummary = function (symbol) {\n var summary = this.summaryResolver.resolveSummary(symbol);\n if (!summary) {\n // some symbols might originate from a plain typescript library\n // that just exported .d.ts and .metadata.json files, i.e. where no summary\n // files were created.\n var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n if (resolvedSymbol) {\n summary = { symbol: resolvedSymbol.symbol, metadata: resolvedSymbol.metadata };\n }\n }\n return summary;\n };\n return ToJsonSerializer;\n}(ValueTransformer));\nvar ForJitSerializer = /** @class */ (function () {\n function ForJitSerializer(outputCtx, symbolResolver, summaryResolver) {\n this.outputCtx = outputCtx;\n this.symbolResolver = symbolResolver;\n this.summaryResolver = summaryResolver;\n this.data = [];\n }\n ForJitSerializer.prototype.addSourceType = function (summary, metadata) {\n this.data.push({ summary: summary, metadata: metadata, isLibrary: false });\n };\n ForJitSerializer.prototype.addLibType = function (summary) {\n this.data.push({ summary: summary, metadata: null, isLibrary: true });\n };\n ForJitSerializer.prototype.serialize = function (exportAsArr) {\n var _this = this;\n var exportAsBySymbol = new Map();\n try {\n for (var exportAsArr_1 = __values(exportAsArr), exportAsArr_1_1 = exportAsArr_1.next(); !exportAsArr_1_1.done; exportAsArr_1_1 = exportAsArr_1.next()) {\n var _a = exportAsArr_1_1.value, symbol = _a.symbol, exportAs = _a.exportAs;\n exportAsBySymbol.set(symbol, exportAs);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exportAsArr_1_1 && !exportAsArr_1_1.done && (_b = exportAsArr_1.return)) _b.call(exportAsArr_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var ngModuleSymbols = new Set();\n try {\n for (var _c = __values(this.data), _d = _c.next(); !_d.done; _d = _c.next()) {\n var _e = _d.value, summary = _e.summary, metadata = _e.metadata, isLibrary = _e.isLibrary;\n if (summary.summaryKind === CompileSummaryKind.NgModule) {\n // collect the symbols that refer to NgModule classes.\n // Note: we can't just rely on `summary.type.summaryKind` to determine this as\n // we don't add the summaries of all referenced symbols when we serialize type summaries.\n // See serializeSummaries for details.\n ngModuleSymbols.add(summary.type.reference);\n var modSummary = summary;\n try {\n for (var _f = __values(modSummary.modules), _g = _f.next(); !_g.done; _g = _f.next()) {\n var mod = _g.value;\n ngModuleSymbols.add(mod.reference);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_g && !_g.done && (_h = _f.return)) _h.call(_f);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (!isLibrary) {\n var fnName = summaryForJitName(summary.type.reference.name);\n createSummaryForJitFunction(this.outputCtx, summary.type.reference, this.serializeSummaryWithDeps(summary, metadata));\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_j = _c.return)) _j.call(_c);\n }\n finally { if (e_3) throw e_3.error; }\n }\n ngModuleSymbols.forEach(function (ngModuleSymbol) {\n if (_this.summaryResolver.isLibraryFile(ngModuleSymbol.filePath)) {\n var exportAs = exportAsBySymbol.get(ngModuleSymbol) || ngModuleSymbol.name;\n var jitExportAsName = summaryForJitName(exportAs);\n _this.outputCtx.statements.push(variable(jitExportAsName)\n .set(_this.serializeSummaryRef(ngModuleSymbol))\n .toDeclStmt(null, [StmtModifier.Exported]));\n }\n });\n var e_1, _b, e_3, _j, e_2, _h;\n };\n ForJitSerializer.prototype.serializeSummaryWithDeps = function (summary, metadata) {\n var _this = this;\n var expressions = [this.serializeSummary(summary)];\n var providers = [];\n if (metadata instanceof CompileNgModuleMetadata) {\n expressions.push.apply(expressions, __spread(\n // For directives / pipes, we only add the declared ones,\n // and rely on transitively importing NgModules to get the transitive\n // summaries.\n metadata.declaredDirectives.concat(metadata.declaredPipes)\n .map(function (type) { return type.reference; })\n .concat(metadata.transitiveModule.modules.map(function (type) { return type.reference; })\n .filter(function (ref) { return ref !== metadata.type.reference; }))\n .map(function (ref) { return _this.serializeSummaryRef(ref); })));\n // Note: We don't use `NgModuleSummary.providers`, as that one is transitive,\n // and we already have transitive modules.\n providers = metadata.providers;\n }\n else if (summary.summaryKind === CompileSummaryKind.Directive) {\n var dirSummary = summary;\n providers = dirSummary.providers.concat(dirSummary.viewProviders);\n }\n // Note: We can't just refer to the `ngsummary.ts` files for `useClass` providers (as we do for\n // declaredDirectives / declaredPipes), as we allow\n // providers without ctor arguments to skip the `@Injectable` decorator,\n // i.e. we didn't generate .ngsummary.ts files for these.\n expressions.push.apply(expressions, __spread(providers.filter(function (provider) { return !!provider.useClass; }).map(function (provider) { return _this.serializeSummary({\n summaryKind: CompileSummaryKind.Injectable, type: provider.useClass\n }); })));\n return literalArr(expressions);\n };\n ForJitSerializer.prototype.serializeSummaryRef = function (typeSymbol) {\n var jitImportedSymbol = this.symbolResolver.getStaticSymbol(summaryForJitFileName(typeSymbol.filePath), summaryForJitName(typeSymbol.name));\n return this.outputCtx.importExpr(jitImportedSymbol);\n };\n ForJitSerializer.prototype.serializeSummary = function (data) {\n var outputCtx = this.outputCtx;\n var Transformer = /** @class */ (function () {\n function Transformer() {\n }\n Transformer.prototype.visitArray = function (arr, context) {\n var _this = this;\n return literalArr(arr.map(function (entry) { return visitValue(entry, _this, context); }));\n };\n Transformer.prototype.visitStringMap = function (map, context) {\n var _this = this;\n return new LiteralMapExpr(Object.keys(map).map(function (key) { return new LiteralMapEntry(key, visitValue(map[key], _this, context), false); }));\n };\n Transformer.prototype.visitPrimitive = function (value, context) { return literal(value); };\n Transformer.prototype.visitOther = function (value, context) {\n if (value instanceof StaticSymbol) {\n return outputCtx.importExpr(value);\n }\n else {\n throw new Error(\"Illegal State: Encountered value \" + value);\n }\n };\n return Transformer;\n }());\n return visitValue(data, new Transformer(), null);\n };\n return ForJitSerializer;\n}());\nvar FromJsonDeserializer = /** @class */ (function (_super) {\n __extends(FromJsonDeserializer, _super);\n function FromJsonDeserializer(symbolCache, summaryResolver) {\n var _this = _super.call(this) || this;\n _this.symbolCache = symbolCache;\n _this.summaryResolver = summaryResolver;\n return _this;\n }\n FromJsonDeserializer.prototype.deserialize = function (libraryFileName, json) {\n var _this = this;\n var data = JSON.parse(json);\n var allImportAs = [];\n this.symbols = data.symbols.map(function (serializedSymbol) { return _this.symbolCache.get(_this.summaryResolver.fromSummaryFileName(serializedSymbol.filePath, libraryFileName), serializedSymbol.name); });\n data.symbols.forEach(function (serializedSymbol, index) {\n var symbol = _this.symbols[index];\n var importAs = serializedSymbol.importAs;\n if (typeof importAs === 'number') {\n allImportAs.push({ symbol: symbol, importAs: _this.symbols[importAs] });\n }\n else if (typeof importAs === 'string') {\n allImportAs.push({ symbol: symbol, importAs: _this.symbolCache.get(ngfactoryFilePath(libraryFileName), importAs) });\n }\n });\n var summaries = visitValue(data.summaries, this, null);\n return { moduleName: data.moduleName, summaries: summaries, importAs: allImportAs };\n };\n FromJsonDeserializer.prototype.visitStringMap = function (map, context) {\n if ('__symbol' in map) {\n var baseSymbol = this.symbols[map['__symbol']];\n var members = map['members'];\n return members.length ? this.symbolCache.get(baseSymbol.filePath, baseSymbol.name, members) :\n baseSymbol;\n }\n else {\n return _super.prototype.visitStringMap.call(this, map, context);\n }\n };\n return FromJsonDeserializer;\n}(ValueTransformer));\nfunction isCall(metadata) {\n return metadata && metadata.__symbolic === 'call';\n}\nfunction isFunctionCall(metadata) {\n return isCall(metadata) && unwrapResolvedMetadata(metadata.expression) instanceof StaticSymbol;\n}\nfunction isMethodCallOnVariable(metadata) {\n return isCall(metadata) && metadata.expression && metadata.expression.__symbolic === 'select' &&\n unwrapResolvedMetadata(metadata.expression.expression) instanceof StaticSymbol;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 StubEmitFlags;\n(function (StubEmitFlags) {\n StubEmitFlags[StubEmitFlags[\"Basic\"] = 1] = \"Basic\";\n StubEmitFlags[StubEmitFlags[\"TypeCheck\"] = 2] = \"TypeCheck\";\n StubEmitFlags[StubEmitFlags[\"All\"] = 3] = \"All\";\n})(StubEmitFlags || (StubEmitFlags = {}));\nvar AotCompiler = /** @class */ (function () {\n function AotCompiler(_config, _options, _host, reflector, _metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _typeCheckCompiler, _ngModuleCompiler, _injectableCompiler, _outputEmitter, _summaryResolver, _symbolResolver) {\n this._config = _config;\n this._options = _options;\n this._host = _host;\n this.reflector = reflector;\n this._metadataResolver = _metadataResolver;\n this._templateParser = _templateParser;\n this._styleCompiler = _styleCompiler;\n this._viewCompiler = _viewCompiler;\n this._typeCheckCompiler = _typeCheckCompiler;\n this._ngModuleCompiler = _ngModuleCompiler;\n this._injectableCompiler = _injectableCompiler;\n this._outputEmitter = _outputEmitter;\n this._summaryResolver = _summaryResolver;\n this._symbolResolver = _symbolResolver;\n this._templateAstCache = new Map();\n this._analyzedFiles = new Map();\n this._analyzedFilesForInjectables = new Map();\n }\n AotCompiler.prototype.clearCache = function () { this._metadataResolver.clearCache(); };\n AotCompiler.prototype.analyzeModulesSync = function (rootFiles) {\n var _this = this;\n var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n analyzeResult.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); });\n return analyzeResult;\n };\n AotCompiler.prototype.analyzeModulesAsync = function (rootFiles) {\n var _this = this;\n var analyzeResult = analyzeAndValidateNgModules(rootFiles, this._host, this._symbolResolver, this._metadataResolver);\n return Promise\n .all(analyzeResult.ngModules.map(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))\n .then(function () { return analyzeResult; });\n };\n AotCompiler.prototype._analyzeFile = function (fileName) {\n var analyzedFile = this._analyzedFiles.get(fileName);\n if (!analyzedFile) {\n analyzedFile =\n analyzeFile(this._host, this._symbolResolver, this._metadataResolver, fileName);\n this._analyzedFiles.set(fileName, analyzedFile);\n }\n return analyzedFile;\n };\n AotCompiler.prototype._analyzeFileForInjectables = function (fileName) {\n var analyzedFile = this._analyzedFilesForInjectables.get(fileName);\n if (!analyzedFile) {\n analyzedFile = analyzeFileForInjectables(this._host, this._symbolResolver, this._metadataResolver, fileName);\n this._analyzedFilesForInjectables.set(fileName, analyzedFile);\n }\n return analyzedFile;\n };\n AotCompiler.prototype.findGeneratedFileNames = function (fileName) {\n var _this = this;\n var genFileNames = [];\n var file = this._analyzeFile(fileName);\n // Make sure we create a .ngfactory if we have a injectable/directive/pipe/NgModule\n // or a reference to a non source file.\n // Note: This is overestimating the required .ngfactory files as the real calculation is harder.\n // Only do this for StubEmitFlags.Basic, as adding a type check block\n // does not change this file (as we generate type check blocks based on NgModules).\n if (this._options.allowEmptyCodegenFiles || file.directives.length || file.pipes.length ||\n file.injectables.length || file.ngModules.length || file.exportsNonSourceFiles) {\n genFileNames.push(ngfactoryFilePath(file.fileName, true));\n if (this._options.enableSummariesForJit) {\n genFileNames.push(summaryForJitFileName(file.fileName, true));\n }\n }\n var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(file.fileName, true)[1]);\n file.directives.forEach(function (dirSymbol) {\n var compMeta = _this._metadataResolver.getNonNormalizedDirectiveMetadata(dirSymbol).metadata;\n if (!compMeta.isComponent) {\n return;\n }\n // Note: compMeta is a component and therefore template is non null.\n compMeta.template.styleUrls.forEach(function (styleUrl) {\n var normalizedUrl = _this._host.resourceNameToFileName(styleUrl, file.fileName);\n if (!normalizedUrl) {\n throw syntaxError(\"Couldn't resolve resource \" + styleUrl + \" relative to \" + file.fileName);\n }\n var needsShim = (compMeta.template.encapsulation ||\n _this._config.defaultEncapsulation) === ViewEncapsulation.Emulated;\n genFileNames.push(_stylesModuleUrl(normalizedUrl, needsShim, fileSuffix));\n if (_this._options.allowEmptyCodegenFiles) {\n genFileNames.push(_stylesModuleUrl(normalizedUrl, !needsShim, fileSuffix));\n }\n });\n });\n return genFileNames;\n };\n AotCompiler.prototype.emitBasicStub = function (genFileName, originalFileName) {\n var outputCtx = this._createOutputContext(genFileName);\n if (genFileName.endsWith('.ngfactory.ts')) {\n if (!originalFileName) {\n throw new Error(\"Assertion error: require the original file for .ngfactory.ts stubs. File: \" + genFileName);\n }\n var originalFile = this._analyzeFile(originalFileName);\n this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.Basic);\n }\n else if (genFileName.endsWith('.ngsummary.ts')) {\n if (this._options.enableSummariesForJit) {\n if (!originalFileName) {\n throw new Error(\"Assertion error: require the original file for .ngsummary.ts stubs. File: \" + genFileName);\n }\n var originalFile = this._analyzeFile(originalFileName);\n _createEmptyStub(outputCtx);\n originalFile.ngModules.forEach(function (ngModule) {\n // create exports that user code can reference\n createForJitStub(outputCtx, ngModule.type.reference);\n });\n }\n }\n else if (genFileName.endsWith('.ngstyle.ts')) {\n _createEmptyStub(outputCtx);\n }\n // Note: for the stubs, we don't need a property srcFileUrl,\n // as later on in emitAllImpls we will create the proper GeneratedFiles with the\n // correct srcFileUrl.\n // This is good as e.g. for .ngstyle.ts files we can't derive\n // the url of components based on the genFileUrl.\n return this._codegenSourceModule('unknown', outputCtx);\n };\n AotCompiler.prototype.emitTypeCheckStub = function (genFileName, originalFileName) {\n var originalFile = this._analyzeFile(originalFileName);\n var outputCtx = this._createOutputContext(genFileName);\n if (genFileName.endsWith('.ngfactory.ts')) {\n this._createNgFactoryStub(outputCtx, originalFile, StubEmitFlags.TypeCheck);\n }\n return outputCtx.statements.length > 0 ?\n this._codegenSourceModule(originalFile.fileName, outputCtx) :\n null;\n };\n AotCompiler.prototype.loadFilesAsync = function (fileNames, tsFiles) {\n var _this = this;\n var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });\n var loadingPromises = [];\n files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) {\n return loadingPromises.push(_this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false));\n }); });\n var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });\n return Promise.all(loadingPromises).then(function (_) { return ({\n analyzedModules: mergeAndValidateNgFiles(files),\n analyzedInjectables: analyzedInjectables,\n }); });\n };\n AotCompiler.prototype.loadFilesSync = function (fileNames, tsFiles) {\n var _this = this;\n var files = fileNames.map(function (fileName) { return _this._analyzeFile(fileName); });\n files.forEach(function (file) { return file.ngModules.forEach(function (ngModule) { return _this._metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, true); }); });\n var analyzedInjectables = tsFiles.map(function (tsFile) { return _this._analyzeFileForInjectables(tsFile); });\n return {\n analyzedModules: mergeAndValidateNgFiles(files),\n analyzedInjectables: analyzedInjectables,\n };\n };\n AotCompiler.prototype._createNgFactoryStub = function (outputCtx, file, emitFlags) {\n var _this = this;\n var componentId = 0;\n file.ngModules.forEach(function (ngModuleMeta, ngModuleIndex) {\n // Note: the code below needs to executed for StubEmitFlags.Basic and StubEmitFlags.TypeCheck,\n // so we don't change the .ngfactory file too much when adding the type-check block.\n // create exports that user code can reference\n _this._ngModuleCompiler.createStub(outputCtx, ngModuleMeta.type.reference);\n // add references to the symbols from the metadata.\n // These can be used by the type check block for components,\n // and they also cause TypeScript to include these files into the program too,\n // which will make them part of the analyzedFiles.\n var externalReferences = __spread(ngModuleMeta.transitiveModule.directives.map(function (d) { return d.reference; }), ngModuleMeta.transitiveModule.pipes.map(function (d) { return d.reference; }), ngModuleMeta.importedModules.map(function (m) { return m.type.reference; }), ngModuleMeta.exportedModules.map(function (m) { return m.type.reference; }), _this._externalIdentifierReferences([Identifiers.TemplateRef, Identifiers.ElementRef]));\n var externalReferenceVars = new Map();\n externalReferences.forEach(function (ref, typeIndex) {\n externalReferenceVars.set(ref, \"_decl\" + ngModuleIndex + \"_\" + typeIndex);\n });\n externalReferenceVars.forEach(function (varName, reference) {\n outputCtx.statements.push(variable(varName)\n .set(NULL_EXPR.cast(DYNAMIC_TYPE))\n .toDeclStmt(expressionType(outputCtx.importExpr(reference, /* typeParams */ null, /* useSummaries */ false))));\n });\n if (emitFlags & StubEmitFlags.TypeCheck) {\n // add the type-check block for all components of the NgModule\n ngModuleMeta.declaredDirectives.forEach(function (dirId) {\n var compMeta = _this._metadataResolver.getDirectiveMetadata(dirId.reference);\n if (!compMeta.isComponent) {\n return;\n }\n componentId++;\n _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + \"_Host_\" + componentId, ngModuleMeta, _this._metadataResolver.getHostComponentMetadata(compMeta), [compMeta.type], externalReferenceVars);\n _this._createTypeCheckBlock(outputCtx, compMeta.type.reference.name + \"_\" + componentId, ngModuleMeta, compMeta, ngModuleMeta.transitiveModule.directives, externalReferenceVars);\n });\n }\n });\n if (outputCtx.statements.length === 0) {\n _createEmptyStub(outputCtx);\n }\n };\n AotCompiler.prototype._externalIdentifierReferences = function (references) {\n var result = [];\n try {\n for (var references_1 = __values(references), references_1_1 = references_1.next(); !references_1_1.done; references_1_1 = references_1.next()) {\n var reference = references_1_1.value;\n var token = createTokenForExternalReference(this.reflector, reference);\n if (token.identifier) {\n result.push(token.identifier.reference);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (references_1_1 && !references_1_1.done && (_a = references_1.return)) _a.call(references_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n var e_1, _a;\n };\n AotCompiler.prototype._createTypeCheckBlock = function (ctx, componentId, moduleMeta, compMeta, directives, externalReferenceVars) {\n var _a = this._parseTemplate(compMeta, moduleMeta, directives), parsedTemplate = _a.template, usedPipes = _a.pipes;\n (_b = ctx.statements).push.apply(_b, __spread(this._typeCheckCompiler.compileComponent(componentId, compMeta, parsedTemplate, usedPipes, externalReferenceVars, ctx)));\n var _b;\n };\n AotCompiler.prototype.emitMessageBundle = function (analyzeResult, locale) {\n var _this = this;\n var errors = [];\n var htmlParser = new HtmlParser();\n // TODO(vicb): implicit tags & attributes\n var messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n analyzeResult.files.forEach(function (file) {\n var compMetas = [];\n file.directives.forEach(function (directiveType) {\n var dirMeta = _this._metadataResolver.getDirectiveMetadata(directiveType);\n if (dirMeta && dirMeta.isComponent) {\n compMetas.push(dirMeta);\n }\n });\n compMetas.forEach(function (compMeta) {\n var html = compMeta.template.template;\n var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n errors.push.apply(errors, __spread(messageBundle.updateFromTemplate(html, file.fileName, interpolationConfig)));\n });\n });\n if (errors.length) {\n throw new Error(errors.map(function (e) { return e.toString(); }).join('\\n'));\n }\n return messageBundle;\n };\n AotCompiler.prototype.emitAllPartialModules = function (_a, r3Files) {\n var _this = this;\n var ngModuleByPipeOrDirective = _a.ngModuleByPipeOrDirective, files = _a.files;\n var contextMap = new Map();\n var getContext = function (fileName) {\n if (!contextMap.has(fileName)) {\n contextMap.set(fileName, _this._createOutputContext(fileName));\n }\n return contextMap.get(fileName);\n };\n files.forEach(function (file) { return _this._compilePartialModule(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables, getContext(file.fileName)); });\n r3Files.forEach(function (file) { return _this._compileShallowModules(file.fileName, file.shallowModules, getContext(file.fileName)); });\n return Array.from(contextMap.values())\n .map(function (context) { return ({\n fileName: context.genFilePath,\n statements: __spread(context.constantPool.statements, context.statements),\n }); });\n };\n AotCompiler.prototype._compileShallowModules = function (fileName, shallowModules, context) {\n var _this = this;\n shallowModules.forEach(function (module) { return compileNgModule(context, module, _this._injectableCompiler); });\n };\n AotCompiler.prototype._compilePartialModule = function (fileName, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables, context) {\n var _this = this;\n var errors = [];\n var hostBindingParser = new BindingParser(this._templateParser.expressionParser, DEFAULT_INTERPOLATION_CONFIG, null, [], errors);\n // Process all components and directives\n directives.forEach(function (directiveType) {\n var directiveMetadata = _this._metadataResolver.getDirectiveMetadata(directiveType);\n if (directiveMetadata.isComponent) {\n var module = ngModuleByPipeOrDirective.get(directiveType);\n module ||\n error(\"Cannot determine the module for component '\" + identifierName(directiveMetadata.type) + \"'\");\n var _a = _this._parseTemplate(directiveMetadata, module, module.transitiveModule.directives), parsedTemplate = _a.template, parsedPipes = _a.pipes;\n compileComponent(context, directiveMetadata, parsedPipes, parsedTemplate, _this.reflector, hostBindingParser, 0 /* PartialClass */);\n }\n else {\n compileDirective(context, directiveMetadata, _this.reflector, hostBindingParser, 0 /* PartialClass */);\n }\n });\n pipes.forEach(function (pipeType) {\n var pipeMetadata = _this._metadataResolver.getPipeMetadata(pipeType);\n if (pipeMetadata) {\n compilePipe(context, pipeMetadata, _this.reflector, 0 /* PartialClass */);\n }\n });\n injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });\n };\n AotCompiler.prototype.emitAllPartialModules2 = function (files) {\n var _this = this;\n // Using reduce like this is a select many pattern (where map is a select pattern)\n return files.reduce(function (r, file) {\n r.push.apply(r, __spread(_this._emitPartialModule2(file.fileName, file.injectables)));\n return r;\n }, []);\n };\n AotCompiler.prototype._emitPartialModule2 = function (fileName, injectables) {\n var _this = this;\n var context = this._createOutputContext(fileName);\n injectables.forEach(function (injectable) { return _this._injectableCompiler.compile(injectable, context); });\n if (context.statements && context.statements.length > 0) {\n return [{ fileName: fileName, statements: __spread(context.constantPool.statements, context.statements) }];\n }\n return [];\n };\n AotCompiler.prototype.emitAllImpls = function (analyzeResult) {\n var _this = this;\n var ngModuleByPipeOrDirective = analyzeResult.ngModuleByPipeOrDirective, files = analyzeResult.files;\n var sourceModules = files.map(function (file) { return _this._compileImplFile(file.fileName, ngModuleByPipeOrDirective, file.directives, file.pipes, file.ngModules, file.injectables); });\n return flatten(sourceModules);\n };\n AotCompiler.prototype._compileImplFile = function (srcFileUrl, ngModuleByPipeOrDirective, directives, pipes, ngModules, injectables) {\n var _this = this;\n var fileSuffix = normalizeGenFileSuffix(splitTypescriptSuffix(srcFileUrl, true)[1]);\n var generatedFiles = [];\n var outputCtx = this._createOutputContext(ngfactoryFilePath(srcFileUrl, true));\n generatedFiles.push.apply(generatedFiles, __spread(this._createSummary(srcFileUrl, directives, pipes, ngModules, injectables, outputCtx)));\n // compile all ng modules\n ngModules.forEach(function (ngModuleMeta) { return _this._compileModule(outputCtx, ngModuleMeta); });\n // compile components\n directives.forEach(function (dirType) {\n var compMeta = _this._metadataResolver.getDirectiveMetadata(dirType);\n if (!compMeta.isComponent) {\n return;\n }\n var ngModule = ngModuleByPipeOrDirective.get(dirType);\n if (!ngModule) {\n throw new Error(\"Internal Error: cannot determine the module for component \" + identifierName(compMeta.type) + \"!\");\n }\n // compile styles\n var componentStylesheet = _this._styleCompiler.compileComponent(outputCtx, compMeta);\n // Note: compMeta is a component and therefore template is non null.\n compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {\n // Note: fill non shim and shim style files as they might\n // be shared by component with and without ViewEncapsulation.\n var shim = _this._styleCompiler.needsStyleShim(compMeta);\n generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, shim, fileSuffix));\n if (_this._options.allowEmptyCodegenFiles) {\n generatedFiles.push(_this._codegenStyles(srcFileUrl, compMeta, stylesheetMeta, !shim, fileSuffix));\n }\n });\n // compile components\n var compViewVars = _this._compileComponent(outputCtx, compMeta, ngModule, ngModule.transitiveModule.directives, componentStylesheet, fileSuffix);\n _this._compileComponentFactory(outputCtx, compMeta, ngModule, fileSuffix);\n });\n if (outputCtx.statements.length > 0 || this._options.allowEmptyCodegenFiles) {\n var srcModule = this._codegenSourceModule(srcFileUrl, outputCtx);\n generatedFiles.unshift(srcModule);\n }\n return generatedFiles;\n };\n AotCompiler.prototype._createSummary = function (srcFileName, directives, pipes, ngModules, injectables, ngFactoryCtx) {\n var _this = this;\n var symbolSummaries = this._symbolResolver.getSymbolsOf(srcFileName)\n .map(function (symbol) { return _this._symbolResolver.resolveSymbol(symbol); });\n var typeData = __spread(ngModules.map(function (meta) { return ({\n summary: _this._metadataResolver.getNgModuleSummary(meta.type.reference),\n metadata: _this._metadataResolver.getNgModuleMetadata(meta.type.reference)\n }); }), directives.map(function (ref) { return ({\n summary: _this._metadataResolver.getDirectiveSummary(ref),\n metadata: _this._metadataResolver.getDirectiveMetadata(ref)\n }); }), pipes.map(function (ref) { return ({\n summary: _this._metadataResolver.getPipeSummary(ref),\n metadata: _this._metadataResolver.getPipeMetadata(ref)\n }); }), injectables.map(function (ref) { return ({\n summary: _this._metadataResolver.getInjectableSummary(ref.symbol),\n metadata: _this._metadataResolver.getInjectableSummary(ref.symbol).type\n }); }));\n var forJitOutputCtx = this._options.enableSummariesForJit ?\n this._createOutputContext(summaryForJitFileName(srcFileName, true)) :\n null;\n var _a = serializeSummaries(srcFileName, forJitOutputCtx, this._summaryResolver, this._symbolResolver, symbolSummaries, typeData), json = _a.json, exportAs = _a.exportAs;\n exportAs.forEach(function (entry) {\n ngFactoryCtx.statements.push(variable(entry.exportAs).set(ngFactoryCtx.importExpr(entry.symbol)).toDeclStmt(null, [\n StmtModifier.Exported\n ]));\n });\n var summaryJson = new GeneratedFile(srcFileName, summaryFileName(srcFileName), json);\n var result = [summaryJson];\n if (forJitOutputCtx) {\n result.push(this._codegenSourceModule(srcFileName, forJitOutputCtx));\n }\n return result;\n };\n AotCompiler.prototype._compileModule = function (outputCtx, ngModule) {\n var providers = [];\n if (this._options.locale) {\n var normalizedLocale = this._options.locale.replace(/_/g, '-');\n providers.push({\n token: createTokenForExternalReference(this.reflector, Identifiers.LOCALE_ID),\n useValue: normalizedLocale,\n });\n }\n if (this._options.i18nFormat) {\n providers.push({\n token: createTokenForExternalReference(this.reflector, Identifiers.TRANSLATIONS_FORMAT),\n useValue: this._options.i18nFormat\n });\n }\n this._ngModuleCompiler.compile(outputCtx, ngModule, providers);\n };\n AotCompiler.prototype._compileComponentFactory = function (outputCtx, compMeta, ngModule, fileSuffix) {\n var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta);\n var hostViewFactoryVar = this._compileComponent(outputCtx, hostMeta, ngModule, [compMeta.type], null, fileSuffix)\n .viewClassVar;\n var compFactoryVar = componentFactoryName(compMeta.type.reference);\n var inputsExprs = [];\n for (var propName in compMeta.inputs) {\n var templateName = compMeta.inputs[propName];\n // Don't quote so that the key gets minified...\n inputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));\n }\n var outputsExprs = [];\n for (var propName in compMeta.outputs) {\n var templateName = compMeta.outputs[propName];\n // Don't quote so that the key gets minified...\n outputsExprs.push(new LiteralMapEntry(propName, literal(templateName), false));\n }\n outputCtx.statements.push(variable(compFactoryVar)\n .set(importExpr(Identifiers.createComponentFactory).callFn([\n literal(compMeta.selector), outputCtx.importExpr(compMeta.type.reference),\n variable(hostViewFactoryVar), new LiteralMapExpr(inputsExprs),\n new LiteralMapExpr(outputsExprs),\n literalArr(compMeta.template.ngContentSelectors.map(function (selector) { return literal(selector); }))\n ]))\n .toDeclStmt(importType(Identifiers.ComponentFactory, [expressionType(outputCtx.importExpr(compMeta.type.reference))], [TypeModifier.Const]), [StmtModifier.Final, StmtModifier.Exported]));\n };\n AotCompiler.prototype._compileComponent = function (outputCtx, compMeta, ngModule, directiveIdentifiers, componentStyles, fileSuffix) {\n var _a = this._parseTemplate(compMeta, ngModule, directiveIdentifiers), parsedTemplate = _a.template, usedPipes = _a.pipes;\n var stylesExpr = componentStyles ? variable(componentStyles.stylesVar) : literalArr([]);\n var viewResult = this._viewCompiler.compileComponent(outputCtx, compMeta, parsedTemplate, stylesExpr, usedPipes);\n if (componentStyles) {\n _resolveStyleStatements(this._symbolResolver, componentStyles, this._styleCompiler.needsStyleShim(compMeta), fileSuffix);\n }\n return viewResult;\n };\n AotCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {\n var _this = this;\n if (this._templateAstCache.has(compMeta.type.reference)) {\n return this._templateAstCache.get(compMeta.type.reference);\n }\n var preserveWhitespaces = compMeta.template.preserveWhitespaces;\n var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });\n var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });\n var result = this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);\n this._templateAstCache.set(compMeta.type.reference, result);\n return result;\n };\n AotCompiler.prototype._createOutputContext = function (genFilePath) {\n var _this = this;\n var importExpr$$1 = function (symbol, typeParams, useSummaries) {\n if (typeParams === void 0) { typeParams = null; }\n if (useSummaries === void 0) { useSummaries = true; }\n if (!(symbol instanceof StaticSymbol)) {\n throw new Error(\"Internal error: unknown identifier \" + JSON.stringify(symbol));\n }\n var arity = _this._symbolResolver.getTypeArity(symbol) || 0;\n var _a = _this._symbolResolver.getImportAs(symbol, useSummaries) || symbol, filePath = _a.filePath, name = _a.name, members = _a.members;\n var importModule = _this._fileNameToModuleName(filePath, genFilePath);\n // It should be good enough to compare filePath to genFilePath and if they are equal\n // there is a self reference. However, ngfactory files generate to .ts but their\n // symbols have .d.ts so a simple compare is insufficient. They should be canonical\n // and is tracked by #17705.\n var selfReference = _this._fileNameToModuleName(genFilePath, genFilePath);\n var moduleName = importModule === selfReference ? null : importModule;\n // If we are in a type expression that refers to a generic type then supply\n // the required type parameters. If there were not enough type parameters\n // supplied, supply any as the type. Outside a type expression the reference\n // should not supply type parameters and be treated as a simple value reference\n // to the constructor function itself.\n var suppliedTypeParams = typeParams || [];\n var missingTypeParamsCount = arity - suppliedTypeParams.length;\n var allTypeParams = suppliedTypeParams.concat(new Array(missingTypeParamsCount).fill(DYNAMIC_TYPE));\n return members.reduce(function (expr, memberName) { return expr.prop(memberName); }, importExpr(new ExternalReference(moduleName, name, null), allTypeParams));\n };\n return { statements: [], genFilePath: genFilePath, importExpr: importExpr$$1, constantPool: new ConstantPool() };\n };\n AotCompiler.prototype._fileNameToModuleName = function (importedFilePath, containingFilePath) {\n return this._summaryResolver.getKnownModuleName(importedFilePath) ||\n this._symbolResolver.getKnownModuleName(importedFilePath) ||\n this._host.fileNameToModuleName(importedFilePath, containingFilePath);\n };\n AotCompiler.prototype._codegenStyles = function (srcFileUrl, compMeta, stylesheetMetadata, isShimmed, fileSuffix) {\n var outputCtx = this._createOutputContext(_stylesModuleUrl(stylesheetMetadata.moduleUrl, isShimmed, fileSuffix));\n var compiledStylesheet = this._styleCompiler.compileStyles(outputCtx, compMeta, stylesheetMetadata, isShimmed);\n _resolveStyleStatements(this._symbolResolver, compiledStylesheet, isShimmed, fileSuffix);\n return this._codegenSourceModule(srcFileUrl, outputCtx);\n };\n AotCompiler.prototype._codegenSourceModule = function (srcFileUrl, ctx) {\n return new GeneratedFile(srcFileUrl, ctx.genFilePath, ctx.statements);\n };\n AotCompiler.prototype.listLazyRoutes = function (entryRoute, analyzedModules) {\n var self = this;\n if (entryRoute) {\n var symbol = parseLazyRoute(entryRoute, this.reflector).referencedModule;\n return visitLazyRoute(symbol);\n }\n else if (analyzedModules) {\n var allLazyRoutes = [];\n try {\n for (var _a = __values(analyzedModules.ngModules), _b = _a.next(); !_b.done; _b = _a.next()) {\n var ngModule = _b.value;\n var lazyRoutes = listLazyRoutes(ngModule, this.reflector);\n try {\n for (var lazyRoutes_1 = __values(lazyRoutes), lazyRoutes_1_1 = lazyRoutes_1.next(); !lazyRoutes_1_1.done; lazyRoutes_1_1 = lazyRoutes_1.next()) {\n var lazyRoute = lazyRoutes_1_1.value;\n allLazyRoutes.push(lazyRoute);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (lazyRoutes_1_1 && !lazyRoutes_1_1.done && (_c = lazyRoutes_1.return)) _c.call(lazyRoutes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_d = _a.return)) _d.call(_a);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return allLazyRoutes;\n }\n else {\n throw new Error(\"Either route or analyzedModules has to be specified!\");\n }\n function visitLazyRoute(symbol, seenRoutes, allLazyRoutes) {\n if (seenRoutes === void 0) { seenRoutes = new Set(); }\n if (allLazyRoutes === void 0) { allLazyRoutes = []; }\n // Support pointing to default exports, but stop recursing there,\n // as the StaticReflector does not yet support default exports.\n if (seenRoutes.has(symbol) || !symbol.name) {\n return allLazyRoutes;\n }\n seenRoutes.add(symbol);\n var lazyRoutes = listLazyRoutes(self._metadataResolver.getNgModuleMetadata(symbol, true), self.reflector);\n try {\n for (var lazyRoutes_2 = __values(lazyRoutes), lazyRoutes_2_1 = lazyRoutes_2.next(); !lazyRoutes_2_1.done; lazyRoutes_2_1 = lazyRoutes_2.next()) {\n var lazyRoute = lazyRoutes_2_1.value;\n allLazyRoutes.push(lazyRoute);\n visitLazyRoute(lazyRoute.referencedModule, seenRoutes, allLazyRoutes);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (lazyRoutes_2_1 && !lazyRoutes_2_1.done && (_a = lazyRoutes_2.return)) _a.call(lazyRoutes_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n return allLazyRoutes;\n var e_4, _a;\n }\n var e_3, _d, e_2, _c;\n };\n return AotCompiler;\n}());\nfunction _createEmptyStub(outputCtx) {\n // Note: We need to produce at least one import statement so that\n // TypeScript knows that the file is an es6 module. Otherwise our generated\n // exports / imports won't be emitted properly by TypeScript.\n outputCtx.statements.push(importExpr(Identifiers.ComponentFactory).toStmt());\n}\nfunction _resolveStyleStatements(symbolResolver, compileResult, needsShim, fileSuffix) {\n compileResult.dependencies.forEach(function (dep) {\n dep.setValue(symbolResolver.getStaticSymbol(_stylesModuleUrl(dep.moduleUrl, needsShim, fileSuffix), dep.name));\n });\n}\nfunction _stylesModuleUrl(stylesheetUrl, shim, suffix) {\n return \"\" + stylesheetUrl + (shim ? '.shim' : '') + \".ngstyle\" + suffix;\n}\nfunction analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {\n var files = _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver);\n return mergeAnalyzedFiles(files);\n}\nfunction analyzeAndValidateNgModules(fileNames, host, staticSymbolResolver, metadataResolver) {\n return validateAnalyzedModules(analyzeNgModules(fileNames, host, staticSymbolResolver, metadataResolver));\n}\nfunction validateAnalyzedModules(analyzedModules) {\n if (analyzedModules.symbolsMissingModule && analyzedModules.symbolsMissingModule.length) {\n var messages = analyzedModules.symbolsMissingModule.map(function (s) {\n return \"Cannot determine the module for class \" + s.name + \" in \" + s.filePath + \"! Add \" + s.name + \" to the NgModule to fix it.\";\n });\n throw syntaxError(messages.join('\\n'));\n }\n return analyzedModules;\n}\n// Analyzes all of the program files,\n// including files that are not part of the program\n// but are referenced by an NgModule.\nfunction _analyzeFilesIncludingNonProgramFiles(fileNames, host, staticSymbolResolver, metadataResolver) {\n var seenFiles = new Set();\n var files = [];\n var visitFile = function (fileName) {\n if (seenFiles.has(fileName) || !host.isSourceFile(fileName)) {\n return false;\n }\n seenFiles.add(fileName);\n var analyzedFile = analyzeFile(host, staticSymbolResolver, metadataResolver, fileName);\n files.push(analyzedFile);\n analyzedFile.ngModules.forEach(function (ngModule) {\n ngModule.transitiveModule.modules.forEach(function (modMeta) { return visitFile(modMeta.reference.filePath); });\n });\n };\n fileNames.forEach(function (fileName) { return visitFile(fileName); });\n return files;\n}\nfunction analyzeFile(host, staticSymbolResolver, metadataResolver, fileName) {\n var directives = [];\n var pipes = [];\n var injectables = [];\n var ngModules = [];\n var hasDecorators = staticSymbolResolver.hasDecorators(fileName);\n var exportsNonSourceFiles = false;\n // Don't analyze .d.ts files that have no decorators as a shortcut\n // to speed up the analysis. This prevents us from\n // resolving the references in these files.\n // Note: exportsNonSourceFiles is only needed when compiling with summaries,\n // which is not the case when .d.ts files are treated as input files.\n if (!fileName.endsWith('.d.ts') || hasDecorators) {\n staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {\n var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n var symbolMeta = resolvedSymbol.metadata;\n if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n return;\n }\n var isNgSymbol = false;\n if (symbolMeta.__symbolic === 'class') {\n if (metadataResolver.isDirective(symbol)) {\n isNgSymbol = true;\n directives.push(symbol);\n }\n else if (metadataResolver.isPipe(symbol)) {\n isNgSymbol = true;\n pipes.push(symbol);\n }\n else if (metadataResolver.isNgModule(symbol)) {\n var ngModule = metadataResolver.getNgModuleMetadata(symbol, false);\n if (ngModule) {\n isNgSymbol = true;\n ngModules.push(ngModule);\n }\n }\n else if (metadataResolver.isInjectable(symbol)) {\n isNgSymbol = true;\n var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n if (injectable) {\n injectables.push(injectable);\n }\n }\n }\n if (!isNgSymbol) {\n exportsNonSourceFiles =\n exportsNonSourceFiles || isValueExportingNonSourceFile(host, symbolMeta);\n }\n });\n }\n return {\n fileName: fileName, directives: directives, pipes: pipes, ngModules: ngModules, injectables: injectables, exportsNonSourceFiles: exportsNonSourceFiles,\n };\n}\nfunction analyzeFileForInjectables(host, staticSymbolResolver, metadataResolver, fileName) {\n var injectables = [];\n var shallowModules = [];\n if (staticSymbolResolver.hasDecorators(fileName)) {\n staticSymbolResolver.getSymbolsOf(fileName).forEach(function (symbol) {\n var resolvedSymbol = staticSymbolResolver.resolveSymbol(symbol);\n var symbolMeta = resolvedSymbol.metadata;\n if (!symbolMeta || symbolMeta.__symbolic === 'error') {\n return;\n }\n if (symbolMeta.__symbolic === 'class') {\n if (metadataResolver.isInjectable(symbol)) {\n var injectable = metadataResolver.getInjectableMetadata(symbol, null, false);\n if (injectable) {\n injectables.push(injectable);\n }\n }\n else if (metadataResolver.isNgModule(symbol)) {\n var module = metadataResolver.getShallowModuleMetadata(symbol);\n if (module) {\n shallowModules.push(module);\n }\n }\n }\n });\n }\n return { fileName: fileName, injectables: injectables, shallowModules: shallowModules };\n}\nfunction isValueExportingNonSourceFile(host, metadata) {\n var exportsNonSourceFiles = false;\n var Visitor = /** @class */ (function () {\n function Visitor() {\n }\n Visitor.prototype.visitArray = function (arr, context) {\n var _this = this;\n arr.forEach(function (v) { return visitValue(v, _this, context); });\n };\n Visitor.prototype.visitStringMap = function (map, context) {\n var _this = this;\n Object.keys(map).forEach(function (key) { return visitValue(map[key], _this, context); });\n };\n Visitor.prototype.visitPrimitive = function (value, context) { };\n Visitor.prototype.visitOther = function (value, context) {\n if (value instanceof StaticSymbol && !host.isSourceFile(value.filePath)) {\n exportsNonSourceFiles = true;\n }\n };\n return Visitor;\n }());\n visitValue(metadata, new Visitor(), null);\n return exportsNonSourceFiles;\n}\nfunction mergeAnalyzedFiles(analyzedFiles) {\n var allNgModules = [];\n var ngModuleByPipeOrDirective = new Map();\n var allPipesAndDirectives = new Set();\n analyzedFiles.forEach(function (af) {\n af.ngModules.forEach(function (ngModule) {\n allNgModules.push(ngModule);\n ngModule.declaredDirectives.forEach(function (d) { return ngModuleByPipeOrDirective.set(d.reference, ngModule); });\n ngModule.declaredPipes.forEach(function (p) { return ngModuleByPipeOrDirective.set(p.reference, ngModule); });\n });\n af.directives.forEach(function (d) { return allPipesAndDirectives.add(d); });\n af.pipes.forEach(function (p) { return allPipesAndDirectives.add(p); });\n });\n var symbolsMissingModule = [];\n allPipesAndDirectives.forEach(function (ref) {\n if (!ngModuleByPipeOrDirective.has(ref)) {\n symbolsMissingModule.push(ref);\n }\n });\n return {\n ngModules: allNgModules,\n ngModuleByPipeOrDirective: ngModuleByPipeOrDirective,\n symbolsMissingModule: symbolsMissingModule,\n files: analyzedFiles\n };\n}\nfunction mergeAndValidateNgFiles(files) {\n return validateAnalyzedModules(mergeAnalyzedFiles(files));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 FORMATTED_MESSAGE = 'ngFormattedMessage';\nfunction indentStr(level) {\n if (level <= 0)\n return '';\n if (level < 6)\n return ['', ' ', ' ', ' ', ' ', ' '][level];\n var half = indentStr(Math.floor(level / 2));\n return half + half + (level % 2 === 1 ? ' ' : '');\n}\nfunction formatChain(chain, indent) {\n if (indent === void 0) { indent = 0; }\n if (!chain)\n return '';\n var position = chain.position ?\n chain.position.fileName + \"(\" + (chain.position.line + 1) + \",\" + (chain.position.column + 1) + \")\" :\n '';\n var prefix = position && indent === 0 ? position + \": \" : '';\n var postfix = position && indent !== 0 ? \" at \" + position : '';\n var message = \"\" + prefix + chain.message + postfix;\n return \"\" + indentStr(indent) + message + ((chain.next && ('\\n' + formatChain(chain.next, indent + 2))) || '');\n}\nfunction formattedError(chain) {\n var message = formatChain(chain) + '.';\n var error$$1 = syntaxError(message);\n error$$1[FORMATTED_MESSAGE] = true;\n error$$1.chain = chain;\n error$$1.position = chain.position;\n return error$$1;\n}\nfunction isFormattedError(error$$1) {\n return !!error$$1[FORMATTED_MESSAGE];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ANGULAR_CORE = '@angular/core';\nvar ANGULAR_ROUTER = '@angular/router';\nvar HIDDEN_KEY = /^\\$.*\\$$/;\nvar IGNORE = {\n __symbolic: 'ignore'\n};\nvar USE_VALUE = 'useValue';\nvar PROVIDE = 'provide';\nvar REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data', 'id', 'loadChildren']);\nvar TYPEGUARD_POSTFIX = 'TypeGuard';\nvar USE_IF = 'UseIf';\nfunction shouldIgnore(value) {\n return value && value.__symbolic == 'ignore';\n}\n/**\n * A static reflector implements enough of the Reflector API that is necessary to compile\n * templates statically.\n */\nvar StaticReflector = /** @class */ (function () {\n function StaticReflector(summaryResolver, symbolResolver, knownMetadataClasses, knownMetadataFunctions, errorRecorder) {\n if (knownMetadataClasses === void 0) { knownMetadataClasses = []; }\n if (knownMetadataFunctions === void 0) { knownMetadataFunctions = []; }\n var _this = this;\n this.summaryResolver = summaryResolver;\n this.symbolResolver = symbolResolver;\n this.errorRecorder = errorRecorder;\n this.annotationCache = new Map();\n this.shallowAnnotationCache = new Map();\n this.propertyCache = new Map();\n this.parameterCache = new Map();\n this.methodCache = new Map();\n this.staticCache = new Map();\n this.conversionMap = new Map();\n this.resolvedExternalReferences = new Map();\n this.annotationForParentClassWithSummaryKind = new Map();\n this.initializeConversionMap();\n knownMetadataClasses.forEach(function (kc) { return _this._registerDecoratorOrConstructor(_this.getStaticSymbol(kc.filePath, kc.name), kc.ctor); });\n knownMetadataFunctions.forEach(function (kf) { return _this._registerFunction(_this.getStaticSymbol(kf.filePath, kf.name), kf.fn); });\n this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Directive, [createDirective, createComponent]);\n this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Pipe, [createPipe]);\n this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.NgModule, [createNgModule]);\n this.annotationForParentClassWithSummaryKind.set(CompileSummaryKind.Injectable, [createInjectable, createPipe, createDirective, createComponent, createNgModule]);\n }\n StaticReflector.prototype.componentModuleUrl = function (typeOrFunc) {\n var staticSymbol = this.findSymbolDeclaration(typeOrFunc);\n return this.symbolResolver.getResourcePath(staticSymbol);\n };\n StaticReflector.prototype.resolveExternalReference = function (ref, containingFile) {\n var key = undefined;\n if (!containingFile) {\n key = ref.moduleName + \":\" + ref.name;\n var declarationSymbol_1 = this.resolvedExternalReferences.get(key);\n if (declarationSymbol_1)\n return declarationSymbol_1;\n }\n var refSymbol = this.symbolResolver.getSymbolByModule(ref.moduleName, ref.name, containingFile);\n var declarationSymbol = this.findSymbolDeclaration(refSymbol);\n if (!containingFile) {\n this.symbolResolver.recordModuleNameForFileName(refSymbol.filePath, ref.moduleName);\n this.symbolResolver.recordImportAs(declarationSymbol, refSymbol);\n }\n if (key) {\n this.resolvedExternalReferences.set(key, declarationSymbol);\n }\n return declarationSymbol;\n };\n StaticReflector.prototype.findDeclaration = function (moduleUrl, name, containingFile) {\n return this.findSymbolDeclaration(this.symbolResolver.getSymbolByModule(moduleUrl, name, containingFile));\n };\n StaticReflector.prototype.tryFindDeclaration = function (moduleUrl, name, containingFile) {\n var _this = this;\n return this.symbolResolver.ignoreErrorsFor(function () { return _this.findDeclaration(moduleUrl, name, containingFile); });\n };\n StaticReflector.prototype.findSymbolDeclaration = function (symbol) {\n var resolvedSymbol = this.symbolResolver.resolveSymbol(symbol);\n if (resolvedSymbol) {\n var resolvedMetadata = resolvedSymbol.metadata;\n if (resolvedMetadata && resolvedMetadata.__symbolic === 'resolved') {\n resolvedMetadata = resolvedMetadata.symbol;\n }\n if (resolvedMetadata instanceof StaticSymbol) {\n return this.findSymbolDeclaration(resolvedSymbol.metadata);\n }\n }\n return symbol;\n };\n StaticReflector.prototype.tryAnnotations = function (type) {\n var originalRecorder = this.errorRecorder;\n this.errorRecorder = function (error$$1, fileName) { };\n try {\n return this.annotations(type);\n }\n finally {\n this.errorRecorder = originalRecorder;\n }\n };\n StaticReflector.prototype.annotations = function (type) {\n var _this = this;\n return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators); }, this.annotationCache);\n };\n StaticReflector.prototype.shallowAnnotations = function (type) {\n var _this = this;\n return this._annotations(type, function (type, decorators) { return _this.simplify(type, decorators, true); }, this.shallowAnnotationCache);\n };\n StaticReflector.prototype._annotations = function (type, simplify, annotationCache) {\n var annotations = annotationCache.get(type);\n if (!annotations) {\n annotations = [];\n var classMetadata = this.getTypeMetadata(type);\n var parentType = this.findParentType(type, classMetadata);\n if (parentType) {\n var parentAnnotations = this.annotations(parentType);\n annotations.push.apply(annotations, __spread(parentAnnotations));\n }\n var ownAnnotations_1 = [];\n if (classMetadata['decorators']) {\n ownAnnotations_1 = simplify(type, classMetadata['decorators']);\n if (ownAnnotations_1) {\n annotations.push.apply(annotations, __spread(ownAnnotations_1));\n }\n }\n if (parentType && !this.summaryResolver.isLibraryFile(type.filePath) &&\n this.summaryResolver.isLibraryFile(parentType.filePath)) {\n var summary = this.summaryResolver.resolveSummary(parentType);\n if (summary && summary.type) {\n var requiredAnnotationTypes = this.annotationForParentClassWithSummaryKind.get(summary.type.summaryKind);\n var typeHasRequiredAnnotation = requiredAnnotationTypes.some(function (requiredType) { return ownAnnotations_1.some(function (ann) { return requiredType.isTypeOf(ann); }); });\n if (!typeHasRequiredAnnotation) {\n this.reportError(formatMetadataError(metadataError(\"Class \" + type.name + \" in \" + type.filePath + \" extends from a \" + CompileSummaryKind[summary.type.summaryKind] + \" in another compilation unit without duplicating the decorator\", \n /* summary */ undefined, \"Please add a \" + requiredAnnotationTypes.map(function (type) { return type.ngMetadataName; }).join(' or ') + \" decorator to the class\"), type), type);\n }\n }\n }\n annotationCache.set(type, annotations.filter(function (ann) { return !!ann; }));\n }\n return annotations;\n };\n StaticReflector.prototype.propMetadata = function (type) {\n var _this = this;\n var propMetadata = this.propertyCache.get(type);\n if (!propMetadata) {\n var classMetadata = this.getTypeMetadata(type);\n propMetadata = {};\n var parentType = this.findParentType(type, classMetadata);\n if (parentType) {\n var parentPropMetadata_1 = this.propMetadata(parentType);\n Object.keys(parentPropMetadata_1).forEach(function (parentProp) {\n propMetadata[parentProp] = parentPropMetadata_1[parentProp];\n });\n }\n var members_1 = classMetadata['members'] || {};\n Object.keys(members_1).forEach(function (propName) {\n var propData = members_1[propName];\n var prop = propData\n .find(function (a) { return a['__symbolic'] == 'property' || a['__symbolic'] == 'method'; });\n var decorators = [];\n if (propMetadata[propName]) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n propMetadata[propName] = decorators;\n if (prop && prop['decorators']) {\n decorators.push.apply(decorators, __spread(_this.simplify(type, prop['decorators'])));\n }\n });\n this.propertyCache.set(type, propMetadata);\n }\n return propMetadata;\n };\n StaticReflector.prototype.parameters = function (type) {\n var _this = this;\n if (!(type instanceof StaticSymbol)) {\n this.reportError(new Error(\"parameters received \" + JSON.stringify(type) + \" which is not a StaticSymbol\"), type);\n return [];\n }\n try {\n var parameters_1 = this.parameterCache.get(type);\n if (!parameters_1) {\n var classMetadata = this.getTypeMetadata(type);\n var parentType = this.findParentType(type, classMetadata);\n var members = classMetadata ? classMetadata['members'] : null;\n var ctorData = members ? members['__ctor__'] : null;\n if (ctorData) {\n var ctor = ctorData.find(function (a) { return a['__symbolic'] == 'constructor'; });\n var rawParameterTypes = ctor['parameters'] || [];\n var parameterDecorators_1 = this.simplify(type, ctor['parameterDecorators'] || []);\n parameters_1 = [];\n rawParameterTypes.forEach(function (rawParamType, index) {\n var nestedResult = [];\n var paramType = _this.trySimplify(type, rawParamType);\n if (paramType)\n nestedResult.push(paramType);\n var decorators = parameterDecorators_1 ? parameterDecorators_1[index] : null;\n if (decorators) {\n nestedResult.push.apply(nestedResult, __spread(decorators));\n }\n parameters_1.push(nestedResult);\n });\n }\n else if (parentType) {\n parameters_1 = this.parameters(parentType);\n }\n if (!parameters_1) {\n parameters_1 = [];\n }\n this.parameterCache.set(type, parameters_1);\n }\n return parameters_1;\n }\n catch (e) {\n console.error(\"Failed on type \" + JSON.stringify(type) + \" with error \" + e);\n throw e;\n }\n };\n StaticReflector.prototype._methodNames = function (type) {\n var methodNames = this.methodCache.get(type);\n if (!methodNames) {\n var classMetadata = this.getTypeMetadata(type);\n methodNames = {};\n var parentType = this.findParentType(type, classMetadata);\n if (parentType) {\n var parentMethodNames_1 = this._methodNames(parentType);\n Object.keys(parentMethodNames_1).forEach(function (parentProp) {\n methodNames[parentProp] = parentMethodNames_1[parentProp];\n });\n }\n var members_2 = classMetadata['members'] || {};\n Object.keys(members_2).forEach(function (propName) {\n var propData = members_2[propName];\n var isMethod = propData.some(function (a) { return a['__symbolic'] == 'method'; });\n methodNames[propName] = methodNames[propName] || isMethod;\n });\n this.methodCache.set(type, methodNames);\n }\n return methodNames;\n };\n StaticReflector.prototype._staticMembers = function (type) {\n var staticMembers = this.staticCache.get(type);\n if (!staticMembers) {\n var classMetadata = this.getTypeMetadata(type);\n var staticMemberData = classMetadata['statics'] || {};\n staticMembers = Object.keys(staticMemberData);\n this.staticCache.set(type, staticMembers);\n }\n return staticMembers;\n };\n StaticReflector.prototype.findParentType = function (type, classMetadata) {\n var parentType = this.trySimplify(type, classMetadata['extends']);\n if (parentType instanceof StaticSymbol) {\n return parentType;\n }\n };\n StaticReflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n if (!(type instanceof StaticSymbol)) {\n this.reportError(new Error(\"hasLifecycleHook received \" + JSON.stringify(type) + \" which is not a StaticSymbol\"), type);\n }\n try {\n return !!this._methodNames(type)[lcProperty];\n }\n catch (e) {\n console.error(\"Failed on type \" + JSON.stringify(type) + \" with error \" + e);\n throw e;\n }\n };\n StaticReflector.prototype.guards = function (type) {\n if (!(type instanceof StaticSymbol)) {\n this.reportError(new Error(\"guards received \" + JSON.stringify(type) + \" which is not a StaticSymbol\"), type);\n return {};\n }\n var staticMembers = this._staticMembers(type);\n var result = {};\n try {\n for (var staticMembers_1 = __values(staticMembers), staticMembers_1_1 = staticMembers_1.next(); !staticMembers_1_1.done; staticMembers_1_1 = staticMembers_1.next()) {\n var name_1 = staticMembers_1_1.value;\n if (name_1.endsWith(TYPEGUARD_POSTFIX)) {\n var property = name_1.substr(0, name_1.length - TYPEGUARD_POSTFIX.length);\n var value = void 0;\n if (property.endsWith(USE_IF)) {\n property = name_1.substr(0, property.length - USE_IF.length);\n value = USE_IF;\n }\n else {\n value = this.getStaticSymbol(type.filePath, type.name, [name_1]);\n }\n result[property] = value;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (staticMembers_1_1 && !staticMembers_1_1.done && (_a = staticMembers_1.return)) _a.call(staticMembers_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n var e_1, _a;\n };\n StaticReflector.prototype._registerDecoratorOrConstructor = function (type, ctor) {\n this.conversionMap.set(type, function (context, args) { return new (ctor.bind.apply(ctor, __spread([void 0], args)))(); });\n };\n StaticReflector.prototype._registerFunction = function (type, fn) {\n this.conversionMap.set(type, function (context, args) { return fn.apply(undefined, args); });\n };\n StaticReflector.prototype.initializeConversionMap = function () {\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Injectable'), createInjectable);\n this.injectionToken = this.findDeclaration(ANGULAR_CORE, 'InjectionToken');\n this.opaqueToken = this.findDeclaration(ANGULAR_CORE, 'OpaqueToken');\n this.ROUTES = this.tryFindDeclaration(ANGULAR_ROUTER, 'ROUTES');\n this.ANALYZE_FOR_ENTRY_COMPONENTS =\n this.findDeclaration(ANGULAR_CORE, 'ANALYZE_FOR_ENTRY_COMPONENTS');\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Inject'), createInject);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Attribute'), createAttribute);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChild'), createContentChild);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ContentChildren'), createContentChildren);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChild'), createViewChild);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'ViewChildren'), createViewChildren);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Input'), createInput);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Output'), createOutput);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Pipe'), createPipe);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostBinding'), createHostBinding);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'HostListener'), createHostListener);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Directive'), createDirective);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Component'), createComponent);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'NgModule'), createNgModule);\n // Note: Some metadata classes can be used directly with Provider.deps.\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Host'), createHost);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Self'), createSelf);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'SkipSelf'), createSkipSelf);\n this._registerDecoratorOrConstructor(this.findDeclaration(ANGULAR_CORE, 'Optional'), createOptional);\n };\n /**\n * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.\n * All types passed to the StaticResolver should be pseudo-types returned by this method.\n *\n * @param declarationFile the absolute path of the file where the symbol is declared\n * @param name the name of the type.\n */\n StaticReflector.prototype.getStaticSymbol = function (declarationFile, name, members) {\n return this.symbolResolver.getStaticSymbol(declarationFile, name, members);\n };\n /**\n * Simplify but discard any errors\n */\n StaticReflector.prototype.trySimplify = function (context, value) {\n var originalRecorder = this.errorRecorder;\n this.errorRecorder = function (error$$1, fileName) { };\n var result = this.simplify(context, value);\n this.errorRecorder = originalRecorder;\n return result;\n };\n /** @internal */\n StaticReflector.prototype.simplify = function (context, value, lazy) {\n if (lazy === void 0) { lazy = false; }\n var self = this;\n var scope = BindingScope$1.empty;\n var calling = new Map();\n function simplifyInContext(context, value, depth, references) {\n function resolveReferenceValue(staticSymbol) {\n var resolvedSymbol = self.symbolResolver.resolveSymbol(staticSymbol);\n return resolvedSymbol ? resolvedSymbol.metadata : null;\n }\n function simplifyEagerly(value) {\n return simplifyInContext(context, value, depth, 0);\n }\n function simplifyLazily(value) {\n return simplifyInContext(context, value, depth, references + 1);\n }\n function simplifyNested(nestedContext, value) {\n if (nestedContext === context) {\n // If the context hasn't changed let the exception propagate unmodified.\n return simplifyInContext(nestedContext, value, depth + 1, references);\n }\n try {\n return simplifyInContext(nestedContext, value, depth + 1, references);\n }\n catch (e) {\n if (isMetadataError(e)) {\n // Propagate the message text up but add a message to the chain that explains how we got\n // here.\n // e.chain implies e.symbol\n var summaryMsg = e.chain ? 'references \\'' + e.symbol.name + '\\'' : errorSummary(e);\n var summary = \"'\" + nestedContext.name + \"' \" + summaryMsg;\n var chain = { message: summary, position: e.position, next: e.chain };\n // TODO(chuckj): retrieve the position information indirectly from the collectors node\n // map if the metadata is from a .ts file.\n self.error({\n message: e.message,\n advise: e.advise,\n context: e.context, chain: chain,\n symbol: nestedContext\n }, context);\n }\n else {\n // It is probably an internal error.\n throw e;\n }\n }\n }\n function simplifyCall(functionSymbol, targetFunction, args, targetExpression) {\n if (targetFunction && targetFunction['__symbolic'] == 'function') {\n if (calling.get(functionSymbol)) {\n self.error({\n message: 'Recursion is not supported',\n summary: \"called '\" + functionSymbol.name + \"' recursively\",\n value: targetFunction\n }, functionSymbol);\n }\n try {\n var value_1 = targetFunction['value'];\n if (value_1 && (depth != 0 || value_1.__symbolic != 'error')) {\n var parameters = targetFunction['parameters'];\n var defaults = targetFunction.defaults;\n args = args.map(function (arg) { return simplifyNested(context, arg); })\n .map(function (arg) { return shouldIgnore(arg) ? undefined : arg; });\n if (defaults && defaults.length > args.length) {\n args.push.apply(args, __spread(defaults.slice(args.length).map(function (value) { return simplify(value); })));\n }\n calling.set(functionSymbol, true);\n var functionScope = BindingScope$1.build();\n for (var i = 0; i < parameters.length; i++) {\n functionScope.define(parameters[i], args[i]);\n }\n var oldScope = scope;\n var result_1;\n try {\n scope = functionScope.done();\n result_1 = simplifyNested(functionSymbol, value_1);\n }\n finally {\n scope = oldScope;\n }\n return result_1;\n }\n }\n finally {\n calling.delete(functionSymbol);\n }\n }\n if (depth === 0) {\n // If depth is 0 we are evaluating the top level expression that is describing element\n // decorator. In this case, it is a decorator we don't understand, such as a custom\n // non-angular decorator, and we should just ignore it.\n return IGNORE;\n }\n var position = undefined;\n if (targetExpression && targetExpression.__symbolic == 'resolved') {\n var line = targetExpression.line;\n var character = targetExpression.character;\n var fileName = targetExpression.fileName;\n if (fileName != null && line != null && character != null) {\n position = { fileName: fileName, line: line, column: character };\n }\n }\n self.error({\n message: FUNCTION_CALL_NOT_SUPPORTED,\n context: functionSymbol,\n value: targetFunction, position: position\n }, context);\n }\n function simplify(expression) {\n if (isPrimitive(expression)) {\n return expression;\n }\n if (expression instanceof Array) {\n var result_2 = [];\n try {\n for (var _a = __values(expression), _b = _a.next(); !_b.done; _b = _a.next()) {\n var item = _b.value;\n // Check for a spread expression\n if (item && item.__symbolic === 'spread') {\n // We call with references as 0 because we require the actual value and cannot\n // tolerate a reference here.\n var spreadArray = simplifyEagerly(item.expression);\n if (Array.isArray(spreadArray)) {\n try {\n for (var spreadArray_1 = __values(spreadArray), spreadArray_1_1 = spreadArray_1.next(); !spreadArray_1_1.done; spreadArray_1_1 = spreadArray_1.next()) {\n var spreadItem = spreadArray_1_1.value;\n result_2.push(spreadItem);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (spreadArray_1_1 && !spreadArray_1_1.done && (_c = spreadArray_1.return)) _c.call(spreadArray_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n continue;\n }\n }\n var value_2 = simplify(item);\n if (shouldIgnore(value_2)) {\n continue;\n }\n result_2.push(value_2);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_d = _a.return)) _d.call(_a);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return result_2;\n }\n if (expression instanceof StaticSymbol) {\n // Stop simplification at builtin symbols or if we are in a reference context and\n // the symbol doesn't have members.\n if (expression === self.injectionToken || self.conversionMap.has(expression) ||\n (references > 0 && !expression.members.length)) {\n return expression;\n }\n else {\n var staticSymbol = expression;\n var declarationValue = resolveReferenceValue(staticSymbol);\n if (declarationValue != null) {\n return simplifyNested(staticSymbol, declarationValue);\n }\n else {\n return staticSymbol;\n }\n }\n }\n if (expression) {\n if (expression['__symbolic']) {\n var staticSymbol = void 0;\n switch (expression['__symbolic']) {\n case 'binop':\n var left = simplify(expression['left']);\n if (shouldIgnore(left))\n return left;\n var right = simplify(expression['right']);\n if (shouldIgnore(right))\n return right;\n switch (expression['operator']) {\n case '&&':\n return left && right;\n case '||':\n return left || right;\n case '|':\n return left | right;\n case '^':\n return left ^ right;\n case '&':\n return left & right;\n case '==':\n return left == right;\n case '!=':\n return left != right;\n case '===':\n return left === right;\n case '!==':\n return left !== right;\n case '<':\n return left < right;\n case '>':\n return left > right;\n case '<=':\n return left <= right;\n case '>=':\n return left >= right;\n case '<<':\n return left << right;\n case '>>':\n return left >> right;\n case '+':\n return left + right;\n case '-':\n return left - right;\n case '*':\n return left * right;\n case '/':\n return left / right;\n case '%':\n return left % right;\n }\n return null;\n case 'if':\n var condition = simplify(expression['condition']);\n return condition ? simplify(expression['thenExpression']) :\n simplify(expression['elseExpression']);\n case 'pre':\n var operand = simplify(expression['operand']);\n if (shouldIgnore(operand))\n return operand;\n switch (expression['operator']) {\n case '+':\n return operand;\n case '-':\n return -operand;\n case '!':\n return !operand;\n case '~':\n return ~operand;\n }\n return null;\n case 'index':\n var indexTarget = simplifyEagerly(expression['expression']);\n var index = simplifyEagerly(expression['index']);\n if (indexTarget && isPrimitive(index))\n return indexTarget[index];\n return null;\n case 'select':\n var member = expression['member'];\n var selectContext = context;\n var selectTarget = simplify(expression['expression']);\n if (selectTarget instanceof StaticSymbol) {\n var members = selectTarget.members.concat(member);\n selectContext =\n self.getStaticSymbol(selectTarget.filePath, selectTarget.name, members);\n var declarationValue = resolveReferenceValue(selectContext);\n if (declarationValue != null) {\n return simplifyNested(selectContext, declarationValue);\n }\n else {\n return selectContext;\n }\n }\n if (selectTarget && isPrimitive(member))\n return simplifyNested(selectContext, selectTarget[member]);\n return null;\n case 'reference':\n // Note: This only has to deal with variable references, as symbol references have\n // been converted into 'resolved'\n // in the StaticSymbolResolver.\n var name_2 = expression['name'];\n var localValue = scope.resolve(name_2);\n if (localValue != BindingScope$1.missing) {\n return localValue;\n }\n break;\n case 'resolved':\n try {\n return simplify(expression.symbol);\n }\n catch (e) {\n // If an error is reported evaluating the symbol record the position of the\n // reference in the error so it can\n // be reported in the error message generated from the exception.\n if (isMetadataError(e) && expression.fileName != null &&\n expression.line != null && expression.character != null) {\n e.position = {\n fileName: expression.fileName,\n line: expression.line,\n column: expression.character\n };\n }\n throw e;\n }\n case 'class':\n return context;\n case 'function':\n return context;\n case 'new':\n case 'call':\n // Determine if the function is a built-in conversion\n staticSymbol = simplifyInContext(context, expression['expression'], depth + 1, /* references */ 0);\n if (staticSymbol instanceof StaticSymbol) {\n if (staticSymbol === self.injectionToken || staticSymbol === self.opaqueToken) {\n // if somebody calls new InjectionToken, don't create an InjectionToken,\n // but rather return the symbol to which the InjectionToken is assigned to.\n // OpaqueToken is supported too as it is required by the language service to\n // support v4 and prior versions of Angular.\n return context;\n }\n var argExpressions = expression['arguments'] || [];\n var converter = self.conversionMap.get(staticSymbol);\n if (converter) {\n var args = argExpressions.map(function (arg) { return simplifyNested(context, arg); })\n .map(function (arg) { return shouldIgnore(arg) ? undefined : arg; });\n return converter(context, args);\n }\n else {\n // Determine if the function is one we can simplify.\n var targetFunction = resolveReferenceValue(staticSymbol);\n return simplifyCall(staticSymbol, targetFunction, argExpressions, expression['expression']);\n }\n }\n return IGNORE;\n case 'error':\n var message = expression.message;\n if (expression['line'] != null) {\n self.error({\n message: message,\n context: expression.context,\n value: expression,\n position: {\n fileName: expression['fileName'],\n line: expression['line'],\n column: expression['character']\n }\n }, context);\n }\n else {\n self.error({ message: message, context: expression.context }, context);\n }\n return IGNORE;\n case 'ignore':\n return expression;\n }\n return null;\n }\n return mapStringMap(expression, function (value, name) {\n if (REFERENCE_SET.has(name)) {\n if (name === USE_VALUE && PROVIDE in expression) {\n // If this is a provider expression, check for special tokens that need the value\n // during analysis.\n var provide = simplify(expression.provide);\n if (provide === self.ROUTES || provide == self.ANALYZE_FOR_ENTRY_COMPONENTS) {\n return simplify(value);\n }\n }\n return simplifyLazily(value);\n }\n return simplify(value);\n });\n }\n return IGNORE;\n var e_3, _d, e_2, _c;\n }\n return simplify(value);\n }\n var result;\n try {\n result = simplifyInContext(context, value, 0, lazy ? 1 : 0);\n }\n catch (e) {\n if (this.errorRecorder) {\n this.reportError(e, context);\n }\n else {\n throw formatMetadataError(e, context);\n }\n }\n if (shouldIgnore(result)) {\n return undefined;\n }\n return result;\n };\n StaticReflector.prototype.getTypeMetadata = function (type) {\n var resolvedSymbol = this.symbolResolver.resolveSymbol(type);\n return resolvedSymbol && resolvedSymbol.metadata ? resolvedSymbol.metadata :\n { __symbolic: 'class' };\n };\n StaticReflector.prototype.reportError = function (error$$1, context, path) {\n if (this.errorRecorder) {\n this.errorRecorder(formatMetadataError(error$$1, context), (context && context.filePath) || path);\n }\n else {\n throw error$$1;\n }\n };\n StaticReflector.prototype.error = function (_a, reportingContext) {\n var message = _a.message, summary = _a.summary, advise = _a.advise, position = _a.position, context = _a.context, value = _a.value, symbol = _a.symbol, chain = _a.chain;\n this.reportError(metadataError(message, summary, advise, position, symbol, context, chain), reportingContext);\n };\n return StaticReflector;\n}());\nvar METADATA_ERROR = 'ngMetadataError';\nfunction metadataError(message, summary, advise, position, symbol, context, chain) {\n var error$$1 = syntaxError(message);\n error$$1[METADATA_ERROR] = true;\n if (advise)\n error$$1.advise = advise;\n if (position)\n error$$1.position = position;\n if (summary)\n error$$1.summary = summary;\n if (context)\n error$$1.context = context;\n if (chain)\n error$$1.chain = chain;\n if (symbol)\n error$$1.symbol = symbol;\n return error$$1;\n}\nfunction isMetadataError(error$$1) {\n return !!error$$1[METADATA_ERROR];\n}\nvar REFERENCE_TO_NONEXPORTED_CLASS = 'Reference to non-exported class';\nvar VARIABLE_NOT_INITIALIZED = 'Variable not initialized';\nvar DESTRUCTURE_NOT_SUPPORTED = 'Destructuring not supported';\nvar COULD_NOT_RESOLVE_TYPE = 'Could not resolve type';\nvar FUNCTION_CALL_NOT_SUPPORTED = 'Function call not supported';\nvar REFERENCE_TO_LOCAL_SYMBOL = 'Reference to a local symbol';\nvar LAMBDA_NOT_SUPPORTED = 'Lambda not supported';\nfunction expandedMessage(message, context) {\n switch (message) {\n case REFERENCE_TO_NONEXPORTED_CLASS:\n if (context && context.className) {\n return \"References to a non-exported class are not supported in decorators but \" + context.className + \" was referenced.\";\n }\n break;\n case VARIABLE_NOT_INITIALIZED:\n return 'Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler';\n case DESTRUCTURE_NOT_SUPPORTED:\n return 'Referencing an exported destructured variable or constant is not supported in decorators and this value is needed by the template compiler';\n case COULD_NOT_RESOLVE_TYPE:\n if (context && context.typeName) {\n return \"Could not resolve type \" + context.typeName;\n }\n break;\n case FUNCTION_CALL_NOT_SUPPORTED:\n if (context && context.name) {\n return \"Function calls are not supported in decorators but '\" + context.name + \"' was called\";\n }\n return 'Function calls are not supported in decorators';\n case REFERENCE_TO_LOCAL_SYMBOL:\n if (context && context.name) {\n return \"Reference to a local (non-exported) symbols are not supported in decorators but '\" + context.name + \"' was referenced\";\n }\n break;\n case LAMBDA_NOT_SUPPORTED:\n return \"Function expressions are not supported in decorators\";\n }\n return message;\n}\nfunction messageAdvise(message, context) {\n switch (message) {\n case REFERENCE_TO_NONEXPORTED_CLASS:\n if (context && context.className) {\n return \"Consider exporting '\" + context.className + \"'\";\n }\n break;\n case DESTRUCTURE_NOT_SUPPORTED:\n return 'Consider simplifying to avoid destructuring';\n case REFERENCE_TO_LOCAL_SYMBOL:\n if (context && context.name) {\n return \"Consider exporting '\" + context.name + \"'\";\n }\n break;\n case LAMBDA_NOT_SUPPORTED:\n return \"Consider changing the function expression into an exported function\";\n }\n return undefined;\n}\nfunction errorSummary(error$$1) {\n if (error$$1.summary) {\n return error$$1.summary;\n }\n switch (error$$1.message) {\n case REFERENCE_TO_NONEXPORTED_CLASS:\n if (error$$1.context && error$$1.context.className) {\n return \"references non-exported class \" + error$$1.context.className;\n }\n break;\n case VARIABLE_NOT_INITIALIZED:\n return 'is not initialized';\n case DESTRUCTURE_NOT_SUPPORTED:\n return 'is a destructured variable';\n case COULD_NOT_RESOLVE_TYPE:\n return 'could not be resolved';\n case FUNCTION_CALL_NOT_SUPPORTED:\n if (error$$1.context && error$$1.context.name) {\n return \"calls '\" + error$$1.context.name + \"'\";\n }\n return \"calls a function\";\n case REFERENCE_TO_LOCAL_SYMBOL:\n if (error$$1.context && error$$1.context.name) {\n return \"references local variable \" + error$$1.context.name;\n }\n return \"references a local variable\";\n }\n return 'contains the error';\n}\nfunction mapStringMap(input, transform) {\n if (!input)\n return {};\n var result = {};\n Object.keys(input).forEach(function (key) {\n var value = transform(input[key], key);\n if (!shouldIgnore(value)) {\n if (HIDDEN_KEY.test(key)) {\n Object.defineProperty(result, key, { enumerable: false, configurable: true, value: value });\n }\n else {\n result[key] = value;\n }\n }\n });\n return result;\n}\nfunction isPrimitive(o) {\n return o === null || (typeof o !== 'function' && typeof o !== 'object');\n}\nvar BindingScope$1 = /** @class */ (function () {\n function BindingScope() {\n }\n BindingScope.build = function () {\n var current = new Map();\n return {\n define: function (name, value) {\n current.set(name, value);\n return this;\n },\n done: function () {\n return current.size > 0 ? new PopulatedScope(current) : BindingScope.empty;\n }\n };\n };\n BindingScope.missing = {};\n BindingScope.empty = { resolve: function (name) { return BindingScope.missing; } };\n return BindingScope;\n}());\nvar PopulatedScope = /** @class */ (function (_super) {\n __extends(PopulatedScope, _super);\n function PopulatedScope(bindings) {\n var _this = _super.call(this) || this;\n _this.bindings = bindings;\n return _this;\n }\n PopulatedScope.prototype.resolve = function (name) {\n return this.bindings.has(name) ? this.bindings.get(name) : BindingScope$1.missing;\n };\n return PopulatedScope;\n}(BindingScope$1));\nfunction formatMetadataMessageChain(chain, advise) {\n var expanded = expandedMessage(chain.message, chain.context);\n var nesting = chain.symbol ? \" in '\" + chain.symbol.name + \"'\" : '';\n var message = \"\" + expanded + nesting;\n var position = chain.position;\n var next = chain.next ?\n formatMetadataMessageChain(chain.next, advise) :\n advise ? { message: advise } : undefined;\n return { message: message, position: position, next: next };\n}\nfunction formatMetadataError(e, context) {\n if (isMetadataError(e)) {\n // Produce a formatted version of the and leaving enough information in the original error\n // to recover the formatting information to eventually produce a diagnostic error message.\n var position = e.position;\n var chain = {\n message: \"Error during template compile of '\" + context.name + \"'\",\n position: position,\n next: { message: e.message, next: e.chain, context: e.context, symbol: e.symbol }\n };\n var advise = e.advise || messageAdvise(e.message, e.context);\n return formattedError(formatMetadataMessageChain(chain, advise));\n }\n return e;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 AotSummaryResolver = /** @class */ (function () {\n function AotSummaryResolver(host, staticSymbolCache) {\n this.host = host;\n this.staticSymbolCache = staticSymbolCache;\n // Note: this will only contain StaticSymbols without members!\n this.summaryCache = new Map();\n this.loadedFilePaths = new Map();\n // Note: this will only contain StaticSymbols without members!\n this.importAs = new Map();\n this.knownFileNameToModuleNames = new Map();\n }\n AotSummaryResolver.prototype.isLibraryFile = function (filePath) {\n // Note: We need to strip the .ngfactory. file path,\n // so this method also works for generated files\n // (for which host.isSourceFile will always return false).\n return !this.host.isSourceFile(stripGeneratedFileSuffix(filePath));\n };\n AotSummaryResolver.prototype.toSummaryFileName = function (filePath, referringSrcFileName) {\n return this.host.toSummaryFileName(filePath, referringSrcFileName);\n };\n AotSummaryResolver.prototype.fromSummaryFileName = function (fileName, referringLibFileName) {\n return this.host.fromSummaryFileName(fileName, referringLibFileName);\n };\n AotSummaryResolver.prototype.resolveSummary = function (staticSymbol) {\n var rootSymbol = staticSymbol.members.length ?\n this.staticSymbolCache.get(staticSymbol.filePath, staticSymbol.name) :\n staticSymbol;\n var summary = this.summaryCache.get(rootSymbol);\n if (!summary) {\n this._loadSummaryFile(staticSymbol.filePath);\n summary = this.summaryCache.get(staticSymbol);\n }\n return (rootSymbol === staticSymbol && summary) || null;\n };\n AotSummaryResolver.prototype.getSymbolsOf = function (filePath) {\n if (this._loadSummaryFile(filePath)) {\n return Array.from(this.summaryCache.keys()).filter(function (symbol) { return symbol.filePath === filePath; });\n }\n return null;\n };\n AotSummaryResolver.prototype.getImportAs = function (staticSymbol) {\n staticSymbol.assertNoMembers();\n return this.importAs.get(staticSymbol);\n };\n /**\n * Converts a file path to a module name that can be used as an `import`.\n */\n AotSummaryResolver.prototype.getKnownModuleName = function (importedFilePath) {\n return this.knownFileNameToModuleNames.get(importedFilePath) || null;\n };\n AotSummaryResolver.prototype.addSummary = function (summary) { this.summaryCache.set(summary.symbol, summary); };\n AotSummaryResolver.prototype._loadSummaryFile = function (filePath) {\n var _this = this;\n var hasSummary = this.loadedFilePaths.get(filePath);\n if (hasSummary != null) {\n return hasSummary;\n }\n var json = null;\n if (this.isLibraryFile(filePath)) {\n var summaryFilePath = summaryFileName(filePath);\n try {\n json = this.host.loadSummary(summaryFilePath);\n }\n catch (e) {\n console.error(\"Error loading summary file \" + summaryFilePath);\n throw e;\n }\n }\n hasSummary = json != null;\n this.loadedFilePaths.set(filePath, hasSummary);\n if (json) {\n var _a = deserializeSummaries(this.staticSymbolCache, this, filePath, json), moduleName = _a.moduleName, summaries = _a.summaries, importAs = _a.importAs;\n summaries.forEach(function (summary) { return _this.summaryCache.set(summary.symbol, summary); });\n if (moduleName) {\n this.knownFileNameToModuleNames.set(filePath, moduleName);\n }\n importAs.forEach(function (importAs) { _this.importAs.set(importAs.symbol, importAs.importAs); });\n }\n return hasSummary;\n };\n return AotSummaryResolver;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 createAotUrlResolver(host) {\n return {\n resolve: function (basePath, url) {\n var filePath = host.resourceNameToFileName(url, basePath);\n if (!filePath) {\n throw syntaxError(\"Couldn't resolve resource \" + url + \" from \" + basePath);\n }\n return filePath;\n }\n };\n}\n/**\n * Creates a new AotCompiler based on options and a host.\n */\nfunction createAotCompiler(compilerHost, options, errorCollector) {\n var translations = options.translations || '';\n var urlResolver = createAotUrlResolver(compilerHost);\n var symbolCache = new StaticSymbolCache();\n var summaryResolver = new AotSummaryResolver(compilerHost, symbolCache);\n var symbolResolver = new StaticSymbolResolver(compilerHost, symbolCache, summaryResolver);\n var staticReflector = new StaticReflector(summaryResolver, symbolResolver, [], [], errorCollector);\n var htmlParser;\n if (!!options.enableIvy) {\n // Ivy handles i18n at the compiler level so we must use a regular parser\n htmlParser = new HtmlParser();\n }\n else {\n htmlParser = new I18NHtmlParser(new HtmlParser(), translations, options.i18nFormat, options.missingTranslation, console);\n }\n var config = new CompilerConfig({\n defaultEncapsulation: ViewEncapsulation.Emulated,\n useJit: false,\n missingTranslation: options.missingTranslation,\n preserveWhitespaces: options.preserveWhitespaces,\n strictInjectionParameters: options.strictInjectionParameters,\n });\n var normalizer = new DirectiveNormalizer({ get: function (url) { return compilerHost.loadResource(url); } }, urlResolver, htmlParser, config);\n var expressionParser = new Parser(new Lexer());\n var elementSchemaRegistry = new DomElementSchemaRegistry();\n var tmplParser = new TemplateParser(config, staticReflector, expressionParser, elementSchemaRegistry, htmlParser, console, []);\n var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector, errorCollector);\n // TODO(vicb): do not pass options.i18nFormat here\n var viewCompiler = new ViewCompiler(staticReflector);\n var typeCheckCompiler = new TypeCheckCompiler(options, staticReflector);\n var compiler = new AotCompiler(config, options, compilerHost, staticReflector, resolver, tmplParser, new StyleCompiler(urlResolver), viewCompiler, typeCheckCompiler, new NgModuleCompiler(staticReflector), new InjectableCompiler(staticReflector, !!options.enableIvy), new TypeScriptEmitter(), summaryResolver, symbolResolver);\n return { compiler: compiler, reflector: staticReflector };\n}\n\nvar SummaryResolver = /** @class */ (function () {\n function SummaryResolver() {\n }\n return SummaryResolver;\n}());\nvar JitSummaryResolver = /** @class */ (function () {\n function JitSummaryResolver() {\n this._summaries = new Map();\n }\n JitSummaryResolver.prototype.isLibraryFile = function () { return false; };\n JitSummaryResolver.prototype.toSummaryFileName = function (fileName) { return fileName; };\n JitSummaryResolver.prototype.fromSummaryFileName = function (fileName) { return fileName; };\n JitSummaryResolver.prototype.resolveSummary = function (reference) {\n return this._summaries.get(reference) || null;\n };\n JitSummaryResolver.prototype.getSymbolsOf = function () { return []; };\n JitSummaryResolver.prototype.getImportAs = function (reference) { return reference; };\n JitSummaryResolver.prototype.getKnownModuleName = function (fileName) { return null; };\n JitSummaryResolver.prototype.addSummary = function (summary) { this._summaries.set(summary.symbol, summary); };\n return JitSummaryResolver;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 interpretStatements(statements, reflector) {\n var ctx = new _ExecutionContext(null, null, null, new Map());\n var visitor = new StatementInterpreter(reflector);\n visitor.visitAllStatements(statements, ctx);\n var result = {};\n ctx.exports.forEach(function (exportName) { result[exportName] = ctx.vars.get(exportName); });\n return result;\n}\nfunction _executeFunctionStatements(varNames, varValues, statements, ctx, visitor) {\n var childCtx = ctx.createChildWihtLocalVars();\n for (var i = 0; i < varNames.length; i++) {\n childCtx.vars.set(varNames[i], varValues[i]);\n }\n var result = visitor.visitAllStatements(statements, childCtx);\n return result ? result.value : null;\n}\nvar _ExecutionContext = /** @class */ (function () {\n function _ExecutionContext(parent, instance, className, vars) {\n this.parent = parent;\n this.instance = instance;\n this.className = className;\n this.vars = vars;\n this.exports = [];\n }\n _ExecutionContext.prototype.createChildWihtLocalVars = function () {\n return new _ExecutionContext(this, this.instance, this.className, new Map());\n };\n return _ExecutionContext;\n}());\nvar ReturnValue = /** @class */ (function () {\n function ReturnValue(value) {\n this.value = value;\n }\n return ReturnValue;\n}());\nfunction createDynamicClass(_classStmt, _ctx, _visitor) {\n var propertyDescriptors = {};\n _classStmt.getters.forEach(function (getter) {\n // Note: use `function` instead of arrow function to capture `this`\n propertyDescriptors[getter.name] = {\n configurable: false,\n get: function () {\n var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n return _executeFunctionStatements([], [], getter.body, instanceCtx, _visitor);\n }\n };\n });\n _classStmt.methods.forEach(function (method) {\n var paramNames = method.params.map(function (param) { return param.name; });\n // Note: use `function` instead of arrow function to capture `this`\n propertyDescriptors[method.name] = {\n writable: false,\n configurable: false,\n value: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n return _executeFunctionStatements(paramNames, args, method.body, instanceCtx, _visitor);\n }\n };\n });\n var ctorParamNames = _classStmt.constructorMethod.params.map(function (param) { return param.name; });\n // Note: use `function` instead of arrow function to capture `this`\n var ctor = function () {\n var _this = this;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var instanceCtx = new _ExecutionContext(_ctx, this, _classStmt.name, _ctx.vars);\n _classStmt.fields.forEach(function (field) { _this[field.name] = undefined; });\n _executeFunctionStatements(ctorParamNames, args, _classStmt.constructorMethod.body, instanceCtx, _visitor);\n };\n var superClass = _classStmt.parent ? _classStmt.parent.visitExpression(_visitor, _ctx) : Object;\n ctor.prototype = Object.create(superClass.prototype, propertyDescriptors);\n return ctor;\n}\nvar StatementInterpreter = /** @class */ (function () {\n function StatementInterpreter(reflector) {\n this.reflector = reflector;\n }\n StatementInterpreter.prototype.debugAst = function (ast) { return debugOutputAstAsTypeScript(ast); };\n StatementInterpreter.prototype.visitDeclareVarStmt = function (stmt, ctx) {\n var initialValue = stmt.value ? stmt.value.visitExpression(this, ctx) : undefined;\n ctx.vars.set(stmt.name, initialValue);\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.exports.push(stmt.name);\n }\n return null;\n };\n StatementInterpreter.prototype.visitWriteVarExpr = function (expr, ctx) {\n var value = expr.value.visitExpression(this, ctx);\n var currCtx = ctx;\n while (currCtx != null) {\n if (currCtx.vars.has(expr.name)) {\n currCtx.vars.set(expr.name, value);\n return value;\n }\n currCtx = currCtx.parent;\n }\n throw new Error(\"Not declared variable \" + expr.name);\n };\n StatementInterpreter.prototype.visitReadVarExpr = function (ast, ctx) {\n var varName = ast.name;\n if (ast.builtin != null) {\n switch (ast.builtin) {\n case BuiltinVar.Super:\n return ctx.instance.__proto__;\n case BuiltinVar.This:\n return ctx.instance;\n case BuiltinVar.CatchError:\n varName = CATCH_ERROR_VAR$2;\n break;\n case BuiltinVar.CatchStack:\n varName = CATCH_STACK_VAR$2;\n break;\n default:\n throw new Error(\"Unknown builtin variable \" + ast.builtin);\n }\n }\n var currCtx = ctx;\n while (currCtx != null) {\n if (currCtx.vars.has(varName)) {\n return currCtx.vars.get(varName);\n }\n currCtx = currCtx.parent;\n }\n throw new Error(\"Not declared variable \" + varName);\n };\n StatementInterpreter.prototype.visitWriteKeyExpr = function (expr, ctx) {\n var receiver = expr.receiver.visitExpression(this, ctx);\n var index = expr.index.visitExpression(this, ctx);\n var value = expr.value.visitExpression(this, ctx);\n receiver[index] = value;\n return value;\n };\n StatementInterpreter.prototype.visitWritePropExpr = function (expr, ctx) {\n var receiver = expr.receiver.visitExpression(this, ctx);\n var value = expr.value.visitExpression(this, ctx);\n receiver[expr.name] = value;\n return value;\n };\n StatementInterpreter.prototype.visitInvokeMethodExpr = function (expr, ctx) {\n var receiver = expr.receiver.visitExpression(this, ctx);\n var args = this.visitAllExpressions(expr.args, ctx);\n var result;\n if (expr.builtin != null) {\n switch (expr.builtin) {\n case BuiltinMethod.ConcatArray:\n result = receiver.concat.apply(receiver, __spread(args));\n break;\n case BuiltinMethod.SubscribeObservable:\n result = receiver.subscribe({ next: args[0] });\n break;\n case BuiltinMethod.Bind:\n result = receiver.bind.apply(receiver, __spread(args));\n break;\n default:\n throw new Error(\"Unknown builtin method \" + expr.builtin);\n }\n }\n else {\n result = receiver[expr.name].apply(receiver, args);\n }\n return result;\n };\n StatementInterpreter.prototype.visitInvokeFunctionExpr = function (stmt, ctx) {\n var args = this.visitAllExpressions(stmt.args, ctx);\n var fnExpr = stmt.fn;\n if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {\n ctx.instance.constructor.prototype.constructor.apply(ctx.instance, args);\n return null;\n }\n else {\n var fn$$1 = stmt.fn.visitExpression(this, ctx);\n return fn$$1.apply(null, args);\n }\n };\n StatementInterpreter.prototype.visitReturnStmt = function (stmt, ctx) {\n return new ReturnValue(stmt.value.visitExpression(this, ctx));\n };\n StatementInterpreter.prototype.visitDeclareClassStmt = function (stmt, ctx) {\n var clazz = createDynamicClass(stmt, ctx, this);\n ctx.vars.set(stmt.name, clazz);\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.exports.push(stmt.name);\n }\n return null;\n };\n StatementInterpreter.prototype.visitExpressionStmt = function (stmt, ctx) {\n return stmt.expr.visitExpression(this, ctx);\n };\n StatementInterpreter.prototype.visitIfStmt = function (stmt, ctx) {\n var condition = stmt.condition.visitExpression(this, ctx);\n if (condition) {\n return this.visitAllStatements(stmt.trueCase, ctx);\n }\n else if (stmt.falseCase != null) {\n return this.visitAllStatements(stmt.falseCase, ctx);\n }\n return null;\n };\n StatementInterpreter.prototype.visitTryCatchStmt = function (stmt, ctx) {\n try {\n return this.visitAllStatements(stmt.bodyStmts, ctx);\n }\n catch (e) {\n var childCtx = ctx.createChildWihtLocalVars();\n childCtx.vars.set(CATCH_ERROR_VAR$2, e);\n childCtx.vars.set(CATCH_STACK_VAR$2, e.stack);\n return this.visitAllStatements(stmt.catchStmts, childCtx);\n }\n };\n StatementInterpreter.prototype.visitThrowStmt = function (stmt, ctx) {\n throw stmt.error.visitExpression(this, ctx);\n };\n StatementInterpreter.prototype.visitCommentStmt = function (stmt, context) { return null; };\n StatementInterpreter.prototype.visitJSDocCommentStmt = function (stmt, context) { return null; };\n StatementInterpreter.prototype.visitInstantiateExpr = function (ast, ctx) {\n var args = this.visitAllExpressions(ast.args, ctx);\n var clazz = ast.classExpr.visitExpression(this, ctx);\n return new (clazz.bind.apply(clazz, __spread([void 0], args)))();\n };\n StatementInterpreter.prototype.visitLiteralExpr = function (ast, ctx) { return ast.value; };\n StatementInterpreter.prototype.visitExternalExpr = function (ast, ctx) {\n return this.reflector.resolveExternalReference(ast.value);\n };\n StatementInterpreter.prototype.visitConditionalExpr = function (ast, ctx) {\n if (ast.condition.visitExpression(this, ctx)) {\n return ast.trueCase.visitExpression(this, ctx);\n }\n else if (ast.falseCase != null) {\n return ast.falseCase.visitExpression(this, ctx);\n }\n return null;\n };\n StatementInterpreter.prototype.visitNotExpr = function (ast, ctx) {\n return !ast.condition.visitExpression(this, ctx);\n };\n StatementInterpreter.prototype.visitAssertNotNullExpr = function (ast, ctx) {\n return ast.condition.visitExpression(this, ctx);\n };\n StatementInterpreter.prototype.visitCastExpr = function (ast, ctx) {\n return ast.value.visitExpression(this, ctx);\n };\n StatementInterpreter.prototype.visitFunctionExpr = function (ast, ctx) {\n var paramNames = ast.params.map(function (param) { return param.name; });\n return _declareFn(paramNames, ast.statements, ctx, this);\n };\n StatementInterpreter.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {\n var paramNames = stmt.params.map(function (param) { return param.name; });\n ctx.vars.set(stmt.name, _declareFn(paramNames, stmt.statements, ctx, this));\n if (stmt.hasModifier(StmtModifier.Exported)) {\n ctx.exports.push(stmt.name);\n }\n return null;\n };\n StatementInterpreter.prototype.visitBinaryOperatorExpr = function (ast, ctx) {\n var _this = this;\n var lhs = function () { return ast.lhs.visitExpression(_this, ctx); };\n var rhs = function () { return ast.rhs.visitExpression(_this, ctx); };\n switch (ast.operator) {\n case BinaryOperator.Equals:\n return lhs() == rhs();\n case BinaryOperator.Identical:\n return lhs() === rhs();\n case BinaryOperator.NotEquals:\n return lhs() != rhs();\n case BinaryOperator.NotIdentical:\n return lhs() !== rhs();\n case BinaryOperator.And:\n return lhs() && rhs();\n case BinaryOperator.Or:\n return lhs() || rhs();\n case BinaryOperator.Plus:\n return lhs() + rhs();\n case BinaryOperator.Minus:\n return lhs() - rhs();\n case BinaryOperator.Divide:\n return lhs() / rhs();\n case BinaryOperator.Multiply:\n return lhs() * rhs();\n case BinaryOperator.Modulo:\n return lhs() % rhs();\n case BinaryOperator.Lower:\n return lhs() < rhs();\n case BinaryOperator.LowerEquals:\n return lhs() <= rhs();\n case BinaryOperator.Bigger:\n return lhs() > rhs();\n case BinaryOperator.BiggerEquals:\n return lhs() >= rhs();\n default:\n throw new Error(\"Unknown operator \" + ast.operator);\n }\n };\n StatementInterpreter.prototype.visitReadPropExpr = function (ast, ctx) {\n var result;\n var receiver = ast.receiver.visitExpression(this, ctx);\n result = receiver[ast.name];\n return result;\n };\n StatementInterpreter.prototype.visitReadKeyExpr = function (ast, ctx) {\n var receiver = ast.receiver.visitExpression(this, ctx);\n var prop = ast.index.visitExpression(this, ctx);\n return receiver[prop];\n };\n StatementInterpreter.prototype.visitLiteralArrayExpr = function (ast, ctx) {\n return this.visitAllExpressions(ast.entries, ctx);\n };\n StatementInterpreter.prototype.visitLiteralMapExpr = function (ast, ctx) {\n var _this = this;\n var result = {};\n ast.entries.forEach(function (entry) { return result[entry.key] = entry.value.visitExpression(_this, ctx); });\n return result;\n };\n StatementInterpreter.prototype.visitCommaExpr = function (ast, context) {\n var values = this.visitAllExpressions(ast.parts, context);\n return values[values.length - 1];\n };\n StatementInterpreter.prototype.visitAllExpressions = function (expressions, ctx) {\n var _this = this;\n return expressions.map(function (expr) { return expr.visitExpression(_this, ctx); });\n };\n StatementInterpreter.prototype.visitAllStatements = function (statements, ctx) {\n for (var i = 0; i < statements.length; i++) {\n var stmt = statements[i];\n var val = stmt.visitStatement(this, ctx);\n if (val instanceof ReturnValue) {\n return val;\n }\n }\n return null;\n };\n return StatementInterpreter;\n}());\nfunction _declareFn(varNames, statements, ctx, visitor) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return _executeFunctionStatements(varNames, args, statements, ctx, visitor);\n };\n}\nvar CATCH_ERROR_VAR$2 = 'error';\nvar CATCH_STACK_VAR$2 = 'stack';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 AbstractJsEmitterVisitor = /** @class */ (function (_super) {\n __extends(AbstractJsEmitterVisitor, _super);\n function AbstractJsEmitterVisitor() {\n return _super.call(this, false) || this;\n }\n AbstractJsEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {\n var _this = this;\n ctx.pushClass(stmt);\n this._visitClassConstructor(stmt, ctx);\n if (stmt.parent != null) {\n ctx.print(stmt, stmt.name + \".prototype = Object.create(\");\n stmt.parent.visitExpression(this, ctx);\n ctx.println(stmt, \".prototype);\");\n }\n stmt.getters.forEach(function (getter) { return _this._visitClassGetter(stmt, getter, ctx); });\n stmt.methods.forEach(function (method) { return _this._visitClassMethod(stmt, method, ctx); });\n ctx.popClass();\n return null;\n };\n AbstractJsEmitterVisitor.prototype._visitClassConstructor = function (stmt, ctx) {\n ctx.print(stmt, \"function \" + stmt.name + \"(\");\n if (stmt.constructorMethod != null) {\n this._visitParams(stmt.constructorMethod.params, ctx);\n }\n ctx.println(stmt, \") {\");\n ctx.incIndent();\n if (stmt.constructorMethod != null) {\n if (stmt.constructorMethod.body.length > 0) {\n ctx.println(stmt, \"var self = this;\");\n this.visitAllStatements(stmt.constructorMethod.body, ctx);\n }\n }\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n };\n AbstractJsEmitterVisitor.prototype._visitClassGetter = function (stmt, getter, ctx) {\n ctx.println(stmt, \"Object.defineProperty(\" + stmt.name + \".prototype, '\" + getter.name + \"', { get: function() {\");\n ctx.incIndent();\n if (getter.body.length > 0) {\n ctx.println(stmt, \"var self = this;\");\n this.visitAllStatements(getter.body, ctx);\n }\n ctx.decIndent();\n ctx.println(stmt, \"}});\");\n };\n AbstractJsEmitterVisitor.prototype._visitClassMethod = function (stmt, method, ctx) {\n ctx.print(stmt, stmt.name + \".prototype.\" + method.name + \" = function(\");\n this._visitParams(method.params, ctx);\n ctx.println(stmt, \") {\");\n ctx.incIndent();\n if (method.body.length > 0) {\n ctx.println(stmt, \"var self = this;\");\n this.visitAllStatements(method.body, ctx);\n }\n ctx.decIndent();\n ctx.println(stmt, \"};\");\n };\n AbstractJsEmitterVisitor.prototype.visitReadVarExpr = function (ast, ctx) {\n if (ast.builtin === BuiltinVar.This) {\n ctx.print(ast, 'self');\n }\n else if (ast.builtin === BuiltinVar.Super) {\n throw new Error(\"'super' needs to be handled at a parent ast node, not at the variable level!\");\n }\n else {\n _super.prototype.visitReadVarExpr.call(this, ast, ctx);\n }\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {\n ctx.print(stmt, \"var \" + stmt.name);\n if (stmt.value) {\n ctx.print(stmt, ' = ');\n stmt.value.visitExpression(this, ctx);\n }\n ctx.println(stmt, \";\");\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitCastExpr = function (ast, ctx) {\n ast.value.visitExpression(this, ctx);\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitInvokeFunctionExpr = function (expr, ctx) {\n var fnExpr = expr.fn;\n if (fnExpr instanceof ReadVarExpr && fnExpr.builtin === BuiltinVar.Super) {\n ctx.currentClass.parent.visitExpression(this, ctx);\n ctx.print(expr, \".call(this\");\n if (expr.args.length > 0) {\n ctx.print(expr, \", \");\n this.visitAllExpressions(expr.args, ctx, ',');\n }\n ctx.print(expr, \")\");\n }\n else {\n _super.prototype.visitInvokeFunctionExpr.call(this, expr, ctx);\n }\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitFunctionExpr = function (ast, ctx) {\n ctx.print(ast, \"function\" + (ast.name ? ' ' + ast.name : '') + \"(\");\n this._visitParams(ast.params, ctx);\n ctx.println(ast, \") {\");\n ctx.incIndent();\n this.visitAllStatements(ast.statements, ctx);\n ctx.decIndent();\n ctx.print(ast, \"}\");\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {\n ctx.print(stmt, \"function \" + stmt.name + \"(\");\n this._visitParams(stmt.params, ctx);\n ctx.println(stmt, \") {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.statements, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n AbstractJsEmitterVisitor.prototype.visitTryCatchStmt = function (stmt, ctx) {\n ctx.println(stmt, \"try {\");\n ctx.incIndent();\n this.visitAllStatements(stmt.bodyStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"} catch (\" + CATCH_ERROR_VAR$1.name + \") {\");\n ctx.incIndent();\n var catchStmts = [CATCH_STACK_VAR$1.set(CATCH_ERROR_VAR$1.prop('stack')).toDeclStmt(null, [\n StmtModifier.Final\n ])].concat(stmt.catchStmts);\n this.visitAllStatements(catchStmts, ctx);\n ctx.decIndent();\n ctx.println(stmt, \"}\");\n return null;\n };\n AbstractJsEmitterVisitor.prototype._visitParams = function (params, ctx) {\n this.visitAllObjects(function (param) { return ctx.print(null, param.name); }, params, ctx, ',');\n };\n AbstractJsEmitterVisitor.prototype.getBuiltinMethodName = function (method) {\n var name;\n switch (method) {\n case BuiltinMethod.ConcatArray:\n name = 'concat';\n break;\n case BuiltinMethod.SubscribeObservable:\n name = 'subscribe';\n break;\n case BuiltinMethod.Bind:\n name = 'bind';\n break;\n default:\n throw new Error(\"Unknown builtin method: \" + method);\n }\n return name;\n };\n return AbstractJsEmitterVisitor;\n}(AbstractEmitterVisitor));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 evalExpression(sourceUrl, ctx, vars, createSourceMap) {\n var fnBody = ctx.toSource() + \"\\n//# sourceURL=\" + sourceUrl;\n var fnArgNames = [];\n var fnArgValues = [];\n for (var argName in vars) {\n fnArgNames.push(argName);\n fnArgValues.push(vars[argName]);\n }\n if (createSourceMap) {\n // using `new Function(...)` generates a header, 1 line of no arguments, 2 lines otherwise\n // E.g. ```\n // function anonymous(a,b,c\n // /**/) { ... }```\n // We don't want to hard code this fact, so we auto detect it via an empty function first.\n var emptyFn = new (Function.bind.apply(Function, __spread([void 0], fnArgNames.concat('return null;'))))().toString();\n var headerLines = emptyFn.slice(0, emptyFn.indexOf('return null;')).split('\\n').length - 1;\n fnBody += \"\\n\" + ctx.toSourceMapGenerator(sourceUrl, headerLines).toJsComment();\n }\n return new (Function.bind.apply(Function, __spread([void 0], fnArgNames.concat(fnBody))))().apply(void 0, __spread(fnArgValues));\n}\nfunction jitStatements(sourceUrl, statements, reflector, createSourceMaps) {\n var converter = new JitEmitterVisitor(reflector);\n var ctx = EmitterVisitorContext.createRoot();\n converter.visitAllStatements(statements, ctx);\n converter.createReturnStmt(ctx);\n return evalExpression(sourceUrl, ctx, converter.getArgs(), createSourceMaps);\n}\nvar JitEmitterVisitor = /** @class */ (function (_super) {\n __extends(JitEmitterVisitor, _super);\n function JitEmitterVisitor(reflector) {\n var _this = _super.call(this) || this;\n _this.reflector = reflector;\n _this._evalArgNames = [];\n _this._evalArgValues = [];\n _this._evalExportedVars = [];\n return _this;\n }\n JitEmitterVisitor.prototype.createReturnStmt = function (ctx) {\n var stmt = new ReturnStatement(new LiteralMapExpr(this._evalExportedVars.map(function (resultVar) { return new LiteralMapEntry(resultVar, variable(resultVar), false); })));\n stmt.visitStatement(this, ctx);\n };\n JitEmitterVisitor.prototype.getArgs = function () {\n var result = {};\n for (var i = 0; i < this._evalArgNames.length; i++) {\n result[this._evalArgNames[i]] = this._evalArgValues[i];\n }\n return result;\n };\n JitEmitterVisitor.prototype.visitExternalExpr = function (ast, ctx) {\n var value = this.reflector.resolveExternalReference(ast.value);\n var id = this._evalArgValues.indexOf(value);\n if (id === -1) {\n id = this._evalArgValues.length;\n this._evalArgValues.push(value);\n var name_1 = identifierName({ reference: value }) || 'val';\n this._evalArgNames.push(\"jit_\" + name_1 + \"_\" + id);\n }\n ctx.print(ast, this._evalArgNames[id]);\n return null;\n };\n JitEmitterVisitor.prototype.visitDeclareVarStmt = function (stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return _super.prototype.visitDeclareVarStmt.call(this, stmt, ctx);\n };\n JitEmitterVisitor.prototype.visitDeclareFunctionStmt = function (stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return _super.prototype.visitDeclareFunctionStmt.call(this, stmt, ctx);\n };\n JitEmitterVisitor.prototype.visitDeclareClassStmt = function (stmt, ctx) {\n if (stmt.hasModifier(StmtModifier.Exported)) {\n this._evalExportedVars.push(stmt.name);\n }\n return _super.prototype.visitDeclareClassStmt.call(this, stmt, ctx);\n };\n return JitEmitterVisitor;\n}(AbstractJsEmitterVisitor));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 module of the Angular compiler that begins with component types,\n * extracts templates, and eventually produces a compiled version of the component\n * ready for linking into an application.\n *\n * @security When compiling templates at runtime, you must ensure that the entire template comes\n * from a trusted source. Attacker-controlled data introduced by a template could expose your\n * application to XSS risks. For more detail, see the [Security Guide](http://g.co/ng/security).\n */\nvar JitCompiler = /** @class */ (function () {\n function JitCompiler(_metadataResolver, _templateParser, _styleCompiler, _viewCompiler, _ngModuleCompiler, _summaryResolver, _reflector, _compilerConfig, _console, getExtraNgModuleProviders) {\n this._metadataResolver = _metadataResolver;\n this._templateParser = _templateParser;\n this._styleCompiler = _styleCompiler;\n this._viewCompiler = _viewCompiler;\n this._ngModuleCompiler = _ngModuleCompiler;\n this._summaryResolver = _summaryResolver;\n this._reflector = _reflector;\n this._compilerConfig = _compilerConfig;\n this._console = _console;\n this.getExtraNgModuleProviders = getExtraNgModuleProviders;\n this._compiledTemplateCache = new Map();\n this._compiledHostTemplateCache = new Map();\n this._compiledDirectiveWrapperCache = new Map();\n this._compiledNgModuleCache = new Map();\n this._sharedStylesheetCount = 0;\n this._addedAotSummaries = new Set();\n }\n JitCompiler.prototype.compileModuleSync = function (moduleType) {\n return SyncAsync.assertSync(this._compileModuleAndComponents(moduleType, true));\n };\n JitCompiler.prototype.compileModuleAsync = function (moduleType) {\n return Promise.resolve(this._compileModuleAndComponents(moduleType, false));\n };\n JitCompiler.prototype.compileModuleAndAllComponentsSync = function (moduleType) {\n return SyncAsync.assertSync(this._compileModuleAndAllComponents(moduleType, true));\n };\n JitCompiler.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {\n return Promise.resolve(this._compileModuleAndAllComponents(moduleType, false));\n };\n JitCompiler.prototype.getComponentFactory = function (component) {\n var summary = this._metadataResolver.getDirectiveSummary(component);\n return summary.componentFactory;\n };\n JitCompiler.prototype.loadAotSummaries = function (summaries) {\n this.clearCache();\n this._addAotSummaries(summaries);\n };\n JitCompiler.prototype._addAotSummaries = function (fn$$1) {\n if (this._addedAotSummaries.has(fn$$1)) {\n return;\n }\n this._addedAotSummaries.add(fn$$1);\n var summaries = fn$$1();\n for (var i = 0; i < summaries.length; i++) {\n var entry = summaries[i];\n if (typeof entry === 'function') {\n this._addAotSummaries(entry);\n }\n else {\n var summary = entry;\n this._summaryResolver.addSummary({ symbol: summary.type.reference, metadata: null, type: summary });\n }\n }\n };\n JitCompiler.prototype.hasAotSummary = function (ref) { return !!this._summaryResolver.resolveSummary(ref); };\n JitCompiler.prototype._filterJitIdentifiers = function (ids) {\n var _this = this;\n return ids.map(function (mod) { return mod.reference; }).filter(function (ref) { return !_this.hasAotSummary(ref); });\n };\n JitCompiler.prototype._compileModuleAndComponents = function (moduleType, isSync) {\n var _this = this;\n return SyncAsync.then(this._loadModules(moduleType, isSync), function () {\n _this._compileComponents(moduleType, null);\n return _this._compileModule(moduleType);\n });\n };\n JitCompiler.prototype._compileModuleAndAllComponents = function (moduleType, isSync) {\n var _this = this;\n return SyncAsync.then(this._loadModules(moduleType, isSync), function () {\n var componentFactories = [];\n _this._compileComponents(moduleType, componentFactories);\n return {\n ngModuleFactory: _this._compileModule(moduleType),\n componentFactories: componentFactories\n };\n });\n };\n JitCompiler.prototype._loadModules = function (mainModule, isSync) {\n var _this = this;\n var loading = [];\n var mainNgModule = this._metadataResolver.getNgModuleMetadata(mainModule);\n // Note: for runtime compilation, we want to transitively compile all modules,\n // so we also need to load the declared directives / pipes for all nested modules.\n this._filterJitIdentifiers(mainNgModule.transitiveModule.modules).forEach(function (nestedNgModule) {\n // getNgModuleMetadata only returns null if the value passed in is not an NgModule\n var moduleMeta = _this._metadataResolver.getNgModuleMetadata(nestedNgModule);\n _this._filterJitIdentifiers(moduleMeta.declaredDirectives).forEach(function (ref) {\n var promise = _this._metadataResolver.loadDirectiveMetadata(moduleMeta.type.reference, ref, isSync);\n if (promise) {\n loading.push(promise);\n }\n });\n _this._filterJitIdentifiers(moduleMeta.declaredPipes)\n .forEach(function (ref) { return _this._metadataResolver.getOrLoadPipeMetadata(ref); });\n });\n return SyncAsync.all(loading);\n };\n JitCompiler.prototype._compileModule = function (moduleType) {\n var ngModuleFactory = this._compiledNgModuleCache.get(moduleType);\n if (!ngModuleFactory) {\n var moduleMeta = this._metadataResolver.getNgModuleMetadata(moduleType);\n // Always provide a bound Compiler\n var extraProviders = this.getExtraNgModuleProviders(moduleMeta.type.reference);\n var outputCtx = createOutputContext();\n var compileResult = this._ngModuleCompiler.compile(outputCtx, moduleMeta, extraProviders);\n ngModuleFactory = this._interpretOrJit(ngModuleJitUrl(moduleMeta), outputCtx.statements)[compileResult.ngModuleFactoryVar];\n this._compiledNgModuleCache.set(moduleMeta.type.reference, ngModuleFactory);\n }\n return ngModuleFactory;\n };\n /**\n * @internal\n */\n JitCompiler.prototype._compileComponents = function (mainModule, allComponentFactories) {\n var _this = this;\n var ngModule = this._metadataResolver.getNgModuleMetadata(mainModule);\n var moduleByJitDirective = new Map();\n var templates = new Set();\n var transJitModules = this._filterJitIdentifiers(ngModule.transitiveModule.modules);\n transJitModules.forEach(function (localMod) {\n var localModuleMeta = _this._metadataResolver.getNgModuleMetadata(localMod);\n _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {\n moduleByJitDirective.set(dirRef, localModuleMeta);\n var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);\n if (dirMeta.isComponent) {\n templates.add(_this._createCompiledTemplate(dirMeta, localModuleMeta));\n if (allComponentFactories) {\n var template = _this._createCompiledHostTemplate(dirMeta.type.reference, localModuleMeta);\n templates.add(template);\n allComponentFactories.push(dirMeta.componentFactory);\n }\n }\n });\n });\n transJitModules.forEach(function (localMod) {\n var localModuleMeta = _this._metadataResolver.getNgModuleMetadata(localMod);\n _this._filterJitIdentifiers(localModuleMeta.declaredDirectives).forEach(function (dirRef) {\n var dirMeta = _this._metadataResolver.getDirectiveMetadata(dirRef);\n if (dirMeta.isComponent) {\n dirMeta.entryComponents.forEach(function (entryComponentType) {\n var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);\n templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n });\n }\n });\n localModuleMeta.entryComponents.forEach(function (entryComponentType) {\n if (!_this.hasAotSummary(entryComponentType.componentType.reference)) {\n var moduleMeta = moduleByJitDirective.get(entryComponentType.componentType);\n templates.add(_this._createCompiledHostTemplate(entryComponentType.componentType, moduleMeta));\n }\n });\n });\n templates.forEach(function (template) { return _this._compileTemplate(template); });\n };\n JitCompiler.prototype.clearCacheFor = function (type) {\n this._compiledNgModuleCache.delete(type);\n this._metadataResolver.clearCacheFor(type);\n this._compiledHostTemplateCache.delete(type);\n var compiledTemplate = this._compiledTemplateCache.get(type);\n if (compiledTemplate) {\n this._compiledTemplateCache.delete(type);\n }\n };\n JitCompiler.prototype.clearCache = function () {\n // Note: don't clear the _addedAotSummaries, as they don't change!\n this._metadataResolver.clearCache();\n this._compiledTemplateCache.clear();\n this._compiledHostTemplateCache.clear();\n this._compiledNgModuleCache.clear();\n };\n JitCompiler.prototype._createCompiledHostTemplate = function (compType, ngModule) {\n if (!ngModule) {\n throw new Error(\"Component \" + stringify(compType) + \" is not part of any NgModule or the module has not been imported into your module.\");\n }\n var compiledTemplate = this._compiledHostTemplateCache.get(compType);\n if (!compiledTemplate) {\n var compMeta = this._metadataResolver.getDirectiveMetadata(compType);\n assertComponent(compMeta);\n var hostMeta = this._metadataResolver.getHostComponentMetadata(compMeta, compMeta.componentFactory.viewDefFactory);\n compiledTemplate =\n new CompiledTemplate(true, compMeta.type, hostMeta, ngModule, [compMeta.type]);\n this._compiledHostTemplateCache.set(compType, compiledTemplate);\n }\n return compiledTemplate;\n };\n JitCompiler.prototype._createCompiledTemplate = function (compMeta, ngModule) {\n var compiledTemplate = this._compiledTemplateCache.get(compMeta.type.reference);\n if (!compiledTemplate) {\n assertComponent(compMeta);\n compiledTemplate = new CompiledTemplate(false, compMeta.type, compMeta, ngModule, ngModule.transitiveModule.directives);\n this._compiledTemplateCache.set(compMeta.type.reference, compiledTemplate);\n }\n return compiledTemplate;\n };\n JitCompiler.prototype._compileTemplate = function (template) {\n var _this = this;\n if (template.isCompiled) {\n return;\n }\n var compMeta = template.compMeta;\n var externalStylesheetsByModuleUrl = new Map();\n var outputContext = createOutputContext();\n var componentStylesheet = this._styleCompiler.compileComponent(outputContext, compMeta);\n compMeta.template.externalStylesheets.forEach(function (stylesheetMeta) {\n var compiledStylesheet = _this._styleCompiler.compileStyles(createOutputContext(), compMeta, stylesheetMeta);\n externalStylesheetsByModuleUrl.set(stylesheetMeta.moduleUrl, compiledStylesheet);\n });\n this._resolveStylesCompileResult(componentStylesheet, externalStylesheetsByModuleUrl);\n var pipes = template.ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });\n var _a = this._parseTemplate(compMeta, template.ngModule, template.directives), parsedTemplate = _a.template, usedPipes = _a.pipes;\n var compileResult = this._viewCompiler.compileComponent(outputContext, compMeta, parsedTemplate, variable(componentStylesheet.stylesVar), usedPipes);\n var evalResult = this._interpretOrJit(templateJitUrl(template.ngModule.type, template.compMeta), outputContext.statements);\n var viewClass = evalResult[compileResult.viewClassVar];\n var rendererType = evalResult[compileResult.rendererTypeVar];\n template.compiled(viewClass, rendererType);\n };\n JitCompiler.prototype._parseTemplate = function (compMeta, ngModule, directiveIdentifiers) {\n var _this = this;\n // Note: ! is ok here as components always have a template.\n var preserveWhitespaces = compMeta.template.preserveWhitespaces;\n var directives = directiveIdentifiers.map(function (dir) { return _this._metadataResolver.getDirectiveSummary(dir.reference); });\n var pipes = ngModule.transitiveModule.pipes.map(function (pipe) { return _this._metadataResolver.getPipeSummary(pipe.reference); });\n return this._templateParser.parse(compMeta, compMeta.template.htmlAst, directives, pipes, ngModule.schemas, templateSourceUrl(ngModule.type, compMeta, compMeta.template), preserveWhitespaces);\n };\n JitCompiler.prototype._resolveStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {\n var _this = this;\n result.dependencies.forEach(function (dep, i) {\n var nestedCompileResult = externalStylesheetsByModuleUrl.get(dep.moduleUrl);\n var nestedStylesArr = _this._resolveAndEvalStylesCompileResult(nestedCompileResult, externalStylesheetsByModuleUrl);\n dep.setValue(nestedStylesArr);\n });\n };\n JitCompiler.prototype._resolveAndEvalStylesCompileResult = function (result, externalStylesheetsByModuleUrl) {\n this._resolveStylesCompileResult(result, externalStylesheetsByModuleUrl);\n return this._interpretOrJit(sharedStylesheetJitUrl(result.meta, this._sharedStylesheetCount++), result.outputCtx.statements)[result.stylesVar];\n };\n JitCompiler.prototype._interpretOrJit = function (sourceUrl, statements) {\n if (!this._compilerConfig.useJit) {\n return interpretStatements(statements, this._reflector);\n }\n else {\n return jitStatements(sourceUrl, statements, this._reflector, this._compilerConfig.jitDevMode);\n }\n };\n return JitCompiler;\n}());\nvar CompiledTemplate = /** @class */ (function () {\n function CompiledTemplate(isHost, compType, compMeta, ngModule, directives) {\n this.isHost = isHost;\n this.compType = compType;\n this.compMeta = compMeta;\n this.ngModule = ngModule;\n this.directives = directives;\n this._viewClass = null;\n this.isCompiled = false;\n }\n CompiledTemplate.prototype.compiled = function (viewClass, rendererType) {\n this._viewClass = viewClass;\n this.compMeta.componentViewType.setDelegate(viewClass);\n for (var prop in rendererType) {\n this.compMeta.rendererType[prop] = rendererType[prop];\n }\n this.isCompiled = true;\n };\n return CompiledTemplate;\n}());\nfunction assertComponent(meta) {\n if (!meta.isComponent) {\n throw new Error(\"Could not compile '\" + identifierName(meta.type) + \"' because it is not a component.\");\n }\n}\nfunction createOutputContext() {\n var importExpr$$1 = function (symbol) {\n return importExpr({ name: identifierName(symbol), moduleName: null, runtime: symbol });\n };\n return { statements: [], genFilePath: '', importExpr: importExpr$$1, constantPool: new ConstantPool() };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 that the compiler needs.\n */\nvar CompileReflector = /** @class */ (function () {\n function CompileReflector() {\n }\n return CompileReflector;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 {@link UrlResolver} with no package prefix.\n */\nfunction createUrlResolverWithoutPackagePrefix() {\n return new UrlResolver();\n}\nfunction createOfflineCompileUrlResolver() {\n return new UrlResolver('.');\n}\nvar UrlResolver = /** @class */ (function () {\n function UrlResolverImpl(_packagePrefix) {\n if (_packagePrefix === void 0) { _packagePrefix = null; }\n this._packagePrefix = _packagePrefix;\n }\n /**\n * Resolves the `url` given the `baseUrl`:\n * - when the `url` is null, the `baseUrl` is returned,\n * - if `url` is relative ('path/to/here', './path/to/here'), the resolved url is a combination of\n * `baseUrl` and `url`,\n * - if `url` is absolute (it has a scheme: 'http://', 'https://' or start with '/'), the `url` is\n * returned as is (ignoring the `baseUrl`)\n */\n UrlResolverImpl.prototype.resolve = function (baseUrl, url) {\n var resolvedUrl = url;\n if (baseUrl != null && baseUrl.length > 0) {\n resolvedUrl = _resolveUrl(baseUrl, resolvedUrl);\n }\n var resolvedParts = _split(resolvedUrl);\n var prefix = this._packagePrefix;\n if (prefix != null && resolvedParts != null &&\n resolvedParts[_ComponentIndex.Scheme] == 'package') {\n var path = resolvedParts[_ComponentIndex.Path];\n prefix = prefix.replace(/\\/+$/, '');\n path = path.replace(/^\\/+/, '');\n return prefix + \"/\" + path;\n }\n return resolvedUrl;\n };\n return UrlResolverImpl;\n}());\n/**\n * Extract the scheme of a URL.\n */\nfunction getUrlScheme(url) {\n var match = _split(url);\n return (match && match[_ComponentIndex.Scheme]) || '';\n}\n// The code below is adapted from Traceur:\n// https://github.com/google/traceur-compiler/blob/9511c1dafa972bf0de1202a8a863bad02f0f95a8/src/runtime/url.js\n/**\n * Builds a URI string from already-encoded parts.\n *\n * No encoding is performed. Any component may be omitted as either null or\n * undefined.\n *\n * @param opt_scheme The scheme such as 'http'.\n * @param opt_userInfo The user name before the '@'.\n * @param opt_domain The domain such as 'www.google.com', already\n * URI-encoded.\n * @param opt_port The port number.\n * @param opt_path The path, already URI-encoded. If it is not\n * empty, it must begin with a slash.\n * @param opt_queryData The URI-encoded query data.\n * @param opt_fragment The URI-encoded fragment identifier.\n * @return The fully combined URI.\n */\nfunction _buildFromEncodedParts(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) {\n var out = [];\n if (opt_scheme != null) {\n out.push(opt_scheme + ':');\n }\n if (opt_domain != null) {\n out.push('//');\n if (opt_userInfo != null) {\n out.push(opt_userInfo + '@');\n }\n out.push(opt_domain);\n if (opt_port != null) {\n out.push(':' + opt_port);\n }\n }\n if (opt_path != null) {\n out.push(opt_path);\n }\n if (opt_queryData != null) {\n out.push('?' + opt_queryData);\n }\n if (opt_fragment != null) {\n out.push('#' + opt_fragment);\n }\n return out.join('');\n}\n/**\n * A regular expression for breaking a URI into its component parts.\n *\n * {@link http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#RFC2234} says\n * As the \"first-match-wins\" algorithm is identical to the \"greedy\"\n * disambiguation method used by POSIX regular expressions, it is natural and\n * commonplace to use a regular expression for parsing the potential five\n * components of a URI reference.\n *\n * The following line is the regular expression for breaking-down a\n * well-formed URI reference into its components.\n *\n * <pre>\n * ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?\n * 12 3 4 5 6 7 8 9\n * </pre>\n *\n * The numbers in the second line above are only to assist readability; they\n * indicate the reference points for each subexpression (i.e., each paired\n * parenthesis). We refer to the value matched for subexpression <n> as $<n>.\n * For example, matching the above expression to\n * <pre>\n * http://www.ics.uci.edu/pub/ietf/uri/#Related\n * </pre>\n * results in the following subexpression matches:\n * <pre>\n * $1 = http:\n * $2 = http\n * $3 = //www.ics.uci.edu\n * $4 = www.ics.uci.edu\n * $5 = /pub/ietf/uri/\n * $6 = <undefined>\n * $7 = <undefined>\n * $8 = #Related\n * $9 = Related\n * </pre>\n * where <undefined> indicates that the component is not present, as is the\n * case for the query component in the above example. Therefore, we can\n * determine the value of the five components as\n * <pre>\n * scheme = $2\n * authority = $4\n * path = $5\n * query = $7\n * fragment = $9\n * </pre>\n *\n * The regular expression has been modified slightly to expose the\n * userInfo, domain, and port separately from the authority.\n * The modified version yields\n * <pre>\n * $1 = http scheme\n * $2 = <undefined> userInfo -\\\n * $3 = www.ics.uci.edu domain | authority\n * $4 = <undefined> port -/\n * $5 = /pub/ietf/uri/ path\n * $6 = <undefined> query without ?\n * $7 = Related fragment without #\n * </pre>\n * @internal\n */\nvar _splitRe = new RegExp('^' +\n '(?:' +\n '([^:/?#.]+)' + // scheme - ignore special characters\n // used by other URL parts such as :,\n // ?, /, #, and .\n ':)?' +\n '(?://' +\n '(?:([^/?#]*)@)?' + // userInfo\n '([\\\\w\\\\d\\\\-\\\\u0100-\\\\uffff.%]*)' + // domain - restrict to letters,\n // digits, dashes, dots, percent\n // escapes, and unicode characters.\n '(?::([0-9]+))?' + // port\n ')?' +\n '([^?#]+)?' + // path\n '(?:\\\\?([^#]*))?' + // query\n '(?:#(.*))?' + // fragment\n '$');\n/**\n * The index of each URI component in the return value of goog.uri.utils.split.\n * @enum {number}\n */\nvar _ComponentIndex;\n(function (_ComponentIndex) {\n _ComponentIndex[_ComponentIndex[\"Scheme\"] = 1] = \"Scheme\";\n _ComponentIndex[_ComponentIndex[\"UserInfo\"] = 2] = \"UserInfo\";\n _ComponentIndex[_ComponentIndex[\"Domain\"] = 3] = \"Domain\";\n _ComponentIndex[_ComponentIndex[\"Port\"] = 4] = \"Port\";\n _ComponentIndex[_ComponentIndex[\"Path\"] = 5] = \"Path\";\n _ComponentIndex[_ComponentIndex[\"QueryData\"] = 6] = \"QueryData\";\n _ComponentIndex[_ComponentIndex[\"Fragment\"] = 7] = \"Fragment\";\n})(_ComponentIndex || (_ComponentIndex = {}));\n/**\n * Splits a URI into its component parts.\n *\n * Each component can be accessed via the component indices; for example:\n * <pre>\n * goog.uri.utils.split(someStr)[goog.uri.utils.CompontentIndex.QUERY_DATA];\n * </pre>\n *\n * @param uri The URI string to examine.\n * @return Each component still URI-encoded.\n * Each component that is present will contain the encoded value, whereas\n * components that are not present will be undefined or empty, depending\n * on the browser's regular expression implementation. Never null, since\n * arbitrary strings may still look like path names.\n */\nfunction _split(uri) {\n return uri.match(_splitRe);\n}\n/**\n * Removes dot segments in given path component, as described in\n * RFC 3986, section 5.2.4.\n *\n * @param path A non-empty path component.\n * @return Path component with removed dot segments.\n */\nfunction _removeDotSegments(path) {\n if (path == '/')\n return '/';\n var leadingSlash = path[0] == '/' ? '/' : '';\n var trailingSlash = path[path.length - 1] === '/' ? '/' : '';\n var segments = path.split('/');\n var out = [];\n var up = 0;\n for (var pos = 0; pos < segments.length; pos++) {\n var segment = segments[pos];\n switch (segment) {\n case '':\n case '.':\n break;\n case '..':\n if (out.length > 0) {\n out.pop();\n }\n else {\n up++;\n }\n break;\n default:\n out.push(segment);\n }\n }\n if (leadingSlash == '') {\n while (up-- > 0) {\n out.unshift('..');\n }\n if (out.length === 0)\n out.push('.');\n }\n return leadingSlash + out.join('/') + trailingSlash;\n}\n/**\n * Takes an array of the parts from split and canonicalizes the path part\n * and then joins all the parts.\n */\nfunction _joinAndCanonicalizePath(parts) {\n var path = parts[_ComponentIndex.Path];\n path = path == null ? '' : _removeDotSegments(path);\n parts[_ComponentIndex.Path] = path;\n return _buildFromEncodedParts(parts[_ComponentIndex.Scheme], parts[_ComponentIndex.UserInfo], parts[_ComponentIndex.Domain], parts[_ComponentIndex.Port], path, parts[_ComponentIndex.QueryData], parts[_ComponentIndex.Fragment]);\n}\n/**\n * Resolves a URL.\n * @param base The URL acting as the base URL.\n * @param to The URL to resolve.\n */\nfunction _resolveUrl(base, url) {\n var parts = _split(encodeURI(url));\n var baseParts = _split(base);\n if (parts[_ComponentIndex.Scheme] != null) {\n return _joinAndCanonicalizePath(parts);\n }\n else {\n parts[_ComponentIndex.Scheme] = baseParts[_ComponentIndex.Scheme];\n }\n for (var i = _ComponentIndex.Scheme; i <= _ComponentIndex.Port; i++) {\n if (parts[i] == null) {\n parts[i] = baseParts[i];\n }\n }\n if (parts[_ComponentIndex.Path][0] == '/') {\n return _joinAndCanonicalizePath(parts);\n }\n var path = baseParts[_ComponentIndex.Path];\n if (path == null)\n path = '/';\n var index = path.lastIndexOf('/');\n path = path.substring(0, index + 1) + parts[_ComponentIndex.Path];\n parts[_ComponentIndex.Path] = path;\n return _joinAndCanonicalizePath(parts);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 interface for retrieving documents by URL that the compiler uses\n * to load templates.\n */\nvar ResourceLoader = /** @class */ (function () {\n function ResourceLoader() {\n }\n ResourceLoader.prototype.get = function (url) { return ''; };\n return ResourceLoader;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Extract i18n messages from source code\n */\nvar Extractor = /** @class */ (function () {\n function Extractor(host, staticSymbolResolver, messageBundle, metadataResolver) {\n this.host = host;\n this.staticSymbolResolver = staticSymbolResolver;\n this.messageBundle = messageBundle;\n this.metadataResolver = metadataResolver;\n }\n Extractor.prototype.extract = function (rootFiles) {\n var _this = this;\n var _a = analyzeAndValidateNgModules(rootFiles, this.host, this.staticSymbolResolver, this.metadataResolver), files = _a.files, ngModules = _a.ngModules;\n return Promise\n .all(ngModules.map(function (ngModule) { return _this.metadataResolver.loadNgModuleDirectiveAndPipeMetadata(ngModule.type.reference, false); }))\n .then(function () {\n var errors = [];\n files.forEach(function (file) {\n var compMetas = [];\n file.directives.forEach(function (directiveType) {\n var dirMeta = _this.metadataResolver.getDirectiveMetadata(directiveType);\n if (dirMeta && dirMeta.isComponent) {\n compMetas.push(dirMeta);\n }\n });\n compMetas.forEach(function (compMeta) {\n var html = compMeta.template.template;\n var interpolationConfig = InterpolationConfig.fromArray(compMeta.template.interpolation);\n errors.push.apply(errors, __spread(_this.messageBundle.updateFromTemplate(html, file.fileName, interpolationConfig)));\n });\n });\n if (errors.length) {\n throw new Error(errors.map(function (e) { return e.toString(); }).join('\\n'));\n }\n return _this.messageBundle;\n });\n };\n Extractor.create = function (host, locale) {\n var htmlParser = new HtmlParser();\n var urlResolver = createAotUrlResolver(host);\n var symbolCache = new StaticSymbolCache();\n var summaryResolver = new AotSummaryResolver(host, symbolCache);\n var staticSymbolResolver = new StaticSymbolResolver(host, symbolCache, summaryResolver);\n var staticReflector = new StaticReflector(summaryResolver, staticSymbolResolver);\n var config = new CompilerConfig({ defaultEncapsulation: ViewEncapsulation.Emulated, useJit: false });\n var normalizer = new DirectiveNormalizer({ get: function (url) { return host.loadResource(url); } }, urlResolver, htmlParser, config);\n var elementSchemaRegistry = new DomElementSchemaRegistry();\n var resolver = new CompileMetadataResolver(config, htmlParser, new NgModuleResolver(staticReflector), new DirectiveResolver(staticReflector), new PipeResolver(staticReflector), summaryResolver, elementSchemaRegistry, normalizer, console, symbolCache, staticReflector);\n // TODO(vicb): implicit tags & attributes\n var messageBundle = new MessageBundle(htmlParser, [], {}, locale);\n var extractor = new Extractor(host, staticSymbolResolver, messageBundle, resolver);\n return { extractor: extractor, staticReflector: staticReflector };\n };\n return Extractor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 * @module\n * @description\n * Entry point for all APIs of the compiler package.\n *\n * <div class=\"callout is-critical\">\n * <header>Unstable APIs</header>\n * <p>\n * All compiler apis are currently considered experimental and private!\n * </p>\n * <p>\n * We expect the APIs in this package to keep on changing. Do not rely on them.\n * </p>\n * </div>\n */\n\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n\n// This file only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 { core, CompilerConfig, preserveWhitespacesDefault, isLoweredSymbol, createLoweredSymbol, Identifiers, JitCompiler, DirectiveResolver, PipeResolver, NgModuleResolver, DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, NgModuleCompiler, AssertNotNull, BinaryOperator, BinaryOperatorExpr, BuiltinMethod, BuiltinVar, CastExpr, ClassField, ClassMethod, ClassStmt, CommaExpr, CommentStmt, ConditionalExpr, DeclareFunctionStmt, DeclareVarStmt, ExpressionStatement, ExternalExpr, ExternalReference, FunctionExpr, IfStmt, InstantiateExpr, InvokeFunctionExpr, InvokeMethodExpr, JSDocCommentStmt, LiteralArrayExpr, LiteralExpr, LiteralMapExpr, NotExpr, ReadKeyExpr, ReadPropExpr, ReadVarExpr, ReturnStatement, ThrowStmt, TryCatchStmt, WriteKeyExpr, WritePropExpr, WriteVarExpr, StmtModifier, Statement, collectExternalReferences, EmitterVisitorContext, ViewCompiler, getParseErrors, isSyntaxError, syntaxError, Version, VERSION, TextAst, BoundTextAst, AttrAst, BoundElementPropertyAst, BoundEventAst, ReferenceAst, VariableAst, ElementAst, EmbeddedTemplateAst, BoundDirectivePropertyAst, DirectiveAst, ProviderAst, ProviderAstType, NgContentAst, PropertyBindingType, NullTemplateVisitor, RecursiveTemplateAstVisitor, templateVisitAll, sanitizeIdentifier, identifierName, identifierModuleUrl, viewClassName, rendererTypeName, hostViewClassName, componentFactoryName, CompileSummaryKind, tokenName, tokenReference, CompileStylesheetMetadata, CompileTemplateMetadata, CompileDirectiveMetadata, CompilePipeMetadata, CompileShallowModuleMetadata, CompileNgModuleMetadata, TransitiveCompileNgModuleMetadata, ProviderMeta, flatten, templateSourceUrl, sharedStylesheetJitUrl, ngModuleJitUrl, templateJitUrl, createAotUrlResolver, createAotCompiler, AotCompiler, analyzeNgModules, analyzeAndValidateNgModules, analyzeFile, analyzeFileForInjectables, mergeAnalyzedFiles, GeneratedFile, toTypeScript, formattedError, isFormattedError, StaticReflector, StaticSymbol, StaticSymbolCache, ResolvedStaticSymbol, StaticSymbolResolver, unescapeIdentifier, unwrapResolvedMetadata, AotSummaryResolver, AstPath, SummaryResolver, JitSummaryResolver, CompileReflector, createUrlResolverWithoutPackagePrefix, createOfflineCompileUrlResolver, UrlResolver, getUrlScheme, ResourceLoader, ElementSchemaRegistry, Extractor, I18NHtmlParser, MessageBundle, Serializer, Xliff, Xliff2, Xmb, Xtb, DirectiveNormalizer, ParserError, ParseSpan, AST, Quote, EmptyExpr, ImplicitReceiver, Chain, Conditional, PropertyRead, PropertyWrite, SafePropertyRead, KeyedRead, KeyedWrite, BindingPipe, LiteralPrimitive, LiteralArray, LiteralMap, Interpolation, Binary, PrefixNot, NonNullAssert, MethodCall, SafeMethodCall, FunctionCall, ASTWithSource, TemplateBinding, NullAstVisitor, RecursiveAstVisitor, AstTransformer, AstMemoryEfficientTransformer, visitAstChildren, TokenType, Lexer, Token, EOF, isIdentifier, isQuote, SplitInterpolation, TemplateBindingParseResult, Parser, _ParseAST, ERROR_COMPONENT_TYPE, CompileMetadataResolver, Text, Expansion, ExpansionCase, Attribute, Element, Comment, visitAll, RecursiveVisitor, findNode, HtmlParser, ParseTreeResult, TreeError, HtmlTagDefinition, getHtmlTagDefinition, TagContentType, splitNsName, isNgContainer, isNgContent, isNgTemplate, getNsPrefix, mergeNsAndName, NAMED_ENTITIES, NGSP_UNICODE, debugOutputAstAsTypeScript, TypeScriptEmitter, ParseLocation, ParseSourceFile, ParseSourceSpan, ParseErrorLevel, ParseError, typeSourceSpan, DomElementSchemaRegistry, CssSelector, SelectorMatcher, SelectorListContext, SelectorContext, StylesCompileDependency, CompiledStylesheet, StyleCompiler, TemplateParseError, TemplateParseResult, TemplateParser, splitClasses, createElementCssSelector, removeSummaryDuplicates };\n//# sourceMappingURL=compiler.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __assign, __extends, __read, __spread, __values } from 'tslib';\nimport { Observable, Subject, Subscription, merge } from 'rxjs';\nimport { share } from 'rxjs/operators';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 `ngInjectableDef` 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 * @experimental\n */\nfunction defineInjectable(opts) {\n return {\n providedIn: opts.providedIn || null, factory: opts.factory, value: undefined,\n };\n}\n/**\n * Construct an `InjectorDef` which configures an injector.\n *\n * This should be assigned to a static `ngInjectorDef` 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 an `ngInjectableDef` 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 * @experimental\n */\nfunction defineInjector(options) {\n return {\n factory: options.factory, providers: options.providers || [], imports: options.imports || [],\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * parametrized 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 * ### Example\n *\n * #### Tree-shakeable InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='ShakeableInjectionToken'}\n *\n * #### Plain InjectionToken\n *\n * {@example core/di/ts/injector_spec.ts region='InjectionToken'}\n *\n *\n */\nvar InjectionToken = /** @class */ (function () {\n function InjectionToken(_desc, options) {\n this._desc = _desc;\n /** @internal */\n this.ngMetadataName = 'InjectionToken';\n if (options !== undefined) {\n this.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn || 'root',\n factory: options.factory,\n });\n }\n else {\n this.ngInjectableDef = undefined;\n }\n }\n InjectionToken.prototype.toString = function () { return \"InjectionToken \" + this._desc; };\n return InjectionToken;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ANNOTATIONS = '__annotations__';\nvar PARAMETERS = '__parameters__';\nvar PROP_METADATA = '__prop__metadata__';\n/**\n * @suppress {globalThis}\n */\nfunction makeDecorator(name, props, parentClass, chainFn, typeFn) {\n var metaCtor = makeMetadataCtor(props);\n function DecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof DecoratorFactory) {\n metaCtor.call.apply(metaCtor, __spread([this], args));\n return this;\n }\n var annotationInstance = new ((_a = DecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n var TypeDecorator = function TypeDecorator(cls) {\n typeFn && typeFn.apply(void 0, __spread([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 var annotations = cls.hasOwnProperty(ANNOTATIONS) ?\n cls[ANNOTATIONS] :\n Object.defineProperty(cls, ANNOTATIONS, { value: [] })[ANNOTATIONS];\n annotations.push(annotationInstance);\n return cls;\n };\n if (chainFn)\n chainFn(TypeDecorator);\n return TypeDecorator;\n var _a;\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}\nfunction makeMetadataCtor(props) {\n return function ctor() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (props) {\n var values = props.apply(void 0, __spread(args));\n for (var propName in values) {\n this[propName] = values[propName];\n }\n }\n };\n}\nfunction makeParamDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function ParamDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof ParamDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var annotationInstance = new ((_a = ParamDecoratorFactory).bind.apply(_a, __spread([void 0], 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 var 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 var _a;\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}\nfunction makePropDecorator(name, props, parentClass) {\n var metaCtor = makeMetadataCtor(props);\n function PropDecoratorFactory() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (this instanceof PropDecoratorFactory) {\n metaCtor.apply(this, args);\n return this;\n }\n var decoratorInstance = new ((_a = PropDecoratorFactory).bind.apply(_a, __spread([void 0], args)))();\n return function PropDecorator(target, name) {\n var constructor = target.constructor;\n // Use of Object.defineProperty is important since it creates non-enumerable property which\n // prevents the property is copied during subclassing.\n var 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 };\n var _a;\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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 token can be used to create a virtual provider that will populate the\n * `entryComponents` fields of components and ng modules based on its `useValue`.\n * All components that are referenced in the `useValue` value (either directly\n * or in a nested array or map) will be added to the `entryComponents` property.\n *\n * ### Example\n * The following example shows how the router can populate the `entryComponents`\n * field of an NgModule based on the router configuration which 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 * @experimental\n */\nvar ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken('AnalyzeForEntryComponents');\n/**\n * Attribute decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Attribute = makeParamDecorator('Attribute', function (attributeName) { return ({ attributeName: attributeName }); });\n/**\n * Base class for query metadata.\n *\n * See {@link ContentChildren}, {@link ContentChild}, {@link ViewChildren}, {@link ViewChild} for\n * more information.\n *\n *\n */\nvar Query = /** @class */ (function () {\n function Query() {\n }\n return Query;\n}());\n/**\n * ContentChildren decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChildren = makePropDecorator('ContentChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: false, descendants: false }, data));\n}, Query);\n/**\n * ContentChild decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ContentChild = makePropDecorator('ContentChild', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: true, isViewQuery: false, descendants: true }, data));\n}, Query);\n/**\n * ViewChildren decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ViewChildren = makePropDecorator('ViewChildren', function (selector, data) {\n if (data === void 0) { data = {}; }\n return (__assign({ selector: selector, first: false, isViewQuery: true, descendants: true }, data));\n}, Query);\n/**\n * ViewChild decorator and metadata.\n *\n *\n * @Annotation\n */\nvar ViewChild = makePropDecorator('ViewChild', function (selector, data) {\n return (__assign({ selector: selector, first: true, isViewQuery: true, descendants: true }, data));\n}, Query);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\nvar ChangeDetectionStrategy;\n/**\n * Describes within the change detector which strategy will be used the next time change\n * detection is triggered.\n *\n */\n(function (ChangeDetectionStrategy) {\n /**\n * `OnPush` means that the change detector's mode will be initially set to `CheckOnce`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"OnPush\"] = 0] = \"OnPush\";\n /**\n * `Default` means that the change detector's mode will be initially set to `CheckAlways`.\n */\n ChangeDetectionStrategy[ChangeDetectionStrategy[\"Default\"] = 1] = \"Default\";\n})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));\n/**\n * Describes the status of the detector.\n */\n/**\n * Describes the status of the detector.\n */\nvar ChangeDetectorStatus;\n/**\n * Describes the status of the detector.\n */\n(function (ChangeDetectorStatus) {\n /**\n * `CheckOnce` means that after calling detectChanges the mode of the change detector\n * will become `Checked`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckOnce\"] = 0] = \"CheckOnce\";\n /**\n * `Checked` means that the change detector should be skipped until its mode changes to\n * `CheckOnce`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Checked\"] = 1] = \"Checked\";\n /**\n * `CheckAlways` means that after calling detectChanges the mode of the change detector\n * will remain `CheckAlways`.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"CheckAlways\"] = 2] = \"CheckAlways\";\n /**\n * `Detached` means that the 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 * `Errored` means 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 will no longer detect changes.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Errored\"] = 4] = \"Errored\";\n /**\n * `Destroyed` means that the change detector is destroyed.\n */\n ChangeDetectorStatus[ChangeDetectorStatus[\"Destroyed\"] = 5] = \"Destroyed\";\n})(ChangeDetectorStatus || (ChangeDetectorStatus = {}));\nfunction isDefaultChangeDetectionStrategy(changeDetectionStrategy) {\n return changeDetectionStrategy == null ||\n changeDetectionStrategy === ChangeDetectionStrategy.Default;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Directive decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Directive = makeDecorator('Directive', function (dir) {\n if (dir === void 0) { dir = {}; }\n return dir;\n});\n/**\n * Component decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Component = makeDecorator('Component', function (c) {\n if (c === void 0) { c = {}; }\n return (__assign({ changeDetection: ChangeDetectionStrategy.Default }, c));\n}, Directive);\n/**\n * Pipe decorator and metadata.\n *\n * Use the `@Pipe` annotation to declare that a given class is a pipe. A pipe\n * class must also implement {@link PipeTransform} interface.\n *\n * To use the pipe include a reference to the pipe class in\n * {@link NgModule#declarations}.\n *\n *\n * @Annotation\n */\nvar Pipe = makeDecorator('Pipe', function (p) { return (__assign({ pure: true }, p)); });\n/**\n * Input decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Input = makePropDecorator('Input', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * Output decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Output = makePropDecorator('Output', function (bindingPropertyName) { return ({ bindingPropertyName: bindingPropertyName }); });\n/**\n * HostBinding decorator and metadata.\n *\n *\n * @Annotation\n */\nvar HostBinding = makePropDecorator('HostBinding', function (hostPropertyName) { return ({ hostPropertyName: hostPropertyName }); });\n/**\n * HostListener decorator and metadata.\n *\n *\n * @Annotation\n */\nvar HostListener = makePropDecorator('HostListener', function (eventName, args) { return ({ eventName: eventName, args: args }); });\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 be represented by\n * the `MyCustomComponent` constructor function.\n *\n *\n */\nvar Type = Function;\nfunction isType(v) {\n return typeof v === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _global = __window || __global || __self;\nvar promise = Promise.resolve(0);\nvar _symbolIterator = null;\nfunction getSymbolIterator() {\n if (!_symbolIterator) {\n var Symbol_1 = _global['Symbol'];\n if (Symbol_1 && Symbol_1.iterator) {\n _symbolIterator = Symbol_1.iterator;\n }\n else {\n // es6-shim specific logic\n var keys = Object.getOwnPropertyNames(Map.prototype);\n for (var i = 0; i < keys.length; ++i) {\n var 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}\nfunction scheduleMicroTask(fn) {\n if (typeof Zone === 'undefined') {\n // use promise to schedule microTask instead of use Zone\n promise.then(function () { fn && fn.apply(null, null); });\n }\n else {\n Zone.current.scheduleMicroTask('scheduleMicrotask', fn);\n }\n}\n// JS has NaN !== NaN\nfunction looseIdentical(a, b) {\n return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);\n}\nfunction stringify(token) {\n if (typeof token === 'string') {\n return token;\n }\n if (token instanceof Array) {\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 var res = token.toString();\n if (res == null) {\n return '' + res;\n }\n var newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Attention: These regex has to hold even if the code is minified!\n */\nvar DELEGATE_CTOR = /^function\\s+\\S+\\(\\)\\s*{[\\s\\S]+\\.apply\\(this,\\s*arguments\\)/;\nvar INHERITED_CLASS = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{/;\nvar INHERITED_CLASS_WITH_CTOR = /^class\\s+[A-Za-z\\d$_]*\\s*extends\\s+[A-Za-z\\d$_]+\\s*{[\\s\\S]*constructor\\s*\\(/;\nvar ReflectionCapabilities = /** @class */ (function () {\n function ReflectionCapabilities(reflect) {\n this._reflect = reflect || _global['Reflect'];\n }\n ReflectionCapabilities.prototype.isReflectionEnabled = function () { return true; };\n ReflectionCapabilities.prototype.factory = function (t) { return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (t.bind.apply(t, __spread([void 0], args)))();\n }; };\n /** @internal */\n /** @internal */\n ReflectionCapabilities.prototype._zipTypesAndAnnotations = /** @internal */\n function (paramTypes, paramAnnotations) {\n var result;\n if (typeof paramTypes === 'undefined') {\n result = new Array(paramAnnotations.length);\n }\n else {\n result = new Array(paramTypes.length);\n }\n for (var 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] != 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 ReflectionCapabilities.prototype._ownParameters = function (type, parentCtor) {\n var 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 (DELEGATE_CTOR.exec(typeStr) ||\n (INHERITED_CLASS.exec(typeStr) && !INHERITED_CLASS_WITH_CTOR.exec(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 var 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 var ctorParameters = typeof tsickleCtorParams === 'function' ? tsickleCtorParams() : tsickleCtorParams;\n var paramTypes_1 = ctorParameters.map(function (ctorParam) { return ctorParam && ctorParam.type; });\n var paramAnnotations_1 = ctorParameters.map(function (ctorParam) {\n return ctorParam && convertTsickleDecoratorIntoMetadata(ctorParam.decorators);\n });\n return this._zipTypesAndAnnotations(paramTypes_1, paramAnnotations_1);\n }\n // API for metadata created by invoking the decorators.\n var paramAnnotations = type.hasOwnProperty(PARAMETERS) && type[PARAMETERS];\n var 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 new Array(type.length).fill(undefined);\n };\n ReflectionCapabilities.prototype.parameters = function (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 var parentCtor = getParentCtor(type);\n var parameters = this._ownParameters(type, parentCtor);\n if (!parameters && parentCtor !== Object) {\n parameters = this.parameters(parentCtor);\n }\n return parameters || [];\n };\n ReflectionCapabilities.prototype._ownAnnotations = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.annotations && typeOrFunc.annotations !== parentCtor.annotations) {\n var 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 ReflectionCapabilities.prototype.annotations = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return [];\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var ownAnnotations = this._ownAnnotations(typeOrFunc, parentCtor) || [];\n var parentAnnotations = parentCtor !== Object ? this.annotations(parentCtor) : [];\n return parentAnnotations.concat(ownAnnotations);\n };\n ReflectionCapabilities.prototype._ownPropMetadata = function (typeOrFunc, parentCtor) {\n // Prefer the direct API.\n if (typeOrFunc.propMetadata &&\n typeOrFunc.propMetadata !== parentCtor.propMetadata) {\n var 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 var propDecorators_1 = typeOrFunc.propDecorators;\n var propMetadata_1 = {};\n Object.keys(propDecorators_1).forEach(function (prop) {\n propMetadata_1[prop] = convertTsickleDecoratorIntoMetadata(propDecorators_1[prop]);\n });\n return propMetadata_1;\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 ReflectionCapabilities.prototype.propMetadata = function (typeOrFunc) {\n if (!isType(typeOrFunc)) {\n return {};\n }\n var parentCtor = getParentCtor(typeOrFunc);\n var propMetadata = {};\n if (parentCtor !== Object) {\n var parentPropMetadata_1 = this.propMetadata(parentCtor);\n Object.keys(parentPropMetadata_1).forEach(function (propName) {\n propMetadata[propName] = parentPropMetadata_1[propName];\n });\n }\n var ownPropMetadata = this._ownPropMetadata(typeOrFunc, parentCtor);\n if (ownPropMetadata) {\n Object.keys(ownPropMetadata).forEach(function (propName) {\n var decorators = [];\n if (propMetadata.hasOwnProperty(propName)) {\n decorators.push.apply(decorators, __spread(propMetadata[propName]));\n }\n decorators.push.apply(decorators, __spread(ownPropMetadata[propName]));\n propMetadata[propName] = decorators;\n });\n }\n return propMetadata;\n };\n ReflectionCapabilities.prototype.hasLifecycleHook = function (type, lcProperty) {\n return type instanceof Type && lcProperty in type.prototype;\n };\n ReflectionCapabilities.prototype.guards = function (type) { return {}; };\n ReflectionCapabilities.prototype.getter = function (name) { return new Function('o', 'return o.' + name + ';'); };\n ReflectionCapabilities.prototype.setter = function (name) {\n return new Function('o', 'v', 'return o.' + name + ' = v;');\n };\n ReflectionCapabilities.prototype.method = function (name) {\n var 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 // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n ReflectionCapabilities.prototype.importUri = \n // There is not a concept of import uri in Js, but this is useful in developing Dart applications.\n function (type) {\n // StaticSymbol\n if (typeof type === 'object' && type['filePath']) {\n return type['filePath'];\n }\n // Runtime type\n return \"./\" + stringify(type);\n };\n ReflectionCapabilities.prototype.resourceUri = function (type) { return \"./\" + stringify(type); };\n ReflectionCapabilities.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return runtime;\n };\n ReflectionCapabilities.prototype.resolveEnum = function (enumIdentifier, name) { return enumIdentifier[name]; };\n return ReflectionCapabilities;\n}());\nfunction convertTsickleDecoratorIntoMetadata(decoratorInvocations) {\n if (!decoratorInvocations) {\n return [];\n }\n return decoratorInvocations.map(function (decoratorInvocation) {\n var decoratorType = decoratorInvocation.type;\n var annotationCls = decoratorType.annotationCls;\n var annotationArgs = decoratorInvocation.args ? decoratorInvocation.args : [];\n return new (annotationCls.bind.apply(annotationCls, __spread([void 0], annotationArgs)))();\n });\n}\nfunction getParentCtor(ctor) {\n var parentProto = ctor.prototype ? Object.getPrototypeOf(ctor.prototype) : null;\n var 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 Inc. All Rights Reserved.\n *\n * Use of this 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, target) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === target) {\n return key;\n }\n }\n throw Error('Could not find renamed property on target object.');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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,\n * but not yet defined. It is also used when the `token` which we use when creating a query is not\n * yet defined.\n *\n * ### Example\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}\n * @experimental\n */\nfunction forwardRef(forwardRefFn) {\n forwardRefFn.__forward_ref__ = forwardRef;\n forwardRefFn.toString = function () { return stringify(this()); };\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 * ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview))\n *\n * {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}\n *\n * See: {@link forwardRef}\n * @experimental\n */\nfunction resolveForwardRef(type) {\n if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&\n type.__forward_ref__ === forwardRef) {\n return type();\n }\n else {\n return type;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Inject decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Inject = makeParamDecorator('Inject', function (token) { return ({ token: token }); });\n/**\n * Optional decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Optional = makeParamDecorator('Optional');\n/**\n * Self decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Self = makeParamDecorator('Self');\n/**\n * SkipSelf decorator and metadata.\n *\n *\n * @Annotation\n */\nvar SkipSelf = makeParamDecorator('SkipSelf');\n/**\n * Host decorator and metadata.\n *\n *\n * @Annotation\n */\nvar Host = makeParamDecorator('Host');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SOURCE = '__source';\nvar _THROW_IF_NOT_FOUND = new Object();\nvar THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\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 * @experimental\n */\nvar INJECTOR = new InjectionToken('INJECTOR');\nvar NullInjector = /** @class */ (function () {\n function NullInjector() {\n }\n NullInjector.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; }\n if (notFoundValue === _THROW_IF_NOT_FOUND) {\n throw new Error(\"NullInjectorError: No provider for \" + stringify(token) + \"!\");\n }\n return notFoundValue;\n };\n return NullInjector;\n}());\n/**\n * @usageNotes\n * ```\n * const injector: Injector = ...;\n * injector.get(...);\n * ```\n *\n * @description\n *\n * Concrete injectors implement this interface.\n *\n * For more details, see the {@linkDocs guide/dependency-injection \"Dependency Injection Guide\"}.\n *\n * ### Example\n *\n * {@example core/di/ts/injector_spec.ts region='Injector'}\n *\n * `Injector` returns itself when given `Injector` as a token:\n * {@example core/di/ts/injector_spec.ts region='injectInjector'}\n *\n *\n */\nvar Injector = /** @class */ (function () {\n function Injector() {\n }\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n Injector.create = /**\n * Create a new Injector which is configure using `StaticProvider`s.\n *\n * ### Example\n *\n * {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}\n */\n function (options, parent) {\n if (Array.isArray(options)) {\n return new StaticInjector(options, parent);\n }\n else {\n return new StaticInjector(options.providers, options.parent, options.name || null);\n }\n };\n Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;\n Injector.NULL = new NullInjector();\n Injector.ngInjectableDef = defineInjectable({\n providedIn: 'any',\n factory: function () { return inject(INJECTOR); },\n });\n return Injector;\n}());\nvar IDENT = function (value) {\n return value;\n};\nvar EMPTY = [];\nvar CIRCULAR = IDENT;\nvar MULTI_PROVIDER_FN = function () {\n return Array.prototype.slice.call(arguments);\n};\nvar GET_PROPERTY_NAME$1 = {};\nvar USE_VALUE$1 = getClosureSafeProperty$1({ provide: String, useValue: GET_PROPERTY_NAME$1 });\nvar NG_TOKEN_PATH = 'ngTokenPath';\nvar NG_TEMP_TOKEN_PATH = 'ngTempTokenPath';\nvar NULL_INJECTOR = Injector.NULL;\nvar NEW_LINE = /\\n/gm;\nvar NO_NEW_LINE = 'ɵ';\nvar StaticInjector = /** @class */ (function () {\n function StaticInjector(providers, parent, source) {\n if (parent === void 0) { parent = NULL_INJECTOR; }\n if (source === void 0) { source = null; }\n this.parent = parent;\n this.source = source;\n var 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 recursivelyProcessProviders(records, providers);\n }\n StaticInjector.prototype.get = function (token, notFoundValue, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n var record = this._records.get(token);\n try {\n return tryResolveToken(token, record, this._records, this.parent, notFoundValue, flags);\n }\n catch (e) {\n var tokenPath = e[NG_TEMP_TOKEN_PATH];\n if (token[SOURCE]) {\n tokenPath.unshift(token[SOURCE]);\n }\n e.message = formatError('\\n' + e.message, tokenPath, this.source);\n e[NG_TOKEN_PATH] = tokenPath;\n e[NG_TEMP_TOKEN_PATH] = null;\n throw e;\n }\n };\n StaticInjector.prototype.toString = function () {\n var tokens = [], records = this._records;\n records.forEach(function (v, token) { return tokens.push(stringify(token)); });\n return \"StaticInjector[\" + tokens.join(', ') + \"]\";\n };\n return StaticInjector;\n}());\nfunction resolveProvider(provider) {\n var deps = computeDeps(provider);\n var fn = IDENT;\n var value = EMPTY;\n var useNew = false;\n var provide = resolveForwardRef(provider.provide);\n if (USE_VALUE$1 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: deps, fn: fn, useNew: useNew, value: value };\n}\nfunction multiProviderMixError(token) {\n return staticError('Cannot mix multi providers and regular providers', token);\n}\nfunction recursivelyProcessProviders(records, provider) {\n if (provider) {\n provider = resolveForwardRef(provider);\n if (provider instanceof Array) {\n // if we have an array recurse into the array\n for (var i = 0; i < provider.length; i++) {\n recursivelyProcessProviders(records, provider[i]);\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 var token = resolveForwardRef(provider.provide);\n var resolvedProvider = resolveProvider(provider);\n if (provider.multi === true) {\n // This is a multi provider.\n var 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: token, options: 6 /* Default */ });\n }\n var record = records.get(token);\n if (record && record.fn == MULTI_PROVIDER_FN) {\n throw multiProviderMixError(token);\n }\n records.set(token, resolvedProvider);\n }\n else {\n throw staticError('Unexpected provider', provider);\n }\n }\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 var path = e[NG_TEMP_TOKEN_PATH] = e[NG_TEMP_TOKEN_PATH] || [];\n path.unshift(token);\n if (record && record.value == CIRCULAR) {\n // Reset the Circular flag.\n record.value = EMPTY;\n }\n throw e;\n }\n}\nfunction resolveToken(token, record, records, parent, notFoundValue, flags) {\n var value;\n if (record && !(flags & 4 /* 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) {\n throw Error(NO_NEW_LINE + 'Circular dependency');\n }\n else if (value === EMPTY) {\n record.value = CIRCULAR;\n var obj = undefined;\n var useNew = record.useNew;\n var fn = record.fn;\n var depRecords = record.deps;\n var deps = EMPTY;\n if (depRecords.length) {\n deps = [];\n for (var i = 0; i < depRecords.length; i++) {\n var depRecord = depRecords[i];\n var options = depRecord.options;\n var childRecord = options & 2 /* CheckSelf */ ? records.get(depRecord.token) : undefined;\n deps.push(tryResolveToken(\n // Current Token to resolve\n depRecord.token, childRecord, 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 */) ? NULL_INJECTOR : parent, options & 1 /* Optional */ ? null : Injector.THROW_IF_NOT_FOUND, 0 /* Default */));\n }\n }\n record.value = value = useNew ? new ((_a = fn).bind.apply(_a, __spread([void 0], deps)))() : fn.apply(obj, deps);\n }\n }\n else if (!(flags & 2 /* Self */)) {\n value = parent.get(token, notFoundValue, 0 /* Default */);\n }\n return value;\n var _a;\n}\nfunction computeDeps(provider) {\n var deps = EMPTY;\n var providerDeps = provider.deps;\n if (providerDeps && providerDeps.length) {\n deps = [];\n for (var i = 0; i < providerDeps.length; i++) {\n var options = 6;\n var token = resolveForwardRef(providerDeps[i]);\n if (token instanceof Array) {\n for (var j = 0, annotations = token; j < annotations.length; j++) {\n var 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: token, options: options });\n }\n }\n else if (provider.useExisting) {\n var token = resolveForwardRef(provider.useExisting);\n deps = [{ token: token, options: 6 /* Default */ }];\n }\n else if (!providerDeps && !(USE_VALUE$1 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 formatError(text, obj, source) {\n if (source === void 0) { source = null; }\n text = text && text.charAt(0) === '\\n' && text.charAt(1) == NO_NEW_LINE ? text.substr(2) : text;\n var context = stringify(obj);\n if (obj instanceof Array) {\n context = obj.map(stringify).join(' -> ');\n }\n else if (typeof obj === 'object') {\n var parts = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n var value = obj[key];\n parts.push(key + ':' + (typeof value === 'string' ? JSON.stringify(value) : stringify(value)));\n }\n }\n context = \"{\" + parts.join(', ') + \"}\";\n }\n return \"StaticInjectorError\" + (source ? '(' + source + ')' : '') + \"[\" + context + \"]: \" + text.replace(NEW_LINE, '\\n ');\n}\nfunction staticError(text, obj) {\n return new Error(formatError(text, obj));\n}\nfunction getClosureSafeProperty$1(objWithPropertyToExtract) {\n for (var key in objWithPropertyToExtract) {\n if (objWithPropertyToExtract[key] === GET_PROPERTY_NAME$1) {\n return key;\n }\n }\n throw Error('!prop');\n}\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 */\nvar _currentInjector = undefined;\nfunction setCurrentInjector(injector) {\n var former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\nfunction inject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n if (_currentInjector === undefined) {\n throw new Error(\"inject() must be called from an injection context\");\n }\n else if (_currentInjector === null) {\n var injectableDef = token.ngInjectableDef;\n if (injectableDef && injectableDef.providedIn == 'root') {\n return injectableDef.value === undefined ? injectableDef.value = injectableDef.factory() :\n injectableDef.value;\n }\n throw new Error(\"Injector: NOT_FOUND [\" + stringify(token) + \"]\");\n }\n else {\n return _currentInjector.get(token, flags & 8 /* Optional */ ? null : undefined, flags);\n }\n}\nfunction injectArgs(types) {\n var args = [];\n for (var i = 0; i < types.length; i++) {\n var arg = types[i];\n if (Array.isArray(arg)) {\n if (arg.length === 0) {\n throw new Error('Arguments array must have arguments.');\n }\n var type = undefined;\n var flags = 0;\n for (var j = 0; j < arg.length; j++) {\n var meta = arg[j];\n if (meta instanceof Optional || meta.__proto__.ngMetadataName === 'Optional') {\n flags |= 8 /* Optional */;\n }\n else if (meta instanceof SkipSelf || meta.__proto__.ngMetadataName === 'SkipSelf') {\n flags |= 4 /* SkipSelf */;\n }\n else if (meta instanceof Self || meta.__proto__.ngMetadataName === 'Self') {\n flags |= 2 /* Self */;\n }\n else if (meta instanceof 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}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 GET_PROPERTY_NAME = {};\nvar ɵ0 = GET_PROPERTY_NAME;\nvar USE_VALUE = getClosureSafeProperty({ provide: String, useValue: ɵ0 }, GET_PROPERTY_NAME);\nvar EMPTY_ARRAY = [];\nfunction convertInjectableProviderToFactory(type, provider) {\n if (!provider) {\n var reflectionCapabilities = new ReflectionCapabilities();\n var deps_1 = reflectionCapabilities.parameters(type);\n // TODO - convert to flags.\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs(deps_1))))(); };\n }\n if (USE_VALUE in provider) {\n var valueProvider_1 = provider;\n return function () { return valueProvider_1.useValue; };\n }\n else if (provider.useExisting) {\n var existingProvider_1 = provider;\n return function () { return inject(existingProvider_1.useExisting); };\n }\n else if (provider.useFactory) {\n var factoryProvider_1 = provider;\n return function () { return factoryProvider_1.useFactory.apply(factoryProvider_1, __spread(injectArgs(factoryProvider_1.deps || EMPTY_ARRAY))); };\n }\n else if (provider.useClass) {\n var classProvider_1 = provider;\n var deps_2 = provider.deps;\n if (!deps_2) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_2 = reflectionCapabilities.parameters(type);\n }\n return function () {\n return new ((_a = classProvider_1.useClass).bind.apply(_a, __spread([void 0], injectArgs(deps_2))))();\n var _a;\n };\n }\n else {\n var deps_3 = provider.deps;\n if (!deps_3) {\n var reflectionCapabilities = new ReflectionCapabilities();\n deps_3 = reflectionCapabilities.parameters(type);\n }\n return function () { return new (type.bind.apply(type, __spread([void 0], injectArgs((deps_3)))))(); };\n }\n}\n/**\n* Injectable decorator and metadata.\n*\n*\n* @Annotation\n*/\nvar Injectable = makeDecorator('Injectable', undefined, undefined, undefined, function (injectableType, options) {\n if (options && options.providedIn !== undefined &&\n injectableType.ngInjectableDef === undefined) {\n injectableType.ngInjectableDef = defineInjectable({\n providedIn: options.providedIn,\n factory: convertInjectableProviderToFactory(injectableType, options)\n });\n }\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 will allow:\n * - any non-Angular elements with a `-` in their name,\n * - any properties on elements with a `-` in their name which is the common rule for custom\n * elements.\n *\n *\n */\nvar CUSTOM_ELEMENTS_SCHEMA = {\n name: 'custom-elements'\n};\n/**\n * Defines a schema that will allow any property on any element.\n *\n * @experimental\n */\nvar NO_ERRORS_SCHEMA = {\n name: 'no-errors-schema'\n};\n/**\n * NgModule decorator and metadata.\n *\n *\n * @Annotation\n */\nvar NgModule = makeDecorator('NgModule', function (ngModule) { return ngModule; }, undefined, undefined, function (moduleType, metadata) {\n var imports = (metadata && metadata.imports) || [];\n if (metadata && metadata.exports) {\n imports = __spread(imports, [metadata.exports]);\n }\n moduleType.ngInjectorDef = defineInjector({\n factory: convertInjectableProviderToFactory(moduleType, { useClass: moduleType }),\n providers: metadata && metadata.providers,\n imports: imports,\n });\n});\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\nvar ViewEncapsulation;\n/**\n * Defines template and style encapsulation options available for Component's {@link Component}.\n *\n * See {@link Component#encapsulation encapsulation}.\n *\n */\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 * Use the native encapsulation mechanism of the renderer.\n *\n * For the DOM this means using [Shadow DOM](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})(ViewEncapsulation || (ViewEncapsulation = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 *\n */\nvar Version = /** @class */ (function () {\n function Version(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 return Version;\n}());\n/**\n *\n */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nvar ERROR_DEBUG_CONTEXT = 'ngDebugContext';\nvar ERROR_ORIGINAL_ERROR = 'ngOriginalError';\nvar ERROR_LOGGER = 'ngErrorLogger';\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) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n console.error.apply(console, __spread(values));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @description\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 * ### 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 *\n */\nvar ErrorHandler = /** @class */ (function () {\n function ErrorHandler() {\n /**\n * @internal\n */\n this._console = console;\n }\n ErrorHandler.prototype.handleError = function (error) {\n var originalError = this._findOriginalError(error);\n var 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 var 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 /** @internal */\n ErrorHandler.prototype._findContext = /** @internal */\n function (error) {\n if (error) {\n return getDebugContext(error) ? getDebugContext(error) :\n this._findContext(getOriginalError(error));\n }\n return null;\n };\n /** @internal */\n /** @internal */\n ErrorHandler.prototype._findOriginalError = /** @internal */\n function (error) {\n var e = getOriginalError(error);\n while (e && getOriginalError(e)) {\n e = getOriginalError(e);\n }\n return e;\n };\n return ErrorHandler;\n}());\nfunction wrappedError(message, originalError) {\n var msg = message + \" caused by: \" + (originalError instanceof Error ? originalError.message : originalError);\n var error = Error(msg);\n error[ERROR_ORIGINAL_ERROR] = originalError;\n return error;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var res = [];\n for (var 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 var reversed = findFirstClosedCycle(keys.slice().reverse());\n var tokenStrs = reversed.map(function (k) { return stringify(k.token); });\n return ' (' + tokenStrs.join(' -> ') + ')';\n }\n return '';\n}\nfunction injectionError(injector, key, constructResolvingMessage, originalError) {\n var keys = [key];\n var errMsg = constructResolvingMessage(keys);\n var 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 * ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview))\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 var 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 * ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info))\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 * ### Example ([live demo](http://plnkr.co/edit/7aWYdcqTQsP0eNqEdUAf?p=preview))\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 var 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 * ### Example ([live demo](http://plnkr.co/edit/YatCFbPAMCL0JSSQ4mvH?p=preview))\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 * ### Example ([live demo](http://plnkr.co/edit/rHnZtlNS7vJOPQ6pcVkm?p=preview))\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 var signature = [];\n for (var i = 0, ii = params.length; i < ii; i++) {\n var 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 * ### Example ([live demo](http://plnkr.co/edit/bRs0SX2OTQiJzqvjgl8P?p=preview))\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 * ### 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 * @deprecated No replacement\n */\nvar ReflectiveKey = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveKey(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 /**\n * Retrieves a `Key` for a token.\n */\n ReflectiveKey.get = /**\n * Retrieves a `Key` for a token.\n */\n function (token) {\n return _globalKeyRegistry.get(resolveForwardRef(token));\n };\n Object.defineProperty(ReflectiveKey, \"numberOfKeys\", {\n /**\n * @returns the number of keys registered in the system.\n */\n get: /**\n * @returns the number of keys registered in the system.\n */\n function () { return _globalKeyRegistry.numberOfKeys; },\n enumerable: true,\n configurable: true\n });\n return ReflectiveKey;\n}());\nvar KeyRegistry = /** @class */ (function () {\n function KeyRegistry() {\n this._allKeys = new Map();\n }\n KeyRegistry.prototype.get = function (token) {\n if (token instanceof ReflectiveKey)\n return token;\n if (this._allKeys.has(token)) {\n return this._allKeys.get(token);\n }\n var newKey = new ReflectiveKey(token, ReflectiveKey.numberOfKeys);\n this._allKeys.set(token, newKey);\n return newKey;\n };\n Object.defineProperty(KeyRegistry.prototype, \"numberOfKeys\", {\n get: function () { return this._allKeys.size; },\n enumerable: true,\n configurable: true\n });\n return KeyRegistry;\n}());\nvar _globalKeyRegistry = new KeyRegistry();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar Reflector = /** @class */ (function () {\n function Reflector(reflectionCapabilities) {\n this.reflectionCapabilities = reflectionCapabilities;\n }\n Reflector.prototype.updateCapabilities = function (caps) { this.reflectionCapabilities = caps; };\n Reflector.prototype.factory = function (type) { return this.reflectionCapabilities.factory(type); };\n Reflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n Reflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n Reflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n Reflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n Reflector.prototype.getter = function (name) { return this.reflectionCapabilities.getter(name); };\n Reflector.prototype.setter = function (name) { return this.reflectionCapabilities.setter(name); };\n Reflector.prototype.method = function (name) { return this.reflectionCapabilities.method(name); };\n Reflector.prototype.importUri = function (type) { return this.reflectionCapabilities.importUri(type); };\n Reflector.prototype.resourceUri = function (type) { return this.reflectionCapabilities.resourceUri(type); };\n Reflector.prototype.resolveIdentifier = function (name, moduleUrl, members, runtime) {\n return this.reflectionCapabilities.resolveIdentifier(name, moduleUrl, members, runtime);\n };\n Reflector.prototype.resolveEnum = function (identifier, name) {\n return this.reflectionCapabilities.resolveEnum(identifier, name);\n };\n return Reflector;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar reflector = new Reflector(new ReflectionCapabilities());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar ReflectiveDependency = /** @class */ (function () {\n function ReflectiveDependency(key, optional, visibility) {\n this.key = key;\n this.optional = optional;\n this.visibility = visibility;\n }\n ReflectiveDependency.fromKey = function (key) {\n return new ReflectiveDependency(key, false, null);\n };\n return ReflectiveDependency;\n}());\nvar _EMPTY_LIST = [];\nvar ResolvedReflectiveProvider_ = /** @class */ (function () {\n function ResolvedReflectiveProvider_(key, resolvedFactories, multiProvider) {\n this.key = key;\n this.resolvedFactories = resolvedFactories;\n this.multiProvider = multiProvider;\n this.resolvedFactory = this.resolvedFactories[0];\n }\n return ResolvedReflectiveProvider_;\n}());\n/**\n * An internal resolved representation of a factory function created by resolving {@link\n * Provider}.\n * @experimental\n */\nvar ResolvedReflectiveFactory = /** @class */ (function () {\n function ResolvedReflectiveFactory(/**\n * Factory function which can return an instance of an object represented by a key.\n */\n factory, /**\n * Arguments (dependencies) to the `factory` function.\n */\n dependencies) {\n this.factory = factory;\n this.dependencies = dependencies;\n }\n return ResolvedReflectiveFactory;\n}());\n/**\n * Resolve a single provider.\n */\nfunction resolveReflectiveFactory(provider) {\n var factoryFn;\n var resolvedDeps;\n if (provider.useClass) {\n var useClass = resolveForwardRef(provider.useClass);\n factoryFn = reflector.factory(useClass);\n resolvedDeps = _dependenciesFor(useClass);\n }\n else if (provider.useExisting) {\n factoryFn = function (aliasInstance) { return 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 = function () { return provider.useValue; };\n resolvedDeps = _EMPTY_LIST;\n }\n return new ResolvedReflectiveFactory(factoryFn, resolvedDeps);\n}\n/**\n * Converts the {@link Provider} into {@link ResolvedProvider}.\n *\n * {@link Injector} internally only uses {@link ResolvedProvider}, {@link Provider} contains\n * convenience provider 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 var normalized = _normalizeProviders(providers, []);\n var resolved = normalized.map(resolveReflectiveProvider);\n var resolvedProviderMap = mergeResolvedReflectiveProviders(resolved, new Map());\n return Array.from(resolvedProviderMap.values());\n}\n/**\n * Merges a list of ResolvedProviders into a list where\n * each key is contained exactly once and multi providers\n * have been merged.\n */\nfunction mergeResolvedReflectiveProviders(providers, normalizedProvidersMap) {\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n var 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 (var 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 var resolvedProvider = void 0;\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(function (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 (b instanceof Array) {\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 var params_1 = dependencies.map(function (t) { return [t]; });\n return dependencies.map(function (t) { return _extractToken(typeOrFunc, t, params_1); });\n }\n}\nfunction _dependenciesFor(typeOrFunc) {\n var params = reflector.parameters(typeOrFunc);\n if (!params)\n return [];\n if (params.some(function (p) { return p == null; })) {\n throw noAnnotationError(typeOrFunc, params);\n }\n return params.map(function (p) { return _extractToken(typeOrFunc, p, params); });\n}\nfunction _extractToken(typeOrFunc, metadata, params) {\n var token = null;\n var 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 var visibility = null;\n for (var i = 0; i < metadata.length; ++i) {\n var 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 Inc. All Rights Reserved.\n *\n * Use of this source 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\nvar UNDEFINED = new Object();\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 * ### Example ([live demo](http://plnkr.co/edit/jzjec0?p=preview))\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 */\nvar ReflectiveInjector = /** @class */ (function () {\n function ReflectiveInjector() {\n }\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 {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\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 * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\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 {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\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 * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\n ReflectiveInjector.resolve = /**\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 {@link ResolvedReflectiveProvider}s.\n *\n * ### Example ([live demo](http://plnkr.co/edit/AiXTHi?p=preview))\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 * See {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders} for more info.\n */\n function (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`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\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 * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\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`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\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 * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\n */\n ReflectiveInjector.resolveAndCreate = /**\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`, {@link Provider},\n * or a recursive array of more providers.\n *\n * ### Example ([live demo](http://plnkr.co/edit/ePOccA?p=preview))\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 * This function is slower than the corresponding `fromResolvedProviders`\n * because it needs to resolve the passed-in providers first.\n * See {@link ReflectiveInjector#resolve resolve} and\n * {@link ReflectiveInjector#fromResolvedProviders fromResolvedProviders}.\n */\n function (providers, parent) {\n var 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 * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\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 * @experimental\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 * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\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 * @experimental\n */\n ReflectiveInjector.fromResolvedProviders = /**\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 * ### Example ([live demo](http://plnkr.co/edit/KrSMci?p=preview))\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 * @experimental\n */\n function (providers, parent) {\n return new ReflectiveInjector_(providers, parent);\n };\n return ReflectiveInjector;\n}());\nvar ReflectiveInjector_ = /** @class */ (function () {\n /**\n * Private\n */\n function ReflectiveInjector_(_providers, _parent) {\n /** @internal */\n this._constructionCounter = 0;\n this._providers = _providers;\n this.parent = _parent || null;\n var len = _providers.length;\n this.keyIds = new Array(len);\n this.objs = new Array(len);\n for (var i = 0; i < len; i++) {\n this.keyIds[i] = _providers[i].key.id;\n this.objs[i] = UNDEFINED;\n }\n }\n ReflectiveInjector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n return this._getByKey(ReflectiveKey.get(token), null, notFoundValue);\n };\n ReflectiveInjector_.prototype.resolveAndCreateChild = function (providers) {\n var ResolvedReflectiveProviders = ReflectiveInjector.resolve(providers);\n return this.createChildFromResolved(ResolvedReflectiveProviders);\n };\n ReflectiveInjector_.prototype.createChildFromResolved = function (providers) {\n var inj = new ReflectiveInjector_(providers);\n inj.parent = this;\n return inj;\n };\n ReflectiveInjector_.prototype.resolveAndInstantiate = function (provider) {\n return this.instantiateResolved(ReflectiveInjector.resolve([provider])[0]);\n };\n ReflectiveInjector_.prototype.instantiateResolved = function (provider) {\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype.getProviderAtIndex = function (index) {\n if (index < 0 || index >= this._providers.length) {\n throw outOfBoundsError(index);\n }\n return this._providers[index];\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._new = /** @internal */\n function (provider) {\n if (this._constructionCounter++ > this._getMaxNumberOfObjects()) {\n throw cyclicDependencyError(this, provider.key);\n }\n return this._instantiateProvider(provider);\n };\n ReflectiveInjector_.prototype._getMaxNumberOfObjects = function () { return this.objs.length; };\n ReflectiveInjector_.prototype._instantiateProvider = function (provider) {\n if (provider.multiProvider) {\n var res = new Array(provider.resolvedFactories.length);\n for (var 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 ReflectiveInjector_.prototype._instantiate = function (provider, ResolvedReflectiveFactory$$1) {\n var _this = this;\n var factory = ResolvedReflectiveFactory$$1.factory;\n var deps;\n try {\n deps =\n ResolvedReflectiveFactory$$1.dependencies.map(function (dep) { return _this._getByReflectiveDependency(dep); });\n }\n catch (e) {\n if (e.addKey) {\n e.addKey(this, provider.key);\n }\n throw e;\n }\n var obj;\n try {\n obj = factory.apply(void 0, __spread(deps));\n }\n catch (e) {\n throw instantiationError(this, e, e.stack, provider.key);\n }\n return obj;\n };\n ReflectiveInjector_.prototype._getByReflectiveDependency = function (dep) {\n return this._getByKey(dep.key, dep.visibility, dep.optional ? null : THROW_IF_NOT_FOUND);\n };\n ReflectiveInjector_.prototype._getByKey = function (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 ReflectiveInjector_.prototype._getObjByKeyId = function (keyId) {\n for (var 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 /** @internal */\n ReflectiveInjector_.prototype._throwOrNull = /** @internal */\n function (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 /** @internal */\n ReflectiveInjector_.prototype._getByKeySelf = /** @internal */\n function (key, notFoundValue) {\n var obj = this._getObjByKeyId(key.id);\n return (obj !== UNDEFINED) ? obj : this._throwOrNull(key, notFoundValue);\n };\n /** @internal */\n /** @internal */\n ReflectiveInjector_.prototype._getByKeyDefault = /** @internal */\n function (key, notFoundValue, visibility) {\n var inj;\n if (visibility instanceof SkipSelf) {\n inj = this.parent;\n }\n else {\n inj = this;\n }\n while (inj instanceof ReflectiveInjector_) {\n var inj_ = inj;\n var 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 Object.defineProperty(ReflectiveInjector_.prototype, \"displayName\", {\n get: function () {\n var providers = _mapProviders(this, function (b) { return ' \"' + b.key.displayName + '\" '; })\n .join(', ');\n return \"ReflectiveInjector(providers: [\" + providers + \"])\";\n },\n enumerable: true,\n configurable: true\n });\n ReflectiveInjector_.prototype.toString = function () { return this.displayName; };\n ReflectiveInjector_.INJECTOR_KEY = ReflectiveKey.get(Injector);\n return ReflectiveInjector_;\n}());\nfunction _mapProviders(injector, fn) {\n var res = new Array(injector._providers.length);\n for (var 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar APP_ROOT = new InjectionToken('The presence of this token marks an injector as being the root injector.');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar 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 */\nvar CIRCULAR$1 = {};\nvar EMPTY_ARRAY$1 = [];\n/**\n * A lazily initialized NullInjector.\n */\nvar NULL_INJECTOR$1 = undefined;\nfunction getNullInjector() {\n if (NULL_INJECTOR$1 === undefined) {\n NULL_INJECTOR$1 = new NullInjector();\n }\n return NULL_INJECTOR$1;\n}\n/**\n * Create a new `Injector` which is configured using `InjectorType`s.\n *\n * @experimental\n */\nfunction createInjector(defType, parent) {\n if (parent === void 0) { parent = null; }\n parent = parent || getNullInjector();\n return new R3Injector(defType, parent);\n}\nvar R3Injector = /** @class */ (function () {\n function R3Injector(def, parent) {\n var _this = this;\n this.parent = parent;\n /**\n * Map of tokens to records which contain the instances of those tokens.\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 /**\n * Flag indicating that this injector was previously destroyed.\n */\n this.destroyed = false;\n // Start off by creating Records for every provider declared in every InjectorType\n // included transitively in `def`.\n deepForEach([def], function (injectorDef) { return _this.processInjectorType(injectorDef, new Set()); });\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 this.isRootInjector = this.records.has(APP_ROOT);\n // Eagerly instantiate the InjectorType classes themselves.\n this.injectorDefTypes.forEach(function (defType) { return _this.get(defType); });\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 /**\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 R3Injector.prototype.destroy = /**\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 function () {\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(function (service) { return service.ngOnDestroy(); });\n }\n finally {\n // Release all references.\n this.records.clear();\n this.onDestroy.clear();\n this.injectorDefTypes.clear();\n }\n };\n R3Injector.prototype.get = function (token, notFoundValue, flags) {\n if (notFoundValue === void 0) { notFoundValue = THROW_IF_NOT_FOUND; }\n if (flags === void 0) { flags = 0 /* Default */; }\n this.assertNotDestroyed();\n // Set the injection context.\n var previousInjector = setCurrentInjector(this);\n try {\n // Check for the SkipSelf flag.\n if (!(flags & 4 /* SkipSelf */)) {\n // SkipSelf isn't set, check if the record belongs to this injector.\n var record = this.records.get(token);\n if (record === undefined) {\n // No record, but maybe the token is scoped to this injector. Look for an ngInjectableDef\n // with a scope matching this injector.\n var def = couldBeInjectableType(token) &&\n token.ngInjectableDef ||\n undefined;\n if (def !== undefined && this.injectableDefInScope(def)) {\n // Found an ngInjectableDef and it's scoped to this injector. Pretend as if it was here\n // all along.\n record = injectableDefRecord(token);\n this.records.set(token, record);\n }\n }\n // If a record was found, get the instance for it and return it.\n if (record !== 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 var next = !(flags & 2 /* Self */) ? this.parent : getNullInjector();\n return this.parent.get(token, notFoundValue);\n }\n finally {\n // Lastly, clean up the state by restoring the previous injector.\n setCurrentInjector(previousInjector);\n }\n };\n R3Injector.prototype.assertNotDestroyed = function () {\n if (this.destroyed) {\n throw new Error('Injector has already been destroyed.');\n }\n };\n /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n R3Injector.prototype.processInjectorType = /**\n * Add an `InjectorType` or `InjectorDefTypeWithProviders` and all of its transitive providers\n * to this injector.\n */\n function (defOrWrappedDef, parents) {\n var _this = this;\n defOrWrappedDef = resolveForwardRef(defOrWrappedDef);\n // Either the defOrWrappedDef is an InjectorType (with ngInjectorDef) 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 ngInjectorDef.\n var def = defOrWrappedDef.ngInjectorDef;\n // If that's not present, then attempt to read ngModule from the InjectorDefTypeWithProviders.\n var 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 var defType = (ngModule === undefined) ? defOrWrappedDef : ngModule;\n // If defOrWrappedType was an InjectorDefTypeWithProviders, then .providers may hold some\n // extra providers.\n var providers = (ngModule !== undefined) && defOrWrappedDef.providers ||\n EMPTY_ARRAY$1;\n // Finally, if defOrWrappedType was an `InjectorDefTypeWithProviders`, then the actual\n // `InjectorDef` is on its `ngModule`.\n if (ngModule !== undefined) {\n def = ngModule.ngInjectorDef;\n }\n // If no definition was found, throw.\n if (def == null) {\n throw new Error(\"Type \" + stringify(defType) + \" is missing an ngInjectorDef definition.\");\n }\n // Check for circular dependencies.\n if (parents.has(defType)) {\n throw new Error(\"Circular dependency: type \" + stringify(defType) + \" ends up importing itself.\");\n }\n // Track the InjectorType and add a provider for it.\n this.injectorDefTypes.add(defType);\n this.records.set(defType, makeRecord(def.factory));\n // Add providers in the same way that @NgModule resolution did:\n // First, include providers from any imports.\n if (def.imports != null) {\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 parents.add(defType);\n try {\n deepForEach(def.imports, function (imported) { return _this.processInjectorType(imported, parents); });\n }\n finally {\n // Remove it from the parents set when finished.\n parents.delete(defType);\n }\n }\n // Next, include providers listed on the definition itself.\n if (def.providers != null) {\n deepForEach(def.providers, function (provider) { return _this.processProvider(provider); });\n }\n // Finally, include providers from an InjectorDefTypeWithProviders if there was one.\n deepForEach(providers, function (provider) { return _this.processProvider(provider); });\n };\n /**\n * Process a `SingleProvider` and add it.\n */\n /**\n * Process a `SingleProvider` and add it.\n */\n R3Injector.prototype.processProvider = /**\n * Process a `SingleProvider` and add it.\n */\n function (provider) {\n // Determine the token from the provider. Either it's its own token, or has a {provide: ...}\n // property.\n provider = resolveForwardRef(provider);\n var token = isTypeProvider(provider) ? provider : resolveForwardRef(provider.provide);\n // Construct a `Record` for the provider.\n var record = providerToRecord(provider);\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 var multiRecord_1 = this.records.get(token);\n if (multiRecord_1) {\n // It has. Throw a nice error if\n if (multiRecord_1.multi === undefined) {\n throw new Error(\"Mixed multi-provider for \" + token + \".\");\n }\n }\n else {\n token = provider;\n multiRecord_1 = makeRecord(undefined, NOT_YET, true);\n multiRecord_1.factory = function () { return injectArgs((multiRecord_1.multi)); };\n this.records.set(token, multiRecord_1);\n }\n token = provider;\n multiRecord_1.multi.push(provider);\n }\n var existing = this.records.get(token);\n if (existing && existing.multi !== undefined) {\n throw new Error(\"Mixed multi-provider for \" + token);\n }\n this.records.set(token, record);\n };\n R3Injector.prototype.hydrate = function (token, record) {\n if (record.value === CIRCULAR$1) {\n throw new Error(\"Circular dep for \" + stringify(token));\n }\n else if (record.value === NOT_YET) {\n record.value = CIRCULAR$1;\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 R3Injector.prototype.injectableDefInScope = function (def) {\n if (!def.providedIn) {\n return false;\n }\n else if (typeof def.providedIn === 'string') {\n return def.providedIn === 'any' || (def.providedIn === 'root' && this.isRootInjector);\n }\n else {\n return this.injectorDefTypes.has(def.providedIn);\n }\n };\n return R3Injector;\n}());\nfunction injectableDefRecord(token) {\n var def = token.ngInjectableDef;\n if (def === undefined) {\n throw new Error(\"Type \" + stringify(token) + \" is missing an ngInjectableDef definition.\");\n }\n return makeRecord(def.factory);\n}\nfunction providerToRecord(provider) {\n var token = resolveForwardRef(provider);\n var value = NOT_YET;\n var factory = undefined;\n if (isTypeProvider(provider)) {\n return injectableDefRecord(provider);\n }\n else {\n token = resolveForwardRef(provider.provide);\n if (isValueProvider(provider)) {\n value = provider.useValue;\n }\n else if (isExistingProvider(provider)) {\n factory = function () { return inject(provider.useExisting); };\n }\n else if (isFactoryProvider(provider)) {\n factory = function () { return provider.useFactory.apply(provider, __spread(injectArgs(provider.deps || []))); };\n }\n else {\n var classRef_1 = provider.useClass || token;\n if (hasDeps(provider)) {\n factory = function () { return new ((classRef_1).bind.apply((classRef_1), __spread([void 0], injectArgs(provider.deps))))(); };\n }\n else {\n return injectableDefRecord(classRef_1);\n }\n }\n }\n return makeRecord(factory, value);\n}\nfunction makeRecord(factory, value, multi) {\n if (value === void 0) { value = NOT_YET; }\n if (multi === void 0) { multi = false; }\n return {\n factory: factory,\n value: value,\n multi: multi ? [] : undefined,\n };\n}\nfunction deepForEach(input, fn) {\n input.forEach(function (value) { return Array.isArray(value) ? deepForEach(value, fn) : fn(value); });\n}\nfunction isValueProvider(value) {\n return USE_VALUE$1 in value;\n}\nfunction isExistingProvider(value) {\n return !!value.useExisting;\n}\nfunction isFactoryProvider(value) {\n return !!value.useFactory;\n}\nfunction isTypeProvider(value) {\n return typeof value === 'function';\n}\nfunction hasDeps(value) {\n return !!value.deps;\n}\nfunction hasOnDestroy(value) {\n return typeof value === 'object' && value != null && value.ngOnDestroy &&\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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Symbol.observable when https://github.com/ReactiveX/rxjs/issues/2415 will be resolved\n return !!obj && typeof obj.subscribe === 'function';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 function that will be executed when an application is initialized.\n * @experimental\n */\nvar APP_INITIALIZER = new InjectionToken('Application Initializer');\n/**\n * A class that reflects the state of running {@link APP_INITIALIZER}s.\n *\n * @experimental\n */\nvar ApplicationInitStatus = /** @class */ (function () {\n function ApplicationInitStatus(appInits) {\n var _this = this;\n this.appInits = appInits;\n this.initialized = false;\n this.done = false;\n this.donePromise = new Promise(function (res, rej) {\n _this.resolve = res;\n _this.reject = rej;\n });\n }\n /** @internal */\n /** @internal */\n ApplicationInitStatus.prototype.runInitializers = /** @internal */\n function () {\n var _this = this;\n if (this.initialized) {\n return;\n }\n var asyncInitPromises = [];\n var complete = function () {\n _this.done = true;\n _this.resolve();\n };\n if (this.appInits) {\n for (var i = 0; i < this.appInits.length; i++) {\n var initResult = this.appInits[i]();\n if (isPromise(initResult)) {\n asyncInitPromises.push(initResult);\n }\n }\n }\n Promise.all(asyncInitPromises).then(function () { complete(); }).catch(function (e) { _this.reject(e); });\n if (asyncInitPromises.length === 0) {\n complete();\n }\n this.initialized = true;\n };\n ApplicationInitStatus.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationInitStatus.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Inject, args: [APP_INITIALIZER,] }, { type: Optional },] },\n ]; };\n return ApplicationInitStatus;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 representing a unique string id assigned to the application by Angular and used\n * primarily for prefixing application attributes and CSS styles when\n * {@link ViewEncapsulation#Emulated ViewEncapsulation.Emulated} is being used.\n *\n * If you need to avoid randomly generated value to be used as an application id, you can provide\n * a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}\n * using this token.\n * @experimental\n */\nvar APP_ID = new InjectionToken('AppId');\nfunction _appIdRandomProviderFactory() {\n return \"\" + _randomChar() + _randomChar() + _randomChar();\n}\n/**\n * Providers that will generate a random APP_ID_TOKEN.\n * @experimental\n */\nvar 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 will be executed when a platform is initialized.\n * @experimental\n */\nvar PLATFORM_INITIALIZER = new InjectionToken('Platform Initializer');\n/**\n * A token that indicates an opaque platform id.\n * @experimental\n */\nvar PLATFORM_ID = new InjectionToken('Platform ID');\n/**\n * All callbacks provided via this token will be called for every component that is bootstrapped.\n * Signature of the callback:\n *\n * `(componentRef: ComponentRef) => void`.\n *\n * @experimental\n */\nvar APP_BOOTSTRAP_LISTENER = new InjectionToken('appBootstrapListener');\n/**\n * A token which indicates the root directory of the application\n * @experimental\n */\nvar PACKAGE_ROOT_URL = new InjectionToken('Application Packages Root URL');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 Console = /** @class */ (function () {\n function Console() {\n }\n Console.prototype.log = function (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 // Note: for reporting errors use `DOM.logError()` as it is platform specific\n Console.prototype.warn = \n // Note: for reporting errors use `DOM.logError()` as it is platform specific\n function (message) {\n // tslint:disable-next-line:no-console\n console.warn(message);\n };\n Console.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Console.ctorParameters = function () { return []; };\n return Console;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @experimental\n */\nvar ModuleWithComponentFactories = /** @class */ (function () {\n function ModuleWithComponentFactories(ngModuleFactory, componentFactories) {\n this.ngModuleFactory = ngModuleFactory;\n this.componentFactories = componentFactories;\n }\n return ModuleWithComponentFactories;\n}());\nfunction _throwError() {\n throw new Error(\"Runtime compiler is not loaded\");\n}\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 */\nvar Compiler = /** @class */ (function () {\n function Compiler() {\n }\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 /**\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 Compiler.prototype.compileModuleSync = /**\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 function (moduleType) { throw _throwError(); };\n /**\n * Compiles the given NgModule and all of its components\n */\n /**\n * Compiles the given NgModule and all of its components\n */\n Compiler.prototype.compileModuleAsync = /**\n * Compiles the given NgModule and all of its components\n */\n function (moduleType) { throw _throwError(); };\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsSync = /**\n * Same as {@link #compileModuleSync} but also creates ComponentFactories for all components.\n */\n function (moduleType) {\n throw _throwError();\n };\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n Compiler.prototype.compileModuleAndAllComponentsAsync = /**\n * Same as {@link #compileModuleAsync} but also creates ComponentFactories for all components.\n */\n function (moduleType) {\n throw _throwError();\n };\n /**\n * Clears all caches.\n */\n /**\n * Clears all caches.\n */\n Compiler.prototype.clearCache = /**\n * Clears all caches.\n */\n function () { };\n /**\n * Clears the cache for the given component/ngModule.\n */\n /**\n * Clears the cache for the given component/ngModule.\n */\n Compiler.prototype.clearCacheFor = /**\n * Clears the cache for the given component/ngModule.\n */\n function (type) { };\n Compiler.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Compiler.ctorParameters = function () { return []; };\n return Compiler;\n}());\n/**\n * Token to provide CompilerOptions in the platform injector.\n *\n * @experimental\n */\nvar COMPILER_OPTIONS = new InjectionToken('compilerOptions');\n/**\n * A factory for creating a Compiler\n *\n * @experimental\n */\nvar CompilerFactory = /** @class */ (function () {\n function CompilerFactory() {\n }\n return CompilerFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 */\nvar ComponentRef = /** @class */ (function () {\n function ComponentRef() {\n }\n return ComponentRef;\n}());\n/**\n *\n */\nvar ComponentFactory = /** @class */ (function () {\n function ComponentFactory() {\n }\n return ComponentFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var 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}\nvar ERROR_COMPONENT = 'ngComponent';\n\nvar _NullComponentFactoryResolver = /** @class */ (function () {\n function _NullComponentFactoryResolver() {\n }\n _NullComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n throw noComponentFactoryError(component);\n };\n return _NullComponentFactoryResolver;\n}());\n/**\n *\n */\nvar ComponentFactoryResolver = /** @class */ (function () {\n function ComponentFactoryResolver() {\n }\n ComponentFactoryResolver.NULL = new _NullComponentFactoryResolver();\n return ComponentFactoryResolver;\n}());\nvar CodegenComponentFactoryResolver = /** @class */ (function () {\n function CodegenComponentFactoryResolver(factories, _parent, _ngModule) {\n this._parent = _parent;\n this._ngModule = _ngModule;\n this._factories = new Map();\n for (var i = 0; i < factories.length; i++) {\n var factory = factories[i];\n this._factories.set(factory.componentType, factory);\n }\n }\n CodegenComponentFactoryResolver.prototype.resolveComponentFactory = function (component) {\n var 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 return CodegenComponentFactoryResolver;\n}());\nvar ComponentFactoryBoundToModule = /** @class */ (function (_super) {\n __extends(ComponentFactoryBoundToModule, _super);\n function ComponentFactoryBoundToModule(factory, ngModule) {\n var _this = _super.call(this) || this;\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 return _this;\n }\n ComponentFactoryBoundToModule.prototype.create = function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n return this.factory.create(injector, projectableNodes, rootSelectorOrNode, ngModule || this.ngModule);\n };\n return ComponentFactoryBoundToModule;\n}(ComponentFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 via a {@link NgModuleFactory}.\n *\n * `NgModuleRef` provides access to the NgModule Instance as well other objects related to this\n * NgModule Instance.\n *\n *\n */\nvar NgModuleRef = /** @class */ (function () {\n function NgModuleRef() {\n }\n return NgModuleRef;\n}());\n/**\n * @experimental\n */\nvar NgModuleFactory = /** @class */ (function () {\n function NgModuleFactory() {\n }\n return NgModuleFactory;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 trace;\nvar events;\nfunction detectWTF() {\n var wtf = _global /** TODO #9100 */['wtf'];\n if (wtf) {\n trace = wtf['trace'];\n if (trace) {\n events = trace['events'];\n return true;\n }\n }\n return false;\n}\nfunction createScope(signature, flags) {\n if (flags === void 0) { flags = null; }\n return events.createScope(signature, flags);\n}\nfunction leave(scope, returnValue) {\n trace.leaveScope(scope, returnValue);\n return returnValue;\n}\nfunction startTimeRange(rangeType, action) {\n return trace.beginTimeRange(rangeType, action);\n}\nfunction endTimeRange(range) {\n trace.endTimeRange(range);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 WTF is enabled.\n */\nvar wtfEnabled = detectWTF();\nfunction noopScope(arg0, arg1) {\n return null;\n}\n/**\n * Create trace scope.\n *\n * Scopes must be strictly nested and are analogous to stack frames, but\n * do not have to follow the stack frames. Instead it is recommended that they follow logical\n * nesting. You may want to use\n * [Event\n * Signatures](http://google.github.io/tracing-framework/instrumenting-code.html#custom-events)\n * as they are defined in WTF.\n *\n * Used to mark scope entry. The return value is used to leave the scope.\n *\n * var myScope = wtfCreateScope('MyClass#myMethod(ascii someVal)');\n *\n * someMethod() {\n * var s = myScope('Foo'); // 'Foo' gets stored in tracing UI\n * // DO SOME WORK HERE\n * return wtfLeave(s, 123); // Return value 123\n * }\n *\n * Note, adding try-finally block around the work to ensure that `wtfLeave` gets called can\n * negatively impact the performance of your application. For this reason we recommend that\n * you don't add them to ensure that `wtfLeave` gets called. In production `wtfLeave` is a noop and\n * so try-finally block has no value. When debugging perf issues, skipping `wtfLeave`, do to\n * exception, will produce incorrect trace, but presence of exception signifies logic error which\n * needs to be fixed before the app should be profiled. Add try-finally only when you expect that\n * an exception is expected during normal execution while profiling.\n *\n * @experimental\n */\nvar wtfCreateScope = wtfEnabled ? createScope : function (signature, flags) { return noopScope; };\n/**\n * Used to mark end of Scope.\n *\n * - `scope` to end.\n * - `returnValue` (optional) to be passed to the WTF.\n *\n * Returns the `returnValue for easy chaining.\n * @experimental\n */\nvar wtfLeave = wtfEnabled ? leave : function (s, r) { return r; };\n/**\n * Used to mark Async start. Async are similar to scope but they don't have to be strictly nested.\n * The return value is used in the call to [endAsync]. Async ranges only work if WTF has been\n * enabled.\n *\n * someMethod() {\n * var s = wtfStartTimeRange('HTTP:GET', 'some.url');\n * var future = new Future.delay(5).then((_) {\n * wtfEndTimeRange(s);\n * });\n * }\n * @experimental\n */\nvar wtfStartTimeRange = wtfEnabled ? startTimeRange : function (rangeType, action) { return null; };\n/**\n * Ends a async time range operation.\n * [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been\n * enabled.\n * @experimental\n */\nvar wtfEndTimeRange = wtfEnabled ? endTimeRange : function (r) { return null; };\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Use by directives and components to emit custom Events.\n *\n * ### Examples\n *\n * In the following example, `Zippy` alternatively emits `open` and `close` events when its\n * title gets clicked:\n *\n * ```\n * @Component({\n * selector: 'zippy',\n * template: `\n * <div class=\"zippy\">\n * <div (click)=\"toggle()\">Toggle</div>\n * <div [hidden]=\"!visible\">\n * <ng-content></ng-content>\n * </div>\n * </div>`})\n * export class Zippy {\n * visible: boolean = true;\n * @Output() open: EventEmitter<any> = new EventEmitter();\n * @Output() close: EventEmitter<any> = new EventEmitter();\n *\n * toggle() {\n * this.visible = !this.visible;\n * if (this.visible) {\n * this.open.emit(null);\n * } else {\n * this.close.emit(null);\n * }\n * }\n * }\n * ```\n *\n * The events payload can be accessed by the parameter `$event` on the components output event\n * handler:\n *\n * ```\n * <zippy (open)=\"onOpen($event)\" (close)=\"onClose($event)\"></zippy>\n * ```\n *\n * Uses Rx.Observable but provides an adapter to make it work as specified here:\n * https://github.com/jhusain/observable-spec\n *\n * Once a reference implementation of the spec is available, switch to it.\n *\n */\nvar EventEmitter = /** @class */ (function (_super) {\n __extends(EventEmitter, _super);\n /**\n * Creates an instance of {@link EventEmitter}, which depending on `isAsync`,\n * delivers events synchronously or asynchronously.\n *\n * @param isAsync By default, events are delivered synchronously (default value: `false`).\n * Set to `true` for asynchronous event delivery.\n */\n function EventEmitter(isAsync) {\n if (isAsync === void 0) { isAsync = false; }\n var _this = _super.call(this) || this;\n _this.__isAsync = isAsync;\n return _this;\n }\n EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };\n EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {\n var schedulerFn;\n var errorFn = function (err) { return null; };\n var completeFn = function () { return null; };\n if (generatorOrNext && typeof generatorOrNext === 'object') {\n schedulerFn = this.__isAsync ? function (value) {\n setTimeout(function () { return generatorOrNext.next(value); });\n } : function (value) { generatorOrNext.next(value); };\n if (generatorOrNext.error) {\n errorFn = this.__isAsync ? function (err) { setTimeout(function () { return generatorOrNext.error(err); }); } :\n function (err) { generatorOrNext.error(err); };\n }\n if (generatorOrNext.complete) {\n completeFn = this.__isAsync ? function () { setTimeout(function () { return generatorOrNext.complete(); }); } :\n function () { generatorOrNext.complete(); };\n }\n }\n else {\n schedulerFn = this.__isAsync ? function (value) { setTimeout(function () { return generatorOrNext(value); }); } :\n function (value) { generatorOrNext(value); };\n if (error) {\n errorFn =\n this.__isAsync ? function (err) { setTimeout(function () { return error(err); }); } : function (err) { error(err); };\n }\n if (complete) {\n completeFn =\n this.__isAsync ? function () { setTimeout(function () { return complete(); }); } : function () { complete(); };\n }\n }\n var sink = _super.prototype.subscribe.call(this, schedulerFn, errorFn, completeFn);\n if (generatorOrNext instanceof Subscription) {\n generatorOrNext.add(sink);\n }\n return sink;\n };\n return EventEmitter;\n}(Subject));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * ### 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 * @experimental\n */\nvar NgZone = /** @class */ (function () {\n function NgZone(_a) {\n var _b = _a.enableLongStackTrace, enableLongStackTrace = _b === void 0 ? false : _b;\n this.hasPendingMicrotasks = false;\n this.hasPendingMacrotasks = 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 var 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 forkInnerZoneWithAngularBehavior(self);\n }\n NgZone.isInAngularZone = function () { return Zone.current.get('isAngularZone') === true; };\n NgZone.assertInAngularZone = function () {\n if (!NgZone.isInAngularZone()) {\n throw new Error('Expected to be in Angular Zone, but it is not!');\n }\n };\n NgZone.assertNotInAngularZone = function () {\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 /**\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 NgZone.prototype.run = /**\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 function (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 /**\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 NgZone.prototype.runTask = /**\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 function (fn, applyThis, applyArgs, name) {\n var zone = this._inner;\n var task = zone.scheduleEventTask('NgZoneEvent: ' + name, fn, EMPTY_PAYLOAD, noop, noop);\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 /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n NgZone.prototype.runGuarded = /**\n * Same as `run`, except that synchronous errors are caught and forwarded via `onError` and not\n * rethrown.\n */\n function (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 /**\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 NgZone.prototype.runOutsideAngular = /**\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 function (fn) {\n return this._outer.run(fn);\n };\n return NgZone;\n}());\nfunction noop() { }\nvar 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(function () { return zone.onStable.emit(null); });\n }\n finally {\n zone.isStable = true;\n }\n }\n }\n }\n}\nfunction forkInnerZoneWithAngularBehavior(zone) {\n zone._inner = zone._inner.fork({\n name: 'angular',\n properties: { 'isAngularZone': true },\n onInvokeTask: function (delegate, current, target, task, applyThis, applyArgs) {\n try {\n onEnter(zone);\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n }\n finally {\n onLeave(zone);\n }\n },\n onInvoke: function (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: function (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 checkStable(zone);\n }\n else if (hasTaskState.change == 'macroTask') {\n zone.hasPendingMacrotasks = hasTaskState.macroTask;\n }\n }\n },\n onHandleError: function (delegate, current, target, error) {\n delegate.handleError(target, error);\n zone.runOutsideAngular(function () { return zone.onError.emit(error); });\n return false;\n }\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 */\nvar NoopNgZone = /** @class */ (function () {\n function NoopNgZone() {\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 NoopNgZone.prototype.run = function (fn) { return fn(); };\n NoopNgZone.prototype.runGuarded = function (fn) { return fn(); };\n NoopNgZone.prototype.runOutsideAngular = function (fn) { return fn(); };\n NoopNgZone.prototype.runTask = function (fn) { return fn(); };\n return NoopNgZone;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @experimental\n */\nvar Testability = /** @class */ (function () {\n function Testability(_ngZone) {\n var _this = this;\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._watchAngularEvents();\n _ngZone.run(function () { _this.taskTrackingZone = Zone.current.get('TaskTrackingZone'); });\n }\n Testability.prototype._watchAngularEvents = function () {\n var _this = this;\n this._ngZone.onUnstable.subscribe({\n next: function () {\n _this._didWork = true;\n _this._isZoneStable = false;\n }\n });\n this._ngZone.runOutsideAngular(function () {\n _this._ngZone.onStable.subscribe({\n next: function () {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(function () {\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 /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n Testability.prototype.increasePendingRequestCount = /**\n * Increases the number of pending request\n * @deprecated pending requests are now tracked with zones.\n */\n function () {\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 /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.decreasePendingRequestCount = /**\n * Decreases the number of pending request\n * @deprecated pending requests are now tracked with zones\n */\n function () {\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 /**\n * Whether an associated application is stable\n */\n Testability.prototype.isStable = /**\n * Whether an associated application is stable\n */\n function () {\n return this._isZoneStable && this._pendingCount === 0 && !this._ngZone.hasPendingMacrotasks;\n };\n Testability.prototype._runCallbacksIfReady = function () {\n var _this = this;\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(function () {\n while (_this._callbacks.length !== 0) {\n var 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 var pending_1 = this.getPendingTasks();\n this._callbacks = this._callbacks.filter(function (cb) {\n if (cb.updateCb && cb.updateCb(pending_1)) {\n clearTimeout(cb.timeoutId);\n return false;\n }\n return true;\n });\n this._didWork = true;\n }\n };\n Testability.prototype.getPendingTasks = function () {\n if (!this.taskTrackingZone) {\n return [];\n }\n return this.taskTrackingZone.macroTasks.map(function (t) {\n return {\n source: t.source,\n isPeriodic: t.data.isPeriodic,\n delay: t.data.delay,\n // From TaskTrackingZone:\n // https://github.com/angular/zone.js/blob/master/lib/zone-spec/task-tracking.ts#L40\n creationLocation: t.creationLocation,\n // Added by Zones for XHRs\n // https://github.com/angular/zone.js/blob/master/lib/browser/browser.ts#L133\n xhr: t.data.target\n };\n });\n };\n Testability.prototype.addCallback = function (cb, timeout, updateCb) {\n var _this = this;\n var timeoutId = -1;\n if (timeout && timeout > 0) {\n timeoutId = setTimeout(function () {\n _this._callbacks = _this._callbacks.filter(function (cb) { return 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 /**\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 Testability.prototype.whenStable = /**\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 function (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 /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n Testability.prototype.getPendingRequestCount = /**\n * Get the number of pending requests\n * @deprecated pending requests are now tracked with zones\n */\n function () { return this._pendingCount; };\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 /**\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 Testability.prototype.findProviders = /**\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 function (using, provider, exactMatch) {\n // TODO(juliemr): implement.\n return [];\n };\n Testability.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Testability.ctorParameters = function () { return [\n { type: NgZone, },\n ]; };\n return Testability;\n}());\n/**\n * A global registry of {@link Testability} instances for specific elements.\n * @experimental\n */\nvar TestabilityRegistry = /** @class */ (function () {\n function TestabilityRegistry() {\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 /**\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 TestabilityRegistry.prototype.registerApplication = /**\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 function (token, testability) {\n this._applications.set(token, testability);\n };\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n TestabilityRegistry.prototype.unregisterApplication = /**\n * Unregisters an application.\n * @param token token of application, root element\n */\n function (token) { this._applications.delete(token); };\n /**\n * Unregisters all applications\n */\n /**\n * Unregisters all applications\n */\n TestabilityRegistry.prototype.unregisterAllApplications = /**\n * Unregisters all applications\n */\n function () { this._applications.clear(); };\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n TestabilityRegistry.prototype.getTestability = /**\n * Get a testability hook associated with the application\n * @param elem root element\n */\n function (elem) { return this._applications.get(elem) || null; };\n /**\n * Get all registered testabilities\n */\n /**\n * Get all registered testabilities\n */\n TestabilityRegistry.prototype.getAllTestabilities = /**\n * Get all registered testabilities\n */\n function () { return Array.from(this._applications.values()); };\n /**\n * Get all registered applications(root elements)\n */\n /**\n * Get all registered applications(root elements)\n */\n TestabilityRegistry.prototype.getAllRootElements = /**\n * Get all registered applications(root elements)\n */\n function () { return Array.from(this._applications.keys()); };\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 /**\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 TestabilityRegistry.prototype.findTestabilityInTree = /**\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 function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n };\n TestabilityRegistry.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n TestabilityRegistry.ctorParameters = function () { return []; };\n return TestabilityRegistry;\n}());\nvar _NoopGetTestability = /** @class */ (function () {\n function _NoopGetTestability() {\n }\n _NoopGetTestability.prototype.addToWindow = function (registry) { };\n _NoopGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n return null;\n };\n return _NoopGetTestability;\n}());\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @experimental\n */\nfunction setTestabilityGetter(getter) {\n _testabilityGetter = getter;\n}\nvar _testabilityGetter = new _NoopGetTestability();\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _devMode = true;\nvar _runModeLocked = false;\nvar _platform;\nvar ALLOW_MULTIPLE_PLATFORMS = new InjectionToken('AllowMultipleToken');\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 *\n */\nfunction enableProdMode() {\n if (_runModeLocked) {\n throw new Error('Cannot enable prod mode after platform setup.');\n }\n _devMode = false;\n}\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 * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction isDevMode() {\n _runModeLocked = true;\n return _devMode;\n}\n/**\n * A token for third-party components that can register themselves with NgProbe.\n *\n * @experimental\n */\nvar NgProbeToken = /** @class */ (function () {\n function NgProbeToken(name, token) {\n this.name = name;\n this.token = token;\n }\n return NgProbeToken;\n}());\n/**\n * Creates a platform.\n * Platforms have to be eagerly created via this function.\n *\n * @experimental APIs related to application bootstrap are currently under review.\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 _platform = injector.get(PlatformRef);\n var inits = injector.get(PLATFORM_INITIALIZER, null);\n if (inits)\n inits.forEach(function (init) { return init(); });\n return _platform;\n}\n/**\n * Creates a factory for a platform\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction createPlatformFactory(parentPlatformFactory, name, providers) {\n if (providers === void 0) { providers = []; }\n var desc = \"Platform: \" + name;\n var marker = new InjectionToken(desc);\n return function (extraProviders) {\n if (extraProviders === void 0) { extraProviders = []; }\n var 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 var injectedProviders = providers.concat(extraProviders).concat({ provide: marker, useValue: true });\n createPlatform(Injector.create({ providers: injectedProviders, name: desc }));\n }\n }\n return assertPlatform(marker);\n };\n}\n/**\n * Checks that there currently is a platform which contains the given token as a provider.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction assertPlatform(requiredToken) {\n var 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 * Destroy the existing platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\n */\nfunction destroyPlatform() {\n if (_platform && !_platform.destroyed) {\n _platform.destroy();\n }\n}\n/**\n * Returns the current platform.\n *\n * @experimental APIs related to application bootstrap are currently under review.\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. Each page\n * has exactly one platform, and services (such as reflection) which are common\n * to every Angular application running on the page are bound in its scope.\n *\n * A page's platform is initialized implicitly when a platform is created via a platform factory\n * (e.g. {@link platformBrowser}), or explicitly by calling the {@link createPlatform} function.\n *\n *\n */\nvar PlatformRef = /** @class */ (function () {\n /** @internal */\n function PlatformRef(_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\n * for offline compilation.\n *\n * ## Simple Example\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 * @experimental APIs related to application bootstrap are currently under review.\n */\n /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\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 * @experimental APIs related to application bootstrap are currently under review.\n */\n PlatformRef.prototype.bootstrapModuleFactory = /**\n * Creates an instance of an `@NgModule` for the given platform\n * for offline compilation.\n *\n * ## Simple Example\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 * @experimental APIs related to application bootstrap are currently under review.\n */\n function (moduleFactory, options) {\n var _this = this;\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 var ngZoneOption = options ? options.ngZone : undefined;\n var ngZone = getNgZone(ngZoneOption);\n var 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(function () {\n var ngZoneInjector = Injector.create({ providers: providers, parent: _this.injector, name: moduleFactory.moduleType.name });\n var moduleRef = moduleFactory.create(ngZoneInjector);\n var exceptionHandler = moduleRef.injector.get(ErrorHandler, null);\n if (!exceptionHandler) {\n throw new Error('No ErrorHandler. Is platform module (BrowserModule) included?');\n }\n moduleRef.onDestroy(function () { return remove(_this._modules, moduleRef); });\n ngZone.runOutsideAngular(function () {\n return ngZone.onError.subscribe({ next: function (error) { exceptionHandler.handleError(error); } });\n });\n return _callAndReportToErrorHandler(exceptionHandler, (ngZone), function () {\n var initStatus = moduleRef.injector.get(ApplicationInitStatus);\n initStatus.runInitializers();\n return initStatus.donePromise.then(function () {\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 * ## 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 /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\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 PlatformRef.prototype.bootstrapModule = /**\n * Creates an instance of an `@NgModule` for a given platform using the given runtime compiler.\n *\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 function (moduleType, compilerOptions) {\n var _this = this;\n if (compilerOptions === void 0) { compilerOptions = []; }\n var compilerFactory = this.injector.get(CompilerFactory);\n var options = optionsReducer({}, compilerOptions);\n var compiler = compilerFactory.createCompiler([options]);\n return compiler.compileModuleAsync(moduleType)\n .then(function (moduleFactory) { return _this.bootstrapModuleFactory(moduleFactory, options); });\n };\n PlatformRef.prototype._moduleDoBootstrap = function (moduleRef) {\n var appRef = moduleRef.injector.get(ApplicationRef);\n if (moduleRef._bootstrapComponents.length > 0) {\n moduleRef._bootstrapComponents.forEach(function (f) { return 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.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 * Register a listener to be called when the platform is disposed.\n */\n /**\n * Register a listener to be called when the platform is disposed.\n */\n PlatformRef.prototype.onDestroy = /**\n * Register a listener to be called when the platform is disposed.\n */\n function (callback) { this._destroyListeners.push(callback); };\n Object.defineProperty(PlatformRef.prototype, \"injector\", {\n /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n get: /**\n * Retrieve the platform {@link Injector}, which is the parent injector for\n * every Angular application on the page and provides singleton providers.\n */\n function () { return this._injector; },\n enumerable: true,\n configurable: true\n });\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n PlatformRef.prototype.destroy = /**\n * Destroy the Angular platform and all Angular applications on the page.\n */\n function () {\n if (this._destroyed) {\n throw new Error('The platform has already been destroyed!');\n }\n this._modules.slice().forEach(function (module) { return module.destroy(); });\n this._destroyListeners.forEach(function (listener) { return listener(); });\n this._destroyed = true;\n };\n Object.defineProperty(PlatformRef.prototype, \"destroyed\", {\n get: function () { return this._destroyed; },\n enumerable: true,\n configurable: true\n });\n PlatformRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n PlatformRef.ctorParameters = function () { return [\n { type: Injector, },\n ]; };\n return PlatformRef;\n}());\nfunction getNgZone(ngZoneOption) {\n var ngZone;\n if (ngZoneOption === 'noop') {\n ngZone = new NoopNgZone();\n }\n else {\n ngZone = (ngZoneOption === 'zone.js' ? undefined : ngZoneOption) ||\n new NgZone({ enableLongStackTrace: isDevMode() });\n }\n return ngZone;\n}\nfunction _callAndReportToErrorHandler(errorHandler, ngZone, callback) {\n try {\n var result = callback();\n if (isPromise(result)) {\n return result.catch(function (e) {\n ngZone.runOutsideAngular(function () { return 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(function () { return 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 = __assign({}, dst, objs);\n }\n return dst;\n}\n/**\n * A reference to an Angular application running on a page.\n *\n *\n */\nvar ApplicationRef = /** @class */ (function () {\n /** @internal */\n function ApplicationRef(_zone, _console, _injector, _exceptionHandler, _componentFactoryResolver, _initStatus) {\n var _this = this;\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 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({ next: function () { _this._zone.run(function () { _this.tick(); }); } });\n var isCurrentlyStable = new Observable(function (observer) {\n _this._stable = _this._zone.isStable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks;\n _this._zone.runOutsideAngular(function () {\n observer.next(_this._stable);\n observer.complete();\n });\n });\n var isStable = new Observable(function (observer) {\n // Create the subscription to onStable outside the Angular Zone so that\n // the callback is run outside the Angular Zone.\n var stableSub;\n _this._zone.runOutsideAngular(function () {\n stableSub = _this._zone.onStable.subscribe(function () {\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(function () {\n if (!_this._stable && !_this._zone.hasPendingMacrotasks &&\n !_this._zone.hasPendingMicrotasks) {\n _this._stable = true;\n observer.next(true);\n }\n });\n });\n });\n var unstableSub = _this._zone.onUnstable.subscribe(function () {\n NgZone.assertInAngularZone();\n if (_this._stable) {\n _this._stable = false;\n _this._zone.runOutsideAngular(function () { observer.next(false); });\n }\n });\n return function () {\n stableSub.unsubscribe();\n unstableSub.unsubscribe();\n };\n });\n this.isStable =\n merge(isCurrentlyStable, isStable.pipe(share()));\n }\n /**\n * Bootstrap a new component at the root level of the application.\n *\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 /**\n * Bootstrap a new component at the root level of the application.\n *\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 ApplicationRef.prototype.bootstrap = /**\n * Bootstrap a new component at the root level of the application.\n *\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 function (componentOrFactory, rootSelectorOrNode) {\n var _this = this;\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 var 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 var ngModule = componentFactory instanceof ComponentFactoryBoundToModule ?\n null :\n this._injector.get(NgModuleRef);\n var selectorOrNode = rootSelectorOrNode || componentFactory.selector;\n var compRef = componentFactory.create(Injector.NULL, [], selectorOrNode, ngModule);\n compRef.onDestroy(function () { _this._unloadComponent(compRef); });\n var 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 the development mode. Call enableProdMode() to enable the 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 /**\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 ApplicationRef.prototype.tick = /**\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 function () {\n var _this = this;\n if (this._runningTick) {\n throw new Error('ApplicationRef.tick is called recursively');\n }\n var scope = ApplicationRef._tickScope();\n try {\n this._runningTick = true;\n this._views.forEach(function (view) { return view.detectChanges(); });\n if (this._enforceNoNewChanges) {\n this._views.forEach(function (view) { return view.checkNoChanges(); });\n }\n }\n catch (e) {\n // Attention: Don't rethrow as it could cancel subscriptions to Observables!\n this._zone.runOutsideAngular(function () { return _this._exceptionHandler.handleError(e); });\n }\n finally {\n this._runningTick = false;\n wtfLeave(scope);\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 /**\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 ApplicationRef.prototype.attachView = /**\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 function (viewRef) {\n var view = viewRef;\n this._views.push(view);\n view.attachToAppRef(this);\n };\n /**\n * Detaches a view from dirty checking again.\n */\n /**\n * Detaches a view from dirty checking again.\n */\n ApplicationRef.prototype.detachView = /**\n * Detaches a view from dirty checking again.\n */\n function (viewRef) {\n var view = viewRef;\n remove(this._views, view);\n view.detachFromAppRef();\n };\n ApplicationRef.prototype._loadComponent = function (componentRef) {\n this.attachView(componentRef.hostView);\n this.tick();\n this.components.push(componentRef);\n // Get the listeners lazily to prevent DI cycles.\n var listeners = this._injector.get(APP_BOOTSTRAP_LISTENER, []).concat(this._bootstrapListeners);\n listeners.forEach(function (listener) { return listener(componentRef); });\n };\n ApplicationRef.prototype._unloadComponent = function (componentRef) {\n this.detachView(componentRef.hostView);\n remove(this.components, componentRef);\n };\n /** @internal */\n /** @internal */\n ApplicationRef.prototype.ngOnDestroy = /** @internal */\n function () {\n // TODO(alxhub): Dispose of the NgZone.\n this._views.slice().forEach(function (view) { return view.destroy(); });\n };\n Object.defineProperty(ApplicationRef.prototype, \"viewCount\", {\n /**\n * Returns the number of attached views.\n */\n get: /**\n * Returns the number of attached views.\n */\n function () { return this._views.length; },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n ApplicationRef._tickScope = wtfCreateScope('ApplicationRef#tick()');\n ApplicationRef.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ApplicationRef.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Console, },\n { type: Injector, },\n { type: ErrorHandler, },\n { type: ComponentFactoryResolver, },\n { type: ApplicationInitStatus, },\n ]; };\n return ApplicationRef;\n}());\nfunction remove(list, el) {\n var index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 * @deprecated Use `RendererType2` (and `Renderer2`) instead.\n */\nvar RenderComponentType = /** @class */ (function () {\n function RenderComponentType(id, templateUrl, slotCount, encapsulation, styles, animations) {\n this.id = id;\n this.templateUrl = templateUrl;\n this.slotCount = slotCount;\n this.encapsulation = encapsulation;\n this.styles = styles;\n this.animations = animations;\n }\n return RenderComponentType;\n}());\n/**\n * @deprecated Debug info is handeled internally in the view engine now.\n */\nvar RenderDebugInfo = /** @class */ (function () {\n function RenderDebugInfo() {\n }\n return RenderDebugInfo;\n}());\n/**\n * @deprecated Use the `Renderer2` instead.\n */\nvar Renderer = /** @class */ (function () {\n function Renderer() {\n }\n return Renderer;\n}());\nvar Renderer2Interceptor = new InjectionToken('Renderer2Interceptor');\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link Renderer#setElementProperty setElementProperty} or\n * {@link Renderer#setElementAttribute setElementAttribute} respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n *\n * @deprecated Use `RendererFactory2` instead.\n */\nvar RootRenderer = /** @class */ (function () {\n function RootRenderer() {\n }\n return RootRenderer;\n}());\n/**\n * @experimental\n */\nvar RendererFactory2 = /** @class */ (function () {\n function RendererFactory2() {\n }\n return RendererFactory2;\n}());\n/**\n * @experimental\n */\n/**\n * @experimental\n */\nvar RendererStyleFlags2;\n/**\n * @experimental\n */\n(function (RendererStyleFlags2) {\n RendererStyleFlags2[RendererStyleFlags2[\"Important\"] = 1] = \"Important\";\n RendererStyleFlags2[RendererStyleFlags2[\"DashCase\"] = 2] = \"DashCase\";\n})(RendererStyleFlags2 || (RendererStyleFlags2 = {}));\n/**\n * @experimental\n */\nvar Renderer2 = /** @class */ (function () {\n function Renderer2() {\n }\n return Renderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 *\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.\nvar ElementRef = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar NgModuleFactoryLoader = /** @class */ (function () {\n function NgModuleFactoryLoader() {\n }\n return NgModuleFactoryLoader;\n}());\nvar moduleFactories = new Map();\n/**\n * Registers a loaded module. Should only be called from generated NgModuleFactory code.\n * @experimental\n */\nfunction registerModuleFactory(id, factory) {\n var existing = moduleFactories.get(id);\n if (existing) {\n throw new Error(\"Duplicate module registered for \" + id + \" - \" + existing.moduleType.name + \" vs \" + factory.moduleType.name);\n }\n moduleFactories.set(id, factory);\n}\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 * @experimental\n */\nfunction getModuleFactory(id) {\n var factory = moduleFactories.get(id);\n if (!factory)\n throw new Error(\"No module with ID \" + id + \" loaded\");\n return factory;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 * ### Example ([live demo](http://plnkr.co/edit/RX8sJnQYl9FWuSCWme5z?p=preview))\n * ```typescript\n * @Component({...})\n * class Container {\n * @ViewChildren(Item) items:QueryList<Item>;\n * }\n * ```\n *\n */\nvar QueryList = /** @class */ (function () {\n function QueryList() {\n this.dirty = true;\n this._results = [];\n this.changes = new EventEmitter();\n this.length = 0;\n }\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList.prototype.map = /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n function (fn) { return this._results.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList.prototype.filter = /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n function (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 /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList.prototype.find = /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n function (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 /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList.prototype.reduce = /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n function (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 /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList.prototype.forEach = /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n function (fn) { this._results.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList.prototype.some = /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n function (fn) {\n return this._results.some(fn);\n };\n QueryList.prototype.toArray = function () { return this._results.slice(); };\n QueryList.prototype[getSymbolIterator()] = function () { return this._results[getSymbolIterator()](); };\n QueryList.prototype.toString = function () { return this._results.toString(); };\n QueryList.prototype.reset = function (res) {\n this._results = flatten(res);\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 QueryList.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n /** internal */\n /** internal */\n QueryList.prototype.setDirty = /** internal */\n function () { this.dirty = true; };\n /** internal */\n /** internal */\n QueryList.prototype.destroy = /** internal */\n function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList;\n}());\nfunction flatten(list) {\n return list.reduce(function (flat, item) {\n var flatItem = Array.isArray(item) ? flatten(item) : item;\n return flat.concat(flatItem);\n }, []);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _SEPARATOR = '#';\nvar FACTORY_CLASS_SUFFIX = 'NgFactory';\n/**\n * Configuration for SystemJsNgModuleLoader.\n * token.\n *\n * @experimental\n */\nvar SystemJsNgModuleLoaderConfig = /** @class */ (function () {\n function SystemJsNgModuleLoaderConfig() {\n }\n return SystemJsNgModuleLoaderConfig;\n}());\nvar DEFAULT_CONFIG = {\n factoryPathPrefix: '',\n factoryPathSuffix: '.ngfactory',\n};\n/**\n * NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory\n * @experimental\n */\nvar SystemJsNgModuleLoader = /** @class */ (function () {\n function SystemJsNgModuleLoader(_compiler, config) {\n this._compiler = _compiler;\n this._config = config || DEFAULT_CONFIG;\n }\n SystemJsNgModuleLoader.prototype.load = function (path) {\n var offlineMode = this._compiler instanceof Compiler;\n return offlineMode ? this.loadFactory(path) : this.loadAndCompile(path);\n };\n SystemJsNgModuleLoader.prototype.loadAndCompile = function (path) {\n var _this = this;\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n if (exportName === undefined) {\n exportName = 'default';\n }\n return System.import(module)\n .then(function (module) { return module[exportName]; })\n .then(function (type) { return checkNotEmpty(type, module, exportName); })\n .then(function (type) { return _this._compiler.compileModuleAsync(type); });\n };\n SystemJsNgModuleLoader.prototype.loadFactory = function (path) {\n var _a = __read(path.split(_SEPARATOR), 2), module = _a[0], exportName = _a[1];\n var 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(function (module) { return module[exportName + factoryClassSuffix]; })\n .then(function (factory) { return checkNotEmpty(factory, module, exportName); });\n };\n SystemJsNgModuleLoader.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n SystemJsNgModuleLoader.ctorParameters = function () { return [\n { type: Compiler, },\n { type: SystemJsNgModuleLoaderConfig, decorators: [{ type: Optional },] },\n ]; };\n return SystemJsNgModuleLoader;\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 Inc. All Rights Reserved.\n *\n * Use of this source 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 *\n * You can access a `TemplateRef`, in two ways. Via a directive placed on a `<ng-template>` element\n * (or directive prefixed with `*`) and have the `TemplateRef` for this Embedded View injected into\n * the constructor of the directive using the `TemplateRef` Token. Alternatively you can query for\n * the `TemplateRef` from a Component or a Directive via {@link Query}.\n *\n * To instantiate Embedded Views based on a Template, use {@link ViewContainerRef#\n * createEmbeddedView}, which will create the View and attach it to the View Container.\n *\n */\nvar TemplateRef = /** @class */ (function () {\n function TemplateRef() {\n }\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n *\n * The container can contain two kinds of Views. Host Views, created by instantiating a\n * {@link Component} via {@link #createComponent}, and Embedded Views, created by instantiating an\n * {@link TemplateRef Embedded Template} via {@link #createEmbeddedView}.\n *\n * The location of the View Container within the containing View is specified by the Anchor\n * `element`. Each View Container can have only one Anchor Element and each Anchor Element can only\n * have a single View Container.\n *\n * Root elements of Views attached to this container become siblings of the Anchor Element in\n * the Rendered View.\n *\n * To access a `ViewContainerRef` of an Element, you can either place a {@link Directive} injected\n * with `ViewContainerRef` on the Element, or you obtain it via a {@link ViewChild} query.\n *\n */\nvar ViewContainerRef = /** @class */ (function () {\n function ViewContainerRef() {\n }\n return ViewContainerRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar ChangeDetectorRef = /** @class */ (function () {\n function ChangeDetectorRef() {\n }\n return ChangeDetectorRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar ViewRef = /** @class */ (function (_super) {\n __extends(ViewRef, _super);\n function ViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return ViewRef;\n}(ChangeDetectorRef));\n/**\n * Represents an Angular View.\n *\n * <!-- TODO: move the next two paragraphs to the dev guide -->\n * A View is a fundamental building block of the application UI. It is the smallest grouping of\n * Elements which are created and destroyed together.\n *\n * Properties of elements in a View can change, but the structure (number and order) of elements in\n * a View cannot. Changing the structure of Elements can only be done by inserting, moving or\n * removing nested Views via a {@link ViewContainerRef}. Each View can contain many View Containers.\n * <!-- /TODO -->\n *\n * ### Example\n *\n * Given this template...\n *\n * ```\n * Count: {{items.length}}\n * <ul>\n * <li *ngFor=\"let item of items\">{{item}}</li>\n * </ul>\n * ```\n *\n * We have two {@link TemplateRef}s:\n *\n * Outer {@link TemplateRef}:\n * ```\n * Count: {{items.length}}\n * <ul>\n * <ng-template ngFor let-item [ngForOf]=\"items\"></ng-template>\n * </ul>\n * ```\n *\n * Inner {@link TemplateRef}:\n * ```\n * <li>{{item}}</li>\n * ```\n *\n * Notice that the original template is broken down into two separate {@link TemplateRef}s.\n *\n * The outer/inner {@link TemplateRef}s are then assembled into views like so:\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 * @experimental\n */\nvar EmbeddedViewRef = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return EmbeddedViewRef;\n}(ViewRef));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this 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 EventListener = /** @class */ (function () {\n function EventListener(name, callback) {\n this.name = name;\n this.callback = callback;\n }\n return EventListener;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugNode = /** @class */ (function () {\n function DebugNode(nativeNode, parent, _debugContext) {\n this._debugContext = _debugContext;\n this.nativeNode = nativeNode;\n if (parent && parent instanceof DebugElement) {\n parent.addChild(this);\n }\n else {\n this.parent = null;\n }\n this.listeners = [];\n }\n Object.defineProperty(DebugNode.prototype, \"injector\", {\n get: function () { return this._debugContext.injector; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"componentInstance\", {\n get: function () { return this._debugContext.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"context\", {\n get: function () { return this._debugContext.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"references\", {\n get: function () { return this._debugContext.references; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugNode.prototype, \"providerTokens\", {\n get: function () { return this._debugContext.providerTokens; },\n enumerable: true,\n configurable: true\n });\n return DebugNode;\n}());\n/**\n * @experimental All debugging apis are currently experimental.\n */\nvar DebugElement = /** @class */ (function (_super) {\n __extends(DebugElement, _super);\n function DebugElement(nativeNode, parent, _debugContext) {\n var _this = _super.call(this, nativeNode, parent, _debugContext) || this;\n _this.properties = {};\n _this.attributes = {};\n _this.classes = {};\n _this.styles = {};\n _this.childNodes = [];\n _this.nativeElement = nativeNode;\n return _this;\n }\n DebugElement.prototype.addChild = function (child) {\n if (child) {\n this.childNodes.push(child);\n child.parent = this;\n }\n };\n DebugElement.prototype.removeChild = function (child) {\n var childIndex = this.childNodes.indexOf(child);\n if (childIndex !== -1) {\n child.parent = null;\n this.childNodes.splice(childIndex, 1);\n }\n };\n DebugElement.prototype.insertChildrenAfter = function (child, newChildren) {\n var _this = this;\n var siblingIndex = this.childNodes.indexOf(child);\n if (siblingIndex !== -1) {\n (_a = this.childNodes).splice.apply(_a, __spread([siblingIndex + 1, 0], newChildren));\n newChildren.forEach(function (c) {\n if (c.parent) {\n c.parent.removeChild(c);\n }\n c.parent = _this;\n });\n }\n var _a;\n };\n DebugElement.prototype.insertBefore = function (refChild, newChild) {\n var 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 DebugElement.prototype.query = function (predicate) {\n var results = this.queryAll(predicate);\n return results[0] || null;\n };\n DebugElement.prototype.queryAll = function (predicate) {\n var matches = [];\n _queryElementChildren(this, predicate, matches);\n return matches;\n };\n DebugElement.prototype.queryAllNodes = function (predicate) {\n var matches = [];\n _queryNodeChildren(this, predicate, matches);\n return matches;\n };\n Object.defineProperty(DebugElement.prototype, \"children\", {\n get: function () {\n return this.childNodes.filter(function (node) { return node instanceof DebugElement; });\n },\n enumerable: true,\n configurable: true\n });\n DebugElement.prototype.triggerEventHandler = function (eventName, eventObj) {\n this.listeners.forEach(function (listener) {\n if (listener.name == eventName) {\n listener.callback(eventObj);\n }\n });\n };\n return DebugElement;\n}(DebugNode));\n/**\n * @experimental\n */\nfunction asNativeElements(debugEls) {\n return debugEls.map(function (el) { return el.nativeElement; });\n}\nfunction _queryElementChildren(element, predicate, matches) {\n element.childNodes.forEach(function (node) {\n if (node instanceof DebugElement) {\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) {\n parentNode.childNodes.forEach(function (node) {\n if (predicate(node)) {\n matches.push(node);\n }\n if (node instanceof DebugElement) {\n _queryNodeChildren(node, predicate, matches);\n }\n });\n }\n}\n// Need to keep the nodes in a global Map so that multiple angular apps are supported.\nvar _nativeNodeToDebugNode = new Map();\n/**\n * @experimental\n */\nfunction getDebugNode(nativeNode) {\n return _nativeNodeToDebugNode.get(nativeNode) || null;\n}\n\nfunction indexDebugNode(node) {\n _nativeNodeToDebugNode.set(node.nativeNode, node);\n}\nfunction removeDebugNodeFromIndex(node) {\n _nativeNodeToDebugNode.delete(node.nativeNode);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var isListLikeIterableA = isListLikeIterable(a);\n var isListLikeIterableB = isListLikeIterable(b);\n if (isListLikeIterableA && isListLikeIterableB) {\n return areIterablesEqual(a, b, devModeEqual);\n }\n else {\n var isAObject = a && (typeof a === 'object' || typeof a === 'function');\n var isBObject = b && (typeof b === 'object' || typeof b === 'function');\n if (!isListLikeIterableA && isAObject && !isListLikeIterableB && isBObject) {\n return true;\n }\n else {\n return looseIdentical(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 */\nvar WrappedValue = /** @class */ (function () {\n function WrappedValue(value) {\n this.wrapped = value;\n }\n /** Creates a wrapped value. */\n /** Creates a wrapped value. */\n WrappedValue.wrap = /** Creates a wrapped value. */\n function (value) { return new WrappedValue(value); };\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n WrappedValue.unwrap = /**\n * Returns the underlying value of a wrapped value.\n * Returns the given `value` when it is not wrapped.\n **/\n function (value) { return WrappedValue.isWrapped(value) ? value.wrapped : value; };\n /** Returns true if `value` is a wrapped value. */\n /** Returns true if `value` is a wrapped value. */\n WrappedValue.isWrapped = /** Returns true if `value` is a wrapped value. */\n function (value) { return value instanceof WrappedValue; };\n return WrappedValue;\n}());\n/**\n * Represents a basic change from a previous to a new value.\n *\n */\nvar SimpleChange = /** @class */ (function () {\n function SimpleChange(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 /**\n * Check whether the new value is the first value assigned.\n */\n SimpleChange.prototype.isFirstChange = /**\n * Check whether the new value is the first value assigned.\n */\n function () { return this.firstChange; };\n return SimpleChange;\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 // 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 var iterator1 = a[getSymbolIterator()]();\n var iterator2 = b[getSymbolIterator()]();\n while (true) {\n var item1 = iterator1.next();\n var 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 (var i = 0; i < obj.length; i++) {\n fn(obj[i]);\n }\n }\n else {\n var iterator = obj[getSymbolIterator()]();\n var item = void 0;\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 Inc. All Rights Reserved.\n *\n * Use of this 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 DefaultIterableDifferFactory = /** @class */ (function () {\n function DefaultIterableDifferFactory() {\n }\n DefaultIterableDifferFactory.prototype.supports = function (obj) { return isListLikeIterable(obj); };\n DefaultIterableDifferFactory.prototype.create = function (trackByFn) {\n return new DefaultIterableDiffer(trackByFn);\n };\n return DefaultIterableDifferFactory;\n}());\nvar trackByIdentity = function (index, item) { return item; };\n/**\n * @deprecated v4.0.0 - Should not be part of public API.\n */\nvar DefaultIterableDiffer = /** @class */ (function () {\n function DefaultIterableDiffer(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 DefaultIterableDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._itHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachOperation = function (fn) {\n var nextIt = this._itHead;\n var nextRemove = this._removalsHead;\n var addRemoveOffset = 0;\n var moveOffsets = null;\n while (nextIt || nextRemove) {\n // Figure out which is the next record to process\n // Order: remove, add, move\n var record = !nextRemove ||\n nextIt &&\n (nextIt.currentIndex) <\n getPreviousIndex(nextRemove, addRemoveOffset, moveOffsets) ?\n nextIt :\n nextRemove;\n var adjPreviousIndex = getPreviousIndex(record, addRemoveOffset, moveOffsets);\n var 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 var localMovePreviousIndex = adjPreviousIndex - addRemoveOffset;\n var localCurrentIndex = (currentIndex) - addRemoveOffset;\n if (localMovePreviousIndex != localCurrentIndex) {\n for (var i = 0; i < localMovePreviousIndex; i++) {\n var offset = i < moveOffsets.length ? moveOffsets[i] : (moveOffsets[i] = 0);\n var index = offset + i;\n if (localCurrentIndex <= index && index < localMovePreviousIndex) {\n moveOffsets[i] = offset + 1;\n }\n }\n var previousIndex = record.previousIndex;\n moveOffsets[previousIndex] = localCurrentIndex - localMovePreviousIndex;\n }\n }\n }\n if (adjPreviousIndex !== currentIndex) {\n fn(record, adjPreviousIndex, currentIndex);\n }\n }\n };\n DefaultIterableDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousItHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachMovedItem = function (fn) {\n var record;\n for (record = this._movesHead; record !== null; record = record._nextMoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.forEachIdentityChange = function (fn) {\n var record;\n for (record = this._identityChangesHead; record !== null; record = record._nextIdentityChange) {\n fn(record);\n }\n };\n DefaultIterableDiffer.prototype.diff = function (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 DefaultIterableDiffer.prototype.onDestroy = function () { };\n DefaultIterableDiffer.prototype.check = function (collection) {\n var _this = this;\n this._reset();\n var record = this._itHead;\n var mayBeDirty = false;\n var index;\n var item;\n var itemTrackBy;\n if (Array.isArray(collection)) {\n this.length = collection.length;\n for (var index_1 = 0; index_1 < this.length; index_1++) {\n item = collection[index_1];\n itemTrackBy = this._trackByFn(index_1, item);\n if (record === null || !looseIdentical(record.trackById, itemTrackBy)) {\n record = this._mismatch(record, item, itemTrackBy, index_1);\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_1);\n }\n if (!looseIdentical(record.item, item))\n this._addIdentityChange(record, item);\n }\n record = record._next;\n }\n }\n else {\n index = 0;\n iterateListLike(collection, function (item) {\n itemTrackBy = _this._trackByFn(index, item);\n if (record === null || !looseIdentical(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 (!looseIdentical(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 Object.defineProperty(DefaultIterableDiffer.prototype, \"isDirty\", {\n /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n get: /* CollectionChanges is considered dirty if it has any additions, moves, removals, or identity\n * changes.\n */\n function () {\n return this._additionsHead !== null || this._movesHead !== null ||\n this._removalsHead !== null || this._identityChangesHead !== null;\n },\n enumerable: true,\n configurable: true\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 /**\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 DefaultIterableDiffer.prototype._reset = /**\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 function () {\n if (this.isDirty) {\n var record = void 0;\n var nextRecord = void 0;\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 /**\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 DefaultIterableDiffer.prototype._mismatch = /**\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 function (record, item, itemTrackBy, index) {\n // The previous record after which we will append the current one.\n var 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 (!looseIdentical(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 (!looseIdentical(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 /**\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 DefaultIterableDiffer.prototype._verifyReinsertion = /**\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 function (record, item, itemTrackBy, index) {\n var 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 /**\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 DefaultIterableDiffer.prototype._truncate = /**\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 function (record) {\n // Anything after that needs to be removed;\n while (record !== null) {\n var 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 /** @internal */\n DefaultIterableDiffer.prototype._reinsertAfter = /** @internal */\n function (record, prevRecord, index) {\n if (this._unlinkedRecords !== null) {\n this._unlinkedRecords.remove(record);\n }\n var prev = record._prevRemoved;\n var 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 /** @internal */\n DefaultIterableDiffer.prototype._moveAfter = /** @internal */\n function (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 /** @internal */\n DefaultIterableDiffer.prototype._addAfter = /** @internal */\n function (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 /** @internal */\n DefaultIterableDiffer.prototype._insertAfter = /** @internal */\n function (record, prevRecord, index) {\n // TODO(vicb):\n // assert(record != prevRecord);\n // assert(record._next === null);\n // assert(record._prev === null);\n var 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 /** @internal */\n DefaultIterableDiffer.prototype._remove = /** @internal */\n function (record) {\n return this._addToRemovals(this._unlink(record));\n };\n /** @internal */\n /** @internal */\n DefaultIterableDiffer.prototype._unlink = /** @internal */\n function (record) {\n if (this._linkedRecords !== null) {\n this._linkedRecords.remove(record);\n }\n var prev = record._prev;\n var 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 /** @internal */\n DefaultIterableDiffer.prototype._addToMoves = /** @internal */\n function (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 DefaultIterableDiffer.prototype._addToRemovals = function (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 /** @internal */\n DefaultIterableDiffer.prototype._addIdentityChange = /** @internal */\n function (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 return DefaultIterableDiffer;\n}());\n/**\n *\n */\nvar IterableChangeRecord_ = /** @class */ (function () {\n function IterableChangeRecord_(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 return IterableChangeRecord_;\n}());\n// A linked list of CollectionChangeRecords with the same IterableChangeRecord_.item\nvar _DuplicateItemRecordList = /** @class */ (function () {\n function _DuplicateItemRecordList() {\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 /**\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 _DuplicateItemRecordList.prototype.add = /**\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 function (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 // 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 // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n _DuplicateItemRecordList.prototype.get = \n // Returns a IterableChangeRecord_ having IterableChangeRecord_.trackById == trackById and\n // IterableChangeRecord_.currentIndex >= atOrAfterIndex\n function (trackById, atOrAfterIndex) {\n var record;\n for (record = this._head; record !== null; record = record._nextDup) {\n if ((atOrAfterIndex === null || atOrAfterIndex <= (record.currentIndex)) &&\n looseIdentical(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 /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n _DuplicateItemRecordList.prototype.remove = /**\n * Remove one {@link IterableChangeRecord_} from the list of duplicates.\n *\n * Returns whether the list of duplicates is empty.\n */\n function (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 var prev = record._prevDup;\n var 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 return _DuplicateItemRecordList;\n}());\nvar _DuplicateMap = /** @class */ (function () {\n function _DuplicateMap() {\n this.map = new Map();\n }\n _DuplicateMap.prototype.put = function (record) {\n var key = record.trackById;\n var 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 /**\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 _DuplicateMap.prototype.get = /**\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 function (trackById, atOrAfterIndex) {\n var key = trackById;\n var 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 /**\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 _DuplicateMap.prototype.remove = /**\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 function (record) {\n var key = record.trackById;\n var 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 Object.defineProperty(_DuplicateMap.prototype, \"isEmpty\", {\n get: function () { return this.map.size === 0; },\n enumerable: true,\n configurable: true\n });\n _DuplicateMap.prototype.clear = function () { this.map.clear(); };\n return _DuplicateMap;\n}());\nfunction getPreviousIndex(item, addRemoveOffset, moveOffsets) {\n var previousIndex = item.previousIndex;\n if (previousIndex === null)\n return previousIndex;\n var 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 Inc. All Rights Reserved.\n *\n * Use of this 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 DefaultKeyValueDifferFactory = /** @class */ (function () {\n function DefaultKeyValueDifferFactory() {\n }\n DefaultKeyValueDifferFactory.prototype.supports = function (obj) { return obj instanceof Map || isJsObject(obj); };\n DefaultKeyValueDifferFactory.prototype.create = function () { return new DefaultKeyValueDiffer(); };\n return DefaultKeyValueDifferFactory;\n}());\nvar DefaultKeyValueDiffer = /** @class */ (function () {\n function DefaultKeyValueDiffer() {\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 Object.defineProperty(DefaultKeyValueDiffer.prototype, \"isDirty\", {\n get: function () {\n return this._additionsHead !== null || this._changesHead !== null ||\n this._removalsHead !== null;\n },\n enumerable: true,\n configurable: true\n });\n DefaultKeyValueDiffer.prototype.forEachItem = function (fn) {\n var record;\n for (record = this._mapHead; record !== null; record = record._next) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachPreviousItem = function (fn) {\n var record;\n for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachChangedItem = function (fn) {\n var record;\n for (record = this._changesHead; record !== null; record = record._nextChanged) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachAddedItem = function (fn) {\n var record;\n for (record = this._additionsHead; record !== null; record = record._nextAdded) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.forEachRemovedItem = function (fn) {\n var record;\n for (record = this._removalsHead; record !== null; record = record._nextRemoved) {\n fn(record);\n }\n };\n DefaultKeyValueDiffer.prototype.diff = function (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 DefaultKeyValueDiffer.prototype.onDestroy = function () { };\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 /**\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 DefaultKeyValueDiffer.prototype.check = /**\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 function (map) {\n var _this = this;\n this._reset();\n var insertBefore = this._mapHead;\n this._appendAfter = null;\n this._forEach(map, function (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 var 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 (var 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 /**\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 DefaultKeyValueDiffer.prototype._insertBeforeOrAppend = /**\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 function (before, record) {\n if (before) {\n var 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 DefaultKeyValueDiffer.prototype._getOrCreateRecordForKey = function (key, value) {\n if (this._records.has(key)) {\n var record_1 = (this._records.get(key));\n this._maybeAddToChanges(record_1, value);\n var prev = record_1._prev;\n var next = record_1._next;\n if (prev) {\n prev._next = next;\n }\n if (next) {\n next._prev = prev;\n }\n record_1._next = null;\n record_1._prev = null;\n return record_1;\n }\n var 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 /** @internal */\n DefaultKeyValueDiffer.prototype._reset = /** @internal */\n function () {\n if (this.isDirty) {\n var record = void 0;\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 // Add the record or a given key to the list of changes only when the value has actually changed\n DefaultKeyValueDiffer.prototype._maybeAddToChanges = \n // Add the record or a given key to the list of changes only when the value has actually changed\n function (record, newValue) {\n if (!looseIdentical(newValue, record.currentValue)) {\n record.previousValue = record.currentValue;\n record.currentValue = newValue;\n this._addToChanges(record);\n }\n };\n DefaultKeyValueDiffer.prototype._addToAdditions = function (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 DefaultKeyValueDiffer.prototype._addToChanges = function (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 /** @internal */\n DefaultKeyValueDiffer.prototype._forEach = /** @internal */\n function (obj, fn) {\n if (obj instanceof Map) {\n obj.forEach(fn);\n }\n else {\n Object.keys(obj).forEach(function (k) { return fn(obj[k], k); });\n }\n };\n return DefaultKeyValueDiffer;\n}());\n/**\n *\n */\nvar KeyValueChangeRecord_ = /** @class */ (function () {\n function KeyValueChangeRecord_(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 return KeyValueChangeRecord_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar IterableDiffers = /** @class */ (function () {\n function IterableDiffers(factories) {\n this.factories = factories;\n }\n IterableDiffers.create = function (factories, parent) {\n if (parent != null) {\n var 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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n IterableDiffers.extend = /**\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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * IterableDiffers.extend([new ImmutableListDiffer()])\n * ]\n * })\n * ```\n */\n function (factories) {\n return {\n provide: IterableDiffers,\n useFactory: function (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 IterableDiffers.prototype.find = function (iterable) {\n var factory = this.factories.find(function (f) { return 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 IterableDiffers.ngInjectableDef = defineInjectable({\n providedIn: 'root',\n factory: function () { return new IterableDiffers([new DefaultIterableDifferFactory()]); }\n });\n return IterableDiffers;\n}());\nfunction getTypeNameForDebugging(type) {\n return type['name'] || typeof type;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar KeyValueDiffers = /** @class */ (function () {\n function KeyValueDiffers(factories) {\n this.factories = factories;\n }\n KeyValueDiffers.create = function (factories, parent) {\n if (parent) {\n var 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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n KeyValueDiffers.extend = /**\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 * 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 * ### Example\n *\n * ```\n * @Component({\n * viewProviders: [\n * KeyValueDiffers.extend([new ImmutableMapDiffer()])\n * ]\n * })\n * ```\n */\n function (factories) {\n return {\n provide: KeyValueDiffers,\n useFactory: function (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 KeyValueDiffers.prototype.find = function (kv) {\n var factory = this.factories.find(function (f) { return f.supports(kv); });\n if (factory) {\n return factory;\n }\n throw new Error(\"Cannot find a differ supporting object '\" + kv + \"'\");\n };\n return KeyValueDiffers;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar keyValDiff = [new DefaultKeyValueDifferFactory()];\n/**\n * Structural diffing for `Iterable` types such as `Array`s.\n */\nvar iterableDiff = [new DefaultIterableDifferFactory()];\nvar defaultIterableDiffers = new IterableDiffers(iterableDiff);\nvar defaultKeyValueDiffers = new KeyValueDiffers(keyValDiff);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this 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 _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 * @experimental\n */\nvar platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 {@linkDocs guide/i18n#setting-up-locale i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\nvar LOCALE_ID = new InjectionToken('LocaleId');\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 {@linkDocs guide/i18n#merge i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\nvar 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 {@linkDocs guide/i18n#merge i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\nvar 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 {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\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 {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\nvar MissingTranslationStrategy;\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 {@linkDocs guide/i18n#missing-translation i18n guide} for more information.\n *\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 * @experimental i18n support is experimental.\n */\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 Inc. All Rights Reserved.\n *\n * Use of this 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 return locale || 'en-US';\n}\n/**\n * This module includes the providers of @angular/core that are needed\n * to bootstrap components via `ApplicationRef`.\n *\n * @experimental\n */\nvar ApplicationModule = /** @class */ (function () {\n // Inject ApplicationRef to make it eager...\n function ApplicationModule(appRef) {\n }\n ApplicationModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n ApplicationRef,\n ApplicationInitStatus,\n Compiler,\n APP_ID_RANDOM_PROVIDER,\n { provide: IterableDiffers, useFactory: _iterableDiffersFactory },\n { provide: KeyValueDiffers, useFactory: _keyValueDiffersFactory },\n {\n provide: LOCALE_ID,\n useFactory: _localeFactory,\n deps: [[new Inject(LOCALE_ID), new Optional(), new SkipSelf()]]\n },\n ]\n },] }\n ];\n /** @nocollapse */\n ApplicationModule.ctorParameters = function () { return [\n { type: ApplicationRef, },\n ]; };\n return ApplicationModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 class 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 must use one of three strategies for doing this.\n * Support: Safari 10.x -> XHR strategy\n * Support: Firefox -> DomParser strategy\n * Default: InertDocument strategy\n */\nvar InertBodyHelper = /** @class */ (function () {\n function InertBodyHelper(defaultDoc) {\n this.defaultDoc = defaultDoc;\n this.inertDocument = this.defaultDoc.implementation.createHTMLDocument('sanitization-inert');\n this.inertBodyElement = this.inertDocument.body;\n if (this.inertBodyElement == 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 var inertHtml = this.inertDocument.createElement('html');\n this.inertDocument.appendChild(inertHtml);\n this.inertBodyElement = this.inertDocument.createElement('body');\n inertHtml.appendChild(this.inertBodyElement);\n }\n this.inertBodyElement.innerHTML = '<svg><g onload=\"this.parentNode.remove()\"></g></svg>';\n if (this.inertBodyElement.querySelector && !this.inertBodyElement.querySelector('svg')) {\n // We just hit the Safari 10.1 bug - which allows JS to run inside the SVG G element\n // so use the XHR strategy.\n this.getInertBodyElement = this.getInertBodyElement_XHR;\n return;\n }\n this.inertBodyElement.innerHTML =\n '<svg><p><style><img src=\"</style><img src=x onerror=alert(1)//\">';\n if (this.inertBodyElement.querySelector && this.inertBodyElement.querySelector('svg img')) {\n // We just hit the Firefox bug - which prevents the inner img JS from being sanitized\n // so use the DOMParser strategy, if it is available.\n // If the DOMParser is not available then we are not in Firefox (Server/WebWorker?) so we\n // fall through to the default strategy below.\n if (isDOMParserAvailable()) {\n this.getInertBodyElement = this.getInertBodyElement_DOMParser;\n return;\n }\n }\n // None of the bugs were hit so it is safe for us to use the default InertDocument strategy\n this.getInertBodyElement = this.getInertBodyElement_InertDocument;\n }\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n InertBodyHelper.prototype.getInertBodyElement_XHR = /**\n * Use XHR to create and fill an inert body element (on Safari 10.1)\n * See\n * https://github.com/cure53/DOMPurify/blob/a992d3a75031cb8bb032e5ea8399ba972bdf9a65/src/purify.js#L439-L449\n */\n function (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.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n html = encodeURI(html);\n }\n catch (e) {\n return null;\n }\n var xhr = new XMLHttpRequest();\n xhr.responseType = 'document';\n xhr.open('GET', 'data:text/html;charset=utf-8,' + html, false);\n xhr.send(null);\n var body = xhr.response.body;\n body.removeChild((body.firstChild));\n return body;\n };\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n InertBodyHelper.prototype.getInertBodyElement_DOMParser = /**\n * Use DOMParser to create and fill an inert body element (on Firefox)\n * See https://github.com/cure53/DOMPurify/releases/tag/0.6.7\n *\n */\n function (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.\n html = '<body><remove></remove>' + html + '</body>';\n try {\n var body = new window\n .DOMParser()\n .parseFromString(html, 'text/html')\n .body;\n body.removeChild((body.firstChild));\n return body;\n }\n catch (e) {\n return null;\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 default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\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 default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n InertBodyHelper.prototype.getInertBodyElement_InertDocument = /**\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 default sane strategy to use if the browser does not require one of the specialised\n * strategies above.\n */\n function (html) {\n // Prefer using <template> element if supported.\n var templateEl = this.inertDocument.createElement('template');\n if ('content' in templateEl) {\n templateEl.innerHTML = html;\n return templateEl;\n }\n this.inertBodyElement.innerHTML = html;\n // Support: IE 9-11 only\n // strip custom-namespaced attributes on IE<=11\n if (this.defaultDoc.documentMode) {\n this.stripCustomNsAttrs(this.inertBodyElement);\n }\n return this.inertBodyElement;\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 /**\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 InertBodyHelper.prototype.stripCustomNsAttrs = /**\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 function (el) {\n var elAttrs = el.attributes;\n // loop backwards so that we can support removals.\n for (var i = elAttrs.length - 1; 0 < i; i--) {\n var attrib = elAttrs.item(i);\n var attrName = attrib.name;\n if (attrName === 'xmlns:ns1' || attrName.indexOf('ns1:') === 0) {\n el.removeAttribute(attrName);\n }\n }\n var childNode = el.firstChild;\n while (childNode) {\n if (childNode.nodeType === Node.ELEMENT_NODE)\n this.stripCustomNsAttrs(childNode);\n childNode = childNode.nextSibling;\n }\n };\n return InertBodyHelper;\n}());\n/**\n * We need to determine whether the DOMParser exists in the global context.\n * The try-catch is because, on some browsers, trying to access this property\n * on window can actually throw an error.\n *\n * @suppress {uselessCode}\n */\nfunction isDOMParserAvailable() {\n try {\n return !!window.DOMParser;\n }\n catch (e) {\n return false;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 a protocol in a whitelist (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 */\nvar SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;\n/** A pattern that matches safe data URLs. Only matches image, video and audio types. */\nvar 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(function (srcset) { return _sanitizeUrl(srcset.trim()); }).join(', ');\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var res = {};\n try {\n for (var _a = __values(tags.split(',')), _b = _a.next(); !_b.done; _b = _a.next()) {\n var t = _b.value;\n res[t] = true;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return res;\n var e_1, _c;\n}\nfunction merge$1() {\n var sets = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sets[_i] = arguments[_i];\n }\n var res = {};\n try {\n for (var sets_1 = __values(sets), sets_1_1 = sets_1.next(); !sets_1_1.done; sets_1_1 = sets_1.next()) {\n var s = sets_1_1.value;\n for (var v in s) {\n if (s.hasOwnProperty(v))\n res[v] = true;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (sets_1_1 && !sets_1_1.done && (_a = sets_1.return)) _a.call(sets_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return res;\n var e_2, _a;\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\nvar 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\nvar OPTIONAL_END_TAG_BLOCK_ELEMENTS = tagSet('colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr');\nvar OPTIONAL_END_TAG_INLINE_ELEMENTS = tagSet('rp,rt');\nvar OPTIONAL_END_TAG_ELEMENTS = merge$1(OPTIONAL_END_TAG_INLINE_ELEMENTS, OPTIONAL_END_TAG_BLOCK_ELEMENTS);\n// Safe Block Elements - HTML5\nvar BLOCK_ELEMENTS = merge$1(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\nvar INLINE_ELEMENTS = merge$1(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'));\nvar VALID_ELEMENTS = merge$1(VOID_ELEMENTS, BLOCK_ELEMENTS, INLINE_ELEMENTS, OPTIONAL_END_TAG_ELEMENTS);\n// Attributes that have href and hence need to be sanitized\nvar URI_ATTRS = tagSet('background,cite,href,itemtype,longdesc,poster,src,xlink:href');\n// Attributes that have special href set hence need to be sanitized\nvar SRCSET_ATTRS = tagSet('srcset');\nvar 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// 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.\nvar VALID_ATTRS = merge$1(URI_ATTRS, SRCSET_ATTRS, HTML_ATTRS);\n/**\n * SanitizingHtmlSerializer serializes a DOM fragment, stripping out any unsafe elements and unsafe\n * attributes.\n */\nvar SanitizingHtmlSerializer = /** @class */ (function () {\n function SanitizingHtmlSerializer() {\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 SanitizingHtmlSerializer.prototype.sanitizeChildren = function (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 var current = (el.firstChild);\n while (current) {\n if (current.nodeType === Node.ELEMENT_NODE) {\n 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 (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 var 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 SanitizingHtmlSerializer.prototype.startElement = function (element) {\n var tagName = element.nodeName.toLowerCase();\n if (!VALID_ELEMENTS.hasOwnProperty(tagName)) {\n this.sanitizedSomething = true;\n return;\n }\n this.buf.push('<');\n this.buf.push(tagName);\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var elAttr = elAttrs.item(i);\n var attrName = elAttr.name;\n var lower = attrName.toLowerCase();\n if (!VALID_ATTRS.hasOwnProperty(lower)) {\n this.sanitizedSomething = true;\n continue;\n }\n var 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 };\n SanitizingHtmlSerializer.prototype.endElement = function (current) {\n var 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 SanitizingHtmlSerializer.prototype.chars = function (chars) { this.buf.push(encodeEntities(chars)); };\n SanitizingHtmlSerializer.prototype.checkClobberedElement = function (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 return SanitizingHtmlSerializer;\n}());\n// Regular Expressions for parsing tags and attributes\nvar SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n// ! to ~ is the ASCII range.\nvar 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 var hi = match.charCodeAt(0);\n var low = match.charCodeAt(1);\n return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\n })\n .replace(NON_ALPHANUMERIC_REGEXP, function (match) { return '&#' + match.charCodeAt(0) + ';'; })\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;');\n}\nvar 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 var inertBodyElement = null;\n try {\n inertBodyHelper = inertBodyHelper || new InertBodyHelper(defaultDoc);\n // Make sure unsafeHtml is actually a string (TypeScript types are not enforced at runtime).\n var 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 var mXSSAttempts = 5;\n var 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 var sanitizer = new SanitizingHtmlSerializer();\n var 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 var parent_1 = getTemplateContent(inertBodyElement) || inertBodyElement;\n while (parent_1.firstChild) {\n parent_1.removeChild(parent_1.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 Inc. All Rights Reserved.\n *\n * Use of this source 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 * Regular expression for safe style values.\n *\n * Quotes (\" and ') are allowed, but a check must be done elsewhere to ensure they're balanced.\n *\n * ',' allows multiple values to be assigned to the same property (e.g. background-attachment or\n * font-family) and hence could allow multiple values to get injected, but that should pose no risk\n * of XSS.\n *\n * The function expression checks only for XSS safety, not for CSS validity.\n *\n * This regular expression was taken from the Closure sanitization library, and augmented for\n * transformation values.\n */\nvar VALUES = '[-,.\"\\'%_!# a-zA-Z0-9]+';\nvar TRANSFORMATION_FNS = '(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?';\nvar COLOR_FNS = '(?:rgb|hsl)a?';\nvar GRADIENTS = '(?:repeating-)?(?:linear|radial)-gradient';\nvar CSS3_FNS = '(?:calc|attr)';\nvar FN_ARGS = '\\\\([-0-9.%, #a-zA-Z]+\\\\)';\nvar SAFE_STYLE_VALUE = new RegExp(\"^(\" + VALUES + \"|\" +\n (\"(?:\" + TRANSFORMATION_FNS + \"|\" + COLOR_FNS + \"|\" + GRADIENTS + \"|\" + CSS3_FNS + \")\") +\n (FN_ARGS + \")$\"), 'g');\n/**\n * Matches a `url(...)` value with an arbitrary argument as long as it does\n * not contain parentheses.\n *\n * The URL value still needs to be sanitized separately.\n *\n * `url(...)` values are a very common use case, e.g. for `background-image`. With carefully crafted\n * CSS style rules, it is possible to construct an information leak with `url` values in CSS, e.g.\n * by observing whether scroll bars are displayed, or character ranges used by a font face\n * definition.\n *\n * Angular only allows binding CSS values (as opposed to entire CSS rules), so it is unlikely that\n * binding a URL value without further cooperation from the page will cause an information leak, and\n * if so, it is just a leak, not a full blown XSS vulnerability.\n *\n * Given the common use case, low likelihood of attack vector, and low impact of an attack, this\n * code is permissive and allows URLs that sanitize otherwise.\n */\nvar URL_RE = /^url\\(([^)]+)\\)$/;\n/**\n * Checks that quotes (\" and ') are properly balanced inside a string. Assumes\n * that neither escape (\\) nor any other character that could result in\n * breaking out of a string parsing context are allowed;\n * see http://www.w3.org/TR/css3-syntax/#string-token-diagram.\n *\n * This code was taken from the Closure sanitization library.\n */\nfunction hasBalancedQuotes(value) {\n var outsideSingle = true;\n var outsideDouble = true;\n for (var i = 0; i < value.length; i++) {\n var c = value.charAt(i);\n if (c === '\\'' && outsideDouble) {\n outsideSingle = !outsideSingle;\n }\n else if (c === '\"' && outsideSingle) {\n outsideDouble = !outsideDouble;\n }\n }\n return outsideSingle && outsideDouble;\n}\n/**\n * Sanitizes the given untrusted CSS style property value (i.e. not an entire object, just a single\n * value) and returns a value that is safe to use in a browser environment.\n */\nfunction _sanitizeStyle(value) {\n value = String(value).trim(); // Make sure it's actually a string.\n if (!value)\n return '';\n // Single url(...) values are supported, but only for URLs that sanitize cleanly. See above for\n // reasoning behind this.\n var urlMatch = value.match(URL_RE);\n if ((urlMatch && _sanitizeUrl(urlMatch[1]) === urlMatch[1]) ||\n value.match(SAFE_STYLE_VALUE) && hasBalancedQuotes(value)) {\n return value; // Safe style values.\n }\n if (isDevMode()) {\n console.warn(\"WARNING: sanitizing unsafe style value \" + value + \" (see http://g.co/ng/security#xss).\");\n }\n return 'unsafe';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 *\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 *\n */\nvar SecurityContext;\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 *\n */\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 * Sanitizer is used by the views to sanitize potentially dangerous values.\n *\n *\n */\nvar Sanitizer = /** @class */ (function () {\n function Sanitizer() {\n }\n return Sanitizer;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 var state = view.state;\n var initState = state & 1792;\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 * 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}\nvar DebugContext = /** @class */ (function () {\n function DebugContext() {\n }\n return 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 */\nvar 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 Inc. All Rights Reserved.\n *\n * Use of this 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 var 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 var 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 Inc. All Rights Reserved.\n *\n * Use of this 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 NOOP = function () { };\nvar _tokenKeyCache = new Map();\nfunction tokenKey(token) {\n var 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 var globalBindingIdx = view.def.nodes[nodeIdx].bindingIndex + bindingIdx;\n var oldValue = WrappedValue.unwrap(view.oldValues[globalBindingIdx]);\n view.oldValues[globalBindingIdx] = new WrappedValue(oldValue);\n }\n return value;\n}\nvar UNDEFINED_RENDERER_TYPE_ID = '$$undefined';\nvar 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}\nvar _renderCompCount = 0;\nfunction resolveRendererType2(type) {\n if (type && type.id === UNDEFINED_RENDERER_TYPE_ID) {\n // first time we see this RendererType2. Initialize it...\n var isFilled = ((type.encapsulation != null && type.encapsulation !== ViewEncapsulation.None) ||\n type.styles.length || Object.keys(type.data).length);\n if (isFilled) {\n type.id = \"c\" + _renderCompCount++;\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 var oldValues = view.oldValues;\n if ((view.state & 2 /* FirstCheck */) ||\n !looseIdentical(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 var oldValue = view.oldValues[def.bindingIndex + bindingIdx];\n if ((view.state & 1 /* BeforeFirstCheck */) || !devModeEqual(oldValue, value)) {\n var 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 var 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 var 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 var nodeDef = view.def.nodes[nodeIndex];\n var 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 var 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 var 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 var matchedQueries = {};\n var matchedQueryIds = 0;\n var references = {};\n if (matchedQueriesDsl) {\n matchedQueriesDsl.forEach(function (_a) {\n var _b = __read(_a, 2), queryId = _b[0], valueType = _b[1];\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: matchedQueries, references: references, matchedQueryIds: matchedQueryIds };\n}\nfunction splitDepsDsl(deps, sourceName) {\n return deps.map(function (value) {\n var token;\n var flags;\n if (Array.isArray(value)) {\n _a = __read(value, 2), flags = _a[0], token = _a[1];\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: flags, token: token, tokenKey: tokenKey(token) };\n var _a;\n });\n}\nfunction getParentRenderElement(view, renderHost, def) {\n var 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 ===\n ViewEncapsulation.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}\nvar DEFINITION_CACHE = new WeakMap();\nfunction resolveDefinition(factory) {\n var value = DEFINITION_CACHE.get(factory);\n if (!value) {\n value = factory(function () { return NOOP; });\n value.factory = factory;\n DEFINITION_CACHE.set(factory, value);\n }\n return value;\n}\nfunction rootRenderNodes(view) {\n var 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 (var i = startIndex; i <= endIndex; i++) {\n var 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 var compView = view;\n while (compView && !isComponentView(compView)) {\n compView = compView.parent;\n }\n var hostView = compView.parent;\n var hostElDef = viewParentEl((compView));\n var startIndex = hostElDef.nodeIndex + 1;\n var endIndex = hostElDef.nodeIndex + hostElDef.childCount;\n for (var i = startIndex; i <= endIndex; i++) {\n var 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 var projectedNodes = view.root.projectableNodes[ngContentIndex];\n if (projectedNodes) {\n for (var 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 var 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 var 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 var embeddedViews = asElementData(view, nodeDef.nodeIndex).viewContainer._embeddedViews;\n for (var 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 var 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}\nvar NS_PREFIX_RE = /^:([^:]+):(.+)$/;\nfunction splitNamespace(name) {\n if (name[0] === ':') {\n var match = (name.match(NS_PREFIX_RE));\n return [match[1], match[2]];\n }\n return ['', name];\n}\nfunction calcBindingFlags(bindings) {\n var flags = 0;\n for (var i = 0; i < bindings.length; i++) {\n flags |= bindings[i].flags;\n }\n return flags;\n}\nfunction interpolate(valueCount, constAndInterp) {\n var result = '';\n for (var 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}\nvar EMPTY_ARRAY$2 = [];\nvar EMPTY_MAP = {};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var 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: flags,\n checkIndex: -1,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: [],\n bindingFlags: 0,\n outputs: [],\n element: {\n ns: null,\n name: null,\n attrs: null, template: 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 (fixedAttrs === void 0) { fixedAttrs = []; }\n if (!handleEvent) {\n handleEvent = NOOP;\n }\n var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\n var ns = (null);\n var name = (null);\n if (namespaceAndName) {\n _b = __read(splitNamespace(namespaceAndName), 2), ns = _b[0], name = _b[1];\n }\n bindings = bindings || [];\n var bindingDefs = new Array(bindings.length);\n for (var i = 0; i < bindings.length; i++) {\n var _c = __read(bindings[i], 3), bindingFlags = _c[0], namespaceAndName_1 = _c[1], suffixOrSecurityContext = _c[2];\n var _d = __read(splitNamespace(namespaceAndName_1), 2), ns_1 = _d[0], name_1 = _d[1];\n var securityContext = (undefined);\n var 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: ns_1, name: name_1, nonMinifiedName: name_1, securityContext: securityContext, suffix: suffix };\n }\n outputs = outputs || [];\n var outputDefs = new Array(outputs.length);\n for (var i = 0; i < outputs.length; i++) {\n var _e = __read(outputs[i], 2), target = _e[0], eventName = _e[1];\n outputDefs[i] = {\n type: 0 /* ElementOutput */,\n target: target, eventName: eventName,\n propName: null\n };\n }\n fixedAttrs = fixedAttrs || [];\n var attrs = fixedAttrs.map(function (_a) {\n var _b = __read(_a, 2), namespaceAndName = _b[0], value = _b[1];\n var _c = __read(splitNamespace(namespaceAndName), 2), ns = _c[0], name = _c[1];\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: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references, ngContentIndex: ngContentIndex, childCount: childCount,\n bindings: bindingDefs,\n bindingFlags: calcBindingFlags(bindingDefs),\n outputs: outputDefs,\n element: {\n ns: ns,\n name: name,\n attrs: 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 var _b;\n}\nfunction createElement(view, renderHost, def) {\n var elDef = (def.element);\n var rootSelectorOrNode = view.root.selectorOrNode;\n var renderer = view.renderer;\n var 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 var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, el);\n }\n }\n else {\n el = renderer.selectRootElement(rootSelectorOrNode);\n }\n if (elDef.attrs) {\n for (var i = 0; i < elDef.attrs.length; i++) {\n var _a = __read(elDef.attrs[i], 3), ns = _a[0], name_2 = _a[1], value = _a[2];\n renderer.setAttribute(el, name_2, value, ns);\n }\n }\n return el;\n}\nfunction listenToElementOutputs(view, compView, def, el) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var handleEventClosure = renderEventHandlerClosure(view, def.nodeIndex, elementEventFullName(output.target, output.eventName));\n var listenTarget = output.target;\n var listenerView = view;\n if (output.target === 'component') {\n listenTarget = null;\n listenerView = compView;\n }\n var 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 function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateElementInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var bindLen = def.bindings.length;\n var 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 var changed = false;\n for (var 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 var binding = def.bindings[bindingIdx];\n var elData = asElementData(view, def.nodeIndex);\n var renderNode$$1 = elData.renderElement;\n var name = (binding.name);\n switch (binding.flags & 15 /* Types */) {\n case 1 /* TypeElementAttribute */:\n setElementAttribute(view, binding, renderNode$$1, binding.ns, name, value);\n break;\n case 2 /* TypeElementClass */:\n setElementClass(view, renderNode$$1, name, value);\n break;\n case 4 /* TypeElementStyle */:\n setElementStyle(view, binding, renderNode$$1, name, value);\n break;\n case 8 /* TypeProperty */:\n var bindView = (def.flags & 33554432 /* ComponentView */ &&\n binding.flags & 32 /* SyntheticHostProperty */) ?\n elData.componentView :\n view;\n setElementProperty(bindView, binding, renderNode$$1, name, value);\n break;\n }\n return true;\n}\nfunction setElementAttribute(view, binding, renderNode$$1, ns, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n renderValue = renderValue != null ? renderValue.toString() : null;\n var renderer = view.renderer;\n if (value != null) {\n renderer.setAttribute(renderNode$$1, name, renderValue, ns);\n }\n else {\n renderer.removeAttribute(renderNode$$1, name, ns);\n }\n}\nfunction setElementClass(view, renderNode$$1, name, value) {\n var renderer = view.renderer;\n if (value) {\n renderer.addClass(renderNode$$1, name);\n }\n else {\n renderer.removeClass(renderNode$$1, name);\n }\n}\nfunction setElementStyle(view, binding, renderNode$$1, name, value) {\n var renderValue = view.root.sanitizer.sanitize(SecurityContext.STYLE, value);\n if (renderValue != null) {\n renderValue = renderValue.toString();\n var unit = binding.suffix;\n if (unit != null) {\n renderValue = renderValue + unit;\n }\n }\n else {\n renderValue = null;\n }\n var renderer = view.renderer;\n if (renderValue != null) {\n renderer.setStyle(renderNode$$1, name, renderValue);\n }\n else {\n renderer.removeStyle(renderNode$$1, name);\n }\n}\nfunction setElementProperty(view, binding, renderNode$$1, name, value) {\n var securityContext = binding.securityContext;\n var renderValue = securityContext ? view.root.sanitizer.sanitize(securityContext, value) : value;\n view.renderer.setProperty(renderNode$$1, name, renderValue);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 UNDEFINED_VALUE = new Object();\nvar InjectorRefTokenKey$1 = tokenKey(Injector);\nvar INJECTORRefTokenKey$1 = tokenKey(INJECTOR);\nvar 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 var depDefs = splitDepsDsl(deps, stringify(token));\n return {\n // will bet set by the module definition\n index: -1,\n deps: depDefs, flags: flags, token: token, value: value\n };\n}\nfunction moduleDef(providers) {\n var providersByKey = {};\n var modules = [];\n var isRoot = false;\n for (var i = 0; i < providers.length; i++) {\n var provider = providers[i];\n if (provider.token === APP_ROOT) {\n isRoot = true;\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: providersByKey,\n providers: providers,\n modules: modules,\n isRoot: isRoot,\n };\n}\nfunction initNgModule(data) {\n var def = data._def;\n var providers = data._providers = new Array(def.providers.length);\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (!(provDef.flags & 4096 /* LazyProvider */)) {\n providers[i] = _createProviderInstance$1(data, provDef);\n }\n }\n}\nfunction resolveNgModuleDep(data, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var 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 var tokenKey_1 = depDef.tokenKey;\n switch (tokenKey_1) {\n case InjectorRefTokenKey$1:\n case INJECTORRefTokenKey$1:\n case NgModuleRefTokenKey:\n return data;\n }\n var providerDef = data._def.providersByKey[tokenKey_1];\n if (providerDef) {\n var providerInstance = data._providers[providerDef.index];\n if (providerInstance === undefined) {\n providerInstance = data._providers[providerDef.index] =\n _createProviderInstance$1(data, providerDef);\n }\n return providerInstance === UNDEFINED_VALUE ? undefined : providerInstance;\n }\n else if (depDef.token.ngInjectableDef && targetsModule(data, depDef.token.ngInjectableDef)) {\n var injectableDef = depDef.token.ngInjectableDef;\n var index = data._providers.length;\n data._def.providersByKey[depDef.tokenKey] = {\n flags: 1024 /* TypeFactoryProvider */ | 4096 /* LazyProvider */,\n value: injectableDef.factory,\n deps: [], index: index,\n token: depDef.token,\n };\n data._providers[index] = UNDEFINED_VALUE;\n return (data._providers[index] =\n _createProviderInstance$1(data, data._def.providersByKey[depDef.tokenKey]));\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 return def.providedIn != null && (moduleTransitivelyPresent(ngModule, def.providedIn) ||\n def.providedIn === 'root' && ngModule._def.isRoot);\n}\nfunction _createProviderInstance$1(ngModule, providerDef) {\n var 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 return injectable === undefined ? UNDEFINED_VALUE : injectable;\n}\nfunction _createClass(ngModule, ctor, deps) {\n var 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 var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction _callFactory(ngModule, factory, deps) {\n var 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 var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveNgModuleDep(ngModule, deps[i]);\n }\n return factory.apply(void 0, __spread(depValues));\n }\n}\nfunction callNgModuleLifecycle(ngModule, lifecycles) {\n var def = ngModule._def;\n for (var i = 0; i < def.providers.length; i++) {\n var provDef = def.providers[i];\n if (provDef.flags & 131072 /* OnDestroy */) {\n var instance = ngModule._providers[i];\n if (instance && instance !== UNDEFINED_VALUE) {\n instance.ngOnDestroy();\n }\n }\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var 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 var prevView = (viewIndex) > 0 ? embeddedViews[(viewIndex) - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n}\nfunction attachProjectedView(vcElementData, view) {\n var 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 var 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 var parentNodeDef = nodeDef.parent;\n while (parentNodeDef) {\n parentNodeDef.childFlags |= 4 /* ProjectedTemplate */;\n parentNodeDef = parentNodeDef.parent;\n }\n}\nfunction detachEmbeddedView(elementData, viewIndex) {\n var 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 var 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(view);\n return view;\n}\nfunction detachProjectedView(view) {\n if (!(view.state & 16 /* IsProjectedView */)) {\n return;\n }\n var dvcElementData = declaredViewContainer(view);\n if (dvcElementData) {\n var 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 var embeddedViews = elementData.viewContainer._embeddedViews;\n var 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(view);\n var prevView = newViewIndex > 0 ? embeddedViews[newViewIndex - 1] : null;\n renderAttachEmbeddedView(elementData, prevView, view);\n return view;\n}\nfunction renderAttachEmbeddedView(elementData, prevView, view) {\n var prevRenderNode = prevView ? renderNode(prevView, (prevView.def.lastRenderRootNode)) :\n elementData.renderElement;\n var parentNode = view.renderer.parentNode(prevRenderNode);\n var 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(view) {\n visitRootRenderNodes(view, 3 /* RemoveChild */, null, null, undefined);\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 arr.pop();\n }\n else {\n arr.splice(index, 1);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 EMPTY_CONTEXT = new Object();\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}\nvar ComponentFactory_ = /** @class */ (function (_super) {\n __extends(ComponentFactory_, _super);\n function ComponentFactory_(selector, componentType, viewDefFactory, _inputs, _outputs, ngContentSelectors) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\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 return _this;\n }\n Object.defineProperty(ComponentFactory_.prototype, \"inputs\", {\n get: function () {\n var inputsArr = [];\n var inputs = (this._inputs);\n for (var propName in inputs) {\n var templateName = inputs[propName];\n inputsArr.push({ propName: propName, templateName: templateName });\n }\n return inputsArr;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentFactory_.prototype, \"outputs\", {\n get: function () {\n var outputsArr = [];\n for (var propName in this._outputs) {\n var templateName = this._outputs[propName];\n outputsArr.push({ propName: propName, templateName: templateName });\n }\n return outputsArr;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a new component.\n */\n /**\n * Creates a new component.\n */\n ComponentFactory_.prototype.create = /**\n * Creates a new component.\n */\n function (injector, projectableNodes, rootSelectorOrNode, ngModule) {\n if (!ngModule) {\n throw new Error('ngModule should be provided');\n }\n var viewDef = resolveDefinition(this.viewDefFactory);\n var componentNodeIndex = viewDef.nodes[0].element.componentProvider.nodeIndex;\n var view = Services.createRootView(injector, projectableNodes || [], rootSelectorOrNode, viewDef, ngModule, EMPTY_CONTEXT);\n var 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 return ComponentFactory_;\n}(ComponentFactory));\nvar ComponentRef_ = /** @class */ (function (_super) {\n __extends(ComponentRef_, _super);\n function ComponentRef_(_view, _viewRef, _component) {\n var _this = _super.call(this) || this;\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 return _this;\n }\n Object.defineProperty(ComponentRef_.prototype, \"location\", {\n get: function () {\n return new ElementRef(asElementData(this._view, this._elDef.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ComponentRef_.prototype, \"componentType\", {\n get: function () { return this._component.constructor; },\n enumerable: true,\n configurable: true\n });\n ComponentRef_.prototype.destroy = function () { this._viewRef.destroy(); };\n ComponentRef_.prototype.onDestroy = function (callback) { this._viewRef.onDestroy(callback); };\n return ComponentRef_;\n}(ComponentRef));\nfunction createViewContainerData(view, elDef, elData) {\n return new ViewContainerRef_(view, elDef, elData);\n}\nvar ViewContainerRef_ = /** @class */ (function () {\n function ViewContainerRef_(_view, _elDef, _data) {\n this._view = _view;\n this._elDef = _elDef;\n this._data = _data;\n /**\n * @internal\n */\n this._embeddedViews = [];\n }\n Object.defineProperty(ViewContainerRef_.prototype, \"element\", {\n get: function () { return new ElementRef(this._data.renderElement); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"injector\", {\n get: function () { return new Injector_(this._view, this._elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewContainerRef_.prototype, \"parentInjector\", {\n get: function () {\n var view = this._view;\n var 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 enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.clear = function () {\n var len = this._embeddedViews.length;\n for (var i = len - 1; i >= 0; i--) {\n var view = (detachEmbeddedView(this._data, i));\n Services.destroyView(view);\n }\n };\n ViewContainerRef_.prototype.get = function (index) {\n var view = this._embeddedViews[index];\n if (view) {\n var ref = new ViewRef_(view);\n ref.attachToViewContainerRef(this);\n return ref;\n }\n return null;\n };\n Object.defineProperty(ViewContainerRef_.prototype, \"length\", {\n get: function () { return this._embeddedViews.length; },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef_.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef_.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModuleRef) {\n var contextInjector = injector || this.parentInjector;\n if (!ngModuleRef && !(componentFactory instanceof ComponentFactoryBoundToModule)) {\n ngModuleRef = contextInjector.get(NgModuleRef);\n }\n var componentRef = componentFactory.create(contextInjector, projectableNodes, undefined, ngModuleRef);\n this.insert(componentRef.hostView, index);\n return componentRef;\n };\n ViewContainerRef_.prototype.insert = function (viewRef, index) {\n if (viewRef.destroyed) {\n throw new Error('Cannot insert a destroyed View in a ViewContainer!');\n }\n var viewRef_ = viewRef;\n var viewData = viewRef_._view;\n attachEmbeddedView(this._view, this._data, index, viewData);\n viewRef_.attachToViewContainerRef(this);\n return viewRef;\n };\n ViewContainerRef_.prototype.move = function (viewRef, currentIndex) {\n if (viewRef.destroyed) {\n throw new Error('Cannot move a destroyed View in a ViewContainer!');\n }\n var previousIndex = this._embeddedViews.indexOf(viewRef._view);\n moveEmbeddedView(this._data, previousIndex, currentIndex);\n return viewRef;\n };\n ViewContainerRef_.prototype.indexOf = function (viewRef) {\n return this._embeddedViews.indexOf(viewRef._view);\n };\n ViewContainerRef_.prototype.remove = function (index) {\n var viewData = detachEmbeddedView(this._data, index);\n if (viewData) {\n Services.destroyView(viewData);\n }\n };\n ViewContainerRef_.prototype.detach = function (index) {\n var view = detachEmbeddedView(this._data, index);\n return view ? new ViewRef_(view) : null;\n };\n return ViewContainerRef_;\n}());\nfunction createChangeDetectorRef(view) {\n return new ViewRef_(view);\n}\nvar ViewRef_ = /** @class */ (function () {\n function ViewRef_(_view) {\n this._view = _view;\n this._viewContainerRef = null;\n this._appRef = null;\n }\n Object.defineProperty(ViewRef_.prototype, \"rootNodes\", {\n get: function () { return rootRenderNodes(this._view); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"context\", {\n get: function () { return this._view.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ViewRef_.prototype, \"destroyed\", {\n get: function () { return (this._view.state & 128 /* Destroyed */) !== 0; },\n enumerable: true,\n configurable: true\n });\n ViewRef_.prototype.markForCheck = function () { markParentViewsForCheck(this._view); };\n ViewRef_.prototype.detach = function () { this._view.state &= ~4 /* Attached */; };\n ViewRef_.prototype.detectChanges = function () {\n var 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 ViewRef_.prototype.checkNoChanges = function () { Services.checkNoChangesView(this._view); };\n ViewRef_.prototype.reattach = function () { this._view.state |= 4 /* Attached */; };\n ViewRef_.prototype.onDestroy = function (callback) {\n if (!this._view.disposables) {\n this._view.disposables = [];\n }\n this._view.disposables.push(callback);\n };\n ViewRef_.prototype.destroy = function () {\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 ViewRef_.prototype.detachFromAppRef = function () {\n this._appRef = null;\n renderDetachView(this._view);\n Services.dirtyParentQueries(this._view);\n };\n ViewRef_.prototype.attachToAppRef = function (appRef) {\n if (this._viewContainerRef) {\n throw new Error('This view is already attached to a ViewContainer!');\n }\n this._appRef = appRef;\n };\n ViewRef_.prototype.attachToViewContainerRef = function (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 return ViewRef_;\n}());\nfunction createTemplateData(view, def) {\n return new TemplateRef_(view, def);\n}\nvar TemplateRef_ = /** @class */ (function (_super) {\n __extends(TemplateRef_, _super);\n function TemplateRef_(_parentView, _def) {\n var _this = _super.call(this) || this;\n _this._parentView = _parentView;\n _this._def = _def;\n return _this;\n }\n TemplateRef_.prototype.createEmbeddedView = function (context) {\n return new ViewRef_(Services.createEmbeddedView(this._parentView, this._def, (this._def.element.template), context));\n };\n Object.defineProperty(TemplateRef_.prototype, \"elementRef\", {\n get: function () {\n return new ElementRef(asElementData(this._parentView, this._def.nodeIndex).renderElement);\n },\n enumerable: true,\n configurable: true\n });\n return TemplateRef_;\n}(TemplateRef));\nfunction createInjector$1(view, elDef) {\n return new Injector_(view, elDef);\n}\nvar Injector_ = /** @class */ (function () {\n function Injector_(view, elDef) {\n this.view = view;\n this.elDef = elDef;\n }\n Injector_.prototype.get = function (token, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n var allowPrivateServices = this.elDef ? (this.elDef.flags & 33554432 /* ComponentView */) !== 0 : false;\n return Services.resolveDep(this.view, this.elDef, allowPrivateServices, { flags: 0 /* None */, token: token, tokenKey: tokenKey(token) }, notFoundValue);\n };\n return Injector_;\n}());\nfunction nodeValue(view, index) {\n var def = view.def.nodes[index];\n if (def.flags & 1 /* TypeElement */) {\n var 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 createRendererV1(view) {\n return new RendererAdapter(view.renderer);\n}\nvar RendererAdapter = /** @class */ (function () {\n function RendererAdapter(delegate) {\n this.delegate = delegate;\n }\n RendererAdapter.prototype.selectRootElement = function (selectorOrNode) {\n return this.delegate.selectRootElement(selectorOrNode);\n };\n RendererAdapter.prototype.createElement = function (parent, namespaceAndName) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n var el = this.delegate.createElement(name, ns);\n if (parent) {\n this.delegate.appendChild(parent, el);\n }\n return el;\n };\n RendererAdapter.prototype.createViewRoot = function (hostElement) { return hostElement; };\n RendererAdapter.prototype.createTemplateAnchor = function (parentElement) {\n var comment = this.delegate.createComment('');\n if (parentElement) {\n this.delegate.appendChild(parentElement, comment);\n }\n return comment;\n };\n RendererAdapter.prototype.createText = function (parentElement, value) {\n var node = this.delegate.createText(value);\n if (parentElement) {\n this.delegate.appendChild(parentElement, node);\n }\n return node;\n };\n RendererAdapter.prototype.projectNodes = function (parentElement, nodes) {\n for (var i = 0; i < nodes.length; i++) {\n this.delegate.appendChild(parentElement, nodes[i]);\n }\n };\n RendererAdapter.prototype.attachViewAfter = function (node, viewRootNodes) {\n var parentElement = this.delegate.parentNode(node);\n var nextSibling = this.delegate.nextSibling(node);\n for (var i = 0; i < viewRootNodes.length; i++) {\n this.delegate.insertBefore(parentElement, viewRootNodes[i], nextSibling);\n }\n };\n RendererAdapter.prototype.detachView = function (viewRootNodes) {\n for (var i = 0; i < viewRootNodes.length; i++) {\n var node = viewRootNodes[i];\n var parentElement = this.delegate.parentNode(node);\n this.delegate.removeChild(parentElement, node);\n }\n };\n RendererAdapter.prototype.destroyView = function (hostElement, viewAllNodes) {\n for (var i = 0; i < viewAllNodes.length; i++) {\n this.delegate.destroyNode(viewAllNodes[i]);\n }\n };\n RendererAdapter.prototype.listen = function (renderElement, name, callback) {\n return this.delegate.listen(renderElement, name, callback);\n };\n RendererAdapter.prototype.listenGlobal = function (target, name, callback) {\n return this.delegate.listen(target, name, callback);\n };\n RendererAdapter.prototype.setElementProperty = function (renderElement, propertyName, propertyValue) {\n this.delegate.setProperty(renderElement, propertyName, propertyValue);\n };\n RendererAdapter.prototype.setElementAttribute = function (renderElement, namespaceAndName, attributeValue) {\n var _a = __read(splitNamespace(namespaceAndName), 2), ns = _a[0], name = _a[1];\n if (attributeValue != null) {\n this.delegate.setAttribute(renderElement, name, attributeValue, ns);\n }\n else {\n this.delegate.removeAttribute(renderElement, name, ns);\n }\n };\n RendererAdapter.prototype.setBindingDebugInfo = function (renderElement, propertyName, propertyValue) { };\n RendererAdapter.prototype.setElementClass = function (renderElement, className, isAdd) {\n if (isAdd) {\n this.delegate.addClass(renderElement, className);\n }\n else {\n this.delegate.removeClass(renderElement, className);\n }\n };\n RendererAdapter.prototype.setElementStyle = function (renderElement, styleName, styleValue) {\n if (styleValue != null) {\n this.delegate.setStyle(renderElement, styleName, styleValue);\n }\n else {\n this.delegate.removeStyle(renderElement, styleName);\n }\n };\n RendererAdapter.prototype.invokeElementMethod = function (renderElement, methodName, args) {\n renderElement[methodName].apply(renderElement, args);\n };\n RendererAdapter.prototype.setText = function (renderNode$$1, text) { this.delegate.setValue(renderNode$$1, text); };\n RendererAdapter.prototype.animate = function () { throw new Error('Renderer.animate is no longer supported!'); };\n return RendererAdapter;\n}());\nfunction createNgModuleRef(moduleType, parent, bootstrapComponents, def) {\n return new NgModuleRef_(moduleType, parent, bootstrapComponents, def);\n}\nvar NgModuleRef_ = /** @class */ (function () {\n function NgModuleRef_(_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 NgModuleRef_.prototype.get = function (token, notFoundValue, injectFlags) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (injectFlags === void 0) { injectFlags = 0 /* Default */; }\n var flags = 0;\n if (injectFlags & 4 /* SkipSelf */) {\n flags |= 1 /* SkipSelf */;\n }\n else if (injectFlags & 2 /* Self */) {\n flags |= 4 /* Self */;\n }\n return resolveNgModuleDep(this, { token: token, tokenKey: tokenKey(token), flags: flags }, notFoundValue);\n };\n Object.defineProperty(NgModuleRef_.prototype, \"instance\", {\n get: function () { return this.get(this._moduleType); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModuleRef_.prototype, \"componentFactoryResolver\", {\n get: function () { return this.get(ComponentFactoryResolver); },\n enumerable: true,\n configurable: true\n });\n NgModuleRef_.prototype.destroy = function () {\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(function (listener) { return listener(); });\n };\n NgModuleRef_.prototype.onDestroy = function (callback) { this._destroyListeners.push(callback); };\n return NgModuleRef_;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 RendererV1TokenKey = tokenKey(Renderer);\nvar Renderer2TokenKey = tokenKey(Renderer2);\nvar ElementRefTokenKey = tokenKey(ElementRef);\nvar ViewContainerRefTokenKey = tokenKey(ViewContainerRef);\nvar TemplateRefTokenKey = tokenKey(TemplateRef);\nvar ChangeDetectorRefTokenKey = tokenKey(ChangeDetectorRef);\nvar InjectorRefTokenKey = tokenKey(Injector);\nvar INJECTORRefTokenKey = tokenKey(INJECTOR);\nfunction directiveDef(checkIndex, flags, matchedQueries, childCount, ctor, deps, props, outputs) {\n var bindings = [];\n if (props) {\n for (var prop in props) {\n var _a = __read(props[prop], 2), bindingIndex = _a[0], nonMinifiedName = _a[1];\n bindings[bindingIndex] = {\n flags: 8 /* TypeProperty */,\n name: prop, nonMinifiedName: nonMinifiedName,\n ns: null,\n securityContext: null,\n suffix: null\n };\n }\n }\n var outputDefs = [];\n if (outputs) {\n for (var propName in outputs) {\n outputDefs.push({ type: 1 /* DirectiveOutput */, propName: 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 var _a = splitMatchedQueriesDsl(matchedQueriesDsl), matchedQueries = _a.matchedQueries, references = _a.references, matchedQueryIds = _a.matchedQueryIds;\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 var 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: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0, matchedQueries: matchedQueries, matchedQueryIds: matchedQueryIds, references: references,\n ngContentIndex: -1, childCount: childCount, bindings: bindings,\n bindingFlags: calcBindingFlags(bindings), outputs: outputs,\n element: null,\n provider: { token: token, value: value, deps: depDefs },\n text: null,\n query: null,\n ngContent: null\n };\n}\nfunction createProviderInstance(view, def) {\n return _createProviderInstance(view, def);\n}\nfunction createPipeInstance(view, def) {\n // deps are looked up from component.\n var compView = view;\n while (compView.parent && !isComponentView(compView)) {\n compView = compView.parent;\n }\n // pipes can see the private services of the component\n var 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 var allowPrivateServices = (def.flags & 32768 /* Component */) > 0;\n // directives are always eager and classes!\n var instance = createClass(view, (def.parent), allowPrivateServices, def.provider.value, def.provider.deps);\n if (def.outputs.length) {\n for (var i = 0; i < def.outputs.length; i++) {\n var output = def.outputs[i];\n var subscription = instance[output.propName].subscribe(eventHandlerClosure(view, def.parent.nodeIndex, output.eventName));\n view.disposables[def.outputIndex + i] = subscription.unsubscribe.bind(subscription);\n }\n }\n return instance;\n}\nfunction eventHandlerClosure(view, index, eventName) {\n return function (event) { return dispatchEvent(view, index, eventName, event); };\n}\nfunction checkAndUpdateDirectiveInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = (undefined);\n var 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 var providerData = asProviderData(view, def.nodeIndex);\n var directive = providerData.instance;\n var changed = false;\n var changes = (undefined);\n for (var 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(view, def) {\n // private services can see other private services\n var allowPrivateServices = (def.flags & 8192 /* PrivateProvider */) > 0;\n var 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 var 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 var depValues = new Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return new (ctor.bind.apply(ctor, __spread([void 0], depValues)))();\n }\n}\nfunction callFactory(view, elDef, allowPrivateServices, factory, deps) {\n var 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 var depValues = Array(len);\n for (var i = 0; i < len; i++) {\n depValues[i] = resolveDep(view, elDef, allowPrivateServices, deps[i]);\n }\n return factory.apply(void 0, __spread(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)\nvar NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR = {};\nfunction resolveDep(view, elDef, allowPrivateServices, depDef, notFoundValue) {\n if (notFoundValue === void 0) { notFoundValue = Injector.THROW_IF_NOT_FOUND; }\n if (depDef.flags & 8 /* Value */) {\n return depDef.token;\n }\n var startView = view;\n if (depDef.flags & 2 /* Optional */) {\n notFoundValue = null;\n }\n var tokenKey$$1 = depDef.tokenKey;\n if (tokenKey$$1 === 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 var searchView = view;\n while (searchView) {\n if (elDef) {\n switch (tokenKey$$1) {\n case RendererV1TokenKey: {\n var compView = findCompView(searchView, elDef, allowPrivateServices);\n return createRendererV1(compView);\n }\n case Renderer2TokenKey: {\n var 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 var cdView = findCompView(searchView, elDef, allowPrivateServices);\n return createChangeDetectorRef(cdView);\n }\n case InjectorRefTokenKey:\n case INJECTORRefTokenKey:\n return createInjector$1(searchView, elDef);\n default:\n var providerDef_1 = (allowPrivateServices ? elDef.element.allProviders :\n elDef.element.publicProviders)[tokenKey$$1];\n if (providerDef_1) {\n var providerData = asProviderData(searchView, providerDef_1.nodeIndex);\n if (!providerData) {\n providerData = { instance: _createProviderInstance(searchView, providerDef_1) };\n searchView.nodes[providerDef_1.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 var 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 var 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 var compView = asElementData(view, def.parent.nodeIndex).componentView;\n if (compView.def.flags & 2 /* OnPush */) {\n compView.state |= 8 /* ChecksEnabled */;\n }\n }\n var binding = def.bindings[bindingIdx];\n var 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 var oldValue = WrappedValue.unwrap(view.oldValues[def.bindingIndex + bindingIdx]);\n var binding_1 = def.bindings[bindingIdx];\n changes[binding_1.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 var nodes = view.def.nodes;\n var initIndex = 0;\n for (var i = 0; i < nodes.length; i++) {\n var nodeDef = nodes[i];\n var parent_1 = nodeDef.parent;\n if (!parent_1 && 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_1 && (parent_1.flags & 1 /* TypeElement */) &&\n i === parent_1.nodeIndex + parent_1.childCount) {\n // last child of an element\n if (parent_1.directChildFlags & lifecycles) {\n initIndex = callElementProvidersLifecycles(view, parent_1, lifecycles, initIndex);\n }\n parent_1 = parent_1.parent;\n }\n }\n}\nfunction callElementProvidersLifecycles(view, elDef, lifecycles, initIndex) {\n for (var i = elDef.nodeIndex + 1; i <= elDef.nodeIndex + elDef.childCount; i++) {\n var 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 var providerData = asProviderData(view, index);\n if (!providerData) {\n return;\n }\n var 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 Inc. All Rights Reserved.\n *\n * Use of this 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 var bindingDefs = [];\n for (var propName in bindings) {\n var bindingType = bindings[propName];\n bindingDefs.push({ propName: propName, bindingType: 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, flags: 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: id, filterId: filterQueryId(id), bindings: bindingDefs },\n ngContent: null\n };\n}\nfunction createQuery() {\n return new QueryList();\n}\nfunction dirtyParentQueries(view) {\n var queryIds = view.def.nodeMatchedQueries;\n while (view.parent && isEmbeddedView(view)) {\n var tplDef = (view.parentNodeDef);\n view = view.parent;\n // content queries\n var end = tplDef.nodeIndex + tplDef.childCount;\n for (var i = 0; i <= end; i++) {\n var 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 (var i = 0; i < view.def.nodes.length; i++) {\n var 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 var queryList = asQueryList(view, nodeDef.nodeIndex);\n if (!queryList.dirty) {\n return;\n }\n var directiveInstance;\n var newValues = (undefined);\n if (nodeDef.flags & 67108864 /* TypeContentQuery */) {\n var 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 var bindings = nodeDef.query.bindings;\n var notify = false;\n for (var i = 0; i < bindings.length; i++) {\n var binding = bindings[i];\n var boundValue = void 0;\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 (var i = startIndex; i <= endIndex; i++) {\n var nodeDef = view.def.nodes[i];\n var 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 var 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 var embeddedViews = elementData.viewContainer._embeddedViews;\n for (var k = 0; k < embeddedViews.length; k++) {\n var embeddedView = embeddedViews[k];\n var dvc = declaredViewContainer(embeddedView);\n if (dvc && dvc === elementData) {\n calcQueryValues(embeddedView, 0, embeddedView.def.nodes.length - 1, queryDef, values);\n }\n }\n }\n var projectedViews = elementData.template._projectedViews;\n if (projectedViews) {\n for (var k = 0; k < projectedViews.length; k++) {\n var 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 Inc. All Rights Reserved.\n *\n * Use of this 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: {}, ngContentIndex: 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: index }\n };\n}\nfunction appendNgContent(view, renderHost, def) {\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (!parentEl) {\n // Nothing to do if there is no parent element.\n return;\n }\n var ngContentIndex = def.ngContent.index;\n visitProjectedRenderNodes(view, ngContentIndex, 1 /* AppendChild */, parentEl, null, undefined);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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, new Array(argCount + 1));\n}\nfunction pureArrayDef(checkIndex, argCount) {\n return _pureExpressionDef(32 /* TypePureArray */, checkIndex, new Array(argCount));\n}\nfunction pureObjectDef(checkIndex, propToIndex) {\n var keys = Object.keys(propToIndex);\n var nbKeys = keys.length;\n var propertyNames = new Array(nbKeys);\n for (var i = 0; i < nbKeys; i++) {\n var key = keys[i];\n var index = propToIndex[key];\n propertyNames[index] = key;\n }\n return _pureExpressionDef(64 /* TypePureObject */, checkIndex, propertyNames);\n}\nfunction _pureExpressionDef(flags, checkIndex, propertyNames) {\n var bindings = new Array(propertyNames.length);\n for (var i = 0; i < propertyNames.length; i++) {\n var prop = propertyNames[i];\n bindings[i] = {\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: checkIndex,\n flags: flags,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {},\n ngContentIndex: -1,\n childCount: 0, bindings: 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 var bindings = def.bindings;\n var changed = false;\n var 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 var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = new Array(bindings.length);\n if (bindLen > 0)\n value[0] = v0;\n if (bindLen > 1)\n value[1] = v1;\n if (bindLen > 2)\n value[2] = v2;\n if (bindLen > 3)\n value[3] = v3;\n if (bindLen > 4)\n value[4] = v4;\n if (bindLen > 5)\n value[5] = v5;\n if (bindLen > 6)\n value[6] = v6;\n if (bindLen > 7)\n value[7] = v7;\n if (bindLen > 8)\n value[8] = v8;\n if (bindLen > 9)\n value[9] = 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 var 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 var bindings = def.bindings;\n var changed = false;\n for (var 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 var data = asPureExpressionData(view, def.nodeIndex);\n var value = void 0;\n switch (def.flags & 201347067 /* Types */) {\n case 32 /* TypePureArray */:\n value = values;\n break;\n case 64 /* TypePureObject */:\n value = {};\n for (var i = 0; i < values.length; i++) {\n value[bindings[i].name] = values[i];\n }\n break;\n case 128 /* TypePurePipe */:\n var pipe = values[0];\n var params = values.slice(1);\n value = pipe.transform.apply(pipe, __spread(params));\n break;\n }\n data.value = value;\n }\n return changed;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var bindings = new Array(staticText.length - 1);\n for (var 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: checkIndex,\n flags: 2 /* TypeText */,\n childFlags: 0,\n directChildFlags: 0,\n childMatchedQueries: 0,\n matchedQueries: {},\n matchedQueryIds: 0,\n references: {}, ngContentIndex: ngContentIndex,\n childCount: 0, bindings: 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 var renderNode$$1;\n var renderer = view.renderer;\n renderNode$$1 = renderer.createText(def.text.prefix);\n var parentEl = getParentRenderElement(view, renderHost, def);\n if (parentEl) {\n renderer.appendChild(parentEl, renderNode$$1);\n }\n return { renderText: renderNode$$1 };\n}\nfunction checkAndUpdateTextInline(view, def, v0, v1, v2, v3, v4, v5, v6, v7, v8, v9) {\n var changed = false;\n var bindings = def.bindings;\n var 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 var 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 var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction checkAndUpdateTextDynamic(view, def, values) {\n var bindings = def.bindings;\n var changed = false;\n for (var 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 var value = '';\n for (var i = 0; i < values.length; i++) {\n value = value + _addInterpolationPart(values[i], bindings[i]);\n }\n value = def.text.prefix + value;\n var renderNode$$1 = asTextData(view, def.nodeIndex).renderText;\n view.renderer.setValue(renderNode$$1, value);\n }\n return changed;\n}\nfunction _addInterpolationPart(value, binding) {\n var valueStr = value != null ? value.toString() : '';\n return valueStr + binding.suffix;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 var viewBindingCount = 0;\n var viewDisposableCount = 0;\n var viewNodeFlags = 0;\n var viewRootNodeFlags = 0;\n var viewMatchedQueries = 0;\n var currentParent = null;\n var currentRenderParent = null;\n var currentElementHasPublicProviders = false;\n var currentElementHasPrivateProviders = false;\n var lastRenderRootNode = null;\n for (var i = 0; i < nodes.length; i++) {\n var 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 var 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 // 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 var isPrivateService = (node.flags & 8192 /* PrivateProvider */) !== 0;\n var 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 // 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 var 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 var handleEvent = function (view, nodeIndex, eventName, event) {\n return nodes[nodeIndex].element.handleEvent(view, eventName, event);\n };\n return {\n // Will be filled later...\n factory: null,\n nodeFlags: viewNodeFlags,\n rootNodeFlags: viewRootNodeFlags,\n nodeMatchedQueries: viewMatchedQueries, flags: flags,\n nodes: nodes,\n updateDirectives: updateDirectives || NOOP,\n updateRenderer: updateRenderer || NOOP, handleEvent: handleEvent,\n bindingCount: viewBindingCount,\n outputCount: viewDisposableCount, lastRenderRootNode: lastRenderRootNode\n };\n}\nfunction isNgContainer(node) {\n return (node.flags & 1 /* TypeElement */) !== 0 && node.element.name === null;\n}\nfunction validateNode(parent, node, nodeCount) {\n var 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 var 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 var 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$$1, 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 var view = createView(parent.root, parent.renderer, parent, anchorDef$$1, viewDef);\n initView(view, parent.component, context);\n createViewNodes(view);\n return view;\n}\nfunction createRootView(root, def, context) {\n var 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 var rendererType = nodeDef.element.componentRendererType;\n var 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 var nodes = new Array(def.nodes.length);\n var disposables = def.outputCount ? new Array(def.outputCount) : null;\n var view = {\n def: def,\n parent: parent,\n viewContainerParent: null, parentNodeDef: parentNodeDef,\n context: null,\n component: null, nodes: nodes,\n state: 13 /* CatInit */, root: root, renderer: renderer,\n oldValues: new Array(def.bindingCount), disposables: 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 var renderHost;\n if (isComponentView(view)) {\n var hostDef = view.parentNodeDef;\n renderHost = asElementData((view.parent), hostDef.parent.nodeIndex).renderElement;\n }\n var def = view.def;\n var nodes = view.nodes;\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n Services.setCurrentNode(view, i);\n var nodeData = void 0;\n switch (nodeDef.flags & 201347067 /* Types */) {\n case 1 /* TypeElement */:\n var el = createElement(view, renderHost, nodeDef);\n var componentView = (undefined);\n if (nodeDef.flags & 33554432 /* ComponentView */) {\n var 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: 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 var instance = createProviderInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n break;\n }\n case 16 /* TypePipe */: {\n var instance = createPipeInstance(view, nodeDef);\n nodeData = { instance: instance };\n break;\n }\n case 16384 /* TypeDirective */: {\n nodeData = nodes[i];\n if (!nodeData) {\n var instance = createDirectiveInstance(view, nodeDef);\n nodeData = { instance: instance };\n }\n if (nodeDef.flags & 32768 /* Component */) {\n var 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 var 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 var def = view.def;\n if (!(def.nodeFlags & 4 /* ProjectedTemplate */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 4 /* ProjectedTemplate */) {\n var projectedViews = asElementData(view, i).template._projectedViews;\n if (projectedViews) {\n for (var i_1 = 0; i_1 < projectedViews.length; i_1++) {\n var projectedView = projectedViews[i_1];\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 var 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 (var 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 var 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 (var 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 var len = view.def.nodes.length;\n for (var i = 0; i < len; i++) {\n var 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 var def = view.def;\n if (!(def.nodeFlags & 33554432 /* ComponentView */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var 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 var def = view.def;\n if (!(def.nodeFlags & 16777216 /* EmbeddedViews */)) {\n return;\n }\n for (var i = 0; i < def.nodes.length; i++) {\n var nodeDef = def.nodes[i];\n if (nodeDef.flags & 16777216 /* EmbeddedViews */) {\n // a leaf\n var embeddedViews = asElementData(view, i).viewContainer._embeddedViews;\n for (var 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 var 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 var nodeCount = view.def.nodes.length;\n for (var i = 0; i < nodeCount; i++) {\n var 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 Inc. All Rights Reserved.\n *\n * Use of this 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 initialized = false;\nfunction initServicesIfNeeded() {\n if (initialized) {\n return;\n }\n initialized = true;\n var 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: function () { },\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: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: function (view, nodeIndex, eventName, event) {\n return view.def.handleEvent(view, nodeIndex, eventName, event);\n },\n updateDirectives: function (view, checkType) {\n return view.def.updateDirectives(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view);\n },\n updateRenderer: function (view, checkType) {\n return view.def.updateRenderer(checkType === 0 /* CheckAndUpdate */ ? prodCheckAndUpdateNode :\n prodCheckNoChangesNode, view);\n },\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: function (view, nodeIndex) { return new DebugContext_(view, nodeIndex); },\n handleEvent: debugHandleEvent,\n updateDirectives: debugUpdateDirectives,\n updateRenderer: debugUpdateRenderer,\n };\n}\nfunction createProdRootView(elInjector, projectableNodes, rootSelectorOrNode, def, ngModule, context) {\n var 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 var rendererFactory = ngModule.injector.get(RendererFactory2);\n var root = createRootData(elInjector, ngModule, new DebugRendererFactory2(rendererFactory), projectableNodes, rootSelectorOrNode);\n var defWithOverride = applyProviderOverridesToView(def);\n return callWithDebugContext(DebugAction.create, createRootView, null, [root, defWithOverride, context]);\n}\nfunction createRootData(elInjector, ngModule, rendererFactory, projectableNodes, rootSelectorOrNode) {\n var sanitizer = ngModule.injector.get(Sanitizer);\n var errorHandler = ngModule.injector.get(ErrorHandler);\n var renderer = rendererFactory.createRenderer(null, null);\n return {\n ngModule: ngModule,\n injector: elInjector, projectableNodes: projectableNodes,\n selectorOrNode: rootSelectorOrNode, sanitizer: sanitizer, rendererFactory: rendererFactory, renderer: renderer, errorHandler: errorHandler\n };\n}\nfunction debugCreateEmbeddedView(parentView, anchorDef, viewDef$$1, context) {\n var defWithOverride = applyProviderOverridesToView(viewDef$$1);\n return callWithDebugContext(DebugAction.create, createEmbeddedView, null, [parentView, anchorDef, defWithOverride, context]);\n}\nfunction debugCreateComponentView(parentView, nodeDef, viewDef$$1, hostElement) {\n var overrideComponentView = viewDefOverrides.get(nodeDef.element.componentProvider.provider.token);\n if (overrideComponentView) {\n viewDef$$1 = overrideComponentView;\n }\n else {\n viewDef$$1 = applyProviderOverridesToView(viewDef$$1);\n }\n return callWithDebugContext(DebugAction.create, createComponentView, null, [parentView, nodeDef, viewDef$$1, hostElement]);\n}\nfunction debugCreateNgModuleRef(moduleType, parentInjector, bootstrapComponents, def) {\n var defWithOverride = applyProviderOverridesToNgModule(def);\n return createNgModuleRef(moduleType, parentInjector, bootstrapComponents, defWithOverride);\n}\nvar providerOverrides = new Map();\nvar providerOverridesWithScope = new Map();\nvar viewDefOverrides = new Map();\nfunction debugOverrideProvider(override) {\n providerOverrides.set(override.token, override);\n if (typeof override.token === 'function' && override.token.ngInjectableDef &&\n typeof override.token.ngInjectableDef.providedIn === 'function') {\n providerOverridesWithScope.set(override.token, override);\n }\n}\nfunction debugOverrideComponentView(comp, compFactory) {\n var hostViewDef = resolveDefinition(getComponentViewDefinitionFactory(compFactory));\n var 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 var 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(function () { return NOOP; });\n for (var i = 0; i < elementIndicesWithOverwrittenProviders.length; i++) {\n applyProviderOverridesToElement(def, elementIndicesWithOverwrittenProviders[i]);\n }\n return def;\n function findElementIndicesWithOverwrittenProviders(def) {\n var elIndicesWithOverwrittenProviders = [];\n var lastElementDef = null;\n for (var i = 0; i < def.nodes.length; i++) {\n var 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$$1, elIndex) {\n for (var i = elIndex + 1; i < viewDef$$1.nodes.length; i++) {\n var nodeDef = viewDef$$1.nodes[i];\n if (nodeDef.flags & 1 /* TypeElement */) {\n // stop at the next element\n return;\n }\n if (nodeDef.flags & 3840 /* CatProviderNoDirective */) {\n var provider = (nodeDef.provider);\n var 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 var _a = calcHasOverrides(def), hasOverrides = _a.hasOverrides, hasDeprecatedOverrides = _a.hasDeprecatedOverrides;\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(function () { return NOOP; });\n applyProviderOverrides(def);\n return def;\n function calcHasOverrides(def) {\n var hasOverrides = false;\n var hasDeprecatedOverrides = false;\n if (providerOverrides.size === 0) {\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n def.providers.forEach(function (node) {\n var 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(function (module) {\n providerOverridesWithScope.forEach(function (override, token) {\n if (token.ngInjectableDef.providedIn === module) {\n hasOverrides = true;\n hasDeprecatedOverrides = hasDeprecatedOverrides || override.deprecatedBehavior;\n }\n });\n });\n return { hasOverrides: hasOverrides, hasDeprecatedOverrides: hasDeprecatedOverrides };\n }\n function applyProviderOverrides(def) {\n for (var i = 0; i < def.providers.length; i++) {\n var 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 var 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 var moduleSet_1 = new Set(def.modules);\n providerOverridesWithScope.forEach(function (override, token) {\n if (moduleSet_1.has(token.ngInjectableDef.providedIn)) {\n var 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 var 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 var 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 = {}));\nvar _currentAction;\nvar _currentView;\nvar _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) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var 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) {\n var values = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n values[_i - 3] = arguments[_i];\n }\n var 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 var changed = checkAndUpdateNode.apply(void 0, __spread([view, nodeDef, argStyle], givenValues));\n if (changed) {\n var values = argStyle === 1 /* Dynamic */ ? givenValues[0] : givenValues;\n if (nodeDef.flags & 16384 /* TypeDirective */) {\n var bindingValues = {};\n for (var i = 0; i < nodeDef.bindings.length; i++) {\n var binding = nodeDef.bindings[i];\n var value = values[i];\n if (binding.flags & 8 /* TypeProperty */) {\n bindingValues[normalizeDebugBindingName((binding.nonMinifiedName))] =\n normalizeDebugBindingValue(value);\n }\n }\n var elDef = (nodeDef.parent);\n var 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 (var attr in bindingValues) {\n var 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.apply(void 0, __spread([view, nodeDef, argStyle], values));\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}\nvar CAMEL_CASE_REGEXP = /([A-Z])/g;\nfunction camelCaseToDashCase(input) {\n return input.replace(CAMEL_CASE_REGEXP, function () {\n var m = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n m[_i] = arguments[_i];\n }\n return '-' + m[1].toLowerCase();\n });\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}\nfunction nextDirectiveWithBinding(view, nodeIndex) {\n for (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var 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 (var i = nodeIndex; i < view.def.nodes.length; i++) {\n var 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}\nvar DebugContext_ = /** @class */ (function () {\n function DebugContext_(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 var elDef = this.nodeDef;\n var 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 Object.defineProperty(DebugContext_.prototype, \"elOrCompView\", {\n get: function () {\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 enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"injector\", {\n get: function () { return createInjector$1(this.elView, this.elDef); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"component\", {\n get: function () { return this.elOrCompView.component; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"context\", {\n get: function () { return this.elOrCompView.context; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"providerTokens\", {\n get: function () {\n var tokens = [];\n if (this.elDef) {\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var 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 enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"references\", {\n get: function () {\n var references = {};\n if (this.elDef) {\n collectReferences(this.elView, this.elDef, references);\n for (var i = this.elDef.nodeIndex + 1; i <= this.elDef.nodeIndex + this.elDef.childCount; i++) {\n var 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 enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"componentRenderElement\", {\n get: function () {\n var elData = findHostElement(this.elOrCompView);\n return elData ? elData.renderElement : undefined;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DebugContext_.prototype, \"renderNode\", {\n get: function () {\n return this.nodeDef.flags & 2 /* TypeText */ ? renderNode(this.view, this.nodeDef) :\n renderNode(this.elView, this.elDef);\n },\n enumerable: true,\n configurable: true\n });\n DebugContext_.prototype.logError = function (console) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var logViewDef;\n var 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 var renderNodeIndex = getRenderNodeIndex(logViewDef, logNodeIndex);\n var currRenderNodeIndex = -1;\n var nodeLogger = function () {\n currRenderNodeIndex++;\n if (currRenderNodeIndex === renderNodeIndex) {\n return (_a = console.error).bind.apply(_a, __spread([console], values));\n }\n else {\n return NOOP;\n }\n var _a;\n };\n logViewDef.factory(nodeLogger);\n if (currRenderNodeIndex < renderNodeIndex) {\n console.error('Illegal state: the ViewDefinitionFactory did not call the logger!');\n console.error.apply(console, __spread(values));\n }\n };\n return DebugContext_;\n}());\nfunction getRenderNodeIndex(viewDef$$1, nodeIndex) {\n var renderNodeIndex = -1;\n for (var i = 0; i <= nodeIndex; i++) {\n var nodeDef = viewDef$$1.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 (var refName in nodeDef.references) {\n references[refName] = getQueryValue(view, nodeDef, nodeDef.references[refName]);\n }\n}\nfunction callWithDebugContext(action, fn, self, args) {\n var oldAction = _currentAction;\n var oldView = _currentView;\n var oldNodeIndex = _currentNodeIndex;\n try {\n _currentAction = action;\n var 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}\nvar DebugRendererFactory2 = /** @class */ (function () {\n function DebugRendererFactory2(delegate) {\n this.delegate = delegate;\n }\n DebugRendererFactory2.prototype.createRenderer = function (element, renderData) {\n return new DebugRenderer2(this.delegate.createRenderer(element, renderData));\n };\n DebugRendererFactory2.prototype.begin = function () {\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n DebugRendererFactory2.prototype.end = function () {\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n DebugRendererFactory2.prototype.whenRenderingDone = function () {\n if (this.delegate.whenRenderingDone) {\n return this.delegate.whenRenderingDone();\n }\n return Promise.resolve(null);\n };\n return DebugRendererFactory2;\n}());\nvar DebugRenderer2 = /** @class */ (function () {\n function DebugRenderer2(delegate) {\n this.delegate = delegate;\n this.data = this.delegate.data;\n }\n DebugRenderer2.prototype.destroyNode = function (node) {\n removeDebugNodeFromIndex((getDebugNode(node)));\n if (this.delegate.destroyNode) {\n this.delegate.destroyNode(node);\n }\n };\n DebugRenderer2.prototype.destroy = function () { this.delegate.destroy(); };\n DebugRenderer2.prototype.createElement = function (name, namespace) {\n var el = this.delegate.createElement(name, namespace);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n var debugEl = new DebugElement(el, null, debugCtx);\n debugEl.name = name;\n indexDebugNode(debugEl);\n }\n return el;\n };\n DebugRenderer2.prototype.createComment = function (value) {\n var comment = this.delegate.createComment(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(comment, null, debugCtx));\n }\n return comment;\n };\n DebugRenderer2.prototype.createText = function (value) {\n var text = this.delegate.createText(value);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugNode(text, null, debugCtx));\n }\n return text;\n };\n DebugRenderer2.prototype.appendChild = function (parent, newChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.addChild(debugChildEl);\n }\n this.delegate.appendChild(parent, newChild);\n };\n DebugRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(newChild);\n var debugRefEl = (getDebugNode(refChild));\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.insertBefore(debugRefEl, debugChildEl);\n }\n this.delegate.insertBefore(parent, newChild, refChild);\n };\n DebugRenderer2.prototype.removeChild = function (parent, oldChild) {\n var debugEl = getDebugNode(parent);\n var debugChildEl = getDebugNode(oldChild);\n if (debugEl && debugChildEl && debugEl instanceof DebugElement) {\n debugEl.removeChild(debugChildEl);\n }\n this.delegate.removeChild(parent, oldChild);\n };\n DebugRenderer2.prototype.selectRootElement = function (selectorOrNode) {\n var el = this.delegate.selectRootElement(selectorOrNode);\n var debugCtx = getCurrentDebugContext();\n if (debugCtx) {\n indexDebugNode(new DebugElement(el, null, debugCtx));\n }\n return el;\n };\n DebugRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = value;\n }\n this.delegate.setAttribute(el, name, value, namespace);\n };\n DebugRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n var fullName = namespace ? namespace + ':' + name : name;\n debugEl.attributes[fullName] = null;\n }\n this.delegate.removeAttribute(el, name, namespace);\n };\n DebugRenderer2.prototype.addClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = true;\n }\n this.delegate.addClass(el, name);\n };\n DebugRenderer2.prototype.removeClass = function (el, name) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.classes[name] = false;\n }\n this.delegate.removeClass(el, name);\n };\n DebugRenderer2.prototype.setStyle = function (el, style, value, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = value;\n }\n this.delegate.setStyle(el, style, value, flags);\n };\n DebugRenderer2.prototype.removeStyle = function (el, style, flags) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.styles[style] = null;\n }\n this.delegate.removeStyle(el, style, flags);\n };\n DebugRenderer2.prototype.setProperty = function (el, name, value) {\n var debugEl = getDebugNode(el);\n if (debugEl && debugEl instanceof DebugElement) {\n debugEl.properties[name] = value;\n }\n this.delegate.setProperty(el, name, value);\n };\n DebugRenderer2.prototype.listen = function (target, eventName, callback) {\n if (typeof target !== 'string') {\n var debugEl = getDebugNode(target);\n if (debugEl) {\n debugEl.listeners.push(new EventListener(eventName, callback));\n }\n }\n return this.delegate.listen(target, eventName, callback);\n };\n DebugRenderer2.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };\n DebugRenderer2.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };\n DebugRenderer2.prototype.setValue = function (node, value) { return this.delegate.setValue(node, value); };\n return DebugRenderer2;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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}\nvar NgModuleFactory_ = /** @class */ (function (_super) {\n __extends(NgModuleFactory_, _super);\n function NgModuleFactory_(moduleType, _bootstrapComponents, _ngModuleDefFactory) {\n var _this = \n // Attention: this ctor is called as top level function.\n // Putting any logic in here will destroy closure tree shaking!\n _super.call(this) || this;\n _this.moduleType = moduleType;\n _this._bootstrapComponents = _bootstrapComponents;\n _this._ngModuleDefFactory = _ngModuleDefFactory;\n return _this;\n }\n NgModuleFactory_.prototype.create = function (parentInjector) {\n initServicesIfNeeded();\n var def = resolveDefinition(this._ngModuleDefFactory);\n return Services.createNgModuleRef(this.moduleType, parentInjector || Injector.NULL, this._bootstrapComponents, def);\n };\n return NgModuleFactory_;\n}(NgModuleFactory));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n// The functions in this file verify that the assumptions we are making\n// about state in an instruction are correct before implementing any logic.\n// They are meant only to be called in dev mode as sanity checks.\n\nfunction assertEqual(actual, expected, msg) {\n if (actual != expected) {\n throwError(msg);\n }\n}\nfunction assertNotEqual(actual, expected, msg) {\n if (actual == expected) {\n throwError(msg);\n }\n}\nfunction assertSame(actual, expected, msg) {\n if (actual !== expected) {\n throwError(msg);\n }\n}\nfunction assertLessThan(actual, expected, msg) {\n if (actual >= expected) {\n throwError(msg);\n }\n}\nfunction assertGreaterThan(actual, expected, msg) {\n if (actual <= expected) {\n throwError(msg);\n }\n}\nfunction assertNull(actual, msg) {\n if (actual != null) {\n throwError(msg);\n }\n}\nfunction assertNotNull(actual, msg) {\n if (actual == null) {\n throwError(msg);\n }\n}\nfunction assertComponentType(actual, msg) {\n if (msg === void 0) { msg = 'Type passed in is not ComponentType, it does not have \\'ngComponentDef\\' property.'; }\n if (!actual.ngComponentDef) {\n throwError(msg);\n }\n}\nfunction throwError(msg) {\n debugger; // Left intentionally for better debugger experience.\n throw new Error(\"ASSERTION ERROR: \" + msg);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 this is the first template pass, any ngOnInit or ngDoCheck hooks will be queued into\n * TView.initHooks during directiveCreate.\n *\n * The directive index and hook type are encoded into one number (1st bit: type, remaining bits:\n * directive index), then saved in the even indices of the initHooks array. The odd indices\n * hold the hook functions themselves.\n *\n * @param index The index of the directive in LView.data\n * @param hooks The static hooks map on the directive def\n * @param tView The current TView\n */\nfunction queueInitHooks(index, onInit, doCheck, tView) {\n ngDevMode &&\n assertEqual(tView.firstTemplatePass, true, 'Should only be called on first template pass');\n if (onInit) {\n (tView.initHooks || (tView.initHooks = [])).push(index, onInit);\n }\n if (doCheck) {\n (tView.initHooks || (tView.initHooks = [])).push(index, doCheck);\n (tView.checkHooks || (tView.checkHooks = [])).push(index, doCheck);\n }\n}\n/**\n * Loops through the directives on a node and queues all their hooks except ngOnInit\n * and ngDoCheck, which are queued separately in directiveCreate.\n */\nfunction queueLifecycleHooks(flags, currentView) {\n var tView = currentView.tView;\n if (tView.firstTemplatePass === true) {\n var start = flags >> 13;\n var count = flags & 4095;\n var end = start + count;\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 (var i = start; i < end; i++) {\n var def = tView.directives[i];\n queueContentHooks(def, tView, i);\n queueViewHooks(def, tView, i);\n queueDestroyHooks(def, tView, i);\n }\n }\n}\n/** Queues afterContentInit and afterContentChecked hooks on TView */\nfunction queueContentHooks(def, tView, i) {\n if (def.afterContentInit) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentInit);\n }\n if (def.afterContentChecked) {\n (tView.contentHooks || (tView.contentHooks = [])).push(i, def.afterContentChecked);\n (tView.contentCheckHooks || (tView.contentCheckHooks = [])).push(i, def.afterContentChecked);\n }\n}\n/** Queues afterViewInit and afterViewChecked hooks on TView */\nfunction queueViewHooks(def, tView, i) {\n if (def.afterViewInit) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewInit);\n }\n if (def.afterViewChecked) {\n (tView.viewHooks || (tView.viewHooks = [])).push(i, def.afterViewChecked);\n (tView.viewCheckHooks || (tView.viewCheckHooks = [])).push(i, def.afterViewChecked);\n }\n}\n/** Queues onDestroy hooks on TView */\nfunction queueDestroyHooks(def, tView, i) {\n if (def.onDestroy != null) {\n (tView.destroyHooks || (tView.destroyHooks = [])).push(i, def.onDestroy);\n }\n}\n/**\n * Calls onInit and doCheck calls if they haven't already been called.\n *\n * @param currentView The current view\n */\nfunction executeInitHooks(currentView, tView, creationMode) {\n if (currentView.lifecycleStage === 1 /* Init */) {\n executeHooks((currentView.directives), tView.initHooks, tView.checkHooks, creationMode);\n currentView.lifecycleStage = 2 /* AfterInit */;\n }\n}\n/**\n * Iterates over afterViewInit and afterViewChecked functions and calls them.\n *\n * @param currentView The current view\n */\nfunction executeHooks(data, allHooks, checkHooks, creationMode) {\n var hooksToCall = creationMode ? allHooks : checkHooks;\n if (hooksToCall) {\n callHooks(data, hooksToCall);\n }\n}\n/**\n * Calls lifecycle hooks with their contexts, skipping init hooks if it's not\n * creation mode.\n *\n * @param currentView The current view\n * @param arr The array in which the hooks are found\n */\nfunction callHooks(data, arr) {\n for (var i = 0; i < arr.length; i += 2) {\n arr[i + 1].call(data[arr[i]]);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 (typeof ngDevMode == 'undefined') {\n if (typeof window != 'undefined')\n window.ngDevMode = true;\n if (typeof self != 'undefined')\n self.ngDevMode = true;\n if (typeof global != 'undefined')\n global.ngDevMode = true;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NG_PROJECT_AS_ATTR_NAME = 'ngProjectAs';\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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(node, type) {\n assertNotNull(node, 'should be called with a node');\n assertEqual(node.type, type, \"should be a \" + typeName(type));\n}\nfunction assertNodeOfPossibleTypes(node) {\n var types = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n types[_i - 1] = arguments[_i];\n }\n assertNotNull(node, 'should be called with a node');\n var found = types.some(function (type) { return node.type === type; });\n assertEqual(found, true, \"Should be one of \" + types.map(typeName).join(', '));\n}\nfunction typeName(type) {\n if (type == 1 /* Projection */)\n return 'Projection';\n if (type == 0 /* Container */)\n return 'Container';\n if (type == 2 /* View */)\n return 'View';\n if (type == 3 /* Element */)\n return 'Element';\n return '<unknown>';\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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\n// TODO: cleanup once the code is merged in angular/angular\nvar RendererStyleFlags3;\n// TODO: cleanup once the code is merged in angular/angular\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}\nvar domRendererFactory3 = {\n createRenderer: function (hostElement, rendererType) { return document; }\n};\n// Note: This hack is necessary so we don't erroneously get a circular dependency\n// failure based on types.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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* Must use this method for CD (instead of === ) since NaN !== NaN\n*/\nfunction isDifferent(a, b) {\n // NaN is the only value that is not equal to itself so the first\n // test checks if both a and b are not NaN\n return !(a !== a && b !== b) && a !== b;\n}\nfunction stringify$1(value) {\n if (typeof value == 'function')\n return value.name || value;\n if (typeof value == 'string')\n return value;\n if (value == null)\n return '';\n return '' + value;\n}\n/**\n * Function that throws a \"not implemented\" error so it's clear certain\n * behaviors/methods aren't yet ready.\n *\n * @returns Not implemented error\n */\nfunction notImplemented() {\n return new Error('NotImplemented');\n}\n/**\n * Flattens an array in non-recursive way. Input arrays are not modified.\n */\nfunction flatten$1(list) {\n var result = [];\n var i = 0;\n while (i < list.length) {\n var item = list[i];\n if (Array.isArray(item)) {\n if (item.length > 0) {\n list = item.concat(list.slice(i + 1));\n i = 0;\n }\n else {\n i++;\n }\n }\n else {\n result.push(item);\n i++;\n }\n }\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 first RNode following the given LNode in the same parent DOM element.\n *\n * This is needed in order to insert the given node with insertBefore.\n *\n * @param node The node whose following DOM node must be found.\n * @param stopNode A parent node at which the lookup in the tree should be stopped, or null if the\n * lookup should not be stopped until the result is found.\n * @returns RNode before which the provided node should be inserted or null if the lookup was\n * stopped\n * or if there is no native node after the given logical node in the same native parent.\n */\nfunction findNextRNodeSibling(node, stopNode) {\n var currentNode = node;\n while (currentNode && currentNode !== stopNode) {\n var pNextOrParent = currentNode.pNextOrParent;\n if (pNextOrParent) {\n while (pNextOrParent.type !== 1 /* Projection */) {\n var nativeNode = findFirstRNode(pNextOrParent);\n if (nativeNode) {\n return nativeNode;\n }\n pNextOrParent = (pNextOrParent.pNextOrParent);\n }\n currentNode = pNextOrParent;\n }\n else {\n var currentSibling = currentNode.next;\n while (currentSibling) {\n var nativeNode = findFirstRNode(currentSibling);\n if (nativeNode) {\n return nativeNode;\n }\n currentSibling = currentSibling.next;\n }\n var parentNode = currentNode.parent;\n currentNode = null;\n if (parentNode) {\n var parentType = parentNode.type;\n if (parentType === 0 /* Container */ || parentType === 2 /* View */) {\n currentNode = parentNode;\n }\n }\n }\n }\n return null;\n}\n/**\n * Get the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * @param node The node whose next node in the LNode tree must be found.\n * @return LNode|null The next sibling in the LNode tree.\n */\nfunction getNextLNodeWithProjection(node) {\n var pNextOrParent = node.pNextOrParent;\n if (pNextOrParent) {\n // The node is projected\n var isLastProjectedNode = pNextOrParent.type === 1;\n // returns pNextOrParent if we are not at the end of the list, null otherwise\n return isLastProjectedNode ? null : pNextOrParent;\n }\n // returns node.next because the the node is not projected\n return node.next;\n}\n/**\n * Find the next node in the LNode tree, taking into account the place where a node is\n * projected (in the shadow DOM) rather than where it comes from (in the light DOM).\n *\n * If there is no sibling node, this function goes to the next sibling of the parent node...\n * until it reaches rootNode (at which point null is returned).\n *\n * @param initialNode The node whose following node in the LNode tree must be found.\n * @param rootNode The root node at which the lookup should stop.\n * @return LNode|null The following node in the LNode tree.\n */\nfunction getNextOrParentSiblingNode(initialNode, rootNode) {\n var node = initialNode;\n var nextNode = getNextLNodeWithProjection(node);\n while (node && !nextNode) {\n // if node.pNextOrParent is not null here, it is not the next node\n // (because, at this point, nextNode is null, so it is the parent)\n node = node.pNextOrParent || node.parent;\n if (node === rootNode) {\n return null;\n }\n nextNode = node && getNextLNodeWithProjection(node);\n }\n return nextNode;\n}\n/**\n * Returns the first RNode inside the given LNode.\n *\n * @param node The node whose first DOM node must be found\n * @returns RNode The first RNode of the given LNode or null if there is none.\n */\nfunction findFirstRNode(rootNode) {\n var node = rootNode;\n while (node) {\n var nextNode = null;\n if (node.type === 3 /* Element */) {\n // A LElementNode has a matching RNode in LElementNode.native\n return node.native;\n }\n else if (node.type === 0 /* Container */) {\n var lContainerNode = node;\n var childContainerData = lContainerNode.dynamicLContainerNode ?\n lContainerNode.dynamicLContainerNode.data :\n lContainerNode.data;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n // For Projection look at the first projected node\n nextNode = node.data.head;\n }\n else {\n // Otherwise look at the first child\n nextNode = node.child;\n }\n node = nextNode === null ? getNextOrParentSiblingNode(node, rootNode) : nextNode;\n }\n return null;\n}\nfunction createTextNode(value, renderer) {\n return isProceduralRenderer(renderer) ? renderer.createText(stringify$1(value)) :\n renderer.createTextNode(stringify$1(value));\n}\nfunction addRemoveViewFromContainer(container, rootNode, insertMode, beforeNode) {\n ngDevMode && assertNodeType(container, 0 /* Container */);\n ngDevMode && assertNodeType(rootNode, 2 /* View */);\n var parentNode = container.data.renderParent;\n var parent = parentNode ? parentNode.native : null;\n var node = rootNode.child;\n if (parent) {\n while (node) {\n var nextNode = null;\n var renderer = container.view.renderer;\n if (node.type === 3 /* Element */) {\n if (insertMode) {\n if (!node.native) {\n // If the native element doesn't exist, this is a bound text node that hasn't yet been\n // created because update mode has not run (occurs when a bound text node is a root\n // node of a dynamically created view). See textBinding() in instructions for ctx.\n // If the native element doesn't exist, this is a bound text node that hasn't yet been\n // created because update mode has not run (occurs when a bound text node is a root\n // node of a dynamically created view). See textBinding() in instructions for ctx.\n node.native = createTextNode('', renderer);\n }\n isProceduralRenderer(renderer) ?\n renderer.insertBefore(parent, (node.native), beforeNode) :\n parent.insertBefore((node.native), beforeNode, true);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeChild(parent, (node.native)) :\n parent.removeChild((node.native));\n }\n nextNode = node.next;\n }\n else if (node.type === 0 /* Container */) {\n // if we get to a container, it must be a root node of a view because we are only\n // propagating down into child views / containers and not child elements\n var childContainerData = node.data;\n childContainerData.renderParent = parentNode;\n nextNode = childContainerData.views.length ? childContainerData.views[0].child : null;\n }\n else if (node.type === 1 /* Projection */) {\n nextNode = node.data.head;\n }\n else {\n nextNode = node.child;\n }\n if (nextNode === null) {\n node = getNextOrParentSiblingNode(node, rootNode);\n }\n else {\n node = nextNode;\n }\n }\n }\n}\n/**\n * Traverses the tree of component 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 var viewOrContainer = rootView;\n while (viewOrContainer) {\n var next = null;\n if (viewOrContainer.views && viewOrContainer.views.length) {\n next = viewOrContainer.views[0].data;\n }\n else if (viewOrContainer.child) {\n next = viewOrContainer.child;\n }\n else if (viewOrContainer.next) {\n cleanUpView(viewOrContainer);\n next = viewOrContainer.next;\n }\n if (next == null) {\n // If the viewOrContainer is the rootView, then the cleanup is done twice.\n // Without this check, ngOnDestroy would be called twice for a directive on an element.\n while (viewOrContainer && !viewOrContainer.next && viewOrContainer !== rootView) {\n cleanUpView(viewOrContainer);\n viewOrContainer = getParentState(viewOrContainer, rootView);\n }\n cleanUpView(viewOrContainer || rootView);\n next = viewOrContainer && viewOrContainer.next;\n }\n viewOrContainer = 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 container The container into which the view should be inserted\n * @param newView The view to insert\n * @param index The index at which to insert the view\n * @returns The inserted view\n */\nfunction insertView(container, newView, index) {\n var state = container.data;\n var views = state.views;\n if (index > 0) {\n // This is a new view, we need to add it to the children.\n setViewNext(views[index - 1], newView);\n }\n if (index < views.length) {\n setViewNext(newView, views[index]);\n views.splice(index, 0, newView);\n }\n else {\n views.push(newView);\n }\n // If the container's renderParent is null, we know that it is a root node of its own parent view\n // and we should wait until that parent processes its nodes (otherwise, we will insert this view's\n // nodes twice - once now and once when its parent inserts its views).\n if (container.data.renderParent !== null) {\n var beforeNode = findNextRNodeSibling(newView, container);\n if (!beforeNode) {\n var containerNextNativeNode = container.native;\n if (containerNextNativeNode === undefined) {\n containerNextNativeNode = container.native = findNextRNodeSibling(container, null);\n }\n beforeNode = containerNextNativeNode;\n }\n addRemoveViewFromContainer(container, newView, true, beforeNode);\n }\n return newView;\n}\n/**\n * Removes a view from a container.\n *\n * This method splices the view from the container's array of active views. It also\n * removes the view's elements from the DOM and conducts cleanup (e.g. removing\n * listeners, calling onDestroys).\n *\n * @param container The container from which to remove a view\n * @param removeIndex The index of the view to remove\n * @returns The removed view\n */\nfunction removeView(container, removeIndex) {\n var views = container.data.views;\n var viewNode = views[removeIndex];\n if (removeIndex > 0) {\n setViewNext(views[removeIndex - 1], viewNode.next);\n }\n views.splice(removeIndex, 1);\n viewNode.next = null;\n destroyViewTree(viewNode.data);\n addRemoveViewFromContainer(container, viewNode, false);\n // Notify query that view has been removed\n container.data.queries && container.data.queries.removeView(removeIndex);\n return viewNode;\n}\n/**\n * Sets a next on the view node, so views in for loops can easily jump from\n * one view to the next to add/remove elements. Also adds the LView (view.data)\n * to the view tree for easy traversal when cleaning up the view.\n *\n * @param view The view to set up\n * @param next The view's new next\n */\nfunction setViewNext(view, next) {\n view.next = next;\n view.data.next = next ? next.data : null;\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 state 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(state, rootView) {\n var node;\n if ((node = state.node) && node.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 node.parent.data;\n }\n else {\n // otherwise, use parent view for containers or component views\n return state.parent === rootView ? null : state.parent;\n }\n}\n/**\n * Removes all listeners and call all onDestroys in a given view.\n *\n * @param view The LView to clean up\n */\nfunction cleanUpView(view) {\n removeListeners(view);\n executeOnDestroys(view);\n executePipeOnDestroys(view);\n}\n/** Removes listeners and unsubscribes from output subscriptions */\nfunction removeListeners(view) {\n var cleanup = (view.cleanup);\n if (cleanup != null) {\n for (var i = 0; i < cleanup.length - 1; i += 2) {\n if (typeof cleanup[i] === 'string') {\n cleanup[i + 1].removeEventListener(cleanup[i], cleanup[i + 2], cleanup[i + 3]);\n i += 2;\n }\n else {\n cleanup[i].call(cleanup[i + 1]);\n }\n }\n view.cleanup = null;\n }\n}\n/** Calls onDestroy hooks for this view */\nfunction executeOnDestroys(view) {\n var tView = view.tView;\n var destroyHooks;\n if (tView != null && (destroyHooks = tView.destroyHooks) != null) {\n callHooks((view.directives), destroyHooks);\n }\n}\n/** Calls pipe destroy hooks for this view */\nfunction executePipeOnDestroys(view) {\n var pipeDestroyHooks = view.tView && view.tView.pipeDestroyHooks;\n if (pipeDestroyHooks) {\n callHooks((view.data), pipeDestroyHooks);\n }\n}\n/**\n * Returns whether a native element should be inserted in the given parent.\n *\n * The native node can be inserted when its parent is:\n * - A regular element => Yes\n * - A component host element =>\n * - if the `currentView` === the parent `view`: The element is in the content (vs the\n * template)\n * => don't add as the parent component will project if needed.\n * - `currentView` !== the parent `view` => The element is in the template (vs the content),\n * add it\n * - View element => delay insertion, will be done on `viewEnd()`\n *\n * @param parent The parent in which to insert the child\n * @param currentView The LView being processed\n * @return boolean Whether the child element should be inserted.\n */\nfunction canInsertNativeNode(parent, currentView) {\n var parentIsElement = parent.type === 3;\n return parentIsElement &&\n (parent.view !== currentView || parent.data === null /* Regular Element. */);\n}\n/**\n * Appends the `child` element to the `parent`.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param parent The parent to which to append the child\n * @param child The child that should be appended\n * @param currentView The current LView\n * @returns Whether or not the child was appended\n */\nfunction appendChild(parent, child, currentView) {\n if (child !== null && canInsertNativeNode(parent, currentView)) {\n // We only add element if not in View or not projected.\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ? renderer.appendChild(parent.native, child) :\n parent.native.appendChild(child);\n return true;\n }\n return false;\n}\n/**\n * Inserts the provided node before the correct element in the DOM.\n *\n * The element insertion might be delayed {@link canInsertNativeNode}\n *\n * @param node Node to insert\n * @param currentView Current LView\n */\nfunction insertChild(node, currentView) {\n var parent = (node.parent);\n if (canInsertNativeNode(parent, currentView)) {\n var nativeSibling = findNextRNodeSibling(node, null);\n var renderer = currentView.renderer;\n isProceduralRenderer(renderer) ?\n renderer.insertBefore((parent.native), (node.native), nativeSibling) :\n parent.native.insertBefore((node.native), nativeSibling, false);\n }\n}\n/**\n * Appends a projected node to the DOM, or in the case of a projected container,\n * appends the nodes from all of the container's active views to the DOM.\n *\n * @param node The node to process\n * @param currentParent The last parent element to be processed\n * @param currentView Current LView\n */\nfunction appendProjectedNode(node, currentParent, currentView) {\n if (node.type !== 0 /* Container */) {\n appendChild(currentParent, node.native, currentView);\n }\n else {\n // The node we are adding is a Container and we are adding it to Element which\n // is not a component (no more re-projection).\n // Alternatively a container is projected at the root of a component's template\n // and can't be re-projected (as not content of any component).\n // Assignee the final projection location in those cases.\n var lContainer = node.data;\n lContainer.renderParent = currentParent;\n var views = lContainer.views;\n for (var i = 0; i < views.length; i++) {\n addRemoveViewFromContainer(node, views[i], true, null);\n }\n }\n if (node.dynamicLContainerNode) {\n node.dynamicLContainerNode.data.renderParent = currentParent;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 isCssClassMatching(nodeClassAttrVal, cssClassToMatch) {\n var nodeClassesLen = nodeClassAttrVal.length;\n var matchIndex = nodeClassAttrVal.indexOf(cssClassToMatch);\n var matchEndIdx = matchIndex + cssClassToMatch.length;\n if (matchIndex === -1 // no match\n || (matchIndex > 0 && nodeClassAttrVal[matchIndex - 1] !== ' ') // no space before\n ||\n (matchEndIdx < nodeClassesLen && nodeClassAttrVal[matchEndIdx] !== ' ')) {\n return false;\n }\n return true;\n}\n/**\n * A utility function to match an Ivy node static data against a simple CSS selector\n *\n * @param node static data to match\n * @param selector\n * @returns true if node matches the selector.\n */\nfunction isNodeMatchingSelector(tNode, selector) {\n ngDevMode && assertNotNull(selector[0], 'Selector should have a tag name');\n var mode = 4;\n var nodeAttrs = (tNode.attrs);\n // When processing \":not\" selectors, we skip to the next \":not\" if the\n // current one doesn't match\n var skipToNextSelector = false;\n for (var i = 0; i < selector.length; i++) {\n var 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 !== '' && current !== tNode.tagName) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n }\n }\n else {\n var attrName = mode & 8 /* CLASS */ ? 'class' : current;\n var attrIndexInNode = findAttrIndexInNode(attrName, nodeAttrs);\n if (attrIndexInNode === -1) {\n if (isPositive(mode))\n return false;\n skipToNextSelector = true;\n continue;\n }\n var selectorAttrValue = mode & 8 /* CLASS */ ? current : selector[++i];\n if (selectorAttrValue !== '') {\n var nodeAttrValue = nodeAttrs[attrIndexInNode + 1];\n if (mode & 8 /* CLASS */ &&\n !isCssClassMatching(nodeAttrValue, selectorAttrValue) ||\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}\nfunction findAttrIndexInNode(name, attrs) {\n if (attrs === null)\n return -1;\n for (var i = 0; i < attrs.length; i += 2) {\n if (attrs[i] === name)\n return i;\n }\n return -1;\n}\nfunction isNodeMatchingSelectorList(tNode, selector) {\n for (var i = 0; i < selector.length; i++) {\n if (isNodeMatchingSelector(tNode, selector[i])) {\n return true;\n }\n }\n return false;\n}\nfunction getProjectAsAttrValue(tNode) {\n var nodeAttrs = tNode.attrs;\n if (nodeAttrs != null) {\n var ngProjectAsAttrIdx = nodeAttrs.indexOf(NG_PROJECT_AS_ATTR_NAME);\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}\n/**\n * Checks a given node against matching selectors and returns\n * selector index (or 0 if none matched).\n *\n * This function takes into account the ngProjectAs attribute: if present its value will be compared\n * to the raw (un-parsed) CSS selector instead of using standard selector matching logic.\n */\nfunction matchingSelectorIndex(tNode, selectors, textSelectors) {\n var ngProjectAsAttrVal = getProjectAsAttrValue(tNode);\n for (var i = 0; i < selectors.length; i++) {\n // if a node has the ngProjectAs attribute match it against unparsed selector\n // match a node against a parsed selector only if ngProjectAs attribute is not present\n if (ngProjectAsAttrVal === textSelectors[i] ||\n ngProjectAsAttrVal === null && isNodeMatchingSelectorList(tNode, selectors[i])) {\n return i + 1; // first matching selector \"captures\" a given node\n }\n }\n return 0;\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}\n/** Throws an ExpressionChangedAfterChecked error if checkNoChanges mode is on. */\nfunction throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, oldValue, currValue) {\n if (checkNoChangesMode) {\n var msg = \"ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '\" + 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\n throw new Error(msg);\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Directive (D) sets a property on all component instances using this constant as a key and the\n * component's host node (LElement) as the value. This is used in methods like detectChanges to\n * facilitate jumping from an instance to the host node.\n */\nvar NG_HOST_SYMBOL = '__ngHostLNode__';\n/**\n * A permanent marker promise which signifies that the current CD tree is\n * clean.\n */\nvar _CLEAN_PROMISE = Promise.resolve(null);\n/**\n * Directive and element indices for top-level directive.\n *\n * Saved here to avoid re-instantiating an array on every change detection run.\n */\nvar _ROOT_DIRECTIVE_INDICES = [0, 0];\n/**\n * Token set in currentMatches while dependencies are being resolved.\n *\n * If we visit a directive that has a value set to CIRCULAR, we know we've\n * already seen it, and thus have a circular dependency.\n */\nvar CIRCULAR$2 = '__CIRCULAR__';\n/**\n * This property gets set before entering a template.\n *\n * This renderer can be one of two varieties of Renderer3:\n *\n * - ObjectedOrientedRenderer3\n *\n * This is the native browser API style, e.g. operations are methods on individual objects\n * like HTMLElement. With this style, no additional code is needed as a facade (reducing payload\n * size).\n *\n * - ProceduralRenderer3\n *\n * In non-native browser environments (e.g. platforms such as web-workers), this is the facade\n * that enables element manipulation. This also facilitates backwards compatibility with\n * Renderer2.\n */\nvar renderer;\nvar rendererFactory;\nfunction getRenderer() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return renderer;\n}\n/** Used to set the parent property when nodes are created. */\nvar previousOrParentNode;\nfunction getPreviousOrParentNode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return previousOrParentNode;\n}\n/**\n * If `isParent` is:\n * - `true`: then `previousOrParentNode` points to a parent node.\n * - `false`: then `previousOrParentNode` points to previous node (sibling).\n */\nvar isParent;\n/**\n * Static data that corresponds to the instance-specific data array on an LView.\n *\n * Each node's static data is stored in tData at the same index that it's stored\n * in the data array. Any nodes that do not have static data store a null value in\n * tData to avoid a sparse array.\n */\nvar tData;\n/**\n * State of the current view being processed.\n *\n * NOTE: we cheat here and initialize it to `null` even thought the type does not\n * contain `null`. This is because we expect this value to be not `null` as soon\n * as we enter the view. Declaring the type as `null` would require us to place `!`\n * in most instructions since they all assume that `currentView` is defined.\n */\nvar currentView = (null);\nvar currentQueries;\nfunction getCurrentQueries(QueryType) {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return currentQueries || (currentQueries = new QueryType());\n}\n/**\n * This property gets set before entering a template.\n */\nvar creationMode;\nfunction getCreationMode() {\n // top level variables should not be exported for performance reason (PERF_NOTES.md)\n return creationMode;\n}\n/**\n * An array of nodes (text, element, container, etc), pipes, their bindings, and\n * any local variables that need to be stored between invocations.\n */\nvar data;\n/**\n * An array of directive instances in the current view.\n *\n * These must be stored separately from LNodes because their presence is\n * unknown at compile-time and thus space cannot be reserved in data[].\n */\nvar directives;\n/**\n * When a view is destroyed, listeners need to be released and outputs need to be\n * unsubscribed. This cleanup array stores both listener data (in chunks of 4)\n * and output data (in chunks of 2) for a particular view. Combining the arrays\n * saves on memory (70 bytes per array) and on a few bytes of code size (for two\n * separate for loops).\n *\n * If it's a listener being stored:\n * 1st index is: event name to remove\n * 2nd index is: native element\n * 3rd index is: listener function\n * 4th index is: useCapture boolean\n *\n * If it's an output subscription:\n * 1st index is: unsubscribe function\n * 2nd index is: context for function\n */\nvar cleanup;\n/**\n * In this mode, any changes in bindings will throw an ExpressionChangedAfterChecked error.\n *\n * Necessary to support ChangeDetectorRef.checkNoChanges().\n */\nvar checkNoChangesMode = false;\n/** Whether or not this is the first time the current view has been processed. */\nvar firstTemplatePass = true;\n/**\n * Swap the current state with a new state.\n *\n * For performance reasons we store the state 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 state for later, and when the view is\n * exited the state has to be restored\n *\n * @param newView New state to become active\n * @param host Element to which the View is a child of\n * @returns the previous state;\n */\nfunction enterView(newView, host) {\n var oldView = currentView;\n data = newView && newView.data;\n directives = newView && newView.directives;\n tData = newView && newView.tView.data;\n creationMode = newView && (newView.flags & 1 /* CreationMode */) === 1 /* CreationMode */;\n firstTemplatePass = newView && newView.tView.firstTemplatePass;\n cleanup = newView && newView.cleanup;\n renderer = newView && newView.renderer;\n if (newView && newView.bindingIndex < 0) {\n newView.bindingIndex = newView.bindingStartIndex;\n }\n if (host != null) {\n previousOrParentNode = host;\n isParent = true;\n }\n currentView = newView;\n currentQueries = newView && newView.queries;\n return oldView;\n}\n/**\n * Used in lieu of enterView to make it clear when we are exiting a child view. This makes\n * the direction of traversal (up or down the view tree) a bit clearer.\n */\nfunction leaveView(newView) {\n if (!checkNoChangesMode) {\n executeHooks((directives), currentView.tView.viewHooks, currentView.tView.viewCheckHooks, creationMode);\n }\n // Views should be clean and in update mode after being checked, so these bits are cleared\n currentView.flags &= ~(1 /* CreationMode */ | 4 /* Dirty */);\n currentView.lifecycleStage = 1 /* Init */;\n currentView.bindingIndex = -1;\n enterView(newView, null);\n}\n/** Refreshes directives in this view and triggers any init/content hooks. */\nfunction refreshDirectives() {\n executeInitAndContentHooks();\n var tView = currentView.tView;\n // This needs to be set before children are processed to support recursive components\n tView.firstTemplatePass = firstTemplatePass = false;\n setHostBindings(tView.hostBindings);\n refreshChildComponents(tView.components);\n}\n/** Sets the host bindings for the current view. */\nfunction setHostBindings(bindings) {\n if (bindings != null) {\n var defs = (currentView.tView.directives);\n for (var i = 0; i < bindings.length; i += 2) {\n var dirIndex = bindings[i];\n var def = defs[dirIndex];\n def.hostBindings && def.hostBindings(dirIndex, bindings[i + 1]);\n }\n }\n}\n/** Refreshes child components in the current view. */\nfunction refreshChildComponents(components) {\n if (components != null) {\n for (var i = 0; i < components.length; i += 2) {\n componentRefresh(components[i], components[i + 1]);\n }\n }\n}\nfunction executeInitAndContentHooks() {\n if (!checkNoChangesMode) {\n var tView = currentView.tView;\n executeInitHooks(currentView, tView, creationMode);\n executeHooks((directives), tView.contentHooks, tView.contentCheckHooks, creationMode);\n }\n}\nfunction createLView(viewId, renderer, tView, template, context, flags) {\n var newView = {\n parent: currentView,\n id: viewId,\n // -1 for component views\n flags: flags | 1 /* CreationMode */ | 8 /* Attached */,\n node: (null),\n // until we initialize it in createNode.\n data: [],\n directives: null,\n tView: tView,\n cleanup: null,\n renderer: renderer,\n child: null,\n tail: null,\n next: null,\n bindingStartIndex: -1,\n bindingIndex: -1,\n template: template,\n context: context,\n dynamicViewCount: 0,\n lifecycleStage: 1 /* Init */,\n queries: null,\n injector: currentView && currentView.injector,\n };\n return newView;\n}\n/**\n * Creation of LNode object is extracted to a separate function so we always create LNode object\n * with the same shape\n * (same properties assigned in the same order).\n */\nfunction createLNodeObject(type, currentView, parent, native, state, queries) {\n return {\n type: type,\n native: native,\n view: currentView,\n parent: parent,\n child: null,\n next: null,\n nodeInjector: parent ? parent.nodeInjector : null,\n data: state,\n queries: queries,\n tNode: null,\n pNextOrParent: null,\n dynamicLContainerNode: null\n };\n}\nfunction createLNode(index, type, native, state) {\n var parent = isParent ? previousOrParentNode :\n previousOrParentNode && previousOrParentNode.parent;\n var queries = (isParent ? currentQueries : previousOrParentNode && previousOrParentNode.queries) ||\n parent && parent.queries && parent.queries.child();\n var isState = state != null;\n var node = createLNodeObject(type, currentView, parent, native, isState ? state : null, queries);\n if ((type & 2 /* ViewOrElement */) === 2 /* ViewOrElement */ && isState) {\n // Bit of a hack to bust through the readonly because there is a circular dep between\n // LView and LNode.\n ngDevMode && assertNull(state.node, 'LView.node should not have been initialized');\n state.node = node;\n }\n if (index != null) {\n // We are Element or Container\n ngDevMode && assertDataNext(index);\n data[index] = node;\n // Every node adds a value to the static data array to avoid a sparse array\n if (index >= tData.length) {\n tData[index] = null;\n }\n else {\n node.tNode = tData[index];\n }\n // Now link ourselves into the tree.\n if (isParent) {\n currentQueries = null;\n if (previousOrParentNode.view === currentView ||\n previousOrParentNode.type === 2 /* View */) {\n // We are in the same view, which means we are adding content node to the parent View.\n ngDevMode && assertNull(previousOrParentNode.child, \"previousOrParentNode's child should not have been set.\");\n previousOrParentNode.child = node;\n }\n else {\n // We are adding component view, so we don't link parent node child to this node.\n }\n }\n else if (previousOrParentNode) {\n ngDevMode && assertNull(previousOrParentNode.next, \"previousOrParentNode's next property should not have been set \" + index + \".\");\n previousOrParentNode.next = node;\n if (previousOrParentNode.dynamicLContainerNode) {\n previousOrParentNode.dynamicLContainerNode.next = node;\n }\n }\n }\n previousOrParentNode = node;\n isParent = true;\n return node;\n}\n/**\n * Resets the application state.\n */\nfunction resetApplicationState() {\n isParent = false;\n previousOrParentNode = (null);\n}\n/**\n *\n * @param hostNode Existing node to render into.\n * @param template Template function with the instructions.\n * @param context to pass into the template.\n * @param providedRendererFactory renderer factory to use\n * @param host The host element node to use\n * @param directives Directive defs that should be used for matching\n * @param pipes Pipe defs that should be used for matching\n */\n\nfunction renderEmbeddedTemplate(viewNode, template, context, renderer, directives, pipes) {\n var _isParent = isParent;\n var _previousOrParentNode = previousOrParentNode;\n var oldView;\n try {\n isParent = true;\n previousOrParentNode = (null);\n var rf = 2;\n if (viewNode == null) {\n var tView = getOrCreateTView(template, directives || null, pipes || null);\n var lView = createLView(-1, renderer, tView, template, context, 2 /* CheckAlways */);\n viewNode = createLNode(null, 2 /* View */, null, lView);\n rf = 1 /* Create */;\n }\n oldView = enterView(viewNode.data, viewNode);\n template(rf, context);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView((oldView));\n isParent = _isParent;\n previousOrParentNode = _previousOrParentNode;\n }\n return viewNode;\n}\nfunction renderComponentOrTemplate(node, hostView, componentOrContext, template) {\n var oldView = enterView(hostView, node);\n try {\n if (rendererFactory.begin) {\n rendererFactory.begin();\n }\n if (template) {\n template(getRenderFlags(hostView), (componentOrContext));\n refreshDynamicChildren();\n refreshDirectives();\n }\n else {\n executeInitAndContentHooks();\n // Element was stored at 0 in data and directive was stored at 0 in directives\n // in renderComponent()\n setHostBindings(_ROOT_DIRECTIVE_INDICES);\n componentRefresh(0, 0);\n }\n }\n finally {\n if (rendererFactory.end) {\n rendererFactory.end();\n }\n leaveView(oldView);\n }\n}\n/**\n * This function returns the default configuration of rendering flags depending on when the\n * template is in creation mode or update mode. By default, the update block is run with the\n * creation block when the view is in creation mode. Otherwise, the update block is run\n * alone.\n *\n * Dynamically created views do NOT use this configuration (update block and create block are\n * always run separately).\n */\nfunction getRenderFlags(view) {\n return view.flags & 1 /* CreationMode */ ? 1 /* Create */ | 2 /* Update */ :\n 2 /* Update */;\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 data array\n * @param name Name of the DOM Node\n * @param attrs Statically bound set of attributes to be written into the DOM element on creation.\n * @param localRefs A set of local reference bindings on the element.\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 */\nfunction elementStart(index, name, attrs, localRefs) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'elements should be created before any bindings');\n var native = renderer.createElement(name);\n var node = createLNode(index, 3 /* Element */, (native), null);\n if (attrs)\n setUpAttributes(native, attrs);\n appendChild((node.parent), native, currentView);\n createDirectivesAndLocals(index, name, attrs, localRefs, null);\n return native;\n}\nfunction createDirectivesAndLocals(index, name, attrs, localRefs, containerData) {\n var node = previousOrParentNode;\n if (firstTemplatePass) {\n ngDevMode && assertDataInRange(index - 1);\n node.tNode = tData[index] = createTNode(name, attrs || null, containerData);\n cacheMatchingDirectivesForNode(node.tNode, currentView.tView, localRefs || null);\n }\n else {\n instantiateDirectivesDirectly();\n }\n saveResolvedLocalsInData();\n}\n/**\n * On first template pass, we match each node against available directive selectors and save\n * the resulting defs in the correct instantiation order for subsequent change detection runs\n * (so dependencies are always created before the directives that inject them).\n */\nfunction cacheMatchingDirectivesForNode(tNode, tView, localRefs) {\n // Please make sure to have explicit type for `exportsMap`. Inferred type triggers bug in tsickle.\n var exportsMap = localRefs ? { '': -1 } : null;\n var matches = tView.currentMatches = findDirectiveMatches(tNode);\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n var valueIndex = i + 1;\n resolveDirective(def, valueIndex, matches, tView);\n saveNameToExportMap(matches[valueIndex], def, exportsMap);\n }\n }\n if (exportsMap)\n cacheMatchingLocalNames(tNode, localRefs, exportsMap);\n}\n/** Matches the current node against all available selectors. */\nfunction findDirectiveMatches(tNode) {\n var registry = currentView.tView.directiveRegistry;\n var matches = null;\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var def = registry[i];\n if (isNodeMatchingSelectorList(tNode, (def.selectors))) {\n if (def.template) {\n if (tNode.flags & 4096 /* isComponent */)\n throwMultipleComponentError(tNode);\n tNode.flags = 4096 /* isComponent */;\n }\n if (def.diPublic)\n def.diPublic(def);\n (matches || (matches = [])).push(def, null);\n }\n }\n }\n return matches;\n}\nfunction resolveDirective(def, valueIndex, matches, tView) {\n if (matches[valueIndex] === null) {\n matches[valueIndex] = CIRCULAR$2;\n var instance = def.factory();\n (tView.directives || (tView.directives = [])).push(def);\n return directiveCreate(matches[valueIndex] = tView.directives.length - 1, instance, def);\n }\n else if (matches[valueIndex] === CIRCULAR$2) {\n // If we revisit this directive before it's resolved, we know it's circular\n throwCyclicDependencyError(def.type);\n }\n return null;\n}\n/** Stores index of component's host element so it will be queued for view refresh during CD. */\nfunction queueComponentIndexForCheck(dirIndex) {\n if (firstTemplatePass) {\n (currentView.tView.components || (currentView.tView.components = [])).push(dirIndex, data.length - 1);\n }\n}\n/** Stores index of directive and host element so it will be queued for binding refresh during CD.\n */\nfunction queueHostBindingForCheck(dirIndex) {\n ngDevMode &&\n assertEqual(firstTemplatePass, true, 'Should only be called in first template pass.');\n (currentView.tView.hostBindings || (currentView.tView.hostBindings = [])).push(dirIndex, data.length - 1);\n}\n/** Sets the context for a ChangeDetectorRef to the given instance. */\nfunction initChangeDetectorIfExisting(injector, instance, view) {\n if (injector && injector.changeDetectorRef != null) {\n injector.changeDetectorRef._setComponentContext(view, instance);\n }\n}\nfunction isComponent(tNode) {\n return (tNode.flags & 4096 /* isComponent */) === 4096 /* isComponent */;\n}\n/**\n * This function instantiates the given directives.\n */\nfunction instantiateDirectivesDirectly() {\n var tNode = (previousOrParentNode.tNode);\n var count = tNode.flags & 4095;\n if (count > 0) {\n var start = tNode.flags >> 13;\n var end = start + count;\n var tDirectives = (currentView.tView.directives);\n for (var i = start; i < end; i++) {\n var def = tDirectives[i];\n directiveCreate(i, def.factory(), def);\n }\n }\n}\n/** Caches local names and their matching directive indices for query and template lookups. */\nfunction cacheMatchingLocalNames(tNode, localRefs, exportsMap) {\n if (localRefs) {\n var localNames = tNode.localNames = [];\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 (var i = 0; i < localRefs.length; i += 2) {\n var 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 exportsMap[def.exportAs] = index;\n if (def.template)\n exportsMap[''] = index;\n }\n}\n/**\n * Takes a list of local names and indices and pushes the resolved local variable values\n * to data[] in the same order as they are loaded in the template with load().\n */\nfunction saveResolvedLocalsInData() {\n var localNames = previousOrParentNode.tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n var index = localNames[i + 1];\n var value = index === -1 ? previousOrParentNode.native : directives[index];\n data.push(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 template The template from which to get static data\n * @param directives Directive defs that should be saved on TView\n * @param pipes Pipe defs that should be saved on TView\n * @returns TView\n */\nfunction getOrCreateTView(template, directives, pipes) {\n return template.ngPrivateData ||\n (template.ngPrivateData = createTView(directives, pipes));\n}\n/** Creates a TView instance */\nfunction createTView(defs, pipes) {\n return {\n data: [],\n directives: null,\n firstTemplatePass: true,\n initHooks: null,\n checkHooks: null,\n contentHooks: null,\n contentCheckHooks: null,\n viewHooks: null,\n viewCheckHooks: null,\n destroyHooks: null,\n pipeDestroyHooks: null,\n hostBindings: null,\n components: null,\n directiveRegistry: typeof defs === 'function' ? defs() : defs,\n pipeRegistry: typeof pipes === 'function' ? pipes() : pipes,\n currentMatches: null\n };\n}\nfunction setUpAttributes(native, attrs) {\n ngDevMode && assertEqual(attrs.length % 2, 0, 'each attribute should have a key and a value');\n var isProc = isProceduralRenderer(renderer);\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n if (attrName !== NG_PROJECT_AS_ATTR_NAME) {\n var attrVal = attrs[i + 1];\n isProc ? renderer.setAttribute(native, attrName, attrVal) :\n native.setAttribute(attrName, attrVal);\n }\n }\n}\nfunction createError(text, token) {\n return new Error(\"Renderer: \" + text + \" [\" + stringify$1(token) + \"]\");\n}\n/**\n * Locates the host native element, used for bootstrapping existing nodes into rendering pipeline.\n *\n * @param elementOrSelector Render element or CSS selector to locate the element.\n */\nfunction locateHostElement(factory, elementOrSelector) {\n ngDevMode && assertDataInRange(-1);\n rendererFactory = factory;\n var defaultRenderer = factory.createRenderer(null, null);\n var rNode = typeof elementOrSelector === 'string' ?\n (isProceduralRenderer(defaultRenderer) ?\n defaultRenderer.selectRootElement(elementOrSelector) :\n defaultRenderer.querySelector(elementOrSelector)) :\n elementOrSelector;\n if (ngDevMode && !rNode) {\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 return rNode;\n}\n/**\n * Creates the host LNode.\n *\n * @param rNode Render host element.\n * @param def ComponentDef\n *\n * @returns LElementNode created\n */\nfunction hostElement(tag, rNode, def) {\n resetApplicationState();\n var node = createLNode(0, 3 /* Element */, rNode, createLView(-1, renderer, getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs), null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n if (firstTemplatePass) {\n node.tNode = createTNode(tag, null, null);\n node.tNode.flags = 4096 /* isComponent */;\n if (def.diPublic)\n def.diPublic(def);\n currentView.tView.directives = [def];\n }\n return node;\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 */\nfunction listener(eventName, listenerFn, useCapture) {\n if (useCapture === void 0) { useCapture = false; }\n ngDevMode && assertPreviousIsParent();\n var node = previousOrParentNode;\n var native = node.native;\n // In order to match current behavior, native DOM event listeners must be added for all\n // events (including outputs).\n var cleanupFns = cleanup || (cleanup = currentView.cleanup = []);\n if (isProceduralRenderer(renderer)) {\n var wrappedListener = wrapListenerWithDirtyLogic(currentView, listenerFn);\n var cleanupFn = renderer.listen(native, eventName, wrappedListener);\n cleanupFns.push(cleanupFn, null);\n }\n else {\n var wrappedListener = wrapListenerWithDirtyAndDefault(currentView, listenerFn);\n native.addEventListener(eventName, wrappedListener, useCapture);\n cleanupFns.push(eventName, native, wrappedListener, useCapture);\n }\n var tNode = (node.tNode);\n if (tNode.outputs === undefined) {\n // if we create TNode here, inputs must be undefined so we know they still need to be\n // checked\n tNode.outputs = generatePropertyAliases(node.tNode.flags, 1 /* Output */);\n }\n var outputs = tNode.outputs;\n var outputData;\n if (outputs && (outputData = outputs[eventName])) {\n createOutput(outputData, listenerFn);\n }\n}\n/**\n * Iterates through the outputs associated with a particular event name and subscribes to\n * each output.\n */\nfunction createOutput(outputs, listener) {\n for (var i = 0; i < outputs.length; i += 2) {\n ngDevMode && assertDataInRange(outputs[i], (directives));\n var subscription = directives[outputs[i]][outputs[i + 1]].subscribe(listener);\n cleanup.push(subscription.unsubscribe, subscription);\n }\n}\n/** Mark the end of the element. */\nfunction elementEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertHasParent();\n previousOrParentNode = (previousOrParentNode.parent);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 3 /* Element */);\n var queries = previousOrParentNode.queries;\n queries && queries.addNode(previousOrParentNode);\n queueLifecycleHooks(previousOrParentNode.tNode.flags, currentView);\n}\n/**\n * Updates the value of removes an attribute on an Element.\n *\n * @param number index The index of the element in the data array\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 */\nfunction elementAttribute(index, name, value, sanitizer) {\n if (value !== NO_CHANGE) {\n var element = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ? renderer.removeAttribute(element.native, name) :\n element.native.removeAttribute(name);\n }\n else {\n var strValue = sanitizer == null ? stringify$1(value) : sanitizer(value);\n isProceduralRenderer(renderer) ? renderer.setAttribute(element.native, name, strValue) :\n element.native.setAttribute(name, strValue);\n }\n }\n}\n/**\n * Update a property on an Element.\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 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 */\nfunction elementProperty(index, propName, value, sanitizer) {\n if (value === NO_CHANGE)\n return;\n var node = data[index];\n var tNode = (node.tNode);\n // if tNode.inputs is undefined, a listener has created outputs, but inputs haven't\n // yet been checked\n if (tNode && tNode.inputs === undefined) {\n // mark inputs as checked\n tNode.inputs = generatePropertyAliases(node.tNode.flags, 0 /* Input */);\n }\n var inputData = tNode && tNode.inputs;\n var dataValue;\n if (inputData && (dataValue = inputData[propName])) {\n setInputsForProperty(dataValue, value);\n markDirtyIfOnPush(node);\n }\n else {\n // It is assumed that the sanitizer is only added when the compiler determines that the property\n // is risky, so sanitization can be done without further checks.\n value = sanitizer != null ? sanitizer(value) : value;\n var native = node.native;\n isProceduralRenderer(renderer) ? renderer.setProperty(native, propName, value) :\n (native.setProperty ? native.setProperty(propName, value) :\n native[propName] = value);\n }\n}\n/**\n * Constructs a TNode object from the arguments.\n *\n * @param tagName\n * @param attrs\n * @param data\n * @param localNames A list of local names and their matching indices\n * @returns the TNode object\n */\nfunction createTNode(tagName, attrs, data) {\n return {\n flags: 0,\n tagName: tagName,\n attrs: attrs,\n localNames: null,\n initialInputs: undefined,\n inputs: undefined,\n outputs: undefined,\n data: data\n };\n}\n/**\n * Given a list of directive indices and minified input names, sets the\n * input properties on the corresponding directives.\n */\nfunction setInputsForProperty(inputs, value) {\n for (var i = 0; i < inputs.length; i += 2) {\n ngDevMode && assertDataInRange(inputs[i], (directives));\n directives[inputs[i]][inputs[i + 1]] = value;\n }\n}\n/**\n * Consolidates all inputs or outputs of all directives on this logical node.\n *\n * @param number lNodeFlags logical node flags\n * @param Direction direction whether to consider inputs or outputs\n * @returns PropertyAliases|null aggregate of all properties if any, `null` otherwise\n */\nfunction generatePropertyAliases(tNodeFlags, direction) {\n var count = tNodeFlags & 4095;\n var propStore = null;\n if (count > 0) {\n var start = tNodeFlags >> 13;\n var end = start + count;\n var isInput = direction === 0;\n var defs = (currentView.tView.directives);\n for (var i = start; i < end; i++) {\n var directiveDef = defs[i];\n var propertyAliasMap = isInput ? directiveDef.inputs : directiveDef.outputs;\n for (var publicName in propertyAliasMap) {\n if (propertyAliasMap.hasOwnProperty(publicName)) {\n propStore = propStore || {};\n var internalName = propertyAliasMap[publicName];\n var hasProperty = propStore.hasOwnProperty(publicName);\n hasProperty ? propStore[publicName].push(i, internalName) :\n (propStore[publicName] = [i, internalName]);\n }\n }\n }\n }\n return propStore;\n}\n/**\n * Add or remove a class in a `classList` on a DOM element.\n *\n * This instruction is meant to handle the [class.foo]=\"exp\" case\n *\n * @param index The index of the element to update in the data array\n * @param className Name of class to toggle. Because it is going to DOM, this is not subject to\n * renaming as part of minification.\n * @param value A value indicating if a given class should be added or removed.\n */\nfunction elementClassNamed(index, className, value) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value) {\n isProceduralRenderer(renderer) ? renderer.addClass(lElement.native, className) :\n lElement.native.classList.add(className);\n }\n else {\n isProceduralRenderer(renderer) ? renderer.removeClass(lElement.native, className) :\n lElement.native.classList.remove(className);\n }\n }\n}\n/**\n * Set the `className` property on a DOM element.\n *\n * This instruction is meant to handle the `[class]=\"exp\"` usage.\n *\n * `elementClass` instruction writes the value to the \"element's\" `className` property.\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating a set of classes which should be applied. The method overrides\n * any existing classes. The value is stringified (`toString`) before it is applied to the\n * element.\n */\nfunction elementClass(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `className`. In the\n // future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n isProceduralRenderer(renderer) ? renderer.setProperty(lElement.native, 'className', value) :\n lElement.native['className'] = stringify$1(value);\n }\n}\nfunction elementStyleNamed(index, styleName, value, suffixOrSanitizer) {\n if (value !== NO_CHANGE) {\n var lElement = data[index];\n if (value == null) {\n isProceduralRenderer(renderer) ?\n renderer.removeStyle(lElement.native, styleName, RendererStyleFlags3.DashCase) :\n lElement.native['style'].removeProperty(styleName);\n }\n else {\n var strValue = typeof suffixOrSanitizer == 'function' ? suffixOrSanitizer(value) : stringify$1(value);\n if (typeof suffixOrSanitizer == 'string')\n strValue = strValue + suffixOrSanitizer;\n isProceduralRenderer(renderer) ?\n renderer.setStyle(lElement.native, styleName, strValue, RendererStyleFlags3.DashCase) :\n lElement.native['style'].setProperty(styleName, strValue);\n }\n }\n}\n/**\n * Set the `style` property on a DOM element.\n *\n * This instruction is meant to handle the `[style]=\"exp\"` usage.\n *\n *\n * @param index The index of the element to update in the data array\n * @param value A value indicating if a given style should be added or removed.\n * The expected shape of `value` is an object where keys are style names and the values\n * are their corresponding values to set. If value is falsy than the style is remove. An absence\n * of style does not cause that style to be removed. `NO_CHANGE` implies that no update should be\n * performed.\n */\nfunction elementStyle(index, value) {\n if (value !== NO_CHANGE) {\n // TODO: This is a naive implementation which simply writes value to the `style`. In the future\n // we will add logic here which would work with the animation code.\n var lElement = data[index];\n if (isProceduralRenderer(renderer)) {\n renderer.setProperty(lElement.native, 'style', value);\n }\n else {\n var style = lElement.native['style'];\n for (var i = 0, keys = Object.keys(value); i < keys.length; i++) {\n var styleName = keys[i];\n var styleValue = value[styleName];\n styleValue == null ? style.removeProperty(styleName) :\n style.setProperty(styleName, styleValue);\n }\n }\n }\n}\n/**\n * Create static text node\n *\n * @param index Index of the node in the data array.\n * @param value Value to write. This value will be stringified.\n * If value is not provided than the actual creation of the text node is delayed.\n */\nfunction text(index, value) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'text nodes should be created before bindings');\n var textNode = value != null ? createTextNode(value, renderer) : null;\n var node = createLNode(index, 3 /* Element */, textNode);\n // Text nodes are self closing.\n isParent = false;\n appendChild((node.parent), textNode, currentView);\n}\n/**\n * Create text node with binding\n * Bindings should be handled externally with the proper bind(1-8) method\n *\n * @param index Index of the node in the data array.\n * @param value Stringified value to write.\n */\nfunction textBinding(index, value) {\n ngDevMode && assertDataInRange(index);\n var existingNode = data[index];\n ngDevMode && assertNotNull(existingNode, 'existing node');\n if (existingNode.native) {\n // If DOM node exists and value changed, update textContent\n value !== NO_CHANGE &&\n (isProceduralRenderer(renderer) ? renderer.setValue(existingNode.native, stringify$1(value)) :\n existingNode.native.textContent = stringify$1(value));\n }\n else {\n // Node was created but DOM node creation was delayed. Create and append now.\n existingNode.native = createTextNode(value, renderer);\n insertChild(existingNode, currentView);\n }\n}\n/**\n * Create a directive.\n *\n * NOTE: directives can be created in order other than the index order. They can also\n * be retrieved before they are created in which case the value will be null.\n *\n * @param directive The directive instance.\n * @param directiveDef DirectiveDef object which contains information about the template.\n */\nfunction directiveCreate(index, directive, directiveDef) {\n var instance = baseDirectiveCreate(index, directive, directiveDef);\n ngDevMode && assertNotNull(previousOrParentNode.tNode, 'previousOrParentNode.tNode');\n var tNode = previousOrParentNode.tNode;\n var isComponent = directiveDef.template;\n if (isComponent) {\n addComponentLogic(index, directive, directiveDef);\n }\n if (firstTemplatePass) {\n // Init hooks are queued now so ngOnInit is called in host components before\n // any projected components.\n queueInitHooks(index, directiveDef.onInit, directiveDef.doCheck, currentView.tView);\n if (directiveDef.hostBindings)\n queueHostBindingForCheck(index);\n }\n if (tNode && tNode.attrs) {\n setInputsFromAttrs(index, instance, directiveDef.inputs, tNode);\n }\n return instance;\n}\nfunction addComponentLogic(index, instance, def) {\n var tView = getOrCreateTView(def.template, def.directiveDefs, def.pipeDefs);\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 var hostView = addToViewTree(currentView, createLView(-1, rendererFactory.createRenderer(previousOrParentNode.native, def.rendererType), tView, null, null, def.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */));\n previousOrParentNode.data = hostView;\n hostView.node = previousOrParentNode;\n initChangeDetectorIfExisting(previousOrParentNode.nodeInjector, instance, hostView);\n if (firstTemplatePass)\n queueComponentIndexForCheck(index);\n}\n/**\n * A lighter version of directiveCreate() that is used for the root component\n *\n * This version does not contain features that we don't already support at root in\n * current Angular. Example: local refs and inputs on root component.\n */\nfunction baseDirectiveCreate(index, directive, directiveDef) {\n ngDevMode &&\n assertEqual(currentView.bindingStartIndex, -1, 'directives should be created before any bindings');\n ngDevMode && assertPreviousIsParent();\n Object.defineProperty(directive, NG_HOST_SYMBOL, { enumerable: false, value: previousOrParentNode });\n if (directives == null)\n currentView.directives = directives = [];\n ngDevMode && assertDataNext(index, directives);\n directives[index] = directive;\n if (firstTemplatePass) {\n var flags = previousOrParentNode.tNode.flags;\n if ((flags & 4095 /* DirectiveCountMask */) === 0) {\n // When the first directive is created:\n // - save the index,\n // - set the number of directives to 1\n // When the first directive is created:\n // - save the index,\n // - set the number of directives to 1\n previousOrParentNode.tNode.flags =\n index << 13 /* DirectiveStartingIndexShift */ | flags & 4096 /* isComponent */ | 1;\n }\n else {\n // Only need to bump the size when subsequent directives are created\n ngDevMode && assertNotEqual(flags & 4095 /* DirectiveCountMask */, 4095 /* DirectiveCountMask */, 'Reached the max number of directives');\n previousOrParentNode.tNode.flags++;\n }\n }\n else {\n var diPublic = directiveDef.diPublic;\n if (diPublic)\n diPublic((directiveDef));\n }\n if (directiveDef.attributes != null && previousOrParentNode.type == 3 /* Element */) {\n setUpAttributes(previousOrParentNode.native, directiveDef.attributes);\n }\n return directive;\n}\n/**\n * Sets initial input properties on directive instances from attribute data\n *\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 inputs The list of inputs from the directive def\n * @param tNode The static data for this node\n */\nfunction setInputsFromAttrs(directiveIndex, instance, inputs, tNode) {\n var initialInputData = tNode.initialInputs;\n if (initialInputData === undefined || directiveIndex >= initialInputData.length) {\n initialInputData = generateInitialInputs(directiveIndex, inputs, tNode);\n }\n var initialInputs = initialInputData[directiveIndex];\n if (initialInputs) {\n for (var i = 0; i < initialInputs.length; i += 2) {\n instance[initialInputs[i]] = initialInputs[i + 1];\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 directiveIndex Index to store the initial input data\n * @param inputs The list of inputs from the directive def\n * @param tNode The static data on this node\n */\nfunction generateInitialInputs(directiveIndex, inputs, tNode) {\n var initialInputData = tNode.initialInputs || (tNode.initialInputs = []);\n initialInputData[directiveIndex] = null;\n var attrs = (tNode.attrs);\n for (var i = 0; i < attrs.length; i += 2) {\n var attrName = attrs[i];\n var minifiedInputName = inputs[attrName];\n if (minifiedInputName !== undefined) {\n var inputsToStore = initialInputData[directiveIndex] || (initialInputData[directiveIndex] = []);\n inputsToStore.push(minifiedInputName, attrs[i + 1]);\n }\n }\n return initialInputData;\n}\nfunction createLContainer(parentLNode, currentView, template) {\n ngDevMode && assertNotNull(parentLNode, 'containers should have a parent');\n return {\n views: [],\n nextIndex: 0,\n // If the direct parent of the container is a view, its views will need to be added\n // through insertView() when its parent view is being inserted:\n renderParent: canInsertNativeNode(parentLNode, currentView) ? parentLNode : null,\n template: template == null ? null : template,\n next: null,\n parent: currentView,\n dynamicViewCount: 0,\n queries: null\n };\n}\n/**\n * Creates an LContainerNode.\n *\n * Only `LViewNodes` can go into `LContainerNodes`.\n *\n * @param index The index of the container in the data array\n * @param template Optional inline template\n * @param tagName The name of the container element, if applicable\n * @param attrs The attrs attached to the container, if applicable\n * @param localRefs A set of local reference bindings on the element.\n */\nfunction container(index, template, tagName, attrs, localRefs) {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'container nodes should be created before any bindings');\n var currentParent = isParent ? previousOrParentNode : previousOrParentNode.parent;\n var lContainer = createLContainer(currentParent, currentView, template);\n var node = createLNode(index, 0 /* Container */, undefined, lContainer);\n // Containers are added to the current view tree instead of their embedded views\n // because views can be removed and re-inserted.\n addToViewTree(currentView, node.data);\n createDirectivesAndLocals(index, tagName || null, attrs, localRefs, []);\n isParent = false;\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var queries = node.queries;\n if (queries) {\n // check if a given container node matches\n queries.addNode(node);\n // prepare place for matching nodes from views inserted into a given container\n lContainer.queries = queries.container();\n }\n}\n/**\n * Sets a container up to receive views.\n *\n * @param index The index of the container in the data array\n */\nfunction containerRefreshStart(index) {\n ngDevMode && assertDataInRange(index);\n previousOrParentNode = data[index];\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n isParent = true;\n previousOrParentNode.data.nextIndex = 0;\n ngDevMode && assertSame(previousOrParentNode.native, undefined, \"the container's native element should not have been set yet.\");\n if (!checkNoChangesMode) {\n // We need to execute init hooks here so ngOnInit hooks are called in top level views\n // before they are called in embedded views (for backwards compatibility).\n executeInitHooks(currentView, currentView.tView, creationMode);\n }\n}\n/**\n * Marks the end of the LContainerNode.\n *\n * Marking the end of LContainerNode is the time when to child Views get inserted or removed.\n */\nfunction containerRefreshEnd() {\n if (isParent) {\n isParent = false;\n }\n else {\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n ngDevMode && assertHasParent();\n previousOrParentNode = (previousOrParentNode.parent);\n }\n ngDevMode && assertNodeType(previousOrParentNode, 0 /* Container */);\n var container = previousOrParentNode;\n container.native = undefined;\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var nextIndex = container.data.nextIndex;\n // remove extra views at the end of the container\n while (nextIndex < container.data.views.length) {\n removeView(container, nextIndex);\n }\n}\nfunction refreshDynamicChildren() {\n for (var current = currentView.child; current !== null; current = current.next) {\n if (current.dynamicViewCount !== 0 && current.views) {\n var container_1 = current;\n for (var i = 0; i < container_1.views.length; i++) {\n var view = container_1.views[i];\n // The directives and pipes are not needed here as an existing view is only being refreshed.\n renderEmbeddedTemplate(view, (view.data.template), (view.data.context), renderer);\n }\n }\n }\n}\n/**\n * Looks for a view with a given view block id inside a provided LContainer.\n * Removes views that need to be deleted in the process.\n *\n * @param containerNode where to search for views\n * @param startIdx starting index in the views array to search from\n * @param viewBlockId exact view block id to look for\n * @returns index of a found view or -1 if not found\n */\nfunction scanForView(containerNode, startIdx, viewBlockId) {\n var views = containerNode.data.views;\n for (var i = startIdx; i < views.length; i++) {\n var viewAtPositionId = views[i].data.id;\n if (viewAtPositionId === viewBlockId) {\n return views[i];\n }\n else if (viewAtPositionId < viewBlockId) {\n // found a view that should not be at this position - remove\n removeView(containerNode, i);\n }\n else {\n // found a view with id grater than the one we are searching for\n // which means that required view doesn't exist and can't be found at\n // later positions in the views array - stop the search here\n break;\n }\n }\n return null;\n}\n/**\n * Marks the start of an embedded view.\n *\n * @param viewBlockId The ID of this view\n * @return boolean Whether or not this view is in creation mode\n */\nfunction embeddedViewStart(viewBlockId) {\n var container = (isParent ? previousOrParentNode : previousOrParentNode.parent);\n ngDevMode && assertNodeType(container, 0 /* Container */);\n var lContainer = container.data;\n var viewNode = scanForView(container, lContainer.nextIndex, viewBlockId);\n if (viewNode) {\n previousOrParentNode = viewNode;\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n isParent = true;\n enterView(viewNode.data, viewNode);\n }\n else {\n // When we create a new LView, we always reset the state of the instructions.\n var newView = createLView(viewBlockId, renderer, getOrCreateEmbeddedTView(viewBlockId, container), null, null, 2 /* CheckAlways */);\n if (lContainer.queries) {\n newView.queries = lContainer.queries.enterView(lContainer.nextIndex);\n }\n enterView(newView, viewNode = createLNode(null, 2 /* View */, null, newView));\n }\n return getRenderFlags(viewNode.data);\n}\n/**\n * Initialize the TView (e.g. static data) for the active embedded view.\n *\n * Each embedded view needs to set the global tData variable to the static data for\n * that view. Otherwise, the view's static data for a particular node would overwrite\n * the static data for a node in the view above it with the same index (since it's in the\n * same template).\n *\n * @param viewIndex The index of the TView in TContainer\n * @param parent The parent container in which to look for the view's static data\n * @returns TView\n */\nfunction getOrCreateEmbeddedTView(viewIndex, parent) {\n ngDevMode && assertNodeType(parent, 0 /* Container */);\n var tContainer = parent.tNode.data;\n if (viewIndex >= tContainer.length || tContainer[viewIndex] == null) {\n var tView = currentView.tView;\n tContainer[viewIndex] = createTView(tView.directiveRegistry, tView.pipeRegistry);\n }\n return tContainer[viewIndex];\n}\n/** Marks the end of an embedded view. */\nfunction embeddedViewEnd() {\n refreshDirectives();\n isParent = false;\n var viewNode = previousOrParentNode = currentView.node;\n var containerNode = previousOrParentNode.parent;\n if (containerNode) {\n ngDevMode && assertNodeType(viewNode, 2 /* View */);\n ngDevMode && assertNodeType(containerNode, 0 /* Container */);\n var lContainer = containerNode.data;\n if (creationMode) {\n // When projected nodes are going to be inserted, the renderParent of the dynamic container\n // used by the ViewContainerRef must be set.\n setRenderParentInProjectedNodes(lContainer.renderParent, viewNode);\n // it is a new view, insert it into collection of views for a given container\n insertView(containerNode, viewNode, lContainer.nextIndex);\n }\n lContainer.nextIndex++;\n }\n leaveView((currentView.parent));\n ngDevMode && assertEqual(isParent, false, 'isParent');\n ngDevMode && assertNodeType(previousOrParentNode, 2 /* View */);\n}\n/**\n * For nodes which are projected inside an embedded view, this function sets the renderParent\n * of their dynamic LContainerNode.\n * @param renderParent the renderParent of the LContainer which contains the embedded view.\n * @param viewNode the embedded view.\n */\nfunction setRenderParentInProjectedNodes(renderParent, viewNode) {\n if (renderParent != null) {\n var node = viewNode.child;\n while (node) {\n if (node.type === 1 /* Projection */) {\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n if (nodeToProject.dynamicLContainerNode) {\n nodeToProject.dynamicLContainerNode.data.renderParent = renderParent;\n }\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n node = node.next;\n }\n }\n}\n/**\n * Refreshes components by entering the component view and processing its bindings, queries, etc.\n *\n * @param directiveIndex\n * @param elementIndex\n */\nfunction componentRefresh(directiveIndex, elementIndex) {\n ngDevMode && assertDataInRange(elementIndex);\n var element = data[elementIndex];\n ngDevMode && assertNodeType(element, 3 /* Element */);\n ngDevMode && assertNotNull(element.data, \"Component's host node should have an LView attached.\");\n var hostView = (element.data);\n // Only attached CheckAlways components or attached, dirty OnPush components should be checked\n if (viewAttached(hostView) && hostView.flags & (2 /* CheckAlways */ | 4 /* Dirty */)) {\n ngDevMode && assertDataInRange(directiveIndex, (directives));\n var def = currentView.tView.directives[directiveIndex];\n detectChangesInternal(hostView, element, def, getDirectiveInstance(directives[directiveIndex]));\n }\n}\n/** Returns a boolean for whether the view is attached */\nfunction viewAttached(view) {\n return (view.flags & 8 /* Attached */) === 8 /* Attached */;\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 selectors A collection of parsed CSS selectors\n * @param rawSelectors A collection of CSS selectors in the raw, un-parsed form\n */\nfunction projectionDef(index, selectors, textSelectors) {\n var noOfNodeBuckets = selectors ? selectors.length + 1 : 1;\n var distributedNodes = new Array(noOfNodeBuckets);\n for (var i = 0; i < noOfNodeBuckets; i++) {\n distributedNodes[i] = [];\n }\n var componentNode = findComponentHost(currentView);\n var componentChild = componentNode.child;\n while (componentChild !== null) {\n // execute selector matching logic if and only if:\n // - there are selectors defined\n // - a node has a tag name / attributes that can be matched\n if (selectors && componentChild.tNode) {\n var matchedIdx = matchingSelectorIndex(componentChild.tNode, selectors, (textSelectors));\n distributedNodes[matchedIdx].push(componentChild);\n }\n else {\n distributedNodes[0].push(componentChild);\n }\n componentChild = componentChild.next;\n }\n ngDevMode && assertDataNext(index);\n data[index] = distributedNodes;\n}\n/**\n * Updates the linked list of a projection node, by appending another linked list.\n *\n * @param projectionNode Projection node whose projected nodes linked list has to be updated\n * @param appendedFirst First node of the linked list to append.\n * @param appendedLast Last node of the linked list to append.\n */\nfunction appendToProjectionNode(projectionNode, appendedFirst, appendedLast) {\n ngDevMode && assertEqual(!!appendedFirst, !!appendedLast, 'appendedFirst can be null if and only if appendedLast is also null');\n if (!appendedLast) {\n // nothing to append\n return;\n }\n var projectionNodeData = projectionNode.data;\n if (projectionNodeData.tail) {\n projectionNodeData.tail.pNextOrParent = appendedFirst;\n }\n else {\n projectionNodeData.head = appendedFirst;\n }\n projectionNodeData.tail = appendedLast;\n appendedLast.pNextOrParent = projectionNode;\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 localIndex - index under which distribution of projected nodes was memorized\n * @param selectorIndex - 0 means <ng-content> without any selector\n * @param attrs - attributes attached to the ng-content node, if present\n */\nfunction projection(nodeIndex, localIndex, selectorIndex, attrs) {\n if (selectorIndex === void 0) { selectorIndex = 0; }\n var node = createLNode(nodeIndex, 1 /* Projection */, null, { head: null, tail: null });\n if (node.tNode == null) {\n node.tNode = createTNode(null, attrs || null, null);\n }\n isParent = false; // self closing\n var currentParent = node.parent;\n // re-distribution of projectable nodes is memorized on a component's view level\n var componentNode = findComponentHost(currentView);\n // make sure that nodes to project were memorized\n var nodesForSelector = componentNode.data.data[localIndex][selectorIndex];\n // build the linked list of projected nodes:\n for (var i = 0; i < nodesForSelector.length; i++) {\n var nodeToProject = nodesForSelector[i];\n if (nodeToProject.type === 1 /* Projection */) {\n var previouslyProjected = nodeToProject.data;\n appendToProjectionNode(node, previouslyProjected.head, previouslyProjected.tail);\n }\n else {\n appendToProjectionNode(node, nodeToProject, nodeToProject);\n }\n }\n if (canInsertNativeNode(currentParent, currentView)) {\n ngDevMode && assertNodeType(currentParent, 3 /* Element */);\n // process each node in the list of projected nodes:\n var nodeToProject = node.data.head;\n var lastNodeToProject = node.data.tail;\n while (nodeToProject) {\n appendProjectedNode(nodeToProject, currentParent, currentView);\n nodeToProject = nodeToProject === lastNodeToProject ? null : nodeToProject.pNextOrParent;\n }\n }\n}\n/**\n * Given a current view, finds the nearest component's host (LElement).\n *\n * @param lView LView for which we want a host element node\n * @returns The host node\n */\nfunction findComponentHost(lView) {\n var viewRootLNode = lView.node;\n while (viewRootLNode.type === 2 /* View */) {\n ngDevMode && assertNotNull(lView.parent, 'lView.parent');\n lView = (lView.parent);\n viewRootLNode = lView.node;\n }\n ngDevMode && assertNodeType(viewRootLNode, 3 /* Element */);\n ngDevMode && assertNotNull(viewRootLNode.data, 'node.data');\n return viewRootLNode;\n}\n/**\n * Adds a LView or a 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 currentView The view where LView or LContainer should be added\n * @param state The LView or LContainer to add to the view tree\n * @returns The state passed in\n */\nfunction addToViewTree(currentView, state) {\n currentView.tail ? (currentView.tail.next = state) : (currentView.child = state);\n currentView.tail = state;\n return state;\n}\n/** If node is an OnPush component, marks its LView dirty. */\nfunction markDirtyIfOnPush(node) {\n // Because data flows down the component tree, ancestors do not need to be marked dirty\n if (node.data && !(node.data.flags & 2 /* CheckAlways */)) {\n node.data.flags |= 4 /* Dirty */;\n }\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Necessary to support OnPush components.\n */\nfunction wrapListenerWithDirtyLogic(view, listenerFn) {\n return function (e) {\n markViewDirty(view);\n return listenerFn(e);\n };\n}\n/**\n * Wraps an event listener so its host view and its ancestor views will be marked dirty\n * whenever the event fires. Also wraps with preventDefault behavior.\n */\nfunction wrapListenerWithDirtyAndDefault(view, listenerFn) {\n return function wrapListenerIn_markViewDirty(e) {\n markViewDirty(view);\n if (listenerFn(e) === false) {\n e.preventDefault();\n // Necessary for legacy browsers that don't support preventDefault (e.g. IE)\n e.returnValue = false;\n }\n };\n}\n/** Marks current view and all ancestors dirty */\nfunction markViewDirty(view) {\n var currentView = view;\n while (currentView.parent != null) {\n currentView.flags |= 4 /* Dirty */;\n currentView = currentView.parent;\n }\n currentView.flags |= 4 /* Dirty */;\n ngDevMode && assertNotNull(currentView.context, 'rootContext');\n scheduleTick(currentView.context);\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) {\n if (rootContext.clean == _CLEAN_PROMISE) {\n var res_1;\n rootContext.clean = new Promise(function (r) { return res_1 = r; });\n rootContext.scheduler(function () {\n tick(rootContext.component);\n res_1(null);\n rootContext.clean = _CLEAN_PROMISE;\n });\n }\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 var rootView = getRootView(component);\n var rootComponent = rootView.context.component;\n var hostNode = _getComponentHostLElementNode(rootComponent);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n renderComponentOrTemplate(hostNode, rootView, rootComponent);\n}\n/**\n * Retrieve the root view from any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootView(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n var lView = lElementNode.view;\n while (lView.parent) {\n lView = lView.parent;\n }\n return lView;\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. There should\n * be very little reason to call this function directly since a preferred way to do change\n * detection is to {@link markDirty} the component and wait for the scheduler to call this method\n * at some future point in time. This is because a single user action often results in many\n * components being invalidated and calling change detection on each component synchronously\n * would be inefficient. It is better to wait until all components are marked as dirty and\n * then perform single change detection across all of the components\n *\n * @param component The component which the change detection should be performed on.\n */\nfunction detectChanges(component) {\n var hostNode = _getComponentHostLElementNode(component);\n ngDevMode && assertNotNull(hostNode.data, 'Component host node should be attached to an LView');\n var componentIndex = hostNode.tNode.flags >> 13;\n var def = hostNode.view.tView.directives[componentIndex];\n detectChangesInternal(hostNode.data, hostNode, def, component);\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 */\nfunction checkNoChanges(component) {\n checkNoChangesMode = true;\n try {\n detectChanges(component);\n }\n finally {\n checkNoChangesMode = false;\n }\n}\n/** Checks the view of the component provided. Does not gate on dirty checks or execute doCheck. */\nfunction detectChangesInternal(hostView, hostNode, def, component) {\n var oldView = enterView(hostView, hostNode);\n var template = def.template;\n try {\n template(getRenderFlags(hostView), component);\n refreshDirectives();\n refreshDynamicChildren();\n }\n finally {\n leaveView(oldView);\n }\n}\n/**\n * Mark the component as dirty (needing change detection).\n *\n * Marking a component dirty will schedule a change detection on this\n * component at some point in the future. Marking an already dirty\n * component as dirty is a noop. Only one outstanding change detection\n * can be scheduled per component tree. (Two components bootstrapped with\n * separate `renderComponent` will have separate schedulers)\n *\n * When the root component is bootstrapped with `renderComponent`, a scheduler\n * can be provided.\n *\n * @param component Component to mark as dirty.\n */\nfunction markDirty(component) {\n ngDevMode && assertNotNull(component, 'component');\n var lElementNode = _getComponentHostLElementNode(component);\n markViewDirty(lElementNode.view);\n}\n/** A special value which designates that a value has not changed. */\nvar NO_CHANGE = {};\n/**\n * Initializes the binding start index. Will get inlined.\n *\n * This function must be called before any binding related function is called\n * (ie `bind()`, `interpolationX()`, `pureFunctionX()`)\n */\nfunction initBindings() {\n ngDevMode && assertEqual(currentView.bindingStartIndex, -1, 'Binding start index should only be set once, when null');\n ngDevMode && assertEqual(currentView.bindingIndex, -1, 'Binding index should not yet be set ' + currentView.bindingIndex);\n currentView.bindingIndex = currentView.bindingStartIndex = data.length;\n}\n/**\n * Creates a single value binding.\n *\n * @param value Value to diff\n */\nfunction bind(value) {\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n return data[currentView.bindingIndex++] = value;\n }\n var changed = value !== NO_CHANGE && isDifferent(data[currentView.bindingIndex], value);\n if (changed) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n data[currentView.bindingIndex] = value;\n }\n currentView.bindingIndex++;\n return changed ? value : NO_CHANGE;\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(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 var different = false;\n for (var i = 1; i < values.length; i += 2) {\n // Check if bindings (odd indexes) have changed\n bindingUpdated(values[i]) && (different = true);\n }\n if (!different) {\n return NO_CHANGE;\n }\n // Build the updated content\n var content = values[0];\n for (var i = 1; i < values.length; i += 2) {\n content += stringify$1(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(prefix, v0, suffix) {\n var different = bindingUpdated(v0);\n return different ? prefix + stringify$1(v0) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation binding with 2 expressions. */\nfunction interpolation2(prefix, v0, i0, v1, suffix) {\n var different = bindingUpdated2(v0, v1);\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + suffix : NO_CHANGE;\n}\n/** Creates an interpolation bindings with 3 expressions. */\nfunction interpolation3(prefix, v0, i0, v1, i1, v2, suffix) {\n var different = bindingUpdated2(v0, v1);\n different = bindingUpdated(v2) || different;\n return different ? prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + suffix :\n NO_CHANGE;\n}\n/** Create an interpolation binding with 4 expressions. */\nfunction interpolation4(prefix, v0, i0, v1, i1, v2, i2, v3, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) +\n suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 5 expressions. */\nfunction interpolation5(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated(v4) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 6 expressions. */\nfunction interpolation6(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 7 expressions. */\nfunction interpolation7(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated2(v4, v5) || different;\n different = bindingUpdated(v6) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + suffix :\n NO_CHANGE;\n}\n/** Creates an interpolation binding with 8 expressions. */\nfunction interpolation8(prefix, v0, i0, v1, i1, v2, i2, v3, i3, v4, i4, v5, i5, v6, i6, v7, suffix) {\n var different = bindingUpdated4(v0, v1, v2, v3);\n different = bindingUpdated4(v4, v5, v6, v7) || different;\n return different ?\n prefix + stringify$1(v0) + i0 + stringify$1(v1) + i1 + stringify$1(v2) + i2 + stringify$1(v3) + i3 +\n stringify$1(v4) + i4 + stringify$1(v5) + i5 + stringify$1(v6) + i6 + stringify$1(v7) + suffix :\n NO_CHANGE;\n}\n/** Store a value in the `data` at a given `index`. */\nfunction store(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 if (index >= tData.length) {\n tData[index] = null;\n }\n data[index] = value;\n}\n/** Retrieves a value from the `data`. */\nfunction load(index) {\n ngDevMode && assertDataInRange(index);\n return data[index];\n}\n/** Retrieves a value from the `directives` array. */\nfunction loadDirective(index) {\n ngDevMode && assertNotNull(directives, 'Directives array should be defined if reading a dir.');\n ngDevMode && assertDataInRange(index, (directives));\n return directives[index];\n}\n/** Gets the current binding value and increments the binding index. */\nfunction consumeBinding() {\n ngDevMode && assertDataInRange(currentView.bindingIndex);\n ngDevMode &&\n assertNotEqual(data[currentView.bindingIndex], NO_CHANGE, 'Stored value should never be NO_CHANGE.');\n return data[currentView.bindingIndex++];\n}\n/** Updates binding if changed, then returns whether it was updated. */\nfunction bindingUpdated(value) {\n ngDevMode && assertNotEqual(value, NO_CHANGE, 'Incoming value should never be NO_CHANGE.');\n if (currentView.bindingStartIndex < 0) {\n initBindings();\n }\n else if (isDifferent(data[currentView.bindingIndex], value)) {\n throwErrorIfNoChangesMode(creationMode, checkNoChangesMode, data[currentView.bindingIndex], value);\n }\n else {\n currentView.bindingIndex++;\n return false;\n }\n data[currentView.bindingIndex++] = value;\n return true;\n}\n/** Updates binding if changed, then returns the latest value. */\nfunction checkAndUpdateBinding$1(value) {\n bindingUpdated(value);\n return value;\n}\n/** Updates 2 bindings if changed, then returns whether either was updated. */\nfunction bindingUpdated2(exp1, exp2) {\n var different = bindingUpdated(exp1);\n return bindingUpdated(exp2) || different;\n}\n/** Updates 4 bindings if changed, then returns whether any was updated. */\nfunction bindingUpdated4(exp1, exp2, exp3, exp4) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated2(exp3, exp4) || different;\n}\nfunction getTView() {\n return currentView.tView;\n}\nfunction getDirectiveInstance(instanceOrArray) {\n // Directives with content queries store an array in directives[directiveIndex]\n // with the instance as the first index\n return Array.isArray(instanceOrArray) ? instanceOrArray[0] : instanceOrArray;\n}\nfunction assertPreviousIsParent() {\n assertEqual(isParent, true, 'previousOrParentNode should be a parent');\n}\nfunction assertHasParent() {\n assertNotNull(previousOrParentNode.parent, 'previousOrParentNode should have a parent');\n}\nfunction assertDataInRange(index, arr) {\n if (arr == null)\n arr = data;\n assertLessThan(index, arr ? arr.length : 0, 'index expected to be a valid data index');\n}\nfunction assertDataNext(index, arr) {\n if (arr == null)\n arr = data;\n assertEqual(arr.length, index, \"index \" + index + \" expected to be at the end of arr (length \" + arr.length + \")\");\n}\nfunction _getComponentHostLElementNode(component) {\n ngDevMode && assertNotNull(component, 'expecting component got null');\n var lElementNode = component[NG_HOST_SYMBOL];\n ngDevMode && assertNotNull(component, 'object is not a component');\n return lElementNode;\n}\nvar CLEAN_PROMISE = _CLEAN_PROMISE;\nvar ROOT_DIRECTIVE_INDICES = _ROOT_DIRECTIVE_INDICES;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ViewRef$1 = /** @class */ (function () {\n function ViewRef(_view, context) {\n this._view = _view;\n this.context = (context);\n }\n /** @internal */\n /** @internal */\n ViewRef.prototype._setComponentContext = /** @internal */\n function (view, context) {\n this._view = view;\n this.context = context;\n };\n ViewRef.prototype.destroy = function () { };\n ViewRef.prototype.onDestroy = function (callback) { };\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\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 /**\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\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 ViewRef.prototype.markForCheck = /**\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-kx7rrw))\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 function () { markViewDirty(this._view); };\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 * ### 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 /**\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 * ### 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 ViewRef.prototype.detach = /**\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 * ### 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 function () { this._view.flags &= ~8 /* Attached */; };\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\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 /**\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\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 ViewRef.prototype.reattach = /**\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 * ### Example ([live demo](https://stackblitz.com/edit/angular-ymgsxw))\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 function () { this._view.flags |= 8 /* Attached */; };\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 * ### 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 /**\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 * ### 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 ViewRef.prototype.detectChanges = /**\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 * ### 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 function () { detectChanges(this.context); };\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 /**\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 ViewRef.prototype.checkNoChanges = /**\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 function () { checkNoChanges(this.context); };\n return ViewRef;\n}());\nvar EmbeddedViewRef$1 = /** @class */ (function (_super) {\n __extends(EmbeddedViewRef, _super);\n function EmbeddedViewRef(viewNode, template, context) {\n var _this = _super.call(this, viewNode.data, context) || this;\n _this._lViewNode = viewNode;\n return _this;\n }\n return EmbeddedViewRef;\n}(ViewRef$1));\n/**\n * Creates a ViewRef bundled with destroy functionality.\n *\n * @param context The context for this view\n * @returns The ViewRef\n */\nfunction createViewRef(view, context) {\n // TODO: add detectChanges back in when implementing ChangeDetectorRef.detectChanges\n return addDestroyable(new ViewRef$1((view), context));\n}\n/**\n * Decorates an object with destroy logic (implementing the DestroyRef interface)\n * and returns the enhanced object.\n *\n * @param obj The object to decorate\n * @returns The object with destroy logic\n */\nfunction addDestroyable(obj) {\n var destroyFn = null;\n obj.destroyed = false;\n obj.destroy = function () {\n destroyFn && destroyFn.forEach(function (fn) { return fn(); });\n this.destroyed = true;\n };\n obj.onDestroy = function (fn) { return (destroyFn || (destroyFn = [])).push(fn); };\n return obj;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Bootstraps a component, then creates and returns a `ComponentRef` for that component.\n *\n * @param componentType Component to bootstrap\n * @param options Optional parameters which control bootstrapping\n */\n\n// TODO: A hack to not pull in the NullInjector from @angular/core.\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(componentType /* Type as workaround for: Microsoft/TypeScript/issues/4881 */, opts) {\n if (opts === void 0) { opts = {}; }\n ngDevMode && assertComponentType(componentType);\n var rendererFactory = opts.rendererFactory || domRendererFactory3;\n var componentDef = componentType.ngComponentDef;\n if (componentDef.type != componentType)\n componentDef.type = componentType;\n var component;\n // The first index of the first selector is the tag name.\n var componentTag = componentDef.selectors[0][0];\n var hostNode = locateHostElement(rendererFactory, opts.host || componentTag);\n var rootContext = {\n // Incomplete initialization due to circular reference.\n component: (null),\n scheduler: opts.scheduler || requestAnimationFrame.bind(window),\n clean: CLEAN_PROMISE,\n };\n var rootView = createLView(-1, rendererFactory.createRenderer(hostNode, componentDef.rendererType), createTView(null, null), null, rootContext, componentDef.onPush ? 4 /* Dirty */ : 2 /* CheckAlways */);\n rootView.injector = opts.injector || null;\n var oldView = enterView(rootView, (null));\n var elementNode;\n try {\n if (rendererFactory.begin)\n rendererFactory.begin();\n // Create element node at index 0 in data array\n elementNode = hostElement(componentTag, hostNode, componentDef);\n // Create directive instance with factory() and store at index 0 in directives array\n component = rootContext.component = baseDirectiveCreate(0, componentDef.factory(), componentDef);\n initChangeDetectorIfExisting(elementNode.nodeInjector, component, (elementNode.data));\n opts.hostFeatures && opts.hostFeatures.forEach(function (feature) { return feature(component, componentDef); });\n executeInitAndContentHooks();\n setHostBindings(ROOT_DIRECTIVE_INDICES);\n detectChangesInternal(elementNode.data, elementNode, componentDef, component);\n }\n finally {\n leaveView(oldView);\n if (rendererFactory.end)\n rendererFactory.end();\n }\n return component;\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, {features: [RootLifecycleHooks]});\n * ```\n */\n\n/**\n * Retrieve the root context for any component by walking the parent `LView` until\n * reaching the root `LView`.\n *\n * @param component any component\n */\nfunction getRootContext(component) {\n var rootContext = getRootView(component).context;\n ngDevMode && assertNotNull(rootContext, 'rootContext');\n return rootContext;\n}\n/**\n * Retrieve the host element of the component.\n *\n * Use this function to retrieve the host element of the component. The host\n * element is the element which the component is associated with.\n *\n * @param component Component for which the host element should be retrieved.\n */\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 */\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 Inc. All Rights Reserved.\n *\n * Use of this source 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 a directive is diPublic, bloomAdd sets a property on the instance 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 */\nvar NG_ELEMENT_ID = '__NG_ELEMENT_ID__';\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 */\nvar BLOOM_SIZE = 256;\n/** Counter used to generate unique IDs for directives. */\nvar 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 injector The node injector in which the directive should be registered\n * @param type The directive to register\n */\nfunction bloomAdd(injector, type) {\n var id = type[NG_ELEMENT_ID];\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 // This means that after 255, some directives will share slots, leading to some false positives\n // when checking for a directive's presence.\n var bloomBit = id % BLOOM_SIZE;\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 var 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 if (bloomBit < 128) {\n // Then use the mask to flip on the bit (0-31) associated with the directive in that bucket\n bloomBit < 64 ? (bloomBit < 32 ? (injector.bf0 |= mask) : (injector.bf1 |= mask)) :\n (bloomBit < 96 ? (injector.bf2 |= mask) : (injector.bf3 |= mask));\n }\n else {\n bloomBit < 192 ? (bloomBit < 160 ? (injector.bf4 |= mask) : (injector.bf5 |= mask)) :\n (bloomBit < 224 ? (injector.bf6 |= mask) : (injector.bf7 |= mask));\n }\n}\nfunction getOrCreateNodeInjector() {\n ngDevMode && assertPreviousIsParent();\n return getOrCreateNodeInjectorForNode(getPreviousOrParentNode());\n}\n/**\n * Creates (or gets an existing) injector for a given element or container.\n *\n * @param node for which an injector should be retrieved / created.\n * @returns Node injector\n */\nfunction getOrCreateNodeInjectorForNode(node) {\n var nodeInjector = node.nodeInjector;\n var parentInjector = node.parent && node.parent.nodeInjector;\n if (nodeInjector != parentInjector) {\n return nodeInjector;\n }\n return node.nodeInjector = {\n parent: parentInjector,\n node: node,\n bf0: 0,\n bf1: 0,\n bf2: 0,\n bf3: 0,\n bf4: 0,\n bf5: 0,\n bf6: 0,\n bf7: 0,\n cbf0: parentInjector == null ? 0 : parentInjector.cbf0 | parentInjector.bf0,\n cbf1: parentInjector == null ? 0 : parentInjector.cbf1 | parentInjector.bf1,\n cbf2: parentInjector == null ? 0 : parentInjector.cbf2 | parentInjector.bf2,\n cbf3: parentInjector == null ? 0 : parentInjector.cbf3 | parentInjector.bf3,\n cbf4: parentInjector == null ? 0 : parentInjector.cbf4 | parentInjector.bf4,\n cbf5: parentInjector == null ? 0 : parentInjector.cbf5 | parentInjector.bf5,\n cbf6: parentInjector == null ? 0 : parentInjector.cbf6 | parentInjector.bf6,\n cbf7: parentInjector == null ? 0 : parentInjector.cbf7 | parentInjector.bf7,\n templateRef: null,\n viewContainerRef: null,\n elementRef: null,\n changeDetectorRef: null\n };\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param di The node injector in which a directive will be added\n * @param def The definition of the directive to be made public\n */\nfunction diPublicInInjector(di, def) {\n bloomAdd(di, def.type);\n}\n/**\n * Makes a directive public to the DI system by adding it to an injector's bloom filter.\n *\n * @param def The definition of the directive to be made public\n */\nfunction diPublic(def) {\n diPublicInInjector(getOrCreateNodeInjector(), def);\n}\nfunction directiveInject(token, flags) {\n if (flags === void 0) { flags = 0 /* Default */; }\n return getOrCreateInjectable(getOrCreateNodeInjector(), token, flags);\n}\n/**\n * Creates an ElementRef and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @returns The ElementRef instance to use\n */\n\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @returns The TemplateRef instance to use\n */\nfunction injectTemplateRef() {\n return getOrCreateTemplateRef(getOrCreateNodeInjector());\n}\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() {\n return getOrCreateContainerRef(getOrCreateNodeInjector());\n}\n/** Returns a ChangeDetectorRef (a.k.a. a ViewRef) */\nfunction injectChangeDetectorRef() {\n return getOrCreateChangeDetectorRef(getOrCreateNodeInjector(), null);\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.ngComponentDef = defineComponent({\n * factory: () => new MyComponent(injectAttribute('title'))\n * ...\n * })\n * ```\n *\n * @experimental\n */\nfunction injectAttribute(attrName) {\n ngDevMode && assertPreviousIsParent();\n var lElement = getPreviousOrParentNode();\n ngDevMode && assertNodeType(lElement, 3 /* Element */);\n var tElement = (lElement.tNode);\n ngDevMode && assertNotNull(tElement, 'expecting tNode');\n var attrs = tElement.attrs;\n if (attrs) {\n for (var i = 0; i < attrs.length; i = i + 2) {\n if (attrs[i] == attrName) {\n return attrs[i + 1];\n }\n }\n }\n return undefined;\n}\n/**\n * Creates a ViewRef and stores it on the injector as ChangeDetectorRef (public alias).\n * Or, if it already exists, retrieves the existing instance.\n *\n * @returns The ChangeDetectorRef to use\n */\nfunction getOrCreateChangeDetectorRef(di, context) {\n if (di.changeDetectorRef)\n return di.changeDetectorRef;\n var currentNode = di.node;\n if (isComponent((currentNode.tNode))) {\n return di.changeDetectorRef = createViewRef(currentNode.data, context);\n }\n else if (currentNode.type === 3 /* Element */) {\n return di.changeDetectorRef = getOrCreateHostChangeDetector(currentNode.view.node);\n }\n return null;\n}\n/** Gets or creates ChangeDetectorRef for the closest host component */\nfunction getOrCreateHostChangeDetector(currentNode) {\n var hostNode = getClosestComponentAncestor(currentNode);\n var hostInjector = hostNode.nodeInjector;\n var existingRef = hostInjector && hostInjector.changeDetectorRef;\n return existingRef ?\n existingRef :\n createViewRef(hostNode.data, hostNode.view\n .directives[hostNode.tNode.flags >> 13 /* DirectiveStartingIndexShift */]);\n}\n/**\n * If the node is an embedded view, traverses up the view tree to return the closest\n * ancestor view that is attached to a component. If it's already a component node,\n * returns itself.\n */\nfunction getClosestComponentAncestor(node) {\n while (node.type === 2 /* View */) {\n node = node.view.node;\n }\n return node;\n}\n/**\n * Searches for an instance of the given directive type up the injector tree and returns\n * that instance if found.\n *\n * Specifically, it gets the bloom filter bit associated with the directive (see bloomHashBit),\n * checks that bit against the bloom filter structure to identify an injector that might have\n * the directive (see bloomFindPossibleInjector), then searches the directives on that injector\n * for a match.\n *\n * If not found, it will propagate up to the next parent injector until the token\n * is found or the top is reached.\n *\n * @param di Node injector where the search should start\n * @param token The directive type to search for\n * @param flags Injection flags (e.g. CheckParent)\n * @returns The instance found\n */\nfunction getOrCreateInjectable(di, token, flags) {\n var bloomHash = bloomHashBit(token);\n // If the token has a bloom hash, then it is a directive that is public to the injection system\n // (diPublic). If there is no hash, fall back to the module injector.\n if (bloomHash === null) {\n var moduleInjector = getPreviousOrParentNode().view.injector;\n var formerInjector = setCurrentInjector(moduleInjector);\n try {\n return inject(token, flags);\n }\n finally {\n setCurrentInjector(formerInjector);\n }\n }\n else {\n var injector = di;\n while (injector) {\n // Get the closest potential matching injector (upwards in the injector tree) that\n // *potentially* has the token.\n injector = bloomFindPossibleInjector(injector, bloomHash);\n // If no injector is found, we *know* that there is no ancestor injector that contains the\n // token, so we abort.\n if (!injector) {\n break;\n }\n // At this point, we have an injector which *may* contain the token, so we step through the\n // directives associated with the injector's corresponding node to get the directive instance.\n var node = injector.node;\n var flags_1 = node.tNode.flags;\n var count = flags_1 & 4095;\n if (count !== 0) {\n var start = flags_1 >> 13;\n var end = start + count;\n var defs = (node.view.tView.directives);\n for (var i = start; i < end; i++) {\n // Get the definition for the directive at this index and, if it is injectable (diPublic),\n // and matches the given token, return the directive instance.\n var directiveDef = defs[i];\n if (directiveDef.type === token && directiveDef.diPublic) {\n return getDirectiveInstance(node.view.directives[i]);\n }\n }\n }\n // If we *didn't* find the directive for the token and we are searching the current node's\n // injector, it's possible the directive is on this node and hasn't been created yet.\n var instance = void 0;\n if (injector === di && (instance = searchMatchesQueuedForCreation(node, token))) {\n return instance;\n }\n // The def wasn't found anywhere on this node, so it might be a false positive.\n // Traverse up the tree and continue searching.\n injector = injector.parent;\n }\n }\n // No directive was found for the given token.\n // TODO: implement optional, check-self, and check-parent.\n throw new Error('Implement');\n}\nfunction searchMatchesQueuedForCreation(node, token) {\n var matches = node.view.tView.currentMatches;\n if (matches) {\n for (var i = 0; i < matches.length; i += 2) {\n var def = matches[i];\n if (def.type === token) {\n return resolveDirective(def, i + 1, matches, node.view.tView);\n }\n }\n }\n return null;\n}\n/**\n * Given a directive type, this function returns the bit in an injector's bloom filter\n * that should be used to determine whether or not the directive is present.\n *\n * When the directive was added to the bloom filter, it was given a unique ID that can be\n * retrieved on the class. Since there are only BLOOM_SIZE slots per bloom filter, the directive's\n * ID must be modulo-ed by BLOOM_SIZE to get the correct bloom bit (directives share slots after\n * BLOOM_SIZE is reached).\n *\n * @param type The directive type\n * @returns The bloom bit to check for the directive\n */\nfunction bloomHashBit(type) {\n var id = type[NG_ELEMENT_ID];\n return typeof id === 'number' ? id % BLOOM_SIZE : null;\n}\n/**\n * Finds the closest injector that might have a certain directive.\n *\n * Each directive corresponds to a bit in an injector's bloom filter. Given the bloom bit to\n * check and a starting injector, this function traverses up injectors until it finds an\n * injector that contains a 1 for that bit in its bloom filter. A 1 indicates that the\n * injector may have that directive. It only *may* have the directive because directives begin\n * to share bloom filter bits after the BLOOM_SIZE is reached, and it could correspond to a\n * different directive sharing the bit.\n *\n * Note: We can skip checking further injectors up the tree if an injector's cbf structure\n * has a 0 for that bloom bit. Since cbf contains the merged value of all the parent\n * injectors, a 0 in the bloom bit indicates that the parents definitely do not contain\n * the directive and do not need to be checked.\n *\n * @param injector The starting node injector to check\n * @param bloomBit The bit to check in each injector's bloom filter\n * @returns An injector that might have the directive\n */\nfunction bloomFindPossibleInjector(startInjector, bloomBit) {\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 var mask = 1 << bloomBit;\n // Traverse up the injector tree until we find a potential match or until we know there *isn't* a\n // match.\n var injector = startInjector;\n while (injector) {\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 var value = void 0;\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.bf0 : injector.bf1) :\n (bloomBit < 96 ? injector.bf2 : injector.bf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.bf4 : injector.bf5) :\n (bloomBit < 224 ? injector.bf6 : injector.bf7);\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 if ((value & mask) === mask) {\n return injector;\n }\n // If the current injector does not have the directive, check the bloom filters for the ancestor\n // injectors (cbf0 - cbf7). These filters capture *all* ancestor injectors.\n if (bloomBit < 128) {\n value = bloomBit < 64 ? (bloomBit < 32 ? injector.cbf0 : injector.cbf1) :\n (bloomBit < 96 ? injector.cbf2 : injector.cbf3);\n }\n else {\n value = bloomBit < 192 ? (bloomBit < 160 ? injector.cbf4 : injector.cbf5) :\n (bloomBit < 224 ? injector.cbf6 : injector.cbf7);\n }\n // If the ancestor bloom filter value has the bit corresponding to the directive, traverse up to\n // find the specific injector. If the ancestor bloom filter does not have the bit, we can abort.\n injector = (value & mask) ? injector.parent : null;\n }\n return null;\n}\nvar ReadFromInjectorFn = /** @class */ (function () {\n function ReadFromInjectorFn(read) {\n this.read = read;\n }\n return ReadFromInjectorFn;\n}());\n/**\n * Creates an ElementRef for a given node injector and stores it on the injector.\n * Or, if the ElementRef already exists, retrieves the existing ElementRef.\n *\n * @param di The node injector where we should store a created ElementRef\n * @returns The ElementRef instance to use\n */\nfunction getOrCreateElementRef(di) {\n return di.elementRef || (di.elementRef = new ElementRef$1(di.node.type === 0 /* Container */ ? null : di.node.native));\n}\n\n\n\n\n/** A ref to a node's native element. */\nvar ElementRef$1 = /** @class */ (function () {\n function ElementRef(nativeElement) {\n this.nativeElement = nativeElement;\n }\n return ElementRef;\n}());\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 getOrCreateContainerRef(di) {\n if (!di.viewContainerRef) {\n var vcRefHost = di.node;\n ngDevMode && assertNodeOfPossibleTypes(vcRefHost, 0 /* Container */, 3 /* Element */);\n var lContainer = createLContainer((vcRefHost.parent), vcRefHost.view);\n var lContainerNode = createLNodeObject(0 /* Container */, vcRefHost.view, (vcRefHost.parent), undefined, lContainer, null);\n vcRefHost.dynamicLContainerNode = lContainerNode;\n addToViewTree(vcRefHost.view, lContainer);\n di.viewContainerRef = new ViewContainerRef$1(lContainerNode);\n }\n return di.viewContainerRef;\n}\n/**\n * A ref to a container that enables adding and removing views from that container\n * imperatively.\n */\nvar ViewContainerRef$1 = /** @class */ (function () {\n function ViewContainerRef(_lContainerNode) {\n this._lContainerNode = _lContainerNode;\n this._viewRefs = [];\n }\n ViewContainerRef.prototype.clear = function () {\n var lContainer = this._lContainerNode.data;\n while (lContainer.views.length) {\n this.remove(0);\n }\n };\n ViewContainerRef.prototype.get = function (index) { return this._viewRefs[index] || null; };\n Object.defineProperty(ViewContainerRef.prototype, \"length\", {\n get: function () {\n var lContainer = this._lContainerNode.data;\n return lContainer.views.length;\n },\n enumerable: true,\n configurable: true\n });\n ViewContainerRef.prototype.createEmbeddedView = function (templateRef, context, index) {\n var viewRef = templateRef.createEmbeddedView(context || {});\n this.insert(viewRef, index);\n return viewRef;\n };\n ViewContainerRef.prototype.createComponent = function (componentFactory, index, injector, projectableNodes, ngModule) {\n throw notImplemented();\n };\n ViewContainerRef.prototype.insert = function (viewRef, index) {\n var lViewNode = viewRef._lViewNode;\n var adjustedIdx = this._adjustIndex(index);\n insertView(this._lContainerNode, lViewNode, adjustedIdx);\n // invalidate cache of next sibling RNode (we do similar operation in the containerRefreshEnd\n // instruction)\n this._lContainerNode.native = undefined;\n this._viewRefs.splice(adjustedIdx, 0, viewRef);\n lViewNode.parent = this._lContainerNode;\n // If the view is dynamic (has a template), it needs to be counted both at the container\n // level and at the node above the container.\n if (lViewNode.data.template !== null) {\n // Increment the container view count.\n this._lContainerNode.data.dynamicViewCount++;\n // Look for the parent node and increment its dynamic view count.\n if (this._lContainerNode.parent !== null && this._lContainerNode.parent.data !== null) {\n ngDevMode && assertNodeOfPossibleTypes(this._lContainerNode.parent, 2 /* View */, 3 /* Element */);\n this._lContainerNode.parent.data.dynamicViewCount++;\n }\n }\n return viewRef;\n };\n ViewContainerRef.prototype.move = function (viewRef, newIndex) {\n var index = this.indexOf(viewRef);\n this.detach(index);\n this.insert(viewRef, this._adjustIndex(newIndex));\n return viewRef;\n };\n ViewContainerRef.prototype.indexOf = function (viewRef) { return this._viewRefs.indexOf(viewRef); };\n ViewContainerRef.prototype.remove = function (index) {\n this.detach(index);\n // TODO(ml): proper destroy of the ViewRef, i.e. recursively destroy the LviewNode and its\n // children, delete DOM nodes and QueryList, trigger hooks (onDestroy), destroy the renderer,\n // detach projected nodes\n };\n ViewContainerRef.prototype.detach = function (index) {\n var adjustedIdx = this._adjustIndex(index, -1);\n removeView(this._lContainerNode, adjustedIdx);\n return this._viewRefs.splice(adjustedIdx, 1)[0] || null;\n };\n ViewContainerRef.prototype._adjustIndex = function (index, shift) {\n if (shift === void 0) { shift = 0; }\n if (index == null) {\n return this._lContainerNode.data.views.length + shift;\n }\n if (ngDevMode) {\n assertGreaterThan(index, -1, 'index must be positive');\n // +1 because it's legal to insert at the end.\n assertLessThan(index, this._lContainerNode.data.views.length + 1 + shift, 'index');\n }\n return index;\n };\n return ViewContainerRef;\n}());\n/**\n * Creates a TemplateRef and stores it on the injector. Or, if the TemplateRef already\n * exists, retrieves the existing TemplateRef.\n *\n * @param di The node injector where we should store a created TemplateRef\n * @returns The TemplateRef instance to use\n */\nfunction getOrCreateTemplateRef(di) {\n ngDevMode && assertNodeType(di.node, 0 /* Container */);\n var data = di.node.data;\n var tView = di.node.view.tView;\n return di.templateRef || (di.templateRef = new TemplateRef$1(getOrCreateElementRef(di), (data.template), getRenderer(), tView.directiveRegistry, tView.pipeRegistry));\n}\nvar TemplateRef$1 = /** @class */ (function () {\n function TemplateRef(elementRef, template, _renderer, _directives, _pipes) {\n this._renderer = _renderer;\n this._directives = _directives;\n this._pipes = _pipes;\n this.elementRef = elementRef;\n this._template = template;\n }\n TemplateRef.prototype.createEmbeddedView = function (context) {\n var viewNode = renderEmbeddedTemplate(null, this._template, context, this._renderer, this._directives, this._pipes);\n return addDestroyable(new EmbeddedViewRef$1(viewNode, this._template, context));\n };\n return TemplateRef;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 ngComponentDef = defineComponent({\n * ...\n * });\n * }\n * ```\n */\nfunction defineComponent(componentDefinition) {\n var type = componentDefinition.type;\n var pipeTypes = (componentDefinition.pipes);\n var directiveTypes = (componentDefinition.directives);\n var def = {\n type: type,\n diPublic: null,\n factory: componentDefinition.factory,\n template: componentDefinition.template || (null),\n hostBindings: componentDefinition.hostBindings || null,\n attributes: componentDefinition.attributes || null,\n inputs: invertObject(componentDefinition.inputs),\n outputs: invertObject(componentDefinition.outputs),\n rendererType: resolveRendererType2(componentDefinition.rendererType) || null,\n exportAs: componentDefinition.exportAs,\n onInit: type.prototype.ngOnInit || null,\n doCheck: type.prototype.ngDoCheck || null,\n afterContentInit: type.prototype.ngAfterContentInit || null,\n afterContentChecked: type.prototype.ngAfterContentChecked || null,\n afterViewInit: type.prototype.ngAfterViewInit || null,\n afterViewChecked: type.prototype.ngAfterViewChecked || null,\n onDestroy: type.prototype.ngOnDestroy || null,\n onPush: componentDefinition.changeDetection === ChangeDetectionStrategy.OnPush,\n directiveDefs: directiveTypes ?\n function () {\n return (typeof directiveTypes === 'function' ? directiveTypes() : directiveTypes)\n .map(extractDirectiveDef);\n } :\n null,\n pipeDefs: pipeTypes ?\n function () { return (typeof pipeTypes === 'function' ? pipeTypes() : pipeTypes).map(extractPipeDef); } :\n null,\n selectors: componentDefinition.selectors\n };\n var feature = componentDefinition.features;\n feature && feature.forEach(function (fn) { return fn(def); });\n return def;\n}\nfunction extractDirectiveDef(type) {\n var def = type.ngComponentDef || type.ngDirectiveDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is neither 'ComponentType' or 'DirectiveType'.\");\n }\n return def;\n}\nfunction extractPipeDef(type) {\n var def = type.ngPipeDef;\n if (ngDevMode && !def) {\n throw new Error(\"'\" + type.name + \"' is not a 'PipeType'.\");\n }\n return def;\n}\nvar PRIVATE_PREFIX = '__ngOnChanges_';\n/**\n * Creates an NgOnChangesFeature function for a component's features list.\n *\n * It accepts an optional map of minified input property names to original property names,\n * if any input properties have a public alias.\n *\n * The NgOnChangesFeature function that is returned decorates a component with support for\n * the ngOnChanges lifecycle hook, so it should be included in any component that implements\n * that hook.\n *\n * Example usage:\n *\n * ```\n * static ngComponentDef = defineComponent({\n * ...\n * inputs: {name: 'publicName'},\n * features: [NgOnChangesFeature({name: 'name'})]\n * });\n * ```\n *\n * @param inputPropertyNames Map of input property names, if they are aliased\n * @returns DirectiveDefFeature\n */\nfunction NgOnChangesFeature(inputPropertyNames) {\n return function (definition) {\n var inputs = definition.inputs;\n var proto = definition.type.prototype;\n // Place where we will store SimpleChanges if there is a change\n Object.defineProperty(proto, PRIVATE_PREFIX, { value: undefined, writable: true });\n var _loop_1 = function (pubKey) {\n var minKey = inputs[pubKey];\n var propertyName = inputPropertyNames && inputPropertyNames[minKey] || pubKey;\n var privateMinKey = PRIVATE_PREFIX + minKey;\n // Create a place where the actual value will be stored and make it non-enumerable\n Object.defineProperty(proto, privateMinKey, { value: undefined, writable: true });\n var existingDesc = Object.getOwnPropertyDescriptor(proto, minKey);\n // create a getter and setter for property\n Object.defineProperty(proto, minKey, {\n get: function () {\n return (existingDesc && existingDesc.get) ? existingDesc.get.call(this) :\n this[privateMinKey];\n },\n set: function (value) {\n var simpleChanges = this[PRIVATE_PREFIX];\n var isFirstChange = simpleChanges === undefined;\n if (simpleChanges == null) {\n simpleChanges = this[PRIVATE_PREFIX] = {};\n }\n simpleChanges[propertyName] = new SimpleChange(this[privateMinKey], value, isFirstChange);\n (existingDesc && existingDesc.set) ? existingDesc.set.call(this, value) :\n this[privateMinKey] = value;\n }\n });\n };\n for (var pubKey in inputs) {\n _loop_1(pubKey);\n }\n // If an onInit hook is defined, it will need to wrap the ngOnChanges call\n // so the call order is changes-init-check in creation mode. In subsequent\n // change detection runs, only the check wrapper will be called.\n if (definition.onInit != null) {\n definition.onInit = onChangesWrapper(definition.onInit);\n }\n definition.doCheck = onChangesWrapper(definition.doCheck);\n };\n function onChangesWrapper(delegateHook) {\n return function () {\n var simpleChanges = this[PRIVATE_PREFIX];\n if (simpleChanges != null) {\n this.ngOnChanges(simpleChanges);\n this[PRIVATE_PREFIX] = null;\n }\n delegateHook && delegateHook.apply(this);\n };\n }\n}\nfunction PublicFeature(definition) {\n definition.diPublic = diPublic;\n}\nvar EMPTY$1 = {};\n/** Swaps the keys and values of an object. */\nfunction invertObject(obj) {\n if (obj == null)\n return EMPTY$1;\n var newObj = {};\n for (var minifiedKey in obj) {\n newObj[obj[minifiedKey]] = minifiedKey;\n }\n return newObj;\n}\n/**\n * Create a directive definition object.\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 ngDirectiveDef = defineDirective({\n * ...\n * });\n * }\n * ```\n */\nvar 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 ngPipeDef = definePipe({\n * ...\n * });\n * }\n * ```\n * @param pipeDef Pipe definition generated by the compiler\n */\nfunction definePipe(pipeDef) {\n return {\n name: pipeDef.name,\n n: pipeDef.factory,\n pure: pipeDef.pure !== false,\n onDestroy: pipeDef.type.prototype.ngOnDestroy || null\n };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 pureFn Function that returns a value\n * @returns value\n */\nfunction pureFunction0(pureFn, thisArg) {\n return getCreationMode() ? checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg) : pureFn()) :\n consumeBinding();\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 pureFn Function that returns an updated value\n * @param exp Updated expression value\n * @returns Updated value\n */\nfunction pureFunction1(pureFn, exp, thisArg) {\n return bindingUpdated(exp) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp) : pureFn(exp)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @returns Updated value\n */\nfunction pureFunction2(pureFn, exp1, exp2, thisArg) {\n return bindingUpdated2(exp1, exp2) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2) : pureFn(exp1, exp2)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @returns Updated value\n */\nfunction pureFunction3(pureFn, exp1, exp2, exp3, thisArg) {\n var different = bindingUpdated2(exp1, exp2);\n return bindingUpdated(exp3) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3) : pureFn(exp1, exp2, exp3)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @returns Updated value\n */\nfunction pureFunction4(pureFn, exp1, exp2, exp3, exp4, thisArg) {\n return bindingUpdated4(exp1, exp2, exp3, exp4) ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4) : pureFn(exp1, exp2, exp3, exp4)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @returns Updated value\n */\nfunction pureFunction5(pureFn, exp1, exp2, exp3, exp4, exp5, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated(exp5) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5) :\n pureFn(exp1, exp2, exp3, exp4, exp5)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @returns Updated value\n */\nfunction pureFunction6(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated2(exp5, exp6) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6)) :\n consumeBinding();\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 pureFn\n * @param exp1\n * @param exp2\n * @param exp3\n * @param exp4\n * @param exp5\n * @param exp6\n * @param exp7\n * @returns Updated value\n */\nfunction pureFunction7(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n different = bindingUpdated2(exp5, exp6) || different;\n return bindingUpdated(exp7) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7)) :\n consumeBinding();\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 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 * @returns Updated value\n */\nfunction pureFunction8(pureFn, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8, thisArg) {\n var different = bindingUpdated4(exp1, exp2, exp3, exp4);\n return bindingUpdated4(exp5, exp6, exp7, exp8) || different ?\n checkAndUpdateBinding$1(thisArg ? pureFn.call(thisArg, exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8) :\n pureFn(exp1, exp2, exp3, exp4, exp5, exp6, exp7, exp8)) :\n consumeBinding();\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 pureFn A pure function that takes binding values and builds an object or array\n * containing those values.\n * @param exp An array of binding values\n * @returns Updated value\n */\nfunction pureFunctionV(pureFn, exps, thisArg) {\n var different = false;\n for (var i = 0; i < exps.length; i++) {\n bindingUpdated(exps[i]) && (different = true);\n }\n return different ? checkAndUpdateBinding$1(pureFn.apply(thisArg, exps)) : consumeBinding();\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nfunction pipe(index, pipeName) {\n var tView = getTView();\n var pipeDef;\n if (tView.firstTemplatePass) {\n pipeDef = getPipeDef(pipeName, tView.pipeRegistry);\n tView.data[index] = pipeDef;\n if (pipeDef.onDestroy) {\n (tView.pipeDestroyHooks || (tView.pipeDestroyHooks = [])).push(index, pipeDef.onDestroy);\n }\n }\n else {\n pipeDef = tView.data[index];\n }\n var pipeInstance = pipeDef.n();\n store(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(name, registry) {\n if (registry) {\n for (var i = 0; i < registry.length; i++) {\n var pipeDef = registry[i];\n if (name === pipeDef.name) {\n return pipeDef;\n }\n }\n }\n throw new Error(\"Pipe with name '\" + name + \"' not 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 v1 1st argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind1(index, v1) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction1(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 v1 1st argument to {@link PipeTransform#transform}.\n * @param v2 2nd argument to {@link PipeTransform#transform}.\n */\nfunction pipeBind2(index, v1, v2) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction2(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 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 */\nfunction pipeBind3(index, v1, v2, v3) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction3(pipeInstance.transform.bind(pipeInstance), v1, v2, v3) :\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 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 */\nfunction pipeBind4(index, v1, v2, v3, v4) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunction4(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 values Array of arguments to pass to {@link PipeTransform#transform} method.\n */\nfunction pipeBindV(index, values) {\n var pipeInstance = load(index);\n return isPure(index) ? pureFunctionV(pipeInstance.transform, values, pipeInstance) :\n pipeInstance.transform.apply(pipeInstance, values);\n}\nfunction isPure(index) {\n return getTView().data[index].pure;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 LQueries_ = /** @class */ (function () {\n function LQueries_(deep) {\n this.shallow = null;\n this.deep = null;\n this.deep = deep == null ? null : deep;\n }\n LQueries_.prototype.track = function (queryList, predicate, descend, read) {\n // TODO(misko): This is not right. In case of inherited state, a calling track will incorrectly\n // mutate parent.\n if (descend) {\n this.deep = createQuery$1(this.deep, queryList, predicate, read != null ? read : null);\n }\n else {\n this.shallow = createQuery$1(this.shallow, queryList, predicate, read != null ? read : null);\n }\n };\n LQueries_.prototype.child = function () {\n if (this.deep === null) {\n // if we don't have any deep queries then no need to track anything more.\n return null;\n }\n if (this.shallow === null) {\n // DeepQuery: We can reuse the current state if the child state would be same as current\n // state.\n return this;\n }\n else {\n // We need to create new state\n return new LQueries_(this.deep);\n }\n };\n LQueries_.prototype.container = function () {\n var result = null;\n var query = this.deep;\n while (query) {\n var containerValues = []; // prepare room for views\n query.values.push(containerValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: containerValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.enterView = function (index) {\n var result = null;\n var query = this.deep;\n while (query) {\n var viewValues = []; // prepare room for view nodes\n query.values.splice(index, 0, viewValues);\n var clonedQuery = { next: null, list: query.list, predicate: query.predicate, values: viewValues };\n clonedQuery.next = result;\n result = clonedQuery;\n query = query.next;\n }\n return result ? new LQueries_(result) : null;\n };\n LQueries_.prototype.addNode = function (node) {\n add(this.shallow, node);\n add(this.deep, node);\n };\n LQueries_.prototype.removeView = function (index) {\n var query = this.deep;\n while (query) {\n var removed = query.values.splice(index, 1);\n // mark a query as dirty only when removed view had matching modes\n ngDevMode && assertEqual(removed.length, 1, 'removed.length');\n if (removed[0].length) {\n query.list.setDirty();\n }\n query = query.next;\n }\n };\n return LQueries_;\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 var localNames = tNode.localNames;\n if (localNames) {\n for (var i = 0; i < localNames.length; i += 2) {\n if (localNames[i] === selector) {\n return localNames[i + 1];\n }\n }\n }\n return null;\n}\n/**\n * Iterates over all the directives for a node and returns index of a directive for a given type.\n *\n * @param node Node on which directives are present.\n * @param type Type of a directive to look for.\n * @returns Index of a found directive or null when none found.\n */\nfunction getIdxOfMatchingDirective(node, type) {\n var defs = (node.view.tView.directives);\n var flags = node.tNode.flags;\n var count = flags & 4095;\n var start = flags >> 13;\n var end = start + count;\n for (var i = start; i < end; i++) {\n var def = defs[i];\n if (def.type === type && def.diPublic) {\n return i;\n }\n }\n return null;\n}\nfunction readFromNodeInjector(nodeInjector, node, read, directiveIdx) {\n if (read instanceof ReadFromInjectorFn) {\n return read.read(nodeInjector, node, directiveIdx);\n }\n else {\n var matchingIdx = getIdxOfMatchingDirective(node, read);\n if (matchingIdx !== null) {\n return node.view.directives[matchingIdx];\n }\n }\n return null;\n}\nfunction add(query, node) {\n var nodeInjector = getOrCreateNodeInjectorForNode(node);\n while (query) {\n var predicate = query.predicate;\n var type = predicate.type;\n if (type) {\n var directiveIdx = getIdxOfMatchingDirective(node, type);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // if read token and / or strategy is not specified, use type as read token\n var result = readFromNodeInjector(nodeInjector, node, predicate.read || type, directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n else {\n var selector = (predicate.selector);\n for (var i = 0; i < selector.length; i++) {\n ngDevMode && assertNotNull(node.tNode, 'node.tNode');\n var directiveIdx = getIdxOfMatchingSelector((node.tNode), selector[i]);\n if (directiveIdx !== null) {\n // a node is matching a predicate - determine what to read\n // note that queries using name selector must specify read strategy\n ngDevMode && assertNotNull(predicate.read, 'the node should have a predicate');\n var result = readFromNodeInjector(nodeInjector, node, (predicate.read), directiveIdx);\n if (result !== null) {\n addMatch(query, result);\n }\n }\n }\n }\n query = query.next;\n }\n}\nfunction addMatch(query, matchingValue) {\n query.values.push(matchingValue);\n query.list.setDirty();\n}\nfunction createPredicate(predicate, read) {\n var isArray = Array.isArray(predicate);\n return {\n type: isArray ? null : predicate,\n selector: isArray ? predicate : null,\n read: read\n };\n}\nfunction createQuery$1(previous, queryList, predicate, read) {\n return {\n next: previous,\n list: queryList,\n predicate: createPredicate(predicate, read),\n values: queryList._valuesTree\n };\n}\nvar QueryList_ = /** @class */ (function () {\n function QueryList_() {\n this.dirty = true;\n this.changes = new EventEmitter();\n this._values = [];\n /** @internal */\n this._valuesTree = [];\n }\n Object.defineProperty(QueryList_.prototype, \"length\", {\n get: function () { return this._values.length; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"first\", {\n get: function () {\n var values = this._values;\n return values.length ? values[0] : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(QueryList_.prototype, \"last\", {\n get: function () {\n var values = this._values;\n return values.length ? values[values.length - 1] : null;\n },\n enumerable: true,\n configurable: true\n });\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n QueryList_.prototype.map = /**\n * See\n * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)\n */\n function (fn) { return this._values.map(fn); };\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n QueryList_.prototype.filter = /**\n * See\n * [Array.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter)\n */\n function (fn) {\n return this._values.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 /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n QueryList_.prototype.find = /**\n * See\n * [Array.find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)\n */\n function (fn) {\n return this._values.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 /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n QueryList_.prototype.reduce = /**\n * See\n * [Array.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce)\n */\n function (fn, init) {\n return this._values.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 /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n QueryList_.prototype.forEach = /**\n * See\n * [Array.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach)\n */\n function (fn) { this._values.forEach(fn); };\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n QueryList_.prototype.some = /**\n * See\n * [Array.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)\n */\n function (fn) {\n return this._values.some(fn);\n };\n QueryList_.prototype.toArray = function () { return this._values.slice(0); };\n QueryList_.prototype[getSymbolIterator()] = function () { return this._values[getSymbolIterator()](); };\n QueryList_.prototype.toString = function () { return this._values.toString(); };\n QueryList_.prototype.reset = function (res) {\n this._values = flatten$1(res);\n this.dirty = false;\n };\n QueryList_.prototype.notifyOnChanges = function () { this.changes.emit(this); };\n QueryList_.prototype.setDirty = function () { this.dirty = true; };\n QueryList_.prototype.destroy = function () {\n this.changes.complete();\n this.changes.unsubscribe();\n };\n return QueryList_;\n}());\nvar QueryList$1 = QueryList_;\n/**\n * Creates and returns a QueryList.\n *\n * @param memoryIndex The index in memory where the QueryList should be saved. If null,\n * this is is a content query and the QueryList will be saved later through directiveCreate.\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 */\nfunction query(memoryIndex, predicate, descend, read) {\n ngDevMode && assertPreviousIsParent();\n var queryList = new QueryList$1();\n var queries = getCurrentQueries(LQueries_);\n queries.track(queryList, predicate, descend, read);\n if (memoryIndex != null) {\n store(memoryIndex, queryList);\n }\n return queryList;\n}\n/**\n * Refreshes a query by combining matches from all active views and removing matches from deleted\n * views.\n * Returns true if a query got dirty during change detection, false otherwise.\n */\nfunction queryRefresh(queryList) {\n var queryListImpl = queryList;\n if (queryList.dirty) {\n queryList.reset(queryListImpl._valuesTree);\n queryList.notifyOnChanges();\n return true;\n }\n return false;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this 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 BRAND = '__SANITIZER_TRUSTED_BRAND__';\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 */\nfunction sanitizeHtml(unsafeHtml) {\n if (unsafeHtml instanceof String && unsafeHtml[BRAND] === 'Html') {\n return unsafeHtml.toString();\n }\n return _sanitizeHtml(document, stringify$1(unsafeHtml));\n}\n/**\n * A `style` sanitizer which converts untrusted `style` **string** into trusted string by removing\n * dangerous content.\n *\n * This method parses the `style` 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 bypassSanitizationTrustStyle}.\n *\n * @param unsafeStyle untrusted `style`, typically from the user.\n * @returns `style` string which is safe to bind to the `style` properties, because all of the\n * dangerous javascript and urls have been removed.\n */\nfunction sanitizeStyle(unsafeStyle) {\n if (unsafeStyle instanceof String && unsafeStyle[BRAND] === 'Style') {\n return unsafeStyle.toString();\n }\n return _sanitizeStyle(stringify$1(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 */\nfunction sanitizeUrl(unsafeUrl) {\n if (unsafeUrl instanceof String && unsafeUrl[BRAND] === 'Url') {\n return unsafeUrl.toString();\n }\n return _sanitizeUrl(stringify$1(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 */\nfunction sanitizeResourceUrl(unsafeResourceUrl) {\n if (unsafeResourceUrl instanceof String &&\n unsafeResourceUrl[BRAND] === 'ResourceUrl') {\n return unsafeResourceUrl.toString();\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 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`s have been allowed to pass.\n */\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` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustHtml(trustedHtml) {\n return bypassSanitizationTrustString(trustedHtml, 'Html');\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` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustStyle(trustedStyle) {\n return bypassSanitizationTrustString(trustedStyle, 'Style');\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` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustScript(trustedScript) {\n return bypassSanitizationTrustString(trustedScript, 'Script');\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` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustUrl(trustedUrl) {\n return bypassSanitizationTrustString(trustedUrl, 'Url');\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` `String` which has been branded to be implicitly trusted.\n */\nfunction bypassSanitizationTrustResourceUrl(trustedResourceUrl) {\n return bypassSanitizationTrustString(trustedResourceUrl, 'ResourceUrl');\n}\nfunction bypassSanitizationTrustString(trustedString, mode) {\n var trusted = new String(trustedString);\n trusted[BRAND] = mode;\n return trusted;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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// clang-format on\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { _iterableDiffersFactory as ɵangular_packages_core_core_j, _keyValueDiffersFactory as ɵangular_packages_core_core_k, _localeFactory as ɵangular_packages_core_core_l, _appIdRandomProviderFactory as ɵangular_packages_core_core_f, defaultKeyValueDiffers as ɵangular_packages_core_core_g, DefaultIterableDifferFactory as ɵangular_packages_core_core_h, DefaultKeyValueDifferFactory as ɵangular_packages_core_core_i, ReflectiveInjector_ as ɵangular_packages_core_core_c, ReflectiveDependency as ɵangular_packages_core_core_d, resolveReflectiveProviders as ɵangular_packages_core_core_e, wtfEnabled as ɵangular_packages_core_core_m, createScope as ɵangular_packages_core_core_o, detectWTF as ɵangular_packages_core_core_n, endTimeRange as ɵangular_packages_core_core_r, leave as ɵangular_packages_core_core_p, startTimeRange as ɵangular_packages_core_core_q, getOrCreateChangeDetectorRef as ɵangular_packages_core_core_v, getOrCreateContainerRef as ɵangular_packages_core_core_x, getOrCreateInjectable as ɵangular_packages_core_core_w, getOrCreateNodeInjector as ɵangular_packages_core_core_u, getOrCreateTemplateRef as ɵangular_packages_core_core_y, bindingUpdated as ɵangular_packages_core_core_bb, bindingUpdated2 as ɵangular_packages_core_core_bd, bindingUpdated4 as ɵangular_packages_core_core_be, checkAndUpdateBinding$1 as ɵangular_packages_core_core_bc, consumeBinding as ɵangular_packages_core_core_ba, getCreationMode as ɵangular_packages_core_core_z, makeParamDecorator as ɵangular_packages_core_core_a, makePropDecorator as ɵangular_packages_core_core_b, _def as ɵangular_packages_core_core_s, DebugContext as ɵangular_packages_core_core_t, createPlatform, assertPlatform, destroyPlatform, getPlatform, PlatformRef, ApplicationRef, enableProdMode, isDevMode, createPlatformFactory, NgProbeToken, APP_ID, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER, PLATFORM_ID, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationInitStatus, DebugElement, DebugNode, asNativeElements, getDebugNode, Testability, TestabilityRegistry, setTestabilityGetter, TRANSLATIONS, TRANSLATIONS_FORMAT, LOCALE_ID, MissingTranslationStrategy, ApplicationModule, wtfCreateScope, wtfLeave, wtfStartTimeRange, wtfEndTimeRange, Type, EventEmitter, ErrorHandler, Sanitizer, SecurityContext, ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren, Component, Directive, HostBinding, HostListener, Input, Output, Pipe, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, NgModule, ViewEncapsulation, Version, VERSION, defineInjectable, defineInjector, forwardRef, resolveForwardRef, Injectable, inject, INJECTOR, Injector, ReflectiveInjector, createInjector, ResolvedReflectiveFactory, ReflectiveKey, InjectionToken, Inject, Optional, Self, SkipSelf, Host, NgZone, RenderComponentType, Renderer, Renderer2, RendererFactory2, RendererStyleFlags2, RootRenderer, COMPILER_OPTIONS, Compiler, CompilerFactory, ModuleWithComponentFactories, ComponentFactory, ComponentRef, ComponentFactoryResolver, ElementRef, NgModuleFactory, NgModuleRef, NgModuleFactoryLoader, getModuleFactory, QueryList, SystemJsNgModuleLoader, SystemJsNgModuleLoaderConfig, TemplateRef, ViewContainerRef, EmbeddedViewRef, ViewRef, ChangeDetectionStrategy, ChangeDetectorRef, DefaultIterableDiffer, IterableDiffers, KeyValueDiffers, SimpleChange, WrappedValue, platformCore, ALLOW_MULTIPLE_PLATFORMS as ɵALLOW_MULTIPLE_PLATFORMS, APP_ID_RANDOM_PROVIDER as ɵAPP_ID_RANDOM_PROVIDER, defaultIterableDiffers as ɵdefaultIterableDiffers, devModeEqual as ɵdevModeEqual, isListLikeIterable as ɵisListLikeIterable, ChangeDetectorStatus as ɵChangeDetectorStatus, isDefaultChangeDetectionStrategy as ɵisDefaultChangeDetectionStrategy, Console as ɵConsole, inject as ɵinject, setCurrentInjector as ɵsetCurrentInjector, APP_ROOT as ɵAPP_ROOT, ComponentFactory as ɵComponentFactory, CodegenComponentFactoryResolver as ɵCodegenComponentFactoryResolver, ReflectionCapabilities as ɵReflectionCapabilities, RenderDebugInfo as ɵRenderDebugInfo, _sanitizeHtml as ɵ_sanitizeHtml, _sanitizeStyle as ɵ_sanitizeStyle, _sanitizeUrl as ɵ_sanitizeUrl, _global as ɵglobal, looseIdentical as ɵlooseIdentical, stringify as ɵstringify, makeDecorator as ɵmakeDecorator, isObservable as ɵisObservable, isPromise as ɵisPromise, clearOverrides as ɵclearOverrides, overrideComponentView as ɵoverrideComponentView, overrideProvider as ɵoverrideProvider, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR as ɵNOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, defineComponent as ɵdefineComponent, defineDirective as ɵdefineDirective, definePipe as ɵdefinePipe, detectChanges as ɵdetectChanges, renderComponent as ɵrenderComponent, directiveInject as ɵdirectiveInject, injectTemplateRef as ɵinjectTemplateRef, injectViewContainerRef as ɵinjectViewContainerRef, injectChangeDetectorRef as ɵinjectChangeDetectorRef, injectAttribute as ɵinjectAttribute, PublicFeature as ɵPublicFeature, NgOnChangesFeature as ɵNgOnChangesFeature, markDirty as ɵmarkDirty, NO_CHANGE as ɵNC, container as ɵC, elementStart as ɵE, listener as ɵL, text as ɵT, embeddedViewStart as ɵV, query as ɵQ, loadDirective as ɵd, projection as ɵP, bind as ɵb, interpolation1 as ɵi1, interpolation2 as ɵi2, interpolation3 as ɵi3, interpolation4 as ɵi4, interpolation5 as ɵi5, interpolation6 as ɵi6, interpolation7 as ɵi7, interpolation8 as ɵi8, interpolationV as ɵiV, pipeBind1 as ɵpb1, pipeBind2 as ɵpb2, pipeBind3 as ɵpb3, pipeBind4 as ɵpb4, pipeBindV as ɵpbV, pureFunction0 as ɵf0, pureFunction1 as ɵf1, pureFunction2 as ɵf2, pureFunction3 as ɵf3, pureFunction4 as ɵf4, pureFunction5 as ɵf5, pureFunction6 as ɵf6, pureFunction7 as ɵf7, pureFunction8 as ɵf8, pureFunctionV as ɵfV, containerRefreshStart as ɵcR, containerRefreshEnd as ɵcr, queryRefresh as ɵqR, elementEnd as ɵe, elementProperty as ɵp, projectionDef as ɵpD, elementAttribute as ɵa, elementStyle as ɵs, elementStyleNamed as ɵsn, elementClass as ɵk, elementClassNamed as ɵkn, textBinding as ɵt, embeddedViewEnd as ɵv, store as ɵst, load as ɵld, pipe as ɵPp, whenRendered as ɵwhenRendered, bypassSanitizationTrustHtml as ɵbypassSanitizationTrustHtml, bypassSanitizationTrustStyle as ɵbypassSanitizationTrustStyle, bypassSanitizationTrustScript as ɵbypassSanitizationTrustScript, bypassSanitizationTrustUrl as ɵbypassSanitizationTrustUrl, bypassSanitizationTrustResourceUrl as ɵbypassSanitizationTrustResourceUrl, sanitizeHtml as ɵsanitizeHtml, sanitizeStyle as ɵsanitizeStyle, sanitizeUrl as ɵsanitizeUrl, sanitizeResourceUrl as ɵsanitizeResourceUrl, registerModuleFactory as ɵregisterModuleFactory, EMPTY_ARRAY$2 as ɵEMPTY_ARRAY, EMPTY_MAP as ɵEMPTY_MAP, anchorDef as ɵand, createComponentFactory as ɵccf, createNgModuleFactory as ɵcmf, createRendererType2 as ɵcrt, directiveDef as ɵdid, elementDef as ɵeld, elementEventFullName as ɵelementEventFullName, getComponentViewDefinitionFactory as ɵgetComponentViewDefinitionFactory, inlineInterpolate as ɵinlineInterpolate, interpolate as ɵinterpolate, moduleDef as ɵmod, moduleProvideDef as ɵmpd, ngContentDef as ɵncd, nodeValue as ɵnov, pipeDef as ɵpid, providerDef as ɵprd, pureArrayDef as ɵpad, pureObjectDef as ɵpod, purePipeDef as ɵppd, queryDef as ɵqud, textDef as ɵted, unwrapValue as ɵunv, viewDef as ɵvid };\n//# sourceMappingURL=core.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { __assign, __extends, __spread, __values } from 'tslib';\nimport { Directive, ElementRef, EventEmitter, Host, Inject, Injectable, InjectionToken, Injector, Input, NgModule, Optional, Output, Renderer2, Self, SkipSelf, Version, forwardRef, isDevMode, ɵisObservable, ɵisPromise, ɵlooseIdentical } from '@angular/core';\nimport { forkJoin, from } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { ɵgetDOM } from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 for control directives.\n *\n * Only used internally in the forms module.\n *\n *\n */\nvar AbstractControlDirective = /** @class */ (function () {\n function AbstractControlDirective() {\n }\n Object.defineProperty(AbstractControlDirective.prototype, \"value\", {\n /** The value of the control. */\n get: /** The value of the control. */\n function () { return this.control ? this.control.value : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"valid\", {\n /**\n * A control is `valid` when its `status === VALID`.\n *\n * In order to have this status, the control must have passed all its\n * validation checks.\n */\n get: /**\n * A control is `valid` when its `status === VALID`.\n *\n * In order to have this status, the control must have passed all its\n * validation checks.\n */\n function () { return this.control ? this.control.valid : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"invalid\", {\n /**\n * A control is `invalid` when its `status === INVALID`.\n *\n * In order to have this status, the control must have failed\n * at least one of its validation checks.\n */\n get: /**\n * A control is `invalid` when its `status === INVALID`.\n *\n * In order to have this status, the control must have failed\n * at least one of its validation checks.\n */\n function () { return this.control ? this.control.invalid : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pending\", {\n /**\n * A control is `pending` when its `status === PENDING`.\n *\n * In order to have this status, the control must be in the\n * middle of conducting a validation check.\n */\n get: /**\n * A control is `pending` when its `status === PENDING`.\n *\n * In order to have this status, the control must be in the\n * middle of conducting a validation check.\n */\n function () { return this.control ? this.control.pending : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"disabled\", {\n /**\n * A control is `disabled` when its `status === 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 get: /**\n * A control is `disabled` when its `status === 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 function () { return this.control ? this.control.disabled : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"enabled\", {\n /**\n * A control is `enabled` as long as its `status !== DISABLED`.\n *\n * In other words, it has a status of `VALID`, `INVALID`, or\n * `PENDING`.\n */\n get: /**\n * A control is `enabled` as long as its `status !== DISABLED`.\n *\n * In other words, it has a status of `VALID`, `INVALID`, or\n * `PENDING`.\n */\n function () { return this.control ? this.control.enabled : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"errors\", {\n /**\n * Returns any errors generated by failing validation. If there\n * are no errors, it will return null.\n */\n get: /**\n * Returns any errors generated by failing validation. If there\n * are no errors, it will return null.\n */\n function () { return this.control ? this.control.errors : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"pristine\", {\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n get: /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n function () { return this.control ? this.control.pristine : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"dirty\", {\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n get: /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n function () { return this.control ? this.control.dirty : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"touched\", {\n /**\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n get: /**\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n function () { return this.control ? this.control.touched : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"status\", {\n get: function () { return this.control ? this.control.status : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"untouched\", {\n /**\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get: /**\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n function () { return this.control ? this.control.untouched : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"statusChanges\", {\n /**\n * Emits an event every time the validation status of the control\n * is re-calculated.\n */\n get: /**\n * Emits an event every time the validation status of the control\n * is re-calculated.\n */\n function () {\n return this.control ? this.control.statusChanges : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"valueChanges\", {\n /**\n * Emits an event every time the value of the control changes, in\n * the UI or programmatically.\n */\n get: /**\n * Emits an event every time the value of the control changes, in\n * the UI or programmatically.\n */\n function () {\n return this.control ? this.control.valueChanges : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlDirective.prototype, \"path\", {\n /**\n * Returns an array that represents the path from the top-level form\n * to this control. Each index is the string name of the control on\n * that level.\n */\n get: /**\n * Returns an array that represents the path from the top-level form\n * to this control. Each index is the string name of the control on\n * that level.\n */\n function () { return null; },\n enumerable: true,\n configurable: true\n });\n /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * For more information, see `AbstractControl`.\n */\n /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * For more information, see `AbstractControl`.\n */\n AbstractControlDirective.prototype.reset = /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * For more information, see `AbstractControl`.\n */\n function (value) {\n if (value === void 0) { value = undefined; }\n if (this.control)\n this.control.reset(value);\n };\n /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n AbstractControlDirective.prototype.hasError = /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n function (errorCode, path) {\n return this.control ? this.control.hasError(errorCode, path) : false;\n };\n /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n AbstractControlDirective.prototype.getError = /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n function (errorCode, path) {\n return this.control ? this.control.getError(errorCode, path) : null;\n };\n return AbstractControlDirective;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 directive that contains multiple `NgControl`s.\n *\n * Only used by the forms module.\n *\n *\n */\nvar ControlContainer = /** @class */ (function (_super) {\n __extends(ControlContainer, _super);\n function ControlContainer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(ControlContainer.prototype, \"formDirective\", {\n /**\n * Get the form to which this container belongs.\n */\n get: /**\n * Get the form to which this container belongs.\n */\n function () { return null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ControlContainer.prototype, \"path\", {\n /**\n * Get the path to this container.\n */\n get: /**\n * Get the path to this container.\n */\n function () { return null; },\n enumerable: true,\n configurable: true\n });\n return ControlContainer;\n}(AbstractControlDirective));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 isEmptyInputValue(value) {\n // we don't check for string here so it also works with arrays\n return value == null || value.length === 0;\n}\n/**\n * Providers for validators to be used for `FormControl`s in a form.\n *\n * Provide this using `multi: true` to add validators.\n *\n * ### Example\n *\n * ```typescript\n * @Directive({\n * selector: '[custom-validator]',\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 *\n */\nvar NG_VALIDATORS = new InjectionToken('NgValidators');\n/**\n * Providers for asynchronous validators to be used for `FormControl`s\n * in a form.\n *\n * Provide this using `multi: true` to add validators.\n *\n * See `NG_VALIDATORS` for more details.\n *\n *\n */\nvar NG_ASYNC_VALIDATORS = new InjectionToken('NgAsyncValidators');\nvar EMAIL_REGEXP = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[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 * Provides a set of validators used by form controls.\n *\n * A validator is a function that processes a `FormControl` or collection of\n * controls and returns a map of errors. A null map means that validation has passed.\n *\n * ### Example\n *\n * ```typescript\n * var loginControl = new FormControl(\"\", Validators.required)\n * ```\n *\n *\n */\nvar Validators = /** @class */ (function () {\n function Validators() {\n }\n /**\n * Validator that requires controls to have a value greater than a number.\n *`min()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.min(3));`.\n */\n /**\n * Validator that requires controls to have a value greater than a number.\n *`min()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.min(3));`.\n */\n Validators.min = /**\n * Validator that requires controls to have a value greater than a number.\n *`min()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.min(3));`.\n */\n function (min) {\n return function (control) {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(min)) {\n return null; // don't validate empty values to allow optional controls\n }\n var 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 * Validator that requires controls to have a value less than a number.\n * `max()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.max(15));`.\n */\n /**\n * Validator that requires controls to have a value less than a number.\n * `max()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.max(15));`.\n */\n Validators.max = /**\n * Validator that requires controls to have a value less than a number.\n * `max()` exists only as a function, not as a directive. For example,\n * `control = new FormControl('', Validators.max(15));`.\n */\n function (max) {\n return function (control) {\n if (isEmptyInputValue(control.value) || isEmptyInputValue(max)) {\n return null; // don't validate empty values to allow optional controls\n }\n var 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 * Validator that requires controls to have a non-empty value.\n */\n /**\n * Validator that requires controls to have a non-empty value.\n */\n Validators.required = /**\n * Validator that requires controls to have a non-empty value.\n */\n function (control) {\n return isEmptyInputValue(control.value) ? { 'required': true } : null;\n };\n /**\n * Validator that requires control value to be true.\n */\n /**\n * Validator that requires control value to be true.\n */\n Validators.requiredTrue = /**\n * Validator that requires control value to be true.\n */\n function (control) {\n return control.value === true ? null : { 'required': true };\n };\n /**\n * Validator that performs email validation.\n */\n /**\n * Validator that performs email validation.\n */\n Validators.email = /**\n * Validator that performs email validation.\n */\n function (control) {\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 * Validator that requires controls to have a value of a minimum length.\n */\n /**\n * Validator that requires controls to have a value of a minimum length.\n */\n Validators.minLength = /**\n * Validator that requires controls to have a value of a minimum length.\n */\n function (minLength) {\n return function (control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n var length = control.value ? control.value.length : 0;\n return length < minLength ?\n { 'minlength': { 'requiredLength': minLength, 'actualLength': length } } :\n null;\n };\n };\n /**\n * Validator that requires controls to have a value of a maximum length.\n */\n /**\n * Validator that requires controls to have a value of a maximum length.\n */\n Validators.maxLength = /**\n * Validator that requires controls to have a value of a maximum length.\n */\n function (maxLength) {\n return function (control) {\n var length = control.value ? control.value.length : 0;\n return length > maxLength ?\n { 'maxlength': { 'requiredLength': maxLength, 'actualLength': length } } :\n null;\n };\n };\n /**\n * Validator that requires a control to match a regex to its value.\n */\n /**\n * Validator that requires a control to match a regex to its value.\n */\n Validators.pattern = /**\n * Validator that requires a control to match a regex to its value.\n */\n function (pattern) {\n if (!pattern)\n return Validators.nullValidator;\n var regex;\n var regexStr;\n if (typeof pattern === 'string') {\n regexStr = '';\n if (pattern.charAt(0) !== '^')\n regexStr += '^';\n regexStr += pattern;\n if (pattern.charAt(pattern.length - 1) !== '$')\n regexStr += '$';\n regex = new RegExp(regexStr);\n }\n else {\n regexStr = pattern.toString();\n regex = pattern;\n }\n return function (control) {\n if (isEmptyInputValue(control.value)) {\n return null; // don't validate empty values to allow optional controls\n }\n var value = control.value;\n return regex.test(value) ? null :\n { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };\n };\n };\n /**\n * No-op validator.\n */\n /**\n * No-op validator.\n */\n Validators.nullValidator = /**\n * No-op validator.\n */\n function (c) { return null; };\n Validators.compose = function (validators) {\n if (!validators)\n return null;\n var presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n return _mergeErrors(_executeValidators(control, presentValidators));\n };\n };\n Validators.composeAsync = function (validators) {\n if (!validators)\n return null;\n var presentValidators = validators.filter(isPresent);\n if (presentValidators.length == 0)\n return null;\n return function (control) {\n var observables = _executeAsyncValidators(control, presentValidators).map(toObservable);\n return forkJoin(observables).pipe(map(_mergeErrors));\n };\n };\n return Validators;\n}());\nfunction isPresent(o) {\n return o != null;\n}\nfunction toObservable(r) {\n var obs = ɵisPromise(r) ? from(r) : r;\n if (!(ɵisObservable(obs))) {\n throw new Error(\"Expected validator to return Promise or Observable.\");\n }\n return obs;\n}\nfunction _executeValidators(control, validators) {\n return validators.map(function (v) { return v(control); });\n}\nfunction _executeAsyncValidators(control, validators) {\n return validators.map(function (v) { return v(control); });\n}\nfunction _mergeErrors(arrayOfErrors) {\n var res = arrayOfErrors.reduce(function (res, errors) {\n return errors != null ? __assign({}, (res), errors) : res;\n }, {});\n return Object.keys(res).length === 0 ? null : res;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 provide a `ControlValueAccessor` for form controls.\n *\n * See `DefaultValueAccessor` for how to implement one.\n *\n */\nvar NG_VALUE_ACCESSOR = new InjectionToken('NgValueAccessor');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CHECKBOX_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return CheckboxControlValueAccessor; }),\n multi: true,\n};\n/**\n * The accessor for writing a value and listening to changes on a checkbox input element.\n *\n * ### Example\n * ```\n * <input type=\"checkbox\" name=\"rememberLogin\" ngModel>\n * ```\n *\n *\n */\nvar CheckboxControlValueAccessor = /** @class */ (function () {\n function CheckboxControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n }\n CheckboxControlValueAccessor.prototype.writeValue = function (value) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', value);\n };\n CheckboxControlValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };\n CheckboxControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n CheckboxControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n CheckboxControlValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: '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 },] }\n ];\n /** @nocollapse */\n CheckboxControlValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n return CheckboxControlValueAccessor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 DEFAULT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return DefaultValueAccessor; }),\n multi: true\n};\n/**\n * We must check whether the agent is Android because composition events\n * behave differently between iOS and Android.\n */\nfunction _isAndroid() {\n var userAgent = ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';\n return /android (\\d+)/.test(userAgent.toLowerCase());\n}\n/**\n * Turn this mode on if you want form directives to buffer IME input until compositionend\n * @experimental\n */\nvar COMPOSITION_BUFFER_MODE = new InjectionToken('CompositionEventMode');\n/**\n * The default accessor for writing a value and listening to changes that is used by the\n * `NgModel`, `FormControlDirective`, and `FormControlName` directives.\n *\n * ### Example\n * ```\n * <input type=\"text\" name=\"searchQuery\" ngModel>\n * ```\n *\n *\n */\nvar DefaultValueAccessor = /** @class */ (function () {\n function DefaultValueAccessor(_renderer, _elementRef, _compositionMode) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._compositionMode = _compositionMode;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n /** Whether the user is creating a composition string (IME events). */\n this._composing = false;\n if (this._compositionMode == null) {\n this._compositionMode = !_isAndroid();\n }\n }\n DefaultValueAccessor.prototype.writeValue = function (value) {\n var normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n };\n DefaultValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };\n DefaultValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n DefaultValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n /** @internal */\n DefaultValueAccessor.prototype._handleInput = /** @internal */\n function (value) {\n if (!this._compositionMode || (this._compositionMode && !this._composing)) {\n this.onChange(value);\n }\n };\n /** @internal */\n /** @internal */\n DefaultValueAccessor.prototype._compositionStart = /** @internal */\n function () { this._composing = true; };\n /** @internal */\n /** @internal */\n DefaultValueAccessor.prototype._compositionEnd = /** @internal */\n function (value) {\n this._composing = false;\n this._compositionMode && this.onChange(value);\n };\n DefaultValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: '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 },] }\n ];\n /** @nocollapse */\n DefaultValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [COMPOSITION_BUFFER_MODE,] },] },\n ]; };\n return DefaultValueAccessor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 normalizeValidator(validator) {\n if (validator.validate) {\n return function (c) { return validator.validate(c); };\n }\n else {\n return validator;\n }\n}\nfunction normalizeAsyncValidator(validator) {\n if (validator.validate) {\n return function (c) { return validator.validate(c); };\n }\n else {\n return validator;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NUMBER_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return NumberValueAccessor; }),\n multi: true\n};\n/**\n * The accessor for writing a number value and listening to changes that is used by the\n * `NgModel`, `FormControlDirective`, and `FormControlName` directives.\n *\n * ### Example\n * ```\n * <input type=\"number\" [(ngModel)]=\"age\">\n * ```\n */\nvar NumberValueAccessor = /** @class */ (function () {\n function NumberValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n }\n NumberValueAccessor.prototype.writeValue = function (value) {\n // The value needs to be normalized for IE9, otherwise it is set to 'null' when null\n var normalizedValue = value == null ? '' : value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', normalizedValue);\n };\n NumberValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };\n };\n NumberValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n NumberValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n NumberValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: 'input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]',\n host: {\n '(change)': 'onChange($event.target.value)',\n '(input)': 'onChange($event.target.value)',\n '(blur)': 'onTouched()'\n },\n providers: [NUMBER_VALUE_ACCESSOR]\n },] }\n ];\n /** @nocollapse */\n NumberValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n return NumberValueAccessor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 unimplemented() {\n throw new Error('unimplemented');\n}\n/**\n * A base class that all control directive extend.\n * It binds a `FormControl` object to a DOM element.\n *\n * Used internally by Angular forms.\n *\n *\n */\nvar NgControl = /** @class */ (function (_super) {\n __extends(NgControl, _super);\n function NgControl() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /** @internal */\n _this._parent = null;\n _this.name = null;\n _this.valueAccessor = null;\n /** @internal */\n _this._rawValidators = [];\n /** @internal */\n _this._rawAsyncValidators = [];\n return _this;\n }\n Object.defineProperty(NgControl.prototype, \"validator\", {\n get: function () { return unimplemented(); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgControl.prototype, \"asyncValidator\", {\n get: function () { return unimplemented(); },\n enumerable: true,\n configurable: true\n });\n return NgControl;\n}(AbstractControlDirective));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 RADIO_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return RadioControlValueAccessor; }),\n multi: true\n};\n/**\n * Internal class used by Angular to uncheck radio buttons with the matching name.\n */\nvar RadioControlRegistry = /** @class */ (function () {\n function RadioControlRegistry() {\n this._accessors = [];\n }\n RadioControlRegistry.prototype.add = function (control, accessor) {\n this._accessors.push([control, accessor]);\n };\n RadioControlRegistry.prototype.remove = function (accessor) {\n for (var 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 RadioControlRegistry.prototype.select = function (accessor) {\n var _this = this;\n this._accessors.forEach(function (c) {\n if (_this._isSameGroup(c, accessor) && c[1] !== accessor) {\n c[1].fireUncheck(accessor.value);\n }\n });\n };\n RadioControlRegistry.prototype._isSameGroup = function (controlPair, accessor) {\n if (!controlPair[0].control)\n return false;\n return controlPair[0]._parent === accessor._control._parent &&\n controlPair[1].name === accessor.name;\n };\n RadioControlRegistry.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n RadioControlRegistry.ctorParameters = function () { return []; };\n return RadioControlRegistry;\n}());\n/**\n * @description\n *\n * Writes radio control values and listens to radio control changes.\n *\n * Used by `NgModel`, `FormControlDirective`, and `FormControlName`\n * to keep the view synced with the `FormControl` model.\n *\n * If you have imported the `FormsModule` or the `ReactiveFormsModule`, this\n * value accessor will be active on any radio control that has a form directive. You do\n * **not** need to add a special selector to activate it.\n *\n * ### How to use radio buttons with form directives\n *\n * To use radio buttons in a template-driven form, you'll want to ensure that radio buttons\n * in the same group have the same `name` attribute. Radio buttons with different `name`\n * attributes do not affect each other.\n *\n * {@example forms/ts/radioButtons/radio_button_example.ts region='TemplateDriven'}\n *\n * When using radio buttons in a reactive form, radio buttons in the same group should have the\n * same `formControlName`. You can also add a `name` attribute, but it's optional.\n *\n * {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}\n *\n * * **npm package**: `@angular/forms`\n *\n *\n */\nvar RadioControlValueAccessor = /** @class */ (function () {\n function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this._registry = _registry;\n this._injector = _injector;\n this.onChange = function () { };\n this.onTouched = function () { };\n }\n RadioControlValueAccessor.prototype.ngOnInit = function () {\n this._control = this._injector.get(NgControl);\n this._checkName();\n this._registry.add(this._control, this);\n };\n RadioControlValueAccessor.prototype.ngOnDestroy = function () { this._registry.remove(this); };\n RadioControlValueAccessor.prototype.writeValue = function (value) {\n this._state = value === this.value;\n this._renderer.setProperty(this._elementRef.nativeElement, 'checked', this._state);\n };\n RadioControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this._fn = fn;\n this.onChange = function () {\n fn(_this.value);\n _this._registry.select(_this);\n };\n };\n RadioControlValueAccessor.prototype.fireUncheck = function (value) { this.writeValue(value); };\n RadioControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n RadioControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n RadioControlValueAccessor.prototype._checkName = function () {\n if (this.name && this.formControlName && this.name !== this.formControlName) {\n this._throwNameError();\n }\n if (!this.name && this.formControlName)\n this.name = this.formControlName;\n };\n RadioControlValueAccessor.prototype._throwNameError = function () {\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 RadioControlValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: 'input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]',\n host: { '(change)': 'onChange()', '(blur)': 'onTouched()' },\n providers: [RADIO_VALUE_ACCESSOR]\n },] }\n ];\n /** @nocollapse */\n RadioControlValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n { type: RadioControlRegistry, },\n { type: Injector, },\n ]; };\n RadioControlValueAccessor.propDecorators = {\n \"name\": [{ type: Input },],\n \"formControlName\": [{ type: Input },],\n \"value\": [{ type: Input },],\n };\n return RadioControlValueAccessor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 RANGE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return RangeValueAccessor; }),\n multi: true\n};\n/**\n * The accessor for writing a range value and listening to changes that is used by the\n * `NgModel`, `FormControlDirective`, and `FormControlName` directives.\n *\n * ### Example\n * ```\n * <input type=\"range\" [(ngModel)]=\"age\" >\n * ```\n */\nvar RangeValueAccessor = /** @class */ (function () {\n function RangeValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n }\n RangeValueAccessor.prototype.writeValue = function (value) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', parseFloat(value));\n };\n RangeValueAccessor.prototype.registerOnChange = function (fn) {\n this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };\n };\n RangeValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n RangeValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n RangeValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: '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 },] }\n ];\n /** @nocollapse */\n RangeValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n return RangeValueAccessor;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 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 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 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 ngModelGroup: \"\\n <form>\\n <div ngModelGroup=\\\"person\\\">\\n <input [(ngModel)]=\\\"person.name\\\" name=\\\"firstName\\\">\\n </div>\\n </form>\",\n ngModelWithFormGroup: \"\\n <div [formGroup]=\\\"myGroup\\\">\\n <input formControlName=\\\"firstName\\\">\\n <input [(ngModel)]=\\\"showMoreControls\\\" [ngModelOptions]=\\\"{standalone: true}\\\">\\n </div>\\n \"\n};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ReactiveErrors = /** @class */ (function () {\n function ReactiveErrors() {\n }\n ReactiveErrors.controlParentException = function () {\n throw new Error(\"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 \" + FormErrorExamples.formControlName);\n };\n ReactiveErrors.ngModelGroupException = function () {\n throw new Error(\"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 \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n ReactiveErrors.missingFormException = function () {\n throw new Error(\"formGroup expects a FormGroup instance. Please pass one in.\\n\\n Example:\\n\\n \" + FormErrorExamples.formControlName);\n };\n ReactiveErrors.groupParentException = function () {\n throw new Error(\"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 \" + FormErrorExamples.formGroupName);\n };\n ReactiveErrors.arrayParentException = function () {\n throw new Error(\"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 \" + FormErrorExamples.formArrayName);\n };\n ReactiveErrors.disabledAttrWarning = function () {\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 ReactiveErrors.ngModelWarning = function (directiveName) {\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 Angular v7.\\n \\n For more information on this, see our API docs here:\\n https://angular.io/api/forms/\" + (directiveName === 'formControl' ? 'FormControlDirective'\n : 'FormControlName') + \"#use-with-ngmodel\\n \");\n };\n return ReactiveErrors;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SELECT_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return SelectControlValueAccessor; }),\n multi: true\n};\nfunction _buildValueString(id, value) {\n if (id == null)\n return \"\" + value;\n if (value && typeof value === 'object')\n value = 'Object';\n return (id + \": \" + value).slice(0, 50);\n}\nfunction _extractId(valueString) {\n return valueString.split(':')[0];\n}\n/**\n * @description\n *\n * Writes values and listens to changes on a select element.\n *\n * Used by `NgModel`, `FormControlDirective`, and `FormControlName`\n * to keep the view synced with the `FormControl` model.\n *\n * If you have imported the `FormsModule` or the `ReactiveFormsModule`, this\n * value accessor will be active on any select control that has a form directive. You do\n * **not** need to add a special selector to activate it.\n *\n * ### How to use select controls with form directives\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 * If your option values are simple strings, you can bind to the normal `value` property\n * on the option. If your option values happen to be objects (and you'd like to save the\n * selection in your form as an object), use `ngValue` instead:\n *\n * {@example forms/ts/selectControl/select_control_example.ts region='Component'}\n *\n * In reactive forms, you'll also want to add your form directive (`formControlName` or\n * `formControl`) on the main `<select>` tag. Like in the former example, you have the\n * choice of binding to the `value` or `ngValue` property on the select's options.\n *\n * {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}\n *\n * ### Caveat: 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 * #### Syntax\n *\n * ```\n * <select [compareWith]=\"compareFn\" [(ngModel)]=\"selectedCountries\">\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 * * **npm package**: `@angular/forms`\n *\n *\n */\nvar SelectControlValueAccessor = /** @class */ (function () {\n function SelectControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n this._compareWith = ɵlooseIdentical;\n }\n Object.defineProperty(SelectControlValueAccessor.prototype, \"compareWith\", {\n set: function (fn) {\n if (typeof fn !== 'function') {\n throw new Error(\"compareWith must be a function, but received \" + JSON.stringify(fn));\n }\n this._compareWith = fn;\n },\n enumerable: true,\n configurable: true\n });\n SelectControlValueAccessor.prototype.writeValue = function (value) {\n this.value = value;\n var id = this._getOptionId(value);\n if (id == null) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'selectedIndex', -1);\n }\n var valueString = _buildValueString(id, value);\n this._renderer.setProperty(this._elementRef.nativeElement, 'value', valueString);\n };\n SelectControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this.onChange = function (valueString) {\n _this.value = _this._getOptionValue(valueString);\n fn(_this.value);\n };\n };\n SelectControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n SelectControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n /** @internal */\n SelectControlValueAccessor.prototype._registerOption = /** @internal */\n function () { return (this._idCounter++).toString(); };\n /** @internal */\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionId = /** @internal */\n function (value) {\n try {\n for (var _a = __values(Array.from(this._optionMap.keys())), _b = _a.next(); !_b.done; _b = _a.next()) {\n var id = _b.value;\n if (this._compareWith(this._optionMap.get(id), value))\n return id;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n var e_1, _c;\n };\n /** @internal */\n /** @internal */\n SelectControlValueAccessor.prototype._getOptionValue = /** @internal */\n function (valueString) {\n var id = _extractId(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;\n };\n SelectControlValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: '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 },] }\n ];\n /** @nocollapse */\n SelectControlValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n SelectControlValueAccessor.propDecorators = {\n \"compareWith\": [{ type: Input },],\n };\n return SelectControlValueAccessor;\n}());\n/**\n * @description\n *\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * See docs for `SelectControlValueAccessor` for usage examples.\n *\n *\n */\nvar NgSelectOption = /** @class */ (function () {\n function NgSelectOption(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select)\n this.id = this._select._registerOption();\n }\n Object.defineProperty(NgSelectOption.prototype, \"ngValue\", {\n set: function (value) {\n if (this._select == null)\n 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 enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgSelectOption.prototype, \"value\", {\n set: function (value) {\n this._setElementValue(value);\n if (this._select)\n this._select.writeValue(this._select.value);\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n NgSelectOption.prototype._setElementValue = /** @internal */\n function (value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n };\n NgSelectOption.prototype.ngOnDestroy = function () {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n };\n NgSelectOption.decorators = [\n { type: Directive, args: [{ selector: 'option' },] }\n ];\n /** @nocollapse */\n NgSelectOption.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: Renderer2, },\n { type: SelectControlValueAccessor, decorators: [{ type: Optional }, { type: Host },] },\n ]; };\n NgSelectOption.propDecorators = {\n \"ngValue\": [{ type: Input, args: ['ngValue',] },],\n \"value\": [{ type: Input, args: ['value',] },],\n };\n return NgSelectOption;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SELECT_MULTIPLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(function () { return SelectMultipleControlValueAccessor; }),\n multi: true\n};\nfunction _buildValueString$1(id, value) {\n if (id == null)\n return \"\" + value;\n if (typeof value === 'string')\n value = \"'\" + value + \"'\";\n if (value && typeof value === 'object')\n value = 'Object';\n return (id + \": \" + value).slice(0, 50);\n}\nfunction _extractId$1(valueString) {\n return valueString.split(':')[0];\n}\n/**\n * The accessor for writing a value and listening to changes on a select element.\n *\n * ### Caveat: Options selection\n *\n * Angular uses object identity to select options. 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 multiple>` supports `compareWith`\n * input. `compareWith` takes a **function** which has two arguments: `option1` and `option2`.\n * If `compareWith` is given, Angular selects options by the return value of the function.\n *\n * #### Syntax\n *\n * ```\n * <select multiple [compareWith]=\"compareFn\" [(ngModel)]=\"selectedCountries\">\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 *\n */\nvar SelectMultipleControlValueAccessor = /** @class */ (function () {\n function SelectMultipleControlValueAccessor(_renderer, _elementRef) {\n this._renderer = _renderer;\n this._elementRef = _elementRef;\n /** @internal */\n this._optionMap = new Map();\n /** @internal */\n this._idCounter = 0;\n this.onChange = function (_) { };\n this.onTouched = function () { };\n this._compareWith = ɵlooseIdentical;\n }\n Object.defineProperty(SelectMultipleControlValueAccessor.prototype, \"compareWith\", {\n set: function (fn) {\n if (typeof fn !== 'function') {\n throw new Error(\"compareWith must be a function, but received \" + JSON.stringify(fn));\n }\n this._compareWith = fn;\n },\n enumerable: true,\n configurable: true\n });\n SelectMultipleControlValueAccessor.prototype.writeValue = function (value) {\n var _this = this;\n this.value = value;\n var optionSelectedStateSetter;\n if (Array.isArray(value)) {\n // convert values to ids\n var ids_1 = value.map(function (v) { return _this._getOptionId(v); });\n optionSelectedStateSetter = function (opt, o) { opt._setSelected(ids_1.indexOf(o.toString()) > -1); };\n }\n else {\n optionSelectedStateSetter = function (opt, o) { opt._setSelected(false); };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n };\n SelectMultipleControlValueAccessor.prototype.registerOnChange = function (fn) {\n var _this = this;\n this.onChange = function (_) {\n var selected = [];\n if (_.hasOwnProperty('selectedOptions')) {\n var options = _.selectedOptions;\n for (var i = 0; i < options.length; i++) {\n var opt = options.item(i);\n var val = _this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n else {\n var options = _.options;\n for (var i = 0; i < options.length; i++) {\n var opt = options.item(i);\n if (opt.selected) {\n var val = _this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n _this.value = selected;\n fn(selected);\n };\n };\n SelectMultipleControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };\n SelectMultipleControlValueAccessor.prototype.setDisabledState = function (isDisabled) {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n };\n /** @internal */\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._registerOption = /** @internal */\n function (value) {\n var id = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n };\n /** @internal */\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionId = /** @internal */\n function (value) {\n try {\n for (var _a = __values(Array.from(this._optionMap.keys())), _b = _a.next(); !_b.done; _b = _a.next()) {\n var id = _b.value;\n if (this._compareWith(this._optionMap.get(id)._value, value))\n return id;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n var e_1, _c;\n };\n /** @internal */\n /** @internal */\n SelectMultipleControlValueAccessor.prototype._getOptionValue = /** @internal */\n function (valueString) {\n var id = _extractId$1(valueString);\n return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;\n };\n SelectMultipleControlValueAccessor.decorators = [\n { type: Directive, args: [{\n selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: { '(change)': 'onChange($event.target)', '(blur)': 'onTouched()' },\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n },] }\n ];\n /** @nocollapse */\n SelectMultipleControlValueAccessor.ctorParameters = function () { return [\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n SelectMultipleControlValueAccessor.propDecorators = {\n \"compareWith\": [{ type: Input },],\n };\n return SelectMultipleControlValueAccessor;\n}());\n/**\n * Marks `<option>` as dynamic, so Angular can be notified when options change.\n *\n * ### Example\n *\n * ```\n * <select multiple name=\"city\" ngModel>\n * <option *ngFor=\"let c of cities\" [value]=\"c\"></option>\n * </select>\n * ```\n */\nvar NgSelectMultipleOption = /** @class */ (function () {\n function NgSelectMultipleOption(_element, _renderer, _select) {\n this._element = _element;\n this._renderer = _renderer;\n this._select = _select;\n if (this._select) {\n this.id = this._select._registerOption(this);\n }\n }\n Object.defineProperty(NgSelectMultipleOption.prototype, \"ngValue\", {\n set: function (value) {\n if (this._select == null)\n return;\n this._value = value;\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgSelectMultipleOption.prototype, \"value\", {\n set: function (value) {\n if (this._select) {\n this._value = value;\n this._setElementValue(_buildValueString$1(this.id, value));\n this._select.writeValue(this._select.value);\n }\n else {\n this._setElementValue(value);\n }\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n NgSelectMultipleOption.prototype._setElementValue = /** @internal */\n function (value) {\n this._renderer.setProperty(this._element.nativeElement, 'value', value);\n };\n /** @internal */\n /** @internal */\n NgSelectMultipleOption.prototype._setSelected = /** @internal */\n function (selected) {\n this._renderer.setProperty(this._element.nativeElement, 'selected', selected);\n };\n NgSelectMultipleOption.prototype.ngOnDestroy = function () {\n if (this._select) {\n this._select._optionMap.delete(this.id);\n this._select.writeValue(this._select.value);\n }\n };\n NgSelectMultipleOption.decorators = [\n { type: Directive, args: [{ selector: 'option' },] }\n ];\n /** @nocollapse */\n NgSelectMultipleOption.ctorParameters = function () { return [\n { type: ElementRef, },\n { type: Renderer2, },\n { type: SelectMultipleControlValueAccessor, decorators: [{ type: Optional }, { type: Host },] },\n ]; };\n NgSelectMultipleOption.propDecorators = {\n \"ngValue\": [{ type: Input, args: ['ngValue',] },],\n \"value\": [{ type: Input, args: ['value',] },],\n };\n return NgSelectMultipleOption;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 controlPath(name, parent) {\n return __spread((parent.path), [name]);\n}\nfunction setUpControl(control, dir) {\n if (!control)\n _throwError(dir, 'Cannot find control with');\n if (!dir.valueAccessor)\n _throwError(dir, 'No value accessor for form control with');\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 setUpViewChangePipeline(control, dir);\n setUpModelChangePipeline(control, dir);\n setUpBlurPipeline(control, dir);\n if (dir.valueAccessor.setDisabledState) {\n control.registerOnDisabledChange(function (isDisabled) { dir.valueAccessor.setDisabledState(isDisabled); });\n }\n // re-run validation when validator binding changes, e.g. minlength=3 -> minlength=4\n dir._rawValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });\n });\n dir._rawAsyncValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange)\n validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });\n });\n}\nfunction cleanUpControl(control, dir) {\n dir.valueAccessor.registerOnChange(function () { return _noControlError(dir); });\n dir.valueAccessor.registerOnTouched(function () { return _noControlError(dir); });\n dir._rawValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n dir._rawAsyncValidators.forEach(function (validator) {\n if (validator.registerOnValidatorChange) {\n validator.registerOnValidatorChange(null);\n }\n });\n if (control)\n control._clearChangeFns();\n}\nfunction setUpViewChangePipeline(control, dir) {\n dir.valueAccessor.registerOnChange(function (newValue) {\n control._pendingValue = newValue;\n control._pendingChange = true;\n control._pendingDirty = true;\n if (control.updateOn === 'change')\n updateControl(control, dir);\n });\n}\nfunction setUpBlurPipeline(control, dir) {\n dir.valueAccessor.registerOnTouched(function () {\n control._pendingTouched = true;\n if (control.updateOn === 'blur' && control._pendingChange)\n updateControl(control, dir);\n if (control.updateOn !== 'submit')\n control.markAsTouched();\n });\n}\nfunction updateControl(control, dir) {\n if (control._pendingDirty)\n control.markAsDirty();\n control.setValue(control._pendingValue, { emitModelToViewChange: false });\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n}\nfunction setUpModelChangePipeline(control, dir) {\n control.registerOnChange(function (newValue, emitModelEvent) {\n // control -> view\n // control -> view\n dir.valueAccessor.writeValue(newValue);\n // control -> ngModel\n if (emitModelEvent)\n dir.viewToModelUpdate(newValue);\n });\n}\nfunction setUpFormContainer(control, dir) {\n if (control == null)\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}\nfunction _noControlError(dir) {\n return _throwError(dir, 'There is no FormControl instance attached to form control element with');\n}\nfunction _throwError(dir, message) {\n var messageEnd;\n if (dir.path.length > 1) {\n messageEnd = \"path: '\" + dir.path.join(' -> ') + \"'\";\n }\n else if (dir.path[0]) {\n messageEnd = \"name: '\" + dir.path + \"'\";\n }\n else {\n messageEnd = 'unspecified name attribute';\n }\n throw new Error(message + \" \" + messageEnd);\n}\nfunction composeValidators(validators) {\n return validators != null ? Validators.compose(validators.map(normalizeValidator)) : null;\n}\nfunction composeAsyncValidators(validators) {\n return validators != null ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :\n null;\n}\nfunction isPropertyUpdated(changes, viewModel) {\n if (!changes.hasOwnProperty('model'))\n return false;\n var change = changes['model'];\n if (change.isFirstChange())\n return true;\n return !ɵlooseIdentical(viewModel, change.currentValue);\n}\nvar BUILTIN_ACCESSORS = [\n CheckboxControlValueAccessor,\n RangeValueAccessor,\n NumberValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n];\nfunction isBuiltInAccessor(valueAccessor) {\n return BUILTIN_ACCESSORS.some(function (a) { return valueAccessor.constructor === a; });\n}\nfunction syncPendingControls(form, directives) {\n form._syncPendingControls();\n directives.forEach(function (dir) {\n var control = dir.control;\n if (control.updateOn === 'submit' && control._pendingChange) {\n dir.viewToModelUpdate(control._pendingValue);\n control._pendingChange = false;\n }\n });\n}\n// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented\nfunction selectValueAccessor(dir, valueAccessors) {\n if (!valueAccessors)\n return null;\n if (!Array.isArray(valueAccessors))\n _throwError(dir, 'Value accessor was not provided as an array for form control with');\n var defaultAccessor = undefined;\n var builtinAccessor = undefined;\n var customAccessor = undefined;\n valueAccessors.forEach(function (v) {\n if (v.constructor === DefaultValueAccessor) {\n defaultAccessor = v;\n }\n else if (isBuiltInAccessor(v)) {\n if (builtinAccessor)\n _throwError(dir, 'More than one built-in value accessor matches form control with');\n builtinAccessor = v;\n }\n else {\n if (customAccessor)\n _throwError(dir, 'More than one custom value accessor matches form control with');\n customAccessor = v;\n }\n });\n if (customAccessor)\n return customAccessor;\n if (builtinAccessor)\n return builtinAccessor;\n if (defaultAccessor)\n return defaultAccessor;\n _throwError(dir, 'No valid value accessor for form control with');\n return null;\n}\nfunction removeDir(list, el) {\n var index = list.indexOf(el);\n if (index > -1)\n list.splice(index, 1);\n}\n// TODO(kara): remove after deprecation period\nfunction _ngModelWarning(name, type, instance, warningConfig) {\n if (!isDevMode() || warningConfig === 'never')\n return;\n if (((warningConfig === null || warningConfig === 'once') && !type._ngModelWarningSentOnce) ||\n (warningConfig === 'always' && !instance._ngModelWarningSent)) {\n ReactiveErrors.ngModelWarning(name);\n type._ngModelWarningSentOnce = true;\n instance._ngModelWarningSent = true;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 is a base class for code shared between `NgModelGroup` and `FormGroupName`.\n *\n *\n */\nvar AbstractFormGroupDirective = /** @class */ (function (_super) {\n __extends(AbstractFormGroupDirective, _super);\n function AbstractFormGroupDirective() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AbstractFormGroupDirective.prototype.ngOnInit = function () {\n this._checkParentType();\n this.formDirective.addFormGroup(this);\n };\n AbstractFormGroupDirective.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeFormGroup(this);\n }\n };\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"control\", {\n /**\n * Get the `FormGroup` backing this binding.\n */\n get: /**\n * Get the `FormGroup` backing this binding.\n */\n function () { return this.formDirective.getFormGroup(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"path\", {\n /**\n * Get the path to this control group.\n */\n get: /**\n * Get the path to this control group.\n */\n function () { return controlPath(this.name, this._parent); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"formDirective\", {\n /**\n * Get the `Form` to which this group belongs.\n */\n get: /**\n * Get the `Form` to which this group belongs.\n */\n function () { return this._parent ? this._parent.formDirective : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"validator\", {\n get: function () { return composeValidators(this._validators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractFormGroupDirective.prototype, \"asyncValidator\", {\n get: function () {\n return composeAsyncValidators(this._asyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n AbstractFormGroupDirective.prototype._checkParentType = /** @internal */\n function () { };\n return AbstractFormGroupDirective;\n}(ControlContainer));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 AbstractControlStatus = /** @class */ (function () {\n function AbstractControlStatus(cd) {\n this._cd = cd;\n }\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassUntouched\", {\n get: function () { return this._cd.control ? this._cd.control.untouched : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassTouched\", {\n get: function () { return this._cd.control ? this._cd.control.touched : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassPristine\", {\n get: function () { return this._cd.control ? this._cd.control.pristine : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassDirty\", {\n get: function () { return this._cd.control ? this._cd.control.dirty : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassValid\", {\n get: function () { return this._cd.control ? this._cd.control.valid : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassInvalid\", {\n get: function () { return this._cd.control ? this._cd.control.invalid : false; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControlStatus.prototype, \"ngClassPending\", {\n get: function () { return this._cd.control ? this._cd.control.pending : false; },\n enumerable: true,\n configurable: true\n });\n return AbstractControlStatus;\n}());\nvar 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 * Directive automatically applied to Angular form controls that sets CSS classes\n * based on control status. The following classes are applied as the properties\n * 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 *\n */\nvar NgControlStatus = /** @class */ (function (_super) {\n __extends(NgControlStatus, _super);\n function NgControlStatus(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatus.decorators = [\n { type: Directive, args: [{ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost },] }\n ];\n /** @nocollapse */\n NgControlStatus.ctorParameters = function () { return [\n { type: NgControl, decorators: [{ type: Self },] },\n ]; };\n return NgControlStatus;\n}(AbstractControlStatus));\n/**\n * Directive automatically applied to Angular form groups that sets CSS classes\n * based on control status (valid/invalid/dirty/etc).\n *\n *\n */\nvar NgControlStatusGroup = /** @class */ (function (_super) {\n __extends(NgControlStatusGroup, _super);\n function NgControlStatusGroup(cd) {\n return _super.call(this, cd) || this;\n }\n NgControlStatusGroup.decorators = [\n { type: Directive, args: [{\n selector: '[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]',\n host: ngControlStatusHost\n },] }\n ];\n /** @nocollapse */\n NgControlStatusGroup.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Self },] },\n ]; };\n return NgControlStatusGroup;\n}(AbstractControlStatus));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Indicates that a FormControl is valid, i.e. that no errors exist in the input value.\n */\nvar VALID = 'VALID';\n/**\n * Indicates that a FormControl is invalid, i.e. that an error exists in the input value.\n */\nvar INVALID = 'INVALID';\n/**\n * Indicates that a FormControl is pending, i.e. that async validation is occurring and\n * errors are not yet available for the input value.\n */\nvar PENDING = 'PENDING';\n/**\n * Indicates that a FormControl is disabled, i.e. that the control is exempt from ancestor\n * calculations of validity or value.\n */\nvar DISABLED = 'DISABLED';\nfunction _find(control, path, delimiter) {\n if (path == null)\n return null;\n if (!(path instanceof Array)) {\n path = path.split(delimiter);\n }\n if (path instanceof Array && (path.length === 0))\n return null;\n return path.reduce(function (v, name) {\n if (v instanceof FormGroup) {\n return v.controls[name] || null;\n }\n if (v instanceof FormArray) {\n return v.at(name) || null;\n }\n return null;\n }, control);\n}\nfunction coerceToValidator(validatorOrOpts) {\n var validator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators :\n validatorOrOpts);\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\nfunction coerceToAsyncValidator(asyncValidator, validatorOrOpts) {\n var origAsyncValidator = (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators :\n asyncValidator);\n return Array.isArray(origAsyncValidator) ? composeAsyncValidators(origAsyncValidator) :\n origAsyncValidator || null;\n}\nfunction isOptionsObj(validatorOrOpts) {\n return validatorOrOpts != null && !Array.isArray(validatorOrOpts) &&\n typeof validatorOrOpts === 'object';\n}\n/**\n * @description\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 */\nvar AbstractControl = /** @class */ (function () {\n /**\n * Initialize the AbstractControl instance.\n * @param validator The function that will determine the synchronous validity of this control.\n * @param asyncValidator The function that will determine the asynchronous validity of this\n * control.\n */\n function AbstractControl(validator, asyncValidator) {\n this.validator = validator;\n this.asyncValidator = asyncValidator;\n /** @internal */\n this._onCollectionChange = function () { };\n /**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n this.pristine = true;\n /**\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n */\n this.touched = false;\n /** @internal */\n this._onDisabledChange = [];\n }\n Object.defineProperty(AbstractControl.prototype, \"parent\", {\n /**\n * The parent control.\n */\n get: /**\n * The parent control.\n */\n function () { return this._parent; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"valid\", {\n /**\n * A control is `valid` when its `status === VALID`.\n *\n * In order to have this status, the control must have passed all its\n * validation checks.\n */\n get: /**\n * A control is `valid` when its `status === VALID`.\n *\n * In order to have this status, the control must have passed all its\n * validation checks.\n */\n function () { return this.status === VALID; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"invalid\", {\n /**\n * A control is `invalid` when its `status === INVALID`.\n *\n * In order to have this status, the control must have failed\n * at least one of its validation checks.\n */\n get: /**\n * A control is `invalid` when its `status === INVALID`.\n *\n * In order to have this status, the control must have failed\n * at least one of its validation checks.\n */\n function () { return this.status === INVALID; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"pending\", {\n /**\n * A control is `pending` when its `status === PENDING`.\n *\n * In order to have this status, the control must be in the\n * middle of conducting a validation check.\n */\n get: /**\n * A control is `pending` when its `status === PENDING`.\n *\n * In order to have this status, the control must be in the\n * middle of conducting a validation check.\n */\n function () { return this.status == PENDING; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"disabled\", {\n /**\n * A control is `disabled` when its `status === 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 get: /**\n * A control is `disabled` when its `status === 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 function () { return this.status === DISABLED; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"enabled\", {\n /**\n * A control is `enabled` as long as its `status !== DISABLED`.\n *\n * In other words, it has a status of `VALID`, `INVALID`, or\n * `PENDING`.\n */\n get: /**\n * A control is `enabled` as long as its `status !== DISABLED`.\n *\n * In other words, it has a status of `VALID`, `INVALID`, or\n * `PENDING`.\n */\n function () { return this.status !== DISABLED; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"dirty\", {\n /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n get: /**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n *\n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n */\n function () { return !this.pristine; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"untouched\", {\n /**\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n get: /**\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n */\n function () { return !this.touched; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AbstractControl.prototype, \"updateOn\", {\n /**\n * Returns the update strategy of the `AbstractControl` (i.e.\n * the event on which the control will update itself).\n * Possible values: `'change'` (default) | `'blur'` | `'submit'`\n */\n get: /**\n * Returns the update strategy of the `AbstractControl` (i.e.\n * the event on which the control will update itself).\n * Possible values: `'change'` (default) | `'blur'` | `'submit'`\n */\n function () {\n return this._updateOn ? this._updateOn : (this.parent ? this.parent.updateOn : 'change');\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this will overwrite any existing sync validators.\n */\n /**\n * Sets the synchronous validators that are active on this control. Calling\n * this will overwrite any existing sync validators.\n */\n AbstractControl.prototype.setValidators = /**\n * Sets the synchronous validators that are active on this control. Calling\n * this will overwrite any existing sync validators.\n */\n function (newValidator) {\n this.validator = coerceToValidator(newValidator);\n };\n /**\n * Sets the async validators that are active on this control. Calling this\n * will overwrite any existing async validators.\n */\n /**\n * Sets the async validators that are active on this control. Calling this\n * will overwrite any existing async validators.\n */\n AbstractControl.prototype.setAsyncValidators = /**\n * Sets the async validators that are active on this control. Calling this\n * will overwrite any existing async validators.\n */\n function (newValidator) {\n this.asyncValidator = coerceToAsyncValidator(newValidator);\n };\n /**\n * Empties out the sync validator list.\n */\n /**\n * Empties out the sync validator list.\n */\n AbstractControl.prototype.clearValidators = /**\n * Empties out the sync validator list.\n */\n function () { this.validator = null; };\n /**\n * Empties out the async validator list.\n */\n /**\n * Empties out the async validator list.\n */\n AbstractControl.prototype.clearAsyncValidators = /**\n * Empties out the async validator list.\n */\n function () { this.asyncValidator = null; };\n /**\n * Marks the control as `touched`.\n *\n * This will also mark all direct ancestors as `touched` to maintain\n * the model.\n */\n /**\n * Marks the control as `touched`.\n *\n * This will also mark all direct ancestors as `touched` to maintain\n * the model.\n */\n AbstractControl.prototype.markAsTouched = /**\n * Marks the control as `touched`.\n *\n * This will also mark all direct ancestors as `touched` to maintain\n * the model.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = true;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n };\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, it will also mark all children as `untouched`\n * to maintain the model, and re-calculate the `touched` status of all parent\n * controls.\n */\n /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, it will also mark all children as `untouched`\n * to maintain the model, and re-calculate the `touched` status of all parent\n * controls.\n */\n AbstractControl.prototype.markAsUntouched = /**\n * Marks the control as `untouched`.\n *\n * If the control has any children, it will also mark all children as `untouched`\n * to maintain the model, and re-calculate the `touched` status of all parent\n * controls.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = false;\n this._pendingTouched = false;\n this._forEachChild(function (control) { control.markAsUntouched({ onlySelf: true }); });\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n };\n /**\n * Marks the control as `dirty`.\n *\n * This will also mark all direct ancestors as `dirty` to maintain\n * the model.\n */\n /**\n * Marks the control as `dirty`.\n *\n * This will also mark all direct ancestors as `dirty` to maintain\n * the model.\n */\n AbstractControl.prototype.markAsDirty = /**\n * Marks the control as `dirty`.\n *\n * This will also mark all direct ancestors as `dirty` to maintain\n * the model.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = false;\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n };\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, it will also mark all children as `pristine`\n * to maintain the model, and re-calculate the `pristine` status of all parent\n * controls.\n */\n /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, it will also mark all children as `pristine`\n * to maintain the model, and re-calculate the `pristine` status of all parent\n * controls.\n */\n AbstractControl.prototype.markAsPristine = /**\n * Marks the control as `pristine`.\n *\n * If the control has any children, it will also mark all children as `pristine`\n * to maintain the model, and re-calculate the `pristine` status of all parent\n * controls.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = true;\n this._pendingDirty = false;\n this._forEachChild(function (control) { control.markAsPristine({ onlySelf: true }); });\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n };\n /**\n * Marks the control as `pending`.\n *\n * An event will be emitted by `statusChanges` by default.\n *\n * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.\n */\n /**\n * Marks the control as `pending`.\n *\n * An event will be emitted by `statusChanges` by default.\n *\n * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.\n */\n AbstractControl.prototype.markAsPending = /**\n * Marks the control as `pending`.\n *\n * An event will be emitted by `statusChanges` by default.\n *\n * Passing `false` for `emitEvent` will cause `statusChanges` to not event an event.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.status = PENDING;\n if (opts.emitEvent !== false) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n };\n /**\n * Disables the control. This means the control will be 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 will be disabled to maintain the model.\n */\n /**\n * Disables the control. This means the control will be 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 will be disabled to maintain the model.\n */\n AbstractControl.prototype.disable = /**\n * Disables the control. This means the control will be 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 will be disabled to maintain the model.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.status = DISABLED;\n this.errors = null;\n this._forEachChild(function (control) { control.disable(__assign({}, opts, { onlySelf: true })); });\n this._updateValue();\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n this._updateAncestors(opts);\n this._onDisabledChange.forEach(function (changeFn) { return changeFn(true); });\n };\n /**\n * Enables the control. This means the control will be included in validation checks and\n * the aggregate value of its parent. Its status is re-calculated based on its value and\n * its validators.\n *\n * If the control has children, all children will be enabled.\n */\n /**\n * Enables the control. This means the control will be included in validation checks and\n * the aggregate value of its parent. Its status is re-calculated based on its value and\n * its validators.\n *\n * If the control has children, all children will be enabled.\n */\n AbstractControl.prototype.enable = /**\n * Enables the control. This means the control will be included in validation checks and\n * the aggregate value of its parent. Its status is re-calculated based on its value and\n * its validators.\n *\n * If the control has children, all children will be enabled.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.status = VALID;\n this._forEachChild(function (control) { control.enable(__assign({}, opts, { onlySelf: true })); });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n this._updateAncestors(opts);\n this._onDisabledChange.forEach(function (changeFn) { return changeFn(false); });\n };\n AbstractControl.prototype._updateAncestors = function (opts) {\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n this._parent._updatePristine();\n this._parent._updateTouched();\n }\n };\n AbstractControl.prototype.setParent = function (parent) { this._parent = parent; };\n /**\n * Re-calculates the value and validation status of the control.\n *\n * By default, it will also update the value and validity of its ancestors.\n */\n /**\n * Re-calculates the value and validation status of the control.\n *\n * By default, it will also update the value and validity of its ancestors.\n */\n AbstractControl.prototype.updateValueAndValidity = /**\n * Re-calculates the value and validation status of the control.\n *\n * By default, it will also update the value and validity of its ancestors.\n */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this._setInitialStatus();\n this._updateValue();\n if (this.enabled) {\n this._cancelExistingSubscription();\n this.errors = this._runValidator();\n this.status = this._calculateStatus();\n if (this.status === VALID || this.status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n if (opts.emitEvent !== false) {\n this.valueChanges.emit(this.value);\n this.statusChanges.emit(this.status);\n }\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._updateTreeValidity = /** @internal */\n function (opts) {\n if (opts === void 0) { opts = { emitEvent: true }; }\n this._forEachChild(function (ctrl) { return ctrl._updateTreeValidity(opts); });\n this.updateValueAndValidity({ onlySelf: true, emitEvent: opts.emitEvent });\n };\n AbstractControl.prototype._setInitialStatus = function () {\n this.status = this._allControlsDisabled() ? DISABLED : VALID;\n };\n AbstractControl.prototype._runValidator = function () {\n return this.validator ? this.validator(this) : null;\n };\n AbstractControl.prototype._runAsyncValidator = function (emitEvent) {\n var _this = this;\n if (this.asyncValidator) {\n this.status = PENDING;\n var obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription =\n obs.subscribe(function (errors) { return _this.setErrors(errors, { emitEvent: emitEvent }); });\n }\n };\n AbstractControl.prototype._cancelExistingSubscription = function () {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n }\n };\n /**\n * Sets errors on a form control.\n *\n * This is used when validations are run manually by the user, rather than automatically.\n *\n * Calling `setErrors` will also update the validity of the parent control.\n *\n * ### Example\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 /**\n * Sets errors on a form control.\n *\n * This is used when validations are run manually by the user, rather than automatically.\n *\n * Calling `setErrors` will also update the validity of the parent control.\n *\n * ### Example\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 AbstractControl.prototype.setErrors = /**\n * Sets errors on a form control.\n *\n * This is used when validations are run manually by the user, rather than automatically.\n *\n * Calling `setErrors` will also update the validity of the parent control.\n *\n * ### Example\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 function (errors, opts) {\n if (opts === void 0) { opts = {}; }\n this.errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n };\n /**\n * Retrieves a child control given the control's name or path.\n *\n * Paths can be passed in as an array or a string delimited by a dot.\n *\n * To get a 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 /**\n * Retrieves a child control given the control's name or path.\n *\n * Paths can be passed in as an array or a string delimited by a dot.\n *\n * To get a 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 AbstractControl.prototype.get = /**\n * Retrieves a child control given the control's name or path.\n *\n * Paths can be passed in as an array or a string delimited by a dot.\n *\n * To get a 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 function (path) { return _find(this, path, '.'); };\n /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n AbstractControl.prototype.getError = /**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n *\n * If no path is given, it checks for the error on the present control.\n */\n function (errorCode, path) {\n var control = path ? this.get(path) : this;\n return control && control.errors ? control.errors[errorCode] : null;\n };\n /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n AbstractControl.prototype.hasError = /**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n *\n * If no path is given, it checks for the error on the present control.\n */\n function (errorCode, path) { return !!this.getError(errorCode, path); };\n Object.defineProperty(AbstractControl.prototype, \"root\", {\n /**\n * Retrieves the top-level ancestor of this control.\n */\n get: /**\n * Retrieves the top-level ancestor of this control.\n */\n function () {\n var x = this;\n while (x._parent) {\n x = x._parent;\n }\n return x;\n },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n AbstractControl.prototype._updateControlsErrors = /** @internal */\n function (emitEvent) {\n this.status = this._calculateStatus();\n if (emitEvent) {\n this.statusChanges.emit(this.status);\n }\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._initObservables = /** @internal */\n function () {\n this.valueChanges = new EventEmitter();\n this.statusChanges = new EventEmitter();\n };\n AbstractControl.prototype._calculateStatus = function () {\n if (this._allControlsDisabled())\n return DISABLED;\n if (this.errors)\n return INVALID;\n if (this._anyControlsHaveStatus(PENDING))\n return PENDING;\n if (this._anyControlsHaveStatus(INVALID))\n return INVALID;\n return VALID;\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._anyControlsHaveStatus = /** @internal */\n function (status) {\n return this._anyControls(function (control) { return control.status === status; });\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._anyControlsDirty = /** @internal */\n function () {\n return this._anyControls(function (control) { return control.dirty; });\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._anyControlsTouched = /** @internal */\n function () {\n return this._anyControls(function (control) { return control.touched; });\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._updatePristine = /** @internal */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.pristine = !this._anyControlsDirty();\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._updateTouched = /** @internal */\n function (opts) {\n if (opts === void 0) { opts = {}; }\n this.touched = this._anyControlsTouched();\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._isBoxedValue = /** @internal */\n function (formState) {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._registerOnCollectionChange = /** @internal */\n function (fn) { this._onCollectionChange = fn; };\n /** @internal */\n /** @internal */\n AbstractControl.prototype._setUpdateStrategy = /** @internal */\n function (opts) {\n if (isOptionsObj(opts) && opts.updateOn != null) {\n this._updateOn = (opts.updateOn);\n }\n };\n return AbstractControl;\n}());\n/**\n * @description\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`.\n *\n * When instantiating a `FormControl`, you can pass in an initial value as the\n * first argument. Example:\n *\n * ```ts\n * const ctrl = new FormControl('some value');\n * console.log(ctrl.value); // 'some value'\n *```\n *\n * You can also initialize the control with a form state object on instantiation,\n * which includes both the value and whether or not the control is disabled.\n * You can't use the value key without the disabled key; both are required\n * to use this way of initialization.\n *\n * ```ts\n * const ctrl = new FormControl({value: 'n/a', disabled: true});\n * console.log(ctrl.value); // 'n/a'\n * console.log(ctrl.status); // 'DISABLED'\n * ```\n *\n * The second `FormControl` argument can accept one of three things:\n * * a sync validator function\n * * an array of sync validator functions\n * * an options object containing validator and/or async validator functions\n *\n * Example of a single sync validator function:\n *\n * ```ts\n * const ctrl = new FormControl('', Validators.required);\n * console.log(ctrl.value); // ''\n * console.log(ctrl.status); // 'INVALID'\n * ```\n *\n * Example using options object:\n *\n * ```ts\n * const ctrl = new FormControl('', {\n * validators: Validators.required,\n * asyncValidators: myAsyncValidator\n * });\n * ```\n *\n * The options object can also be used to define when the control should update.\n * By default, the value and validity of a control updates whenever the value\n * changes. You can configure it to update on the blur event instead by setting\n * the `updateOn` option to `'blur'`.\n *\n * ```ts\n * const c = new FormControl('', { updateOn: 'blur' });\n * ```\n *\n * You can also set `updateOn` to `'submit'`, which will delay value and validity\n * updates until the parent form of the control fires a submit event.\n *\n * See its superclass, `AbstractControl`, for more properties and methods.\n *\n * * **npm package**: `@angular/forms`\n *\n *\n */\nvar FormControl = /** @class */ (function (_super) {\n __extends(FormControl, _super);\n function FormControl(formState, validatorOrOpts, asyncValidator) {\n if (formState === void 0) { formState = null; }\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n /** @internal */\n _this._onChange = [];\n _this._applyFormState(formState);\n _this._setUpdateStrategy(validatorOrOpts);\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n _this._initObservables();\n return _this;\n }\n /**\n * Set the value of the form control to `value`.\n *\n * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`\n * and not its parent component. This defaults to false.\n *\n * If `emitEvent` is `true`, this\n * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults\n * to true (as it falls through to `updateValueAndValidity`).\n *\n * If `emitModelToViewChange` is `true`, the view will be notified about the new value\n * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not\n * specified.\n *\n * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the\n * model. This is the default behavior if `emitViewToModelChange` is not specified.\n */\n /**\n * Set the value of the form control to `value`.\n *\n * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`\n * and not its parent component. This defaults to false.\n *\n * If `emitEvent` is `true`, this\n * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults\n * to true (as it falls through to `updateValueAndValidity`).\n *\n * If `emitModelToViewChange` is `true`, the view will be notified about the new value\n * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not\n * specified.\n *\n * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the\n * model. This is the default behavior if `emitViewToModelChange` is not specified.\n */\n FormControl.prototype.setValue = /**\n * Set the value of the form control to `value`.\n *\n * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`\n * and not its parent component. This defaults to false.\n *\n * If `emitEvent` is `true`, this\n * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults\n * to true (as it falls through to `updateValueAndValidity`).\n *\n * If `emitModelToViewChange` is `true`, the view will be notified about the new value\n * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not\n * specified.\n *\n * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the\n * model. This is the default behavior if `emitViewToModelChange` is not specified.\n */\n function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this.value = this._pendingValue = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach(function (changeFn) { return changeFn(_this.value, options.emitViewToModelChange !== false); });\n }\n this.updateValueAndValidity(options);\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 /**\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 FormControl.prototype.patchValue = /**\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 function (value, options) {\n if (options === void 0) { options = {}; }\n this.setValue(value, options);\n };\n /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * You can also 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 * Ex:\n *\n * ```ts\n * this.control.reset('Nancy');\n *\n * console.log(this.control.value); // 'Nancy'\n * ```\n *\n * OR\n *\n * ```\n * this.control.reset({value: 'Nancy', disabled: true});\n *\n * console.log(this.control.value); // 'Nancy'\n * console.log(this.control.status); // 'DISABLED'\n * ```\n */\n /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * You can also 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 * Ex:\n *\n * ```ts\n * this.control.reset('Nancy');\n *\n * console.log(this.control.value); // 'Nancy'\n * ```\n *\n * OR\n *\n * ```\n * this.control.reset({value: 'Nancy', disabled: true});\n *\n * console.log(this.control.value); // 'Nancy'\n * console.log(this.control.status); // 'DISABLED'\n * ```\n */\n FormControl.prototype.reset = /**\n * Resets the form control. This means by default:\n *\n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n *\n * You can also 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 * Ex:\n *\n * ```ts\n * this.control.reset('Nancy');\n *\n * console.log(this.control.value); // 'Nancy'\n * ```\n *\n * OR\n *\n * ```\n * this.control.reset({value: 'Nancy', disabled: true});\n *\n * console.log(this.control.value); // 'Nancy'\n * console.log(this.control.status); // 'DISABLED'\n * ```\n */\n function (formState, options) {\n if (formState === void 0) { formState = null; }\n if (options === void 0) { options = {}; }\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 * @internal\n */\n /**\n * @internal\n */\n FormControl.prototype._updateValue = /**\n * @internal\n */\n function () { };\n /**\n * @internal\n */\n /**\n * @internal\n */\n FormControl.prototype._anyControls = /**\n * @internal\n */\n function (condition) { return false; };\n /**\n * @internal\n */\n /**\n * @internal\n */\n FormControl.prototype._allControlsDisabled = /**\n * @internal\n */\n function () { return this.disabled; };\n /**\n * Register a listener for change events.\n */\n /**\n * Register a listener for change events.\n */\n FormControl.prototype.registerOnChange = /**\n * Register a listener for change events.\n */\n function (fn) { this._onChange.push(fn); };\n /**\n * @internal\n */\n /**\n * @internal\n */\n FormControl.prototype._clearChangeFns = /**\n * @internal\n */\n function () {\n this._onChange = [];\n this._onDisabledChange = [];\n this._onCollectionChange = function () { };\n };\n /**\n * Register a listener for disabled events.\n */\n /**\n * Register a listener for disabled events.\n */\n FormControl.prototype.registerOnDisabledChange = /**\n * Register a listener for disabled events.\n */\n function (fn) {\n this._onDisabledChange.push(fn);\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n FormControl.prototype._forEachChild = /**\n * @internal\n */\n function (cb) { };\n /** @internal */\n /** @internal */\n FormControl.prototype._syncPendingControls = /** @internal */\n function () {\n if (this.updateOn === 'submit') {\n if (this._pendingDirty)\n this.markAsDirty();\n if (this._pendingTouched)\n 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 FormControl.prototype._applyFormState = function (formState) {\n if (this._isBoxedValue(formState)) {\n this.value = this._pendingValue = formState.value;\n formState.disabled ? this.disable({ onlySelf: true, emitEvent: false }) :\n this.enable({ onlySelf: true, emitEvent: false });\n }\n else {\n this.value = this._pendingValue = formState;\n }\n };\n return FormControl;\n}(AbstractControl));\n/**\n * @description\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 statuses\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 will be the name under which it is registered.\n *\n * ### Example\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 * You can also 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 * ### Example\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 can alternatively 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 * The options object can also be 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 will 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 * * **npm package**: `@angular/forms`\n *\n *\n */\nvar FormGroup = /** @class */ (function (_super) {\n __extends(FormGroup, _super);\n function FormGroup(controls, validatorOrOpts, asyncValidator) {\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n _this.controls = controls;\n _this._initObservables();\n _this._setUpdateStrategy(validatorOrOpts);\n _this._setUpControls();\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n return _this;\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, so for most cases you'll want\n * to use {@link FormGroup#addControl addControl} instead.\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, so for most cases you'll want\n * to use {@link FormGroup#addControl addControl} instead.\n */\n FormGroup.prototype.registerControl = /**\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, so for most cases you'll want\n * to use {@link FormGroup#addControl addControl} instead.\n */\n function (name, control) {\n if (this.controls[name])\n return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n };\n /**\n * Add a control to this group.\n */\n /**\n * Add a control to this group.\n */\n FormGroup.prototype.addControl = /**\n * Add a control to this group.\n */\n function (name, control) {\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Remove a control from this group.\n */\n /**\n * Remove a control from this group.\n */\n FormGroup.prototype.removeControl = /**\n * Remove a control from this group.\n */\n function (name) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(function () { });\n delete (this.controls[name]);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Replace an existing control.\n */\n /**\n * Replace an existing control.\n */\n FormGroup.prototype.setControl = /**\n * Replace an existing control.\n */\n function (name, control) {\n if (this.controls[name])\n this.controls[name]._registerOnCollectionChange(function () { });\n delete (this.controls[name]);\n if (control)\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * It will return 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 /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * It will return 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 FormGroup.prototype.contains = /**\n * Check whether there is an enabled control with the given name in the group.\n *\n * It will return 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 function (controlName) {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\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 * ### Example\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.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n *\n * ```\n * @throws This method performs strict checks, so it will throw 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 /**\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 * ### Example\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.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n *\n * ```\n * @throws This method performs strict checks, so it will throw 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 FormGroup.prototype.setValue = /**\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 * ### Example\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.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n *\n * ```\n * @throws This method performs strict checks, so it will throw 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 function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this._checkAllValuesPresent(value);\n Object.keys(value).forEach(function (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 * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and will do 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 * ### Example\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 */\n /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and will do 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 * ### Example\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 */\n FormGroup.prototype.patchValue = /**\n * Patches the value of the `FormGroup`. It accepts an object with control\n * names as keys, and will do 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 * ### Example\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 */\n function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n Object.keys(value).forEach(function (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 * Resets the `FormGroup`. This means by default:\n *\n * * The group and all descendants are marked `pristine`\n * * The group and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also 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 * can be a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * ### Example\n *\n * ```ts\n * this.form.reset({first: 'name', last: 'last name'});\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * - OR -\n *\n * ```\n * this.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 /**\n * Resets the `FormGroup`. This means by default:\n *\n * * The group and all descendants are marked `pristine`\n * * The group and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also 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 * can be a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * ### Example\n *\n * ```ts\n * this.form.reset({first: 'name', last: 'last name'});\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * - OR -\n *\n * ```\n * this.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 FormGroup.prototype.reset = /**\n * Resets the `FormGroup`. This means by default:\n *\n * * The group and all descendants are marked `pristine`\n * * The group and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also 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 * can be a standalone value or a form state object with both a value and a disabled\n * status.\n *\n * ### Example\n *\n * ```ts\n * this.form.reset({first: 'name', last: 'last name'});\n *\n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * ```\n *\n * - OR -\n *\n * ```\n * this.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 function (value, options) {\n if (value === void 0) { value = {}; }\n if (options === void 0) { options = {}; }\n this._forEachChild(function (control, name) {\n control.reset(value[name], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n this._updatePristine(options);\n this._updateTouched(options);\n };\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the group.\n */\n /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the group.\n */\n FormGroup.prototype.getRawValue = /**\n * The aggregate value of the `FormGroup`, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the group.\n */\n function () {\n return this._reduceChildren({}, function (acc, control, name) {\n acc[name] = control instanceof FormControl ? control.value : control.getRawValue();\n return acc;\n });\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._syncPendingControls = /** @internal */\n function () {\n var subtreeUpdated = this._reduceChildren(false, function (updated, child) {\n return child._syncPendingControls() ? true : updated;\n });\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._throwIfControlMissing = /** @internal */\n function (name) {\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 /** @internal */\n /** @internal */\n FormGroup.prototype._forEachChild = /** @internal */\n function (cb) {\n var _this = this;\n Object.keys(this.controls).forEach(function (k) { return cb(_this.controls[k], k); });\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._setUpControls = /** @internal */\n function () {\n var _this = this;\n this._forEachChild(function (control) {\n control.setParent(_this);\n control._registerOnCollectionChange(_this._onCollectionChange);\n });\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._updateValue = /** @internal */\n function () { this.value = this._reduceValue(); };\n /** @internal */\n /** @internal */\n FormGroup.prototype._anyControls = /** @internal */\n function (condition) {\n var _this = this;\n var res = false;\n this._forEachChild(function (control, name) {\n res = res || (_this.contains(name) && condition(control));\n });\n return res;\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._reduceValue = /** @internal */\n function () {\n var _this = this;\n return this._reduceChildren({}, function (acc, control, name) {\n if (control.enabled || _this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._reduceChildren = /** @internal */\n function (initValue, fn) {\n var res = initValue;\n this._forEachChild(function (control, name) { res = fn(res, control, name); });\n return res;\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._allControlsDisabled = /** @internal */\n function () {\n try {\n for (var _a = __values(Object.keys(this.controls)), _b = _a.next(); !_b.done; _b = _a.next()) {\n var controlName = _b.value;\n if (this.controls[controlName].enabled) {\n return false;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n var e_1, _c;\n };\n /** @internal */\n /** @internal */\n FormGroup.prototype._checkAllValuesPresent = /** @internal */\n function (value) {\n this._forEachChild(function (control, name) {\n if (value[name] === undefined) {\n throw new Error(\"Must supply a value for form control with name: '\" + name + \"'.\");\n }\n });\n };\n return FormGroup;\n}(AbstractControl));\n/**\n * @description\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 statuses 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 * When instantiating a `FormArray`, pass in an array of child controls as the first\n * argument.\n *\n * ### Example\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 * You can also 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 can be 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 * The options object can also be 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 will default to 'blur', unless the child\n * has explicitly specified a different `updateOn` value.\n *\n * ```ts\n * const c = new FormArray([\n * new FormControl()\n * ], {updateOn: 'blur'});\n * ```\n *\n * ### Adding or removing controls\n *\n * To change the controls in the array, use the `push`, `insert`, or `removeAt` 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 will result in strange and unexpected behavior such\n * as broken change detection.\n *\n * * **npm package**: `@angular/forms`\n *\n *\n */\nvar FormArray = /** @class */ (function (_super) {\n __extends(FormArray, _super);\n function FormArray(controls, validatorOrOpts, asyncValidator) {\n var _this = _super.call(this, coerceToValidator(validatorOrOpts), coerceToAsyncValidator(asyncValidator, validatorOrOpts)) || this;\n _this.controls = controls;\n _this._initObservables();\n _this._setUpdateStrategy(validatorOrOpts);\n _this._setUpControls();\n _this.updateValueAndValidity({ onlySelf: true, emitEvent: false });\n return _this;\n }\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n */\n /**\n * Get the `AbstractControl` at the given `index` in the array.\n */\n FormArray.prototype.at = /**\n * Get the `AbstractControl` at the given `index` in the array.\n */\n function (index) { return this.controls[index]; };\n /**\n * Insert a new `AbstractControl` at the end of the array.\n */\n /**\n * Insert a new `AbstractControl` at the end of the array.\n */\n FormArray.prototype.push = /**\n * Insert a new `AbstractControl` at the end of the array.\n */\n function (control) {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n /** Insert a new `AbstractControl` at the given `index` in the array. */\n /** Insert a new `AbstractControl` at the given `index` in the array. */\n FormArray.prototype.insert = /** Insert a new `AbstractControl` at the given `index` in the array. */\n function (index, control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n this.updateValueAndValidity();\n };\n /** Remove the control at the given `index` in the array. */\n /** Remove the control at the given `index` in the array. */\n FormArray.prototype.removeAt = /** Remove the control at the given `index` in the array. */\n function (index) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(function () { });\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n };\n /**\n * Replace an existing control.\n */\n /**\n * Replace an existing control.\n */\n FormArray.prototype.setControl = /**\n * Replace an existing control.\n */\n function (index, control) {\n if (this.controls[index])\n this.controls[index]._registerOnCollectionChange(function () { });\n this.controls.splice(index, 1);\n if (control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n }\n this.updateValueAndValidity();\n this._onCollectionChange();\n };\n Object.defineProperty(FormArray.prototype, \"length\", {\n /**\n * Length of the control array.\n */\n get: /**\n * Length of the control array.\n */\n function () { return this.controls.length; },\n enumerable: true,\n configurable: true\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, so it will throw 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 * ### Example\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 /**\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, so it will throw 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 * ### Example\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 FormArray.prototype.setValue = /**\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, so it will throw 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 * ### Example\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 function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n this._checkAllValuesPresent(value);\n value.forEach(function (newValue, index) {\n _this._throwIfControlMissing(index);\n _this.at(index).setValue(newValue, { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n };\n /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and will do 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 * ### Example\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 /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and will do 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 * ### Example\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 FormArray.prototype.patchValue = /**\n * Patches the value of the `FormArray`. It accepts an array that matches the\n * structure of the control, and will do 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 * ### Example\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 function (value, options) {\n var _this = this;\n if (options === void 0) { options = {}; }\n value.forEach(function (newValue, index) {\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 * Resets the `FormArray`. This means by default:\n *\n * * The array and all descendants are marked `pristine`\n * * The array and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state can be a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * ### Example\n *\n * ```ts\n * this.arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * - OR -\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 /**\n * Resets the `FormArray`. This means by default:\n *\n * * The array and all descendants are marked `pristine`\n * * The array and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state can be a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * ### Example\n *\n * ```ts\n * this.arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * - OR -\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 FormArray.prototype.reset = /**\n * Resets the `FormArray`. This means by default:\n *\n * * The array and all descendants are marked `pristine`\n * * The array and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n *\n * You can also reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state can be a standalone value\n * or a form state object with both a value and a disabled status.\n *\n * ### Example\n *\n * ```ts\n * this.arr.reset(['name', 'last name']);\n *\n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n *\n * - OR -\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 function (value, options) {\n if (value === void 0) { value = []; }\n if (options === void 0) { options = {}; }\n this._forEachChild(function (control, index) {\n control.reset(value[index], { onlySelf: true, emitEvent: options.emitEvent });\n });\n this.updateValueAndValidity(options);\n this._updatePristine(options);\n this._updateTouched(options);\n };\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the array.\n */\n /**\n * The aggregate value of the array, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the array.\n */\n FormArray.prototype.getRawValue = /**\n * The aggregate value of the array, including any disabled controls.\n *\n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the array.\n */\n function () {\n return this.controls.map(function (control) {\n return control instanceof FormControl ? control.value : control.getRawValue();\n });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._syncPendingControls = /** @internal */\n function () {\n var subtreeUpdated = this.controls.reduce(function (updated, child) {\n return child._syncPendingControls() ? true : updated;\n }, false);\n if (subtreeUpdated)\n this.updateValueAndValidity({ onlySelf: true });\n return subtreeUpdated;\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._throwIfControlMissing = /** @internal */\n function (index) {\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 /** @internal */\n /** @internal */\n FormArray.prototype._forEachChild = /** @internal */\n function (cb) {\n this.controls.forEach(function (control, index) { cb(control, index); });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._updateValue = /** @internal */\n function () {\n var _this = this;\n this.value =\n this.controls.filter(function (control) { return control.enabled || _this.disabled; })\n .map(function (control) { return control.value; });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._anyControls = /** @internal */\n function (condition) {\n return this.controls.some(function (control) { return control.enabled && condition(control); });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._setUpControls = /** @internal */\n function () {\n var _this = this;\n this._forEachChild(function (control) { return _this._registerControl(control); });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._checkAllValuesPresent = /** @internal */\n function (value) {\n this._forEachChild(function (control, i) {\n if (value[i] === undefined) {\n throw new Error(\"Must supply a value for form control at index: \" + i + \".\");\n }\n });\n };\n /** @internal */\n /** @internal */\n FormArray.prototype._allControlsDisabled = /** @internal */\n function () {\n try {\n for (var _a = __values(this.controls), _b = _a.next(); !_b.done; _b = _a.next()) {\n var control = _b.value;\n if (control.enabled)\n return false;\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return this.controls.length > 0 || this.disabled;\n var e_2, _c;\n };\n FormArray.prototype._registerControl = function (control) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n };\n return FormArray;\n}(AbstractControl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 formDirectiveProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return NgForm; })\n};\nvar resolvedPromise = Promise.resolve(null);\n/**\n * @description\n *\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 can 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 * will give 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, you'll want to use `NgModel` with a\n * `name` attribute. You can also use `NgModelGroup` if you'd like to create\n * sub-groups within the form.\n *\n * You can listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event will be emitted with the original form\n * submission event.\n *\n * In template driven forms, all `<form>` tags are automatically tagged as `NgForm`.\n * If you want to import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, you can add `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 * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `FormsModule`\n *\n *\n */\nvar NgForm = /** @class */ (function (_super) {\n __extends(NgForm, _super);\n function NgForm(validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this.submitted = false;\n _this._directives = [];\n _this.ngSubmit = new EventEmitter();\n _this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n return _this;\n }\n NgForm.prototype.ngAfterViewInit = function () { this._setUpdateStrategy(); };\n Object.defineProperty(NgForm.prototype, \"formDirective\", {\n get: function () { return this; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"control\", {\n get: function () { return this.form; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"path\", {\n get: function () { return []; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgForm.prototype, \"controls\", {\n get: function () { return this.form.controls; },\n enumerable: true,\n configurable: true\n });\n NgForm.prototype.addControl = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n dir.control = 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 NgForm.prototype.getControl = function (dir) { return this.form.get(dir.path); };\n NgForm.prototype.removeControl = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n removeDir(_this._directives, dir);\n });\n };\n NgForm.prototype.addFormGroup = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n var group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({ emitEvent: false });\n });\n };\n NgForm.prototype.removeFormGroup = function (dir) {\n var _this = this;\n resolvedPromise.then(function () {\n var container = _this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n };\n NgForm.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };\n NgForm.prototype.updateModel = function (dir, value) {\n var _this = this;\n resolvedPromise.then(function () {\n var ctrl = _this.form.get((dir.path));\n ctrl.setValue(value);\n });\n };\n NgForm.prototype.setValue = function (value) { this.control.setValue(value); };\n NgForm.prototype.onSubmit = function ($event) {\n this.submitted = true;\n syncPendingControls(this.form, this._directives);\n this.ngSubmit.emit($event);\n return false;\n };\n NgForm.prototype.onReset = function () { this.resetForm(); };\n NgForm.prototype.resetForm = function (value) {\n if (value === void 0) { value = undefined; }\n this.form.reset(value);\n this.submitted = false;\n };\n NgForm.prototype._setUpdateStrategy = function () {\n if (this.options && this.options.updateOn != null) {\n this.form._updateOn = this.options.updateOn;\n }\n };\n /** @internal */\n /** @internal */\n NgForm.prototype._findContainer = /** @internal */\n function (path) {\n path.pop();\n return path.length ? this.form.get(path) : this.form;\n };\n NgForm.decorators = [\n { type: Directive, args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]',\n providers: [formDirectiveProvider],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n },] }\n ];\n /** @nocollapse */\n NgForm.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n ]; };\n NgForm.propDecorators = {\n \"options\": [{ type: Input, args: ['ngFormOptions',] },],\n };\n return NgForm;\n}(ControlContainer));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 TemplateDrivenErrors = /** @class */ (function () {\n function TemplateDrivenErrors() {\n }\n TemplateDrivenErrors.modelParentException = function () {\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 \" + FormErrorExamples.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 \" + FormErrorExamples.ngModelWithFormGroup);\n };\n TemplateDrivenErrors.formGroupNameException = function () {\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 \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n TemplateDrivenErrors.missingNameException = function () {\n throw new Error(\"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 TemplateDrivenErrors.modelGroupParentException = function () {\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 \" + FormErrorExamples.formGroupName + \"\\n\\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\\n\\n \" + FormErrorExamples.ngModelGroup);\n };\n return TemplateDrivenErrors;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 modelGroupProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return NgModelGroup; })\n};\n/**\n * @description\n *\n * Creates and binds a `FormGroup` instance to a DOM element.\n *\n * This directive can only be used as a child of `NgForm` (or in other words,\n * within `<form>` tags).\n *\n * Use this directive if you'd like to create a sub-group within a form. This can\n * come in handy if you want to validate a sub-group of your form separately from\n * the rest of your form, or if some values in your domain model make more sense to\n * consume together in a nested object.\n *\n * Pass in the name you'd like this sub-group to have and it will become the key\n * for the sub-group in the form's full value. You can also export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n *\n * {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `FormsModule`\n *\n *\n */\nvar NgModelGroup = /** @class */ (function (_super) {\n __extends(NgModelGroup, _super);\n function NgModelGroup(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n /** @internal */\n /** @internal */\n NgModelGroup.prototype._checkParentType = /** @internal */\n function () {\n if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelGroupParentException();\n }\n };\n NgModelGroup.decorators = [\n { type: Directive, args: [{ selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup' },] }\n ];\n /** @nocollapse */\n NgModelGroup.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Host }, { type: SkipSelf },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n ]; };\n NgModelGroup.propDecorators = {\n \"name\": [{ type: Input, args: ['ngModelGroup',] },],\n };\n return NgModelGroup;\n}(AbstractFormGroupDirective));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 formControlBinding = {\n provide: NgControl,\n useExisting: forwardRef(function () { return NgModel; })\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 */\nvar resolvedPromise$1 = Promise.resolve(null);\n/**\n * @description\n *\n * Creates a `FormControl` instance from a domain model and binds it\n * to a form control element.\n *\n * The `FormControl` instance will track the value, user interaction, and\n * validation status of the control and keep the view synced with the model. If used\n * within a parent form, the directive will also register itself with the form as a child\n * control.\n *\n * This directive can be used by itself or as part of a larger form. All you need is 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 will set 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 will always be synced back to\n * the domain model in your class as well.\n *\n * If you wish to inspect the properties of the associated `FormControl` (like\n * validity state), you can also export the directive into a local template variable using\n * `ngModel` as the key (ex: `#myVar=\"ngModel\"`). You can then access the control using the\n * directive's `control` property, but most properties you'll need (like `valid` and `dirty`)\n * will fall through to the control anyway, so you can access them directly. You can see a\n * full list of properties directly available in `AbstractControlDirective`.\n *\n * The following is an example of 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 * It's worth noting that in the context of a parent form, you often can skip one-way or\n * two-way binding because the parent form will sync the value for you. You can access\n * its properties by exporting it into a local template variable using `ngForm` (ex:\n * `#f=\"ngForm\"`). Then you can pass it where it needs to go on submit.\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 * Take a look at an example of using `ngModel` within a form:\n *\n * {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n *\n * To see `ngModel` examples with different form control types, see:\n *\n * * Radio buttons: `RadioControlValueAccessor`\n * * Selects: `SelectControlValueAccessor`\n *\n * **npm package**: `@angular/forms`\n *\n * **NgModule**: `FormsModule`\n *\n *\n */\nvar NgModel = /** @class */ (function (_super) {\n __extends(NgModel, _super);\n function NgModel(parent, validators, asyncValidators, valueAccessors) {\n var _this = _super.call(this) || this;\n _this.control = new FormControl();\n /** @internal */\n _this._registered = false;\n _this.update = new EventEmitter();\n _this._parent = parent;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n NgModel.prototype.ngOnChanges = function (changes) {\n this._checkForErrors();\n if (!this._registered)\n this._setUpControl();\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n };\n NgModel.prototype.ngOnDestroy = function () { this.formDirective && this.formDirective.removeControl(this); };\n Object.defineProperty(NgModel.prototype, \"path\", {\n get: function () {\n return this._parent ? controlPath(this.name, this._parent) : [this.name];\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"formDirective\", {\n get: function () { return this._parent ? this._parent.formDirective : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"validator\", {\n get: function () { return composeValidators(this._rawValidators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(NgModel.prototype, \"asyncValidator\", {\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n NgModel.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n NgModel.prototype._setUpControl = function () {\n this._setUpdateStrategy();\n this._isStandalone() ? this._setUpStandalone() :\n this.formDirective.addControl(this);\n this._registered = true;\n };\n NgModel.prototype._setUpdateStrategy = function () {\n if (this.options && this.options.updateOn != null) {\n this.control._updateOn = this.options.updateOn;\n }\n };\n NgModel.prototype._isStandalone = function () {\n return !this._parent || !!(this.options && this.options.standalone);\n };\n NgModel.prototype._setUpStandalone = function () {\n setUpControl(this.control, this);\n this.control.updateValueAndValidity({ emitEvent: false });\n };\n NgModel.prototype._checkForErrors = function () {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n };\n NgModel.prototype._checkParentType = function () {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n TemplateDrivenErrors.formGroupNameException();\n }\n else if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelParentException();\n }\n };\n NgModel.prototype._checkName = function () {\n if (this.options && this.options.name)\n this.name = this.options.name;\n if (!this._isStandalone() && !this.name) {\n TemplateDrivenErrors.missingNameException();\n }\n };\n NgModel.prototype._updateValue = function (value) {\n var _this = this;\n resolvedPromise$1.then(function () { _this.control.setValue(value, { emitViewToModelChange: false }); });\n };\n NgModel.prototype._updateDisabled = function (changes) {\n var _this = this;\n var disabledValue = changes['isDisabled'].currentValue;\n var isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');\n resolvedPromise$1.then(function () {\n if (isDisabled && !_this.control.disabled) {\n _this.control.disable();\n }\n else if (!isDisabled && _this.control.disabled) {\n _this.control.enable();\n }\n });\n };\n NgModel.decorators = [\n { type: Directive, args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel'\n },] }\n ];\n /** @nocollapse */\n NgModel.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Optional }, { type: Host },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },\n ]; };\n NgModel.propDecorators = {\n \"name\": [{ type: Input },],\n \"isDisabled\": [{ type: Input, args: ['disabled',] },],\n \"model\": [{ type: Input, args: ['ngModel',] },],\n \"options\": [{ type: Input, args: ['ngModelOptions',] },],\n \"update\": [{ type: Output, args: ['ngModelChange',] },],\n };\n return NgModel;\n}(NgControl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Token to provide to turn off the ngModel warning on formControl and formControlName.\n */\nvar NG_MODEL_WITH_FORM_CONTROL_WARNING = new InjectionToken('NgModelWithFormControlWarning');\nvar formControlBinding$1 = {\n provide: NgControl,\n useExisting: forwardRef(function () { return FormControlDirective; })\n};\n/**\n * @description\n *\n * Syncs a standalone `FormControl` instance to a form control element.\n *\n * This directive ensures that any values written to the `FormControl`\n * instance programmatically will be written to the DOM element (model -> view). Conversely,\n * any values written to the DOM element through user input will be reflected in the\n * `FormControl` instance (view -> model).\n *\n * Use this directive if you'd like to create and manage a `FormControl` instance directly.\n * Simply create a `FormControl`, save it to your component class, and pass it into the\n * `FormControlDirective`.\n *\n * This directive is designed to be used as a standalone control. Unlike `FormControlName`,\n * it does not require that your `FormControl` instance be part of any parent\n * `FormGroup`, and it won't be registered to any `FormGroupDirective` that\n * exists above it.\n *\n * **Get the value**: the `value` property is always synced and available on the\n * `FormControl` instance. See a full list of available properties in\n * `AbstractControl`.\n *\n * **Set the value**: You can pass in an initial value when instantiating the `FormControl`,\n * or you can set it programmatically later using {@link AbstractControl#setValue setValue} or\n * {@link AbstractControl#patchValue patchValue}.\n *\n * **Listen to value**: If you want to listen to changes in the value of the control, you can\n * subscribe to the {@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n *\n * ### Example\n *\n * {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `ReactiveFormsModule`\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n * ```html\n * <input [formControl]=\"control\" [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <input [formControl]=\"control\">\n * ```\n *\n * ```ts\n * this.control.setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n * ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n *\n */\nvar FormControlDirective = /** @class */ (function (_super) {\n __extends(FormControlDirective, _super);\n function FormControlDirective(validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n var _this = _super.call(this) || this;\n _this._ngModelWarningConfig = _ngModelWarningConfig;\n /** @deprecated as of v6 */\n _this.update = new EventEmitter();\n /**\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 _this._ngModelWarningSent = false;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n Object.defineProperty(FormControlDirective.prototype, \"isDisabled\", {\n set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },\n enumerable: true,\n configurable: true\n });\n FormControlDirective.prototype.ngOnChanges = function (changes) {\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 Object.defineProperty(FormControlDirective.prototype, \"path\", {\n get: function () { return []; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"validator\", {\n get: function () { return composeValidators(this._rawValidators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"asyncValidator\", {\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlDirective.prototype, \"control\", {\n get: function () { return this.form; },\n enumerable: true,\n configurable: true\n });\n FormControlDirective.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n FormControlDirective.prototype._isControlChanged = function (changes) {\n return changes.hasOwnProperty('form');\n };\n /**\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 FormControlDirective._ngModelWarningSentOnce = false;\n FormControlDirective.decorators = [\n { type: Directive, args: [{ selector: '[formControl]', providers: [formControlBinding$1], exportAs: 'ngForm' },] }\n ];\n /** @nocollapse */\n FormControlDirective.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] },] },\n ]; };\n FormControlDirective.propDecorators = {\n \"form\": [{ type: Input, args: ['formControl',] },],\n \"isDisabled\": [{ type: Input, args: ['disabled',] },],\n \"model\": [{ type: Input, args: ['ngModel',] },],\n \"update\": [{ type: Output, args: ['ngModelChange',] },],\n };\n return FormControlDirective;\n}(NgControl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 formDirectiveProvider$1 = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormGroupDirective; })\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 * **Set value**: You can set the form's initial value when instantiating the\n * `FormGroup`, or you can set it programmatically later using the `FormGroup`'s\n * {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}\n * methods.\n *\n * **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe\n * to the `FormGroup`'s {@link AbstractControl#valueChanges valueChanges} event. You can also\n * listen to its {@link AbstractControl#statusChanges statusChanges} event to be notified when the\n * validation status is re-calculated.\n *\n * Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event will be emitted with the original form\n * submission event.\n *\n * ### Example\n *\n * In this example, we create form controls for first name and last name.\n *\n * {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n *\n * **npm package**: `@angular/forms`\n *\n * **NgModule**: `ReactiveFormsModule`\n *\n *\n */\nvar FormGroupDirective = /** @class */ (function (_super) {\n __extends(FormGroupDirective, _super);\n function FormGroupDirective(_validators, _asyncValidators) {\n var _this = _super.call(this) || this;\n _this._validators = _validators;\n _this._asyncValidators = _asyncValidators;\n _this.submitted = false;\n _this.directives = [];\n _this.form = null;\n _this.ngSubmit = new EventEmitter();\n return _this;\n }\n FormGroupDirective.prototype.ngOnChanges = function (changes) {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n }\n };\n Object.defineProperty(FormGroupDirective.prototype, \"formDirective\", {\n get: function () { return this; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormGroupDirective.prototype, \"control\", {\n get: function () { return this.form; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormGroupDirective.prototype, \"path\", {\n get: function () { return []; },\n enumerable: true,\n configurable: true\n });\n FormGroupDirective.prototype.addControl = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpControl(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n this.directives.push(dir);\n return ctrl;\n };\n FormGroupDirective.prototype.getControl = function (dir) { return this.form.get(dir.path); };\n FormGroupDirective.prototype.removeControl = function (dir) { removeDir(this.directives, dir); };\n FormGroupDirective.prototype.addFormGroup = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n };\n FormGroupDirective.prototype.removeFormGroup = function (dir) { };\n FormGroupDirective.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };\n FormGroupDirective.prototype.addFormArray = function (dir) {\n var ctrl = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({ emitEvent: false });\n };\n FormGroupDirective.prototype.removeFormArray = function (dir) { };\n FormGroupDirective.prototype.getFormArray = function (dir) { return this.form.get(dir.path); };\n FormGroupDirective.prototype.updateModel = function (dir, value) {\n var ctrl = this.form.get(dir.path);\n ctrl.setValue(value);\n };\n FormGroupDirective.prototype.onSubmit = function ($event) {\n this.submitted = true;\n syncPendingControls(this.form, this.directives);\n this.ngSubmit.emit($event);\n return false;\n };\n FormGroupDirective.prototype.onReset = function () { this.resetForm(); };\n FormGroupDirective.prototype.resetForm = function (value) {\n if (value === void 0) { value = undefined; }\n this.form.reset(value);\n this.submitted = false;\n };\n /** @internal */\n /** @internal */\n FormGroupDirective.prototype._updateDomValue = /** @internal */\n function () {\n var _this = this;\n this.directives.forEach(function (dir) {\n var newCtrl = _this.form.get(dir.path);\n if (dir.control !== newCtrl) {\n cleanUpControl(dir.control, dir);\n if (newCtrl)\n setUpControl(newCtrl, dir);\n dir.control = newCtrl;\n }\n });\n this.form._updateTreeValidity({ emitEvent: false });\n };\n FormGroupDirective.prototype._updateRegistrations = function () {\n var _this = this;\n this.form._registerOnCollectionChange(function () { return _this._updateDomValue(); });\n if (this._oldForm)\n this._oldForm._registerOnCollectionChange(function () { });\n this._oldForm = this.form;\n };\n FormGroupDirective.prototype._updateValidators = function () {\n var sync = composeValidators(this._validators);\n this.form.validator = Validators.compose([(this.form.validator), (sync)]);\n var async = composeAsyncValidators(this._asyncValidators);\n this.form.asyncValidator = Validators.composeAsync([(this.form.asyncValidator), (async)]);\n };\n FormGroupDirective.prototype._checkFormPresent = function () {\n if (!this.form) {\n ReactiveErrors.missingFormException();\n }\n };\n FormGroupDirective.decorators = [\n { type: Directive, args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider$1],\n host: { '(submit)': 'onSubmit($event)', '(reset)': 'onReset()' },\n exportAs: 'ngForm'\n },] }\n ];\n /** @nocollapse */\n FormGroupDirective.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n ]; };\n FormGroupDirective.propDecorators = {\n \"form\": [{ type: Input, args: ['formGroup',] },],\n \"ngSubmit\": [{ type: Output },],\n };\n return FormGroupDirective;\n}(ControlContainer));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 formGroupNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormGroupName; })\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` (selector:\n * `[formGroup]`).\n *\n * It accepts the string name of the nested `FormGroup` you want to link, and\n * will look for a `FormGroup` registered with that name in the parent\n * `FormGroup` instance you passed into `FormGroupDirective`.\n *\n * Nested form groups can come in handy when you want to validate a sub-group of a\n * form separately from the rest or when you'd like to group the values of certain\n * controls into their own nested object.\n *\n * **Access the group**: You can access the associated `FormGroup` using the\n * {@link AbstractControl#get get} method. Ex: `this.form.get('name')`.\n *\n * You can also access individual controls within the group using dot syntax.\n * Ex: `this.form.get('name.first')`\n *\n * **Get the value**: the `value` property is always synced and available on the\n * `FormGroup`. See a full list of available properties in `AbstractControl`.\n *\n * **Set the value**: You can set an initial value for each child control when instantiating\n * the `FormGroup`, or you can set it programmatically later using\n * {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}.\n *\n * **Listen to value**: If you want to listen to changes in the value of the group, you can\n * subscribe to the {@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `ReactiveFormsModule`\n *\n *\n */\nvar FormGroupName = /** @class */ (function (_super) {\n __extends(FormGroupName, _super);\n function FormGroupName(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n /** @internal */\n /** @internal */\n FormGroupName.prototype._checkParentType = /** @internal */\n function () {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.groupParentException();\n }\n };\n FormGroupName.decorators = [\n { type: Directive, args: [{ selector: '[formGroupName]', providers: [formGroupNameProvider] },] }\n ];\n /** @nocollapse */\n FormGroupName.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n ]; };\n FormGroupName.propDecorators = {\n \"name\": [{ type: Input, args: ['formGroupName',] },],\n };\n return FormGroupName;\n}(AbstractFormGroupDirective));\nvar formArrayNameProvider = {\n provide: ControlContainer,\n useExisting: forwardRef(function () { return FormArrayName; })\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 * Nested form arrays can come in handy when you have a group of form controls but\n * you're not sure how many there will be. Form arrays allow you to create new\n * form controls dynamically.\n *\n * **Access the array**: You can access the associated `FormArray` using the\n * {@link AbstractControl#get get} method on the parent `FormGroup`.\n * Ex: `this.form.get('cities')`.\n *\n * **Get the value**: the `value` property is always synced and available on the\n * `FormArray`. See a full list of available properties in `AbstractControl`.\n *\n * **Set the value**: You can set an initial value for each child control when instantiating\n * the `FormArray`, or you can set the value programmatically later using the\n * `FormArray`'s {@link AbstractControl#setValue setValue} or\n * {@link AbstractControl#patchValue patchValue} methods.\n *\n * **Listen to value**: If you want to listen to changes in the value of the array, you can\n * subscribe to the `FormArray`'s {@link AbstractControl#valueChanges valueChanges} event.\n * You can also listen to its {@link AbstractControl#statusChanges statusChanges} event to be\n * notified when the validation status is re-calculated.\n *\n * **Add new controls**: You can add new controls to the `FormArray` dynamically by calling\n * its {@link FormArray#push push} method.\n * Ex: `this.form.get('cities').push(new FormControl());`\n *\n * ### Example\n *\n * {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `ReactiveFormsModule`\n *\n *\n */\nvar FormArrayName = /** @class */ (function (_super) {\n __extends(FormArrayName, _super);\n function FormArrayName(parent, validators, asyncValidators) {\n var _this = _super.call(this) || this;\n _this._parent = parent;\n _this._validators = validators;\n _this._asyncValidators = asyncValidators;\n return _this;\n }\n FormArrayName.prototype.ngOnInit = function () {\n this._checkParentType();\n this.formDirective.addFormArray(this);\n };\n FormArrayName.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n };\n Object.defineProperty(FormArrayName.prototype, \"control\", {\n get: function () { return this.formDirective.getFormArray(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"formDirective\", {\n get: function () {\n return this._parent ? this._parent.formDirective : null;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"path\", {\n get: function () { return controlPath(this.name, this._parent); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"validator\", {\n get: function () { return composeValidators(this._validators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormArrayName.prototype, \"asyncValidator\", {\n get: function () {\n return composeAsyncValidators(this._asyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n FormArrayName.prototype._checkParentType = function () {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.arrayParentException();\n }\n };\n FormArrayName.decorators = [\n { type: Directive, args: [{ selector: '[formArrayName]', providers: [formArrayNameProvider] },] }\n ];\n /** @nocollapse */\n FormArrayName.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n ]; };\n FormArrayName.propDecorators = {\n \"name\": [{ type: Input, args: ['formArrayName',] },],\n };\n return FormArrayName;\n}(ControlContainer));\nfunction _hasInvalidParent(parent) {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 controlNameBinding = {\n provide: NgControl,\n useExisting: forwardRef(function () { return FormControlName; })\n};\n/**\n * @description\n *\n * Syncs a `FormControl` in an existing `FormGroup` to a form control\n * element by name.\n *\n * This directive ensures that any values written to the `FormControl`\n * instance programmatically will be written to the DOM element (model -> view). Conversely,\n * any values written to the DOM element through user input will be reflected in the\n * `FormControl` instance (view -> model).\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 `FormControl` instance you want to\n * link, and will look for a `FormControl` registered with that name in the\n * closest `FormGroup` or `FormArray` above it.\n *\n * **Access the control**: You can access the `FormControl` associated with\n * this directive by using the {@link AbstractControl#get get} method.\n * Ex: `this.form.get('first');`\n *\n * **Get value**: the `value` property is always synced and available on the `FormControl`.\n * See a full list of available properties in `AbstractControl`.\n *\n * **Set value**: You can set an initial value for the control when instantiating the\n * `FormControl`, or you can set it programmatically later using\n * {@link AbstractControl#setValue setValue} or {@link AbstractControl#patchValue patchValue}.\n *\n * **Listen to value**: If you want to listen to changes in the value of the control, you can\n * subscribe to the {@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n *\n * ### Example\n *\n * In this example, we create form controls for first name and last name.\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 * **npm package**: `@angular/forms`\n *\n * **NgModule**: `ReactiveFormsModule`\n *\n * ### Use with ngModel\n *\n * Support for using the `ngModel` input property and `ngModelChange` event with reactive\n * form directives has been deprecated in Angular v6 and will be removed in Angular v7.\n *\n * Now deprecated:\n * ```html\n * <form [formGroup]=\"form\">\n * <input formControlName=\"first\" [(ngModel)]=\"value\">\n * </form>\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * This has been deprecated for a few reasons. First, developers have found this pattern\n * confusing. It seems like the actual `ngModel` directive is being used, but in fact it's\n * an input/output property named `ngModel` on the reactive form directive that simply\n * approximates (some of) its behavior. Specifically, it allows getting/setting the value\n * and intercepting value events. However, some of `ngModel`'s other features - like\n * delaying updates with`ngModelOptions` or exporting the directive - simply don't work,\n * which has understandably caused some confusion.\n *\n * In addition, this pattern mixes template-driven and reactive forms strategies, which\n * we generally don't recommend because it doesn't take advantage of the full benefits of\n * either strategy. Setting the value in the template violates the template-agnostic\n * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in\n * the class removes the convenience of defining forms in the template.\n *\n * To update your code before v7, you'll want to decide whether to stick with reactive form\n * directives (and get/set values using reactive forms patterns) or switch over to\n * template-driven directives.\n *\n * After (choice 1 - use reactive forms):\n *\n * ```html\n * <form [formGroup]=\"form\">\n * <input formControlName=\"first\">\n * </form>\n * ```\n *\n * ```ts\n * this.form.get('first').setValue('some value');\n * ```\n *\n * After (choice 2 - use template-driven forms):\n *\n * ```html\n * <input [(ngModel)]=\"value\">\n * ```\n *\n * ```ts\n * this.value = 'some value';\n * ```\n *\n * By default, when you use this pattern, you will see a deprecation warning once in dev\n * mode. You can choose to silence this warning by providing a config for\n * `ReactiveFormsModule` at import time:\n *\n * ```ts\n * imports: [\n * ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});\n * ]\n * ```\n *\n * Alternatively, you can choose to surface a separate warning for each instance of this\n * pattern with a config value of `\"always\"`. This may help to track down where in the code\n * the pattern is being used as the code is being updated.\n *\n *\n */\nvar FormControlName = /** @class */ (function (_super) {\n __extends(FormControlName, _super);\n function FormControlName(parent, validators, asyncValidators, valueAccessors, _ngModelWarningConfig) {\n var _this = _super.call(this) || this;\n _this._ngModelWarningConfig = _ngModelWarningConfig;\n _this._added = false;\n /** @deprecated as of v6 */\n _this.update = new EventEmitter();\n /**\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 _this._ngModelWarningSent = false;\n _this._parent = parent;\n _this._rawValidators = validators || [];\n _this._rawAsyncValidators = asyncValidators || [];\n _this.valueAccessor = selectValueAccessor(_this, valueAccessors);\n return _this;\n }\n Object.defineProperty(FormControlName.prototype, \"isDisabled\", {\n set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },\n enumerable: true,\n configurable: true\n });\n FormControlName.prototype.ngOnChanges = function (changes) {\n if (!this._added)\n 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 FormControlName.prototype.ngOnDestroy = function () {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n };\n FormControlName.prototype.viewToModelUpdate = function (newValue) {\n this.viewModel = newValue;\n this.update.emit(newValue);\n };\n Object.defineProperty(FormControlName.prototype, \"path\", {\n get: function () { return controlPath(this.name, (this._parent)); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"formDirective\", {\n get: function () { return this._parent ? this._parent.formDirective : null; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"validator\", {\n get: function () { return composeValidators(this._rawValidators); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(FormControlName.prototype, \"asyncValidator\", {\n get: function () {\n return composeAsyncValidators(this._rawAsyncValidators);\n },\n enumerable: true,\n configurable: true\n });\n FormControlName.prototype._checkParentType = function () {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n ReactiveErrors.ngModelGroupException();\n }\n else if (!(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n ReactiveErrors.controlParentException();\n }\n };\n FormControlName.prototype._setUpControl = function () {\n this._checkParentType();\n this.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 * 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 FormControlName._ngModelWarningSentOnce = false;\n FormControlName.decorators = [\n { type: Directive, args: [{ selector: '[formControlName]', providers: [controlNameBinding] },] }\n ];\n /** @nocollapse */\n FormControlName.ctorParameters = function () { return [\n { type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },\n { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [NG_MODEL_WITH_FORM_CONTROL_WARNING,] },] },\n ]; };\n FormControlName.propDecorators = {\n \"name\": [{ type: Input, args: ['formControlName',] },],\n \"isDisabled\": [{ type: Input, args: ['disabled',] },],\n \"model\": [{ type: Input, args: ['ngModel',] },],\n \"update\": [{ type: Output, args: ['ngModelChange',] },],\n };\n return FormControlName;\n}(NgControl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return RequiredValidator; }),\n multi: true\n};\nvar CHECKBOX_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return CheckboxRequiredValidator; }),\n multi: true\n};\n/**\n * A Directive that adds the `required` validator to any controls marked with the\n * `required` attribute, via the `NG_VALIDATORS` binding.\n *\n * ### Example\n *\n * ```\n * <input name=\"fullName\" ngModel required>\n * ```\n *\n *\n */\nvar RequiredValidator = /** @class */ (function () {\n function RequiredValidator() {\n }\n Object.defineProperty(RequiredValidator.prototype, \"required\", {\n get: function () { return this._required; },\n set: function (value) {\n this._required = value != null && value !== false && \"\" + value !== 'false';\n if (this._onChange)\n this._onChange();\n },\n enumerable: true,\n configurable: true\n });\n RequiredValidator.prototype.validate = function (c) {\n return this.required ? Validators.required(c) : null;\n };\n RequiredValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n RequiredValidator.decorators = [\n { type: Directive, args: [{\n selector: ':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 },] }\n ];\n /** @nocollapse */\n RequiredValidator.ctorParameters = function () { return []; };\n RequiredValidator.propDecorators = {\n \"required\": [{ type: Input },],\n };\n return RequiredValidator;\n}());\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute, via the `NG_VALIDATORS` binding.\n *\n * ### Example\n *\n * ```\n * <input type=\"checkbox\" name=\"active\" ngModel required>\n * ```\n *\n * @experimental\n */\nvar CheckboxRequiredValidator = /** @class */ (function (_super) {\n __extends(CheckboxRequiredValidator, _super);\n function CheckboxRequiredValidator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n CheckboxRequiredValidator.prototype.validate = function (c) {\n return this.required ? Validators.requiredTrue(c) : null;\n };\n CheckboxRequiredValidator.decorators = [\n { type: Directive, args: [{\n selector: '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 },] }\n ];\n /** @nocollapse */\n CheckboxRequiredValidator.ctorParameters = function () { return []; };\n return CheckboxRequiredValidator;\n}(RequiredValidator));\n/**\n * Provider which adds `EmailValidator` to `NG_VALIDATORS`.\n */\nvar EMAIL_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return EmailValidator; }),\n multi: true\n};\n/**\n * A Directive that adds the `email` validator to controls marked with the\n * `email` attribute, via the `NG_VALIDATORS` binding.\n *\n * ### Example\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 * @experimental\n */\nvar EmailValidator = /** @class */ (function () {\n function EmailValidator() {\n }\n Object.defineProperty(EmailValidator.prototype, \"email\", {\n set: function (value) {\n this._enabled = value === '' || value === true || value === 'true';\n if (this._onChange)\n this._onChange();\n },\n enumerable: true,\n configurable: true\n });\n EmailValidator.prototype.validate = function (c) {\n return this._enabled ? Validators.email(c) : null;\n };\n EmailValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n EmailValidator.decorators = [\n { type: Directive, args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n },] }\n ];\n /** @nocollapse */\n EmailValidator.ctorParameters = function () { return []; };\n EmailValidator.propDecorators = {\n \"email\": [{ type: Input },],\n };\n return EmailValidator;\n}());\n/**\n * Provider which adds `MinLengthValidator` to `NG_VALIDATORS`.\n *\n * ## Example:\n *\n * {@example common/forms/ts/validators/validators.ts region='min'}\n */\nvar MIN_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return MinLengthValidator; }),\n multi: true\n};\n/**\n * A directive which installs the `MinLengthValidator` for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `minlength` attribute.\n *\n *\n */\nvar MinLengthValidator = /** @class */ (function () {\n function MinLengthValidator() {\n }\n MinLengthValidator.prototype.ngOnChanges = function (changes) {\n if ('minlength' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n MinLengthValidator.prototype.validate = function (c) {\n return this.minlength == null ? null : this._validator(c);\n };\n MinLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n MinLengthValidator.prototype._createValidator = function () {\n this._validator = Validators.minLength(parseInt(this.minlength, 10));\n };\n MinLengthValidator.decorators = [\n { type: Directive, args: [{\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: { '[attr.minlength]': 'minlength ? minlength : null' }\n },] }\n ];\n /** @nocollapse */\n MinLengthValidator.ctorParameters = function () { return []; };\n MinLengthValidator.propDecorators = {\n \"minlength\": [{ type: Input },],\n };\n return MinLengthValidator;\n}());\n/**\n * Provider which adds `MaxLengthValidator` to `NG_VALIDATORS`.\n *\n * ## Example:\n *\n * {@example common/forms/ts/validators/validators.ts region='max'}\n */\nvar MAX_LENGTH_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return MaxLengthValidator; }),\n multi: true\n};\n/**\n * A directive which installs the `MaxLengthValidator` for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `maxlength` attribute.\n *\n *\n */\nvar MaxLengthValidator = /** @class */ (function () {\n function MaxLengthValidator() {\n }\n MaxLengthValidator.prototype.ngOnChanges = function (changes) {\n if ('maxlength' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n MaxLengthValidator.prototype.validate = function (c) {\n return this.maxlength != null ? this._validator(c) : null;\n };\n MaxLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n MaxLengthValidator.prototype._createValidator = function () {\n this._validator = Validators.maxLength(parseInt(this.maxlength, 10));\n };\n MaxLengthValidator.decorators = [\n { type: Directive, args: [{\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: { '[attr.maxlength]': 'maxlength ? maxlength : null' }\n },] }\n ];\n /** @nocollapse */\n MaxLengthValidator.ctorParameters = function () { return []; };\n MaxLengthValidator.propDecorators = {\n \"maxlength\": [{ type: Input },],\n };\n return MaxLengthValidator;\n}());\nvar PATTERN_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(function () { return PatternValidator; }),\n multi: true\n};\n/**\n * A Directive that adds the `pattern` validator to any controls marked with the\n * `pattern` attribute, via the `NG_VALIDATORS` binding. Uses attribute value\n * as the regex to validate Control value against. Follows pattern attribute\n * semantics; i.e. regex must match entire Control value.\n *\n * ### Example\n *\n * ```\n * <input [name]=\"fullName\" pattern=\"[a-zA-Z ]*\" ngModel>\n * ```\n *\n */\nvar PatternValidator = /** @class */ (function () {\n function PatternValidator() {\n }\n PatternValidator.prototype.ngOnChanges = function (changes) {\n if ('pattern' in changes) {\n this._createValidator();\n if (this._onChange)\n this._onChange();\n }\n };\n PatternValidator.prototype.validate = function (c) { return this._validator(c); };\n PatternValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };\n PatternValidator.prototype._createValidator = function () { this._validator = Validators.pattern(this.pattern); };\n PatternValidator.decorators = [\n { type: Directive, args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: { '[attr.pattern]': 'pattern ? pattern : null' }\n },] }\n ];\n /** @nocollapse */\n PatternValidator.ctorParameters = function () { return []; };\n PatternValidator.propDecorators = {\n \"pattern\": [{ type: Input },],\n };\n return PatternValidator;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Creates an `AbstractControl` from a user-specified configuration.\n *\n * This is essentially syntactic sugar that shortens the `new FormGroup()`,\n * `new FormControl()`, and `new FormArray()` boilerplate that can build up in larger\n * forms.\n *\n * To use, inject `FormBuilder` into your component class. You can then call its methods\n * directly.\n *\n * {@example forms/ts/formBuilder/form_builder_example.ts region='Component'}\n *\n * * **npm package**: `@angular/forms`\n *\n * * **NgModule**: `ReactiveFormsModule`\n *\n *\n */\nvar FormBuilder = /** @class */ (function () {\n function FormBuilder() {\n }\n /**\n * Construct a new `FormGroup` with the given map of configuration.\n * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.\n *\n * See the `FormGroup` constructor for more details.\n */\n /**\n * Construct a new `FormGroup` with the given map of configuration.\n * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.\n *\n * See the `FormGroup` constructor for more details.\n */\n FormBuilder.prototype.group = /**\n * Construct a new `FormGroup` with the given map of configuration.\n * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.\n *\n * See the `FormGroup` constructor for more details.\n */\n function (controlsConfig, extra) {\n if (extra === void 0) { extra = null; }\n var controls = this._reduceControls(controlsConfig);\n var validator = extra != null ? extra['validator'] : null;\n var asyncValidator = extra != null ? extra['asyncValidator'] : null;\n return new FormGroup(controls, validator, asyncValidator);\n };\n /**\n * Construct a new `FormControl` with the given `formState`,`validator`, and\n * `asyncValidator`.\n *\n * `formState` can either be a standalone value for the form control or an object\n * that contains both a value and a disabled status.\n *\n */\n /**\n * Construct a new `FormControl` with the given `formState`,`validator`, and\n * `asyncValidator`.\n *\n * `formState` can either be a standalone value for the form control or an object\n * that contains both a value and a disabled status.\n *\n */\n FormBuilder.prototype.control = /**\n * Construct a new `FormControl` with the given `formState`,`validator`, and\n * `asyncValidator`.\n *\n * `formState` can either be a standalone value for the form control or an object\n * that contains both a value and a disabled status.\n *\n */\n function (formState, validator, asyncValidator) {\n return new FormControl(formState, validator, asyncValidator);\n };\n /**\n * Construct a `FormArray` from the given `controlsConfig` array of\n * configuration, with the given optional `validator` and `asyncValidator`.\n */\n /**\n * Construct a `FormArray` from the given `controlsConfig` array of\n * configuration, with the given optional `validator` and `asyncValidator`.\n */\n FormBuilder.prototype.array = /**\n * Construct a `FormArray` from the given `controlsConfig` array of\n * configuration, with the given optional `validator` and `asyncValidator`.\n */\n function (controlsConfig, validator, asyncValidator) {\n var _this = this;\n var controls = controlsConfig.map(function (c) { return _this._createControl(c); });\n return new FormArray(controls, validator, asyncValidator);\n };\n /** @internal */\n /** @internal */\n FormBuilder.prototype._reduceControls = /** @internal */\n function (controlsConfig) {\n var _this = this;\n var controls = {};\n Object.keys(controlsConfig).forEach(function (controlName) {\n controls[controlName] = _this._createControl(controlsConfig[controlName]);\n });\n return controls;\n };\n /** @internal */\n /** @internal */\n FormBuilder.prototype._createControl = /** @internal */\n function (controlConfig) {\n if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n controlConfig instanceof FormArray) {\n return controlConfig;\n }\n else if (Array.isArray(controlConfig)) {\n var value = controlConfig[0];\n var validator = controlConfig.length > 1 ? controlConfig[1] : null;\n var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;\n return this.control(value, validator, asyncValidator);\n }\n else {\n return this.control(controlConfig);\n }\n };\n FormBuilder.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n FormBuilder.ctorParameters = function () { return []; };\n return FormBuilder;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 * @experimental\n */\nvar NgNoValidate = /** @class */ (function () {\n function NgNoValidate() {\n }\n NgNoValidate.decorators = [\n { type: Directive, args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: { 'novalidate': '' },\n },] }\n ];\n /** @nocollapse */\n NgNoValidate.ctorParameters = function () { return []; };\n return NgNoValidate;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SHARED_FORM_DIRECTIVES = [\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];\nvar TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];\nvar REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nvar InternalFormsSharedModule = /** @class */ (function () {\n function InternalFormsSharedModule() {\n }\n InternalFormsSharedModule.decorators = [\n { type: NgModule, args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES,\n },] }\n ];\n /** @nocollapse */\n InternalFormsSharedModule.ctorParameters = function () { return []; };\n return InternalFormsSharedModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 ng module for forms.\n *\n */\nvar FormsModule = /** @class */ (function () {\n function FormsModule() {\n }\n FormsModule.decorators = [\n { type: NgModule, args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n providers: [RadioControlRegistry],\n exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n },] }\n ];\n /** @nocollapse */\n FormsModule.ctorParameters = function () { return []; };\n return FormsModule;\n}());\n/**\n * The ng module for reactive forms.\n *\n */\nvar ReactiveFormsModule = /** @class */ (function () {\n function ReactiveFormsModule() {\n }\n ReactiveFormsModule.withConfig = function (opts) {\n return {\n ngModule: ReactiveFormsModule,\n providers: [{\n provide: NG_MODEL_WITH_FORM_CONTROL_WARNING,\n useValue: opts.warnOnNgModelWithFormControl\n }]\n };\n };\n ReactiveFormsModule.decorators = [\n { type: NgModule, args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n providers: [FormBuilder, RadioControlRegistry],\n exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n },] }\n ];\n /** @nocollapse */\n ReactiveFormsModule.ctorParameters = function () { return []; };\n return ReactiveFormsModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { InternalFormsSharedModule as ɵangular_packages_forms_forms_bb, REACTIVE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_ba, SHARED_FORM_DIRECTIVES as ɵangular_packages_forms_forms_y, TEMPLATE_DRIVEN_DIRECTIVES as ɵangular_packages_forms_forms_z, CHECKBOX_VALUE_ACCESSOR as ɵangular_packages_forms_forms_a, DEFAULT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_b, AbstractControlStatus as ɵangular_packages_forms_forms_c, ngControlStatusHost as ɵangular_packages_forms_forms_d, formDirectiveProvider as ɵangular_packages_forms_forms_e, formControlBinding as ɵangular_packages_forms_forms_f, modelGroupProvider as ɵangular_packages_forms_forms_g, NgNoValidate as ɵangular_packages_forms_forms_bg, NUMBER_VALUE_ACCESSOR as ɵangular_packages_forms_forms_bc, NumberValueAccessor as ɵangular_packages_forms_forms_bd, RADIO_VALUE_ACCESSOR as ɵangular_packages_forms_forms_h, RadioControlRegistry as ɵangular_packages_forms_forms_i, RANGE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_be, RangeValueAccessor as ɵangular_packages_forms_forms_bf, NG_MODEL_WITH_FORM_CONTROL_WARNING as ɵangular_packages_forms_forms_j, formControlBinding$1 as ɵangular_packages_forms_forms_k, controlNameBinding as ɵangular_packages_forms_forms_l, formDirectiveProvider$1 as ɵangular_packages_forms_forms_m, formArrayNameProvider as ɵangular_packages_forms_forms_o, formGroupNameProvider as ɵangular_packages_forms_forms_n, SELECT_VALUE_ACCESSOR as ɵangular_packages_forms_forms_p, NgSelectMultipleOption as ɵangular_packages_forms_forms_r, SELECT_MULTIPLE_VALUE_ACCESSOR as ɵangular_packages_forms_forms_q, CHECKBOX_REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_t, EMAIL_VALIDATOR as ɵangular_packages_forms_forms_u, MAX_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_w, MIN_LENGTH_VALIDATOR as ɵangular_packages_forms_forms_v, PATTERN_VALIDATOR as ɵangular_packages_forms_forms_x, REQUIRED_VALIDATOR as ɵangular_packages_forms_forms_s, AbstractControlDirective, AbstractFormGroupDirective, CheckboxControlValueAccessor, ControlContainer, NG_VALUE_ACCESSOR, COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, RadioControlValueAccessor, FormControlDirective, FormControlName, FormGroupDirective, FormArrayName, FormGroupName, NgSelectOption, SelectControlValueAccessor, SelectMultipleControlValueAccessor, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, FormBuilder, AbstractControl, FormArray, FormControl, FormGroup, NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators, VERSION, FormsModule, ReactiveFormsModule };\n//# sourceMappingURL=forms.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { Injectable, NgModule, Version } from '@angular/core';\nimport { __extends, __read, __spread } from 'tslib';\nimport { Observable } from 'rxjs';\nimport { ɵgetDOM } from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 backend for http that uses the `XMLHttpRequest` browser API.\n *\n * Take care not to evaluate this in non-browser contexts.\n *\n * @deprecated use @angular/common/http instead\n */\nvar BrowserXhr = /** @class */ (function () {\n function BrowserXhr() {\n }\n BrowserXhr.prototype.build = function () { return (new XMLHttpRequest()); };\n BrowserXhr.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BrowserXhr.ctorParameters = function () { return []; };\n return BrowserXhr;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Supported http methods.\n * @deprecated use @angular/common/http instead\n */\n/**\n * Supported http methods.\n * @deprecated use @angular/common/http instead\n */\nvar RequestMethod;\n/**\n * Supported http methods.\n * @deprecated use @angular/common/http instead\n */\n(function (RequestMethod) {\n RequestMethod[RequestMethod[\"Get\"] = 0] = \"Get\";\n RequestMethod[RequestMethod[\"Post\"] = 1] = \"Post\";\n RequestMethod[RequestMethod[\"Put\"] = 2] = \"Put\";\n RequestMethod[RequestMethod[\"Delete\"] = 3] = \"Delete\";\n RequestMethod[RequestMethod[\"Options\"] = 4] = \"Options\";\n RequestMethod[RequestMethod[\"Head\"] = 5] = \"Head\";\n RequestMethod[RequestMethod[\"Patch\"] = 6] = \"Patch\";\n})(RequestMethod || (RequestMethod = {}));\n/**\n * All possible states in which a connection can be, based on\n * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an\n * additional \"CANCELLED\" state.\n * @deprecated use @angular/common/http instead\n */\n/**\n * All possible states in which a connection can be, based on\n * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an\n * additional \"CANCELLED\" state.\n * @deprecated use @angular/common/http instead\n */\nvar ReadyState;\n/**\n * All possible states in which a connection can be, based on\n * [States](http://www.w3.org/TR/XMLHttpRequest/#states) from the `XMLHttpRequest` spec, but with an\n * additional \"CANCELLED\" state.\n * @deprecated use @angular/common/http instead\n */\n(function (ReadyState) {\n ReadyState[ReadyState[\"Unsent\"] = 0] = \"Unsent\";\n ReadyState[ReadyState[\"Open\"] = 1] = \"Open\";\n ReadyState[ReadyState[\"HeadersReceived\"] = 2] = \"HeadersReceived\";\n ReadyState[ReadyState[\"Loading\"] = 3] = \"Loading\";\n ReadyState[ReadyState[\"Done\"] = 4] = \"Done\";\n ReadyState[ReadyState[\"Cancelled\"] = 5] = \"Cancelled\";\n})(ReadyState || (ReadyState = {}));\n/**\n * Acceptable response types to be associated with a {@link Response}, based on\n * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.\n * @deprecated use @angular/common/http instead\n */\n/**\n * Acceptable response types to be associated with a {@link Response}, based on\n * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.\n * @deprecated use @angular/common/http instead\n */\nvar ResponseType;\n/**\n * Acceptable response types to be associated with a {@link Response}, based on\n * [ResponseType](https://fetch.spec.whatwg.org/#responsetype) from the Fetch spec.\n * @deprecated use @angular/common/http instead\n */\n(function (ResponseType) {\n ResponseType[ResponseType[\"Basic\"] = 0] = \"Basic\";\n ResponseType[ResponseType[\"Cors\"] = 1] = \"Cors\";\n ResponseType[ResponseType[\"Default\"] = 2] = \"Default\";\n ResponseType[ResponseType[\"Error\"] = 3] = \"Error\";\n ResponseType[ResponseType[\"Opaque\"] = 4] = \"Opaque\";\n})(ResponseType || (ResponseType = {}));\n/**\n * Supported content type to be automatically associated with a {@link Request}.\n * @deprecated use @angular/common/http instead\n */\n/**\n * Supported content type to be automatically associated with a {@link Request}.\n * @deprecated use @angular/common/http instead\n */\nvar ContentType;\n/**\n * Supported content type to be automatically associated with a {@link Request}.\n * @deprecated use @angular/common/http instead\n */\n(function (ContentType) {\n ContentType[ContentType[\"NONE\"] = 0] = \"NONE\";\n ContentType[ContentType[\"JSON\"] = 1] = \"JSON\";\n ContentType[ContentType[\"FORM\"] = 2] = \"FORM\";\n ContentType[ContentType[\"FORM_DATA\"] = 3] = \"FORM_DATA\";\n ContentType[ContentType[\"TEXT\"] = 4] = \"TEXT\";\n ContentType[ContentType[\"BLOB\"] = 5] = \"BLOB\";\n ContentType[ContentType[\"ARRAY_BUFFER\"] = 6] = \"ARRAY_BUFFER\";\n})(ContentType || (ContentType = {}));\n/**\n * Define which buffer to use to store the response\n * @deprecated use @angular/common/http instead\n */\n/**\n * Define which buffer to use to store the response\n * @deprecated use @angular/common/http instead\n */\nvar ResponseContentType;\n/**\n * Define which buffer to use to store the response\n * @deprecated use @angular/common/http instead\n */\n(function (ResponseContentType) {\n ResponseContentType[ResponseContentType[\"Text\"] = 0] = \"Text\";\n ResponseContentType[ResponseContentType[\"Json\"] = 1] = \"Json\";\n ResponseContentType[ResponseContentType[\"ArrayBuffer\"] = 2] = \"ArrayBuffer\";\n ResponseContentType[ResponseContentType[\"Blob\"] = 3] = \"Blob\";\n})(ResponseContentType || (ResponseContentType = {}));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Polyfill for [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers/Headers), as\n * specified in the [Fetch Spec](https://fetch.spec.whatwg.org/#headers-class).\n *\n * The only known difference between this `Headers` implementation and the spec is the\n * lack of an `entries` method.\n *\n * ### Example\n *\n * ```\n * import {Headers} from '@angular/http';\n *\n * var firstHeaders = new Headers();\n * firstHeaders.append('Content-Type', 'image/jpeg');\n * console.log(firstHeaders.get('Content-Type')) //'image/jpeg'\n *\n * // Create headers from Plain Old JavaScript Object\n * var secondHeaders = new Headers({\n * 'X-My-Custom-Header': 'Angular'\n * });\n * console.log(secondHeaders.get('X-My-Custom-Header')); //'Angular'\n *\n * var thirdHeaders = new Headers(secondHeaders);\n * console.log(thirdHeaders.get('X-My-Custom-Header')); //'Angular'\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar Headers = /** @class */ (function () {\n // TODO(vicb): any -> string|string[]\n function Headers(headers) {\n var _this = this;\n /** @internal header names are lower case */\n this._headers = new Map();\n /** @internal map lower case names to actual names */\n this._normalizedNames = new Map();\n if (!headers) {\n return;\n }\n if (headers instanceof Headers) {\n headers.forEach(function (values, name) {\n values.forEach(function (value) { return _this.append(name, value); });\n });\n return;\n }\n Object.keys(headers).forEach(function (name) {\n var values = Array.isArray(headers[name]) ? headers[name] : [headers[name]];\n _this.delete(name);\n values.forEach(function (value) { return _this.append(name, value); });\n });\n }\n /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n */\n /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n */\n Headers.fromResponseHeaderString = /**\n * Returns a new Headers instance from the given DOMString of Response Headers\n */\n function (headersString) {\n var headers = new Headers();\n headersString.split('\\n').forEach(function (line) {\n var index = line.indexOf(':');\n if (index > 0) {\n var name_1 = line.slice(0, index);\n var value = line.slice(index + 1).trim();\n headers.set(name_1, value);\n }\n });\n return headers;\n };\n /**\n * Appends a header to existing list of header values for a given header name.\n */\n /**\n * Appends a header to existing list of header values for a given header name.\n */\n Headers.prototype.append = /**\n * Appends a header to existing list of header values for a given header name.\n */\n function (name, value) {\n var values = this.getAll(name);\n if (values === null) {\n this.set(name, value);\n }\n else {\n values.push(value);\n }\n };\n /**\n * Deletes all header values for the given name.\n */\n /**\n * Deletes all header values for the given name.\n */\n Headers.prototype.delete = /**\n * Deletes all header values for the given name.\n */\n function (name) {\n var lcName = name.toLowerCase();\n this._normalizedNames.delete(lcName);\n this._headers.delete(lcName);\n };\n Headers.prototype.forEach = function (fn) {\n var _this = this;\n this._headers.forEach(function (values, lcName) { return fn(values, _this._normalizedNames.get(lcName), _this._headers); });\n };\n /**\n * Returns first header that matches given name.\n */\n /**\n * Returns first header that matches given name.\n */\n Headers.prototype.get = /**\n * Returns first header that matches given name.\n */\n function (name) {\n var values = this.getAll(name);\n if (values === null) {\n return null;\n }\n return values.length > 0 ? values[0] : null;\n };\n /**\n * Checks for existence of header by given name.\n */\n /**\n * Checks for existence of header by given name.\n */\n Headers.prototype.has = /**\n * Checks for existence of header by given name.\n */\n function (name) { return this._headers.has(name.toLowerCase()); };\n /**\n * Returns the names of the headers\n */\n /**\n * Returns the names of the headers\n */\n Headers.prototype.keys = /**\n * Returns the names of the headers\n */\n function () { return Array.from(this._normalizedNames.values()); };\n /**\n * Sets or overrides header value for given name.\n */\n /**\n * Sets or overrides header value for given name.\n */\n Headers.prototype.set = /**\n * Sets or overrides header value for given name.\n */\n function (name, value) {\n if (Array.isArray(value)) {\n if (value.length) {\n this._headers.set(name.toLowerCase(), [value.join(',')]);\n }\n }\n else {\n this._headers.set(name.toLowerCase(), [value]);\n }\n this.mayBeSetNormalizedName(name);\n };\n /**\n * Returns values of all headers.\n */\n /**\n * Returns values of all headers.\n */\n Headers.prototype.values = /**\n * Returns values of all headers.\n */\n function () { return Array.from(this._headers.values()); };\n /**\n * Returns string of all headers.\n */\n // TODO(vicb): returns {[name: string]: string[]}\n /**\n * Returns string of all headers.\n */\n // TODO(vicb): returns {[name: string]: string[]}\n Headers.prototype.toJSON = /**\n * Returns string of all headers.\n */\n // TODO(vicb): returns {[name: string]: string[]}\n function () {\n var _this = this;\n var serialized = {};\n this._headers.forEach(function (values, name) {\n var split = [];\n values.forEach(function (v) { return split.push.apply(split, __spread(v.split(','))); });\n serialized[_this._normalizedNames.get(name)] = split;\n });\n return serialized;\n };\n /**\n * Returns list of header values for a given name.\n */\n /**\n * Returns list of header values for a given name.\n */\n Headers.prototype.getAll = /**\n * Returns list of header values for a given name.\n */\n function (name) {\n return this.has(name) ? this._headers.get(name.toLowerCase()) || null : null;\n };\n /**\n * This method is not implemented.\n */\n /**\n * This method is not implemented.\n */\n Headers.prototype.entries = /**\n * This method is not implemented.\n */\n function () { throw new Error('\"entries\" method is not implemented on Headers class'); };\n Headers.prototype.mayBeSetNormalizedName = function (name) {\n var lcName = name.toLowerCase();\n if (!this._normalizedNames.has(lcName)) {\n this._normalizedNames.set(lcName, name);\n }\n };\n return Headers;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 response options object to be optionally provided when instantiating a\n * {@link Response}.\n *\n * This class is based on the `ResponseInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#responseinit).\n *\n * All values are null by default. Typical defaults can be found in the\n * {@link BaseResponseOptions} class, which sub-classes `ResponseOptions`.\n *\n * This class may be used in tests to build {@link Response Responses} for\n * mock responses (see {@link MockBackend}).\n *\n * ### Example ([live demo](http://plnkr.co/edit/P9Jkk8e8cz6NVzbcxEsD?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '@angular/http';\n *\n * var options = new ResponseOptions({\n * body: '{\"name\":\"Jeff\"}'\n * });\n * var res = new Response(options);\n *\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar ResponseOptions = /** @class */ (function () {\n function ResponseOptions(opts) {\n if (opts === void 0) { opts = {}; }\n var body = opts.body, status = opts.status, headers = opts.headers, statusText = opts.statusText, type = opts.type, url = opts.url;\n this.body = body != null ? body : null;\n this.status = status != null ? status : null;\n this.headers = headers != null ? headers : null;\n this.statusText = statusText != null ? statusText : null;\n this.type = type != null ? type : null;\n this.url = url != null ? url : null;\n }\n /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n */\n /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n */\n ResponseOptions.prototype.merge = /**\n * Creates a copy of the `ResponseOptions` instance, using the optional input as values to\n * override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * This may be useful when sharing a base `ResponseOptions` object inside tests,\n * where certain properties may change from test to test.\n *\n * ### Example ([live demo](http://plnkr.co/edit/1lXquqFfgduTFBWjNoRE?p=preview))\n *\n * ```typescript\n * import {ResponseOptions, Response} from '@angular/http';\n *\n * var options = new ResponseOptions({\n * body: {name: 'Jeff'}\n * });\n * var res = new Response(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('options.url:', options.url); // null\n * console.log('res.json():', res.json()); // Object {name: \"Jeff\"}\n * console.log('res.url:', res.url); // https://google.com\n * ```\n */\n function (options) {\n return new ResponseOptions({\n body: options && options.body != null ? options.body : this.body,\n status: options && options.status != null ? options.status : this.status,\n headers: options && options.headers != null ? options.headers : this.headers,\n statusText: options && options.statusText != null ? options.statusText : this.statusText,\n type: options && options.type != null ? options.type : this.type,\n url: options && options.url != null ? options.url : this.url,\n });\n };\n return ResponseOptions;\n}());\n/**\n * Subclass of {@link ResponseOptions}, with default values.\n *\n * Default values:\n * * status: 200\n * * headers: empty {@link Headers} object\n *\n * This class could be extended and bound to the {@link ResponseOptions} class\n * when configuring an {@link Injector}, in order to override the default options\n * used by {@link Http} to create {@link Response Responses}.\n *\n * ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))\n *\n * ```typescript\n * import {provide} from '@angular/core';\n * import {bootstrap} from '@angular/platform-browser/browser';\n * import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from\n * '@angular/http';\n * import {App} from './myapp';\n *\n * class MyOptions extends BaseResponseOptions {\n * headers:Headers = new Headers({network: 'github'});\n * }\n *\n * bootstrap(App, [HTTP_PROVIDERS, {provide: ResponseOptions, useClass: MyOptions}]);\n * ```\n *\n * The options could also be extended when manually creating a {@link Response}\n * object.\n *\n * ### Example ([live demo](http://plnkr.co/edit/VngosOWiaExEtbstDoix?p=preview))\n *\n * ```\n * import {BaseResponseOptions, Response} from '@angular/http';\n *\n * var options = new BaseResponseOptions();\n * var res = new Response(options.merge({\n * body: 'Angular',\n * headers: new Headers({framework: 'angular'})\n * }));\n * console.log('res.headers.get(\"framework\"):', res.headers.get('framework')); // angular\n * console.log('res.text():', res.text()); // Angular;\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar BaseResponseOptions = /** @class */ (function (_super) {\n __extends(BaseResponseOptions, _super);\n function BaseResponseOptions() {\n return _super.call(this, { status: 200, statusText: 'Ok', type: ResponseType.Default, headers: new Headers() }) || this;\n }\n BaseResponseOptions.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BaseResponseOptions.ctorParameters = function () { return []; };\n return BaseResponseOptions;\n}(ResponseOptions));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Abstract class from which real backends are derived.\n *\n * The primary purpose of a `ConnectionBackend` is to create new connections to fulfill a given\n * {@link Request}.\n *\n * @deprecated use @angular/common/http instead\n */\nvar ConnectionBackend = /** @class */ (function () {\n function ConnectionBackend() {\n }\n return ConnectionBackend;\n}());\n/**\n * Abstract class from which real connections are derived.\n *\n * @deprecated use @angular/common/http instead\n */\nvar Connection = /** @class */ (function () {\n function Connection() {\n }\n return Connection;\n}());\n/**\n * An XSRFStrategy configures XSRF protection (e.g. via headers) on an HTTP request.\n *\n * @deprecated use @angular/common/http instead\n */\nvar XSRFStrategy = /** @class */ (function () {\n function XSRFStrategy() {\n }\n return XSRFStrategy;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 normalizeMethodName(method) {\n if (typeof method !== 'string')\n return method;\n switch (method.toUpperCase()) {\n case 'GET':\n return RequestMethod.Get;\n case 'POST':\n return RequestMethod.Post;\n case 'PUT':\n return RequestMethod.Put;\n case 'DELETE':\n return RequestMethod.Delete;\n case 'OPTIONS':\n return RequestMethod.Options;\n case 'HEAD':\n return RequestMethod.Head;\n case 'PATCH':\n return RequestMethod.Patch;\n }\n throw new Error(\"Invalid request method. The method \\\"\" + method + \"\\\" is not supported.\");\n}\nvar isSuccess = function (status) { return (status >= 200 && status < 300); };\nfunction getResponseURL(xhr) {\n if ('responseURL' in xhr) {\n return xhr.responseURL;\n }\n if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {\n return xhr.getResponseHeader('X-Request-URL');\n }\n return null;\n}\n\nfunction stringToArrayBuffer(input) {\n var view = new Uint16Array(input.length);\n for (var i = 0, strLen = input.length; i < strLen; i++) {\n view[i] = input.charCodeAt(i);\n }\n return view.buffer;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 paramParser(rawParams) {\n if (rawParams === void 0) { rawParams = ''; }\n var map = new Map();\n if (rawParams.length > 0) {\n var params = rawParams.split('&');\n params.forEach(function (param) {\n var eqIdx = param.indexOf('=');\n var _a = __read(eqIdx == -1 ? [param, ''] : [param.slice(0, eqIdx), param.slice(eqIdx + 1)], 2), key = _a[0], val = _a[1];\n var list = map.get(key) || [];\n list.push(val);\n map.set(key, list);\n });\n }\n return map;\n}\n/**\n * @deprecated use @angular/common/http instead\n **/\nvar QueryEncoder = /** @class */ (function () {\n function QueryEncoder() {\n }\n QueryEncoder.prototype.encodeKey = function (k) { return standardEncoding(k); };\n QueryEncoder.prototype.encodeValue = function (v) { return standardEncoding(v); };\n return QueryEncoder;\n}());\nfunction standardEncoding(v) {\n return encodeURIComponent(v)\n .replace(/%40/gi, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/gi, '$')\n .replace(/%2C/gi, ',')\n .replace(/%3B/gi, ';')\n .replace(/%2B/gi, '+')\n .replace(/%3D/gi, '=')\n .replace(/%3F/gi, '?')\n .replace(/%2F/gi, '/');\n}\n/**\n * Map-like representation of url search parameters, based on\n * [URLSearchParams](https://url.spec.whatwg.org/#urlsearchparams) in the url living standard,\n * with several extensions for merging URLSearchParams objects:\n * - setAll()\n * - appendAll()\n * - replaceAll()\n *\n * This class accepts an optional second parameter of ${@link QueryEncoder},\n * which is used to serialize parameters before making a request. By default,\n * `QueryEncoder` encodes keys and values of parameters using `encodeURIComponent`,\n * and then un-encodes certain characters that are allowed to be part of the query\n * according to IETF RFC 3986: https://tools.ietf.org/html/rfc3986.\n *\n * These are the characters that are not encoded: `! $ \\' ( ) * + , ; A 9 - . _ ~ ? /`\n *\n * If the set of allowed query characters is not acceptable for a particular backend,\n * `QueryEncoder` can be subclassed and provided as the 2nd argument to URLSearchParams.\n *\n * ```\n * import {URLSearchParams, QueryEncoder} from '@angular/http';\n * class MyQueryEncoder extends QueryEncoder {\n * encodeKey(k: string): string {\n * return myEncodingFunction(k);\n * }\n *\n * encodeValue(v: string): string {\n * return myEncodingFunction(v);\n * }\n * }\n *\n * let params = new URLSearchParams('', new MyQueryEncoder());\n * ```\n * @deprecated use @angular/common/http instead\n */\nvar URLSearchParams = /** @class */ (function () {\n function URLSearchParams(rawParams, queryEncoder) {\n if (rawParams === void 0) { rawParams = ''; }\n if (queryEncoder === void 0) { queryEncoder = new QueryEncoder(); }\n this.rawParams = rawParams;\n this.queryEncoder = queryEncoder;\n this.paramsMap = paramParser(rawParams);\n }\n URLSearchParams.prototype.clone = function () {\n var clone = new URLSearchParams('', this.queryEncoder);\n clone.appendAll(this);\n return clone;\n };\n URLSearchParams.prototype.has = function (param) { return this.paramsMap.has(param); };\n URLSearchParams.prototype.get = function (param) {\n var storedParam = this.paramsMap.get(param);\n return Array.isArray(storedParam) ? storedParam[0] : null;\n };\n URLSearchParams.prototype.getAll = function (param) { return this.paramsMap.get(param) || []; };\n URLSearchParams.prototype.set = function (param, val) {\n if (val === void 0 || val === null) {\n this.delete(param);\n return;\n }\n var list = this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(val);\n this.paramsMap.set(param, list);\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `set(name, values[0])`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n // A merge operation\n // For each name-values pair in `searchParams`, perform `set(name, values[0])`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n URLSearchParams.prototype.setAll = \n // A merge operation\n // For each name-values pair in `searchParams`, perform `set(name, values[0])`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var list = _this.paramsMap.get(param) || [];\n list.length = 0;\n list.push(value[0]);\n _this.paramsMap.set(param, list);\n });\n };\n URLSearchParams.prototype.append = function (param, val) {\n if (val === void 0 || val === null)\n return;\n var list = this.paramsMap.get(param) || [];\n list.push(val);\n this.paramsMap.set(param, list);\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `append(name, value)`\n // for each value in `values`.\n //\n // E.g: \"a=[1,2], c=[8]\" + \"a=[3,4], b=[7]\" = \"a=[1,2,3,4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n // A merge operation\n // For each name-values pair in `searchParams`, perform `append(name, value)`\n // for each value in `values`.\n //\n // E.g: \"a=[1,2], c=[8]\" + \"a=[3,4], b=[7]\" = \"a=[1,2,3,4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n URLSearchParams.prototype.appendAll = \n // A merge operation\n // For each name-values pair in `searchParams`, perform `append(name, value)`\n // for each value in `values`.\n //\n // E.g: \"a=[1,2], c=[8]\" + \"a=[3,4], b=[7]\" = \"a=[1,2,3,4], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var list = _this.paramsMap.get(param) || [];\n for (var i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n _this.paramsMap.set(param, list);\n });\n };\n // A merge operation\n // For each name-values pair in `searchParams`, perform `delete(name)`,\n // followed by `set(name, values)`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4,5,6], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n // A merge operation\n // For each name-values pair in `searchParams`, perform `delete(name)`,\n // followed by `set(name, values)`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4,5,6], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n URLSearchParams.prototype.replaceAll = \n // A merge operation\n // For each name-values pair in `searchParams`, perform `delete(name)`,\n // followed by `set(name, values)`\n //\n // E.g: \"a=[1,2,3], c=[8]\" + \"a=[4,5,6], b=[7]\" = \"a=[4,5,6], c=[8], b=[7]\"\n //\n // TODO(@caitp): document this better\n function (searchParams) {\n var _this = this;\n searchParams.paramsMap.forEach(function (value, param) {\n var list = _this.paramsMap.get(param) || [];\n list.length = 0;\n for (var i = 0; i < value.length; ++i) {\n list.push(value[i]);\n }\n _this.paramsMap.set(param, list);\n });\n };\n URLSearchParams.prototype.toString = function () {\n var _this = this;\n var paramsList = [];\n this.paramsMap.forEach(function (values, k) {\n values.forEach(function (v) {\n return paramsList.push(_this.queryEncoder.encodeKey(k) + '=' + _this.queryEncoder.encodeValue(v));\n });\n });\n return paramsList.join('&');\n };\n URLSearchParams.prototype.delete = function (param) { this.paramsMap.delete(param); };\n return URLSearchParams;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * HTTP request body used by both {@link Request} and {@link Response}\n * https://fetch.spec.whatwg.org/#body\n */\nvar Body = /** @class */ (function () {\n function Body() {\n }\n /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n */\n /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n */\n Body.prototype.json = /**\n * Attempts to return body as parsed `JSON` object, or raises an exception.\n */\n function () {\n if (typeof this._body === 'string') {\n return JSON.parse(this._body);\n }\n if (this._body instanceof ArrayBuffer) {\n return JSON.parse(this.text());\n }\n return this._body;\n };\n /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n */\n /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n */\n Body.prototype.text = /**\n * Returns the body as a string, presuming `toString()` can be called on the response body.\n *\n * When decoding an `ArrayBuffer`, the optional `encodingHint` parameter determines how the\n * bytes in the buffer will be interpreted. Valid values are:\n *\n * - `legacy` - incorrectly interpret the bytes as UTF-16 (technically, UCS-2). Only characters\n * in the Basic Multilingual Plane are supported, surrogate pairs are not handled correctly.\n * In addition, the endianness of the 16-bit octet pairs in the `ArrayBuffer` is not taken\n * into consideration. This is the default behavior to avoid breaking apps, but should be\n * considered deprecated.\n *\n * - `iso-8859` - interpret the bytes as ISO-8859 (which can be used for ASCII encoded text).\n */\n function (encodingHint) {\n if (encodingHint === void 0) { encodingHint = 'legacy'; }\n if (this._body instanceof URLSearchParams) {\n return this._body.toString();\n }\n if (this._body instanceof ArrayBuffer) {\n switch (encodingHint) {\n case 'legacy':\n return String.fromCharCode.apply(null, new Uint16Array(this._body));\n case 'iso-8859':\n return String.fromCharCode.apply(null, new Uint8Array(this._body));\n default:\n throw new Error(\"Invalid value for encodingHint: \" + encodingHint);\n }\n }\n if (this._body == null) {\n return '';\n }\n if (typeof this._body === 'object') {\n return JSON.stringify(this._body, null, 2);\n }\n return this._body.toString();\n };\n /**\n * Return the body as an ArrayBuffer\n */\n /**\n * Return the body as an ArrayBuffer\n */\n Body.prototype.arrayBuffer = /**\n * Return the body as an ArrayBuffer\n */\n function () {\n if (this._body instanceof ArrayBuffer) {\n return this._body;\n }\n return stringToArrayBuffer(this.text());\n };\n /**\n * Returns the request's body as a Blob, assuming that body exists.\n */\n /**\n * Returns the request's body as a Blob, assuming that body exists.\n */\n Body.prototype.blob = /**\n * Returns the request's body as a Blob, assuming that body exists.\n */\n function () {\n if (this._body instanceof Blob) {\n return this._body;\n }\n if (this._body instanceof ArrayBuffer) {\n return new Blob([this._body]);\n }\n throw new Error('The request body isn\\'t either a blob or an array buffer');\n };\n return Body;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 `Response` instances from provided values.\n *\n * Though this object isn't\n * usually instantiated by end-users, it is the primary object interacted with when it comes time to\n * add data to a view.\n *\n * ### Example\n *\n * ```\n * http.request('my-friends.txt').subscribe(response => this.friends = response.text());\n * ```\n *\n * The Response's interface is inspired by the Response constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#response-class), but is considered a static value whose body\n * can be accessed many times. There are other differences in the implementation, but this is the\n * most significant.\n *\n * @deprecated use @angular/common/http instead\n */\nvar Response = /** @class */ (function (_super) {\n __extends(Response, _super);\n function Response(responseOptions) {\n var _this = _super.call(this) || this;\n _this._body = responseOptions.body;\n _this.status = (responseOptions.status);\n _this.ok = (_this.status >= 200 && _this.status <= 299);\n _this.statusText = responseOptions.statusText;\n _this.headers = responseOptions.headers;\n _this.type = (responseOptions.type);\n _this.url = (responseOptions.url);\n return _this;\n }\n Response.prototype.toString = function () {\n return \"Response with status: \" + this.status + \" \" + this.statusText + \" for URL: \" + this.url;\n };\n return Response;\n}(Body));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _nextRequestId = 0;\nvar JSONP_HOME = '__ng_jsonp__';\nvar _jsonpConnections = null;\nfunction _getJsonpConnections() {\n var w = typeof window == 'object' ? window : {};\n if (_jsonpConnections === null) {\n _jsonpConnections = w[JSONP_HOME] = {};\n }\n return _jsonpConnections;\n}\n// Make sure not to evaluate this in a non-browser environment!\nvar BrowserJsonp = /** @class */ (function () {\n function BrowserJsonp() {\n }\n // Construct a <script> element with the specified URL\n // Construct a <script> element with the specified URL\n BrowserJsonp.prototype.build = \n // Construct a <script> element with the specified URL\n function (url) {\n var node = document.createElement('script');\n node.src = url;\n return node;\n };\n BrowserJsonp.prototype.nextRequestID = function () { return \"__req\" + _nextRequestId++; };\n BrowserJsonp.prototype.requestCallback = function (id) { return JSONP_HOME + \".\" + id + \".finished\"; };\n BrowserJsonp.prototype.exposeConnection = function (id, connection) {\n var connections = _getJsonpConnections();\n connections[id] = connection;\n };\n BrowserJsonp.prototype.removeConnection = function (id) {\n var connections = _getJsonpConnections();\n connections[id] = null;\n };\n // Attach the <script> element to the DOM\n // Attach the <script> element to the DOM\n BrowserJsonp.prototype.send = \n // Attach the <script> element to the DOM\n function (node) { document.body.appendChild((node)); };\n // Remove <script> element from the DOM\n // Remove <script> element from the DOM\n BrowserJsonp.prototype.cleanup = \n // Remove <script> element from the DOM\n function (node) {\n if (node.parentNode) {\n node.parentNode.removeChild((node));\n }\n };\n BrowserJsonp.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BrowserJsonp.ctorParameters = function () { return []; };\n return BrowserJsonp;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 JSONP_ERR_NO_CALLBACK = 'JSONP injected script did not invoke callback.';\nvar JSONP_ERR_WRONG_METHOD = 'JSONP requests must use GET request method.';\n/**\n * Base class for an in-flight JSONP request.\n *\n * @deprecated use @angular/common/http instead\n */\nvar JSONPConnection = /** @class */ (function () {\n /** @internal */\n function JSONPConnection(req, _dom, baseResponseOptions) {\n var _this = this;\n this._dom = _dom;\n this.baseResponseOptions = baseResponseOptions;\n this._finished = false;\n if (req.method !== RequestMethod.Get) {\n throw new TypeError(JSONP_ERR_WRONG_METHOD);\n }\n this.request = req;\n this.response = new Observable(function (responseObserver) {\n _this.readyState = ReadyState.Loading;\n var id = _this._id = _dom.nextRequestID();\n _dom.exposeConnection(id, _this);\n // Workaround Dart\n // url = url.replace(/=JSONP_CALLBACK(&|$)/, `generated method`);\n var callback = _dom.requestCallback(_this._id);\n var url = req.url;\n if (url.indexOf('=JSONP_CALLBACK&') > -1) {\n url = url.replace('=JSONP_CALLBACK&', \"=\" + callback + \"&\");\n }\n else if (url.lastIndexOf('=JSONP_CALLBACK') === url.length - '=JSONP_CALLBACK'.length) {\n url = url.substring(0, url.length - '=JSONP_CALLBACK'.length) + (\"=\" + callback);\n }\n var script = _this._script = _dom.build(url);\n var onLoad = function (event) {\n if (_this.readyState === ReadyState.Cancelled)\n return;\n _this.readyState = ReadyState.Done;\n _dom.cleanup(script);\n if (!_this._finished) {\n var responseOptions_1 = new ResponseOptions({ body: JSONP_ERR_NO_CALLBACK, type: ResponseType.Error, url: url });\n if (baseResponseOptions) {\n responseOptions_1 = baseResponseOptions.merge(responseOptions_1);\n }\n responseObserver.error(new Response(responseOptions_1));\n return;\n }\n var responseOptions = new ResponseOptions({ body: _this._responseData, url: url });\n if (_this.baseResponseOptions) {\n responseOptions = _this.baseResponseOptions.merge(responseOptions);\n }\n responseObserver.next(new Response(responseOptions));\n responseObserver.complete();\n };\n var onError = function (error) {\n if (_this.readyState === ReadyState.Cancelled)\n return;\n _this.readyState = ReadyState.Done;\n _dom.cleanup(script);\n var responseOptions = new ResponseOptions({ body: error.message, type: ResponseType.Error });\n if (baseResponseOptions) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n responseObserver.error(new Response(responseOptions));\n };\n script.addEventListener('load', onLoad);\n script.addEventListener('error', onError);\n _dom.send(script);\n return function () {\n _this.readyState = ReadyState.Cancelled;\n script.removeEventListener('load', onLoad);\n script.removeEventListener('error', onError);\n _this._dom.cleanup(script);\n };\n });\n }\n /**\n * Callback called when the JSONP request completes, to notify the application\n * of the new data.\n */\n /**\n * Callback called when the JSONP request completes, to notify the application\n * of the new data.\n */\n JSONPConnection.prototype.finished = /**\n * Callback called when the JSONP request completes, to notify the application\n * of the new data.\n */\n function (data) {\n // Don't leak connections\n this._finished = true;\n this._dom.removeConnection(this._id);\n if (this.readyState === ReadyState.Cancelled)\n return;\n this._responseData = data;\n };\n return JSONPConnection;\n}());\n/**\n * A {@link ConnectionBackend} that uses the JSONP strategy of making requests.\n *\n * @deprecated use @angular/common/http instead\n */\nvar JSONPBackend = /** @class */ (function (_super) {\n __extends(JSONPBackend, _super);\n /** @internal */\n function JSONPBackend(_browserJSONP, _baseResponseOptions) {\n var _this = _super.call(this) || this;\n _this._browserJSONP = _browserJSONP;\n _this._baseResponseOptions = _baseResponseOptions;\n return _this;\n }\n JSONPBackend.prototype.createConnection = function (request) {\n return new JSONPConnection(request, this._browserJSONP, this._baseResponseOptions);\n };\n JSONPBackend.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n JSONPBackend.ctorParameters = function () { return [\n { type: BrowserJsonp, },\n { type: ResponseOptions, },\n ]; };\n return JSONPBackend;\n}(ConnectionBackend));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 XSSI_PREFIX = /^\\)\\]\\}',?\\n/;\n/**\n * Creates connections using `XMLHttpRequest`. Given a fully-qualified\n * request, an `XHRConnection` will immediately create an `XMLHttpRequest` object and send the\n * request.\n *\n * This class would typically not be created or interacted with directly inside applications, though\n * the {@link MockConnection} may be interacted with in tests.\n *\n * @deprecated use @angular/common/http instead\n */\nvar XHRConnection = /** @class */ (function () {\n function XHRConnection(req, browserXHR, baseResponseOptions) {\n var _this = this;\n this.request = req;\n this.response = new Observable(function (responseObserver) {\n var _xhr = browserXHR.build();\n _xhr.open(RequestMethod[req.method].toUpperCase(), req.url);\n if (req.withCredentials != null) {\n _xhr.withCredentials = req.withCredentials;\n }\n // load event handler\n var onLoad = function () {\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = _xhr.status === 1223 ? 204 : _xhr.status;\n var body = null;\n // HTTP 204 means no content\n if (status !== 204) {\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in ResourceLoader Level2 spec\n // (supported by IE10)\n body = (typeof _xhr.response === 'undefined') ? _xhr.responseText : _xhr.response;\n // Implicitly strip a potential XSSI prefix.\n if (typeof body === 'string') {\n body = body.replace(XSSI_PREFIX, '');\n }\n }\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = body ? 200 : 0;\n }\n var headers = Headers.fromResponseHeaderString(_xhr.getAllResponseHeaders());\n // IE 9 does not provide the way to get URL of response\n var url = getResponseURL(_xhr) || req.url;\n var statusText = _xhr.statusText || 'OK';\n var responseOptions = new ResponseOptions({ body: body, status: status, headers: headers, statusText: statusText, url: url });\n if (baseResponseOptions != null) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n var response = new Response(responseOptions);\n response.ok = isSuccess(status);\n if (response.ok) {\n responseObserver.next(response);\n // TODO(gdi2290): defer complete if array buffer until done\n responseObserver.complete();\n return;\n }\n responseObserver.error(response);\n };\n // error event handler\n var onError = function (err) {\n var responseOptions = new ResponseOptions({\n body: err,\n type: ResponseType.Error,\n status: _xhr.status,\n statusText: _xhr.statusText,\n });\n if (baseResponseOptions != null) {\n responseOptions = baseResponseOptions.merge(responseOptions);\n }\n responseObserver.error(new Response(responseOptions));\n };\n _this.setDetectedContentType(req, _xhr);\n if (req.headers == null) {\n req.headers = new Headers();\n }\n if (!req.headers.has('Accept')) {\n req.headers.append('Accept', 'application/json, text/plain, */*');\n }\n req.headers.forEach(function (values, name) { return _xhr.setRequestHeader((name), values.join(',')); });\n // Select the correct buffer type to store the response\n if (req.responseType != null && _xhr.responseType != null) {\n switch (req.responseType) {\n case ResponseContentType.ArrayBuffer:\n _xhr.responseType = 'arraybuffer';\n break;\n case ResponseContentType.Json:\n _xhr.responseType = 'json';\n break;\n case ResponseContentType.Text:\n _xhr.responseType = 'text';\n break;\n case ResponseContentType.Blob:\n _xhr.responseType = 'blob';\n break;\n default:\n throw new Error('The selected responseType is not supported');\n }\n }\n _xhr.addEventListener('load', onLoad);\n _xhr.addEventListener('error', onError);\n _xhr.send(_this.request.getBody());\n return function () {\n _xhr.removeEventListener('load', onLoad);\n _xhr.removeEventListener('error', onError);\n _xhr.abort();\n };\n });\n }\n XHRConnection.prototype.setDetectedContentType = function (req /** TODO Request */, _xhr /** XMLHttpRequest */) {\n // Skip if a custom Content-Type header is provided\n if (req.headers != null && req.headers.get('Content-Type') != null) {\n return;\n }\n // Set the detected content type\n switch (req.contentType) {\n case ContentType.NONE:\n break;\n case ContentType.JSON:\n _xhr.setRequestHeader('content-type', 'application/json');\n break;\n case ContentType.FORM:\n _xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n break;\n case ContentType.TEXT:\n _xhr.setRequestHeader('content-type', 'text/plain');\n break;\n case ContentType.BLOB:\n var blob = req.blob();\n if (blob.type) {\n _xhr.setRequestHeader('content-type', blob.type);\n }\n break;\n }\n };\n return XHRConnection;\n}());\n/**\n * `XSRFConfiguration` sets up Cross Site Request Forgery (XSRF) protection for the application\n * using a cookie. See https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)\n * for more information on XSRF.\n *\n * Applications can configure custom cookie and header names by binding an instance of this class\n * with different `cookieName` and `headerName` values. See the main HTTP documentation for more\n * details.\n *\n * @deprecated use @angular/common/http instead\n */\nvar CookieXSRFStrategy = /** @class */ (function () {\n function CookieXSRFStrategy(_cookieName, _headerName) {\n if (_cookieName === void 0) { _cookieName = 'XSRF-TOKEN'; }\n if (_headerName === void 0) { _headerName = 'X-XSRF-TOKEN'; }\n this._cookieName = _cookieName;\n this._headerName = _headerName;\n }\n CookieXSRFStrategy.prototype.configureRequest = function (req) {\n var xsrfToken = ɵgetDOM().getCookie(this._cookieName);\n if (xsrfToken) {\n req.headers.set(this._headerName, xsrfToken);\n }\n };\n return CookieXSRFStrategy;\n}());\n/**\n * Creates {@link XHRConnection} instances.\n *\n * This class would typically not be used by end users, but could be\n * overridden if a different backend implementation should be used,\n * such as in a node backend.\n *\n * ### Example\n *\n * ```\n * import {Http, MyNodeBackend, HTTP_PROVIDERS, BaseRequestOptions} from '@angular/http';\n * @Component({\n * viewProviders: [\n * HTTP_PROVIDERS,\n * {provide: Http, useFactory: (backend, options) => {\n * return new Http(backend, options);\n * }, deps: [MyNodeBackend, BaseRequestOptions]}]\n * })\n * class MyComponent {\n * constructor(http:Http) {\n * http.request('people.json').subscribe(res => this.people = res.json());\n * }\n * }\n * ```\n * @deprecated use @angular/common/http instead\n */\nvar XHRBackend = /** @class */ (function () {\n function XHRBackend(_browserXHR, _baseResponseOptions, _xsrfStrategy) {\n this._browserXHR = _browserXHR;\n this._baseResponseOptions = _baseResponseOptions;\n this._xsrfStrategy = _xsrfStrategy;\n }\n XHRBackend.prototype.createConnection = function (request) {\n this._xsrfStrategy.configureRequest(request);\n return new XHRConnection(request, this._browserXHR, this._baseResponseOptions);\n };\n XHRBackend.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n XHRBackend.ctorParameters = function () { return [\n { type: BrowserXhr, },\n { type: ResponseOptions, },\n { type: XSRFStrategy, },\n ]; };\n return XHRBackend;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 request options object to be optionally provided when instantiating a\n * {@link Request}.\n *\n * This class is based on the `RequestInit` description in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#requestinit).\n *\n * All values are null by default. Typical defaults can be found in the {@link BaseRequestOptions}\n * class, which sub-classes `RequestOptions`.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post,\n * url: 'https://google.com'\n * });\n * const req = new Request(options);\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // https://google.com\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar RequestOptions = /** @class */ (function () {\n // TODO(Dzmitry): remove search when this.search is removed\n function RequestOptions(opts) {\n if (opts === void 0) { opts = {}; }\n var method = opts.method, headers = opts.headers, body = opts.body, url = opts.url, search = opts.search, params = opts.params, withCredentials = opts.withCredentials, responseType = opts.responseType;\n this.method = method != null ? normalizeMethodName(method) : null;\n this.headers = headers != null ? headers : null;\n this.body = body != null ? body : null;\n this.url = url != null ? url : null;\n this.params = this._mergeSearchParams(params || search);\n this.withCredentials = withCredentials != null ? withCredentials : null;\n this.responseType = responseType != null ? responseType : null;\n }\n Object.defineProperty(RequestOptions.prototype, \"search\", {\n /**\n * @deprecated from 4.0.0. Use params instead.\n */\n get: /**\n * @deprecated from 4.0.0. Use params instead.\n */\n function () { return this.params; },\n /**\n * @deprecated from 4.0.0. Use params instead.\n */\n set: /**\n * @deprecated from 4.0.0. Use params instead.\n */\n function (params) { this.params = params; },\n enumerable: true,\n configurable: true\n });\n /**\n * Creates a copy of the `RequestOptions` instance, using the optional input as values to override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * Note that `headers` and `search` will override existing values completely if present in\n * the `options` object. If these values should be merged, it should be done prior to calling\n * `merge` on the `RequestOptions` instance.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post\n * });\n * const req = new Request(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n */\n /**\n * Creates a copy of the `RequestOptions` instance, using the optional input as values to override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * Note that `headers` and `search` will override existing values completely if present in\n * the `options` object. If these values should be merged, it should be done prior to calling\n * `merge` on the `RequestOptions` instance.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post\n * });\n * const req = new Request(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n */\n RequestOptions.prototype.merge = /**\n * Creates a copy of the `RequestOptions` instance, using the optional input as values to override\n * existing values. This method will not change the values of the instance on which it is being\n * called.\n *\n * Note that `headers` and `search` will override existing values completely if present in\n * the `options` object. If these values should be merged, it should be done prior to calling\n * `merge` on the `RequestOptions` instance.\n *\n * ```typescript\n * import {RequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new RequestOptions({\n * method: RequestMethod.Post\n * });\n * const req = new Request(options.merge({\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n */\n function (options) {\n return new RequestOptions({\n method: options && options.method != null ? options.method : this.method,\n headers: options && options.headers != null ? options.headers : new Headers(this.headers),\n body: options && options.body != null ? options.body : this.body,\n url: options && options.url != null ? options.url : this.url,\n params: options && this._mergeSearchParams(options.params || options.search),\n withCredentials: options && options.withCredentials != null ? options.withCredentials :\n this.withCredentials,\n responseType: options && options.responseType != null ? options.responseType :\n this.responseType\n });\n };\n RequestOptions.prototype._mergeSearchParams = function (params) {\n if (!params)\n return this.params;\n if (params instanceof URLSearchParams) {\n return params.clone();\n }\n if (typeof params === 'string') {\n return new URLSearchParams(params);\n }\n return this._parseParams(params);\n };\n RequestOptions.prototype._parseParams = function (objParams) {\n var _this = this;\n if (objParams === void 0) { objParams = {}; }\n var params = new URLSearchParams();\n Object.keys(objParams).forEach(function (key) {\n var value = objParams[key];\n if (Array.isArray(value)) {\n value.forEach(function (item) { return _this._appendParam(key, item, params); });\n }\n else {\n _this._appendParam(key, value, params);\n }\n });\n return params;\n };\n RequestOptions.prototype._appendParam = function (key, value, params) {\n if (typeof value !== 'string') {\n value = JSON.stringify(value);\n }\n params.append(key, value);\n };\n return RequestOptions;\n}());\n/**\n * Subclass of {@link RequestOptions}, with default values.\n *\n * Default values:\n * * method: {@link RequestMethod RequestMethod.Get}\n * * headers: empty {@link Headers} object\n *\n * This class could be extended and bound to the {@link RequestOptions} class\n * when configuring an {@link Injector}, in order to override the default options\n * used by {@link Http} to create and send {@link Request Requests}.\n *\n * ```typescript\n * import {BaseRequestOptions, RequestOptions} from '@angular/http';\n *\n * class MyOptions extends BaseRequestOptions {\n * search: string = 'coreTeam=true';\n * }\n *\n * {provide: RequestOptions, useClass: MyOptions};\n * ```\n *\n * The options could also be extended when manually creating a {@link Request}\n * object.\n *\n * ```\n * import {BaseRequestOptions, Request, RequestMethod} from '@angular/http';\n *\n * const options = new BaseRequestOptions();\n * const req = new Request(options.merge({\n * method: RequestMethod.Post,\n * url: 'https://google.com'\n * }));\n * console.log('req.method:', RequestMethod[req.method]); // Post\n * console.log('options.url:', options.url); // null\n * console.log('req.url:', req.url); // https://google.com\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar BaseRequestOptions = /** @class */ (function (_super) {\n __extends(BaseRequestOptions, _super);\n function BaseRequestOptions() {\n return _super.call(this, { method: RequestMethod.Get, headers: new Headers() }) || this;\n }\n BaseRequestOptions.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BaseRequestOptions.ctorParameters = function () { return []; };\n return BaseRequestOptions;\n}(RequestOptions));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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(jeffbcross): properly implement body accessors\n/**\n * Creates `Request` instances from provided values.\n *\n * The Request's interface is inspired by the Request constructor defined in the [Fetch\n * Spec](https://fetch.spec.whatwg.org/#request-class),\n * but is considered a static value whose body can be accessed many times. There are other\n * differences in the implementation, but this is the most significant.\n *\n * `Request` instances are typically created by higher-level classes, like {@link Http} and\n * {@link Jsonp}, but it may occasionally be useful to explicitly create `Request` instances.\n * One such example is when creating services that wrap higher-level services, like {@link Http},\n * where it may be useful to generate a `Request` with arbitrary headers and search params.\n *\n * ```typescript\n * import {Injectable, Injector} from '@angular/core';\n * import {HTTP_PROVIDERS, Http, Request, RequestMethod} from '@angular/http';\n *\n * @Injectable()\n * class AutoAuthenticator {\n * constructor(public http:Http) {}\n * request(url:string) {\n * return this.http.request(new Request({\n * method: RequestMethod.Get,\n * url: url,\n * search: 'password=123'\n * }));\n * }\n * }\n *\n * var injector = Injector.resolveAndCreate([HTTP_PROVIDERS, AutoAuthenticator]);\n * var authenticator = injector.get(AutoAuthenticator);\n * authenticator.request('people.json').subscribe(res => {\n * //URL should have included '?password=123'\n * console.log('people', res.json());\n * });\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar Request = /** @class */ (function (_super) {\n __extends(Request, _super);\n function Request(requestOptions) {\n var _this = _super.call(this) || this;\n // TODO: assert that url is present\n var url = requestOptions.url;\n _this.url = (requestOptions.url);\n var paramsArg = requestOptions.params || requestOptions.search;\n if (paramsArg) {\n var params = void 0;\n if (typeof paramsArg === 'object' && !(paramsArg instanceof URLSearchParams)) {\n params = urlEncodeParams(paramsArg).toString();\n }\n else {\n params = paramsArg.toString();\n }\n if (params.length > 0) {\n var prefix = '?';\n if (_this.url.indexOf('?') != -1) {\n prefix = (_this.url[_this.url.length - 1] == '&') ? '' : '&';\n }\n // TODO: just delete search-query-looking string in url?\n // TODO: just delete search-query-looking string in url?\n _this.url = url + prefix + params;\n }\n }\n _this._body = requestOptions.body;\n _this.method = normalizeMethodName((requestOptions.method));\n // TODO(jeffbcross): implement behavior\n // Defaults to 'omit', consistent with browser\n // TODO(jeffbcross): implement behavior\n // Defaults to 'omit', consistent with browser\n _this.headers = new Headers(requestOptions.headers);\n _this.contentType = _this.detectContentType();\n _this.withCredentials = (requestOptions.withCredentials);\n _this.responseType = (requestOptions.responseType);\n return _this;\n }\n /**\n * Returns the content type enum based on header options.\n */\n /**\n * Returns the content type enum based on header options.\n */\n Request.prototype.detectContentType = /**\n * Returns the content type enum based on header options.\n */\n function () {\n switch (this.headers.get('content-type')) {\n case 'application/json':\n return ContentType.JSON;\n case 'application/x-www-form-urlencoded':\n return ContentType.FORM;\n case 'multipart/form-data':\n return ContentType.FORM_DATA;\n case 'text/plain':\n case 'text/html':\n return ContentType.TEXT;\n case 'application/octet-stream':\n return this._body instanceof ArrayBuffer$1 ? ContentType.ARRAY_BUFFER : ContentType.BLOB;\n default:\n return this.detectContentTypeFromBody();\n }\n };\n /**\n * Returns the content type of request's body based on its type.\n */\n /**\n * Returns the content type of request's body based on its type.\n */\n Request.prototype.detectContentTypeFromBody = /**\n * Returns the content type of request's body based on its type.\n */\n function () {\n if (this._body == null) {\n return ContentType.NONE;\n }\n else if (this._body instanceof URLSearchParams) {\n return ContentType.FORM;\n }\n else if (this._body instanceof FormData) {\n return ContentType.FORM_DATA;\n }\n else if (this._body instanceof Blob$1) {\n return ContentType.BLOB;\n }\n else if (this._body instanceof ArrayBuffer$1) {\n return ContentType.ARRAY_BUFFER;\n }\n else if (this._body && typeof this._body === 'object') {\n return ContentType.JSON;\n }\n else {\n return ContentType.TEXT;\n }\n };\n /**\n * Returns the request's body according to its type. If body is undefined, return\n * null.\n */\n /**\n * Returns the request's body according to its type. If body is undefined, return\n * null.\n */\n Request.prototype.getBody = /**\n * Returns the request's body according to its type. If body is undefined, return\n * null.\n */\n function () {\n switch (this.contentType) {\n case ContentType.JSON:\n return this.text();\n case ContentType.FORM:\n return this.text();\n case ContentType.FORM_DATA:\n return this._body;\n case ContentType.TEXT:\n return this.text();\n case ContentType.BLOB:\n return this.blob();\n case ContentType.ARRAY_BUFFER:\n return this.arrayBuffer();\n default:\n return null;\n }\n };\n return Request;\n}(Body));\nfunction urlEncodeParams(params) {\n var searchParams = new URLSearchParams();\n Object.keys(params).forEach(function (key) {\n var value = params[key];\n if (value && Array.isArray(value)) {\n value.forEach(function (element) { return searchParams.append(key, element.toString()); });\n }\n else {\n searchParams.append(key, value.toString());\n }\n });\n return searchParams;\n}\nvar noop = function () { };\nvar w = typeof window == 'object' ? window : noop;\nvar FormData = w /** TODO #9100 */['FormData'] || noop;\nvar Blob$1 = w /** TODO #9100 */['Blob'] || noop;\nvar ArrayBuffer$1 = w /** TODO #9100 */['ArrayBuffer'] || noop;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 httpRequest(backend, request) {\n return backend.createConnection(request).response;\n}\nfunction mergeOptions(defaultOpts, providedOpts, method, url) {\n var newOptions = defaultOpts;\n if (providedOpts) {\n // Hack so Dart can used named parameters\n return newOptions.merge(new RequestOptions({\n method: providedOpts.method || method,\n url: providedOpts.url || url,\n search: providedOpts.search,\n params: providedOpts.params,\n headers: providedOpts.headers,\n body: providedOpts.body,\n withCredentials: providedOpts.withCredentials,\n responseType: providedOpts.responseType\n }));\n }\n return newOptions.merge(new RequestOptions({ method: method, url: url }));\n}\n/**\n * Performs http requests using `XMLHttpRequest` as the default backend.\n *\n * `Http` is available as an injectable class, with methods to perform http requests. Calling\n * `request` returns an `Observable` which will emit a single {@link Response} when a\n * response is received.\n *\n * ### Example\n *\n * ```typescript\n * import {Http, HTTP_PROVIDERS} from '@angular/http';\n * import {map} from 'rxjs/operators';\n *\n * @Component({\n * selector: 'http-app',\n * viewProviders: [HTTP_PROVIDERS],\n * templateUrl: 'people.html'\n * })\n * class PeopleComponent {\n * constructor(http: Http) {\n * http.get('people.json')\n * // Call map on the response observable to get the parsed people object\n * .pipe(map(res => res.json()))\n * // Subscribe to the observable to get the parsed people object and attach it to the\n * // component\n * .subscribe(people => this.people = people);\n * }\n * }\n * ```\n *\n *\n * ### Example\n *\n * ```\n * http.get('people.json').subscribe((res:Response) => this.people = res.json());\n * ```\n *\n * The default construct used to perform requests, `XMLHttpRequest`, is abstracted as a \"Backend\" (\n * {@link XHRBackend} in this case), which could be mocked with dependency injection by replacing\n * the {@link XHRBackend} provider, as in the following example:\n *\n * ### Example\n *\n * ```typescript\n * import {BaseRequestOptions, Http} from '@angular/http';\n * import {MockBackend} from '@angular/http/testing';\n * var injector = Injector.resolveAndCreate([\n * BaseRequestOptions,\n * MockBackend,\n * {provide: Http, useFactory:\n * function(backend, defaultOptions) {\n * return new Http(backend, defaultOptions);\n * },\n * deps: [MockBackend, BaseRequestOptions]}\n * ]);\n * var http = injector.get(Http);\n * http.get('request-from-mock-backend.json').subscribe((res:Response) => doSomething(res));\n * ```\n *\n * @deprecated use @angular/common/http instead\n */\nvar Http = /** @class */ (function () {\n function Http(_backend, _defaultOptions) {\n this._backend = _backend;\n this._defaultOptions = _defaultOptions;\n }\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n */\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n */\n Http.prototype.request = /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n */\n function (url, options) {\n var responseObservable;\n if (typeof url === 'string') {\n responseObservable = httpRequest(this._backend, new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, url)));\n }\n else if (url instanceof Request) {\n responseObservable = httpRequest(this._backend, url);\n }\n else {\n throw new Error('First argument must be a url string or Request instance.');\n }\n return responseObservable;\n };\n /**\n * Performs a request with `get` http method.\n */\n /**\n * Performs a request with `get` http method.\n */\n Http.prototype.get = /**\n * Performs a request with `get` http method.\n */\n function (url, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, url)));\n };\n /**\n * Performs a request with `post` http method.\n */\n /**\n * Performs a request with `post` http method.\n */\n Http.prototype.post = /**\n * Performs a request with `post` http method.\n */\n function (url, body, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({ body: body })), options, RequestMethod.Post, url)));\n };\n /**\n * Performs a request with `put` http method.\n */\n /**\n * Performs a request with `put` http method.\n */\n Http.prototype.put = /**\n * Performs a request with `put` http method.\n */\n function (url, body, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({ body: body })), options, RequestMethod.Put, url)));\n };\n /**\n * Performs a request with `delete` http method.\n */\n /**\n * Performs a request with `delete` http method.\n */\n Http.prototype.delete = /**\n * Performs a request with `delete` http method.\n */\n function (url, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Delete, url)));\n };\n /**\n * Performs a request with `patch` http method.\n */\n /**\n * Performs a request with `patch` http method.\n */\n Http.prototype.patch = /**\n * Performs a request with `patch` http method.\n */\n function (url, body, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions.merge(new RequestOptions({ body: body })), options, RequestMethod.Patch, url)));\n };\n /**\n * Performs a request with `head` http method.\n */\n /**\n * Performs a request with `head` http method.\n */\n Http.prototype.head = /**\n * Performs a request with `head` http method.\n */\n function (url, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Head, url)));\n };\n /**\n * Performs a request with `options` http method.\n */\n /**\n * Performs a request with `options` http method.\n */\n Http.prototype.options = /**\n * Performs a request with `options` http method.\n */\n function (url, options) {\n return this.request(new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Options, url)));\n };\n Http.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Http.ctorParameters = function () { return [\n { type: ConnectionBackend, },\n { type: RequestOptions, },\n ]; };\n return Http;\n}());\n/**\n * @deprecated use @angular/common/http instead\n */\nvar Jsonp = /** @class */ (function (_super) {\n __extends(Jsonp, _super);\n function Jsonp(backend, defaultOptions) {\n return _super.call(this, backend, defaultOptions) || this;\n }\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n *\n * @security Regular XHR is the safest alternative to JSONP for most applications, and is\n * supported by all current browsers. Because JSONP creates a `<script>` element with\n * contents retrieved from a remote source, attacker-controlled data introduced by an untrusted\n * source could expose your application to XSS risks. Data exposed by JSONP may also be\n * readable by malicious third-party websites. In addition, JSONP introduces potential risk for\n * future security issues (e.g. content sniffing). For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n */\n /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n *\n * @security Regular XHR is the safest alternative to JSONP for most applications, and is\n * supported by all current browsers. Because JSONP creates a `<script>` element with\n * contents retrieved from a remote source, attacker-controlled data introduced by an untrusted\n * source could expose your application to XSS risks. Data exposed by JSONP may also be\n * readable by malicious third-party websites. In addition, JSONP introduces potential risk for\n * future security issues (e.g. content sniffing). For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n */\n Jsonp.prototype.request = /**\n * Performs any type of http request. First argument is required, and can either be a url or\n * a {@link Request} instance. If the first argument is a url, an optional {@link RequestOptions}\n * object can be provided as the 2nd argument. The options object will be merged with the values\n * of {@link BaseRequestOptions} before performing the request.\n *\n * @security Regular XHR is the safest alternative to JSONP for most applications, and is\n * supported by all current browsers. Because JSONP creates a `<script>` element with\n * contents retrieved from a remote source, attacker-controlled data introduced by an untrusted\n * source could expose your application to XSS risks. Data exposed by JSONP may also be\n * readable by malicious third-party websites. In addition, JSONP introduces potential risk for\n * future security issues (e.g. content sniffing). For more detail, see the\n * [Security Guide](http://g.co/ng/security).\n */\n function (url, options) {\n var responseObservable;\n if (typeof url === 'string') {\n url =\n new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Get, url));\n }\n if (url instanceof Request) {\n if (url.method !== RequestMethod.Get) {\n throw new Error('JSONP requests must use GET request method.');\n }\n responseObservable = httpRequest(this._backend, url);\n }\n else {\n throw new Error('First argument must be a url string or Request instance.');\n }\n return responseObservable;\n };\n Jsonp.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Jsonp.ctorParameters = function () { return [\n { type: ConnectionBackend, },\n { type: RequestOptions, },\n ]; };\n return Jsonp;\n}(Http));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _createDefaultCookieXSRFStrategy() {\n return new CookieXSRFStrategy();\n}\nfunction httpFactory(xhrBackend, requestOptions) {\n return new Http(xhrBackend, requestOptions);\n}\nfunction jsonpFactory(jsonpBackend, requestOptions) {\n return new Jsonp(jsonpBackend, requestOptions);\n}\n/**\n * The module that includes http's providers\n *\n * @deprecated use @angular/common/http instead\n */\nvar HttpModule = /** @class */ (function () {\n function HttpModule() {\n }\n HttpModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n // TODO(pascal): use factory type annotations once supported in DI\n // issue: https://github.com/angular/angular/issues/3183\n { provide: Http, useFactory: httpFactory, deps: [XHRBackend, RequestOptions] },\n BrowserXhr,\n { provide: RequestOptions, useClass: BaseRequestOptions },\n { provide: ResponseOptions, useClass: BaseResponseOptions },\n XHRBackend,\n { provide: XSRFStrategy, useFactory: _createDefaultCookieXSRFStrategy },\n ],\n },] }\n ];\n /** @nocollapse */\n HttpModule.ctorParameters = function () { return []; };\n return HttpModule;\n}());\n/**\n * The module that includes jsonp's providers\n *\n * @deprecated use @angular/common/http instead\n */\nvar JsonpModule = /** @class */ (function () {\n function JsonpModule() {\n }\n JsonpModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n // TODO(pascal): use factory type annotations once supported in DI\n // issue: https://github.com/angular/angular/issues/3183\n { provide: Jsonp, useFactory: jsonpFactory, deps: [JSONPBackend, RequestOptions] },\n BrowserJsonp,\n { provide: RequestOptions, useClass: BaseRequestOptions },\n { provide: ResponseOptions, useClass: BaseResponseOptions },\n JSONPBackend,\n ],\n },] }\n ];\n /** @nocollapse */\n JsonpModule.ctorParameters = function () { return []; };\n return JsonpModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @deprecated use @angular/common/http instead\n */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { BrowserJsonp as ɵangular_packages_http_http_e, Body as ɵangular_packages_http_http_f, _createDefaultCookieXSRFStrategy as ɵangular_packages_http_http_a, httpFactory as ɵangular_packages_http_http_b, jsonpFactory as ɵangular_packages_http_http_c, BrowserXhr, JSONPBackend, JSONPConnection, CookieXSRFStrategy, XHRBackend, XHRConnection, BaseRequestOptions, RequestOptions, BaseResponseOptions, ResponseOptions, ReadyState, RequestMethod, ResponseContentType, ResponseType, Headers, Http, Jsonp, HttpModule, JsonpModule, Connection, ConnectionBackend, XSRFStrategy, Request, Response, QueryEncoder, URLSearchParams, VERSION };\n//# sourceMappingURL=http.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { CompileMetadataResolver, CompileReflector, CompilerConfig, DirectiveNormalizer, DirectiveResolver, DomElementSchemaRegistry, ElementSchemaRegistry, HtmlParser, I18NHtmlParser, Identifiers, JitCompiler, JitSummaryResolver, Lexer, NgModuleCompiler, NgModuleResolver, Parser, PipeResolver, ProviderMeta, ResourceLoader, StaticSymbolCache, StyleCompiler, SummaryResolver, TemplateParser, UrlResolver, ViewCompiler, getUrlScheme, syntaxError } from '@angular/compiler';\nimport { ANALYZE_FOR_ENTRY_COMPONENTS, COMPILER_OPTIONS, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, ComponentFactory, ComponentFactoryResolver, ComponentRef, ElementRef, Inject, Injectable, InjectionToken, Injector, LOCALE_ID, MissingTranslationStrategy, NgModuleFactory, NgModuleRef, Optional, PACKAGE_ROOT_URL, PLATFORM_ID, QueryList, Renderer, SecurityContext, TRANSLATIONS, TRANSLATIONS_FORMAT, TemplateRef, Version, ViewContainerRef, ViewEncapsulation, createPlatformFactory, isDevMode, platformCore, ɵCodegenComponentFactoryResolver, ɵConsole, ɵEMPTY_ARRAY, ɵEMPTY_MAP, ɵReflectionCapabilities, ɵand, ɵccf, ɵcmf, ɵcrt, ɵdid, ɵeld, ɵglobal, ɵinlineInterpolate, ɵinterpolate, ɵmod, ɵmpd, ɵncd, ɵnov, ɵpad, ɵpid, ɵpod, ɵppd, ɵprd, ɵqud, ɵregisterModuleFactory, ɵstringify, ɵted, ɵunv, ɵvid } from '@angular/core';\nimport { __extends, __spread } from 'tslib';\nimport { ɵPLATFORM_BROWSER_ID } from '@angular/common';\nimport { ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS } from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 MODULE_SUFFIX = '';\nvar builtinExternalReferences = createBuiltinExternalReferencesMap();\nvar JitReflector = /** @class */ (function () {\n function JitReflector() {\n this.builtinExternalReferences = new Map();\n this.reflectionCapabilities = new ɵReflectionCapabilities();\n }\n JitReflector.prototype.componentModuleUrl = function (type, cmpMetadata) {\n var moduleId = cmpMetadata.moduleId;\n if (typeof moduleId === 'string') {\n var scheme = getUrlScheme(moduleId);\n return scheme ? moduleId : \"package:\" + moduleId + MODULE_SUFFIX;\n }\n else if (moduleId !== null && moduleId !== void 0) {\n throw syntaxError(\"moduleId should be a string in \\\"\" + ɵstringify(type) + \"\\\". See https://goo.gl/wIDDiL for more information.\\n\" +\n \"If you're using Webpack you should inline the template and the styles, see https://goo.gl/X2J8zc.\");\n }\n return \"./\" + ɵstringify(type);\n };\n JitReflector.prototype.parameters = function (typeOrFunc) {\n return this.reflectionCapabilities.parameters(typeOrFunc);\n };\n JitReflector.prototype.tryAnnotations = function (typeOrFunc) { return this.annotations(typeOrFunc); };\n JitReflector.prototype.annotations = function (typeOrFunc) {\n return this.reflectionCapabilities.annotations(typeOrFunc);\n };\n JitReflector.prototype.shallowAnnotations = function (typeOrFunc) {\n throw new Error('Not supported in JIT mode');\n };\n JitReflector.prototype.propMetadata = function (typeOrFunc) {\n return this.reflectionCapabilities.propMetadata(typeOrFunc);\n };\n JitReflector.prototype.hasLifecycleHook = function (type, lcProperty) {\n return this.reflectionCapabilities.hasLifecycleHook(type, lcProperty);\n };\n JitReflector.prototype.guards = function (type) { return this.reflectionCapabilities.guards(type); };\n JitReflector.prototype.resolveExternalReference = function (ref) {\n return builtinExternalReferences.get(ref) || ref.runtime;\n };\n return JitReflector;\n}());\nfunction createBuiltinExternalReferencesMap() {\n var map = new Map();\n map.set(Identifiers.ANALYZE_FOR_ENTRY_COMPONENTS, ANALYZE_FOR_ENTRY_COMPONENTS);\n map.set(Identifiers.ElementRef, ElementRef);\n map.set(Identifiers.NgModuleRef, NgModuleRef);\n map.set(Identifiers.ViewContainerRef, ViewContainerRef);\n map.set(Identifiers.ChangeDetectorRef, ChangeDetectorRef);\n map.set(Identifiers.QueryList, QueryList);\n map.set(Identifiers.TemplateRef, TemplateRef);\n map.set(Identifiers.CodegenComponentFactoryResolver, ɵCodegenComponentFactoryResolver);\n map.set(Identifiers.ComponentFactoryResolver, ComponentFactoryResolver);\n map.set(Identifiers.ComponentFactory, ComponentFactory);\n map.set(Identifiers.ComponentRef, ComponentRef);\n map.set(Identifiers.NgModuleFactory, NgModuleFactory);\n map.set(Identifiers.createModuleFactory, ɵcmf);\n map.set(Identifiers.moduleDef, ɵmod);\n map.set(Identifiers.moduleProviderDef, ɵmpd);\n map.set(Identifiers.RegisterModuleFactoryFn, ɵregisterModuleFactory);\n map.set(Identifiers.Injector, Injector);\n map.set(Identifiers.ViewEncapsulation, ViewEncapsulation);\n map.set(Identifiers.ChangeDetectionStrategy, ChangeDetectionStrategy);\n map.set(Identifiers.SecurityContext, SecurityContext);\n map.set(Identifiers.LOCALE_ID, LOCALE_ID);\n map.set(Identifiers.TRANSLATIONS_FORMAT, TRANSLATIONS_FORMAT);\n map.set(Identifiers.inlineInterpolate, ɵinlineInterpolate);\n map.set(Identifiers.interpolate, ɵinterpolate);\n map.set(Identifiers.EMPTY_ARRAY, ɵEMPTY_ARRAY);\n map.set(Identifiers.EMPTY_MAP, ɵEMPTY_MAP);\n map.set(Identifiers.Renderer, Renderer);\n map.set(Identifiers.viewDef, ɵvid);\n map.set(Identifiers.elementDef, ɵeld);\n map.set(Identifiers.anchorDef, ɵand);\n map.set(Identifiers.textDef, ɵted);\n map.set(Identifiers.directiveDef, ɵdid);\n map.set(Identifiers.providerDef, ɵprd);\n map.set(Identifiers.queryDef, ɵqud);\n map.set(Identifiers.pureArrayDef, ɵpad);\n map.set(Identifiers.pureObjectDef, ɵpod);\n map.set(Identifiers.purePipeDef, ɵppd);\n map.set(Identifiers.pipeDef, ɵpid);\n map.set(Identifiers.nodeValue, ɵnov);\n map.set(Identifiers.ngContentDef, ɵncd);\n map.set(Identifiers.unwrapValue, ɵunv);\n map.set(Identifiers.createRendererType2, ɵcrt);\n map.set(Identifiers.createComponentFactory, ɵccf);\n return map;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ERROR_COLLECTOR_TOKEN = new InjectionToken('ErrorCollector');\n/**\n * A default provider for {@link PACKAGE_ROOT_URL} that maps to '/'.\n */\nvar DEFAULT_PACKAGE_URL_PROVIDER = {\n provide: PACKAGE_ROOT_URL,\n useValue: '/'\n};\nvar _NO_RESOURCE_LOADER = {\n get: function (url) {\n throw new Error(\"No ResourceLoader implementation has been provided. Can't read the url \\\"\" + url + \"\\\"\");\n }\n};\nvar baseHtmlParser = new InjectionToken('HtmlParser');\nvar CompilerImpl = /** @class */ (function () {\n function CompilerImpl(injector, _metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console) {\n this._metadataResolver = _metadataResolver;\n this._delegate = new JitCompiler(_metadataResolver, templateParser, styleCompiler, viewCompiler, ngModuleCompiler, summaryResolver, compileReflector, compilerConfig, console, this.getExtraNgModuleProviders.bind(this));\n this.injector = injector;\n }\n CompilerImpl.prototype.getExtraNgModuleProviders = function () {\n return [this._metadataResolver.getProviderMetadata(new ProviderMeta(Compiler, { useValue: this }))];\n };\n CompilerImpl.prototype.compileModuleSync = function (moduleType) {\n return this._delegate.compileModuleSync(moduleType);\n };\n CompilerImpl.prototype.compileModuleAsync = function (moduleType) {\n return this._delegate.compileModuleAsync(moduleType);\n };\n CompilerImpl.prototype.compileModuleAndAllComponentsSync = function (moduleType) {\n var result = this._delegate.compileModuleAndAllComponentsSync(moduleType);\n return {\n ngModuleFactory: result.ngModuleFactory,\n componentFactories: result.componentFactories,\n };\n };\n CompilerImpl.prototype.compileModuleAndAllComponentsAsync = function (moduleType) {\n return this._delegate.compileModuleAndAllComponentsAsync(moduleType)\n .then(function (result) {\n return ({\n ngModuleFactory: result.ngModuleFactory,\n componentFactories: result.componentFactories,\n });\n });\n };\n CompilerImpl.prototype.loadAotSummaries = function (summaries) { this._delegate.loadAotSummaries(summaries); };\n CompilerImpl.prototype.hasAotSummary = function (ref) { return this._delegate.hasAotSummary(ref); };\n CompilerImpl.prototype.getComponentFactory = function (component) {\n return this._delegate.getComponentFactory(component);\n };\n CompilerImpl.prototype.clearCache = function () { this._delegate.clearCache(); };\n CompilerImpl.prototype.clearCacheFor = function (type) { this._delegate.clearCacheFor(type); };\n return CompilerImpl;\n}());\n/**\n * A set of providers that provide `JitCompiler` and its dependencies to use for\n * template compilation.\n */\nvar COMPILER_PROVIDERS = [\n { provide: CompileReflector, useValue: new JitReflector() },\n { provide: ResourceLoader, useValue: _NO_RESOURCE_LOADER },\n { provide: JitSummaryResolver, deps: [] },\n { provide: SummaryResolver, useExisting: JitSummaryResolver },\n { provide: ɵConsole, deps: [] },\n { provide: Lexer, deps: [] },\n { provide: Parser, deps: [Lexer] },\n {\n provide: baseHtmlParser,\n useClass: HtmlParser,\n deps: [],\n },\n {\n provide: I18NHtmlParser,\n useFactory: function (parser, translations, format, config, console) {\n translations = translations || '';\n var missingTranslation = translations ? config.missingTranslation : MissingTranslationStrategy.Ignore;\n return new I18NHtmlParser(parser, translations, format, missingTranslation, console);\n },\n deps: [\n baseHtmlParser,\n [new Optional(), new Inject(TRANSLATIONS)],\n [new Optional(), new Inject(TRANSLATIONS_FORMAT)],\n [CompilerConfig],\n [ɵConsole],\n ]\n },\n {\n provide: HtmlParser,\n useExisting: I18NHtmlParser,\n },\n {\n provide: TemplateParser, deps: [CompilerConfig, CompileReflector,\n Parser, ElementSchemaRegistry,\n I18NHtmlParser, ɵConsole]\n },\n { provide: DirectiveNormalizer, deps: [ResourceLoader, UrlResolver, HtmlParser, CompilerConfig] },\n { provide: CompileMetadataResolver, deps: [CompilerConfig, HtmlParser, NgModuleResolver,\n DirectiveResolver, PipeResolver,\n SummaryResolver,\n ElementSchemaRegistry,\n DirectiveNormalizer, ɵConsole,\n [Optional, StaticSymbolCache],\n CompileReflector,\n [Optional, ERROR_COLLECTOR_TOKEN]] },\n DEFAULT_PACKAGE_URL_PROVIDER,\n { provide: StyleCompiler, deps: [UrlResolver] },\n { provide: ViewCompiler, deps: [CompileReflector] },\n { provide: NgModuleCompiler, deps: [CompileReflector] },\n { provide: CompilerConfig, useValue: new CompilerConfig() },\n { provide: Compiler, useClass: CompilerImpl, deps: [Injector, CompileMetadataResolver,\n TemplateParser, StyleCompiler,\n ViewCompiler, NgModuleCompiler,\n SummaryResolver, CompileReflector, CompilerConfig,\n ɵConsole] },\n { provide: DomElementSchemaRegistry, deps: [] },\n { provide: ElementSchemaRegistry, useExisting: DomElementSchemaRegistry },\n { provide: UrlResolver, deps: [PACKAGE_ROOT_URL] },\n { provide: DirectiveResolver, deps: [CompileReflector] },\n { provide: PipeResolver, deps: [CompileReflector] },\n { provide: NgModuleResolver, deps: [CompileReflector] },\n];\n/**\n * @experimental\n */\nvar JitCompilerFactory = /** @class */ (function () {\n /* @internal */\n function JitCompilerFactory(defaultOptions) {\n var compilerOptions = {\n useJit: true,\n defaultEncapsulation: ViewEncapsulation.Emulated,\n missingTranslation: MissingTranslationStrategy.Warning,\n };\n this._defaultOptions = __spread([compilerOptions], defaultOptions);\n }\n JitCompilerFactory.prototype.createCompiler = function (options) {\n if (options === void 0) { options = []; }\n var opts = _mergeOptions(this._defaultOptions.concat(options));\n var injector = Injector.create([\n COMPILER_PROVIDERS, {\n provide: CompilerConfig,\n useFactory: function () {\n return new CompilerConfig({\n // let explicit values from the compiler options overwrite options\n // from the app providers\n useJit: opts.useJit,\n jitDevMode: isDevMode(),\n // let explicit values from the compiler options overwrite options\n // from the app providers\n defaultEncapsulation: opts.defaultEncapsulation,\n missingTranslation: opts.missingTranslation,\n preserveWhitespaces: opts.preserveWhitespaces,\n });\n },\n deps: []\n },\n (opts.providers)\n ]);\n return injector.get(Compiler);\n };\n return JitCompilerFactory;\n}());\nfunction _mergeOptions(optionsArr) {\n return {\n useJit: _lastDefined(optionsArr.map(function (options) { return options.useJit; })),\n defaultEncapsulation: _lastDefined(optionsArr.map(function (options) { return options.defaultEncapsulation; })),\n providers: _mergeArrays(optionsArr.map(function (options) { return options.providers; })),\n missingTranslation: _lastDefined(optionsArr.map(function (options) { return options.missingTranslation; })),\n preserveWhitespaces: _lastDefined(optionsArr.map(function (options) { return options.preserveWhitespaces; })),\n };\n}\nfunction _lastDefined(args) {\n for (var 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 var result = [];\n parts.forEach(function (part) { return part && result.push.apply(result, __spread(part)); });\n return result;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 platform that included corePlatform and the compiler.\n *\n * @experimental\n */\nvar platformCoreDynamic = createPlatformFactory(platformCore, 'coreDynamic', [\n { provide: COMPILER_OPTIONS, useValue: {}, multi: true },\n { provide: CompilerFactory, useClass: JitCompilerFactory, deps: [COMPILER_OPTIONS] },\n]);\n\nvar ResourceLoaderImpl = /** @class */ (function (_super) {\n __extends(ResourceLoaderImpl, _super);\n function ResourceLoaderImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ResourceLoaderImpl.prototype.get = function (url) {\n var resolve;\n var reject;\n var promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.responseType = 'text';\n xhr.onload = function () {\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in ResourceLoader Level2 spec (supported\n // by IE10)\n var response = xhr.response || xhr.responseText;\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status = xhr.status === 1223 ? 204 : xhr.status;\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : 0;\n }\n if (200 <= status && status <= 300) {\n resolve(response);\n }\n else {\n reject(\"Failed to load \" + url);\n }\n };\n xhr.onerror = function () { reject(\"Failed to load \" + url); };\n xhr.send();\n return promise;\n };\n ResourceLoaderImpl.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n ResourceLoaderImpl.ctorParameters = function () { return []; };\n return ResourceLoaderImpl;\n}(ResourceLoader));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS = [\n ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS,\n {\n provide: COMPILER_OPTIONS,\n useValue: { providers: [{ provide: ResourceLoader, useClass: ResourceLoaderImpl, deps: [] }] },\n multi: true\n },\n { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 implementation of ResourceLoader that uses a template cache to avoid doing an actual\n * ResourceLoader.\n *\n * The template cache needs to be built and loaded into window.$templateCache\n * via a separate mechanism.\n */\nvar CachedResourceLoader = /** @class */ (function (_super) {\n __extends(CachedResourceLoader, _super);\n function CachedResourceLoader() {\n var _this = _super.call(this) || this;\n _this._cache = ɵglobal.$templateCache;\n if (_this._cache == null) {\n throw new Error('CachedResourceLoader: Template cache was not found in $templateCache.');\n }\n return _this;\n }\n CachedResourceLoader.prototype.get = function (url) {\n if (this._cache.hasOwnProperty(url)) {\n return Promise.resolve(this._cache[url]);\n }\n else {\n return Promise.reject('CachedResourceLoader: Did not find cached template for ' + url);\n }\n };\n return CachedResourceLoader;\n}(ResourceLoader));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @experimental\n */\nvar RESOURCE_CACHE_PROVIDER = [{ provide: ResourceLoader, useClass: CachedResourceLoader, deps: [] }];\n/**\n *\n */\nvar platformBrowserDynamic = createPlatformFactory(platformCoreDynamic, 'browserDynamic', INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { CachedResourceLoader as ɵangular_packages_platform_browser_dynamic_platform_browser_dynamic_a, RESOURCE_CACHE_PROVIDER, platformBrowserDynamic, VERSION, JitCompilerFactory, CompilerImpl as ɵCompilerImpl, platformCoreDynamic as ɵplatformCoreDynamic, INTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS, ResourceLoaderImpl as ɵResourceLoaderImpl };\n//# sourceMappingURL=platform-browser-dynamic.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { Inject, Injectable, InjectionToken, NgModule, NgZone, RendererFactory2, ViewEncapsulation } from '@angular/core';\nimport { BrowserModule, DOCUMENT, ɵDomRendererFactory2 } from '@angular/platform-browser';\nimport { __extends, __read, __spread } from 'tslib';\nimport { AnimationBuilder, AnimationFactory, sequence } from '@angular/animations';\nimport { AnimationDriver, ɵAnimationEngine, ɵAnimationStyleNormalizer, ɵCssKeyframesDriver, ɵNoopAnimationDriver, ɵWebAnimationsDriver, ɵWebAnimationsStyleNormalizer, ɵsupportsWebAnimations } from '@angular/animations/browser';\n\nvar BrowserAnimationBuilder = /** @class */ (function (_super) {\n __extends(BrowserAnimationBuilder, _super);\n function BrowserAnimationBuilder(rootRenderer, doc) {\n var _this = _super.call(this) || this;\n _this._nextAnimationId = 0;\n var typeData = {\n id: '0',\n encapsulation: ViewEncapsulation.None,\n styles: [],\n data: { animation: [] }\n };\n _this._renderer = rootRenderer.createRenderer(doc.body, typeData);\n return _this;\n }\n BrowserAnimationBuilder.prototype.build = function (animation) {\n var id = this._nextAnimationId.toString();\n this._nextAnimationId++;\n var entry = Array.isArray(animation) ? sequence(animation) : animation;\n issueAnimationCommand(this._renderer, null, id, 'register', [entry]);\n return new BrowserAnimationFactory(id, this._renderer);\n };\n BrowserAnimationBuilder.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BrowserAnimationBuilder.ctorParameters = function () { return [\n { type: RendererFactory2, },\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },\n ]; };\n return BrowserAnimationBuilder;\n}(AnimationBuilder));\nvar BrowserAnimationFactory = /** @class */ (function (_super) {\n __extends(BrowserAnimationFactory, _super);\n function BrowserAnimationFactory(_id, _renderer) {\n var _this = _super.call(this) || this;\n _this._id = _id;\n _this._renderer = _renderer;\n return _this;\n }\n BrowserAnimationFactory.prototype.create = function (element, options) {\n return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);\n };\n return BrowserAnimationFactory;\n}(AnimationFactory));\nvar RendererAnimationPlayer = /** @class */ (function () {\n function RendererAnimationPlayer(id, element, options, _renderer) {\n this.id = id;\n this.element = element;\n this._renderer = _renderer;\n this.parentPlayer = null;\n this._started = false;\n this.totalTime = 0;\n this._command('create', options);\n }\n RendererAnimationPlayer.prototype._listen = function (eventName, callback) {\n return this._renderer.listen(this.element, \"@@\" + this.id + \":\" + eventName, callback);\n };\n RendererAnimationPlayer.prototype._command = function (command) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return issueAnimationCommand(this._renderer, this.element, this.id, command, args);\n };\n RendererAnimationPlayer.prototype.onDone = function (fn) { this._listen('done', fn); };\n RendererAnimationPlayer.prototype.onStart = function (fn) { this._listen('start', fn); };\n RendererAnimationPlayer.prototype.onDestroy = function (fn) { this._listen('destroy', fn); };\n RendererAnimationPlayer.prototype.init = function () { this._command('init'); };\n RendererAnimationPlayer.prototype.hasStarted = function () { return this._started; };\n RendererAnimationPlayer.prototype.play = function () {\n this._command('play');\n this._started = true;\n };\n RendererAnimationPlayer.prototype.pause = function () { this._command('pause'); };\n RendererAnimationPlayer.prototype.restart = function () { this._command('restart'); };\n RendererAnimationPlayer.prototype.finish = function () { this._command('finish'); };\n RendererAnimationPlayer.prototype.destroy = function () { this._command('destroy'); };\n RendererAnimationPlayer.prototype.reset = function () { this._command('reset'); };\n RendererAnimationPlayer.prototype.setPosition = function (p) { this._command('setPosition', p); };\n RendererAnimationPlayer.prototype.getPosition = function () { return 0; };\n return RendererAnimationPlayer;\n}());\nfunction issueAnimationCommand(renderer, element, id, command, args) {\n return renderer.setProperty(element, \"@@\" + id + \":\" + command, args);\n}\n\nvar ANIMATION_PREFIX = '@';\nvar DISABLE_ANIMATIONS_FLAG = '@.disabled';\nvar AnimationRendererFactory = /** @class */ (function () {\n function AnimationRendererFactory(delegate, engine, _zone) {\n this.delegate = delegate;\n this.engine = engine;\n this._zone = _zone;\n this._currentId = 0;\n this._microtaskId = 1;\n this._animationCallbacksBuffer = [];\n this._rendererCache = new Map();\n this._cdRecurDepth = 0;\n this.promise = Promise.resolve(0);\n engine.onRemovalComplete = function (element, delegate) {\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 AnimationRendererFactory.prototype.createRenderer = function (hostElement, type) {\n var _this = this;\n var EMPTY_NAMESPACE_ID = '';\n // cache the delegates to find out which cached delegate can\n // be used by which cached renderer\n var delegate = this.delegate.createRenderer(hostElement, type);\n if (!hostElement || !type || !type.data || !type.data['animation']) {\n var renderer = 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 var componentId = type.id;\n var namespaceId = type.id + '-' + this._currentId;\n this._currentId++;\n this.engine.register(namespaceId, hostElement);\n var animationTriggers = type.data['animation'];\n animationTriggers.forEach(function (trigger) {\n return _this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);\n });\n return new AnimationRenderer(this, namespaceId, delegate, this.engine);\n };\n AnimationRendererFactory.prototype.begin = function () {\n this._cdRecurDepth++;\n if (this.delegate.begin) {\n this.delegate.begin();\n }\n };\n AnimationRendererFactory.prototype._scheduleCountTask = function () {\n var _this = this;\n // always use promise to schedule microtask instead of use Zone\n this.promise.then(function () { _this._microtaskId++; });\n };\n /* @internal */\n /* @internal */\n AnimationRendererFactory.prototype.scheduleListenerCallback = /* @internal */\n function (count, fn, data) {\n var _this = this;\n if (count >= 0 && count < this._microtaskId) {\n this._zone.run(function () { return fn(data); });\n return;\n }\n if (this._animationCallbacksBuffer.length == 0) {\n Promise.resolve(null).then(function () {\n _this._zone.run(function () {\n _this._animationCallbacksBuffer.forEach(function (tuple) {\n var _a = __read(tuple, 2), fn = _a[0], data = _a[1];\n fn(data);\n });\n _this._animationCallbacksBuffer = [];\n });\n });\n }\n this._animationCallbacksBuffer.push([fn, data]);\n };\n AnimationRendererFactory.prototype.end = function () {\n var _this = this;\n this._cdRecurDepth--;\n // this is to prevent animations from running twice when an inner\n // component does CD when a parent component insted has inserted it\n if (this._cdRecurDepth == 0) {\n this._zone.runOutsideAngular(function () {\n _this._scheduleCountTask();\n _this.engine.flush(_this._microtaskId);\n });\n }\n if (this.delegate.end) {\n this.delegate.end();\n }\n };\n AnimationRendererFactory.prototype.whenRenderingDone = function () { return this.engine.whenRenderingDone(); };\n AnimationRendererFactory.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n AnimationRendererFactory.ctorParameters = function () { return [\n { type: RendererFactory2, },\n { type: ɵAnimationEngine, },\n { type: NgZone, },\n ]; };\n return AnimationRendererFactory;\n}());\nvar BaseAnimationRenderer = /** @class */ (function () {\n function BaseAnimationRenderer(namespaceId, delegate, engine) {\n this.namespaceId = namespaceId;\n this.delegate = delegate;\n this.engine = engine;\n this.destroyNode = this.delegate.destroyNode ? function (n) { return delegate.destroyNode(n); } : null;\n }\n Object.defineProperty(BaseAnimationRenderer.prototype, \"data\", {\n get: function () { return this.delegate.data; },\n enumerable: true,\n configurable: true\n });\n BaseAnimationRenderer.prototype.destroy = function () {\n this.engine.destroy(this.namespaceId, this.delegate);\n this.delegate.destroy();\n };\n BaseAnimationRenderer.prototype.createElement = function (name, namespace) {\n return this.delegate.createElement(name, namespace);\n };\n BaseAnimationRenderer.prototype.createComment = function (value) { return this.delegate.createComment(value); };\n BaseAnimationRenderer.prototype.createText = function (value) { return this.delegate.createText(value); };\n BaseAnimationRenderer.prototype.appendChild = function (parent, newChild) {\n this.delegate.appendChild(parent, newChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, false);\n };\n BaseAnimationRenderer.prototype.insertBefore = function (parent, newChild, refChild) {\n this.delegate.insertBefore(parent, newChild, refChild);\n this.engine.onInsert(this.namespaceId, newChild, parent, true);\n };\n BaseAnimationRenderer.prototype.removeChild = function (parent, oldChild) {\n this.engine.onRemove(this.namespaceId, oldChild, this.delegate);\n };\n BaseAnimationRenderer.prototype.selectRootElement = function (selectorOrNode) { return this.delegate.selectRootElement(selectorOrNode); };\n BaseAnimationRenderer.prototype.parentNode = function (node) { return this.delegate.parentNode(node); };\n BaseAnimationRenderer.prototype.nextSibling = function (node) { return this.delegate.nextSibling(node); };\n BaseAnimationRenderer.prototype.setAttribute = function (el, name, value, namespace) {\n this.delegate.setAttribute(el, name, value, namespace);\n };\n BaseAnimationRenderer.prototype.removeAttribute = function (el, name, namespace) {\n this.delegate.removeAttribute(el, name, namespace);\n };\n BaseAnimationRenderer.prototype.addClass = function (el, name) { this.delegate.addClass(el, name); };\n BaseAnimationRenderer.prototype.removeClass = function (el, name) { this.delegate.removeClass(el, name); };\n BaseAnimationRenderer.prototype.setStyle = function (el, style, value, flags) {\n this.delegate.setStyle(el, style, value, flags);\n };\n BaseAnimationRenderer.prototype.removeStyle = function (el, style, flags) {\n this.delegate.removeStyle(el, style, flags);\n };\n BaseAnimationRenderer.prototype.setProperty = function (el, name, value) {\n if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {\n this.disableAnimations(el, !!value);\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n };\n BaseAnimationRenderer.prototype.setValue = function (node, value) { this.delegate.setValue(node, value); };\n BaseAnimationRenderer.prototype.listen = function (target, eventName, callback) {\n return this.delegate.listen(target, eventName, callback);\n };\n BaseAnimationRenderer.prototype.disableAnimations = function (element, value) {\n this.engine.disableAnimations(element, value);\n };\n return BaseAnimationRenderer;\n}());\nvar AnimationRenderer = /** @class */ (function (_super) {\n __extends(AnimationRenderer, _super);\n function AnimationRenderer(factory, namespaceId, delegate, engine) {\n var _this = _super.call(this, namespaceId, delegate, engine) || this;\n _this.factory = factory;\n _this.namespaceId = namespaceId;\n return _this;\n }\n AnimationRenderer.prototype.setProperty = function (el, name, value) {\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);\n }\n else {\n this.engine.process(this.namespaceId, el, name.substr(1), value);\n }\n }\n else {\n this.delegate.setProperty(el, name, value);\n }\n };\n AnimationRenderer.prototype.listen = function (target, eventName, callback) {\n var _this = this;\n if (eventName.charAt(0) == ANIMATION_PREFIX) {\n var element = resolveElementFromTarget(target);\n var name_1 = eventName.substr(1);\n var phase = '';\n // @listener.phase is for trigger animation callbacks\n // @@listener is for animation builder callbacks\n if (name_1.charAt(0) != ANIMATION_PREFIX) {\n _a = __read(parseTriggerCallbackName(name_1), 2), name_1 = _a[0], phase = _a[1];\n }\n return this.engine.listen(this.namespaceId, element, name_1, phase, function (event) {\n var countId = event['_data'] || -1;\n _this.factory.scheduleListenerCallback(countId, callback, event);\n });\n }\n return this.delegate.listen(target, eventName, callback);\n var _a;\n };\n return AnimationRenderer;\n}(BaseAnimationRenderer));\nfunction resolveElementFromTarget(target) {\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}\nfunction parseTriggerCallbackName(triggerName) {\n var dotIndex = triggerName.indexOf('.');\n var trigger = triggerName.substring(0, dotIndex);\n var phase = triggerName.substr(dotIndex + 1);\n return [trigger, phase];\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 InjectableAnimationEngine = /** @class */ (function (_super) {\n __extends(InjectableAnimationEngine, _super);\n function InjectableAnimationEngine(driver, normalizer) {\n return _super.call(this, driver, normalizer) || this;\n }\n InjectableAnimationEngine.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n InjectableAnimationEngine.ctorParameters = function () { return [\n { type: AnimationDriver, },\n { type: ɵAnimationStyleNormalizer, },\n ]; };\n return InjectableAnimationEngine;\n}(ɵAnimationEngine));\nfunction instantiateSupportedAnimationDriver() {\n return ɵsupportsWebAnimations() ? new ɵWebAnimationsDriver() : new ɵCssKeyframesDriver();\n}\nfunction instantiateDefaultStyleNormalizer() {\n return new ɵWebAnimationsStyleNormalizer();\n}\nfunction instantiateRendererFactory(renderer, engine, zone) {\n return new AnimationRendererFactory(renderer, engine, zone);\n}\n/**\n * @experimental Animation support is experimental.\n */\nvar ANIMATION_MODULE_TYPE = new InjectionToken('AnimationModuleType');\nvar SHARED_ANIMATION_PROVIDERS = [\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 * Separate providers from the actual module so that we can do a local modification in Google3 to\n * include them in the BrowserModule.\n */\nvar BROWSER_ANIMATIONS_PROVIDERS = __spread([\n { provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'BrowserAnimations' }\n], SHARED_ANIMATION_PROVIDERS);\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 */\nvar BROWSER_NOOP_ANIMATIONS_PROVIDERS = __spread([\n { provide: AnimationDriver, useClass: ɵNoopAnimationDriver },\n { provide: ANIMATION_MODULE_TYPE, useValue: 'NoopAnimations' }\n], SHARED_ANIMATION_PROVIDERS);\n\n/**\n * @experimental Animation support is experimental.\n */\nvar BrowserAnimationsModule = /** @class */ (function () {\n function BrowserAnimationsModule() {\n }\n BrowserAnimationsModule.decorators = [\n { type: NgModule, args: [{\n exports: [BrowserModule],\n providers: BROWSER_ANIMATIONS_PROVIDERS,\n },] }\n ];\n /** @nocollapse */\n BrowserAnimationsModule.ctorParameters = function () { return []; };\n return BrowserAnimationsModule;\n}());\n/**\n * @experimental Animation support is experimental.\n */\nvar NoopAnimationsModule = /** @class */ (function () {\n function NoopAnimationsModule() {\n }\n NoopAnimationsModule.decorators = [\n { type: NgModule, args: [{\n exports: [BrowserModule],\n providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,\n },] }\n ];\n /** @nocollapse */\n NoopAnimationsModule.ctorParameters = function () { return []; };\n return NoopAnimationsModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 { BaseAnimationRenderer as ɵangular_packages_platform_browser_animations_animations_g, BROWSER_ANIMATIONS_PROVIDERS as ɵangular_packages_platform_browser_animations_animations_e, BROWSER_NOOP_ANIMATIONS_PROVIDERS as ɵangular_packages_platform_browser_animations_animations_f, InjectableAnimationEngine as ɵangular_packages_platform_browser_animations_animations_a, instantiateDefaultStyleNormalizer as ɵangular_packages_platform_browser_animations_animations_c, instantiateRendererFactory as ɵangular_packages_platform_browser_animations_animations_d, instantiateSupportedAnimationDriver as ɵangular_packages_platform_browser_animations_animations_b, BrowserAnimationsModule, NoopAnimationsModule, ANIMATION_MODULE_TYPE, BrowserAnimationBuilder as ɵBrowserAnimationBuilder, BrowserAnimationFactory as ɵBrowserAnimationFactory, AnimationRenderer as ɵAnimationRenderer, AnimationRendererFactory as ɵAnimationRendererFactory };\n//# sourceMappingURL=animations.js.map\n","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { CommonModule, DOCUMENT, PlatformLocation, ɵPLATFORM_BROWSER_ID, ɵparseCookieValue } from '@angular/common';\nimport { APP_ID, APP_INITIALIZER, ApplicationInitStatus, ApplicationModule, ApplicationRef, ErrorHandler, Inject, Injectable, InjectionToken, Injector, NgModule, NgProbeToken, NgZone, Optional, PLATFORM_ID, PLATFORM_INITIALIZER, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, SkipSelf, Testability, Version, ViewEncapsulation, createPlatformFactory, getDebugNode, platformCore, setTestabilityGetter, ɵAPP_ROOT, ɵConsole, ɵ_sanitizeHtml, ɵ_sanitizeStyle, ɵ_sanitizeUrl, ɵglobal } from '@angular/core';\nimport { __assign, __extends, __spread } from 'tslib';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _DOM = (null);\nfunction getDOM() {\n return _DOM;\n}\n\nfunction setRootDomAdapter(adapter) {\n if (!_DOM) {\n _DOM = adapter;\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 */\nvar DomAdapter = /** @class */ (function () {\n function DomAdapter() {\n this.resourceLoaderType = null;\n }\n Object.defineProperty(DomAdapter.prototype, \"attrToPropMap\", {\n /**\n * Maps attribute names to their corresponding property names for cases\n * where attribute name doesn't match property name.\n */\n get: /**\n * Maps attribute names to their corresponding property names for cases\n * where attribute name doesn't match property name.\n */\n function () { return this._attrToPropMap; },\n set: function (value) { this._attrToPropMap = value; },\n enumerable: true,\n configurable: true\n });\n return DomAdapter;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 */\nvar GenericBrowserDomAdapter = /** @class */ (function (_super) {\n __extends(GenericBrowserDomAdapter, _super);\n function GenericBrowserDomAdapter() {\n var _this = _super.call(this) || this;\n _this._animationPrefix = null;\n _this._transitionEnd = null;\n try {\n var element_1 = _this.createElement('div', document);\n if (_this.getStyle(element_1, 'animationName') != null) {\n _this._animationPrefix = '';\n }\n else {\n var domPrefixes = ['Webkit', 'Moz', 'O', 'ms'];\n for (var i = 0; i < domPrefixes.length; i++) {\n if (_this.getStyle(element_1, domPrefixes[i] + 'AnimationName') != null) {\n _this._animationPrefix = '-' + domPrefixes[i].toLowerCase() + '-';\n break;\n }\n }\n }\n var transEndEventNames_1 = {\n WebkitTransition: 'webkitTransitionEnd',\n MozTransition: 'transitionend',\n OTransition: 'oTransitionEnd otransitionend',\n transition: 'transitionend'\n };\n Object.keys(transEndEventNames_1).forEach(function (key) {\n if (_this.getStyle(element_1, key) != null) {\n _this._transitionEnd = transEndEventNames_1[key];\n }\n });\n }\n catch (e) {\n _this._animationPrefix = null;\n _this._transitionEnd = null;\n }\n return _this;\n }\n GenericBrowserDomAdapter.prototype.getDistributedNodes = function (el) { return el.getDistributedNodes(); };\n GenericBrowserDomAdapter.prototype.resolveAndSetHref = function (el, baseUrl, href) {\n el.href = href == null ? baseUrl : baseUrl + '/../' + href;\n };\n GenericBrowserDomAdapter.prototype.supportsDOMEvents = function () { return true; };\n GenericBrowserDomAdapter.prototype.supportsNativeShadowDOM = function () {\n return typeof document.body.createShadowRoot === 'function';\n };\n GenericBrowserDomAdapter.prototype.getAnimationPrefix = function () { return this._animationPrefix ? this._animationPrefix : ''; };\n GenericBrowserDomAdapter.prototype.getTransitionEnd = function () { return this._transitionEnd ? this._transitionEnd : ''; };\n GenericBrowserDomAdapter.prototype.supportsAnimation = function () {\n return this._animationPrefix != null && this._transitionEnd != null;\n };\n return GenericBrowserDomAdapter;\n}(DomAdapter));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 _attrToPropMap = {\n 'class': 'className',\n 'innerHtml': 'innerHTML',\n 'readonly': 'readOnly',\n 'tabindex': 'tabIndex',\n};\nvar DOM_KEY_LOCATION_NUMPAD = 3;\n// Map to convert some key or keyIdentifier values to what will be returned by getEventKey\nvar _keyMap = {\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// 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 ...\nvar _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};\nvar nodeContains;\nif (ɵglobal['Node']) {\n nodeContains = ɵglobal['Node'].prototype.contains || function (node) {\n return !!(this.compareDocumentPosition(node) & 16);\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 */\nvar BrowserDomAdapter = /** @class */ (function (_super) {\n __extends(BrowserDomAdapter, _super);\n function BrowserDomAdapter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n BrowserDomAdapter.prototype.parse = function (templateHtml) { throw new Error('parse not implemented'); };\n BrowserDomAdapter.makeCurrent = function () { setRootDomAdapter(new BrowserDomAdapter()); };\n BrowserDomAdapter.prototype.hasProperty = function (element, name) { return name in element; };\n BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };\n BrowserDomAdapter.prototype.getProperty = function (el, name) { return el[name]; };\n BrowserDomAdapter.prototype.invoke = function (el, methodName, args) {\n (_a = el)[methodName].apply(_a, __spread(args));\n var _a;\n };\n // TODO(tbosch): move this into a separate environment class once we have it\n // TODO(tbosch): move this into a separate environment class once we have it\n BrowserDomAdapter.prototype.logError = \n // TODO(tbosch): move this into a separate environment class once we have it\n function (error) {\n if (window.console) {\n if (console.error) {\n console.error(error);\n }\n else {\n console.log(error);\n }\n }\n };\n BrowserDomAdapter.prototype.log = function (error) {\n if (window.console) {\n window.console.log && window.console.log(error);\n }\n };\n BrowserDomAdapter.prototype.logGroup = function (error) {\n if (window.console) {\n window.console.group && window.console.group(error);\n }\n };\n BrowserDomAdapter.prototype.logGroupEnd = function () {\n if (window.console) {\n window.console.groupEnd && window.console.groupEnd();\n }\n };\n Object.defineProperty(BrowserDomAdapter.prototype, \"attrToPropMap\", {\n get: function () { return _attrToPropMap; },\n enumerable: true,\n configurable: true\n });\n BrowserDomAdapter.prototype.contains = function (nodeA, nodeB) { return nodeContains.call(nodeA, nodeB); };\n BrowserDomAdapter.prototype.querySelector = function (el, selector) { return el.querySelector(selector); };\n BrowserDomAdapter.prototype.querySelectorAll = function (el, selector) { return el.querySelectorAll(selector); };\n BrowserDomAdapter.prototype.on = function (el, evt, listener) { el.addEventListener(evt, listener, false); };\n BrowserDomAdapter.prototype.onAndCancel = function (el, evt, listener) {\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 function () { el.removeEventListener(evt, listener, false); };\n };\n BrowserDomAdapter.prototype.dispatchEvent = function (el, evt) { el.dispatchEvent(evt); };\n BrowserDomAdapter.prototype.createMouseEvent = function (eventType) {\n var evt = this.getDefaultDocument().createEvent('MouseEvent');\n evt.initEvent(eventType, true, true);\n return evt;\n };\n BrowserDomAdapter.prototype.createEvent = function (eventType) {\n var evt = this.getDefaultDocument().createEvent('Event');\n evt.initEvent(eventType, true, true);\n return evt;\n };\n BrowserDomAdapter.prototype.preventDefault = function (evt) {\n evt.preventDefault();\n evt.returnValue = false;\n };\n BrowserDomAdapter.prototype.isPrevented = function (evt) {\n return evt.defaultPrevented || evt.returnValue != null && !evt.returnValue;\n };\n BrowserDomAdapter.prototype.getInnerHTML = function (el) { return el.innerHTML; };\n BrowserDomAdapter.prototype.getTemplateContent = function (el) {\n return 'content' in el && this.isTemplateElement(el) ? el.content : null;\n };\n BrowserDomAdapter.prototype.getOuterHTML = function (el) { return el.outerHTML; };\n BrowserDomAdapter.prototype.nodeName = function (node) { return node.nodeName; };\n BrowserDomAdapter.prototype.nodeValue = function (node) { return node.nodeValue; };\n BrowserDomAdapter.prototype.type = function (node) { return node.type; };\n BrowserDomAdapter.prototype.content = function (node) {\n if (this.hasProperty(node, 'content')) {\n return node.content;\n }\n else {\n return node;\n }\n };\n BrowserDomAdapter.prototype.firstChild = function (el) { return el.firstChild; };\n BrowserDomAdapter.prototype.nextSibling = function (el) { return el.nextSibling; };\n BrowserDomAdapter.prototype.parentElement = function (el) { return el.parentNode; };\n BrowserDomAdapter.prototype.childNodes = function (el) { return el.childNodes; };\n BrowserDomAdapter.prototype.childNodesAsList = function (el) {\n var childNodes = el.childNodes;\n var res = new Array(childNodes.length);\n for (var i = 0; i < childNodes.length; i++) {\n res[i] = childNodes[i];\n }\n return res;\n };\n BrowserDomAdapter.prototype.clearNodes = function (el) {\n while (el.firstChild) {\n el.removeChild(el.firstChild);\n }\n };\n BrowserDomAdapter.prototype.appendChild = function (el, node) { el.appendChild(node); };\n BrowserDomAdapter.prototype.removeChild = function (el, node) { el.removeChild(node); };\n BrowserDomAdapter.prototype.replaceChild = function (el, newChild, oldChild) { el.replaceChild(newChild, oldChild); };\n BrowserDomAdapter.prototype.remove = function (node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n return node;\n };\n BrowserDomAdapter.prototype.insertBefore = function (parent, ref, node) { parent.insertBefore(node, ref); };\n BrowserDomAdapter.prototype.insertAllBefore = function (parent, ref, nodes) {\n nodes.forEach(function (n) { return parent.insertBefore(n, ref); });\n };\n BrowserDomAdapter.prototype.insertAfter = function (parent, ref, node) { parent.insertBefore(node, ref.nextSibling); };\n BrowserDomAdapter.prototype.setInnerHTML = function (el, value) { el.innerHTML = value; };\n BrowserDomAdapter.prototype.getText = function (el) { return el.textContent; };\n BrowserDomAdapter.prototype.setText = function (el, value) { el.textContent = value; };\n BrowserDomAdapter.prototype.getValue = function (el) { return el.value; };\n BrowserDomAdapter.prototype.setValue = function (el, value) { el.value = value; };\n BrowserDomAdapter.prototype.getChecked = function (el) { return el.checked; };\n BrowserDomAdapter.prototype.setChecked = function (el, value) { el.checked = value; };\n BrowserDomAdapter.prototype.createComment = function (text) { return this.getDefaultDocument().createComment(text); };\n BrowserDomAdapter.prototype.createTemplate = function (html) {\n var t = this.getDefaultDocument().createElement('template');\n t.innerHTML = html;\n return t;\n };\n BrowserDomAdapter.prototype.createElement = function (tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElement(tagName);\n };\n BrowserDomAdapter.prototype.createElementNS = function (ns, tagName, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createElementNS(ns, tagName);\n };\n BrowserDomAdapter.prototype.createTextNode = function (text, doc) {\n doc = doc || this.getDefaultDocument();\n return doc.createTextNode(text);\n };\n BrowserDomAdapter.prototype.createScriptTag = function (attrName, attrValue, doc) {\n doc = doc || this.getDefaultDocument();\n var el = doc.createElement('SCRIPT');\n el.setAttribute(attrName, attrValue);\n return el;\n };\n BrowserDomAdapter.prototype.createStyleElement = function (css, doc) {\n doc = doc || this.getDefaultDocument();\n var style = doc.createElement('style');\n this.appendChild(style, this.createTextNode(css, doc));\n return style;\n };\n BrowserDomAdapter.prototype.createShadowRoot = function (el) { return el.createShadowRoot(); };\n BrowserDomAdapter.prototype.getShadowRoot = function (el) { return el.shadowRoot; };\n BrowserDomAdapter.prototype.getHost = function (el) { return el.host; };\n BrowserDomAdapter.prototype.clone = function (node) { return node.cloneNode(true); };\n BrowserDomAdapter.prototype.getElementsByClassName = function (element, name) {\n return element.getElementsByClassName(name);\n };\n BrowserDomAdapter.prototype.getElementsByTagName = function (element, name) {\n return element.getElementsByTagName(name);\n };\n BrowserDomAdapter.prototype.classList = function (element) { return Array.prototype.slice.call(element.classList, 0); };\n BrowserDomAdapter.prototype.addClass = function (element, className) { element.classList.add(className); };\n BrowserDomAdapter.prototype.removeClass = function (element, className) { element.classList.remove(className); };\n BrowserDomAdapter.prototype.hasClass = function (element, className) {\n return element.classList.contains(className);\n };\n BrowserDomAdapter.prototype.setStyle = function (element, styleName, styleValue) {\n element.style[styleName] = styleValue;\n };\n BrowserDomAdapter.prototype.removeStyle = function (element, stylename) {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n element.style[stylename] = '';\n };\n BrowserDomAdapter.prototype.getStyle = function (element, stylename) { return element.style[stylename]; };\n BrowserDomAdapter.prototype.hasStyle = function (element, styleName, styleValue) {\n var value = this.getStyle(element, styleName) || '';\n return styleValue ? value == styleValue : value.length > 0;\n };\n BrowserDomAdapter.prototype.tagName = function (element) { return element.tagName; };\n BrowserDomAdapter.prototype.attributeMap = function (element) {\n var res = new Map();\n var elAttrs = element.attributes;\n for (var i = 0; i < elAttrs.length; i++) {\n var attrib = elAttrs.item(i);\n res.set(attrib.name, attrib.value);\n }\n return res;\n };\n BrowserDomAdapter.prototype.hasAttribute = function (element, attribute) {\n return element.hasAttribute(attribute);\n };\n BrowserDomAdapter.prototype.hasAttributeNS = function (element, ns, attribute) {\n return element.hasAttributeNS(ns, attribute);\n };\n BrowserDomAdapter.prototype.getAttribute = function (element, attribute) {\n return element.getAttribute(attribute);\n };\n BrowserDomAdapter.prototype.getAttributeNS = function (element, ns, name) {\n return element.getAttributeNS(ns, name);\n };\n BrowserDomAdapter.prototype.setAttribute = function (element, name, value) { element.setAttribute(name, value); };\n BrowserDomAdapter.prototype.setAttributeNS = function (element, ns, name, value) {\n element.setAttributeNS(ns, name, value);\n };\n BrowserDomAdapter.prototype.removeAttribute = function (element, attribute) { element.removeAttribute(attribute); };\n BrowserDomAdapter.prototype.removeAttributeNS = function (element, ns, name) {\n element.removeAttributeNS(ns, name);\n };\n BrowserDomAdapter.prototype.templateAwareRoot = function (el) { return this.isTemplateElement(el) ? this.content(el) : el; };\n BrowserDomAdapter.prototype.createHtmlDocument = function () {\n return document.implementation.createHTMLDocument('fakeTitle');\n };\n BrowserDomAdapter.prototype.getDefaultDocument = function () { return document; };\n BrowserDomAdapter.prototype.getBoundingClientRect = function (el) {\n try {\n return el.getBoundingClientRect();\n }\n catch (e) {\n return { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };\n }\n };\n BrowserDomAdapter.prototype.getTitle = function (doc) { return doc.title; };\n BrowserDomAdapter.prototype.setTitle = function (doc, newTitle) { doc.title = newTitle || ''; };\n BrowserDomAdapter.prototype.elementMatches = function (n, selector) {\n if (this.isElementNode(n)) {\n return n.matches && n.matches(selector) ||\n n.msMatchesSelector && n.msMatchesSelector(selector) ||\n n.webkitMatchesSelector && n.webkitMatchesSelector(selector);\n }\n return false;\n };\n BrowserDomAdapter.prototype.isTemplateElement = function (el) {\n return this.isElementNode(el) && el.nodeName === 'TEMPLATE';\n };\n BrowserDomAdapter.prototype.isTextNode = function (node) { return node.nodeType === Node.TEXT_NODE; };\n BrowserDomAdapter.prototype.isCommentNode = function (node) { return node.nodeType === Node.COMMENT_NODE; };\n BrowserDomAdapter.prototype.isElementNode = function (node) { return node.nodeType === Node.ELEMENT_NODE; };\n BrowserDomAdapter.prototype.hasShadowRoot = function (node) {\n return node.shadowRoot != null && node instanceof HTMLElement;\n };\n BrowserDomAdapter.prototype.isShadowRoot = function (node) { return node instanceof DocumentFragment; };\n BrowserDomAdapter.prototype.importIntoDoc = function (node) { return document.importNode(this.templateAwareRoot(node), true); };\n BrowserDomAdapter.prototype.adoptNode = function (node) { return document.adoptNode(node); };\n BrowserDomAdapter.prototype.getHref = function (el) { return el.getAttribute('href'); };\n BrowserDomAdapter.prototype.getEventKey = function (event) {\n var 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[key];\n }\n }\n }\n return _keyMap[key] || key;\n };\n BrowserDomAdapter.prototype.getGlobalEventTarget = function (doc, target) {\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 BrowserDomAdapter.prototype.getHistory = function () { return window.history; };\n BrowserDomAdapter.prototype.getLocation = function () { return window.location; };\n BrowserDomAdapter.prototype.getBaseHref = function (doc) {\n var href = getBaseElementHref();\n return href == null ? null : relativePath(href);\n };\n BrowserDomAdapter.prototype.resetBaseElement = function () { baseElement = null; };\n BrowserDomAdapter.prototype.getUserAgent = function () { return window.navigator.userAgent; };\n BrowserDomAdapter.prototype.setData = function (element, name, value) {\n this.setAttribute(element, 'data-' + name, value);\n };\n BrowserDomAdapter.prototype.getData = function (element, name) {\n return this.getAttribute(element, 'data-' + name);\n };\n BrowserDomAdapter.prototype.getComputedStyle = function (element) { return getComputedStyle(element); };\n // TODO(tbosch): move this into a separate environment class once we have it\n // TODO(tbosch): move this into a separate environment class once we have it\n BrowserDomAdapter.prototype.supportsWebAnimation = \n // TODO(tbosch): move this into a separate environment class once we have it\n function () {\n return typeof Element.prototype['animate'] === 'function';\n };\n BrowserDomAdapter.prototype.performanceNow = function () {\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 BrowserDomAdapter.prototype.supportsCookies = function () { return true; };\n BrowserDomAdapter.prototype.getCookie = function (name) { return ɵparseCookieValue(document.cookie, name); };\n BrowserDomAdapter.prototype.setCookie = function (name, value) {\n // document.cookie is magical, assigning into it assigns/overrides one cookie value, but does\n // not clear other cookies.\n document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);\n };\n return BrowserDomAdapter;\n}(GenericBrowserDomAdapter));\nvar baseElement = null;\nfunction getBaseElementHref() {\n if (!baseElement) {\n baseElement = (document.querySelector('base'));\n if (!baseElement) {\n return null;\n }\n }\n return baseElement.getAttribute('href');\n}\n// based on urlUtils.js in AngularJS 1\nvar urlParsingNode;\nfunction relativePath(url) {\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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 into a Web Worker).\n *\n * @deprecated import from `@angular/common` instead.\n */\nvar DOCUMENT$1 = DOCUMENT;\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 supportsState() {\n return !!window.history.pushState;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * `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 */\nvar BrowserPlatformLocation = /** @class */ (function (_super) {\n __extends(BrowserPlatformLocation, _super);\n function BrowserPlatformLocation(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._init();\n return _this;\n }\n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n BrowserPlatformLocation.prototype._init = \n // This is moved to its own method so that `MockPlatformLocationStrategy` can overwrite it\n /** @internal */\n function () {\n this.location = getDOM().getLocation();\n this._history = getDOM().getHistory();\n };\n BrowserPlatformLocation.prototype.getBaseHrefFromDOM = function () { return getDOM().getBaseHref(this._doc); };\n BrowserPlatformLocation.prototype.onPopState = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('popstate', fn, false);\n };\n BrowserPlatformLocation.prototype.onHashChange = function (fn) {\n getDOM().getGlobalEventTarget(this._doc, 'window').addEventListener('hashchange', fn, false);\n };\n Object.defineProperty(BrowserPlatformLocation.prototype, \"pathname\", {\n get: function () { return this.location.pathname; },\n set: function (newPath) { this.location.pathname = newPath; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"search\", {\n get: function () { return this.location.search; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BrowserPlatformLocation.prototype, \"hash\", {\n get: function () { return this.location.hash; },\n enumerable: true,\n configurable: true\n });\n BrowserPlatformLocation.prototype.pushState = function (state, title, url) {\n if (supportsState()) {\n this._history.pushState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.replaceState = function (state, title, url) {\n if (supportsState()) {\n this._history.replaceState(state, title, url);\n }\n else {\n this.location.hash = url;\n }\n };\n BrowserPlatformLocation.prototype.forward = function () { this._history.forward(); };\n BrowserPlatformLocation.prototype.back = function () { this._history.back(); };\n BrowserPlatformLocation.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n BrowserPlatformLocation.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return BrowserPlatformLocation;\n}(PlatformLocation));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 service that can be used to get and add meta tags.\n *\n * @experimental\n */\nvar Meta = /** @class */ (function () {\n function Meta(_doc) {\n this._doc = _doc;\n this._dom = getDOM();\n }\n Meta.prototype.addTag = function (tag, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tag)\n return null;\n return this._getOrCreateElement(tag, forceCreation);\n };\n Meta.prototype.addTags = function (tags, forceCreation) {\n var _this = this;\n if (forceCreation === void 0) { forceCreation = false; }\n if (!tags)\n return [];\n return tags.reduce(function (result, tag) {\n if (tag) {\n result.push(_this._getOrCreateElement(tag, forceCreation));\n }\n return result;\n }, []);\n };\n Meta.prototype.getTag = function (attrSelector) {\n if (!attrSelector)\n return null;\n return this._dom.querySelector(this._doc, \"meta[\" + attrSelector + \"]\") || null;\n };\n Meta.prototype.getTags = function (attrSelector) {\n if (!attrSelector)\n return [];\n var list = this._dom.querySelectorAll(this._doc, \"meta[\" + attrSelector + \"]\");\n return list ? [].slice.call(list) : [];\n };\n Meta.prototype.updateTag = function (tag, selector) {\n if (!tag)\n return null;\n selector = selector || this._parseSelector(tag);\n var meta = (this.getTag(selector));\n if (meta) {\n return this._setMetaElementAttributes(tag, meta);\n }\n return this._getOrCreateElement(tag, true);\n };\n Meta.prototype.removeTag = function (attrSelector) { this.removeTagElement((this.getTag(attrSelector))); };\n Meta.prototype.removeTagElement = function (meta) {\n if (meta) {\n this._dom.remove(meta);\n }\n };\n Meta.prototype._getOrCreateElement = function (meta, forceCreation) {\n if (forceCreation === void 0) { forceCreation = false; }\n if (!forceCreation) {\n var selector = this._parseSelector(meta);\n var elem = (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))\n return elem;\n }\n var element = this._dom.createElement('meta');\n this._setMetaElementAttributes(meta, element);\n var head = this._dom.getElementsByTagName(this._doc, 'head')[0];\n this._dom.appendChild(head, element);\n return element;\n };\n Meta.prototype._setMetaElementAttributes = function (tag, el) {\n var _this = this;\n Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\n return el;\n };\n Meta.prototype._parseSelector = function (tag) {\n var attr = tag.name ? 'name' : 'property';\n return attr + \"=\\\"\" + tag[attr] + \"\\\"\";\n };\n Meta.prototype._containsAttributes = function (tag, elem) {\n var _this = this;\n return Object.keys(tag).every(function (key) { return _this._dom.getAttribute(elem, key) === tag[key]; });\n };\n Meta.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Meta.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return Meta;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 id that identifies a particular application being bootstrapped, that should\n * match across the client/server boundary.\n */\nvar TRANSITION_ID = new InjectionToken('TRANSITION_ID');\nfunction appInitializerFactory(transitionId, document, injector) {\n return function () {\n // Wait for all application initializers to be completed before removing the styles set by\n // the server.\n injector.get(ApplicationInitStatus).donePromise.then(function () {\n var dom = getDOM();\n var styles = Array.prototype.slice.apply(dom.querySelectorAll(document, \"style[ng-transition]\"));\n styles.filter(function (el) { return dom.getAttribute(el, 'ng-transition') === transitionId; })\n .forEach(function (el) { return dom.remove(el); });\n });\n };\n}\nvar SERVER_TRANSITION_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: appInitializerFactory,\n deps: [TRANSITION_ID, DOCUMENT$1, Injector],\n multi: true\n },\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 BrowserGetTestability = /** @class */ (function () {\n function BrowserGetTestability() {\n }\n BrowserGetTestability.init = function () { setTestabilityGetter(new BrowserGetTestability()); };\n BrowserGetTestability.prototype.addToWindow = function (registry) {\n ɵglobal['getAngularTestability'] = function (elem, findInAncestors) {\n if (findInAncestors === void 0) { findInAncestors = true; }\n var 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 ɵglobal['getAllAngularTestabilities'] = function () { return registry.getAllTestabilities(); };\n ɵglobal['getAllAngularRootElements'] = function () { return registry.getAllRootElements(); };\n var whenAllStable = function (callback /** TODO #9100 */) {\n var testabilities = ɵglobal['getAllAngularTestabilities']();\n var count = testabilities.length;\n var didWork = false;\n var decrement = function (didWork_ /** TODO #9100 */) {\n didWork = didWork || didWork_;\n count--;\n if (count == 0) {\n callback(didWork);\n }\n };\n testabilities.forEach(function (testability /** TODO #9100 */) {\n testability.whenStable(decrement);\n });\n };\n if (!ɵglobal['frameworkStabilizers']) {\n ɵglobal['frameworkStabilizers'] = [];\n }\n ɵglobal['frameworkStabilizers'].push(whenAllStable);\n };\n BrowserGetTestability.prototype.findTestabilityInTree = function (registry, elem, findInAncestors) {\n if (elem == null) {\n return null;\n }\n var t = registry.getTestability(elem);\n if (t != null) {\n return t;\n }\n else if (!findInAncestors) {\n return null;\n }\n if (getDOM().isShadowRoot(elem)) {\n return this.findTestabilityInTree(registry, getDOM().getHost(elem), true);\n }\n return this.findTestabilityInTree(registry, getDOM().parentElement(elem), true);\n };\n return BrowserGetTestability;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 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 * @experimental\n */\nvar Title = /** @class */ (function () {\n function Title(_doc) {\n this._doc = _doc;\n }\n /**\n * Get the title of the current HTML document.\n */\n /**\n * Get the title of the current HTML document.\n */\n Title.prototype.getTitle = /**\n * Get the title of the current HTML document.\n */\n function () { return getDOM().getTitle(this._doc); };\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n Title.prototype.setTitle = /**\n * Set the title of the current HTML document.\n * @param newTitle\n */\n function (newTitle) { getDOM().setTitle(this._doc, newTitle); };\n Title.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n Title.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return Title;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 */\nfunction exportNgVar(name, value) {\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 var ng = ɵglobal['ng'] = ɵglobal['ng'] || {};\n ng[name] = value;\n }\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CORE_TOKENS = {\n 'ApplicationRef': ApplicationRef,\n 'NgZone': NgZone,\n};\nvar INSPECT_GLOBAL_NAME = 'probe';\nvar CORE_TOKENS_GLOBAL_NAME = 'coreTokens';\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 */\nfunction inspectNativeElement(element) {\n return getDebugNode(element);\n}\nfunction _createNgProbe(coreTokens) {\n exportNgVar(INSPECT_GLOBAL_NAME, inspectNativeElement);\n exportNgVar(CORE_TOKENS_GLOBAL_NAME, __assign({}, CORE_TOKENS, _ngProbeTokensToMap(coreTokens || [])));\n return function () { return inspectNativeElement; };\n}\nfunction _ngProbeTokensToMap(tokens) {\n return tokens.reduce(function (prev, t) { return (prev[t.name] = t.token, prev); }, {});\n}\n/**\n * Providers which support debugging Angular applications (e.g. via `ng.probe`).\n */\nvar ELEMENT_PROBE_PROVIDERS = [\n {\n provide: APP_INITIALIZER,\n useFactory: _createNgProbe,\n deps: [\n [NgProbeToken, new Optional()],\n ],\n multi: true,\n },\n];\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar EVENT_MANAGER_PLUGINS = new InjectionToken('EventManagerPlugins');\n/**\n *\n */\nvar EventManager = /** @class */ (function () {\n function EventManager(plugins, _zone) {\n var _this = this;\n this._zone = _zone;\n this._eventNameToPlugin = new Map();\n plugins.forEach(function (p) { return p.manager = _this; });\n this._plugins = plugins.slice().reverse();\n }\n EventManager.prototype.addEventListener = function (element, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addEventListener(element, eventName, handler);\n };\n EventManager.prototype.addGlobalEventListener = function (target, eventName, handler) {\n var plugin = this._findPluginFor(eventName);\n return plugin.addGlobalEventListener(target, eventName, handler);\n };\n EventManager.prototype.getZone = function () { return this._zone; };\n /** @internal */\n /** @internal */\n EventManager.prototype._findPluginFor = /** @internal */\n function (eventName) {\n var plugin = this._eventNameToPlugin.get(eventName);\n if (plugin) {\n return plugin;\n }\n var plugins = this._plugins;\n for (var i = 0; i < plugins.length; i++) {\n var plugin_1 = plugins[i];\n if (plugin_1.supports(eventName)) {\n this._eventNameToPlugin.set(eventName, plugin_1);\n return plugin_1;\n }\n }\n throw new Error(\"No event manager plugin found for event \" + eventName);\n };\n EventManager.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n EventManager.ctorParameters = function () { return [\n { type: Array, decorators: [{ type: Inject, args: [EVENT_MANAGER_PLUGINS,] },] },\n { type: NgZone, },\n ]; };\n return EventManager;\n}());\nvar EventManagerPlugin = /** @class */ (function () {\n function EventManagerPlugin(_doc) {\n this._doc = _doc;\n }\n EventManagerPlugin.prototype.addGlobalEventListener = function (element, eventName, handler) {\n var target = 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 return EventManagerPlugin;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 SharedStylesHost = /** @class */ (function () {\n function SharedStylesHost() {\n /** @internal */\n this._stylesSet = new Set();\n }\n SharedStylesHost.prototype.addStyles = function (styles) {\n var _this = this;\n var additions = new Set();\n styles.forEach(function (style) {\n if (!_this._stylesSet.has(style)) {\n _this._stylesSet.add(style);\n additions.add(style);\n }\n });\n this.onStylesAdded(additions);\n };\n SharedStylesHost.prototype.onStylesAdded = function (additions) { };\n SharedStylesHost.prototype.getAllStyles = function () { return Array.from(this._stylesSet); };\n SharedStylesHost.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n SharedStylesHost.ctorParameters = function () { return []; };\n return SharedStylesHost;\n}());\nvar DomSharedStylesHost = /** @class */ (function (_super) {\n __extends(DomSharedStylesHost, _super);\n function DomSharedStylesHost(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n _this._hostNodes = new Set();\n _this._styleNodes = new Set();\n _this._hostNodes.add(_doc.head);\n return _this;\n }\n DomSharedStylesHost.prototype._addStylesToHost = function (styles, host) {\n var _this = this;\n styles.forEach(function (style) {\n var styleEl = _this._doc.createElement('style');\n styleEl.textContent = style;\n _this._styleNodes.add(host.appendChild(styleEl));\n });\n };\n DomSharedStylesHost.prototype.addHost = function (hostNode) {\n this._addStylesToHost(this._stylesSet, hostNode);\n this._hostNodes.add(hostNode);\n };\n DomSharedStylesHost.prototype.removeHost = function (hostNode) { this._hostNodes.delete(hostNode); };\n DomSharedStylesHost.prototype.onStylesAdded = function (additions) {\n var _this = this;\n this._hostNodes.forEach(function (hostNode) { return _this._addStylesToHost(additions, hostNode); });\n };\n DomSharedStylesHost.prototype.ngOnDestroy = function () { this._styleNodes.forEach(function (styleNode) { return getDOM().remove(styleNode); }); };\n DomSharedStylesHost.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n DomSharedStylesHost.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return DomSharedStylesHost;\n}(SharedStylesHost));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NAMESPACE_URIS = {\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};\nvar COMPONENT_REGEX = /%COMP%/g;\nvar COMPONENT_VARIABLE = '%COMP%';\nvar HOST_ATTR = \"_nghost-\" + COMPONENT_VARIABLE;\nvar CONTENT_ATTR = \"_ngcontent-\" + COMPONENT_VARIABLE;\nfunction shimContentAttribute(componentShortId) {\n return CONTENT_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction shimHostAttribute(componentShortId) {\n return HOST_ATTR.replace(COMPONENT_REGEX, componentShortId);\n}\nfunction flattenStyles(compId, styles, target) {\n for (var i = 0; i < styles.length; i++) {\n var style = styles[i];\n if (Array.isArray(style)) {\n flattenStyles(compId, style, target);\n }\n else {\n style = style.replace(COMPONENT_REGEX, compId);\n target.push(style);\n }\n }\n return target;\n}\nfunction decoratePreventDefault(eventHandler) {\n return function (event) {\n var 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}\nvar DomRendererFactory2 = /** @class */ (function () {\n function DomRendererFactory2(eventManager, sharedStylesHost) {\n this.eventManager = eventManager;\n this.sharedStylesHost = sharedStylesHost;\n this.rendererByCompId = new Map();\n this.defaultRenderer = new DefaultDomRenderer2(eventManager);\n }\n DomRendererFactory2.prototype.createRenderer = function (element, type) {\n if (!element || !type) {\n return this.defaultRenderer;\n }\n switch (type.encapsulation) {\n case ViewEncapsulation.Emulated: {\n var renderer = this.rendererByCompId.get(type.id);\n if (!renderer) {\n renderer =\n new EmulatedEncapsulationDomRenderer2(this.eventManager, this.sharedStylesHost, type);\n this.rendererByCompId.set(type.id, renderer);\n }\n renderer.applyToHost(element);\n return renderer;\n }\n case ViewEncapsulation.Native:\n return new ShadowDomRenderer(this.eventManager, this.sharedStylesHost, element, type);\n default: {\n if (!this.rendererByCompId.has(type.id)) {\n var 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 DomRendererFactory2.prototype.begin = function () { };\n DomRendererFactory2.prototype.end = function () { };\n DomRendererFactory2.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n DomRendererFactory2.ctorParameters = function () { return [\n { type: EventManager, },\n { type: DomSharedStylesHost, },\n ]; };\n return DomRendererFactory2;\n}());\nvar DefaultDomRenderer2 = /** @class */ (function () {\n function DefaultDomRenderer2(eventManager) {\n this.eventManager = eventManager;\n this.data = Object.create(null);\n }\n DefaultDomRenderer2.prototype.destroy = function () { };\n DefaultDomRenderer2.prototype.createElement = function (name, namespace) {\n if (namespace) {\n return document.createElementNS(NAMESPACE_URIS[namespace], name);\n }\n return document.createElement(name);\n };\n DefaultDomRenderer2.prototype.createComment = function (value) { return document.createComment(value); };\n DefaultDomRenderer2.prototype.createText = function (value) { return document.createTextNode(value); };\n DefaultDomRenderer2.prototype.appendChild = function (parent, newChild) { parent.appendChild(newChild); };\n DefaultDomRenderer2.prototype.insertBefore = function (parent, newChild, refChild) {\n if (parent) {\n parent.insertBefore(newChild, refChild);\n }\n };\n DefaultDomRenderer2.prototype.removeChild = function (parent, oldChild) {\n if (parent) {\n parent.removeChild(oldChild);\n }\n };\n DefaultDomRenderer2.prototype.selectRootElement = function (selectorOrNode) {\n var el = 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 el.textContent = '';\n return el;\n };\n DefaultDomRenderer2.prototype.parentNode = function (node) { return node.parentNode; };\n DefaultDomRenderer2.prototype.nextSibling = function (node) { return node.nextSibling; };\n DefaultDomRenderer2.prototype.setAttribute = function (el, name, value, namespace) {\n if (namespace) {\n name = namespace + \":\" + name;\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.setAttributeNS(namespaceUri, name, value);\n }\n else {\n el.setAttribute(name, value);\n }\n }\n else {\n el.setAttribute(name, value);\n }\n };\n DefaultDomRenderer2.prototype.removeAttribute = function (el, name, namespace) {\n if (namespace) {\n var namespaceUri = NAMESPACE_URIS[namespace];\n if (namespaceUri) {\n el.removeAttributeNS(namespaceUri, name);\n }\n else {\n el.removeAttribute(namespace + \":\" + name);\n }\n }\n else {\n el.removeAttribute(name);\n }\n };\n DefaultDomRenderer2.prototype.addClass = function (el, name) { el.classList.add(name); };\n DefaultDomRenderer2.prototype.removeClass = function (el, name) { el.classList.remove(name); };\n DefaultDomRenderer2.prototype.setStyle = function (el, style, value, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.setProperty(style, value, !!(flags & RendererStyleFlags2.Important) ? 'important' : '');\n }\n else {\n el.style[style] = value;\n }\n };\n DefaultDomRenderer2.prototype.removeStyle = function (el, style, flags) {\n if (flags & RendererStyleFlags2.DashCase) {\n el.style.removeProperty(style);\n }\n else {\n // IE requires '' instead of null\n // see https://github.com/angular/angular/issues/7916\n el.style[style] = '';\n }\n };\n DefaultDomRenderer2.prototype.setProperty = function (el, name, value) {\n checkNoSyntheticProp(name, 'property');\n el[name] = value;\n };\n DefaultDomRenderer2.prototype.setValue = function (node, value) { node.nodeValue = value; };\n DefaultDomRenderer2.prototype.listen = function (target, event, callback) {\n checkNoSyntheticProp(event, 'listener');\n if (typeof target === 'string') {\n return this.eventManager.addGlobalEventListener(target, event, decoratePreventDefault(callback));\n }\n return this.eventManager.addEventListener(target, event, decoratePreventDefault(callback));\n };\n return DefaultDomRenderer2;\n}());\nvar AT_CHARCODE = '@'.charCodeAt(0);\nfunction checkNoSyntheticProp(name, nameKind) {\n if (name.charCodeAt(0) === AT_CHARCODE) {\n throw new Error(\"Found the synthetic \" + nameKind + \" \" + name + \". Please include either \\\"BrowserAnimationsModule\\\" or \\\"NoopAnimationsModule\\\" in your application.\");\n }\n}\nvar EmulatedEncapsulationDomRenderer2 = /** @class */ (function (_super) {\n __extends(EmulatedEncapsulationDomRenderer2, _super);\n function EmulatedEncapsulationDomRenderer2(eventManager, sharedStylesHost, component) {\n var _this = _super.call(this, eventManager) || this;\n _this.component = component;\n var styles = flattenStyles(component.id, component.styles, []);\n sharedStylesHost.addStyles(styles);\n _this.contentAttr = shimContentAttribute(component.id);\n _this.hostAttr = shimHostAttribute(component.id);\n return _this;\n }\n EmulatedEncapsulationDomRenderer2.prototype.applyToHost = function (element) { _super.prototype.setAttribute.call(this, element, this.hostAttr, ''); };\n EmulatedEncapsulationDomRenderer2.prototype.createElement = function (parent, name) {\n var el = _super.prototype.createElement.call(this, parent, name);\n _super.prototype.setAttribute.call(this, el, this.contentAttr, '');\n return el;\n };\n return EmulatedEncapsulationDomRenderer2;\n}(DefaultDomRenderer2));\nvar ShadowDomRenderer = /** @class */ (function (_super) {\n __extends(ShadowDomRenderer, _super);\n function ShadowDomRenderer(eventManager, sharedStylesHost, hostEl, component) {\n var _this = _super.call(this, eventManager) || this;\n _this.sharedStylesHost = sharedStylesHost;\n _this.hostEl = hostEl;\n _this.component = component;\n _this.shadowRoot = hostEl.createShadowRoot();\n _this.sharedStylesHost.addHost(_this.shadowRoot);\n var styles = flattenStyles(component.id, component.styles, []);\n for (var i = 0; i < styles.length; i++) {\n var styleEl = document.createElement('style');\n styleEl.textContent = styles[i];\n _this.shadowRoot.appendChild(styleEl);\n }\n return _this;\n }\n ShadowDomRenderer.prototype.nodeOrShadowRoot = function (node) { return node === this.hostEl ? this.shadowRoot : node; };\n ShadowDomRenderer.prototype.destroy = function () { this.sharedStylesHost.removeHost(this.shadowRoot); };\n ShadowDomRenderer.prototype.appendChild = function (parent, newChild) {\n return _super.prototype.appendChild.call(this, this.nodeOrShadowRoot(parent), newChild);\n };\n ShadowDomRenderer.prototype.insertBefore = function (parent, newChild, refChild) {\n return _super.prototype.insertBefore.call(this, this.nodeOrShadowRoot(parent), newChild, refChild);\n };\n ShadowDomRenderer.prototype.removeChild = function (parent, oldChild) {\n return _super.prototype.removeChild.call(this, this.nodeOrShadowRoot(parent), oldChild);\n };\n ShadowDomRenderer.prototype.parentNode = function (node) {\n return this.nodeOrShadowRoot(_super.prototype.parentNode.call(this, this.nodeOrShadowRoot(node)));\n };\n return ShadowDomRenderer;\n}(DefaultDomRenderer2));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ɵ0 = function (v) {\n return '__zone_symbol__' + v;\n};\n/**\n * Detect if Zone is present. If it is then use simple zone aware 'addEventListener'\n * since Angular can do much more\n * efficient bookkeeping than Zone can, because we have additional information. This speeds up\n * addEventListener by 3x.\n */\nvar __symbol__ = (typeof Zone !== 'undefined') && Zone['__symbol__'] || ɵ0;\nvar ADD_EVENT_LISTENER = __symbol__('addEventListener');\nvar REMOVE_EVENT_LISTENER = __symbol__('removeEventListener');\nvar symbolNames = {};\nvar FALSE = 'FALSE';\nvar ANGULAR = 'ANGULAR';\nvar NATIVE_ADD_LISTENER = 'addEventListener';\nvar NATIVE_REMOVE_LISTENER = 'removeEventListener';\n// use the same symbol string which is used in zone.js\nvar stopSymbol = '__zone_symbol__propagationStopped';\nvar stopMethodSymbol = '__zone_symbol__stopImmediatePropagation';\nvar blackListedEvents = (typeof Zone !== 'undefined') && Zone[__symbol__('BLACK_LISTED_EVENTS')];\nvar blackListedMap;\nif (blackListedEvents) {\n blackListedMap = {};\n blackListedEvents.forEach(function (eventName) { blackListedMap[eventName] = eventName; });\n}\nvar isBlackListedEvent = function (eventName) {\n if (!blackListedMap) {\n return false;\n }\n return blackListedMap.hasOwnProperty(eventName);\n};\n// a global listener to handle all dom event,\n// so we do not need to create a closure every time\nvar globalListener = function (event) {\n var symbolName = symbolNames[event.type];\n if (!symbolName) {\n return;\n }\n var taskDatas = this[symbolName];\n if (!taskDatas) {\n return;\n }\n var args = [event];\n if (taskDatas.length === 1) {\n // if taskDatas only have one element, just invoke it\n var taskData = taskDatas[0];\n if (taskData.zone !== Zone.current) {\n // only use Zone.run when Zone.current not equals to stored zone\n return taskData.zone.run(taskData.handler, this, args);\n }\n else {\n return taskData.handler.apply(this, args);\n }\n }\n else {\n // copy tasks as a snapshot to avoid event handlers remove\n // itself or others\n var copiedTasks = taskDatas.slice();\n for (var i = 0; i < copiedTasks.length; i++) {\n // if other listener call event.stopImmediatePropagation\n // just break\n if (event[stopSymbol] === true) {\n break;\n }\n var taskData = copiedTasks[i];\n if (taskData.zone !== Zone.current) {\n // only use Zone.run when Zone.current not equals to stored zone\n taskData.zone.run(taskData.handler, this, args);\n }\n else {\n taskData.handler.apply(this, args);\n }\n }\n }\n};\nvar DomEventsPlugin = /** @class */ (function (_super) {\n __extends(DomEventsPlugin, _super);\n function DomEventsPlugin(doc, ngZone) {\n var _this = _super.call(this, doc) || this;\n _this.ngZone = ngZone;\n _this.patchEvent();\n return _this;\n }\n DomEventsPlugin.prototype.patchEvent = function () {\n if (!Event || !Event.prototype) {\n return;\n }\n if (Event.prototype[stopMethodSymbol]) {\n // already patched by zone.js\n return;\n }\n var delegate = Event.prototype[stopMethodSymbol] =\n Event.prototype.stopImmediatePropagation;\n Event.prototype.stopImmediatePropagation = function () {\n if (this) {\n this[stopSymbol] = true;\n }\n // should call native delegate in case\n // in some environment part of the application\n // will not use the patched Event\n delegate && delegate.apply(this, arguments);\n };\n };\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n DomEventsPlugin.prototype.supports = \n // This plugin should come last in the list of plugins, because it accepts all\n // events.\n function (eventName) { return true; };\n DomEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n /**\n * This code is about to add a listener to the DOM. If Zone.js is present, than\n * `addEventListener` has been patched. The patched code adds overhead in both\n * memory and speed (3x slower) than native. For this reason if we detect that\n * Zone.js is present we use a simple version of zone aware addEventListener instead.\n * The result is faster registration and the zone will be restored.\n * But ZoneSpec.onScheduleTask, ZoneSpec.onInvokeTask, ZoneSpec.onCancelTask\n * will not be invoked\n * We also do manual zone restoration in element.ts renderEventHandlerClosure method.\n *\n * NOTE: it is possible that the element is from different iframe, and so we\n * have to check before we execute the method.\n */\n var zoneJsLoaded = element[ADD_EVENT_LISTENER];\n var callback = handler;\n // if zonejs is loaded and current zone is not ngZone\n // we keep Zone.current on target for later restoration.\n if (zoneJsLoaded && (!NgZone.isInAngularZone() || isBlackListedEvent(eventName))) {\n var symbolName = symbolNames[eventName];\n if (!symbolName) {\n symbolName = symbolNames[eventName] = __symbol__(ANGULAR + eventName + FALSE);\n }\n var taskDatas = element[symbolName];\n var globalListenerRegistered = taskDatas && taskDatas.length > 0;\n if (!taskDatas) {\n taskDatas = element[symbolName] = [];\n }\n var zone = isBlackListedEvent(eventName) ? Zone.root : Zone.current;\n if (taskDatas.length === 0) {\n taskDatas.push({ zone: zone, handler: callback });\n }\n else {\n var callbackRegistered = false;\n for (var i = 0; i < taskDatas.length; i++) {\n if (taskDatas[i].handler === callback) {\n callbackRegistered = true;\n break;\n }\n }\n if (!callbackRegistered) {\n taskDatas.push({ zone: zone, handler: callback });\n }\n }\n if (!globalListenerRegistered) {\n element[ADD_EVENT_LISTENER](eventName, globalListener, false);\n }\n }\n else {\n element[NATIVE_ADD_LISTENER](eventName, callback, false);\n }\n return function () { return _this.removeEventListener(element, eventName, callback); };\n };\n DomEventsPlugin.prototype.removeEventListener = function (target, eventName, callback) {\n var underlyingRemove = target[REMOVE_EVENT_LISTENER];\n // zone.js not loaded, use native removeEventListener\n if (!underlyingRemove) {\n return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n var symbolName = symbolNames[eventName];\n var taskDatas = symbolName && target[symbolName];\n if (!taskDatas) {\n // addEventListener not using patched version\n // just call native removeEventListener\n return target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n // fix issue 20532, should be able to remove\n // listener which was added inside of ngZone\n var found = false;\n for (var i = 0; i < taskDatas.length; i++) {\n // remove listener from taskDatas if the callback equals\n if (taskDatas[i].handler === callback) {\n found = true;\n taskDatas.splice(i, 1);\n break;\n }\n }\n if (found) {\n if (taskDatas.length === 0) {\n // all listeners are removed, we can remove the globalListener from target\n underlyingRemove.apply(target, [eventName, globalListener, false]);\n }\n }\n else {\n // not found in taskDatas, the callback may be added inside of ngZone\n // use native remove listener to remove the callback\n target[NATIVE_REMOVE_LISTENER].apply(target, [eventName, callback, false]);\n }\n };\n DomEventsPlugin.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n DomEventsPlugin.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n { type: NgZone, },\n ]; };\n return DomEventsPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 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 * A DI token that you can use to provide{@link HammerGestureConfig} to Angular. Use it to configure\n * Hammer gestures.\n *\n * @experimental\n */\nvar HAMMER_GESTURE_CONFIG = new InjectionToken('HammerGestureConfig');\n/**\n * @experimental\n */\nvar HammerGestureConfig = /** @class */ (function () {\n function HammerGestureConfig() {\n this.events = [];\n this.overrides = {};\n }\n HammerGestureConfig.prototype.buildHammer = function (element) {\n var mc = new Hammer(element, this.options);\n mc.get('pinch').set({ enable: true });\n mc.get('rotate').set({ enable: true });\n for (var eventName in this.overrides) {\n mc.get(eventName).set(this.overrides[eventName]);\n }\n return mc;\n };\n HammerGestureConfig.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HammerGestureConfig.ctorParameters = function () { return []; };\n return HammerGestureConfig;\n}());\nvar HammerGesturesPlugin = /** @class */ (function (_super) {\n __extends(HammerGesturesPlugin, _super);\n function HammerGesturesPlugin(doc, _config, console) {\n var _this = _super.call(this, doc) || this;\n _this._config = _config;\n _this.console = console;\n return _this;\n }\n HammerGesturesPlugin.prototype.supports = function (eventName) {\n if (!EVENT_NAMES.hasOwnProperty(eventName.toLowerCase()) && !this.isCustomEvent(eventName)) {\n return false;\n }\n if (!window.Hammer) {\n this.console.warn(\"Hammer.js is not loaded, can not bind '\" + eventName + \"' event.\");\n return false;\n }\n return true;\n };\n HammerGesturesPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var _this = this;\n var zone = this.manager.getZone();\n eventName = eventName.toLowerCase();\n return zone.runOutsideAngular(function () {\n // Creating the manager bind events, must be done outside of angular\n var mc = _this._config.buildHammer(element);\n var callback = function (eventObj) {\n zone.runGuarded(function () { handler(eventObj); });\n };\n mc.on(eventName, callback);\n return function () { return mc.off(eventName, callback); };\n });\n };\n HammerGesturesPlugin.prototype.isCustomEvent = function (eventName) { return this._config.events.indexOf(eventName) > -1; };\n HammerGesturesPlugin.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n HammerGesturesPlugin.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n { type: HammerGestureConfig, decorators: [{ type: Inject, args: [HAMMER_GESTURE_CONFIG,] },] },\n { type: ɵConsole, },\n ]; };\n return HammerGesturesPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 MODIFIER_KEYS = ['alt', 'control', 'meta', 'shift'];\nvar ɵ0$1 = function (event) { return event.altKey; };\nvar ɵ1$1 = function (event) { return event.ctrlKey; };\nvar ɵ2$1 = function (event) { return event.metaKey; };\nvar ɵ3 = function (event) { return event.shiftKey; };\nvar MODIFIER_KEY_GETTERS = {\n 'alt': ɵ0$1,\n 'control': ɵ1$1,\n 'meta': ɵ2$1,\n 'shift': ɵ3\n};\n/**\n * @experimental\n */\nvar KeyEventsPlugin = /** @class */ (function (_super) {\n __extends(KeyEventsPlugin, _super);\n function KeyEventsPlugin(doc) {\n return _super.call(this, doc) || this;\n }\n KeyEventsPlugin.prototype.supports = function (eventName) { return KeyEventsPlugin.parseEventName(eventName) != null; };\n KeyEventsPlugin.prototype.addEventListener = function (element, eventName, handler) {\n var parsedEvent = (KeyEventsPlugin.parseEventName(eventName));\n var outsideHandler = KeyEventsPlugin.eventCallback(parsedEvent['fullKey'], handler, this.manager.getZone());\n return this.manager.getZone().runOutsideAngular(function () {\n return getDOM().onAndCancel(element, parsedEvent['domEventName'], outsideHandler);\n });\n };\n KeyEventsPlugin.parseEventName = function (eventName) {\n var parts = eventName.toLowerCase().split('.');\n var domEventName = parts.shift();\n if ((parts.length === 0) || !(domEventName === 'keydown' || domEventName === 'keyup')) {\n return null;\n }\n var key = KeyEventsPlugin._normalizeKey((parts.pop()));\n var fullKey = '';\n MODIFIER_KEYS.forEach(function (modifierName) {\n var index = parts.indexOf(modifierName);\n if (index > -1) {\n parts.splice(index, 1);\n fullKey += modifierName + '.';\n }\n });\n fullKey += key;\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 var result = {};\n result['domEventName'] = domEventName;\n result['fullKey'] = fullKey;\n return result;\n };\n KeyEventsPlugin.getEventFullKey = function (event) {\n var fullKey = '';\n var key = getDOM().getEventKey(event);\n key = key.toLowerCase();\n if (key === ' ') {\n key = 'space'; // for readability\n }\n else if (key === '.') {\n key = 'dot'; // because '.' is used as a separator in event names\n }\n MODIFIER_KEYS.forEach(function (modifierName) {\n if (modifierName != key) {\n var modifierGetter = MODIFIER_KEY_GETTERS[modifierName];\n if (modifierGetter(event)) {\n fullKey += modifierName + '.';\n }\n }\n });\n fullKey += key;\n return fullKey;\n };\n KeyEventsPlugin.eventCallback = function (fullKey, handler, zone) {\n return function (event /** TODO #9100 */) {\n if (KeyEventsPlugin.getEventFullKey(event) === fullKey) {\n zone.runGuarded(function () { return handler(event); });\n }\n };\n };\n /** @internal */\n /** @internal */\n KeyEventsPlugin._normalizeKey = /** @internal */\n function (keyName) {\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 KeyEventsPlugin.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n KeyEventsPlugin.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return KeyEventsPlugin;\n}(EventManagerPlugin));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * 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 *\n */\nvar DomSanitizer = /** @class */ (function () {\n function DomSanitizer() {\n }\n return DomSanitizer;\n}());\nvar DomSanitizerImpl = /** @class */ (function (_super) {\n __extends(DomSanitizerImpl, _super);\n function DomSanitizerImpl(_doc) {\n var _this = _super.call(this) || this;\n _this._doc = _doc;\n return _this;\n }\n DomSanitizerImpl.prototype.sanitize = function (ctx, value) {\n if (value == null)\n return null;\n switch (ctx) {\n case SecurityContext.NONE:\n return value;\n case SecurityContext.HTML:\n if (value instanceof SafeHtmlImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'HTML');\n return ɵ_sanitizeHtml(this._doc, String(value));\n case SecurityContext.STYLE:\n if (value instanceof SafeStyleImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'Style');\n return ɵ_sanitizeStyle(value);\n case SecurityContext.SCRIPT:\n if (value instanceof SafeScriptImpl)\n return value.changingThisBreaksApplicationSecurity;\n this.checkNotSafeValue(value, 'Script');\n throw new Error('unsafe value used in a script context');\n case SecurityContext.URL:\n if (value instanceof SafeResourceUrlImpl || value instanceof SafeUrlImpl) {\n // Allow resource URLs in URL contexts, they are strictly more trusted.\n return value.changingThisBreaksApplicationSecurity;\n }\n this.checkNotSafeValue(value, 'URL');\n return ɵ_sanitizeUrl(String(value));\n case SecurityContext.RESOURCE_URL:\n if (value instanceof SafeResourceUrlImpl) {\n return value.changingThisBreaksApplicationSecurity;\n }\n this.checkNotSafeValue(value, 'ResourceURL');\n throw new Error('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 DomSanitizerImpl.prototype.checkNotSafeValue = function (value, expectedType) {\n if (value instanceof SafeValueImpl) {\n throw new Error(\"Required a safe \" + expectedType + \", got a \" + value.getTypeName() + \" \" +\n \"(see http://g.co/ng/security#xss)\");\n }\n };\n DomSanitizerImpl.prototype.bypassSecurityTrustHtml = function (value) { return new SafeHtmlImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustStyle = function (value) { return new SafeStyleImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustScript = function (value) { return new SafeScriptImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustUrl = function (value) { return new SafeUrlImpl(value); };\n DomSanitizerImpl.prototype.bypassSecurityTrustResourceUrl = function (value) {\n return new SafeResourceUrlImpl(value);\n };\n DomSanitizerImpl.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n DomSanitizerImpl.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT$1,] },] },\n ]; };\n return DomSanitizerImpl;\n}(DomSanitizer));\nvar SafeValueImpl = /** @class */ (function () {\n function SafeValueImpl(changingThisBreaksApplicationSecurity) {\n // empty\n this.changingThisBreaksApplicationSecurity = changingThisBreaksApplicationSecurity;\n }\n SafeValueImpl.prototype.toString = function () {\n return \"SafeValue must use [property]=binding: \" + this.changingThisBreaksApplicationSecurity +\n \" (see http://g.co/ng/security#xss)\";\n };\n return SafeValueImpl;\n}());\nvar SafeHtmlImpl = /** @class */ (function (_super) {\n __extends(SafeHtmlImpl, _super);\n function SafeHtmlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeHtmlImpl.prototype.getTypeName = function () { return 'HTML'; };\n return SafeHtmlImpl;\n}(SafeValueImpl));\nvar SafeStyleImpl = /** @class */ (function (_super) {\n __extends(SafeStyleImpl, _super);\n function SafeStyleImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeStyleImpl.prototype.getTypeName = function () { return 'Style'; };\n return SafeStyleImpl;\n}(SafeValueImpl));\nvar SafeScriptImpl = /** @class */ (function (_super) {\n __extends(SafeScriptImpl, _super);\n function SafeScriptImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeScriptImpl.prototype.getTypeName = function () { return 'Script'; };\n return SafeScriptImpl;\n}(SafeValueImpl));\nvar SafeUrlImpl = /** @class */ (function (_super) {\n __extends(SafeUrlImpl, _super);\n function SafeUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeUrlImpl.prototype.getTypeName = function () { return 'URL'; };\n return SafeUrlImpl;\n}(SafeValueImpl));\nvar SafeResourceUrlImpl = /** @class */ (function (_super) {\n __extends(SafeResourceUrlImpl, _super);\n function SafeResourceUrlImpl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SafeResourceUrlImpl.prototype.getTypeName = function () { return 'ResourceURL'; };\n return SafeResourceUrlImpl;\n}(SafeValueImpl));\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 INTERNAL_BROWSER_PLATFORM_PROVIDERS = [\n { provide: PLATFORM_ID, useValue: ɵPLATFORM_BROWSER_ID },\n { provide: PLATFORM_INITIALIZER, useValue: initDomAdapter, multi: true },\n { provide: PlatformLocation, useClass: BrowserPlatformLocation, deps: [DOCUMENT$1] },\n { provide: DOCUMENT$1, useFactory: _document, deps: [] },\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 * @experimental\n */\nvar BROWSER_SANITIZATION_PROVIDERS = [\n { provide: Sanitizer, useExisting: DomSanitizer },\n { provide: DomSanitizer, useClass: DomSanitizerImpl, deps: [DOCUMENT$1] },\n];\n/**\n *\n */\nvar platformBrowser = createPlatformFactory(platformCore, 'browser', INTERNAL_BROWSER_PLATFORM_PROVIDERS);\nfunction initDomAdapter() {\n BrowserDomAdapter.makeCurrent();\n BrowserGetTestability.init();\n}\nfunction errorHandler() {\n return new ErrorHandler();\n}\nfunction _document() {\n return document;\n}\n/**\n * The ng module for the browser.\n *\n *\n */\nvar BrowserModule = /** @class */ (function () {\n function BrowserModule(parentModule) {\n if (parentModule) {\n throw new Error(\"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 * Configures a browser-based application to transition from a server-rendered app, if\n * one is present on the page. The specified parameters must include an application id,\n * which must match between the client and server applications.\n *\n * @experimental\n */\n /**\n * Configures a browser-based application to transition from a server-rendered app, if\n * one is present on the page. The specified parameters must include an application id,\n * which must match between the client and server applications.\n *\n * @experimental\n */\n BrowserModule.withServerTransition = /**\n * Configures a browser-based application to transition from a server-rendered app, if\n * one is present on the page. The specified parameters must include an application id,\n * which must match between the client and server applications.\n *\n * @experimental\n */\n function (params) {\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 BrowserModule.decorators = [\n { type: NgModule, args: [{\n providers: [\n BROWSER_SANITIZATION_PROVIDERS,\n { provide: ɵAPP_ROOT, useValue: true },\n { provide: ErrorHandler, useFactory: errorHandler, deps: [] },\n { provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true },\n { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true },\n { provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true },\n { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig },\n DomRendererFactory2,\n { provide: RendererFactory2, useExisting: DomRendererFactory2 },\n { provide: SharedStylesHost, useExisting: DomSharedStylesHost },\n DomSharedStylesHost,\n Testability,\n EventManager,\n ELEMENT_PROBE_PROVIDERS,\n Meta,\n Title,\n ],\n exports: [CommonModule, ApplicationModule]\n },] }\n ];\n /** @nocollapse */\n BrowserModule.ctorParameters = function () { return [\n { type: BrowserModule, decorators: [{ type: Optional }, { type: SkipSelf },] },\n ]; };\n return BrowserModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 win = typeof window !== 'undefined' && window || {};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 ChangeDetectionPerfRecord = /** @class */ (function () {\n function ChangeDetectionPerfRecord(msPerTick, numTicks) {\n this.msPerTick = msPerTick;\n this.numTicks = numTicks;\n }\n return ChangeDetectionPerfRecord;\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 */\nvar AngularProfiler = /** @class */ (function () {\n function AngularProfiler(ref) {\n this.appRef = ref.injector.get(ApplicationRef);\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 // 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 AngularProfiler.prototype.timeChangeDetection = \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 function (config) {\n var record = config && config['record'];\n var profileName = 'Change Detection';\n // Profiler is not available in Android browsers, nor in IE 9 without dev tools opened\n var isProfilerAvailable = win.console.profile != null;\n if (record && isProfilerAvailable) {\n win.console.profile(profileName);\n }\n var start = getDOM().performanceNow();\n var numTicks = 0;\n while (numTicks < 5 || (getDOM().performanceNow() - start) < 500) {\n this.appRef.tick();\n numTicks++;\n }\n var end = getDOM().performanceNow();\n if (record && isProfilerAvailable) {\n // need to cast to <any> because type checker thinks there's no argument\n // while in fact there is:\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd\n // need to cast to <any> because type checker thinks there's no argument\n // while in fact there is:\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/Console/profileEnd\n win.console.profileEnd(profileName);\n }\n var msPerTick = (end - start) / numTicks;\n win.console.log(\"ran \" + numTicks + \" change detection cycles\");\n win.console.log(msPerTick.toFixed(2) + \" ms per check\");\n return new ChangeDetectionPerfRecord(msPerTick, numTicks);\n };\n return AngularProfiler;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 PROFILER_GLOBAL_NAME = 'profiler';\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 * @experimental All debugging apis are currently experimental.\n */\nfunction enableDebugTools(ref) {\n exportNgVar(PROFILER_GLOBAL_NAME, new AngularProfiler(ref));\n return ref;\n}\n/**\n * Disables Angular tools.\n *\n * @experimental All debugging apis are currently experimental.\n */\nfunction disableDebugTools() {\n exportNgVar(PROFILER_GLOBAL_NAME, null);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 escapeHtml(text) {\n var escapedText = {\n '&': '&a;',\n '\"': '&q;',\n '\\'': '&s;',\n '<': '&l;',\n '>': '&g;',\n };\n return text.replace(/[&\"'<>]/g, function (s) { return escapedText[s]; });\n}\nfunction unescapeHtml(text) {\n var unescapedText = {\n '&a;': '&',\n '&q;': '\"',\n '&s;': '\\'',\n '&l;': '<',\n '&g;': '>',\n };\n return text.replace(/&[^;]+;/g, function (s) { return unescapedText[s]; });\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 * @experimental\n */\nfunction makeStateKey(key) {\n return key;\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 * @experimental\n */\nvar TransferState = /** @class */ (function () {\n function TransferState() {\n this.store = {};\n this.onSerializeCallbacks = {};\n }\n /** @internal */\n /** @internal */\n TransferState.init = /** @internal */\n function (initState) {\n var transferState = new TransferState();\n transferState.store = initState;\n return transferState;\n };\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n TransferState.prototype.get = /**\n * Get the value corresponding to a key. Return `defaultValue` if key is not found.\n */\n function (key, defaultValue) {\n return this.store[key] !== undefined ? this.store[key] : defaultValue;\n };\n /**\n * Set the value corresponding to a key.\n */\n /**\n * Set the value corresponding to a key.\n */\n TransferState.prototype.set = /**\n * Set the value corresponding to a key.\n */\n function (key, value) { this.store[key] = value; };\n /**\n * Remove a key from the store.\n */\n /**\n * Remove a key from the store.\n */\n TransferState.prototype.remove = /**\n * Remove a key from the store.\n */\n function (key) { delete this.store[key]; };\n /**\n * Test whether a key exists in the store.\n */\n /**\n * Test whether a key exists in the store.\n */\n TransferState.prototype.hasKey = /**\n * Test whether a key exists in the store.\n */\n function (key) { return this.store.hasOwnProperty(key); };\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n TransferState.prototype.onSerialize = /**\n * Register a callback to provide the value for a key when `toJson` is called.\n */\n function (key, callback) {\n this.onSerializeCallbacks[key] = callback;\n };\n /**\n * Serialize the current state of the store to JSON.\n */\n /**\n * Serialize the current state of the store to JSON.\n */\n TransferState.prototype.toJson = /**\n * Serialize the current state of the store to JSON.\n */\n function () {\n // Call the onSerialize callbacks and put those values into the store.\n for (var key in this.onSerializeCallbacks) {\n if (this.onSerializeCallbacks.hasOwnProperty(key)) {\n try {\n this.store[key] = this.onSerializeCallbacks[key]();\n }\n catch (e) {\n console.warn('Exception in onSerialize callback: ', e);\n }\n }\n }\n return JSON.stringify(this.store);\n };\n TransferState.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n TransferState.ctorParameters = function () { return []; };\n return TransferState;\n}());\nfunction initTransferState(doc, appId) {\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 var script = doc.getElementById(appId + '-state');\n var initialState = {};\n if (script && script.textContent) {\n try {\n initialState = JSON.parse(unescapeHtml(script.textContent));\n }\n catch (e) {\n console.warn('Exception while restoring TransferState for app ' + appId, e);\n }\n }\n return TransferState.init(initialState);\n}\n/**\n * NgModule to install on the client side while using the `TransferState` to transfer state from\n * server to client.\n *\n * @experimental\n */\nvar BrowserTransferStateModule = /** @class */ (function () {\n function BrowserTransferStateModule() {\n }\n BrowserTransferStateModule.decorators = [\n { type: NgModule, args: [{\n providers: [{ provide: TransferState, useFactory: initTransferState, deps: [DOCUMENT$1, APP_ID] }],\n },] }\n ];\n /** @nocollapse */\n BrowserTransferStateModule.ctorParameters = function () { return []; };\n return BrowserTransferStateModule;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Predicates for use with {@link DebugElement}'s query functions.\n *\n * @experimental All debugging apis are currently experimental.\n */\nvar By = /** @class */ (function () {\n function By() {\n }\n /**\n * Match all elements.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n /**\n * Match all elements.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n By.all = /**\n * Match all elements.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}\n */\n function () { return function (debugElement) { return true; }; };\n /**\n * Match elements by the given CSS selector.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n /**\n * Match elements by the given CSS selector.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n By.css = /**\n * Match elements by the given CSS selector.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}\n */\n function (selector) {\n return function (debugElement) {\n return debugElement.nativeElement != null ?\n getDOM().elementMatches(debugElement.nativeElement, selector) :\n false;\n };\n };\n /**\n * Match elements that have the given directive present.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n /**\n * Match elements that have the given directive present.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n By.directive = /**\n * Match elements that have the given directive present.\n *\n * ## Example\n *\n * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}\n */\n function (type) {\n return function (debugElement) { return debugElement.providerTokens.indexOf(type) !== -1; };\n };\n return By;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { _document as ɵangular_packages_platform_browser_platform_browser_b, errorHandler as ɵangular_packages_platform_browser_platform_browser_a, GenericBrowserDomAdapter as ɵangular_packages_platform_browser_platform_browser_i, SERVER_TRANSITION_PROVIDERS as ɵangular_packages_platform_browser_platform_browser_g, appInitializerFactory as ɵangular_packages_platform_browser_platform_browser_f, initTransferState as ɵangular_packages_platform_browser_platform_browser_c, _createNgProbe as ɵangular_packages_platform_browser_platform_browser_h, EventManagerPlugin as ɵangular_packages_platform_browser_platform_browser_d, DomSanitizerImpl as ɵangular_packages_platform_browser_platform_browser_e, BrowserModule, platformBrowser, Meta, Title, disableDebugTools, enableDebugTools, BrowserTransferStateModule, TransferState, makeStateKey, By, DOCUMENT$1 as DOCUMENT, EVENT_MANAGER_PLUGINS, EventManager, HAMMER_GESTURE_CONFIG, HammerGestureConfig, DomSanitizer, VERSION, BROWSER_SANITIZATION_PROVIDERS as ɵBROWSER_SANITIZATION_PROVIDERS, INTERNAL_BROWSER_PLATFORM_PROVIDERS as ɵINTERNAL_BROWSER_PLATFORM_PROVIDERS, initDomAdapter as ɵinitDomAdapter, BrowserDomAdapter as ɵBrowserDomAdapter, BrowserPlatformLocation as ɵBrowserPlatformLocation, TRANSITION_ID as ɵTRANSITION_ID, BrowserGetTestability as ɵBrowserGetTestability, escapeHtml as ɵescapeHtml, ELEMENT_PROBE_PROVIDERS as ɵELEMENT_PROBE_PROVIDERS, DomAdapter as ɵDomAdapter, getDOM as ɵgetDOM, setRootDomAdapter as ɵsetRootDomAdapter, DomRendererFactory2 as ɵDomRendererFactory2, NAMESPACE_URIS as ɵNAMESPACE_URIS, flattenStyles as ɵflattenStyles, shimContentAttribute as ɵshimContentAttribute, shimHostAttribute as ɵshimHostAttribute, DomEventsPlugin as ɵDomEventsPlugin, HammerGesturesPlugin as ɵHammerGesturesPlugin, KeyEventsPlugin as ɵKeyEventsPlugin, DomSharedStylesHost as ɵDomSharedStylesHost, SharedStylesHost as ɵSharedStylesHost };\n//# sourceMappingURL=platform-browser.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","/**\n * @license Angular v6.0.0-rc.6\n * (c) 2010-2018 Google, Inc. https://angular.io/\n * License: MIT\n */\n\nimport { APP_BASE_HREF, HashLocationStrategy, LOCATION_INITIALIZED, Location, LocationStrategy, PathLocationStrategy, PlatformLocation } from '@angular/common';\nimport { ANALYZE_FOR_ENTRY_COMPONENTS, APP_BOOTSTRAP_LISTENER, APP_INITIALIZER, ApplicationRef, Attribute, ChangeDetectorRef, Compiler, ComponentFactoryResolver, ContentChildren, Directive, ElementRef, EventEmitter, HostBinding, HostListener, Inject, Injectable, InjectionToken, Injector, Input, NgModule, NgModuleFactory, NgModuleFactoryLoader, NgModuleRef, NgProbeToken, Optional, Output, Renderer2, SkipSelf, SystemJsNgModuleLoader, Version, ViewContainerRef, isDevMode, ɵisObservable, ɵisPromise } from '@angular/core';\nimport { __assign, __extends, __spread, __values } from 'tslib';\nimport { BehaviorSubject, EmptyError, Observable, Subject, from, of } from 'rxjs';\nimport { catchError, concatAll, concatMap, every, filter, first, last, map, mergeAll, mergeMap, reduce } from 'rxjs/operators';\nimport { ɵgetDOM } from '@angular/platform-browser';\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Base for events the Router goes through, as opposed to events tied to a specific\n * Route. `RouterEvent`s will only be fired one time for any given navigation.\n *\n * Example:\n *\n * ```\n * class MyService {\n * constructor(public router: Router, logger: Logger) {\n * router.events.filter(e => e instanceof RouterEvent).subscribe(e => {\n * logger.log(e.id, e.url);\n * });\n * }\n * }\n * ```\n *\n * @experimental\n */\nvar RouterEvent = /** @class */ (function () {\n function RouterEvent(/** @docsNotRequired */\n id, /** @docsNotRequired */\n url) {\n this.id = id;\n this.url = url;\n }\n return RouterEvent;\n}());\n/**\n * @description\n *\n * Represents an event triggered when a navigation starts.\n *\n *\n */\nvar NavigationStart = /** @class */ (function (_super) {\n __extends(NavigationStart, _super);\n function NavigationStart(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n /** @docsNotRequired */\n navigationTrigger, /** @docsNotRequired */\n /** @docsNotRequired */\n restoredState) {\n /** @docsNotRequired */\n if (navigationTrigger === void 0) { navigationTrigger = 'imperative'; }\n /** @docsNotRequired */\n if (restoredState === void 0) { restoredState = null; }\n var _this = _super.call(this, id, url) || this;\n _this.navigationTrigger = navigationTrigger;\n _this.restoredState = restoredState;\n return _this;\n }\n /** @docsNotRequired */\n /** @docsNotRequired */\n NavigationStart.prototype.toString = /** @docsNotRequired */\n function () { return \"NavigationStart(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationStart;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents an event triggered when a navigation ends successfully.\n *\n *\n */\nvar NavigationEnd = /** @class */ (function (_super) {\n __extends(NavigationEnd, _super);\n function NavigationEnd(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n return _this;\n }\n /** @docsNotRequired */\n /** @docsNotRequired */\n NavigationEnd.prototype.toString = /** @docsNotRequired */\n function () {\n return \"NavigationEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"')\";\n };\n return NavigationEnd;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents an event triggered when a navigation is canceled.\n *\n *\n */\nvar NavigationCancel = /** @class */ (function (_super) {\n __extends(NavigationCancel, _super);\n function NavigationCancel(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n reason) {\n var _this = _super.call(this, id, url) || this;\n _this.reason = reason;\n return _this;\n }\n /** @docsNotRequired */\n /** @docsNotRequired */\n NavigationCancel.prototype.toString = /** @docsNotRequired */\n function () { return \"NavigationCancel(id: \" + this.id + \", url: '\" + this.url + \"')\"; };\n return NavigationCancel;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents an event triggered when a navigation fails due to an unexpected error.\n *\n *\n */\nvar NavigationError = /** @class */ (function (_super) {\n __extends(NavigationError, _super);\n function NavigationError(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n error) {\n var _this = _super.call(this, id, url) || this;\n _this.error = error;\n return _this;\n }\n /** @docsNotRequired */\n /** @docsNotRequired */\n NavigationError.prototype.toString = /** @docsNotRequired */\n function () {\n return \"NavigationError(id: \" + this.id + \", url: '\" + this.url + \"', error: \" + this.error + \")\";\n };\n return NavigationError;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents an event triggered when routes are recognized.\n *\n *\n */\nvar RoutesRecognized = /** @class */ (function (_super) {\n __extends(RoutesRecognized, _super);\n function RoutesRecognized(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n /** @docsNotRequired */\n /** @docsNotRequired */\n RoutesRecognized.prototype.toString = /** @docsNotRequired */\n function () {\n return \"RoutesRecognized(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return RoutesRecognized;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents the start of the Guard phase of routing.\n *\n * @experimental\n */\nvar GuardsCheckStart = /** @class */ (function (_super) {\n __extends(GuardsCheckStart, _super);\n function GuardsCheckStart(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n GuardsCheckStart.prototype.toString = function () {\n return \"GuardsCheckStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return GuardsCheckStart;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents the end of the Guard phase of routing.\n *\n * @experimental\n */\nvar GuardsCheckEnd = /** @class */ (function (_super) {\n __extends(GuardsCheckEnd, _super);\n function GuardsCheckEnd(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state, /** @docsNotRequired */\n shouldActivate) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n _this.shouldActivate = shouldActivate;\n return _this;\n }\n GuardsCheckEnd.prototype.toString = function () {\n return \"GuardsCheckEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \", shouldActivate: \" + this.shouldActivate + \")\";\n };\n return GuardsCheckEnd;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents the start of the Resolve phase of routing. The timing of this\n * event may change, thus it's experimental. In the current iteration it will run\n * in the \"resolve\" phase whether there's things to resolve or not. In the future this\n * behavior may change to only run when there are things to be resolved.\n *\n * @experimental\n */\nvar ResolveStart = /** @class */ (function (_super) {\n __extends(ResolveStart, _super);\n function ResolveStart(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveStart.prototype.toString = function () {\n return \"ResolveStart(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveStart;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents the end of the Resolve phase of routing. See note on\n * `ResolveStart` for use of this experimental API.\n *\n * @experimental\n */\nvar ResolveEnd = /** @class */ (function (_super) {\n __extends(ResolveEnd, _super);\n function ResolveEnd(/** @docsNotRequired */\n /** @docsNotRequired */\n id, /** @docsNotRequired */\n /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n var _this = _super.call(this, id, url) || this;\n _this.urlAfterRedirects = urlAfterRedirects;\n _this.state = state;\n return _this;\n }\n ResolveEnd.prototype.toString = function () {\n return \"ResolveEnd(id: \" + this.id + \", url: '\" + this.url + \"', urlAfterRedirects: '\" + this.urlAfterRedirects + \"', state: \" + this.state + \")\";\n };\n return ResolveEnd;\n}(RouterEvent));\n/**\n * @description\n *\n * Represents an event triggered before lazy loading a route config.\n *\n * @experimental\n */\nvar RouteConfigLoadStart = /** @class */ (function () {\n function RouteConfigLoadStart(/** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadStart.prototype.toString = function () { return \"RouteConfigLoadStart(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadStart;\n}());\n/**\n * @description\n *\n * Represents an event triggered when a route has been lazy loaded.\n *\n * @experimental\n */\nvar RouteConfigLoadEnd = /** @class */ (function () {\n function RouteConfigLoadEnd(/** @docsNotRequired */\n route) {\n this.route = route;\n }\n RouteConfigLoadEnd.prototype.toString = function () { return \"RouteConfigLoadEnd(path: \" + this.route.path + \")\"; };\n return RouteConfigLoadEnd;\n}());\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationEnd` for use of this experimental API.\n *\n * @experimental\n */\nvar ChildActivationStart = /** @class */ (function () {\n function ChildActivationStart(/** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationStart(path: '\" + path + \"')\";\n };\n return ChildActivationStart;\n}());\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ChildActivationStart` for use of this experimental API.\n *\n * @experimental\n */\nvar ChildActivationEnd = /** @class */ (function () {\n function ChildActivationEnd(/** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ChildActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ChildActivationEnd(path: '\" + path + \"')\";\n };\n return ChildActivationEnd;\n}());\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationEnd` for use of this experimental API.\n *\n * @experimental\n */\nvar ActivationStart = /** @class */ (function () {\n function ActivationStart(/** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationStart.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationStart(path: '\" + path + \"')\";\n };\n return ActivationStart;\n}());\n/**\n * @description\n *\n * Represents the start of end of the Resolve phase of routing. See note on\n * `ActivationStart` for use of this experimental API.\n *\n * @experimental\n */\nvar ActivationEnd = /** @class */ (function () {\n function ActivationEnd(/** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n }\n ActivationEnd.prototype.toString = function () {\n var path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return \"ActivationEnd(path: '\" + path + \"')\";\n };\n return ActivationEnd;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Name of the primary outlet.\n *\n *\n */\nvar PRIMARY_OUTLET = 'primary';\nvar ParamsAsMap = /** @class */ (function () {\n function ParamsAsMap(params) {\n this.params = params || {};\n }\n ParamsAsMap.prototype.has = function (name) { return this.params.hasOwnProperty(name); };\n ParamsAsMap.prototype.get = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n };\n ParamsAsMap.prototype.getAll = function (name) {\n if (this.has(name)) {\n var v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n };\n Object.defineProperty(ParamsAsMap.prototype, \"keys\", {\n get: function () { return Object.keys(this.params); },\n enumerable: true,\n configurable: true\n });\n return ParamsAsMap;\n}());\n/**\n * Convert a `Params` instance to a `ParamMap`.\n *\n *\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\nvar NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction navigationCancelingError(message) {\n var error = Error('NavigationCancelingError: ' + message);\n error[NAVIGATION_CANCELING_ERROR] = true;\n return error;\n}\nfunction isNavigationCancelingError(error) {\n return error && error[NAVIGATION_CANCELING_ERROR];\n}\n// Matches the route configuration (`route`) against the actual URL (`segments`).\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n var parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\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 var posParams = {};\n // Check each config part against the actual URL\n for (var index = 0; index < parts.length; index++) {\n var part = parts[index];\n var segment = segments[index];\n var isParameter = part.startsWith(':');\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n }\n else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return { consumed: segments.slice(0, parts.length), posParams: posParams };\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 LoadedRouterConfig = /** @class */ (function () {\n function LoadedRouterConfig(routes, module) {\n this.routes = routes;\n this.module = module;\n }\n return LoadedRouterConfig;\n}());\nfunction validateConfig(config, parentPath) {\n if (parentPath === void 0) { parentPath = ''; }\n // forEach doesn't iterate undefined values\n for (var i = 0; i < config.length; i++) {\n var route = config[i];\n var fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath);\n }\n}\nfunction validateNode(route, fullPath) {\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.outlet && route.outlet !== PRIMARY_OUTLET)) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': a componentless route cannot have a named outlet set\");\n }\n if (route.redirectTo && route.children) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and children cannot be used together\");\n }\n if (route.redirectTo && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and loadChildren cannot be used together\");\n }\n if (route.children && route.loadChildren) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': children and loadChildren cannot be used together\");\n }\n if (route.redirectTo && route.component) {\n throw new Error(\"Invalid configuration of route '\" + fullPath + \"': redirectTo and component cannot be used together\");\n }\n if (route.path && route.matcher) {\n throw new Error(\"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 '\" + 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 '\" + 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 var exp = \"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: \\\"\" + 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 '\" + fullPath + \"': pathMatch can only be set to 'prefix' or 'full'\");\n }\n if (route.children) {\n validateConfig(route.children, fullPath);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n }\n else if (parentPath && !currentRoute.path) {\n return parentPath + \"/\";\n }\n else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n }\n else {\n return parentPath + \"/\" + currentRoute.path;\n }\n}\nfunction copyConfig(r) {\n var children = r.children && r.children.map(copyConfig);\n return children ? __assign({}, r, { children: children }) : __assign({}, r);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 shallowEqualArrays(a, b) {\n if (a.length !== b.length)\n return false;\n for (var i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i]))\n return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n var k1 = Object.keys(a);\n var k2 = Object.keys(b);\n if (k1.length != k2.length) {\n return false;\n }\n var key;\n for (var i = 0; i < k1.length; i++) {\n key = k1[i];\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Flattens single-level nested arrays.\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n/**\n * Return the last element of an array.\n */\nfunction last$1(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\n/**\n * Verifys all booleans in an array are `true`.\n */\n\nfunction forEach(map$$1, callback) {\n for (var prop in map$$1) {\n if (map$$1.hasOwnProperty(prop)) {\n callback(map$$1[prop], prop);\n }\n }\n}\nfunction waitForMap(obj, fn) {\n if (Object.keys(obj).length === 0) {\n return of({});\n }\n var waitHead = [];\n var waitTail = [];\n var res = {};\n forEach(obj, function (a, k) {\n var mapped = fn(k, a).pipe(map(function (r) { return res[k] = r; }));\n if (k === PRIMARY_OUTLET) {\n waitHead.push(mapped);\n }\n else {\n waitTail.push(mapped);\n }\n });\n // Closure compiler has problem with using spread operator here. So just using Array.concat.\n return of.apply(null, waitHead.concat(waitTail)).pipe(concatAll(), last(), map(function () { return res; }));\n}\n/**\n * ANDs Observables by merging all input observables, reducing to an Observable verifying all\n * input Observables return `true`.\n */\nfunction andObservables(observables) {\n return observables.pipe(mergeAll(), every(function (result) { return result === true; }));\n}\nfunction wrapIntoObservable(value) {\n if (ɵisObservable(value)) {\n return value;\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 return of(value);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 createEmptyUrlTree() {\n return new UrlTree(new UrlSegmentGroup([], {}), {}, null);\n}\nfunction containsTree(container, containee, exact) {\n if (exact) {\n return equalQueryParams(container.queryParams, containee.queryParams) &&\n equalSegmentGroups(container.root, containee.root);\n }\n return containsQueryParams(container.queryParams, containee.queryParams) &&\n containsSegmentGroup(container.root, containee.root);\n}\nfunction equalQueryParams(container, containee) {\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee) {\n if (!equalPath(container.segments, containee.segments))\n return false;\n if (container.numberOfChildren !== containee.numberOfChildren)\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n}\nfunction containsQueryParams(container, containee) {\n return Object.keys(containee).length <= Object.keys(container).length &&\n Object.keys(containee).every(function (key) { return containee[key] === container[key]; });\n}\nfunction containsSegmentGroup(container, containee) {\n return containsSegmentGroupHelper(container, containee, containee.segments);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths) {\n if (container.segments.length > containeePaths.length) {\n var current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths))\n return false;\n if (containee.hasChildren())\n return false;\n return true;\n }\n else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths))\n return false;\n for (var c in containee.children) {\n if (!container.children[c])\n return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c]))\n return false;\n }\n return true;\n }\n else {\n var current = containeePaths.slice(0, container.segments.length);\n var next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current))\n return false;\n if (!container.children[PRIMARY_OUTLET])\n return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next);\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 * ### 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 *\n */\nvar UrlTree = /** @class */ (function () {\n /** @internal */\n function UrlTree(/** The root segment group of the URL tree */\n root, /** The query params of the URL */\n queryParams, /** The fragment of the URL */\n fragment) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n }\n Object.defineProperty(UrlTree.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n /** @docsNotRequired */\n UrlTree.prototype.toString = /** @docsNotRequired */\n function () { return DEFAULT_SERIALIZER.serialize(this); };\n return UrlTree;\n}());\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n *\n */\nvar UrlSegmentGroup = /** @class */ (function () {\n function UrlSegmentGroup(/** The URL segments of this group. See `UrlSegment` for more information */\n segments, /** The list of children of this group */\n children) {\n var _this = this;\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n forEach(children, function (v, k) { return v.parent = _this; });\n }\n /** Whether the segment has child segments */\n /** Whether the segment has child segments */\n UrlSegmentGroup.prototype.hasChildren = /** Whether the segment has child segments */\n function () { return this.numberOfChildren > 0; };\n Object.defineProperty(UrlSegmentGroup.prototype, \"numberOfChildren\", {\n /** Number of child segments */\n get: /** Number of child segments */\n function () { return Object.keys(this.children).length; },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n /** @docsNotRequired */\n UrlSegmentGroup.prototype.toString = /** @docsNotRequired */\n function () { return serializePaths(this); };\n return UrlSegmentGroup;\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 * ## 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 *\n */\nvar UrlSegment = /** @class */ (function () {\n function UrlSegment(/** The path part of a URL segment */\n path, /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n Object.defineProperty(UrlSegment.prototype, \"parameterMap\", {\n get: function () {\n if (!this._parameterMap) {\n this._parameterMap = convertToParamMap(this.parameters);\n }\n return this._parameterMap;\n },\n enumerable: true,\n configurable: true\n });\n /** @docsNotRequired */\n /** @docsNotRequired */\n UrlSegment.prototype.toString = /** @docsNotRequired */\n function () { return serializePath(this); };\n return UrlSegment;\n}());\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every(function (a, i) { return shallowEqual(a.parameters, bs[i].parameters); });\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length)\n return false;\n return as.every(function (a, i) { return a.path === bs[i].path; });\n}\nfunction mapChildrenIntoArray(segment, fn) {\n var res = [];\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n forEach(segment.children, function (child, childOutlet) {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\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 *\n */\nvar UrlSerializer = /** @class */ (function () {\n function UrlSerializer() {\n }\n return UrlSerializer;\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 *\n */\nvar DefaultUrlSerializer = /** @class */ (function () {\n function DefaultUrlSerializer() {\n }\n /** Parses a url into a `UrlTree` */\n /** Parses a url into a `UrlTree` */\n DefaultUrlSerializer.prototype.parse = /** Parses a url into a `UrlTree` */\n function (url) {\n var p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n };\n /** Converts a `UrlTree` into a url */\n /** Converts a `UrlTree` into a url */\n DefaultUrlSerializer.prototype.serialize = /** Converts a `UrlTree` into a url */\n function (tree) {\n var segment = \"/\" + serializeSegment(tree.root, true);\n var query = serializeQueryParams(tree.queryParams);\n var fragment = typeof tree.fragment === \"string\" ? \"#\" + encodeUriFragment((tree.fragment)) : '';\n return \"\" + segment + query + fragment;\n };\n return DefaultUrlSerializer;\n}());\nvar DEFAULT_SERIALIZER = new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(function (p) { return serializePath(p); }).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n var primary = segment.children[PRIMARY_OUTLET] ?\n serializeSegment(segment.children[PRIMARY_OUTLET], false) :\n '';\n var children_1 = [];\n forEach(segment.children, function (v, k) {\n if (k !== PRIMARY_OUTLET) {\n children_1.push(k + \":\" + serializeSegment(v, false));\n }\n });\n return children_1.length > 0 ? primary + \"(\" + children_1.join('//') + \")\" : primary;\n }\n else {\n var children = mapChildrenIntoArray(segment, function (v, k) {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [k + \":\" + serializeSegment(v, false)];\n });\n return serializePaths(segment) + \"/(\" + children.join('//') + \")\";\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) {\n return encodeURIComponent(s)\n .replace(/%40/g, '@')\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',');\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 */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\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 */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\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 */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\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.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return \"\" + encodeUriSegment(path.path) + serializeMatrixParams(path.parameters);\n}\nfunction serializeMatrixParams(params) {\n return Object.keys(params)\n .map(function (key) { return \";\" + encodeUriSegment(key) + \"=\" + encodeUriSegment(params[key]); })\n .join('');\n}\nfunction serializeQueryParams(params) {\n var strParams = Object.keys(params).map(function (name) {\n var value = params[name];\n return Array.isArray(value) ?\n value.map(function (v) { return encodeUriQuery(name) + \"=\" + encodeUriQuery(v); }).join('&') :\n encodeUriQuery(name) + \"=\" + encodeUriQuery(value);\n });\n return strParams.length ? \"?\" + strParams.join(\"&\") : '';\n}\nvar SEGMENT_RE = /^[^\\/()?;=&#]+/;\nfunction matchSegments(str) {\n var match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nvar QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n var match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nvar 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) {\n var match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nvar UrlParser = /** @class */ (function () {\n function UrlParser(url) {\n this.url = url;\n this.remaining = url;\n }\n UrlParser.prototype.parseRootSegment = function () {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n };\n UrlParser.prototype.parseQueryParams = function () {\n var params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n };\n UrlParser.prototype.parseFragment = function () {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n };\n UrlParser.prototype.parseChildren = function () {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n var segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n var children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n var res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n };\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n UrlParser.prototype.parseSegment = \n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n function () {\n var path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new Error(\"Empty path url segment cannot have parameters: '\" + this.remaining + \"'.\");\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n };\n UrlParser.prototype.parseMatrixParams = function () {\n var params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n };\n UrlParser.prototype.parseParam = function (params) {\n var key = matchSegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n };\n // Parse a single query parameter `name[=value]`\n // Parse a single query parameter `name[=value]`\n UrlParser.prototype.parseQueryParam = \n // Parse a single query parameter `name[=value]`\n function (params) {\n var key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n var value = '';\n if (this.consumeOptional('=')) {\n var valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n var decodedKey = decodeQuery(key);\n var decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n var currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n }\n else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n };\n // parse `(a/b//outlet_name:c/d)`\n // parse `(a/b//outlet_name:c/d)`\n UrlParser.prototype.parseParens = \n // parse `(a/b//outlet_name:c/d)`\n function (allowPrimary) {\n var segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n var path = matchSegments(this.remaining);\n var next = this.remaining[path.length];\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 var outletName = (undefined);\n if (path.indexOf(':') > -1) {\n outletName = path.substr(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n }\n else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n var children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] :\n new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n };\n UrlParser.prototype.peekStartsWith = function (str) { return this.remaining.startsWith(str); };\n // Consumes the prefix when it is present and returns whether it has been consumed\n // Consumes the prefix when it is present and returns whether it has been consumed\n UrlParser.prototype.consumeOptional = \n // Consumes the prefix when it is present and returns whether it has been consumed\n function (str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n };\n UrlParser.prototype.capture = function (str) {\n if (!this.consumeOptional(str)) {\n throw new Error(\"Expected \\\"\" + str + \"\\\".\");\n }\n };\n return UrlParser;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NoMatch = /** @class */ (function () {\n function NoMatch(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n return NoMatch;\n}());\nvar AbsoluteRedirect = /** @class */ (function () {\n function AbsoluteRedirect(urlTree) {\n this.urlTree = urlTree;\n }\n return AbsoluteRedirect;\n}());\nfunction noMatch(segmentGroup) {\n return new Observable(function (obs) { return obs.error(new NoMatch(segmentGroup)); });\n}\nfunction absoluteRedirect(newTree) {\n return new Observable(function (obs) { return obs.error(new AbsoluteRedirect(newTree)); });\n}\nfunction namedOutletsRedirect(redirectTo) {\n return new Observable(function (obs) {\n return obs.error(new Error(\"Only absolute redirects can have named outlets. redirectTo: '\" + redirectTo + \"'\"));\n });\n}\nfunction canLoadFails(route) {\n return new Observable(function (obs) {\n return obs.error(navigationCancelingError(\"Cannot load children because the guard of the route \\\"path: '\" + 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 */\nfunction applyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n return new ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config).apply();\n}\nvar ApplyRedirects = /** @class */ (function () {\n function ApplyRedirects(moduleInjector, configLoader, urlSerializer, urlTree, config) {\n this.configLoader = configLoader;\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n this.config = config;\n this.allowRedirects = true;\n this.ngModule = moduleInjector.get(NgModuleRef);\n }\n ApplyRedirects.prototype.apply = function () {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, this.urlTree.root, PRIMARY_OUTLET);\n var urlTrees$ = expanded$.pipe(map(function (rootSegmentGroup) {\n return _this.createUrlTree(rootSegmentGroup, _this.urlTree.queryParams, (_this.urlTree.fragment));\n }));\n return urlTrees$.pipe(catchError(function (e) {\n if (e instanceof AbsoluteRedirect) {\n // after an absolute redirect we do not apply any more redirects!\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 if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.match = function (tree) {\n var _this = this;\n var expanded$ = this.expandSegmentGroup(this.ngModule, this.config, tree.root, PRIMARY_OUTLET);\n var mapped$ = expanded$.pipe(map(function (rootSegmentGroup) {\n return _this.createUrlTree(rootSegmentGroup, tree.queryParams, (tree.fragment));\n }));\n return mapped$.pipe(catchError(function (e) {\n if (e instanceof NoMatch) {\n throw _this.noMatchError(e);\n }\n throw e;\n }));\n };\n ApplyRedirects.prototype.noMatchError = function (e) {\n return new Error(\"Cannot match any routes. URL Segment: '\" + e.segmentGroup + \"'\");\n };\n ApplyRedirects.prototype.createUrlTree = function (rootCandidate, queryParams, fragment) {\n var root = rootCandidate.segments.length > 0 ?\n new UrlSegmentGroup([], (_a = {}, _a[PRIMARY_OUTLET] = rootCandidate, _a)) :\n rootCandidate;\n return new UrlTree(root, queryParams, fragment);\n var _a;\n };\n ApplyRedirects.prototype.expandSegmentGroup = function (ngModule, routes, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.expandChildren(ngModule, routes, segmentGroup)\n .pipe(map(function (children) { return new UrlSegmentGroup([], children); }));\n }\n return this.expandSegment(ngModule, segmentGroup, routes, segmentGroup.segments, outlet, true);\n };\n // Recursively expand segment groups for all the child outlets\n // Recursively expand segment groups for all the child outlets\n ApplyRedirects.prototype.expandChildren = \n // Recursively expand segment groups for all the child outlets\n function (ngModule, routes, segmentGroup) {\n var _this = this;\n return waitForMap(segmentGroup.children, function (childOutlet, child) { return _this.expandSegmentGroup(ngModule, routes, child, childOutlet); });\n };\n ApplyRedirects.prototype.expandSegment = function (ngModule, segmentGroup, routes, segments, outlet, allowRedirects) {\n var _this = this;\n return of.apply(void 0, __spread(routes)).pipe(map(function (r) {\n var expanded$ = _this.expandSegmentAgainstRoute(ngModule, segmentGroup, routes, r, segments, outlet, allowRedirects);\n return expanded$.pipe(catchError(function (e) {\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);\n }\n throw e;\n }));\n }), concatAll(), first(function (s) { return !!s; }), catchError(function (e, _) {\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 ApplyRedirects.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n ApplyRedirects.prototype.expandSegmentAgainstRoute = function (ngModule, segmentGroup, routes, route, paths, outlet, allowRedirects) {\n if (getOutlet(route) !== outlet) {\n return noMatch(segmentGroup);\n }\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(ngModule, segmentGroup, route, paths);\n }\n if (allowRedirects && this.allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, paths, outlet);\n }\n return noMatch(segmentGroup);\n };\n ApplyRedirects.prototype.expandSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n if (route.path === '**') {\n return this.expandWildCardWithParamsAgainstRouteUsingRedirect(ngModule, routes, route, outlet);\n }\n return this.expandRegularSegmentAgainstRouteUsingRedirect(ngModule, segmentGroup, routes, route, segments, outlet);\n };\n ApplyRedirects.prototype.expandWildCardWithParamsAgainstRouteUsingRedirect = function (ngModule, routes, route, outlet) {\n var _this = this;\n var newTree = this.applyRedirectCommands([], (route.redirectTo), {});\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap(function (newSegments) {\n var group = new UrlSegmentGroup(newSegments, {});\n return _this.expandSegment(ngModule, group, routes, newSegments, outlet, false);\n }));\n };\n ApplyRedirects.prototype.expandRegularSegmentAgainstRouteUsingRedirect = function (ngModule, segmentGroup, routes, route, segments, outlet) {\n var _this = this;\n var _a = match(segmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild, positionalParamSegments = _a.positionalParamSegments;\n if (!matched)\n return noMatch(segmentGroup);\n var newTree = this.applyRedirectCommands(consumedSegments, (route.redirectTo), positionalParamSegments);\n if (route.redirectTo.startsWith('/')) {\n return absoluteRedirect(newTree);\n }\n return this.lineralizeSegments(route, newTree).pipe(mergeMap(function (newSegments) {\n return _this.expandSegment(ngModule, segmentGroup, routes, newSegments.concat(segments.slice(lastChild)), outlet, false);\n }));\n };\n ApplyRedirects.prototype.matchSegmentAgainstRoute = function (ngModule, rawSegmentGroup, route, segments) {\n var _this = this;\n if (route.path === '**') {\n if (route.loadChildren) {\n return this.configLoader.load(ngModule.injector, route)\n .pipe(map(function (cfg) {\n route._loadedConfig = cfg;\n return new UrlSegmentGroup(segments, {});\n }));\n }\n return of(new UrlSegmentGroup(segments, {}));\n }\n var _a = match(rawSegmentGroup, route, segments), matched = _a.matched, consumedSegments = _a.consumedSegments, lastChild = _a.lastChild;\n if (!matched)\n return noMatch(rawSegmentGroup);\n var rawSlicedSegments = segments.slice(lastChild);\n var childConfig$ = this.getChildConfig(ngModule, route);\n return childConfig$.pipe(mergeMap(function (routerConfig) {\n var childModule = routerConfig.module;\n var childConfig = routerConfig.routes;\n var _a = split(rawSegmentGroup, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var expanded$_1 = _this.expandChildren(childModule, childConfig, segmentGroup);\n return expanded$_1.pipe(map(function (children) { return new UrlSegmentGroup(consumedSegments, children); }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new UrlSegmentGroup(consumedSegments, {}));\n }\n var expanded$ = _this.expandSegment(childModule, segmentGroup, childConfig, slicedSegments, PRIMARY_OUTLET, true);\n return expanded$.pipe(map(function (cs) {\n return new UrlSegmentGroup(consumedSegments.concat(cs.segments), cs.children);\n }));\n }));\n };\n ApplyRedirects.prototype.getChildConfig = function (ngModule, route) {\n var _this = this;\n if (route.children) {\n // The children belong to the same module\n return of(new LoadedRouterConfig(route.children, ngModule));\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 return runCanLoadGuard(ngModule.injector, route).pipe(mergeMap(function (shouldLoad) {\n if (shouldLoad) {\n return _this.configLoader.load(ngModule.injector, route)\n .pipe(map(function (cfg) {\n route._loadedConfig = cfg;\n return cfg;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of(new LoadedRouterConfig([], ngModule));\n };\n ApplyRedirects.prototype.lineralizeSegments = function (route, urlTree) {\n var res = [];\n var c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect((route.redirectTo));\n }\n c = c.children[PRIMARY_OUTLET];\n }\n };\n ApplyRedirects.prototype.applyRedirectCommands = function (segments, redirectTo, posParams) {\n return this.applyRedirectCreatreUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n };\n ApplyRedirects.prototype.applyRedirectCreatreUrlTree = function (redirectTo, urlTree, segments, posParams) {\n var newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n };\n ApplyRedirects.prototype.createQueryParams = function (redirectToParams, actualParams) {\n var res = {};\n forEach(redirectToParams, function (v, k) {\n var copySourceValue = typeof v === 'string' && v.startsWith(':');\n if (copySourceValue) {\n var sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n }\n else {\n res[k] = v;\n }\n });\n return res;\n };\n ApplyRedirects.prototype.createSegmentGroup = function (redirectTo, group, segments, posParams) {\n var _this = this;\n var updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n var children = {};\n forEach(group.children, function (child, name) {\n children[name] = _this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n };\n ApplyRedirects.prototype.createSegments = function (redirectTo, redirectToSegments, actualSegments, posParams) {\n var _this = this;\n return redirectToSegments.map(function (s) {\n return s.path.startsWith(':') ? _this.findPosParam(redirectTo, s, posParams) :\n _this.findOrReturn(s, actualSegments);\n });\n };\n ApplyRedirects.prototype.findPosParam = function (redirectTo, redirectToUrlSegment, posParams) {\n var pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos)\n throw new Error(\"Cannot redirect to '\" + redirectTo + \"'. Cannot find '\" + redirectToUrlSegment.path + \"'.\");\n return pos;\n };\n ApplyRedirects.prototype.findOrReturn = function (redirectToUrlSegment, actualSegments) {\n var idx = 0;\n try {\n for (var actualSegments_1 = __values(actualSegments), actualSegments_1_1 = actualSegments_1.next(); !actualSegments_1_1.done; actualSegments_1_1 = actualSegments_1.next()) {\n var s = actualSegments_1_1.value;\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (actualSegments_1_1 && !actualSegments_1_1.done && (_a = actualSegments_1.return)) _a.call(actualSegments_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return redirectToUrlSegment;\n var e_1, _a;\n };\n return ApplyRedirects;\n}());\nfunction runCanLoadGuard(moduleInjector, route) {\n var canLoad = route.canLoad;\n if (!canLoad || canLoad.length === 0)\n return of(true);\n var obs = from(canLoad).pipe(map(function (injectionToken) {\n var guard = moduleInjector.get(injectionToken);\n return wrapIntoObservable(guard.canLoad ? guard.canLoad(route) : guard(route));\n }));\n return andObservables(obs);\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '') {\n if ((route.pathMatch === 'full') && (segmentGroup.hasChildren() || segments.length > 0)) {\n return { matched: false, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n return { matched: true, consumedSegments: [], lastChild: 0, positionalParamSegments: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res) {\n return {\n matched: false,\n consumedSegments: [],\n lastChild: 0,\n positionalParamSegments: {},\n };\n }\n return {\n matched: true,\n consumedSegments: (res.consumed),\n lastChild: (res.consumed.length),\n positionalParamSegments: (res.posParams),\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptySegments(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathRedirects(segmentGroup, slicedSegments, config)) {\n var s = new UrlSegmentGroup(segmentGroup.segments, addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return { segmentGroup: mergeTrivialChildren(s), slicedSegments: slicedSegments };\n }\n return { segmentGroup: segmentGroup, slicedSegments: slicedSegments };\n}\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n var c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction addEmptySegmentsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (isEmptyPathRedirect(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n var e_2, _a;\n}\nfunction createChildrenForEmptySegments(routes, primarySegmentGroup) {\n var res = {};\n res[PRIMARY_OUTLET] = primarySegmentGroup;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n res[getOutlet(r)] = new UrlSegmentGroup([], {});\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n var e_3, _a;\n}\nfunction containsEmptyPathRedirectsWithNamedOutlets(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r) && getOutlet(r) !== PRIMARY_OUTLET; });\n}\nfunction containsEmptyPathRedirects(segmentGroup, segments, routes) {\n return routes.some(function (r) { return isEmptyPathRedirect(segmentGroup, segments, r); });\n}\nfunction isEmptyPathRedirect(segmentGroup, segments, r) {\n if ((segmentGroup.hasChildren() || segments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo !== undefined;\n}\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 Tree = /** @class */ (function () {\n function Tree(root) {\n this._root = root;\n }\n Object.defineProperty(Tree.prototype, \"root\", {\n get: function () { return this._root.value; },\n enumerable: true,\n configurable: true\n });\n /**\n * @internal\n */\n /**\n * @internal\n */\n Tree.prototype.parent = /**\n * @internal\n */\n function (t) {\n var p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n Tree.prototype.children = /**\n * @internal\n */\n function (t) {\n var n = findNode(t, this._root);\n return n ? n.children.map(function (t) { return t.value; }) : [];\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n Tree.prototype.firstChild = /**\n * @internal\n */\n function (t) {\n var n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n Tree.prototype.siblings = /**\n * @internal\n */\n function (t) {\n var p = findPath(t, this._root);\n if (p.length < 2)\n return [];\n var c = p[p.length - 2].children.map(function (c) { return c.value; });\n return c.filter(function (cc) { return cc !== t; });\n };\n /**\n * @internal\n */\n /**\n * @internal\n */\n Tree.prototype.pathFromRoot = /**\n * @internal\n */\n function (t) { return findPath(t, this._root).map(function (s) { return s.value; }); };\n return Tree;\n}());\n// DFS for the node matching the value\nfunction findNode(value, node) {\n if (value === node.value)\n return node;\n try {\n for (var _a = __values(node.children), _b = _a.next(); !_b.done; _b = _a.next()) {\n var child = _b.value;\n var node_1 = findNode(value, child);\n if (node_1)\n return node_1;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return null;\n var e_1, _c;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n if (value === node.value)\n return [node];\n try {\n for (var _a = __values(node.children), _b = _a.next(); !_b.done; _b = _a.next()) {\n var child = _b.value;\n var path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return [];\n var e_2, _c;\n}\nvar TreeNode = /** @class */ (function () {\n function TreeNode(value, children) {\n this.value = value;\n this.children = children;\n }\n TreeNode.prototype.toString = function () { return \"TreeNode(\" + this.value + \")\"; };\n return TreeNode;\n}());\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n var map$$1 = {};\n if (node) {\n node.children.forEach(function (child) { return map$$1[child.value.outlet] = child; });\n }\n return map$$1;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 the state of the router.\n *\n * RouterState is a tree of activated routes. Every node in this tree knows about the \"consumed\" URL\n * segments, the extracted parameters, and the resolved data.\n *\n * ### Example\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` for more information.\n *\n *\n */\nvar RouterState = /** @class */ (function (_super) {\n __extends(RouterState, _super);\n /** @internal */\n function RouterState(root, /** The current snapshot of the router state */\n snapshot) {\n var _this = _super.call(this, root) || this;\n _this.snapshot = snapshot;\n setRouterState(_this, root);\n return _this;\n }\n RouterState.prototype.toString = function () { return this.snapshot.toString(); };\n return RouterState;\n}(Tree));\nfunction createEmptyState(urlTree, rootComponent) {\n var snapshot = createEmptyStateSnapshot(urlTree, rootComponent);\n var emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n var emptyParams = new BehaviorSubject({});\n var emptyData = new BehaviorSubject({});\n var emptyQueryParams = new BehaviorSubject({});\n var fragment = new BehaviorSubject('');\n var activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(urlTree, rootComponent) {\n var emptyParams = {};\n var emptyData = {};\n var emptyQueryParams = {};\n var fragment = '';\n var activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, urlTree.root, -1, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet. An `ActivatedRoute` can also be used to traverse the router state tree.\n *\n * ```\n * @Component({...})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: Observable<string> = route.params.map(p => p.id);\n * const url: Observable<string> = route.url.map(segments => segments.join(''));\n * // route.data includes both `data` and `resolve`\n * const user = route.data.map(d => d.user);\n * }\n * }\n * ```\n *\n *\n */\nvar ActivatedRoute = /** @class */ (function () {\n /** @internal */\n function ActivatedRoute(/** An observable of the URL segments matched by this route */\n url, /** An observable of the matrix parameters scoped to this route */\n params, /** An observable of the query parameters shared by all the routes */\n queryParams, /** An observable of the URL fragment shared by all the routes */\n fragment, /** An observable of the static and resolved data of this route. */\n data, /** The outlet name of the route. It's a constant */\n outlet, /** The component of the route. It's a constant */\n // TODO(vsavkin): remove |string\n component, futureSnapshot) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n }\n Object.defineProperty(ActivatedRoute.prototype, \"routeConfig\", {\n /** The configuration used to match this route */\n get: /** The configuration used to match this route */\n function () { return this._futureSnapshot.routeConfig; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"root\", {\n /** The root of the router state */\n get: /** The root of the router state */\n function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: /** The parent of this route in the router state tree */\n function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: /** The first child of this route in the router state tree */\n function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: /** The children of this route in the router state tree */\n function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: /** The path from the root of the router state tree to this route */\n function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = this.params.pipe(map(function (p) { return convertToParamMap(p); }));\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRoute.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap =\n this.queryParams.pipe(map(function (p) { return convertToParamMap(p); }));\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRoute.prototype.toString = function () {\n return this.snapshot ? this.snapshot.toString() : \"Future(\" + this._futureSnapshot + \")\";\n };\n return ActivatedRoute;\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 */\nfunction inheritedParamsDataResolve(route, paramsInheritanceStrategy) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n var pathFromRoot = route.pathFromRoot;\n var inheritingStartingFrom = 0;\n if (paramsInheritanceStrategy !== 'always') {\n inheritingStartingFrom = pathFromRoot.length - 1;\n while (inheritingStartingFrom >= 1) {\n var current = pathFromRoot[inheritingStartingFrom];\n var parent_1 = 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 // parent is componentless => current route should inherit its params and data\n }\n else if (!parent_1.component) {\n inheritingStartingFrom--;\n }\n else {\n break;\n }\n }\n }\n return flattenInherited(pathFromRoot.slice(inheritingStartingFrom));\n}\n/** @internal */\nfunction flattenInherited(pathFromRoot) {\n return pathFromRoot.reduce(function (res, curr) {\n var params = __assign({}, res.params, curr.params);\n var data = __assign({}, res.data, curr.data);\n var resolve = __assign({}, res.resolve, curr._resolvedData);\n return { params: params, data: data, resolve: resolve };\n }, { params: {}, data: {}, resolve: {} });\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 * ```\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 *\n */\nvar ActivatedRouteSnapshot = /** @class */ (function () {\n /** @internal */\n function ActivatedRouteSnapshot(/** The URL segments matched by this route */\n url, /** The matrix parameters scoped to this route */\n params, /** The query parameters shared by all the routes */\n queryParams, /** The URL fragment shared by all the routes */\n fragment, /** The static and resolved data of this route */\n data, /** The outlet name of the route */\n outlet, /** The component of the route */\n component, routeConfig, urlSegment, lastPathIndex, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._urlSegment = urlSegment;\n this._lastPathIndex = lastPathIndex;\n this._resolve = resolve;\n }\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"root\", {\n /** The root of the router state */\n get: /** The root of the router state */\n function () { return this._routerState.root; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"parent\", {\n /** The parent of this route in the router state tree */\n get: /** The parent of this route in the router state tree */\n function () { return this._routerState.parent(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"firstChild\", {\n /** The first child of this route in the router state tree */\n get: /** The first child of this route in the router state tree */\n function () { return this._routerState.firstChild(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"children\", {\n /** The children of this route in the router state tree */\n get: /** The children of this route in the router state tree */\n function () { return this._routerState.children(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"pathFromRoot\", {\n /** The path from the root of the router state tree to this route */\n get: /** The path from the root of the router state tree to this route */\n function () { return this._routerState.pathFromRoot(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"paramMap\", {\n get: function () {\n if (!this._paramMap) {\n this._paramMap = convertToParamMap(this.params);\n }\n return this._paramMap;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ActivatedRouteSnapshot.prototype, \"queryParamMap\", {\n get: function () {\n if (!this._queryParamMap) {\n this._queryParamMap = convertToParamMap(this.queryParams);\n }\n return this._queryParamMap;\n },\n enumerable: true,\n configurable: true\n });\n ActivatedRouteSnapshot.prototype.toString = function () {\n var url = this.url.map(function (segment) { return segment.toString(); }).join('/');\n var matched = this.routeConfig ? this.routeConfig.path : '';\n return \"Route(url:'\" + url + \"', path:'\" + matched + \"')\";\n };\n return ActivatedRouteSnapshot;\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 * ### Example\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 *\n */\nvar RouterStateSnapshot = /** @class */ (function (_super) {\n __extends(RouterStateSnapshot, _super);\n /** @internal */\n function RouterStateSnapshot(/** The url from which this snapshot was created */\n url, root) {\n var _this = _super.call(this, root) || this;\n _this.url = url;\n setRouterState(_this, root);\n return _this;\n }\n RouterStateSnapshot.prototype.toString = function () { return serializeNode(this._root); };\n return RouterStateSnapshot;\n}(Tree));\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(function (c) { return setRouterState(state, c); });\n}\nfunction serializeNode(node) {\n var c = node.children.length > 0 ? \" { \" + node.children.map(serializeNode).join(', ') + \" } \" : '';\n return \"\" + node.value + c;\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 */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n var currentSnapshot = route.snapshot;\n var nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParams.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragment.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.params.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.url.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.data.next(nextSnapshot.data);\n }\n }\n else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n // this is for resolved data\n route.data.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n var equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n var parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch &&\n (!a.parent || equalParamsAndUrlSegments(a.parent, (b.parent)));\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 createRouterState(routeReuseStrategy, curr, prevState) {\n var root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n var value = prevState.value;\n value._futureSnapshot = curr.value;\n var children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n }\n else {\n var detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle) {\n var tree = detachedRouteHandle.route;\n setFutureSnapshotsOfActivatedRoutes(curr, tree);\n return tree;\n }\n else {\n var value = createActivatedRoute(curr.value);\n var children = curr.children.map(function (c) { return createNode(routeReuseStrategy, c); });\n return new TreeNode(value, children);\n }\n }\n}\nfunction setFutureSnapshotsOfActivatedRoutes(curr, result) {\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 (var i = 0; i < curr.children.length; ++i) {\n setFutureSnapshotsOfActivatedRoutes(curr.children[i], result.children[i]);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(function (child) {\n try {\n for (var _a = __values(prevState.children), _b = _a.next(); !_b.done; _b = _a.next()) {\n var p = _b.value;\n if (routeReuseStrategy.shouldReuseRoute(p.value.snapshot, child.value)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_b && !_b.done && (_c = _a.return)) _c.call(_a);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return createNode(routeReuseStrategy, child);\n var e_1, _c;\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 createUrlTree(route, urlTree, commands, queryParams, fragment) {\n if (commands.length === 0) {\n return tree(urlTree.root, urlTree.root, urlTree, queryParams, fragment);\n }\n var nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(urlTree.root, new UrlSegmentGroup([], {}), urlTree, queryParams, fragment);\n }\n var startingPosition = findStartingPosition(nav, urlTree, route);\n var segmentGroup = startingPosition.processChildren ?\n updateSegmentGroupChildren(startingPosition.segmentGroup, startingPosition.index, nav.commands) :\n updateSegmentGroup(startingPosition.segmentGroup, startingPosition.index, nav.commands);\n return tree(startingPosition.segmentGroup, segmentGroup, urlTree, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\nfunction tree(oldSegmentGroup, newSegmentGroup, urlTree, queryParams, fragment) {\n var qp = {};\n if (queryParams) {\n forEach(queryParams, function (value, name) {\n qp[name] = Array.isArray(value) ? value.map(function (v) { return \"\" + v; }) : \"\" + value;\n });\n }\n if (urlTree.root === oldSegmentGroup) {\n return new UrlTree(newSegmentGroup, qp, fragment);\n }\n return new UrlTree(replaceSegment(urlTree.root, oldSegmentGroup, newSegmentGroup), qp, fragment);\n}\nfunction replaceSegment(current, oldSegment, newSegment) {\n var children = {};\n forEach(current.children, function (c, outletName) {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n }\n else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nvar Navigation = /** @class */ (function () {\n function Navigation(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new Error('Root segment cannot have matrix parameters');\n }\n var cmdWithOutlet = commands.find(function (c) { return typeof c === 'object' && c != null && c.outlets; });\n if (cmdWithOutlet && cmdWithOutlet !== last$1(commands)) {\n throw new Error('{outlets:{}} has to be the last command');\n }\n }\n Navigation.prototype.toRoot = function () {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n };\n return Navigation;\n}());\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n var numberOfDoubleDots = 0;\n var isAbsolute = false;\n var res = commands.reduce(function (res, cmd, cmdIdx) {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n var outlets_1 = {};\n forEach(cmd.outlets, function (commands, name) {\n outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return __spread(res, [{ outlets: outlets_1 }]);\n }\n if (cmd.segmentPath) {\n return __spread(res, [cmd.segmentPath]);\n }\n }\n if (!(typeof cmd === 'string')) {\n return __spread(res, [cmd]);\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach(function (urlPart, partIndex) {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n }\n else if (partIndex == 0 && urlPart === '') {\n // '/a'\n isAbsolute = true;\n }\n else if (urlPart === '..') {\n // '../a'\n numberOfDoubleDots++;\n }\n else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return __spread(res, [cmd]);\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nvar Position = /** @class */ (function () {\n function Position(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n return Position;\n}());\nfunction findStartingPosition(nav, tree, route) {\n if (nav.isAbsolute) {\n return new Position(tree.root, true, 0);\n }\n if (route.snapshot._lastPathIndex === -1) {\n return new Position(route.snapshot._urlSegment, true, 0);\n }\n var modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n var index = route.snapshot._lastPathIndex + modifier;\n return createPositionApplyingDoubleDots(route.snapshot._urlSegment, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n var g = group;\n var ci = index;\n var 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}\nfunction getPath(command) {\n if (typeof command === 'object' && command != null && command.outlets) {\n return command.outlets[PRIMARY_OUTLET];\n }\n return \"\" + command;\n}\nfunction getOutlets(commands) {\n if (!(typeof commands[0] === 'object'))\n return _a = {}, _a[PRIMARY_OUTLET] = commands, _a;\n if (commands[0].outlets === undefined)\n return _b = {}, _b[PRIMARY_OUTLET] = commands, _b;\n return commands[0].outlets;\n var _a, _b;\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n if (!segmentGroup) {\n segmentGroup = new UrlSegmentGroup([], {});\n }\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n var m = prefixedWith(segmentGroup, startIndex, commands);\n var slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n var 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 }\n else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n }\n else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n }\n else {\n var outlets_2 = getOutlets(commands);\n var children_1 = {};\n forEach(outlets_2, function (commands, outlet) {\n if (commands !== null) {\n children_1[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n forEach(segmentGroup.children, function (child, childOutlet) {\n if (outlets_2[childOutlet] === undefined) {\n children_1[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children_1);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n var currentCommandIndex = 0;\n var currentPathIndex = startIndex;\n var noMatch = { match: false, pathIndex: 0, commandIndex: 0 };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length)\n return noMatch;\n var path = segmentGroup.segments[currentPathIndex];\n var curr = getPath(commands[currentCommandIndex]);\n var next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined)\n break;\n if (curr && next && (typeof next === 'object') && next.outlets === undefined) {\n if (!compare(curr, next, path))\n return noMatch;\n currentCommandIndex += 2;\n }\n else {\n if (!compare(curr, {}, path))\n return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return { match: true, pathIndex: currentPathIndex, commandIndex: currentCommandIndex };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n var paths = segmentGroup.segments.slice(0, startIndex);\n var i = 0;\n while (i < commands.length) {\n if (typeof commands[i] === 'object' && commands[i].outlets !== undefined) {\n var children = createNewSegmentChildren(commands[i].outlets);\n return new UrlSegmentGroup(paths, children);\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 var p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, commands[0]));\n i++;\n continue;\n }\n var curr = getPath(commands[i]);\n var 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 }\n else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n var children = {};\n forEach(outlets, function (commands, outlet) {\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n var res = {};\n forEach(params, function (v, k) { return res[k] = \"\" + v; });\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 CanActivate = /** @class */ (function () {\n function CanActivate(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n return CanActivate;\n}());\nvar CanDeactivate = /** @class */ (function () {\n function CanDeactivate(component, route) {\n this.component = component;\n this.route = route;\n }\n return CanDeactivate;\n}());\n/**\n * This class bundles the actions involved in preactivation of a route.\n */\nvar PreActivation = /** @class */ (function () {\n function PreActivation(future, curr, moduleInjector, forwardEvent) {\n this.future = future;\n this.curr = curr;\n this.moduleInjector = moduleInjector;\n this.forwardEvent = forwardEvent;\n this.canActivateChecks = [];\n this.canDeactivateChecks = [];\n }\n PreActivation.prototype.initialize = function (parentContexts) {\n var futureRoot = this.future._root;\n var currRoot = this.curr ? this.curr._root : null;\n this.setupChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n };\n PreActivation.prototype.checkGuards = function () {\n var _this = this;\n if (!this.isDeactivating() && !this.isActivating()) {\n return of(true);\n }\n var canDeactivate$ = this.runCanDeactivateChecks();\n return canDeactivate$.pipe(mergeMap(function (canDeactivate) { return canDeactivate ? _this.runCanActivateChecks() : of(false); }));\n };\n PreActivation.prototype.resolveData = function (paramsInheritanceStrategy) {\n var _this = this;\n if (!this.isActivating())\n return of(null);\n return from(this.canActivateChecks)\n .pipe(concatMap(function (check) { return _this.runResolve(check.route, paramsInheritanceStrategy); }), reduce(function (_, __) { return _; }));\n };\n PreActivation.prototype.isDeactivating = function () { return this.canDeactivateChecks.length !== 0; };\n PreActivation.prototype.isActivating = function () { return this.canActivateChecks.length !== 0; };\n /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n PreActivation.prototype.setupChildRouteGuards = /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n function (futureNode, currNode, contexts, futurePath) {\n var _this = this;\n var prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(function (c) {\n _this.setupRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]));\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n forEach(prevChildren, function (v, k) {\n return _this.deactivateRouteAndItsChildren(v, contexts.getContext(k));\n });\n };\n /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n PreActivation.prototype.setupRouteGuards = /**\n * Iterates over child routes and calls recursive `setupRouteGuards` to get `this` instance in\n * proper state to run `checkGuards()` method.\n */\n function (futureNode, currNode, parentContexts, futurePath) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n var context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n var shouldRunGuardsAndResolvers = this.shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRunGuardsAndResolvers) {\n this.canActivateChecks.push(new CanActivate(futurePath));\n }\n else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n this.setupChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n this.setupChildRouteGuards(futureNode, currNode, parentContexts, futurePath);\n }\n if (shouldRunGuardsAndResolvers) {\n var outlet = (context.outlet);\n this.canDeactivateChecks.push(new CanDeactivate(outlet.component, curr));\n }\n }\n else {\n if (curr) {\n this.deactivateRouteAndItsChildren(currNode, context);\n }\n this.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n this.setupChildRouteGuards(futureNode, null, context ? context.children : null, futurePath);\n // if we have a componentless route, we recurse but keep the same outlet map.\n }\n else {\n this.setupChildRouteGuards(futureNode, null, parentContexts, futurePath);\n }\n }\n };\n PreActivation.prototype.shouldRunGuardsAndResolvers = function (curr, future, mode) {\n switch (mode) {\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) ||\n !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n };\n PreActivation.prototype.deactivateRouteAndItsChildren = function (route, context) {\n var _this = this;\n var children = nodeChildrenAsMap(route);\n var r = route.value;\n forEach(children, function (node, childName) {\n if (!r.component) {\n _this.deactivateRouteAndItsChildren(node, context);\n }\n else if (context) {\n _this.deactivateRouteAndItsChildren(node, context.children.getContext(childName));\n }\n else {\n _this.deactivateRouteAndItsChildren(node, null);\n }\n });\n if (!r.component) {\n this.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n else if (context && context.outlet && context.outlet.isActivated) {\n this.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n }\n else {\n this.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n };\n PreActivation.prototype.runCanDeactivateChecks = function () {\n var _this = this;\n return from(this.canDeactivateChecks)\n .pipe(mergeMap(function (check) { return _this.runCanDeactivate(check.component, check.route); }), every(function (result) { return result === true; }));\n };\n PreActivation.prototype.runCanActivateChecks = function () {\n var _this = this;\n return from(this.canActivateChecks)\n .pipe(concatMap(function (check) {\n return andObservables(from([\n _this.fireChildActivationStart(check.route.parent),\n _this.fireActivationStart(check.route), _this.runCanActivateChild(check.path),\n _this.runCanActivate(check.route)\n ]));\n }), every(function (result) { return result === true; }));\n // this.fireChildActivationStart(check.path),\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 */\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 */\n PreActivation.prototype.fireActivationStart = /**\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 */\n function (snapshot) {\n if (snapshot !== null && this.forwardEvent) {\n this.forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\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 */\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 */\n PreActivation.prototype.fireChildActivationStart = /**\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 */\n function (snapshot) {\n if (snapshot !== null && this.forwardEvent) {\n this.forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n };\n PreActivation.prototype.runCanActivate = function (future) {\n var _this = this;\n var canActivate = future.routeConfig ? future.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0)\n return of(true);\n var obs = from(canActivate).pipe(map(function (c) {\n var guard = _this.getToken(c, future);\n var observable;\n if (guard.canActivate) {\n observable = wrapIntoObservable(guard.canActivate(future, _this.future));\n }\n else {\n observable = wrapIntoObservable(guard(future, _this.future));\n }\n return observable.pipe(first());\n }));\n return andObservables(obs);\n };\n PreActivation.prototype.runCanActivateChild = function (path) {\n var _this = this;\n var future = path[path.length - 1];\n var canActivateChildGuards = path.slice(0, path.length - 1)\n .reverse()\n .map(function (p) { return _this.extractCanActivateChild(p); })\n .filter(function (_) { return _ !== null; });\n return andObservables(from(canActivateChildGuards).pipe(map(function (d) {\n var obs = from(d.guards).pipe(map(function (c) {\n var guard = _this.getToken(c, d.node);\n var observable;\n if (guard.canActivateChild) {\n observable = wrapIntoObservable(guard.canActivateChild(future, _this.future));\n }\n else {\n observable = wrapIntoObservable(guard(future, _this.future));\n }\n return observable.pipe(first());\n }));\n return andObservables(obs);\n })));\n };\n PreActivation.prototype.extractCanActivateChild = function (p) {\n var canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0)\n return null;\n return { node: p, guards: canActivateChild };\n };\n PreActivation.prototype.runCanDeactivate = function (component, curr) {\n var _this = this;\n var canDeactivate = curr && curr.routeConfig ? curr.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0)\n return of(true);\n var canDeactivate$ = from(canDeactivate).pipe(mergeMap(function (c) {\n var guard = _this.getToken(c, curr);\n var observable;\n if (guard.canDeactivate) {\n observable =\n wrapIntoObservable(guard.canDeactivate(component, curr, _this.curr, _this.future));\n }\n else {\n observable = wrapIntoObservable(guard(component, curr, _this.curr, _this.future));\n }\n return observable.pipe(first());\n }));\n return canDeactivate$.pipe(every(function (result) { return result === true; }));\n };\n PreActivation.prototype.runResolve = function (future, paramsInheritanceStrategy) {\n var resolve = future._resolve;\n return this.resolveNode(resolve, future).pipe(map(function (resolvedData) {\n future._resolvedData = resolvedData;\n future.data = __assign({}, future.data, inheritedParamsDataResolve(future, paramsInheritanceStrategy).resolve);\n return null;\n }));\n };\n PreActivation.prototype.resolveNode = function (resolve, future) {\n var _this = this;\n var keys = Object.keys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n if (keys.length === 1) {\n var key_1 = keys[0];\n return this.getResolver(resolve[key_1], future).pipe(map(function (value) {\n return _a = {}, _a[key_1] = value, _a;\n var _a;\n }));\n }\n var data = {};\n var runningResolvers$ = from(keys).pipe(mergeMap(function (key) {\n return _this.getResolver(resolve[key], future).pipe(map(function (value) {\n data[key] = value;\n return value;\n }));\n }));\n return runningResolvers$.pipe(last(), map(function () { return data; }));\n };\n PreActivation.prototype.getResolver = function (injectionToken, future) {\n var resolver = this.getToken(injectionToken, future);\n return resolver.resolve ? wrapIntoObservable(resolver.resolve(future, this.future)) :\n wrapIntoObservable(resolver(future, this.future));\n };\n PreActivation.prototype.getToken = function (token, snapshot) {\n var config = closestLoadedConfig(snapshot);\n var injector = config ? config.module.injector : this.moduleInjector;\n return injector.get(token);\n };\n return PreActivation;\n}());\nfunction closestLoadedConfig(snapshot) {\n if (!snapshot)\n return null;\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n }\n return null;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 NoMatch$1 = /** @class */ (function () {\n function NoMatch() {\n }\n return NoMatch;\n}());\nfunction recognize(rootComponentType, config, urlTree, url, paramsInheritanceStrategy) {\n if (paramsInheritanceStrategy === void 0) { paramsInheritanceStrategy = 'emptyOnly'; }\n return new Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy)\n .recognize();\n}\nvar Recognizer = /** @class */ (function () {\n function Recognizer(rootComponentType, config, urlTree, url, paramsInheritanceStrategy) {\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.url = url;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n }\n Recognizer.prototype.recognize = function () {\n try {\n var rootSegmentGroup = split$1(this.urlTree.root, [], [], this.config).segmentGroup;\n var children = this.processSegmentGroup(this.config, rootSegmentGroup, PRIMARY_OUTLET);\n var root = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze(this.urlTree.queryParams), (this.urlTree.fragment), {}, PRIMARY_OUTLET, this.rootComponentType, null, this.urlTree.root, -1, {});\n var rootNode = new TreeNode(root, children);\n var routeState = new RouterStateSnapshot(this.url, rootNode);\n this.inheritParamsAndData(routeState._root);\n return of(routeState);\n }\n catch (e) {\n return new Observable(function (obs) { return obs.error(e); });\n }\n };\n Recognizer.prototype.inheritParamsAndData = function (routeNode) {\n var _this = this;\n var route = routeNode.value;\n var i = inheritedParamsDataResolve(route, this.paramsInheritanceStrategy);\n route.params = Object.freeze(i.params);\n route.data = Object.freeze(i.data);\n routeNode.children.forEach(function (n) { return _this.inheritParamsAndData(n); });\n };\n Recognizer.prototype.processSegmentGroup = function (config, segmentGroup, outlet) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(config, segmentGroup);\n }\n return this.processSegment(config, segmentGroup, segmentGroup.segments, outlet);\n };\n Recognizer.prototype.processChildren = function (config, segmentGroup) {\n var _this = this;\n var children = mapChildrenIntoArray(segmentGroup, function (child, childOutlet) { return _this.processSegmentGroup(config, child, childOutlet); });\n checkOutletNameUniqueness(children);\n sortActivatedRouteSnapshots(children);\n return children;\n };\n Recognizer.prototype.processSegment = function (config, segmentGroup, segments, outlet) {\n try {\n for (var config_1 = __values(config), config_1_1 = config_1.next(); !config_1_1.done; config_1_1 = config_1.next()) {\n var r = config_1_1.value;\n try {\n return this.processSegmentAgainstRoute(r, segmentGroup, segments, outlet);\n }\n catch (e) {\n if (!(e instanceof NoMatch$1))\n throw e;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (config_1_1 && !config_1_1.done && (_a = config_1.return)) _a.call(config_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return [];\n }\n throw new NoMatch$1();\n var e_1, _a;\n };\n Recognizer.prototype.noLeftoversInUrl = function (segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n };\n Recognizer.prototype.processSegmentAgainstRoute = function (route, rawSegment, segments, outlet) {\n if (route.redirectTo)\n throw new NoMatch$1();\n if ((route.outlet || PRIMARY_OUTLET) !== outlet)\n throw new NoMatch$1();\n var snapshot;\n var consumedSegments = [];\n var rawSlicedSegments = [];\n if (route.path === '**') {\n var params = segments.length > 0 ? last$1(segments).parameters : {};\n snapshot = new ActivatedRouteSnapshot(segments, params, Object.freeze(this.urlTree.queryParams), (this.urlTree.fragment), getData(route), outlet, (route.component), route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + segments.length, getResolve(route));\n }\n else {\n var result = match$1(rawSegment, route, segments);\n consumedSegments = result.consumedSegments;\n rawSlicedSegments = segments.slice(result.lastChild);\n snapshot = new ActivatedRouteSnapshot(consumedSegments, result.parameters, Object.freeze(this.urlTree.queryParams), (this.urlTree.fragment), getData(route), outlet, (route.component), route, getSourceSegmentGroup(rawSegment), getPathIndexShift(rawSegment) + consumedSegments.length, getResolve(route));\n }\n var childConfig = getChildConfig(route);\n var _a = split$1(rawSegment, consumedSegments, rawSlicedSegments, childConfig), segmentGroup = _a.segmentGroup, slicedSegments = _a.slicedSegments;\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n var children_1 = this.processChildren(childConfig, segmentGroup);\n return [new TreeNode(snapshot, children_1)];\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return [new TreeNode(snapshot, [])];\n }\n var children = this.processSegment(childConfig, segmentGroup, slicedSegments, PRIMARY_OUTLET);\n return [new TreeNode(snapshot, children)];\n };\n return Recognizer;\n}());\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort(function (a, b) {\n if (a.value.outlet === PRIMARY_OUTLET)\n return -1;\n if (b.value.outlet === PRIMARY_OUTLET)\n return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction getChildConfig(route) {\n if (route.children) {\n return route.children;\n }\n if (route.loadChildren) {\n return route._loadedConfig.routes;\n }\n return [];\n}\nfunction match$1(segmentGroup, route, segments) {\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n throw new NoMatch$1();\n }\n return { consumedSegments: [], lastChild: 0, parameters: {} };\n }\n var matcher = route.matcher || defaultUrlMatcher;\n var res = matcher(segments, segmentGroup, route);\n if (!res)\n throw new NoMatch$1();\n var posParams = {};\n forEach((res.posParams), function (v, k) { posParams[k] = v.path; });\n var parameters = res.consumed.length > 0 ? __assign({}, posParams, res.consumed[res.consumed.length - 1].parameters) :\n posParams;\n return { consumedSegments: res.consumed, lastChild: res.consumed.length, parameters: parameters };\n}\nfunction checkOutletNameUniqueness(nodes) {\n var names = {};\n nodes.forEach(function (n) {\n var routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n var p = routeWithSameOutletName.url.map(function (s) { return s.toString(); }).join('/');\n var c = n.value.url.map(function (s) { return 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}\nfunction getSourceSegmentGroup(segmentGroup) {\n var s = segmentGroup;\n while (s._sourceSegment) {\n s = s._sourceSegment;\n }\n return s;\n}\nfunction getPathIndexShift(segmentGroup) {\n var s = segmentGroup;\n var 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}\nfunction split$1(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 &&\n containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n var s_1 = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(segmentGroup, consumedSegments, config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n s_1._sourceSegment = segmentGroup;\n s_1._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_1, slicedSegments: [] };\n }\n if (slicedSegments.length === 0 &&\n containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n var s_2 = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n s_2._sourceSegment = segmentGroup;\n s_2._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s_2, slicedSegments: slicedSegments };\n }\n var s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n return { segmentGroup: s, slicedSegments: slicedSegments };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n var res = {};\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var r = routes_1_1.value;\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet$1(r)]) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = segmentGroup.segments.length;\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return __assign({}, children, res);\n var e_2, _a;\n}\nfunction createChildrenForEmptyPaths(segmentGroup, consumedSegments, routes, primarySegment) {\n var res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n primarySegment._sourceSegment = segmentGroup;\n primarySegment._segmentIndexShift = consumedSegments.length;\n try {\n for (var routes_2 = __values(routes), routes_2_1 = routes_2.next(); !routes_2_1.done; routes_2_1 = routes_2.next()) {\n var r = routes_2_1.value;\n if (r.path === '' && getOutlet$1(r) !== PRIMARY_OUTLET) {\n var s = new UrlSegmentGroup([], {});\n s._sourceSegment = segmentGroup;\n s._segmentIndexShift = consumedSegments.length;\n res[getOutlet$1(r)] = s;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (routes_2_1 && !routes_2_1.done && (_a = routes_2.return)) _a.call(routes_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n return res;\n var e_3, _a;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet$1(r) !== PRIMARY_OUTLET; });\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(function (r) { return emptyPathMatch(segmentGroup, slicedSegments, r); });\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '' && r.redirectTo === undefined;\n}\nfunction getOutlet$1(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Provides a way to customize when activated routes get reused.\n *\n * @experimental\n */\nvar RouteReuseStrategy = /** @class */ (function () {\n function RouteReuseStrategy() {\n }\n return RouteReuseStrategy;\n}());\n/**\n * Does not detach any subtrees. Reuses routes as long as their route config is the same.\n */\nvar DefaultRouteReuseStrategy = /** @class */ (function () {\n function DefaultRouteReuseStrategy() {\n }\n DefaultRouteReuseStrategy.prototype.shouldDetach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.store = function (route, detachedTree) { };\n DefaultRouteReuseStrategy.prototype.shouldAttach = function (route) { return false; };\n DefaultRouteReuseStrategy.prototype.retrieve = function (route) { return null; };\n DefaultRouteReuseStrategy.prototype.shouldReuseRoute = function (future, curr) {\n return future.routeConfig === curr.routeConfig;\n };\n return DefaultRouteReuseStrategy;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @docsNotRequired\n * @experimental\n */\nvar ROUTES = new InjectionToken('ROUTES');\nvar RouterConfigLoader = /** @class */ (function () {\n function RouterConfigLoader(loader, compiler, onLoadStartListener, onLoadEndListener) {\n this.loader = loader;\n this.compiler = compiler;\n this.onLoadStartListener = onLoadStartListener;\n this.onLoadEndListener = onLoadEndListener;\n }\n RouterConfigLoader.prototype.load = function (parentInjector, route) {\n var _this = this;\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n var moduleFactory$ = this.loadModuleFactory((route.loadChildren));\n return moduleFactory$.pipe(map(function (factory) {\n if (_this.onLoadEndListener) {\n _this.onLoadEndListener(route);\n }\n var module = factory.create(parentInjector);\n return new LoadedRouterConfig(flatten(module.injector.get(ROUTES)).map(copyConfig), module);\n }));\n };\n RouterConfigLoader.prototype.loadModuleFactory = function (loadChildren) {\n var _this = this;\n if (typeof loadChildren === 'string') {\n return from(this.loader.load(loadChildren));\n }\n else {\n return wrapIntoObservable(loadChildren()).pipe(mergeMap(function (t) {\n if (t instanceof NgModuleFactory) {\n return of(t);\n }\n else {\n return from(_this.compiler.compileModuleAsync(t));\n }\n }));\n }\n };\n return RouterConfigLoader;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Provides a way to migrate AngularJS applications to Angular.\n *\n * @experimental\n */\nvar UrlHandlingStrategy = /** @class */ (function () {\n function UrlHandlingStrategy() {\n }\n return UrlHandlingStrategy;\n}());\n/**\n * @experimental\n */\nvar DefaultUrlHandlingStrategy = /** @class */ (function () {\n function DefaultUrlHandlingStrategy() {\n }\n DefaultUrlHandlingStrategy.prototype.shouldProcessUrl = function (url) { return true; };\n DefaultUrlHandlingStrategy.prototype.extract = function (url) { return url; };\n DefaultUrlHandlingStrategy.prototype.merge = function (newUrlPart, wholeUrl) { return newUrlPart; };\n return DefaultUrlHandlingStrategy;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this 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 defaultErrorHandler(error) {\n throw error;\n}\n/**\n * @internal\n */\nfunction defaultRouterHook(snapshot) {\n return of(null);\n}\n/**\n * @description\n *\n * Provides the navigation and url manipulation capabilities.\n *\n * See `Routes` for more details and examples.\n *\n * @ngModule RouterModule\n *\n *\n */\nvar Router = /** @class */ (function () {\n /**\n * Creates the router service.\n */\n // TODO: vsavkin make internal after the final is out.\n function Router(rootComponentType, urlSerializer, rootContexts, location, injector, loader, compiler, config) {\n var _this = this;\n this.rootComponentType = rootComponentType;\n this.urlSerializer = urlSerializer;\n this.rootContexts = rootContexts;\n this.location = location;\n this.config = config;\n this.navigations = new BehaviorSubject((null));\n this.navigationId = 0;\n this.events = new Subject();\n /**\n * Error handler that is invoked when a navigation errors.\n *\n * See `ErrorHandler` for more information.\n */\n this.errorHandler = defaultErrorHandler;\n /**\n * Indicates if at least one navigation happened.\n */\n this.navigated = false;\n this.lastSuccessfulId = -1;\n /**\n * Used by RouterModule. This allows us to\n * pause the navigation either before preactivation or after it.\n * @internal\n */\n this.hooks = {\n beforePreactivation: defaultRouterHook,\n afterPreactivation: defaultRouterHook\n };\n /**\n * Extracts and merges URLs. Used for AngularJS to Angular migrations.\n */\n this.urlHandlingStrategy = new DefaultUrlHandlingStrategy();\n this.routeReuseStrategy = new DefaultRouteReuseStrategy();\n /**\n * Define what the router should do if it receives a navigation request to the current URL.\n * By default, the router will ignore this navigation. However, this prevents features such\n * as a \"refresh\" button. Use this option to configure the behavior when navigating to the\n * current URL. Default is 'ignore'.\n */\n this.onSameUrlNavigation = 'ignore';\n /**\n * Defines how the router merges params, data and resolved data from parent to child\n * routes. Available options are:\n *\n * - `'emptyOnly'`, the default, only inherits parent params for path-less or component-less\n * routes.\n * - `'always'`, enables unconditional inheritance of parent params.\n */\n this.paramsInheritanceStrategy = 'emptyOnly';\n var onLoadStart = function (r) { return _this.triggerEvent(new RouteConfigLoadStart(r)); };\n var onLoadEnd = function (r) { return _this.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.ngModule = injector.get(NgModuleRef);\n this.resetConfig(config);\n this.currentUrlTree = createEmptyUrlTree();\n this.rawUrlTree = this.currentUrlTree;\n this.configLoader = new RouterConfigLoader(loader, compiler, onLoadStart, onLoadEnd);\n this.routerState = createEmptyState(this.currentUrlTree, this.rootComponentType);\n this.processNavigations();\n }\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n Router.prototype.resetRootComponentType = /**\n * @internal\n * TODO: this should be removed once the constructor of the router made internal\n */\n function (rootComponentType) {\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 * Sets up the location change listener and performs the initial navigation.\n */\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n Router.prototype.initialNavigation = /**\n * Sets up the location change listener and performs the initial navigation.\n */\n function () {\n this.setUpLocationChangeListener();\n if (this.navigationId === 0) {\n this.navigateByUrl(this.location.path(true), { replaceUrl: true });\n }\n };\n /**\n * Sets up the location change listener.\n */\n /**\n * Sets up the location change listener.\n */\n Router.prototype.setUpLocationChangeListener = /**\n * Sets up the location change listener.\n */\n function () {\n var _this = this;\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(function (change) {\n var rawUrlTree = _this.urlSerializer.parse(change['url']);\n var source = change['type'] === 'popstate' ? 'popstate' : 'hashchange';\n var state = change.state && change.state.navigationId ?\n { navigationId: change.state.navigationId } :\n null;\n setTimeout(function () { _this.scheduleNavigation(rawUrlTree, source, state, { replaceUrl: true }); }, 0);\n });\n }\n };\n Object.defineProperty(Router.prototype, \"url\", {\n /** The current url */\n get: /** The current url */\n function () { return this.serializeUrl(this.currentUrlTree); },\n enumerable: true,\n configurable: true\n });\n /** @internal */\n /** @internal */\n Router.prototype.triggerEvent = /** @internal */\n function (e) { this.events.next(e); };\n /**\n * Resets the configuration used for navigation and generating links.\n *\n * ### Usage\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 /**\n * Resets the configuration used for navigation and generating links.\n *\n * ### Usage\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 Router.prototype.resetConfig = /**\n * Resets the configuration used for navigation and generating links.\n *\n * ### Usage\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 function (config) {\n validateConfig(config);\n this.config = config.map(copyConfig);\n this.navigated = false;\n this.lastSuccessfulId = -1;\n };\n /** @docsNotRequired */\n /** @docsNotRequired */\n Router.prototype.ngOnDestroy = /** @docsNotRequired */\n function () { this.dispose(); };\n /** Disposes of the router */\n /** Disposes of the router */\n Router.prototype.dispose = /** Disposes of the router */\n function () {\n if (this.locationSubscription) {\n this.locationSubscription.unsubscribe();\n this.locationSubscription = (null);\n }\n };\n /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * ### Usage\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, you\n * // can do the following:\n *\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 /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * ### Usage\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, you\n * // can do the following:\n *\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 Router.prototype.createUrlTree = /**\n * Applies an array of commands to the current url tree and creates a new url tree.\n *\n * When given an activate route, applies the given commands starting from the route.\n * When not given a route, applies the given command starting from the root.\n *\n * ### Usage\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, you\n * // can do the following:\n *\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 function (commands, navigationExtras) {\n if (navigationExtras === void 0) { navigationExtras = {}; }\n var relativeTo = navigationExtras.relativeTo, queryParams = navigationExtras.queryParams, fragment = navigationExtras.fragment, preserveQueryParams = navigationExtras.preserveQueryParams, queryParamsHandling = navigationExtras.queryParamsHandling, preserveFragment = navigationExtras.preserveFragment;\n if (isDevMode() && preserveQueryParams && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n var a = relativeTo || this.routerState.root;\n var f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n var q = null;\n if (queryParamsHandling) {\n switch (queryParamsHandling) {\n case 'merge':\n q = __assign({}, this.currentUrlTree.queryParams, queryParams);\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\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 * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\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 * In opposite to `navigate`, `navigateByUrl` takes a whole URL\n * and does not apply any delta to the current one.\n */\n /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\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 * In opposite to `navigate`, `navigateByUrl` takes a whole URL\n * and does not apply any delta to the current one.\n */\n Router.prototype.navigateByUrl = /**\n * Navigate based on the provided url. This navigation is always absolute.\n *\n * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\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 * In opposite to `navigate`, `navigateByUrl` takes a whole URL\n * and does not apply any delta to the current one.\n */\n function (url, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n var urlTree = url instanceof UrlTree ? url : this.parseUrl(url);\n var mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, 'imperative', null, extras);\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 * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current\n * URL.\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 * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current\n * URL.\n */\n Router.prototype.navigate = /**\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 * Returns a promise that:\n * - resolves to 'true' when navigation succeeds,\n * - resolves to 'false' when navigation fails,\n * - is rejected when an error happens.\n *\n * ### Usage\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * In opposite to `navigateByUrl`, `navigate` always takes a delta that is applied to the current\n * URL.\n */\n function (commands, extras) {\n if (extras === void 0) { extras = { skipLocationChange: false }; }\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n };\n /** Serializes a `UrlTree` into a string */\n /** Serializes a `UrlTree` into a string */\n Router.prototype.serializeUrl = /** Serializes a `UrlTree` into a string */\n function (url) { return this.urlSerializer.serialize(url); };\n /** Parses a string into a `UrlTree` */\n /** Parses a string into a `UrlTree` */\n Router.prototype.parseUrl = /** Parses a string into a `UrlTree` */\n function (url) { return this.urlSerializer.parse(url); };\n /** Returns whether the url is activated */\n /** Returns whether the url is activated */\n Router.prototype.isActive = /** Returns whether the url is activated */\n function (url, exact) {\n if (url instanceof UrlTree) {\n return containsTree(this.currentUrlTree, url, exact);\n }\n var urlTree = this.urlSerializer.parse(url);\n return containsTree(this.currentUrlTree, urlTree, exact);\n };\n Router.prototype.removeEmptyProps = function (params) {\n return Object.keys(params).reduce(function (result, key) {\n var value = params[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n };\n Router.prototype.processNavigations = function () {\n var _this = this;\n this.navigations\n .pipe(concatMap(function (nav) {\n if (nav) {\n _this.executeScheduledNavigation(nav);\n // a failed navigation should not stop the router from processing\n // further navigations => the catch\n return nav.promise.catch(function () { });\n }\n else {\n return of(null);\n }\n }))\n .subscribe(function () { });\n };\n Router.prototype.scheduleNavigation = function (rawUrl, source, state, extras) {\n var lastNavigation = this.navigations.value;\n // If the user triggers a navigation imperatively (e.g., by using navigateByUrl),\n // and that navigation results in 'replaceState' that leads to the same URL,\n // we should skip those.\n if (lastNavigation && source !== 'imperative' && lastNavigation.source === 'imperative' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a popstate was emitted first.\n if (lastNavigation && source == 'hashchange' && lastNavigation.source === 'popstate' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n // Because of a bug in IE and Edge, the location class fires two events (popstate and\n // hashchange) every single time. The second one should be ignored. Otherwise, the URL will\n // flicker. Handles the case when a hashchange was emitted first.\n if (lastNavigation && source == 'popstate' && lastNavigation.source === 'hashchange' &&\n lastNavigation.rawUrl.toString() === rawUrl.toString()) {\n return Promise.resolve(true); // return value is not used\n }\n var resolve = null;\n var reject = null;\n var promise = new Promise(function (res, rej) {\n resolve = res;\n reject = rej;\n });\n var id = ++this.navigationId;\n this.navigations.next({ id: id, source: source, state: state, rawUrl: rawUrl, extras: extras, resolve: resolve, reject: reject, promise: promise });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(function (e) { return Promise.reject(e); });\n };\n Router.prototype.executeScheduledNavigation = function (_a) {\n var _this = this;\n var id = _a.id, rawUrl = _a.rawUrl, extras = _a.extras, resolve = _a.resolve, reject = _a.reject, source = _a.source, state = _a.state;\n var url = this.urlHandlingStrategy.extract(rawUrl);\n var urlTransition = !this.navigated || url.toString() !== this.currentUrlTree.toString();\n if ((this.onSameUrlNavigation === 'reload' ? true : urlTransition) &&\n this.urlHandlingStrategy.shouldProcessUrl(rawUrl)) {\n this.events\n .next(new NavigationStart(id, this.serializeUrl(url), source, state));\n Promise.resolve()\n .then(function (_) {\n return _this.runNavigate(url, rawUrl, !!extras.skipLocationChange, !!extras.replaceUrl, id, null);\n })\n .then(resolve, reject);\n // we cannot process the current URL, but we could process the previous one =>\n // we need to do some cleanup\n }\n else if (urlTransition && this.rawUrlTree &&\n this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)) {\n this.events\n .next(new NavigationStart(id, this.serializeUrl(url), source, state));\n Promise.resolve()\n .then(function (_) {\n return _this.runNavigate(url, rawUrl, false, false, id, createEmptyState(url, _this.rootComponentType).snapshot);\n })\n .then(resolve, reject);\n }\n else {\n this.rawUrlTree = rawUrl;\n resolve(null);\n }\n };\n Router.prototype.runNavigate = function (url, rawUrl, skipLocationChange, replaceUrl, id, precreatedState) {\n var _this = this;\n if (id !== this.navigationId) {\n this.events\n .next(new NavigationCancel(id, this.serializeUrl(url), \"Navigation ID \" + id + \" is not equal to the current navigation id \" + this.navigationId));\n return Promise.resolve(false);\n }\n return new Promise(function (resolvePromise, rejectPromise) {\n // create an observable of the url and route state snapshot\n // this operation do not result in any side effects\n var urlAndSnapshot$;\n if (!precreatedState) {\n var moduleInjector = _this.ngModule.injector;\n var redirectsApplied$ = applyRedirects(moduleInjector, _this.configLoader, _this.urlSerializer, url, _this.config);\n urlAndSnapshot$ = redirectsApplied$.pipe(mergeMap(function (appliedUrl) {\n return recognize(_this.rootComponentType, _this.config, appliedUrl, _this.serializeUrl(appliedUrl), _this.paramsInheritanceStrategy)\n .pipe(map(function (snapshot) {\n _this.events\n .next(new RoutesRecognized(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl), snapshot));\n return { appliedUrl: appliedUrl, snapshot: snapshot };\n }));\n }));\n }\n else {\n urlAndSnapshot$ = of({ appliedUrl: url, snapshot: precreatedState });\n }\n var beforePreactivationDone$ = urlAndSnapshot$.pipe(mergeMap(function (p) {\n if (typeof p === 'boolean')\n return of(p);\n return _this.hooks.beforePreactivation(p.snapshot).pipe(map(function () { return p; }));\n }));\n // run preactivation: guards and data resolvers\n var preActivation;\n var preactivationSetup$ = beforePreactivationDone$.pipe(map(function (p) {\n if (typeof p === 'boolean')\n return p;\n var appliedUrl = p.appliedUrl, snapshot = p.snapshot;\n var moduleInjector = _this.ngModule.injector;\n preActivation = new PreActivation(snapshot, _this.routerState.snapshot, moduleInjector, function (evt) { return _this.triggerEvent(evt); });\n preActivation.initialize(_this.rootContexts);\n return { appliedUrl: appliedUrl, snapshot: snapshot };\n }));\n var preactivationCheckGuards$ = preactivationSetup$.pipe(mergeMap(function (p) {\n if (typeof p === 'boolean' || _this.navigationId !== id)\n return of(false);\n var appliedUrl = p.appliedUrl, snapshot = p.snapshot;\n _this.triggerEvent(new GuardsCheckStart(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl), snapshot));\n return preActivation.checkGuards().pipe(map(function (shouldActivate) {\n _this.triggerEvent(new GuardsCheckEnd(id, _this.serializeUrl(url), _this.serializeUrl(appliedUrl), snapshot, shouldActivate));\n return { appliedUrl: appliedUrl, snapshot: snapshot, shouldActivate: shouldActivate };\n }));\n }));\n var preactivationResolveData$ = preactivationCheckGuards$.pipe(mergeMap(function (p) {\n if (typeof p === 'boolean' || _this.navigationId !== id)\n return of(false);\n if (p.shouldActivate && preActivation.isActivating()) {\n _this.triggerEvent(new ResolveStart(id, _this.serializeUrl(url), _this.serializeUrl(p.appliedUrl), p.snapshot));\n return preActivation.resolveData(_this.paramsInheritanceStrategy).pipe(map(function () {\n _this.triggerEvent(new ResolveEnd(id, _this.serializeUrl(url), _this.serializeUrl(p.appliedUrl), p.snapshot));\n return p;\n }));\n }\n else {\n return of(p);\n }\n }));\n var preactivationDone$ = preactivationResolveData$.pipe(mergeMap(function (p) {\n if (typeof p === 'boolean' || _this.navigationId !== id)\n return of(false);\n return _this.hooks.afterPreactivation(p.snapshot).pipe(map(function () { return p; }));\n }));\n // create router state\n // this operation has side effects => route state is being affected\n var routerState$ = preactivationDone$.pipe(map(function (p) {\n if (typeof p === 'boolean' || _this.navigationId !== id)\n return false;\n var appliedUrl = p.appliedUrl, snapshot = p.snapshot, shouldActivate = p.shouldActivate;\n if (shouldActivate) {\n var state = createRouterState(_this.routeReuseStrategy, snapshot, _this.routerState);\n return { appliedUrl: appliedUrl, state: state, shouldActivate: shouldActivate };\n }\n else {\n return { appliedUrl: appliedUrl, state: null, shouldActivate: shouldActivate };\n }\n }));\n _this.activateRoutes(routerState$, _this.routerState, _this.currentUrlTree, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise);\n });\n };\n /**\n * Performs the logic of activating routes. This is a synchronous process by default. While this\n * is a private method, it could be overridden to make activation asynchronous.\n */\n /**\n * Performs the logic of activating routes. This is a synchronous process by default. While this\n * is a private method, it could be overridden to make activation asynchronous.\n */\n Router.prototype.activateRoutes = /**\n * Performs the logic of activating routes. This is a synchronous process by default. While this\n * is a private method, it could be overridden to make activation asynchronous.\n */\n function (state, storedState, storedUrl, id, url, rawUrl, skipLocationChange, replaceUrl, resolvePromise, rejectPromise) {\n var _this = this;\n // applied the new router state\n // this operation has side effects\n var navigationIsSuccessful;\n state\n .forEach(function (p) {\n if (typeof p === 'boolean' || !p.shouldActivate || id !== _this.navigationId || !p.state) {\n navigationIsSuccessful = false;\n return;\n }\n var appliedUrl = p.appliedUrl, state = p.state;\n _this.currentUrlTree = appliedUrl;\n _this.rawUrlTree = _this.urlHandlingStrategy.merge(_this.currentUrlTree, rawUrl);\n _this.routerState = state;\n if (!skipLocationChange) {\n var path = _this.urlSerializer.serialize(_this.rawUrlTree);\n if (_this.location.isCurrentPathEqualTo(path) || replaceUrl) {\n _this.location.replaceState(path, '', { navigationId: id });\n }\n else {\n _this.location.go(path, '', { navigationId: id });\n }\n }\n new ActivateRoutes(_this.routeReuseStrategy, state, storedState, function (evt) { return _this.triggerEvent(evt); })\n .activate(_this.rootContexts);\n navigationIsSuccessful = true;\n })\n .then(function () {\n if (navigationIsSuccessful) {\n _this.navigated = true;\n _this.lastSuccessfulId = id;\n _this.events\n .next(new NavigationEnd(id, _this.serializeUrl(url), _this.serializeUrl(_this.currentUrlTree)));\n resolvePromise(true);\n }\n else {\n _this.resetUrlToCurrentUrlTree();\n _this.events\n .next(new NavigationCancel(id, _this.serializeUrl(url), ''));\n resolvePromise(false);\n }\n }, function (e) {\n if (isNavigationCancelingError(e)) {\n _this.navigated = true;\n _this.resetStateAndUrl(storedState, storedUrl, rawUrl);\n _this.events\n .next(new NavigationCancel(id, _this.serializeUrl(url), e.message));\n resolvePromise(false);\n }\n else {\n _this.resetStateAndUrl(storedState, storedUrl, rawUrl);\n _this.events\n .next(new NavigationError(id, _this.serializeUrl(url), e));\n try {\n resolvePromise(_this.errorHandler(e));\n }\n catch (ee) {\n rejectPromise(ee);\n }\n }\n });\n };\n Router.prototype.resetStateAndUrl = function (storedState, storedUrl, rawUrl) {\n this.routerState = storedState;\n this.currentUrlTree = storedUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, rawUrl);\n this.resetUrlToCurrentUrlTree();\n };\n Router.prototype.resetUrlToCurrentUrlTree = function () {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', { navigationId: this.lastSuccessfulId });\n };\n return Router;\n}());\nvar ActivateRoutes = /** @class */ (function () {\n function ActivateRoutes(routeReuseStrategy, futureState, currState, forwardEvent) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n }\n ActivateRoutes.prototype.activate = function (parentContexts) {\n var futureRoot = this.futureState._root;\n var currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n };\n // De-activate the child route that are not re-used for the future state\n // De-activate the child route that are not re-used for the future state\n ActivateRoutes.prototype.deactivateChildRoutes = \n // De-activate the child route that are not re-used for the future state\n function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(function (futureChild) {\n var childOutletName = futureChild.value.outlet;\n _this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n forEach(children, function (v, childName) {\n _this.deactivateRouteAndItsChildren(v, contexts);\n });\n };\n ActivateRoutes.prototype.deactivateRoutes = function (futureNode, currNode, parentContext) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\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 var context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\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 }\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 ActivateRoutes.prototype.deactivateRouteAndItsChildren = function (route, parentContexts) {\n if (this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n }\n else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n };\n ActivateRoutes.prototype.detachAndStoreRouteSubtree = function (route, parentContexts) {\n var context = parentContexts.getContext(route.value.outlet);\n if (context && context.outlet) {\n var componentRef = context.outlet.detach();\n var contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, { componentRef: componentRef, route: route, contexts: contexts });\n }\n };\n ActivateRoutes.prototype.deactivateRouteAndOutlet = function (route, parentContexts) {\n var _this = this;\n var context = parentContexts.getContext(route.value.outlet);\n if (context) {\n var children = nodeChildrenAsMap(route);\n var contexts_1 = route.value.component ? context.children : parentContexts;\n forEach(children, function (v, k) { return _this.deactivateRouteAndItsChildren(v, contexts_1); });\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 ActivateRoutes.prototype.activateChildRoutes = function (futureNode, currNode, contexts) {\n var _this = this;\n var children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(function (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 ActivateRoutes.prototype.activateRoutes = function (futureNode, currNode, parentContexts) {\n var future = futureNode.value;\n var curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\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 var context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n }\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 }\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 var context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n var stored = 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 }\n else {\n var config = parentLoadedConfig(future.snapshot);\n var cmpFactoryResolver = config ? config.module.componentFactoryResolver : 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 }\n this.activateChildRoutes(futureNode, null, context.children);\n }\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 return ActivateRoutes;\n}());\nfunction advanceActivatedRouteNodeAndItsChildren(node) {\n advanceActivatedRoute(node.value);\n node.children.forEach(advanceActivatedRouteNodeAndItsChildren);\n}\nfunction parentLoadedConfig(snapshot) {\n for (var s = snapshot.parent; s; s = s.parent) {\n var route = s.routeConfig;\n if (route && route._loadedConfig)\n return route._loadedConfig;\n if (route && route.component)\n return null;\n }\n return null;\n}\nfunction validateCommands(commands) {\n for (var i = 0; i < commands.length; i++) {\n var 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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Lets you link to specific routes in your app.\n *\n * Consider the following route configuration:\n * `[{ path: 'user/:name', component: UserCmp }]`.\n * When linking to this `user/:name` route, you use the `RouterLink` directive.\n *\n * If the link is static, you can use the directive as follows:\n * `<a routerLink=\"/user/bob\">link to user component</a>`\n *\n * If you use dynamic values to generate the link, you can pass an array of path\n * segments, followed by the params for each segment.\n *\n * For instance `['/team', teamId, 'user', userName, {details: true}]`\n * means that we want to generate a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one\n * (e.g., `['/team/11/user', userName, {details: true}]`).\n *\n * The first segment name can be prepended with `/`, `./`, or `../`:\n * * If the first segment begins with `/`, the router will look 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 will\n * instead look in the children of the current activated route.\n * * And if the first segment begins with `../`, the router will go up one level.\n *\n * You can set query params and fragment as follows:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" fragment=\"education\">\n * link to user component\n * </a>\n * ```\n * RouterLink will use these to generate this link: `/user/bob#education?debug=true`.\n *\n * (Deprecated in v4.0.0 use `queryParamsHandling` instead) You can also tell the\n * directive to preserve the current query params and fragment:\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" preserveQueryParams preserveFragment>\n * link to user component\n * </a>\n * ```\n *\n * You can tell the directive to how to handle queryParams, available options are:\n * - `'merge'`: merge the queryParams into the current queryParams\n * - `'preserve'`: preserve the current queryParams\n * - default/`''`: use the queryParams only\n *\n * Same options for {@link NavigationExtras#queryParamsHandling\n * NavigationExtras#queryParamsHandling}.\n *\n * ```\n * <a [routerLink]=\"['/user/bob']\" [queryParams]=\"{debug: true}\" queryParamsHandling=\"merge\">\n * link to user component\n * </a>\n * ```\n *\n * The router link directive always treats the provided input as a delta to the current url.\n *\n * For instance, if the current url is `/user/(box//aux:team)`.\n *\n * Then the following link `<a [routerLink]=\"['/user/jim']\">Jim</a>` will generate the link\n * `/user/(jim//aux:team)`.\n *\n * See {@link Router#createUrlTree createUrlTree} for more information.\n *\n * @ngModule RouterModule\n *\n *\n */\nvar RouterLink = /** @class */ (function () {\n function RouterLink(router, route, tabIndex, renderer, el) {\n this.router = router;\n this.route = route;\n this.commands = [];\n if (tabIndex == null) {\n renderer.setAttribute(el.nativeElement, 'tabindex', '0');\n }\n }\n Object.defineProperty(RouterLink.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLink.prototype, \"preserveQueryParams\", {\n set: /**\n * @deprecated 4.0.0 use `queryParamsHandling` instead.\n */\n function (value) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated!, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLink.prototype.onClick = function () {\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return true;\n };\n Object.defineProperty(RouterLink.prototype, \"urlTree\", {\n get: function () {\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 enumerable: true,\n configurable: true\n });\n RouterLink.decorators = [\n { type: Directive, args: [{ selector: ':not(a)[routerLink]' },] }\n ];\n /** @nocollapse */\n RouterLink.ctorParameters = function () { return [\n { type: Router, },\n { type: ActivatedRoute, },\n { type: undefined, decorators: [{ type: Attribute, args: ['tabindex',] },] },\n { type: Renderer2, },\n { type: ElementRef, },\n ]; };\n RouterLink.propDecorators = {\n \"queryParams\": [{ type: Input },],\n \"fragment\": [{ type: Input },],\n \"queryParamsHandling\": [{ type: Input },],\n \"preserveFragment\": [{ type: Input },],\n \"skipLocationChange\": [{ type: Input },],\n \"replaceUrl\": [{ type: Input },],\n \"routerLink\": [{ type: Input },],\n \"preserveQueryParams\": [{ type: Input },],\n \"onClick\": [{ type: HostListener, args: ['click',] },],\n };\n return RouterLink;\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 *\n */\nvar RouterLinkWithHref = /** @class */ (function () {\n function RouterLinkWithHref(router, route, locationStrategy) {\n var _this = this;\n this.router = router;\n this.route = route;\n this.locationStrategy = locationStrategy;\n this.commands = [];\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.updateTargetUrlAndHref();\n }\n });\n }\n Object.defineProperty(RouterLinkWithHref.prototype, \"routerLink\", {\n set: function (commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n }\n else {\n this.commands = [];\n }\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterLinkWithHref.prototype, \"preserveQueryParams\", {\n set: function (value) {\n if (isDevMode() && console && console.warn) {\n console.warn('preserveQueryParams is deprecated, use queryParamsHandling instead.');\n }\n this.preserve = value;\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkWithHref.prototype.ngOnChanges = function (changes) { this.updateTargetUrlAndHref(); };\n RouterLinkWithHref.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkWithHref.prototype.onClick = function (button, ctrlKey, metaKey, shiftKey) {\n if (button !== 0 || ctrlKey || metaKey || shiftKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n var extras = {\n skipLocationChange: attrBoolValue(this.skipLocationChange),\n replaceUrl: attrBoolValue(this.replaceUrl),\n };\n this.router.navigateByUrl(this.urlTree, extras);\n return false;\n };\n RouterLinkWithHref.prototype.updateTargetUrlAndHref = function () {\n this.href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree));\n };\n Object.defineProperty(RouterLinkWithHref.prototype, \"urlTree\", {\n get: function () {\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 enumerable: true,\n configurable: true\n });\n RouterLinkWithHref.decorators = [\n { type: Directive, args: [{ selector: 'a[routerLink]' },] }\n ];\n /** @nocollapse */\n RouterLinkWithHref.ctorParameters = function () { return [\n { type: Router, },\n { type: ActivatedRoute, },\n { type: LocationStrategy, },\n ]; };\n RouterLinkWithHref.propDecorators = {\n \"target\": [{ type: HostBinding, args: ['attr.target',] }, { type: Input },],\n \"queryParams\": [{ type: Input },],\n \"fragment\": [{ type: Input },],\n \"queryParamsHandling\": [{ type: Input },],\n \"preserveFragment\": [{ type: Input },],\n \"skipLocationChange\": [{ type: Input },],\n \"replaceUrl\": [{ type: Input },],\n \"href\": [{ type: HostBinding },],\n \"routerLink\": [{ type: Input },],\n \"preserveQueryParams\": [{ type: Input },],\n \"onClick\": [{ type: HostListener, args: ['click', ['$event.button', '$event.ctrlKey', '$event.metaKey', '$event.shiftKey'],] },],\n };\n return RouterLinkWithHref;\n}());\nfunction attrBoolValue(s) {\n return s === '' || !!s;\n}\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * @description\n *\n * Lets you add a CSS class to an element when the link's route becomes active.\n *\n * This directive lets you add a CSS class to an element when the link's route\n * becomes active.\n *\n * Consider the following example:\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\">Bob</a>\n * ```\n *\n * When the url is either '/user' or '/user/bob', the active-link class will\n * be added to the `a` tag. If the url changes, the class will be removed.\n *\n * You can set more than one class, as follows:\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 * You can configure RouterLinkActive by passing `exact: true`. This will add the classes\n * only when the url matches the link exactly.\n *\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive=\"active-link\" [routerLinkActiveOptions]=\"{exact:\n * true}\">Bob</a>\n * ```\n *\n * You can assign the RouterLinkActive instance to a template variable and directly check\n * the `isActive` status.\n * ```\n * <a routerLink=\"/user/bob\" routerLinkActive #rla=\"routerLinkActive\">\n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * </a>\n * ```\n *\n * Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.\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 * This will set the active-link class on the div tag if the url is either '/user/jim' or\n * '/user/bob'.\n *\n * @ngModule RouterModule\n *\n *\n */\nvar RouterLinkActive = /** @class */ (function () {\n function RouterLinkActive(router, element, renderer, cdr) {\n var _this = this;\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.classes = [];\n this.isActive = false;\n this.routerLinkActiveOptions = { exact: false };\n this.subscription = router.events.subscribe(function (s) {\n if (s instanceof NavigationEnd) {\n _this.update();\n }\n });\n }\n RouterLinkActive.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.links.changes.subscribe(function (_) { return _this.update(); });\n this.linksWithHrefs.changes.subscribe(function (_) { return _this.update(); });\n this.update();\n };\n Object.defineProperty(RouterLinkActive.prototype, \"routerLinkActive\", {\n set: function (data) {\n var classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(function (c) { return !!c; });\n },\n enumerable: true,\n configurable: true\n });\n RouterLinkActive.prototype.ngOnChanges = function (changes) { this.update(); };\n RouterLinkActive.prototype.ngOnDestroy = function () { this.subscription.unsubscribe(); };\n RouterLinkActive.prototype.update = function () {\n var _this = this;\n if (!this.links || !this.linksWithHrefs || !this.router.navigated)\n return;\n Promise.resolve().then(function () {\n var hasActiveLinks = _this.hasActiveLinks();\n if (_this.isActive !== hasActiveLinks) {\n _this.isActive = hasActiveLinks;\n _this.classes.forEach(function (c) {\n if (hasActiveLinks) {\n _this.renderer.addClass(_this.element.nativeElement, c);\n }\n else {\n _this.renderer.removeClass(_this.element.nativeElement, c);\n }\n });\n }\n });\n };\n RouterLinkActive.prototype.isLinkActive = function (router) {\n var _this = this;\n return function (link) {\n return router.isActive(link.urlTree, _this.routerLinkActiveOptions.exact);\n };\n };\n RouterLinkActive.prototype.hasActiveLinks = function () {\n return this.links.some(this.isLinkActive(this.router)) ||\n this.linksWithHrefs.some(this.isLinkActive(this.router));\n };\n RouterLinkActive.decorators = [\n { type: Directive, args: [{\n selector: '[routerLinkActive]',\n exportAs: 'routerLinkActive',\n },] }\n ];\n /** @nocollapse */\n RouterLinkActive.ctorParameters = function () { return [\n { type: Router, },\n { type: ElementRef, },\n { type: Renderer2, },\n { type: ChangeDetectorRef, },\n ]; };\n RouterLinkActive.propDecorators = {\n \"links\": [{ type: ContentChildren, args: [RouterLink, { descendants: true },] },],\n \"linksWithHrefs\": [{ type: ContentChildren, args: [RouterLinkWithHref, { descendants: true },] },],\n \"routerLinkActiveOptions\": [{ type: Input },],\n \"routerLinkActive\": [{ type: Input },],\n };\n return RouterLinkActive;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Store contextual information about a `RouterOutlet`\n *\n *\n */\nvar OutletContext = /** @class */ (function () {\n function OutletContext() {\n this.outlet = null;\n this.route = null;\n this.resolver = null;\n this.children = new ChildrenOutletContexts();\n this.attachRef = null;\n }\n return OutletContext;\n}());\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n *\n */\nvar ChildrenOutletContexts = /** @class */ (function () {\n function ChildrenOutletContexts() {\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n /** Called when a `RouterOutlet` directive is instantiated */\n ChildrenOutletContexts.prototype.onChildOutletCreated = /** Called when a `RouterOutlet` directive is instantiated */\n function (childName, outlet) {\n var context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\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 /**\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 ChildrenOutletContexts.prototype.onChildOutletDestroyed = /**\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 function (childName) {\n var context = this.getContext(childName);\n if (context) {\n context.outlet = null;\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 /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n ChildrenOutletContexts.prototype.onOutletDeactivated = /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n function () {\n var contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n };\n ChildrenOutletContexts.prototype.onOutletReAttached = function (contexts) { this.contexts = contexts; };\n ChildrenOutletContexts.prototype.getOrCreateContext = function (childName) {\n var context = this.getContext(childName);\n if (!context) {\n context = new OutletContext();\n this.contexts.set(childName, context);\n }\n return context;\n };\n ChildrenOutletContexts.prototype.getContext = function (childName) { return this.contexts.get(childName) || null; };\n return ChildrenOutletContexts;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * ```\n * <router-outlet></router-outlet>\n * <router-outlet name='left'></router-outlet>\n * <router-outlet name='right'></router-outlet>\n * ```\n *\n * A router outlet will emit an activate event any time a new component is being instantiated,\n * and a deactivate event when it is being destroyed.\n *\n * ```\n * <router-outlet\n * (activate)='onActivate($event)'\n * (deactivate)='onDeactivate($event)'></router-outlet>\n * ```\n * @ngModule RouterModule\n *\n *\n */\nvar RouterOutlet = /** @class */ (function () {\n function RouterOutlet(parentContexts, location, resolver, name, changeDetector) {\n this.parentContexts = parentContexts;\n this.location = location;\n this.resolver = resolver;\n this.changeDetector = changeDetector;\n this.activated = null;\n this._activatedRoute = null;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n this.name = name || PRIMARY_OUTLET;\n parentContexts.onChildOutletCreated(this.name, this);\n }\n RouterOutlet.prototype.ngOnDestroy = function () { this.parentContexts.onChildOutletDestroyed(this.name); };\n RouterOutlet.prototype.ngOnInit = function () {\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 var 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 }\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 Object.defineProperty(RouterOutlet.prototype, \"isActivated\", {\n get: function () { return !!this.activated; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"component\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this.activated.instance;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRoute\", {\n get: function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n return this._activatedRoute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(RouterOutlet.prototype, \"activatedRouteData\", {\n get: function () {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n },\n enumerable: true,\n configurable: true\n });\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n RouterOutlet.prototype.detach = /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n function () {\n if (!this.activated)\n throw new Error('Outlet is not activated');\n this.location.detach();\n var cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n return cmp;\n };\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n RouterOutlet.prototype.attach = /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n function (ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n };\n RouterOutlet.prototype.deactivate = function () {\n if (this.activated) {\n var c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n };\n RouterOutlet.prototype.activateWith = function (activatedRoute, resolver) {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n var snapshot = activatedRoute._futureSnapshot;\n var component = snapshot.routeConfig.component;\n resolver = resolver || this.resolver;\n var factory = resolver.resolveComponentFactory(component);\n var childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n var 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 RouterOutlet.decorators = [\n { type: Directive, args: [{ selector: 'router-outlet', exportAs: 'outlet' },] }\n ];\n /** @nocollapse */\n RouterOutlet.ctorParameters = function () { return [\n { type: ChildrenOutletContexts, },\n { type: ViewContainerRef, },\n { type: ComponentFactoryResolver, },\n { type: undefined, decorators: [{ type: Attribute, args: ['name',] },] },\n { type: ChangeDetectorRef, },\n ]; };\n RouterOutlet.propDecorators = {\n \"activateEvents\": [{ type: Output, args: ['activate',] },],\n \"deactivateEvents\": [{ type: Output, args: ['deactivate',] },],\n };\n return RouterOutlet;\n}());\nvar OutletInjector = /** @class */ (function () {\n function OutletInjector(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n OutletInjector.prototype.get = function (token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n };\n return OutletInjector;\n}());\n\n/**\n*@license\n*Copyright Google Inc. All Rights Reserved.\n*\n*Use of this source 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 * Provides a preloading strategy.\n *\n * @experimental\n */\nvar PreloadingStrategy = /** @class */ (function () {\n function PreloadingStrategy() {\n }\n return PreloadingStrategy;\n}());\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouteModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @experimental\n */\nvar PreloadAllModules = /** @class */ (function () {\n function PreloadAllModules() {\n }\n PreloadAllModules.prototype.preload = function (route, fn) {\n return fn().pipe(catchError(function () { return of(null); }));\n };\n return PreloadAllModules;\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 * @experimental\n */\nvar NoPreloading = /** @class */ (function () {\n function NoPreloading() {\n }\n NoPreloading.prototype.preload = function (route, fn) { return of(null); };\n return NoPreloading;\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 *\n */\nvar RouterPreloader = /** @class */ (function () {\n function RouterPreloader(router, moduleLoader, compiler, injector, preloadingStrategy) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n var onStartLoad = function (r) { return router.triggerEvent(new RouteConfigLoadStart(r)); };\n var onEndLoad = function (r) { return router.triggerEvent(new RouteConfigLoadEnd(r)); };\n this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);\n }\n RouterPreloader.prototype.setUpPreloading = function () {\n var _this = this;\n this.subscription =\n this.router.events\n .pipe(filter(function (e) { return e instanceof NavigationEnd; }), concatMap(function () { return _this.preload(); }))\n .subscribe(function () { });\n };\n RouterPreloader.prototype.preload = function () {\n var ngModule = this.injector.get(NgModuleRef);\n return this.processRoutes(ngModule, this.router.config);\n };\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n RouterPreloader.prototype.ngOnDestroy = \n // TODO(jasonaden): This class relies on code external to the class to call setUpPreloading. If\n // this hasn't been done, ngOnDestroy will fail as this.subscription will be undefined. This\n // should be refactored.\n function () { this.subscription.unsubscribe(); };\n RouterPreloader.prototype.processRoutes = function (ngModule, routes) {\n var res = [];\n try {\n for (var routes_1 = __values(routes), routes_1_1 = routes_1.next(); !routes_1_1.done; routes_1_1 = routes_1.next()) {\n var route = routes_1_1.value;\n // we already have the config loaded, just recurse\n if (route.loadChildren && !route.canLoad && route._loadedConfig) {\n var childConfig = route._loadedConfig;\n res.push(this.processRoutes(childConfig.module, childConfig.routes));\n // no config loaded, fetch the config\n }\n else if (route.loadChildren && !route.canLoad) {\n res.push(this.preloadConfig(ngModule, route));\n // recurse into children\n }\n else if (route.children) {\n res.push(this.processRoutes(ngModule, route.children));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (routes_1_1 && !routes_1_1.done && (_a = routes_1.return)) _a.call(routes_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return from(res).pipe(mergeAll(), map(function (_) { return void 0; }));\n var e_1, _a;\n };\n RouterPreloader.prototype.preloadConfig = function (ngModule, route) {\n var _this = this;\n return this.preloadingStrategy.preload(route, function () {\n var loaded$ = _this.loader.load(ngModule.injector, route);\n return loaded$.pipe(mergeMap(function (config) {\n route._loadedConfig = config;\n return _this.processRoutes(config.module, config.routes);\n }));\n });\n };\n RouterPreloader.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n RouterPreloader.ctorParameters = function () { return [\n { type: Router, },\n { type: NgModuleFactoryLoader, },\n { type: Compiler, },\n { type: Injector, },\n { type: PreloadingStrategy, },\n ]; };\n return RouterPreloader;\n}());\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 * Contains a list of directives\n *\n *\n */\nvar ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkWithHref, RouterLinkActive];\n/**\n * @description\n *\n * Is used in DI to configure the router.\n *\n *\n */\nvar ROUTER_CONFIGURATION = new InjectionToken('ROUTER_CONFIGURATION');\n/**\n * @docsNotRequired\n */\nvar ROUTER_FORROOT_GUARD = new InjectionToken('ROUTER_FORROOT_GUARD');\nvar ROUTER_PROVIDERS = [\n Location,\n { provide: UrlSerializer, useClass: DefaultUrlSerializer },\n {\n provide: Router,\n useFactory: setupRouter,\n deps: [\n ApplicationRef, UrlSerializer, ChildrenOutletContexts, Location, Injector,\n NgModuleFactoryLoader, Compiler, ROUTES, ROUTER_CONFIGURATION,\n [UrlHandlingStrategy, new Optional()], [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];\nfunction routerNgProbeToken() {\n return new NgProbeToken('Router', Router);\n}\n/**\n * @usageNotes\n *\n * RouterModule can be imported multiple times: once per lazily-loaded bundle.\n * Since the router deals with a global shared resource--location, we cannot have\n * more than one router service active.\n *\n * That is why there are two ways to create the module: `RouterModule.forRoot` and\n * `RouterModule.forChild`.\n *\n * * `forRoot` creates a module that contains all the directives, the given routes, and the router\n * service itself.\n * * `forChild` creates a module that contains all the directives and the given routes, but does not\n * include the router service.\n *\n * When registered at the root, the module should be used as follows\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * For submodules and lazy loaded submodules the module should be used as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @description\n *\n * Adds router directives and providers.\n *\n * Managing state transitions is one of the hardest parts of building applications. This is\n * especially true on the web, where you also need to ensure that the state is reflected in the URL.\n * In addition, we often want to split applications into multiple bundles and load them on demand.\n * Doing this transparently is not trivial.\n *\n * The Angular router solves these problems. Using the router, you can declaratively specify\n * application states, manage state transitions while taking care of the URL, and load bundles on\n * demand.\n *\n * [Read this developer guide](https://angular.io/docs/ts/latest/guide/router.html) to get an\n * overview of how the router should be used.\n *\n *\n */\nvar RouterModule = /** @class */ (function () {\n // Note: We are injecting the Router so it gets created eagerly...\n function RouterModule(guard, router) {\n }\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n */\n /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n */\n RouterModule.forRoot = /**\n * Creates a module with all the router providers and directives. It also optionally sets up an\n * application listener to perform an initial navigation.\n *\n * Options (see `ExtraOptions`):\n * * `enableTracing` makes the router log all its internal events to the console.\n * * `useHash` enables the location strategy that uses the URL fragment instead of the history\n * API.\n * * `initialNavigation` disables the initial navigation.\n * * `errorHandler` provides a custom error handler.\n * * `preloadingStrategy` configures a preloading strategy (see `PreloadAllModules`).\n * * `onSameUrlNavigation` configures how the router handles navigation to the current URL. See\n * `ExtraOptions` for more details.\n */\n function (routes, config) {\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 {\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 * Creates a module with all the router directives and a provider registering routes.\n */\n /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n RouterModule.forChild = /**\n * Creates a module with all the router directives and a provider registering routes.\n */\n function (routes) {\n return { ngModule: RouterModule, providers: [provideRoutes(routes)] };\n };\n RouterModule.decorators = [\n { type: NgModule, args: [{ declarations: ROUTER_DIRECTIVES, exports: ROUTER_DIRECTIVES },] }\n ];\n /** @nocollapse */\n RouterModule.ctorParameters = function () { return [\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [ROUTER_FORROOT_GUARD,] },] },\n { type: Router, decorators: [{ type: Optional },] },\n ]; };\n return RouterModule;\n}());\nfunction provideLocationStrategy(platformLocationStrategy, baseHref, options) {\n if (options === void 0) { options = {}; }\n return options.useHash ? new HashLocationStrategy(platformLocationStrategy, baseHref) :\n new PathLocationStrategy(platformLocationStrategy, baseHref);\n}\nfunction provideForRootGuard(router) {\n if (router) {\n throw new Error(\"RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.\");\n }\n return 'guarded';\n}\n/**\n * @description\n *\n * Registers routes.\n *\n * ### Example\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)],\n * providers: [provideRoutes(EXTRA_ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n *\n */\nfunction provideRoutes(routes) {\n return [\n { provide: ANALYZE_FOR_ENTRY_COMPONENTS, multi: true, useValue: routes },\n { provide: ROUTES, multi: true, useValue: routes },\n ];\n}\nfunction setupRouter(ref, urlSerializer, contexts, location, injector, loader, compiler, config, opts, urlHandlingStrategy, routeReuseStrategy) {\n if (opts === void 0) { opts = {}; }\n var router = new Router(null, urlSerializer, contexts, location, injector, loader, compiler, flatten(config));\n if (urlHandlingStrategy) {\n router.urlHandlingStrategy = urlHandlingStrategy;\n }\n if (routeReuseStrategy) {\n router.routeReuseStrategy = routeReuseStrategy;\n }\n if (opts.errorHandler) {\n router.errorHandler = opts.errorHandler;\n }\n if (opts.enableTracing) {\n var dom_1 = ɵgetDOM();\n router.events.subscribe(function (e) {\n dom_1.logGroup(\"Router Event: \" + e.constructor.name);\n dom_1.log(e.toString());\n dom_1.log(e);\n dom_1.logGroupEnd();\n });\n }\n if (opts.onSameUrlNavigation) {\n router.onSameUrlNavigation = opts.onSameUrlNavigation;\n }\n if (opts.paramsInheritanceStrategy) {\n router.paramsInheritanceStrategy = opts.paramsInheritanceStrategy;\n }\n return router;\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * To initialize the router properly we need to do in two steps:\n *\n * We need to start the navigation in a APP_INITIALIZER to block the bootstrap if\n * a resolver or a guards executes asynchronously. Second, we need to actually run\n * activation in a BOOTSTRAP_LISTENER. We utilize the afterPreactivation\n * hook provided by the router to do that.\n *\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 */\nvar RouterInitializer = /** @class */ (function () {\n function RouterInitializer(injector) {\n this.injector = injector;\n this.initNavigation = false;\n this.resultOfPreactivationDone = new Subject();\n }\n RouterInitializer.prototype.appInitializer = function () {\n var _this = this;\n var p = this.injector.get(LOCATION_INITIALIZED, Promise.resolve(null));\n return p.then(function () {\n var resolve = (null);\n var res = new Promise(function (r) { return resolve = r; });\n var router = _this.injector.get(Router);\n var opts = _this.injector.get(ROUTER_CONFIGURATION);\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 = function () {\n // only the initial navigation should be delayed\n if (!_this.initNavigation) {\n _this.initNavigation = true;\n resolve(true);\n return _this.resultOfPreactivationDone;\n // subsequent navigations should not be delayed\n }\n else {\n return of(null);\n }\n };\n router.initialNavigation();\n }\n else {\n throw new Error(\"Invalid initialNavigation options: '\" + opts.initialNavigation + \"'\");\n }\n return res;\n });\n };\n RouterInitializer.prototype.bootstrapListener = function (bootstrappedComponentRef) {\n var opts = this.injector.get(ROUTER_CONFIGURATION);\n var preloader = this.injector.get(RouterPreloader);\n var router = this.injector.get(Router);\n var ref = this.injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n if (this.isLegacyEnabled(opts)) {\n router.initialNavigation();\n }\n else if (this.isLegacyDisabled(opts)) {\n router.setUpLocationChangeListener();\n }\n preloader.setUpPreloading();\n router.resetRootComponentType(ref.componentTypes[0]);\n this.resultOfPreactivationDone.next((null));\n this.resultOfPreactivationDone.complete();\n };\n RouterInitializer.prototype.isLegacyEnabled = function (opts) {\n return opts.initialNavigation === 'legacy_enabled' || opts.initialNavigation === true ||\n opts.initialNavigation === undefined;\n };\n RouterInitializer.prototype.isLegacyDisabled = function (opts) {\n return opts.initialNavigation === 'legacy_disabled' || opts.initialNavigation === false;\n };\n RouterInitializer.decorators = [\n { type: Injectable }\n ];\n /** @nocollapse */\n RouterInitializer.ctorParameters = function () { return [\n { type: Injector, },\n ]; };\n return RouterInitializer;\n}());\nfunction getAppInitializer(r) {\n return r.appInitializer.bind(r);\n}\nfunction getBootstrapListener(r) {\n return r.bootstrapListener.bind(r);\n}\n/**\n * A token for the router initializer that will be called after the app is bootstrapped.\n *\n * @experimental\n */\nvar ROUTER_INITIALIZER = new InjectionToken('Router Initializer');\nfunction 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/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 */\nvar VERSION = new Version('6.0.0-rc.6');\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 Inc. All Rights Reserved.\n *\n * Use of this source 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 only reexports content of the `src` folder. Keep it that way.\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source 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 { ROUTER_FORROOT_GUARD as ɵangular_packages_router_router_a, RouterInitializer as ɵangular_packages_router_router_g, getAppInitializer as ɵangular_packages_router_router_h, getBootstrapListener as ɵangular_packages_router_router_i, provideForRootGuard as ɵangular_packages_router_router_d, provideLocationStrategy as ɵangular_packages_router_router_c, provideRouterInitializer as ɵangular_packages_router_router_j, rootRoute as ɵangular_packages_router_router_f, routerNgProbeToken as ɵangular_packages_router_router_b, setupRouter as ɵangular_packages_router_router_e, Tree as ɵangular_packages_router_router_k, TreeNode as ɵangular_packages_router_router_l, RouterLink, RouterLinkWithHref, RouterLinkActive, RouterOutlet, ActivationEnd, ActivationStart, ChildActivationEnd, ChildActivationStart, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationEnd, NavigationError, NavigationStart, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouterEvent, RoutesRecognized, RouteReuseStrategy, Router, ROUTES, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, RouterModule, provideRoutes, ChildrenOutletContexts, OutletContext, NoPreloading, PreloadAllModules, PreloadingStrategy, RouterPreloader, ActivatedRoute, ActivatedRouteSnapshot, RouterState, RouterStateSnapshot, PRIMARY_OUTLET, convertToParamMap, UrlHandlingStrategy, DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, flatten as ɵflatten };\n//# sourceMappingURL=router.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","\"use strict\";\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/*\n *\n * More info at [www.dropzonejs.com](http://www.dropzonejs.com)\n *\n * Copyright (c) 2012, Matias Meno\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n\n// The Emitter class provides the ability to call `.on()` on Dropzone to listen\n// to events.\n// It is strongly based on component's emitter class, and I removed the\n// functionality because of the dependency hell with different frameworks.\nvar Emitter = function () {\n function Emitter() {\n _classCallCheck(this, Emitter);\n }\n\n _createClass(Emitter, [{\n key: \"on\",\n\n // Add an event listener for given event\n value: function on(event, fn) {\n this._callbacks = this._callbacks || {};\n // Create namespace for this event\n if (!this._callbacks[event]) {\n this._callbacks[event] = [];\n }\n this._callbacks[event].push(fn);\n return this;\n }\n }, {\n key: \"emit\",\n value: function emit(event) {\n this._callbacks = this._callbacks || {};\n var callbacks = this._callbacks[event];\n\n if (callbacks) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n for (var _iterator = callbacks, _isArray = true, _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var callback = _ref;\n\n callback.apply(this, args);\n }\n }\n\n return this;\n }\n\n // Remove event listener for given event. If fn is not provided, all event\n // listeners for that event will be removed. If neither is provided, all\n // event listeners will be removed.\n\n }, {\n key: \"off\",\n value: function off(event, fn) {\n if (!this._callbacks || arguments.length === 0) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks[event];\n if (!callbacks) {\n return this;\n }\n\n // remove all handlers\n if (arguments.length === 1) {\n delete this._callbacks[event];\n return this;\n }\n\n // remove specific handler\n for (var i = 0; i < callbacks.length; i++) {\n var callback = callbacks[i];\n if (callback === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n return this;\n }\n }]);\n\n return Emitter;\n}();\n\nvar Dropzone = function (_Emitter) {\n _inherits(Dropzone, _Emitter);\n\n _createClass(Dropzone, null, [{\n key: \"initClass\",\n value: function initClass() {\n\n // Exposing the emitter class, mainly for tests\n this.prototype.Emitter = Emitter;\n\n /*\n This is a list of all available events you can register on a dropzone object.\n You can register an event handler like this:\n dropzone.on(\"dragEnter\", function() { });\n */\n this.prototype.events = [\"drop\", \"dragstart\", \"dragend\", \"dragenter\", \"dragover\", \"dragleave\", \"addedfile\", \"addedfiles\", \"removedfile\", \"thumbnail\", \"error\", \"errormultiple\", \"processing\", \"processingmultiple\", \"uploadprogress\", \"totaluploadprogress\", \"sending\", \"sendingmultiple\", \"success\", \"successmultiple\", \"canceled\", \"canceledmultiple\", \"complete\", \"completemultiple\", \"reset\", \"maxfilesexceeded\", \"maxfilesreached\", \"queuecomplete\"];\n\n this.prototype.defaultOptions = {\n /**\n * Has to be specified on elements other than form (or when the form\n * doesn't have an `action` attribute). You can also\n * provide a function that will be called with `files` and\n * must return the url (since `v3.12.0`)\n */\n url: null,\n\n /**\n * Can be changed to `\"put\"` if necessary. You can also provide a function\n * that will be called with `files` and must return the method (since `v3.12.0`).\n */\n method: \"post\",\n\n /**\n * Will be set on the XHRequest.\n */\n withCredentials: false,\n\n /**\n * The timeout for the XHR requests in milliseconds (since `v4.4.0`).\n */\n timeout: 30000,\n\n /**\n * How many file uploads to process in parallel (See the\n * Enqueuing file uploads* documentation section for more info)\n */\n parallelUploads: 2,\n\n /**\n * Whether to send multiple files in one request. If\n * this it set to true, then the fallback file input element will\n * have the `multiple` attribute as well. This option will\n * also trigger additional events (like `processingmultiple`). See the events\n * documentation section for more information.\n */\n uploadMultiple: false,\n\n /**\n * Whether you want files to be uploaded in chunks to your server. This can't be\n * used in combination with `uploadMultiple`.\n *\n * See [chunksUploaded](#config-chunksUploaded) for the callback to finalise an upload.\n */\n chunking: false,\n\n /**\n * If `chunking` is enabled, this defines whether **every** file should be chunked,\n * even if the file size is below chunkSize. This means, that the additional chunk\n * form data will be submitted and the `chunksUploaded` callback will be invoked.\n */\n forceChunking: false,\n\n /**\n * If `chunking` is `true`, then this defines the chunk size in bytes.\n */\n chunkSize: 2000000,\n\n /**\n * If `true`, the individual chunks of a file are being uploaded simultaneously.\n */\n parallelChunkUploads: false,\n\n /**\n * Whether a chunk should be retried if it fails.\n */\n retryChunks: false,\n\n /**\n * If `retryChunks` is true, how many times should it be retried.\n */\n retryChunksLimit: 3,\n\n /**\n * If not `null` defines how many files this Dropzone handles. If it exceeds,\n * the event `maxfilesexceeded` will be called. The dropzone element gets the\n * class `dz-max-files-reached` accordingly so you can provide visual feedback.\n */\n maxFilesize: 256,\n\n /**\n * The name of the file param that gets transferred.\n * **NOTE**: If you have the option `uploadMultiple` set to `true`, then\n * Dropzone will append `[]` to the name.\n */\n paramName: \"file\",\n\n /**\n * Whether thumbnails for images should be generated\n */\n createImageThumbnails: true,\n\n /**\n * In MB. When the filename exceeds this limit, the thumbnail will not be generated.\n */\n maxThumbnailFilesize: 10,\n\n /**\n * If `null`, the ratio of the image will be used to calculate it.\n */\n thumbnailWidth: 120,\n\n /**\n * The same as `thumbnailWidth`. If both are null, images will not be resized.\n */\n thumbnailHeight: 120,\n\n /**\n * How the images should be scaled down in case both, `thumbnailWidth` and `thumbnailHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n thumbnailMethod: 'crop',\n\n /**\n * If set, images will be resized to these dimensions before being **uploaded**.\n * If only one, `resizeWidth` **or** `resizeHeight` is provided, the original aspect\n * ratio of the file will be preserved.\n *\n * The `options.transformFile` function uses these options, so if the `transformFile` function\n * is overridden, these options don't do anything.\n */\n resizeWidth: null,\n\n /**\n * See `resizeWidth`.\n */\n resizeHeight: null,\n\n /**\n * The mime type of the resized image (before it gets uploaded to the server).\n * If `null` the original mime type will be used. To force jpeg, for example, use `image/jpeg`.\n * See `resizeWidth` for more information.\n */\n resizeMimeType: null,\n\n /**\n * The quality of the resized images. See `resizeWidth`.\n */\n resizeQuality: 0.8,\n\n /**\n * How the images should be scaled down in case both, `resizeWidth` and `resizeHeight` are provided.\n * Can be either `contain` or `crop`.\n */\n resizeMethod: 'contain',\n\n /**\n * The base that is used to calculate the filesize. You can change this to\n * 1024 if you would rather display kibibytes, mebibytes, etc...\n * 1024 is technically incorrect, because `1024 bytes` are `1 kibibyte` not `1 kilobyte`.\n * You can change this to `1024` if you don't care about validity.\n */\n filesizeBase: 1000,\n\n /**\n * Can be used to limit the maximum number of files that will be handled by this Dropzone\n */\n maxFiles: null,\n\n /**\n * An optional object to send additional headers to the server. Eg:\n * `{ \"My-Awesome-Header\": \"header value\" }`\n */\n headers: null,\n\n /**\n * If `true`, the dropzone element itself will be clickable, if `false`\n * nothing will be clickable.\n *\n * You can also pass an HTML element, a CSS selector (for multiple elements)\n * or an array of those. In that case, all of those elements will trigger an\n * upload when clicked.\n */\n clickable: true,\n\n /**\n * Whether hidden files in directories should be ignored.\n */\n ignoreHiddenFiles: true,\n\n /**\n * The default implementation of `accept` checks the file's mime type or\n * extension against this list. This is a comma separated list of mime\n * types or file extensions.\n *\n * Eg.: `image/*,application/pdf,.psd`\n *\n * If the Dropzone is `clickable` this option will also be used as\n * [`accept`](https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept)\n * parameter on the hidden file input as well.\n */\n acceptedFiles: null,\n\n /**\n * **Deprecated!**\n * Use acceptedFiles instead.\n */\n acceptedMimeTypes: null,\n\n /**\n * If false, files will be added to the queue but the queue will not be\n * processed automatically.\n * This can be useful if you need some additional user input before sending\n * files (or if you want want all files sent at once).\n * If you're ready to send the file simply call `myDropzone.processQueue()`.\n *\n * See the [enqueuing file uploads](#enqueuing-file-uploads) documentation\n * section for more information.\n */\n autoProcessQueue: true,\n\n /**\n * If false, files added to the dropzone will not be queued by default.\n * You'll have to call `enqueueFile(file)` manually.\n */\n autoQueue: true,\n\n /**\n * If `true`, this will add a link to every file preview to remove or cancel (if\n * already uploading) the file. The `dictCancelUpload`, `dictCancelUploadConfirmation`\n * and `dictRemoveFile` options are used for the wording.\n */\n addRemoveLinks: false,\n\n /**\n * Defines where to display the file previews if `null` the\n * Dropzone element itself is used. Can be a plain `HTMLElement` or a CSS\n * selector. The element should have the `dropzone-previews` class so\n * the previews are displayed properly.\n */\n previewsContainer: null,\n\n /**\n * This is the element the hidden input field (which is used when clicking on the\n * dropzone to trigger file selection) will be appended to. This might\n * be important in case you use frameworks to switch the content of your page.\n */\n hiddenInputContainer: \"body\",\n\n /**\n * If null, no capture type will be specified\n * If camera, mobile devices will skip the file selection and choose camera\n * If microphone, mobile devices will skip the file selection and choose the microphone\n * If camcorder, mobile devices will skip the file selection and choose the camera in video mode\n * On apple devices multiple must be set to false. AcceptedFiles may need to\n * be set to an appropriate mime type (e.g. \"image/*\", \"audio/*\", or \"video/*\").\n */\n capture: null,\n\n /**\n * **Deprecated**. Use `renameFile` instead.\n */\n renameFilename: null,\n\n /**\n * A function that is invoked before the file is uploaded to the server and renames the file.\n * This function gets the `File` as argument and can use the `file.name`. The actual name of the\n * file that gets used during the upload can be accessed through `file.upload.filename`.\n */\n renameFile: null,\n\n /**\n * If `true` the fallback will be forced. This is very useful to test your server\n * implementations first and make sure that everything works as\n * expected without dropzone if you experience problems, and to test\n * how your fallbacks will look.\n */\n forceFallback: false,\n\n /**\n * The text used before any files are dropped.\n */\n dictDefaultMessage: \"Drop files here to upload\",\n\n /**\n * The text that replaces the default message text it the browser is not supported.\n */\n dictFallbackMessage: \"Your browser does not support drag'n'drop file uploads.\",\n\n /**\n * The text that will be added before the fallback form.\n * If you provide a fallback element yourself, or if this option is `null` this will\n * be ignored.\n */\n dictFallbackText: \"Please use the fallback form below to upload your files like in the olden days.\",\n\n /**\n * If the filesize is too big.\n * `{{filesize}}` and `{{maxFilesize}}` will be replaced with the respective configuration values.\n */\n dictFileTooBig: \"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.\",\n\n /**\n * If the file doesn't match the file type.\n */\n dictInvalidFileType: \"You can't upload files of this type.\",\n\n /**\n * If the server response was invalid.\n * `{{statusCode}}` will be replaced with the servers status code.\n */\n dictResponseError: \"Server responded with {{statusCode}} code.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for the cancel upload link.\n */\n dictCancelUpload: \"Cancel upload\",\n\n /**\n * The text that is displayed if an upload was manually canceled\n */\n dictUploadCanceled: \"Upload canceled.\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used for confirmation when cancelling upload.\n */\n dictCancelUploadConfirmation: \"Are you sure you want to cancel this upload?\",\n\n /**\n * If `addRemoveLinks` is true, the text to be used to remove a file.\n */\n dictRemoveFile: \"Remove file\",\n\n /**\n * If this is not null, then the user will be prompted before removing a file.\n */\n dictRemoveFileConfirmation: null,\n\n /**\n * Displayed if `maxFiles` is st and exceeded.\n * The string `{{maxFiles}}` will be replaced by the configuration value.\n */\n dictMaxFilesExceeded: \"You can not upload any more files.\",\n\n /**\n * Allows you to translate the different units. Starting with `tb` for terabytes and going down to\n * `b` for bytes.\n */\n dictFileSizeUnits: { tb: \"TB\", gb: \"GB\", mb: \"MB\", kb: \"KB\", b: \"b\" },\n /**\n * Called when dropzone initialized\n * You can add event listeners here\n */\n init: function init() {},\n\n\n /**\n * Can be an **object** of additional parameters to transfer to the server, **or** a `Function`\n * that gets invoked with the `files`, `xhr` and, if it's a chunked upload, `chunk` arguments. In case\n * of a function, this needs to return a map.\n *\n * The default implementation does nothing for normal uploads, but adds relevant information for\n * chunked uploads.\n *\n * This is the same as adding hidden input fields in the form element.\n */\n params: function params(files, xhr, chunk) {\n if (chunk) {\n return {\n dzuuid: chunk.file.upload.uuid,\n dzchunkindex: chunk.index,\n dztotalfilesize: chunk.file.size,\n dzchunksize: this.options.chunkSize,\n dztotalchunkcount: chunk.file.upload.totalChunkCount,\n dzchunkbyteoffset: chunk.index * this.options.chunkSize\n };\n }\n },\n\n\n /**\n * A function that gets a [file](https://developer.mozilla.org/en-US/docs/DOM/File)\n * and a `done` function as parameters.\n *\n * If the done function is invoked without arguments, the file is \"accepted\" and will\n * be processed. If you pass an error message, the file is rejected, and the error\n * message will be displayed.\n * This function will not be called if the file is too big or doesn't match the mime types.\n */\n accept: function accept(file, done) {\n return done();\n },\n\n\n /**\n * The callback that will be invoked when all chunks have been uploaded for a file.\n * It gets the file for which the chunks have been uploaded as the first parameter,\n * and the `done` function as second. `done()` needs to be invoked when everything\n * needed to finish the upload process is done.\n */\n chunksUploaded: function chunksUploaded(file, done) {\n done();\n },\n\n /**\n * Gets called when the browser is not supported.\n * The default implementation shows the fallback input field and adds\n * a text.\n */\n fallback: function fallback() {\n // This code should pass in IE7... :(\n var messageElement = void 0;\n this.element.className = this.element.className + \" dz-browser-not-supported\";\n\n for (var _iterator2 = this.element.getElementsByTagName(\"div\"), _isArray2 = true, _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {\n var _ref2;\n\n if (_isArray2) {\n if (_i2 >= _iterator2.length) break;\n _ref2 = _iterator2[_i2++];\n } else {\n _i2 = _iterator2.next();\n if (_i2.done) break;\n _ref2 = _i2.value;\n }\n\n var child = _ref2;\n\n if (/(^| )dz-message($| )/.test(child.className)) {\n messageElement = child;\n child.className = \"dz-message\"; // Removes the 'dz-default' class\n break;\n }\n }\n if (!messageElement) {\n messageElement = Dropzone.createElement(\"<div class=\\\"dz-message\\\"><span></span></div>\");\n this.element.appendChild(messageElement);\n }\n\n var span = messageElement.getElementsByTagName(\"span\")[0];\n if (span) {\n if (span.textContent != null) {\n span.textContent = this.options.dictFallbackMessage;\n } else if (span.innerText != null) {\n span.innerText = this.options.dictFallbackMessage;\n }\n }\n\n return this.element.appendChild(this.getFallbackForm());\n },\n\n\n /**\n * Gets called to calculate the thumbnail dimensions.\n *\n * It gets `file`, `width` and `height` (both may be `null`) as parameters and must return an object containing:\n *\n * - `srcWidth` & `srcHeight` (required)\n * - `trgWidth` & `trgHeight` (required)\n * - `srcX` & `srcY` (optional, default `0`)\n * - `trgX` & `trgY` (optional, default `0`)\n *\n * Those values are going to be used by `ctx.drawImage()`.\n */\n resize: function resize(file, width, height, resizeMethod) {\n var info = {\n srcX: 0,\n srcY: 0,\n srcWidth: file.width,\n srcHeight: file.height\n };\n\n var srcRatio = file.width / file.height;\n\n // Automatically calculate dimensions if not specified\n if (width == null && height == null) {\n width = info.srcWidth;\n height = info.srcHeight;\n } else if (width == null) {\n width = height * srcRatio;\n } else if (height == null) {\n height = width / srcRatio;\n }\n\n // Make sure images aren't upscaled\n width = Math.min(width, info.srcWidth);\n height = Math.min(height, info.srcHeight);\n\n var trgRatio = width / height;\n\n if (info.srcWidth > width || info.srcHeight > height) {\n // Image is bigger and needs rescaling\n if (resizeMethod === 'crop') {\n if (srcRatio > trgRatio) {\n info.srcHeight = file.height;\n info.srcWidth = info.srcHeight * trgRatio;\n } else {\n info.srcWidth = file.width;\n info.srcHeight = info.srcWidth / trgRatio;\n }\n } else if (resizeMethod === 'contain') {\n // Method 'contain'\n if (srcRatio > trgRatio) {\n height = width / srcRatio;\n } else {\n width = height * srcRatio;\n }\n } else {\n throw new Error(\"Unknown resizeMethod '\" + resizeMethod + \"'\");\n }\n }\n\n info.srcX = (file.width - info.srcWidth) / 2;\n info.srcY = (file.height - info.srcHeight) / 2;\n\n info.trgWidth = width;\n info.trgHeight = height;\n\n return info;\n },\n\n\n /**\n * Can be used to transform the file (for example, resize an image if necessary).\n *\n * The default implementation uses `resizeWidth` and `resizeHeight` (if provided) and resizes\n * images according to those dimensions.\n *\n * Gets the `file` as the first parameter, and a `done()` function as the second, that needs\n * to be invoked with the file when the transformation is done.\n */\n transformFile: function transformFile(file, done) {\n if ((this.options.resizeWidth || this.options.resizeHeight) && file.type.match(/image.*/)) {\n return this.resizeImage(file, this.options.resizeWidth, this.options.resizeHeight, this.options.resizeMethod, done);\n } else {\n return done(file);\n }\n },\n\n\n /**\n * A string that contains the template used for each dropped\n * file. Change it to fulfill your needs but make sure to properly\n * provide all elements.\n *\n * If you want to use an actual HTML element instead of providing a String\n * as a config option, you could create a div with the id `tpl`,\n * put the template inside it and provide the element like this:\n *\n * document\n * .querySelector('#tpl')\n * .innerHTML\n *\n */\n previewTemplate: \"<div class=\\\"dz-preview dz-file-preview\\\">\\n <div class=\\\"dz-image\\\"><img data-dz-thumbnail /></div>\\n <div class=\\\"dz-details\\\">\\n <div class=\\\"dz-size\\\"><span data-dz-size></span></div>\\n <div class=\\\"dz-filename\\\"><span data-dz-name></span></div>\\n </div>\\n <div class=\\\"dz-progress\\\"><span class=\\\"dz-upload\\\" data-dz-uploadprogress></span></div>\\n <div class=\\\"dz-error-message\\\"><span data-dz-errormessage></span></div>\\n <div class=\\\"dz-success-mark\\\">\\n <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" xmlns:sketch=\\\"http://www.bohemiancoding.com/sketch/ns\\\">\\n <title>Check</title>\\n <defs></defs>\\n <g id=\\\"Page-1\\\" stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\" sketch:type=\\\"MSPage\\\">\\n <path d=\\\"M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\" id=\\\"Oval-2\\\" stroke-opacity=\\\"0.198794158\\\" stroke=\\\"#747474\\\" fill-opacity=\\\"0.816519475\\\" fill=\\\"#FFFFFF\\\" sketch:type=\\\"MSShapeGroup\\\"></path>\\n </g>\\n </svg>\\n </div>\\n <div class=\\\"dz-error-mark\\\">\\n <svg width=\\\"54px\\\" height=\\\"54px\\\" viewBox=\\\"0 0 54 54\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" xmlns:sketch=\\\"http://www.bohemiancoding.com/sketch/ns\\\">\\n <title>Error</title>\\n <defs></defs>\\n <g id=\\\"Page-1\\\" stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill=\\\"none\\\" fill-rule=\\\"evenodd\\\" sketch:type=\\\"MSPage\\\">\\n <g id=\\\"Check-+-Oval-2\\\" sketch:type=\\\"MSLayerGroup\\\" stroke=\\\"#747474\\\" stroke-opacity=\\\"0.198794158\\\" fill=\\\"#FFFFFF\\\" fill-opacity=\\\"0.816519475\\\">\\n <path d=\\\"M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z\\\" id=\\\"Oval-2\\\" sketch:type=\\\"MSShapeGroup\\\"></path>\\n </g>\\n </g>\\n </svg>\\n </div>\\n</div>\",\n\n // END OPTIONS\n // (Required by the dropzone documentation parser)\n\n\n /*\n Those functions register themselves to the events on init and handle all\n the user interface specific stuff. Overwriting them won't break the upload\n but can break the way it's displayed.\n You can overwrite them if you don't like the default behavior. If you just\n want to add an additional event handler, register it on the dropzone object\n and don't overwrite those options.\n */\n\n // Those are self explanatory and simply concern the DragnDrop.\n drop: function drop(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragstart: function dragstart(e) {},\n dragend: function dragend(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n dragenter: function dragenter(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragover: function dragover(e) {\n return this.element.classList.add(\"dz-drag-hover\");\n },\n dragleave: function dragleave(e) {\n return this.element.classList.remove(\"dz-drag-hover\");\n },\n paste: function paste(e) {},\n\n\n // Called whenever there are no files left in the dropzone anymore, and the\n // dropzone should be displayed as if in the initial state.\n reset: function reset() {\n return this.element.classList.remove(\"dz-started\");\n },\n\n\n // Called when a file is added to the queue\n // Receives `file`\n addedfile: function addedfile(file) {\n var _this2 = this;\n\n if (this.element === this.previewsContainer) {\n this.element.classList.add(\"dz-started\");\n }\n\n if (this.previewsContainer) {\n file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim());\n file.previewTemplate = file.previewElement; // Backwards compatibility\n\n this.previewsContainer.appendChild(file.previewElement);\n for (var _iterator3 = file.previewElement.querySelectorAll(\"[data-dz-name]\"), _isArray3 = true, _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {\n var _ref3;\n\n if (_isArray3) {\n if (_i3 >= _iterator3.length) break;\n _ref3 = _iterator3[_i3++];\n } else {\n _i3 = _iterator3.next();\n if (_i3.done) break;\n _ref3 = _i3.value;\n }\n\n var node = _ref3;\n\n node.textContent = file.name;\n }\n for (var _iterator4 = file.previewElement.querySelectorAll(\"[data-dz-size]\"), _isArray4 = true, _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {\n if (_isArray4) {\n if (_i4 >= _iterator4.length) break;\n node = _iterator4[_i4++];\n } else {\n _i4 = _iterator4.next();\n if (_i4.done) break;\n node = _i4.value;\n }\n\n node.innerHTML = this.filesize(file.size);\n }\n\n if (this.options.addRemoveLinks) {\n file._removeLink = Dropzone.createElement(\"<a class=\\\"dz-remove\\\" href=\\\"javascript:undefined;\\\" data-dz-remove>\" + this.options.dictRemoveFile + \"</a>\");\n file.previewElement.appendChild(file._removeLink);\n }\n\n var removeFileEvent = function removeFileEvent(e) {\n e.preventDefault();\n e.stopPropagation();\n if (file.status === Dropzone.UPLOADING) {\n return Dropzone.confirm(_this2.options.dictCancelUploadConfirmation, function () {\n return _this2.removeFile(file);\n });\n } else {\n if (_this2.options.dictRemoveFileConfirmation) {\n return Dropzone.confirm(_this2.options.dictRemoveFileConfirmation, function () {\n return _this2.removeFile(file);\n });\n } else {\n return _this2.removeFile(file);\n }\n }\n };\n\n for (var _iterator5 = file.previewElement.querySelectorAll(\"[data-dz-remove]\"), _isArray5 = true, _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {\n var _ref4;\n\n if (_isArray5) {\n if (_i5 >= _iterator5.length) break;\n _ref4 = _iterator5[_i5++];\n } else {\n _i5 = _iterator5.next();\n if (_i5.done) break;\n _ref4 = _i5.value;\n }\n\n var removeLink = _ref4;\n\n removeLink.addEventListener(\"click\", removeFileEvent);\n }\n }\n },\n\n\n // Called whenever a file is removed.\n removedfile: function removedfile(file) {\n if (file.previewElement != null && file.previewElement.parentNode != null) {\n file.previewElement.parentNode.removeChild(file.previewElement);\n }\n return this._updateMaxFilesReachedClass();\n },\n\n\n // Called when a thumbnail has been generated\n // Receives `file` and `dataUrl`\n thumbnail: function thumbnail(file, dataUrl) {\n if (file.previewElement) {\n file.previewElement.classList.remove(\"dz-file-preview\");\n for (var _iterator6 = file.previewElement.querySelectorAll(\"[data-dz-thumbnail]\"), _isArray6 = true, _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {\n var _ref5;\n\n if (_isArray6) {\n if (_i6 >= _iterator6.length) break;\n _ref5 = _iterator6[_i6++];\n } else {\n _i6 = _iterator6.next();\n if (_i6.done) break;\n _ref5 = _i6.value;\n }\n\n var thumbnailElement = _ref5;\n\n thumbnailElement.alt = file.name;\n thumbnailElement.src = dataUrl;\n }\n\n return setTimeout(function () {\n return file.previewElement.classList.add(\"dz-image-preview\");\n }, 1);\n }\n },\n\n\n // Called whenever an error occurs\n // Receives `file` and `message`\n error: function error(file, message) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-error\");\n if (typeof message !== \"String\" && message.error) {\n message = message.error;\n }\n for (var _iterator7 = file.previewElement.querySelectorAll(\"[data-dz-errormessage]\"), _isArray7 = true, _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {\n var _ref6;\n\n if (_isArray7) {\n if (_i7 >= _iterator7.length) break;\n _ref6 = _iterator7[_i7++];\n } else {\n _i7 = _iterator7.next();\n if (_i7.done) break;\n _ref6 = _i7.value;\n }\n\n var node = _ref6;\n\n node.textContent = message;\n }\n }\n },\n errormultiple: function errormultiple() {},\n\n\n // Called when a file gets processed. Since there is a cue, not all added\n // files are processed immediately.\n // Receives `file`\n processing: function processing(file) {\n if (file.previewElement) {\n file.previewElement.classList.add(\"dz-processing\");\n if (file._removeLink) {\n return file._removeLink.textContent = this.options.dictCancelUpload;\n }\n }\n },\n processingmultiple: function processingmultiple() {},\n\n\n // Called whenever the upload progress gets updated.\n // Receives `file`, `progress` (percentage 0-100) and `bytesSent`.\n // To get the total number of bytes of the file, use `file.size`\n uploadprogress: function uploadprogress(file, progress, bytesSent) {\n if (file.previewElement) {\n for (var _iterator8 = file.previewElement.querySelectorAll(\"[data-dz-uploadprogress]\"), _isArray8 = true, _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {\n var _ref7;\n\n if (_isArray8) {\n if (_i8 >= _iterator8.length) break;\n _ref7 = _iterator8[_i8++];\n } else {\n _i8 = _iterator8.next();\n if (_i8.done) break;\n _ref7 = _i8.value;\n }\n\n var node = _ref7;\n\n node.nodeName === 'PROGRESS' ? node.value = progress : node.style.width = progress + \"%\";\n }\n }\n },\n\n\n // Called whenever the total upload progress gets updated.\n // Called with totalUploadProgress (0-100), totalBytes and totalBytesSent\n totaluploadprogress: function totaluploadprogress() {},\n\n\n // Called just before the file is sent. Gets the `xhr` object as second\n // parameter, so you can modify it (for example to add a CSRF token) and a\n // `formData` object to add additional information.\n sending: function sending() {},\n sendingmultiple: function sendingmultiple() {},\n\n\n // When the complete upload is finished and successful\n // Receives `file`\n success: function success(file) {\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-success\");\n }\n },\n successmultiple: function successmultiple() {},\n\n\n // When the upload is canceled.\n canceled: function canceled(file) {\n return this.emit(\"error\", file, this.options.dictUploadCanceled);\n },\n canceledmultiple: function canceledmultiple() {},\n\n\n // When the upload is finished, either with success or an error.\n // Receives `file`\n complete: function complete(file) {\n if (file._removeLink) {\n file._removeLink.textContent = this.options.dictRemoveFile;\n }\n if (file.previewElement) {\n return file.previewElement.classList.add(\"dz-complete\");\n }\n },\n completemultiple: function completemultiple() {},\n maxfilesexceeded: function maxfilesexceeded() {},\n maxfilesreached: function maxfilesreached() {},\n queuecomplete: function queuecomplete() {},\n addedfiles: function addedfiles() {}\n };\n\n this.prototype._thumbnailQueue = [];\n this.prototype._processingThumbnail = false;\n }\n\n // global utility\n\n }, {\n key: \"extend\",\n value: function extend(target) {\n for (var _len2 = arguments.length, objects = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n objects[_key2 - 1] = arguments[_key2];\n }\n\n for (var _iterator9 = objects, _isArray9 = true, _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _iterator9[Symbol.iterator]();;) {\n var _ref8;\n\n if (_isArray9) {\n if (_i9 >= _iterator9.length) break;\n _ref8 = _iterator9[_i9++];\n } else {\n _i9 = _iterator9.next();\n if (_i9.done) break;\n _ref8 = _i9.value;\n }\n\n var object = _ref8;\n\n for (var key in object) {\n var val = object[key];\n target[key] = val;\n }\n }\n return target;\n }\n }]);\n\n function Dropzone(el, options) {\n _classCallCheck(this, Dropzone);\n\n var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this));\n\n var fallback = void 0,\n left = void 0;\n _this.element = el;\n // For backwards compatibility since the version was in the prototype previously\n _this.version = Dropzone.version;\n\n _this.defaultOptions.previewTemplate = _this.defaultOptions.previewTemplate.replace(/\\n*/g, \"\");\n\n _this.clickableElements = [];\n _this.listeners = [];\n _this.files = []; // All files\n\n if (typeof _this.element === \"string\") {\n _this.element = document.querySelector(_this.element);\n }\n\n // Not checking if instance of HTMLElement or Element since IE9 is extremely weird.\n if (!_this.element || _this.element.nodeType == null) {\n throw new Error(\"Invalid dropzone element.\");\n }\n\n if (_this.element.dropzone) {\n throw new Error(\"Dropzone already attached.\");\n }\n\n // Now add this dropzone to the instances.\n Dropzone.instances.push(_this);\n\n // Put the dropzone inside the element itself.\n _this.element.dropzone = _this;\n\n var elementOptions = (left = Dropzone.optionsForElement(_this.element)) != null ? left : {};\n\n _this.options = Dropzone.extend({}, _this.defaultOptions, elementOptions, options != null ? options : {});\n\n // If the browser failed, just call the fallback and leave\n if (_this.options.forceFallback || !Dropzone.isBrowserSupported()) {\n var _ret;\n\n return _ret = _this.options.fallback.call(_this), _possibleConstructorReturn(_this, _ret);\n }\n\n // @options.url = @element.getAttribute \"action\" unless @options.url?\n if (_this.options.url == null) {\n _this.options.url = _this.element.getAttribute(\"action\");\n }\n\n if (!_this.options.url) {\n throw new Error(\"No URL provided.\");\n }\n\n if (_this.options.acceptedFiles && _this.options.acceptedMimeTypes) {\n throw new Error(\"You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.\");\n }\n\n if (_this.options.uploadMultiple && _this.options.chunking) {\n throw new Error('You cannot set both: uploadMultiple and chunking.');\n }\n\n // Backwards compatibility\n if (_this.options.acceptedMimeTypes) {\n _this.options.acceptedFiles = _this.options.acceptedMimeTypes;\n delete _this.options.acceptedMimeTypes;\n }\n\n // Backwards compatibility\n if (_this.options.renameFilename != null) {\n _this.options.renameFile = function (file) {\n return _this.options.renameFilename.call(_this, file.name, file);\n };\n }\n\n _this.options.method = _this.options.method.toUpperCase();\n\n if ((fallback = _this.getExistingFallback()) && fallback.parentNode) {\n // Remove the fallback\n fallback.parentNode.removeChild(fallback);\n }\n\n // Display previews in the previewsContainer element or the Dropzone element unless explicitly set to false\n if (_this.options.previewsContainer !== false) {\n if (_this.options.previewsContainer) {\n _this.previewsContainer = Dropzone.getElement(_this.options.previewsContainer, \"previewsContainer\");\n } else {\n _this.previewsContainer = _this.element;\n }\n }\n\n if (_this.options.clickable) {\n if (_this.options.clickable === true) {\n _this.clickableElements = [_this.element];\n } else {\n _this.clickableElements = Dropzone.getElements(_this.options.clickable, \"clickable\");\n }\n }\n\n _this.init();\n return _this;\n }\n\n // Returns all files that have been accepted\n\n\n _createClass(Dropzone, [{\n key: \"getAcceptedFiles\",\n value: function getAcceptedFiles() {\n return this.files.filter(function (file) {\n return file.accepted;\n }).map(function (file) {\n return file;\n });\n }\n\n // Returns all files that have been rejected\n // Not sure when that's going to be useful, but added for completeness.\n\n }, {\n key: \"getRejectedFiles\",\n value: function getRejectedFiles() {\n return this.files.filter(function (file) {\n return !file.accepted;\n }).map(function (file) {\n return file;\n });\n }\n }, {\n key: \"getFilesWithStatus\",\n value: function getFilesWithStatus(status) {\n return this.files.filter(function (file) {\n return file.status === status;\n }).map(function (file) {\n return file;\n });\n }\n\n // Returns all files that are in the queue\n\n }, {\n key: \"getQueuedFiles\",\n value: function getQueuedFiles() {\n return this.getFilesWithStatus(Dropzone.QUEUED);\n }\n }, {\n key: \"getUploadingFiles\",\n value: function getUploadingFiles() {\n return this.getFilesWithStatus(Dropzone.UPLOADING);\n }\n }, {\n key: \"getAddedFiles\",\n value: function getAddedFiles() {\n return this.getFilesWithStatus(Dropzone.ADDED);\n }\n\n // Files that are either queued or uploading\n\n }, {\n key: \"getActiveFiles\",\n value: function getActiveFiles() {\n return this.files.filter(function (file) {\n return file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED;\n }).map(function (file) {\n return file;\n });\n }\n\n // The function that gets called when Dropzone is initialized. You\n // can (and should) setup event listeners inside this function.\n\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n\n // In case it isn't set already\n if (this.element.tagName === \"form\") {\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n }\n\n if (this.element.classList.contains(\"dropzone\") && !this.element.querySelector(\".dz-message\")) {\n this.element.appendChild(Dropzone.createElement(\"<div class=\\\"dz-default dz-message\\\"><span>\" + this.options.dictDefaultMessage + \"</span></div>\"));\n }\n\n if (this.clickableElements.length) {\n var setupHiddenFileInput = function setupHiddenFileInput() {\n if (_this3.hiddenFileInput) {\n _this3.hiddenFileInput.parentNode.removeChild(_this3.hiddenFileInput);\n }\n _this3.hiddenFileInput = document.createElement(\"input\");\n _this3.hiddenFileInput.setAttribute(\"type\", \"file\");\n if (_this3.options.maxFiles === null || _this3.options.maxFiles > 1) {\n _this3.hiddenFileInput.setAttribute(\"multiple\", \"multiple\");\n }\n _this3.hiddenFileInput.className = \"dz-hidden-input\";\n\n if (_this3.options.acceptedFiles !== null) {\n _this3.hiddenFileInput.setAttribute(\"accept\", _this3.options.acceptedFiles);\n }\n if (_this3.options.capture !== null) {\n _this3.hiddenFileInput.setAttribute(\"capture\", _this3.options.capture);\n }\n\n // Not setting `display=\"none\"` because some browsers don't accept clicks\n // on elements that aren't displayed.\n _this3.hiddenFileInput.style.visibility = \"hidden\";\n _this3.hiddenFileInput.style.position = \"absolute\";\n _this3.hiddenFileInput.style.top = \"0\";\n _this3.hiddenFileInput.style.left = \"0\";\n _this3.hiddenFileInput.style.height = \"0\";\n _this3.hiddenFileInput.style.width = \"0\";\n document.querySelector(_this3.options.hiddenInputContainer).appendChild(_this3.hiddenFileInput);\n return _this3.hiddenFileInput.addEventListener(\"change\", function () {\n var files = _this3.hiddenFileInput.files;\n\n if (files.length) {\n for (var _iterator10 = files, _isArray10 = true, _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _iterator10[Symbol.iterator]();;) {\n var _ref9;\n\n if (_isArray10) {\n if (_i10 >= _iterator10.length) break;\n _ref9 = _iterator10[_i10++];\n } else {\n _i10 = _iterator10.next();\n if (_i10.done) break;\n _ref9 = _i10.value;\n }\n\n var file = _ref9;\n\n _this3.addFile(file);\n }\n }\n _this3.emit(\"addedfiles\", files);\n return setupHiddenFileInput();\n });\n };\n setupHiddenFileInput();\n }\n\n this.URL = window.URL !== null ? window.URL : window.webkitURL;\n\n // Setup all event listeners on the Dropzone object itself.\n // They're not in @setupEventListeners() because they shouldn't be removed\n // again when the dropzone gets disabled.\n for (var _iterator11 = this.events, _isArray11 = true, _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _iterator11[Symbol.iterator]();;) {\n var _ref10;\n\n if (_isArray11) {\n if (_i11 >= _iterator11.length) break;\n _ref10 = _iterator11[_i11++];\n } else {\n _i11 = _iterator11.next();\n if (_i11.done) break;\n _ref10 = _i11.value;\n }\n\n var eventName = _ref10;\n\n this.on(eventName, this.options[eventName]);\n }\n\n this.on(\"uploadprogress\", function () {\n return _this3.updateTotalUploadProgress();\n });\n\n this.on(\"removedfile\", function () {\n return _this3.updateTotalUploadProgress();\n });\n\n this.on(\"canceled\", function (file) {\n return _this3.emit(\"complete\", file);\n });\n\n // Emit a `queuecomplete` event if all files finished uploading.\n this.on(\"complete\", function (file) {\n if (_this3.getAddedFiles().length === 0 && _this3.getUploadingFiles().length === 0 && _this3.getQueuedFiles().length === 0) {\n // This needs to be deferred so that `queuecomplete` really triggers after `complete`\n return setTimeout(function () {\n return _this3.emit(\"queuecomplete\");\n }, 0);\n }\n });\n\n var noPropagation = function noPropagation(e) {\n e.stopPropagation();\n if (e.preventDefault) {\n return e.preventDefault();\n } else {\n return e.returnValue = false;\n }\n };\n\n // Create the listeners\n this.listeners = [{\n element: this.element,\n events: {\n \"dragstart\": function dragstart(e) {\n return _this3.emit(\"dragstart\", e);\n },\n \"dragenter\": function dragenter(e) {\n noPropagation(e);\n return _this3.emit(\"dragenter\", e);\n },\n \"dragover\": function dragover(e) {\n // Makes it possible to drag files from chrome's download bar\n // http://stackoverflow.com/questions/19526430/drag-and-drop-file-uploads-from-chrome-downloads-bar\n // Try is required to prevent bug in Internet Explorer 11 (SCRIPT65535 exception)\n var efct = void 0;\n try {\n efct = e.dataTransfer.effectAllowed;\n } catch (error) {}\n e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy';\n\n noPropagation(e);\n return _this3.emit(\"dragover\", e);\n },\n \"dragleave\": function dragleave(e) {\n return _this3.emit(\"dragleave\", e);\n },\n \"drop\": function drop(e) {\n noPropagation(e);\n return _this3.drop(e);\n },\n \"dragend\": function dragend(e) {\n return _this3.emit(\"dragend\", e);\n }\n\n // This is disabled right now, because the browsers don't implement it properly.\n // \"paste\": (e) =>\n // noPropagation e\n // @paste e\n } }];\n\n this.clickableElements.forEach(function (clickableElement) {\n return _this3.listeners.push({\n element: clickableElement,\n events: {\n \"click\": function click(evt) {\n // Only the actual dropzone or the message element should trigger file selection\n if (clickableElement !== _this3.element || evt.target === _this3.element || Dropzone.elementInside(evt.target, _this3.element.querySelector(\".dz-message\"))) {\n _this3.hiddenFileInput.click(); // Forward the click\n }\n return true;\n }\n }\n });\n });\n\n this.enable();\n\n return this.options.init.call(this);\n }\n\n // Not fully tested yet\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.disable();\n this.removeAllFiles(true);\n if (this.hiddenFileInput != null ? this.hiddenFileInput.parentNode : undefined) {\n this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput);\n this.hiddenFileInput = null;\n }\n delete this.element.dropzone;\n return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1);\n }\n }, {\n key: \"updateTotalUploadProgress\",\n value: function updateTotalUploadProgress() {\n var totalUploadProgress = void 0;\n var totalBytesSent = 0;\n var totalBytes = 0;\n\n var activeFiles = this.getActiveFiles();\n\n if (activeFiles.length) {\n for (var _iterator12 = this.getActiveFiles(), _isArray12 = true, _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _iterator12[Symbol.iterator]();;) {\n var _ref11;\n\n if (_isArray12) {\n if (_i12 >= _iterator12.length) break;\n _ref11 = _iterator12[_i12++];\n } else {\n _i12 = _iterator12.next();\n if (_i12.done) break;\n _ref11 = _i12.value;\n }\n\n var file = _ref11;\n\n totalBytesSent += file.upload.bytesSent;\n totalBytes += file.upload.total;\n }\n totalUploadProgress = 100 * totalBytesSent / totalBytes;\n } else {\n totalUploadProgress = 100;\n }\n\n return this.emit(\"totaluploadprogress\", totalUploadProgress, totalBytes, totalBytesSent);\n }\n\n // @options.paramName can be a function taking one parameter rather than a string.\n // A parameter name for a file is obtained simply by calling this with an index number.\n\n }, {\n key: \"_getParamName\",\n value: function _getParamName(n) {\n if (typeof this.options.paramName === \"function\") {\n return this.options.paramName(n);\n } else {\n return \"\" + this.options.paramName + (this.options.uploadMultiple ? \"[\" + n + \"]\" : \"\");\n }\n }\n\n // If @options.renameFile is a function,\n // the function will be used to rename the file.name before appending it to the formData\n\n }, {\n key: \"_renameFile\",\n value: function _renameFile(file) {\n if (typeof this.options.renameFile !== \"function\") {\n return file.name;\n }\n return this.options.renameFile(file);\n }\n\n // Returns a form that can be used as fallback if the browser does not support DragnDrop\n //\n // If the dropzone is already a form, only the input field and button are returned. Otherwise a complete form element is provided.\n // This code has to pass in IE7 :(\n\n }, {\n key: \"getFallbackForm\",\n value: function getFallbackForm() {\n var existingFallback = void 0,\n form = void 0;\n if (existingFallback = this.getExistingFallback()) {\n return existingFallback;\n }\n\n var fieldsString = \"<div class=\\\"dz-fallback\\\">\";\n if (this.options.dictFallbackText) {\n fieldsString += \"<p>\" + this.options.dictFallbackText + \"</p>\";\n }\n fieldsString += \"<input type=\\\"file\\\" name=\\\"\" + this._getParamName(0) + \"\\\" \" + (this.options.uploadMultiple ? 'multiple=\"multiple\"' : undefined) + \" /><input type=\\\"submit\\\" value=\\\"Upload!\\\"></div>\";\n\n var fields = Dropzone.createElement(fieldsString);\n if (this.element.tagName !== \"FORM\") {\n form = Dropzone.createElement(\"<form action=\\\"\" + this.options.url + \"\\\" enctype=\\\"multipart/form-data\\\" method=\\\"\" + this.options.method + \"\\\"></form>\");\n form.appendChild(fields);\n } else {\n // Make sure that the enctype and method attributes are set properly\n this.element.setAttribute(\"enctype\", \"multipart/form-data\");\n this.element.setAttribute(\"method\", this.options.method);\n }\n return form != null ? form : fields;\n }\n\n // Returns the fallback elements if they exist already\n //\n // This code has to pass in IE7 :(\n\n }, {\n key: \"getExistingFallback\",\n value: function getExistingFallback() {\n var getFallback = function getFallback(elements) {\n for (var _iterator13 = elements, _isArray13 = true, _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _iterator13[Symbol.iterator]();;) {\n var _ref12;\n\n if (_isArray13) {\n if (_i13 >= _iterator13.length) break;\n _ref12 = _iterator13[_i13++];\n } else {\n _i13 = _iterator13.next();\n if (_i13.done) break;\n _ref12 = _i13.value;\n }\n\n var el = _ref12;\n\n if (/(^| )fallback($| )/.test(el.className)) {\n return el;\n }\n }\n };\n\n var _arr = [\"div\", \"form\"];\n for (var _i14 = 0; _i14 < _arr.length; _i14++) {\n var tagName = _arr[_i14];\n var fallback;\n if (fallback = getFallback(this.element.getElementsByTagName(tagName))) {\n return fallback;\n }\n }\n }\n\n // Activates all listeners stored in @listeners\n\n }, {\n key: \"setupEventListeners\",\n value: function setupEventListeners() {\n return this.listeners.map(function (elementListeners) {\n return function () {\n var result = [];\n for (var event in elementListeners.events) {\n var listener = elementListeners.events[event];\n result.push(elementListeners.element.addEventListener(event, listener, false));\n }\n return result;\n }();\n });\n }\n\n // Deactivates all listeners stored in @listeners\n\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n return this.listeners.map(function (elementListeners) {\n return function () {\n var result = [];\n for (var event in elementListeners.events) {\n var listener = elementListeners.events[event];\n result.push(elementListeners.element.removeEventListener(event, listener, false));\n }\n return result;\n }();\n });\n }\n\n // Removes all event listeners and cancels all files in the queue or being processed.\n\n }, {\n key: \"disable\",\n value: function disable() {\n var _this4 = this;\n\n this.clickableElements.forEach(function (element) {\n return element.classList.remove(\"dz-clickable\");\n });\n this.removeEventListeners();\n this.disabled = true;\n\n return this.files.map(function (file) {\n return _this4.cancelUpload(file);\n });\n }\n }, {\n key: \"enable\",\n value: function enable() {\n delete this.disabled;\n this.clickableElements.forEach(function (element) {\n return element.classList.add(\"dz-clickable\");\n });\n return this.setupEventListeners();\n }\n\n // Returns a nicely formatted filesize\n\n }, {\n key: \"filesize\",\n value: function filesize(size) {\n var selectedSize = 0;\n var selectedUnit = \"b\";\n\n if (size > 0) {\n var units = ['tb', 'gb', 'mb', 'kb', 'b'];\n\n for (var i = 0; i < units.length; i++) {\n var unit = units[i];\n var cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10;\n\n if (size >= cutoff) {\n selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i);\n selectedUnit = unit;\n break;\n }\n }\n\n selectedSize = Math.round(10 * selectedSize) / 10; // Cutting of digits\n }\n\n return \"<strong>\" + selectedSize + \"</strong> \" + this.options.dictFileSizeUnits[selectedUnit];\n }\n\n // Adds or removes the `dz-max-files-reached` class from the form.\n\n }, {\n key: \"_updateMaxFilesReachedClass\",\n value: function _updateMaxFilesReachedClass() {\n if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n if (this.getAcceptedFiles().length === this.options.maxFiles) {\n this.emit('maxfilesreached', this.files);\n }\n return this.element.classList.add(\"dz-max-files-reached\");\n } else {\n return this.element.classList.remove(\"dz-max-files-reached\");\n }\n }\n }, {\n key: \"drop\",\n value: function drop(e) {\n if (!e.dataTransfer) {\n return;\n }\n this.emit(\"drop\", e);\n\n // Convert the FileList to an Array\n // This is necessary for IE11\n var files = [];\n for (var i = 0; i < e.dataTransfer.files.length; i++) {\n files[i] = e.dataTransfer.files[i];\n }\n\n this.emit(\"addedfiles\", files);\n\n // Even if it's a folder, files.length will contain the folders.\n if (files.length) {\n var items = e.dataTransfer.items;\n\n if (items && items.length && items[0].webkitGetAsEntry != null) {\n // The browser supports dropping of folders, so handle items instead of files\n this._addFilesFromItems(items);\n } else {\n this.handleFiles(files);\n }\n }\n }\n }, {\n key: \"paste\",\n value: function paste(e) {\n if (__guard__(e != null ? e.clipboardData : undefined, function (x) {\n return x.items;\n }) == null) {\n return;\n }\n\n this.emit(\"paste\", e);\n var items = e.clipboardData.items;\n\n\n if (items.length) {\n return this._addFilesFromItems(items);\n }\n }\n }, {\n key: \"handleFiles\",\n value: function handleFiles(files) {\n for (var _iterator14 = files, _isArray14 = true, _i15 = 0, _iterator14 = _isArray14 ? _iterator14 : _iterator14[Symbol.iterator]();;) {\n var _ref13;\n\n if (_isArray14) {\n if (_i15 >= _iterator14.length) break;\n _ref13 = _iterator14[_i15++];\n } else {\n _i15 = _iterator14.next();\n if (_i15.done) break;\n _ref13 = _i15.value;\n }\n\n var file = _ref13;\n\n this.addFile(file);\n }\n }\n\n // When a folder is dropped (or files are pasted), items must be handled\n // instead of files.\n\n }, {\n key: \"_addFilesFromItems\",\n value: function _addFilesFromItems(items) {\n var _this5 = this;\n\n return function () {\n var result = [];\n for (var _iterator15 = items, _isArray15 = true, _i16 = 0, _iterator15 = _isArray15 ? _iterator15 : _iterator15[Symbol.iterator]();;) {\n var _ref14;\n\n if (_isArray15) {\n if (_i16 >= _iterator15.length) break;\n _ref14 = _iterator15[_i16++];\n } else {\n _i16 = _iterator15.next();\n if (_i16.done) break;\n _ref14 = _i16.value;\n }\n\n var item = _ref14;\n\n var entry;\n if (item.webkitGetAsEntry != null && (entry = item.webkitGetAsEntry())) {\n if (entry.isFile) {\n result.push(_this5.addFile(item.getAsFile()));\n } else if (entry.isDirectory) {\n // Append all files from that directory to files\n result.push(_this5._addFilesFromDirectory(entry, entry.name));\n } else {\n result.push(undefined);\n }\n } else if (item.getAsFile != null) {\n if (item.kind == null || item.kind === \"file\") {\n result.push(_this5.addFile(item.getAsFile()));\n } else {\n result.push(undefined);\n }\n } else {\n result.push(undefined);\n }\n }\n return result;\n }();\n }\n\n // Goes through the directory, and adds each file it finds recursively\n\n }, {\n key: \"_addFilesFromDirectory\",\n value: function _addFilesFromDirectory(directory, path) {\n var _this6 = this;\n\n var dirReader = directory.createReader();\n\n var errorHandler = function errorHandler(error) {\n return __guardMethod__(console, 'log', function (o) {\n return o.log(error);\n });\n };\n\n var readEntries = function readEntries() {\n return dirReader.readEntries(function (entries) {\n if (entries.length > 0) {\n for (var _iterator16 = entries, _isArray16 = true, _i17 = 0, _iterator16 = _isArray16 ? _iterator16 : _iterator16[Symbol.iterator]();;) {\n var _ref15;\n\n if (_isArray16) {\n if (_i17 >= _iterator16.length) break;\n _ref15 = _iterator16[_i17++];\n } else {\n _i17 = _iterator16.next();\n if (_i17.done) break;\n _ref15 = _i17.value;\n }\n\n var entry = _ref15;\n\n if (entry.isFile) {\n entry.file(function (file) {\n if (_this6.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') {\n return;\n }\n file.fullPath = path + \"/\" + file.name;\n return _this6.addFile(file);\n });\n } else if (entry.isDirectory) {\n _this6._addFilesFromDirectory(entry, path + \"/\" + entry.name);\n }\n }\n\n // Recursively call readEntries() again, since browser only handle\n // the first 100 entries.\n // See: https://developer.mozilla.org/en-US/docs/Web/API/DirectoryReader#readEntries\n readEntries();\n }\n return null;\n }, errorHandler);\n };\n\n return readEntries();\n }\n\n // If `done()` is called without argument the file is accepted\n // If you call it with an error message, the file is rejected\n // (This allows for asynchronous validation)\n //\n // This function checks the filesize, and if the file.type passes the\n // `acceptedFiles` check.\n\n }, {\n key: \"accept\",\n value: function accept(file, done) {\n if (file.size > this.options.maxFilesize * 1024 * 1024) {\n return done(this.options.dictFileTooBig.replace(\"{{filesize}}\", Math.round(file.size / 1024 / 10.24) / 100).replace(\"{{maxFilesize}}\", this.options.maxFilesize));\n } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) {\n return done(this.options.dictInvalidFileType);\n } else if (this.options.maxFiles != null && this.getAcceptedFiles().length >= this.options.maxFiles) {\n done(this.options.dictMaxFilesExceeded.replace(\"{{maxFiles}}\", this.options.maxFiles));\n return this.emit(\"maxfilesexceeded\", file);\n } else {\n return this.options.accept.call(this, file, done);\n }\n }\n }, {\n key: \"addFile\",\n value: function addFile(file) {\n var _this7 = this;\n\n file.upload = {\n uuid: Dropzone.uuidv4(),\n progress: 0,\n // Setting the total upload size to file.size for the beginning\n // It's actual different than the size to be transmitted.\n total: file.size,\n bytesSent: 0,\n filename: this._renameFile(file),\n chunked: this.options.chunking && (this.options.forceChunking || file.size > this.options.chunkSize),\n totalChunkCount: Math.ceil(file.size / this.options.chunkSize)\n };\n this.files.push(file);\n\n file.status = Dropzone.ADDED;\n\n this.emit(\"addedfile\", file);\n\n this._enqueueThumbnail(file);\n\n return this.accept(file, function (error) {\n if (error) {\n file.accepted = false;\n _this7._errorProcessing([file], error); // Will set the file.status\n } else {\n file.accepted = true;\n if (_this7.options.autoQueue) {\n _this7.enqueueFile(file);\n } // Will set .accepted = true\n }\n return _this7._updateMaxFilesReachedClass();\n });\n }\n\n // Wrapper for enqueueFile\n\n }, {\n key: \"enqueueFiles\",\n value: function enqueueFiles(files) {\n for (var _iterator17 = files, _isArray17 = true, _i18 = 0, _iterator17 = _isArray17 ? _iterator17 : _iterator17[Symbol.iterator]();;) {\n var _ref16;\n\n if (_isArray17) {\n if (_i18 >= _iterator17.length) break;\n _ref16 = _iterator17[_i18++];\n } else {\n _i18 = _iterator17.next();\n if (_i18.done) break;\n _ref16 = _i18.value;\n }\n\n var file = _ref16;\n\n this.enqueueFile(file);\n }\n return null;\n }\n }, {\n key: \"enqueueFile\",\n value: function enqueueFile(file) {\n var _this8 = this;\n\n if (file.status === Dropzone.ADDED && file.accepted === true) {\n file.status = Dropzone.QUEUED;\n if (this.options.autoProcessQueue) {\n return setTimeout(function () {\n return _this8.processQueue();\n }, 0); // Deferring the call\n }\n } else {\n throw new Error(\"This file can't be queued because it has already been processed or was rejected.\");\n }\n }\n }, {\n key: \"_enqueueThumbnail\",\n value: function _enqueueThumbnail(file) {\n var _this9 = this;\n\n if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) {\n this._thumbnailQueue.push(file);\n return setTimeout(function () {\n return _this9._processThumbnailQueue();\n }, 0); // Deferring the call\n }\n }\n }, {\n key: \"_processThumbnailQueue\",\n value: function _processThumbnailQueue() {\n var _this10 = this;\n\n if (this._processingThumbnail || this._thumbnailQueue.length === 0) {\n return;\n }\n\n this._processingThumbnail = true;\n var file = this._thumbnailQueue.shift();\n return this.createThumbnail(file, this.options.thumbnailWidth, this.options.thumbnailHeight, this.options.thumbnailMethod, true, function (dataUrl) {\n _this10.emit(\"thumbnail\", file, dataUrl);\n _this10._processingThumbnail = false;\n return _this10._processThumbnailQueue();\n });\n }\n\n // Can be called by the user to remove a file\n\n }, {\n key: \"removeFile\",\n value: function removeFile(file) {\n if (file.status === Dropzone.UPLOADING) {\n this.cancelUpload(file);\n }\n this.files = without(this.files, file);\n\n this.emit(\"removedfile\", file);\n if (this.files.length === 0) {\n return this.emit(\"reset\");\n }\n }\n\n // Removes all files that aren't currently processed from the list\n\n }, {\n key: \"removeAllFiles\",\n value: function removeAllFiles(cancelIfNecessary) {\n // Create a copy of files since removeFile() changes the @files array.\n if (cancelIfNecessary == null) {\n cancelIfNecessary = false;\n }\n for (var _iterator18 = this.files.slice(), _isArray18 = true, _i19 = 0, _iterator18 = _isArray18 ? _iterator18 : _iterator18[Symbol.iterator]();;) {\n var _ref17;\n\n if (_isArray18) {\n if (_i19 >= _iterator18.length) break;\n _ref17 = _iterator18[_i19++];\n } else {\n _i19 = _iterator18.next();\n if (_i19.done) break;\n _ref17 = _i19.value;\n }\n\n var file = _ref17;\n\n if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) {\n this.removeFile(file);\n }\n }\n return null;\n }\n\n // Resizes an image before it gets sent to the server. This function is the default behavior of\n // `options.transformFile` if `resizeWidth` or `resizeHeight` are set. The callback is invoked with\n // the resized blob.\n\n }, {\n key: \"resizeImage\",\n value: function resizeImage(file, width, height, resizeMethod, callback) {\n var _this11 = this;\n\n return this.createThumbnail(file, width, height, resizeMethod, false, function (dataUrl, canvas) {\n if (canvas == null) {\n // The image has not been resized\n return callback(file);\n } else {\n var resizeMimeType = _this11.options.resizeMimeType;\n\n if (resizeMimeType == null) {\n resizeMimeType = file.type;\n }\n var resizedDataURL = canvas.toDataURL(resizeMimeType, _this11.options.resizeQuality);\n if (resizeMimeType === 'image/jpeg' || resizeMimeType === 'image/jpg') {\n // Now add the original EXIF information\n resizedDataURL = ExifRestore.restore(file.dataURL, resizedDataURL);\n }\n return callback(Dropzone.dataURItoBlob(resizedDataURL));\n }\n });\n }\n }, {\n key: \"createThumbnail\",\n value: function createThumbnail(file, width, height, resizeMethod, fixOrientation, callback) {\n var _this12 = this;\n\n var fileReader = new FileReader();\n\n fileReader.onload = function () {\n\n file.dataURL = fileReader.result;\n\n // Don't bother creating a thumbnail for SVG images since they're vector\n if (file.type === \"image/svg+xml\") {\n if (callback != null) {\n callback(fileReader.result);\n }\n return;\n }\n\n return _this12.createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback);\n };\n\n return fileReader.readAsDataURL(file);\n }\n }, {\n key: \"createThumbnailFromUrl\",\n value: function createThumbnailFromUrl(file, width, height, resizeMethod, fixOrientation, callback, crossOrigin) {\n var _this13 = this;\n\n // Not using `new Image` here because of a bug in latest Chrome versions.\n // See https://github.com/enyo/dropzone/pull/226\n var img = document.createElement(\"img\");\n\n if (crossOrigin) {\n img.crossOrigin = crossOrigin;\n }\n\n img.onload = function () {\n var loadExif = function loadExif(callback) {\n return callback(1);\n };\n if (typeof EXIF !== 'undefined' && EXIF !== null && fixOrientation) {\n loadExif = function loadExif(callback) {\n return EXIF.getData(img, function () {\n return callback(EXIF.getTag(this, 'Orientation'));\n });\n };\n }\n\n return loadExif(function (orientation) {\n file.width = img.width;\n file.height = img.height;\n\n var resizeInfo = _this13.options.resize.call(_this13, file, width, height, resizeMethod);\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n\n canvas.width = resizeInfo.trgWidth;\n canvas.height = resizeInfo.trgHeight;\n\n if (orientation > 4) {\n canvas.width = resizeInfo.trgHeight;\n canvas.height = resizeInfo.trgWidth;\n }\n\n switch (orientation) {\n case 2:\n // horizontal flip\n ctx.translate(canvas.width, 0);\n ctx.scale(-1, 1);\n break;\n case 3:\n // 180° rotate left\n ctx.translate(canvas.width, canvas.height);\n ctx.rotate(Math.PI);\n break;\n case 4:\n // vertical flip\n ctx.translate(0, canvas.height);\n ctx.scale(1, -1);\n break;\n case 5:\n // vertical flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.scale(1, -1);\n break;\n case 6:\n // 90° rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(0, -canvas.height);\n break;\n case 7:\n // horizontal flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(canvas.width, -canvas.height);\n ctx.scale(-1, 1);\n break;\n case 8:\n // 90° rotate left\n ctx.rotate(-0.5 * Math.PI);\n ctx.translate(-canvas.width, 0);\n break;\n }\n\n // This is a bugfix for iOS' scaling bug.\n drawImageIOSFix(ctx, img, resizeInfo.srcX != null ? resizeInfo.srcX : 0, resizeInfo.srcY != null ? resizeInfo.srcY : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, resizeInfo.trgX != null ? resizeInfo.trgX : 0, resizeInfo.trgY != null ? resizeInfo.trgY : 0, resizeInfo.trgWidth, resizeInfo.trgHeight);\n\n var thumbnail = canvas.toDataURL(\"image/png\");\n\n if (callback != null) {\n return callback(thumbnail, canvas);\n }\n });\n };\n\n if (callback != null) {\n img.onerror = callback;\n }\n\n return img.src = file.dataURL;\n }\n\n // Goes through the queue and processes files if there aren't too many already.\n\n }, {\n key: \"processQueue\",\n value: function processQueue() {\n var parallelUploads = this.options.parallelUploads;\n\n var processingLength = this.getUploadingFiles().length;\n var i = processingLength;\n\n // There are already at least as many files uploading than should be\n if (processingLength >= parallelUploads) {\n return;\n }\n\n var queuedFiles = this.getQueuedFiles();\n\n if (!(queuedFiles.length > 0)) {\n return;\n }\n\n if (this.options.uploadMultiple) {\n // The files should be uploaded in one request\n return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength));\n } else {\n while (i < parallelUploads) {\n if (!queuedFiles.length) {\n return;\n } // Nothing left to process\n this.processFile(queuedFiles.shift());\n i++;\n }\n }\n }\n\n // Wrapper for `processFiles`\n\n }, {\n key: \"processFile\",\n value: function processFile(file) {\n return this.processFiles([file]);\n }\n\n // Loads the file, then calls finishedLoading()\n\n }, {\n key: \"processFiles\",\n value: function processFiles(files) {\n for (var _iterator19 = files, _isArray19 = true, _i20 = 0, _iterator19 = _isArray19 ? _iterator19 : _iterator19[Symbol.iterator]();;) {\n var _ref18;\n\n if (_isArray19) {\n if (_i20 >= _iterator19.length) break;\n _ref18 = _iterator19[_i20++];\n } else {\n _i20 = _iterator19.next();\n if (_i20.done) break;\n _ref18 = _i20.value;\n }\n\n var file = _ref18;\n\n file.processing = true; // Backwards compatibility\n file.status = Dropzone.UPLOADING;\n\n this.emit(\"processing\", file);\n }\n\n if (this.options.uploadMultiple) {\n this.emit(\"processingmultiple\", files);\n }\n\n return this.uploadFiles(files);\n }\n }, {\n key: \"_getFilesWithXhr\",\n value: function _getFilesWithXhr(xhr) {\n var files = void 0;\n return files = this.files.filter(function (file) {\n return file.xhr === xhr;\n }).map(function (file) {\n return file;\n });\n }\n\n // Cancels the file upload and sets the status to CANCELED\n // **if** the file is actually being uploaded.\n // If it's still in the queue, the file is being removed from it and the status\n // set to CANCELED.\n\n }, {\n key: \"cancelUpload\",\n value: function cancelUpload(file) {\n if (file.status === Dropzone.UPLOADING) {\n var groupedFiles = this._getFilesWithXhr(file.xhr);\n for (var _iterator20 = groupedFiles, _isArray20 = true, _i21 = 0, _iterator20 = _isArray20 ? _iterator20 : _iterator20[Symbol.iterator]();;) {\n var _ref19;\n\n if (_isArray20) {\n if (_i21 >= _iterator20.length) break;\n _ref19 = _iterator20[_i21++];\n } else {\n _i21 = _iterator20.next();\n if (_i21.done) break;\n _ref19 = _i21.value;\n }\n\n var groupedFile = _ref19;\n\n groupedFile.status = Dropzone.CANCELED;\n }\n if (typeof file.xhr !== 'undefined') {\n file.xhr.abort();\n }\n for (var _iterator21 = groupedFiles, _isArray21 = true, _i22 = 0, _iterator21 = _isArray21 ? _iterator21 : _iterator21[Symbol.iterator]();;) {\n var _ref20;\n\n if (_isArray21) {\n if (_i22 >= _iterator21.length) break;\n _ref20 = _iterator21[_i22++];\n } else {\n _i22 = _iterator21.next();\n if (_i22.done) break;\n _ref20 = _i22.value;\n }\n\n var _groupedFile = _ref20;\n\n this.emit(\"canceled\", _groupedFile);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", groupedFiles);\n }\n } else if (file.status === Dropzone.ADDED || file.status === Dropzone.QUEUED) {\n file.status = Dropzone.CANCELED;\n this.emit(\"canceled\", file);\n if (this.options.uploadMultiple) {\n this.emit(\"canceledmultiple\", [file]);\n }\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n }\n }, {\n key: \"resolveOption\",\n value: function resolveOption(option) {\n if (typeof option === 'function') {\n for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return option.apply(this, args);\n }\n return option;\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(file) {\n return this.uploadFiles([file]);\n }\n }, {\n key: \"uploadFiles\",\n value: function uploadFiles(files) {\n var _this14 = this;\n\n this._transformFiles(files, function (transformedFiles) {\n if (files[0].upload.chunked) {\n // This file should be sent in chunks!\n\n // If the chunking option is set, we **know** that there can only be **one** file, since\n // uploadMultiple is not allowed with this option.\n var file = files[0];\n var transformedFile = transformedFiles[0];\n var startedChunkCount = 0;\n\n file.upload.chunks = [];\n\n var handleNextChunk = function handleNextChunk() {\n var chunkIndex = 0;\n\n // Find the next item in file.upload.chunks that is not defined yet.\n while (file.upload.chunks[chunkIndex] !== undefined) {\n chunkIndex++;\n }\n\n // This means, that all chunks have already been started.\n if (chunkIndex >= file.upload.totalChunkCount) return;\n\n startedChunkCount++;\n\n var start = chunkIndex * _this14.options.chunkSize;\n var end = Math.min(start + _this14.options.chunkSize, file.size);\n\n var dataBlock = {\n name: _this14._getParamName(0),\n data: transformedFile.webkitSlice ? transformedFile.webkitSlice(start, end) : transformedFile.slice(start, end),\n filename: file.upload.filename,\n chunkIndex: chunkIndex\n };\n\n file.upload.chunks[chunkIndex] = {\n file: file,\n index: chunkIndex,\n dataBlock: dataBlock, // In case we want to retry.\n status: Dropzone.UPLOADING,\n progress: 0,\n retries: 0 // The number of times this block has been retried.\n };\n\n _this14._uploadData(files, [dataBlock]);\n };\n\n file.upload.finishedChunkUpload = function (chunk) {\n var allFinished = true;\n chunk.status = Dropzone.SUCCESS;\n\n // Clear the data from the chunk\n chunk.dataBlock = null;\n\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n if (file.upload.chunks[i] === undefined) {\n return handleNextChunk();\n }\n if (file.upload.chunks[i].status !== Dropzone.SUCCESS) {\n allFinished = false;\n }\n }\n\n if (allFinished) {\n _this14.options.chunksUploaded(file, function () {\n _this14._finished(files, '', null);\n });\n }\n };\n\n if (_this14.options.parallelChunkUploads) {\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n handleNextChunk();\n }\n } else {\n handleNextChunk();\n }\n } else {\n var dataBlocks = [];\n for (var _i23 = 0; _i23 < files.length; _i23++) {\n dataBlocks[_i23] = {\n name: _this14._getParamName(_i23),\n data: transformedFiles[_i23],\n filename: files[_i23].upload.filename\n };\n }\n _this14._uploadData(files, dataBlocks);\n }\n });\n }\n\n /// Returns the right chunk for given file and xhr\n\n }, {\n key: \"_getChunk\",\n value: function _getChunk(file, xhr) {\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].xhr === xhr) {\n return file.upload.chunks[i];\n }\n }\n }\n\n // This function actually uploads the file(s) to the server.\n // If dataBlocks contains the actual data to upload (meaning, that this could either be transformed\n // files, or individual chunks for chunked upload).\n\n }, {\n key: \"_uploadData\",\n value: function _uploadData(files, dataBlocks) {\n var _this15 = this;\n\n var xhr = new XMLHttpRequest();\n\n // Put the xhr object in the file objects to be able to reference it later.\n for (var _iterator22 = files, _isArray22 = true, _i24 = 0, _iterator22 = _isArray22 ? _iterator22 : _iterator22[Symbol.iterator]();;) {\n var _ref21;\n\n if (_isArray22) {\n if (_i24 >= _iterator22.length) break;\n _ref21 = _iterator22[_i24++];\n } else {\n _i24 = _iterator22.next();\n if (_i24.done) break;\n _ref21 = _i24.value;\n }\n\n var file = _ref21;\n\n file.xhr = xhr;\n }\n if (files[0].upload.chunked) {\n // Put the xhr object in the right chunk object, so it can be associated later, and found with _getChunk\n files[0].upload.chunks[dataBlocks[0].chunkIndex].xhr = xhr;\n }\n\n var method = this.resolveOption(this.options.method, files);\n var url = this.resolveOption(this.options.url, files);\n xhr.open(method, url, true);\n\n // Setting the timeout after open because of IE11 issue: https://gitlab.com/meno/dropzone/issues/8\n xhr.timeout = this.resolveOption(this.options.timeout, files);\n\n // Has to be after `.open()`. See https://github.com/enyo/dropzone/issues/179\n xhr.withCredentials = !!this.options.withCredentials;\n\n xhr.onload = function (e) {\n _this15._finishedUploading(files, xhr, e);\n };\n\n xhr.onerror = function () {\n _this15._handleUploadError(files, xhr);\n };\n\n // Some browsers do not have the .upload property\n var progressObj = xhr.upload != null ? xhr.upload : xhr;\n progressObj.onprogress = function (e) {\n return _this15._updateFilesUploadProgress(files, xhr, e);\n };\n\n var headers = {\n \"Accept\": \"application/json\",\n \"Cache-Control\": \"no-cache\",\n \"X-Requested-With\": \"XMLHttpRequest\"\n };\n\n if (this.options.headers) {\n Dropzone.extend(headers, this.options.headers);\n }\n\n for (var headerName in headers) {\n var headerValue = headers[headerName];\n if (headerValue) {\n xhr.setRequestHeader(headerName, headerValue);\n }\n }\n\n var formData = new FormData();\n\n // Adding all @options parameters\n if (this.options.params) {\n var additionalParams = this.options.params;\n if (typeof additionalParams === 'function') {\n additionalParams = additionalParams.call(this, files, xhr, files[0].upload.chunked ? this._getChunk(files[0], xhr) : null);\n }\n\n for (var key in additionalParams) {\n var value = additionalParams[key];\n formData.append(key, value);\n }\n }\n\n // Let the user add additional data if necessary\n for (var _iterator23 = files, _isArray23 = true, _i25 = 0, _iterator23 = _isArray23 ? _iterator23 : _iterator23[Symbol.iterator]();;) {\n var _ref22;\n\n if (_isArray23) {\n if (_i25 >= _iterator23.length) break;\n _ref22 = _iterator23[_i25++];\n } else {\n _i25 = _iterator23.next();\n if (_i25.done) break;\n _ref22 = _i25.value;\n }\n\n var _file = _ref22;\n\n this.emit(\"sending\", _file, xhr, formData);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"sendingmultiple\", files, xhr, formData);\n }\n\n this._addFormElementData(formData);\n\n // Finally add the files\n // Has to be last because some servers (eg: S3) expect the file to be the last parameter\n for (var i = 0; i < dataBlocks.length; i++) {\n var dataBlock = dataBlocks[i];\n formData.append(dataBlock.name, dataBlock.data, dataBlock.filename);\n }\n\n this.submitRequest(xhr, formData, files);\n }\n\n // Transforms all files with this.options.transformFile and invokes done with the transformed files when done.\n\n }, {\n key: \"_transformFiles\",\n value: function _transformFiles(files, done) {\n var _this16 = this;\n\n var transformedFiles = [];\n // Clumsy way of handling asynchronous calls, until I get to add a proper Future library.\n var doneCounter = 0;\n\n var _loop = function _loop(i) {\n _this16.options.transformFile.call(_this16, files[i], function (transformedFile) {\n transformedFiles[i] = transformedFile;\n if (++doneCounter === files.length) {\n done(transformedFiles);\n }\n });\n };\n\n for (var i = 0; i < files.length; i++) {\n _loop(i);\n }\n }\n\n // Takes care of adding other input elements of the form to the AJAX request\n\n }, {\n key: \"_addFormElementData\",\n value: function _addFormElementData(formData) {\n // Take care of other input elements\n if (this.element.tagName === \"FORM\") {\n for (var _iterator24 = this.element.querySelectorAll(\"input, textarea, select, button\"), _isArray24 = true, _i26 = 0, _iterator24 = _isArray24 ? _iterator24 : _iterator24[Symbol.iterator]();;) {\n var _ref23;\n\n if (_isArray24) {\n if (_i26 >= _iterator24.length) break;\n _ref23 = _iterator24[_i26++];\n } else {\n _i26 = _iterator24.next();\n if (_i26.done) break;\n _ref23 = _i26.value;\n }\n\n var input = _ref23;\n\n var inputName = input.getAttribute(\"name\");\n var inputType = input.getAttribute(\"type\");\n if (inputType) inputType = inputType.toLowerCase();\n\n // If the input doesn't have a name, we can't use it.\n if (typeof inputName === 'undefined' || inputName === null) continue;\n\n if (input.tagName === \"SELECT\" && input.hasAttribute(\"multiple\")) {\n // Possibly multiple values\n for (var _iterator25 = input.options, _isArray25 = true, _i27 = 0, _iterator25 = _isArray25 ? _iterator25 : _iterator25[Symbol.iterator]();;) {\n var _ref24;\n\n if (_isArray25) {\n if (_i27 >= _iterator25.length) break;\n _ref24 = _iterator25[_i27++];\n } else {\n _i27 = _iterator25.next();\n if (_i27.done) break;\n _ref24 = _i27.value;\n }\n\n var option = _ref24;\n\n if (option.selected) {\n formData.append(inputName, option.value);\n }\n }\n } else if (!inputType || inputType !== \"checkbox\" && inputType !== \"radio\" || input.checked) {\n formData.append(inputName, input.value);\n }\n }\n }\n }\n\n // Invoked when there is new progress information about given files.\n // If e is not provided, it is assumed that the upload is finished.\n\n }, {\n key: \"_updateFilesUploadProgress\",\n value: function _updateFilesUploadProgress(files, xhr, e) {\n var progress = void 0;\n if (typeof e !== 'undefined') {\n progress = 100 * e.loaded / e.total;\n\n if (files[0].upload.chunked) {\n var file = files[0];\n // Since this is a chunked upload, we need to update the appropriate chunk progress.\n var chunk = this._getChunk(file, xhr);\n chunk.progress = progress;\n chunk.total = e.total;\n chunk.bytesSent = e.loaded;\n var fileProgress = 0,\n fileTotal = void 0,\n fileBytesSent = void 0;\n file.upload.progress = 0;\n file.upload.total = 0;\n file.upload.bytesSent = 0;\n for (var i = 0; i < file.upload.totalChunkCount; i++) {\n if (file.upload.chunks[i] !== undefined && file.upload.chunks[i].progress !== undefined) {\n file.upload.progress += file.upload.chunks[i].progress;\n file.upload.total += file.upload.chunks[i].total;\n file.upload.bytesSent += file.upload.chunks[i].bytesSent;\n }\n }\n file.upload.progress = file.upload.progress / file.upload.totalChunkCount;\n } else {\n for (var _iterator26 = files, _isArray26 = true, _i28 = 0, _iterator26 = _isArray26 ? _iterator26 : _iterator26[Symbol.iterator]();;) {\n var _ref25;\n\n if (_isArray26) {\n if (_i28 >= _iterator26.length) break;\n _ref25 = _iterator26[_i28++];\n } else {\n _i28 = _iterator26.next();\n if (_i28.done) break;\n _ref25 = _i28.value;\n }\n\n var _file2 = _ref25;\n\n _file2.upload.progress = progress;\n _file2.upload.total = e.total;\n _file2.upload.bytesSent = e.loaded;\n }\n }\n for (var _iterator27 = files, _isArray27 = true, _i29 = 0, _iterator27 = _isArray27 ? _iterator27 : _iterator27[Symbol.iterator]();;) {\n var _ref26;\n\n if (_isArray27) {\n if (_i29 >= _iterator27.length) break;\n _ref26 = _iterator27[_i29++];\n } else {\n _i29 = _iterator27.next();\n if (_i29.done) break;\n _ref26 = _i29.value;\n }\n\n var _file3 = _ref26;\n\n this.emit(\"uploadprogress\", _file3, _file3.upload.progress, _file3.upload.bytesSent);\n }\n } else {\n // Called when the file finished uploading\n\n var allFilesFinished = true;\n\n progress = 100;\n\n for (var _iterator28 = files, _isArray28 = true, _i30 = 0, _iterator28 = _isArray28 ? _iterator28 : _iterator28[Symbol.iterator]();;) {\n var _ref27;\n\n if (_isArray28) {\n if (_i30 >= _iterator28.length) break;\n _ref27 = _iterator28[_i30++];\n } else {\n _i30 = _iterator28.next();\n if (_i30.done) break;\n _ref27 = _i30.value;\n }\n\n var _file4 = _ref27;\n\n if (_file4.upload.progress !== 100 || _file4.upload.bytesSent !== _file4.upload.total) {\n allFilesFinished = false;\n }\n _file4.upload.progress = progress;\n _file4.upload.bytesSent = _file4.upload.total;\n }\n\n // Nothing to do, all files already at 100%\n if (allFilesFinished) {\n return;\n }\n\n for (var _iterator29 = files, _isArray29 = true, _i31 = 0, _iterator29 = _isArray29 ? _iterator29 : _iterator29[Symbol.iterator]();;) {\n var _ref28;\n\n if (_isArray29) {\n if (_i31 >= _iterator29.length) break;\n _ref28 = _iterator29[_i31++];\n } else {\n _i31 = _iterator29.next();\n if (_i31.done) break;\n _ref28 = _i31.value;\n }\n\n var _file5 = _ref28;\n\n this.emit(\"uploadprogress\", _file5, progress, _file5.upload.bytesSent);\n }\n }\n }\n }, {\n key: \"_finishedUploading\",\n value: function _finishedUploading(files, xhr, e) {\n var response = void 0;\n\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n\n if (xhr.readyState !== 4) {\n return;\n }\n\n if (xhr.responseType !== 'arraybuffer' && xhr.responseType !== 'blob') {\n response = xhr.responseText;\n\n if (xhr.getResponseHeader(\"content-type\") && ~xhr.getResponseHeader(\"content-type\").indexOf(\"application/json\")) {\n try {\n response = JSON.parse(response);\n } catch (error) {\n e = error;\n response = \"Invalid JSON response from server.\";\n }\n }\n }\n\n this._updateFilesUploadProgress(files);\n\n if (!(200 <= xhr.status && xhr.status < 300)) {\n this._handleUploadError(files, xhr, response);\n } else {\n if (files[0].upload.chunked) {\n files[0].upload.finishedChunkUpload(this._getChunk(files[0], xhr));\n } else {\n this._finished(files, response, e);\n }\n }\n }\n }, {\n key: \"_handleUploadError\",\n value: function _handleUploadError(files, xhr, response) {\n if (files[0].status === Dropzone.CANCELED) {\n return;\n }\n\n if (files[0].upload.chunked && this.options.retryChunks) {\n var chunk = this._getChunk(files[0], xhr);\n if (chunk.retries++ < this.options.retryChunksLimit) {\n this._uploadData(files, [chunk.dataBlock]);\n return;\n } else {\n console.warn('Retried this chunk too often. Giving up.');\n }\n }\n\n for (var _iterator30 = files, _isArray30 = true, _i32 = 0, _iterator30 = _isArray30 ? _iterator30 : _iterator30[Symbol.iterator]();;) {\n var _ref29;\n\n if (_isArray30) {\n if (_i32 >= _iterator30.length) break;\n _ref29 = _iterator30[_i32++];\n } else {\n _i32 = _iterator30.next();\n if (_i32.done) break;\n _ref29 = _i32.value;\n }\n\n var file = _ref29;\n\n this._errorProcessing(files, response || this.options.dictResponseError.replace(\"{{statusCode}}\", xhr.status), xhr);\n }\n }\n }, {\n key: \"submitRequest\",\n value: function submitRequest(xhr, formData, files) {\n xhr.send(formData);\n }\n\n // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n\n }, {\n key: \"_finished\",\n value: function _finished(files, responseText, e) {\n for (var _iterator31 = files, _isArray31 = true, _i33 = 0, _iterator31 = _isArray31 ? _iterator31 : _iterator31[Symbol.iterator]();;) {\n var _ref30;\n\n if (_isArray31) {\n if (_i33 >= _iterator31.length) break;\n _ref30 = _iterator31[_i33++];\n } else {\n _i33 = _iterator31.next();\n if (_i33.done) break;\n _ref30 = _i33.value;\n }\n\n var file = _ref30;\n\n file.status = Dropzone.SUCCESS;\n this.emit(\"success\", file, responseText, e);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"successmultiple\", files, responseText, e);\n this.emit(\"completemultiple\", files);\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n }\n\n // Called internally when processing is finished.\n // Individual callbacks have to be called in the appropriate sections.\n\n }, {\n key: \"_errorProcessing\",\n value: function _errorProcessing(files, message, xhr) {\n for (var _iterator32 = files, _isArray32 = true, _i34 = 0, _iterator32 = _isArray32 ? _iterator32 : _iterator32[Symbol.iterator]();;) {\n var _ref31;\n\n if (_isArray32) {\n if (_i34 >= _iterator32.length) break;\n _ref31 = _iterator32[_i34++];\n } else {\n _i34 = _iterator32.next();\n if (_i34.done) break;\n _ref31 = _i34.value;\n }\n\n var file = _ref31;\n\n file.status = Dropzone.ERROR;\n this.emit(\"error\", file, message, xhr);\n this.emit(\"complete\", file);\n }\n if (this.options.uploadMultiple) {\n this.emit(\"errormultiple\", files, message, xhr);\n this.emit(\"completemultiple\", files);\n }\n\n if (this.options.autoProcessQueue) {\n return this.processQueue();\n }\n }\n }], [{\n key: \"uuidv4\",\n value: function uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n }\n }]);\n\n return Dropzone;\n}(Emitter);\n\nDropzone.initClass();\n\nDropzone.version = \"5.4.0\";\n\n// This is a map of options for your different dropzones. Add configurations\n// to this object for your different dropzone elemens.\n//\n// Example:\n//\n// Dropzone.options.myDropzoneElementId = { maxFilesize: 1 };\n//\n// To disable autoDiscover for a specific element, you can set `false` as an option:\n//\n// Dropzone.options.myDisabledElementId = false;\n//\n// And in html:\n//\n// <form action=\"/upload\" id=\"my-dropzone-element-id\" class=\"dropzone\"></form>\nDropzone.options = {};\n\n// Returns the options for an element or undefined if none available.\nDropzone.optionsForElement = function (element) {\n // Get the `Dropzone.options.elementId` for this element if it exists\n if (element.getAttribute(\"id\")) {\n return Dropzone.options[camelize(element.getAttribute(\"id\"))];\n } else {\n return undefined;\n }\n};\n\n// Holds a list of all dropzone instances\nDropzone.instances = [];\n\n// Returns the dropzone for given element if any\nDropzone.forElement = function (element) {\n if (typeof element === \"string\") {\n element = document.querySelector(element);\n }\n if ((element != null ? element.dropzone : undefined) == null) {\n throw new Error(\"No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.\");\n }\n return element.dropzone;\n};\n\n// Set to false if you don't want Dropzone to automatically find and attach to .dropzone elements.\nDropzone.autoDiscover = true;\n\n// Looks for all .dropzone elements and creates a dropzone for them\nDropzone.discover = function () {\n var dropzones = void 0;\n if (document.querySelectorAll) {\n dropzones = document.querySelectorAll(\".dropzone\");\n } else {\n dropzones = [];\n // IE :(\n var checkElements = function checkElements(elements) {\n return function () {\n var result = [];\n for (var _iterator33 = elements, _isArray33 = true, _i35 = 0, _iterator33 = _isArray33 ? _iterator33 : _iterator33[Symbol.iterator]();;) {\n var _ref32;\n\n if (_isArray33) {\n if (_i35 >= _iterator33.length) break;\n _ref32 = _iterator33[_i35++];\n } else {\n _i35 = _iterator33.next();\n if (_i35.done) break;\n _ref32 = _i35.value;\n }\n\n var el = _ref32;\n\n if (/(^| )dropzone($| )/.test(el.className)) {\n result.push(dropzones.push(el));\n } else {\n result.push(undefined);\n }\n }\n return result;\n }();\n };\n checkElements(document.getElementsByTagName(\"div\"));\n checkElements(document.getElementsByTagName(\"form\"));\n }\n\n return function () {\n var result = [];\n for (var _iterator34 = dropzones, _isArray34 = true, _i36 = 0, _iterator34 = _isArray34 ? _iterator34 : _iterator34[Symbol.iterator]();;) {\n var _ref33;\n\n if (_isArray34) {\n if (_i36 >= _iterator34.length) break;\n _ref33 = _iterator34[_i36++];\n } else {\n _i36 = _iterator34.next();\n if (_i36.done) break;\n _ref33 = _i36.value;\n }\n\n var dropzone = _ref33;\n\n // Create a dropzone unless auto discover has been disabled for specific element\n if (Dropzone.optionsForElement(dropzone) !== false) {\n result.push(new Dropzone(dropzone));\n } else {\n result.push(undefined);\n }\n }\n return result;\n }();\n};\n\n// Since the whole Drag'n'Drop API is pretty new, some browsers implement it,\n// but not correctly.\n// So I created a blacklist of userAgents. Yes, yes. Browser sniffing, I know.\n// But what to do when browsers *theoretically* support an API, but crash\n// when using it.\n//\n// This is a list of regular expressions tested against navigator.userAgent\n//\n// ** It should only be used on browser that *do* support the API, but\n// incorrectly **\n//\nDropzone.blacklistedBrowsers = [\n// The mac os and windows phone version of opera 12 seems to have a problem with the File drag'n'drop API.\n/opera.*(Macintosh|Windows Phone).*version\\/12/i];\n\n// Checks if the browser is supported\nDropzone.isBrowserSupported = function () {\n var capableBrowser = true;\n\n if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) {\n if (!(\"classList\" in document.createElement(\"a\"))) {\n capableBrowser = false;\n } else {\n // The browser supports the API, but may be blacklisted.\n for (var _iterator35 = Dropzone.blacklistedBrowsers, _isArray35 = true, _i37 = 0, _iterator35 = _isArray35 ? _iterator35 : _iterator35[Symbol.iterator]();;) {\n var _ref34;\n\n if (_isArray35) {\n if (_i37 >= _iterator35.length) break;\n _ref34 = _iterator35[_i37++];\n } else {\n _i37 = _iterator35.next();\n if (_i37.done) break;\n _ref34 = _i37.value;\n }\n\n var regex = _ref34;\n\n if (regex.test(navigator.userAgent)) {\n capableBrowser = false;\n continue;\n }\n }\n }\n } else {\n capableBrowser = false;\n }\n\n return capableBrowser;\n};\n\nDropzone.dataURItoBlob = function (dataURI) {\n // convert base64 to raw binary data held in a string\n // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this\n var byteString = atob(dataURI.split(',')[1]);\n\n // separate out the mime component\n var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n\n // write the bytes of the string to an ArrayBuffer\n var ab = new ArrayBuffer(byteString.length);\n var ia = new Uint8Array(ab);\n for (var i = 0, end = byteString.length, asc = 0 <= end; asc ? i <= end : i >= end; asc ? i++ : i--) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n // write the ArrayBuffer to a blob\n return new Blob([ab], { type: mimeString });\n};\n\n// Returns an array without the rejected item\nvar without = function without(list, rejectedItem) {\n return list.filter(function (item) {\n return item !== rejectedItem;\n }).map(function (item) {\n return item;\n });\n};\n\n// abc-def_ghi -> abcDefGhi\nvar camelize = function camelize(str) {\n return str.replace(/[\\-_](\\w)/g, function (match) {\n return match.charAt(1).toUpperCase();\n });\n};\n\n// Creates an element from string\nDropzone.createElement = function (string) {\n var div = document.createElement(\"div\");\n div.innerHTML = string;\n return div.childNodes[0];\n};\n\n// Tests if given element is inside (or simply is) the container\nDropzone.elementInside = function (element, container) {\n if (element === container) {\n return true;\n } // Coffeescript doesn't support do/while loops\n while (element = element.parentNode) {\n if (element === container) {\n return true;\n }\n }\n return false;\n};\n\nDropzone.getElement = function (el, name) {\n var element = void 0;\n if (typeof el === \"string\") {\n element = document.querySelector(el);\n } else if (el.nodeType != null) {\n element = el;\n }\n if (element == null) {\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector or a plain HTML element.\");\n }\n return element;\n};\n\nDropzone.getElements = function (els, name) {\n var el = void 0,\n elements = void 0;\n if (els instanceof Array) {\n elements = [];\n try {\n for (var _iterator36 = els, _isArray36 = true, _i38 = 0, _iterator36 = _isArray36 ? _iterator36 : _iterator36[Symbol.iterator]();;) {\n if (_isArray36) {\n if (_i38 >= _iterator36.length) break;\n el = _iterator36[_i38++];\n } else {\n _i38 = _iterator36.next();\n if (_i38.done) break;\n el = _i38.value;\n }\n\n elements.push(this.getElement(el, name));\n }\n } catch (e) {\n elements = null;\n }\n } else if (typeof els === \"string\") {\n elements = [];\n for (var _iterator37 = document.querySelectorAll(els), _isArray37 = true, _i39 = 0, _iterator37 = _isArray37 ? _iterator37 : _iterator37[Symbol.iterator]();;) {\n if (_isArray37) {\n if (_i39 >= _iterator37.length) break;\n el = _iterator37[_i39++];\n } else {\n _i39 = _iterator37.next();\n if (_i39.done) break;\n el = _i39.value;\n }\n\n elements.push(el);\n }\n } else if (els.nodeType != null) {\n elements = [els];\n }\n\n if (elements == null || !elements.length) {\n throw new Error(\"Invalid `\" + name + \"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.\");\n }\n\n return elements;\n};\n\n// Asks the user the question and calls accepted or rejected accordingly\n//\n// The default implementation just uses `window.confirm` and then calls the\n// appropriate callback.\nDropzone.confirm = function (question, accepted, rejected) {\n if (window.confirm(question)) {\n return accepted();\n } else if (rejected != null) {\n return rejected();\n }\n};\n\n// Validates the mime type like this:\n//\n// https://developer.mozilla.org/en-US/docs/HTML/Element/input#attr-accept\nDropzone.isValidFile = function (file, acceptedFiles) {\n if (!acceptedFiles) {\n return true;\n } // If there are no accepted mime types, it's OK\n acceptedFiles = acceptedFiles.split(\",\");\n\n var mimeType = file.type;\n var baseMimeType = mimeType.replace(/\\/.*$/, \"\");\n\n for (var _iterator38 = acceptedFiles, _isArray38 = true, _i40 = 0, _iterator38 = _isArray38 ? _iterator38 : _iterator38[Symbol.iterator]();;) {\n var _ref35;\n\n if (_isArray38) {\n if (_i40 >= _iterator38.length) break;\n _ref35 = _iterator38[_i40++];\n } else {\n _i40 = _iterator38.next();\n if (_i40.done) break;\n _ref35 = _i40.value;\n }\n\n var validType = _ref35;\n\n validType = validType.trim();\n if (validType.charAt(0) === \".\") {\n if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) {\n return true;\n }\n } else if (/\\/\\*$/.test(validType)) {\n // This is something like a image/* mime type\n if (baseMimeType === validType.replace(/\\/.*$/, \"\")) {\n return true;\n }\n } else {\n if (mimeType === validType) {\n return true;\n }\n }\n }\n\n return false;\n};\n\n// Augment jQuery\nif (typeof jQuery !== 'undefined' && jQuery !== null) {\n jQuery.fn.dropzone = function (options) {\n return this.each(function () {\n return new Dropzone(this, options);\n });\n };\n}\n\nif (typeof module !== 'undefined' && module !== null) {\n module.exports = Dropzone;\n} else {\n window.Dropzone = Dropzone;\n}\n\n// Dropzone file status codes\nDropzone.ADDED = \"added\";\n\nDropzone.QUEUED = \"queued\";\n// For backwards compatibility. Now, if a file is accepted, it's either queued\n// or uploading.\nDropzone.ACCEPTED = Dropzone.QUEUED;\n\nDropzone.UPLOADING = \"uploading\";\nDropzone.PROCESSING = Dropzone.UPLOADING; // alias\n\nDropzone.CANCELED = \"canceled\";\nDropzone.ERROR = \"error\";\nDropzone.SUCCESS = \"success\";\n\n/*\n\n Bugfix for iOS 6 and 7\n Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios\n based on the work of https://github.com/stomita/ios-imagefile-megapixel\n\n */\n\n// Detecting vertical squash in loaded image.\n// Fixes a bug which squash image vertically while drawing into canvas for some images.\n// This is a bug in iOS6 devices. This function from https://github.com/stomita/ios-imagefile-megapixel\nvar detectVerticalSquash = function detectVerticalSquash(img) {\n var iw = img.naturalWidth;\n var ih = img.naturalHeight;\n var canvas = document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = ih;\n var ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0);\n\n var _ctx$getImageData = ctx.getImageData(1, 0, 1, ih),\n data = _ctx$getImageData.data;\n\n // search image edge pixel position in case it is squashed vertically.\n\n\n var sy = 0;\n var ey = ih;\n var py = ih;\n while (py > sy) {\n var alpha = data[(py - 1) * 4 + 3];\n\n if (alpha === 0) {\n ey = py;\n } else {\n sy = py;\n }\n\n py = ey + sy >> 1;\n }\n var ratio = py / ih;\n\n if (ratio === 0) {\n return 1;\n } else {\n return ratio;\n }\n};\n\n// A replacement for context.drawImage\n// (args are for source and destination).\nvar drawImageIOSFix = function drawImageIOSFix(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) {\n var vertSquashRatio = detectVerticalSquash(img);\n return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio);\n};\n\n// Based on MinifyJpeg\n// Source: http://www.perry.cz/files/ExifRestorer.js\n// http://elicon.blog57.fc2.com/blog-entry-206.html\n\nvar ExifRestore = function () {\n function ExifRestore() {\n _classCallCheck(this, ExifRestore);\n }\n\n _createClass(ExifRestore, null, [{\n key: \"initClass\",\n value: function initClass() {\n this.KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n }\n }, {\n key: \"encode64\",\n value: function encode64(input) {\n var output = '';\n var chr1 = undefined;\n var chr2 = undefined;\n var chr3 = '';\n var enc1 = undefined;\n var enc2 = undefined;\n var enc3 = undefined;\n var enc4 = '';\n var i = 0;\n while (true) {\n chr1 = input[i++];\n chr2 = input[i++];\n chr3 = input[i++];\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + this.KEY_STR.charAt(enc1) + this.KEY_STR.charAt(enc2) + this.KEY_STR.charAt(enc3) + this.KEY_STR.charAt(enc4);\n chr1 = chr2 = chr3 = '';\n enc1 = enc2 = enc3 = enc4 = '';\n if (!(i < input.length)) {\n break;\n }\n }\n return output;\n }\n }, {\n key: \"restore\",\n value: function restore(origFileBase64, resizedFileBase64) {\n if (!origFileBase64.match('data:image/jpeg;base64,')) {\n return resizedFileBase64;\n }\n var rawImage = this.decode64(origFileBase64.replace('data:image/jpeg;base64,', ''));\n var segments = this.slice2Segments(rawImage);\n var image = this.exifManipulation(resizedFileBase64, segments);\n return \"data:image/jpeg;base64,\" + this.encode64(image);\n }\n }, {\n key: \"exifManipulation\",\n value: function exifManipulation(resizedFileBase64, segments) {\n var exifArray = this.getExifArray(segments);\n var newImageArray = this.insertExif(resizedFileBase64, exifArray);\n var aBuffer = new Uint8Array(newImageArray);\n return aBuffer;\n }\n }, {\n key: \"getExifArray\",\n value: function getExifArray(segments) {\n var seg = undefined;\n var x = 0;\n while (x < segments.length) {\n seg = segments[x];\n if (seg[0] === 255 & seg[1] === 225) {\n return seg;\n }\n x++;\n }\n return [];\n }\n }, {\n key: \"insertExif\",\n value: function insertExif(resizedFileBase64, exifArray) {\n var imageData = resizedFileBase64.replace('data:image/jpeg;base64,', '');\n var buf = this.decode64(imageData);\n var separatePoint = buf.indexOf(255, 3);\n var mae = buf.slice(0, separatePoint);\n var ato = buf.slice(separatePoint);\n var array = mae;\n array = array.concat(exifArray);\n array = array.concat(ato);\n return array;\n }\n }, {\n key: \"slice2Segments\",\n value: function slice2Segments(rawImageArray) {\n var head = 0;\n var segments = [];\n while (true) {\n var length;\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 218) {\n break;\n }\n if (rawImageArray[head] === 255 & rawImageArray[head + 1] === 216) {\n head += 2;\n } else {\n length = rawImageArray[head + 2] * 256 + rawImageArray[head + 3];\n var endPoint = head + length + 2;\n var seg = rawImageArray.slice(head, endPoint);\n segments.push(seg);\n head = endPoint;\n }\n if (head > rawImageArray.length) {\n break;\n }\n }\n return segments;\n }\n }, {\n key: \"decode64\",\n value: function decode64(input) {\n var output = '';\n var chr1 = undefined;\n var chr2 = undefined;\n var chr3 = '';\n var enc1 = undefined;\n var enc2 = undefined;\n var enc3 = undefined;\n var enc4 = '';\n var i = 0;\n var buf = [];\n // remove all characters that are not A-Z, a-z, 0-9, +, /, or =\n var base64test = /[^A-Za-z0-9\\+\\/\\=]/g;\n if (base64test.exec(input)) {\n console.warn('There were invalid base64 characters in the input text.\\nValid base64 characters are A-Z, a-z, 0-9, \\'+\\', \\'/\\',and \\'=\\'\\nExpect errors in decoding.');\n }\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, '');\n while (true) {\n enc1 = this.KEY_STR.indexOf(input.charAt(i++));\n enc2 = this.KEY_STR.indexOf(input.charAt(i++));\n enc3 = this.KEY_STR.indexOf(input.charAt(i++));\n enc4 = this.KEY_STR.indexOf(input.charAt(i++));\n chr1 = enc1 << 2 | enc2 >> 4;\n chr2 = (enc2 & 15) << 4 | enc3 >> 2;\n chr3 = (enc3 & 3) << 6 | enc4;\n buf.push(chr1);\n if (enc3 !== 64) {\n buf.push(chr2);\n }\n if (enc4 !== 64) {\n buf.push(chr3);\n }\n chr1 = chr2 = chr3 = '';\n enc1 = enc2 = enc3 = enc4 = '';\n if (!(i < input.length)) {\n break;\n }\n }\n return buf;\n }\n }]);\n\n return ExifRestore;\n}();\n\nExifRestore.initClass();\n\n/*\n * contentloaded.js\n *\n * Author: Diego Perini (diego.perini at gmail.com)\n * Summary: cross-browser wrapper for DOMContentLoaded\n * Updated: 20101020\n * License: MIT\n * Version: 1.2\n *\n * URL:\n * http://javascript.nwbox.com/ContentLoaded/\n * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE\n */\n\n// @win window reference\n// @fn function reference\nvar contentLoaded = function contentLoaded(win, fn) {\n var done = false;\n var top = true;\n var doc = win.document;\n var root = doc.documentElement;\n var add = doc.addEventListener ? \"addEventListener\" : \"attachEvent\";\n var rem = doc.addEventListener ? \"removeEventListener\" : \"detachEvent\";\n var pre = doc.addEventListener ? \"\" : \"on\";\n var init = function init(e) {\n if (e.type === \"readystatechange\" && doc.readyState !== \"complete\") {\n return;\n }\n (e.type === \"load\" ? win : doc)[rem](pre + e.type, init, false);\n if (!done && (done = true)) {\n return fn.call(win, e.type || e);\n }\n };\n\n var poll = function poll() {\n try {\n root.doScroll(\"left\");\n } catch (e) {\n setTimeout(poll, 50);\n return;\n }\n return init(\"poll\");\n };\n\n if (doc.readyState !== \"complete\") {\n if (doc.createEventObject && root.doScroll) {\n try {\n top = !win.frameElement;\n } catch (error) {}\n if (top) {\n poll();\n }\n }\n doc[add](pre + \"DOMContentLoaded\", init, false);\n doc[add](pre + \"readystatechange\", init, false);\n return win[add](pre + \"load\", init, false);\n }\n};\n\n// As a single function to be able to write tests.\nDropzone._autoDiscoverFunction = function () {\n if (Dropzone.autoDiscover) {\n return Dropzone.discover();\n }\n};\ncontentLoaded(window, Dropzone._autoDiscoverFunction);\n\nfunction __guard__(value, transform) {\n return typeof value !== 'undefined' && value !== null ? transform(value) : undefined;\n}\nfunction __guardMethod__(obj, methodName, transform) {\n if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {\n return transform(obj, methodName);\n } else {\n return undefined;\n }\n}\n","/*! 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 { InjectionToken, PLATFORM_ID, NgZone, Inject, Optional, ElementRef, Renderer2, Directive, Input, Output, EventEmitter, KeyValueDiffers, Component, ViewChild, ViewEncapsulation, NgModule } from '@angular/core';\nimport * as Dropzone from 'dropzone';\nimport { isPlatformBrowser, CommonModule } from '@angular/common';\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar /** @type {?} */ DROPZONE_CONFIG = new InjectionToken('DROPZONE_CONFIG');\nvar /** @type {?} */ DropzoneEvents = [\n 'error',\n 'success',\n 'sending',\n 'canceled',\n 'complete',\n 'processing',\n 'drop',\n 'dragStart',\n 'dragEnd',\n 'dragEnter',\n 'dragOver',\n 'dragLeave',\n 'thumbnail',\n 'addedFile',\n 'removedFile',\n 'uploadProgress',\n 'maxFilesReached',\n 'maxFilesExceeded',\n 'successMultiple',\n 'sendingMultiple',\n 'canceledMultiple',\n 'completeMultiple',\n 'processingMultiple',\n 'reset',\n 'queueComplete',\n 'totalUploadProgress'\n];\nvar DropzoneConfig = /** @class */ (function () {\n function DropzoneConfig(config) {\n if (config === void 0) { config = {}; }\n this.assign(config);\n }\n /**\n * @param {?=} config\n * @param {?=} target\n * @return {?}\n */\n DropzoneConfig.prototype.assign = /**\n * @param {?=} config\n * @param {?=} target\n * @return {?}\n */\n function (config, target) {\n if (config === void 0) { config = {}; }\n target = target || this;\n for (var /** @type {?} */ key in config) {\n if (config[key] != null && !(Array.isArray(config[key])) &&\n typeof config[key] === 'object' && !(config[key] instanceof HTMLElement)) {\n target[key] = {};\n this.assign(config[key], target[key]);\n }\n else {\n target[key] = config[key];\n }\n }\n };\n return DropzoneConfig;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar DropzoneDirective = /** @class */ (function () {\n function DropzoneDirective(zone, renderer, elementRef, differs, platformId, defaults) {\n this.zone = zone;\n this.renderer = renderer;\n this.elementRef = elementRef;\n this.differs = differs;\n this.platformId = platformId;\n this.defaults = defaults;\n this.disabled = false;\n this.DZ_ERROR = new EventEmitter();\n this.DZ_SUCCESS = new EventEmitter();\n this.DZ_SENDING = new EventEmitter();\n this.DZ_CANCELED = new EventEmitter();\n this.DZ_COMPLETE = new EventEmitter();\n this.DZ_PROCESSING = new EventEmitter();\n this.DZ_DROP = new EventEmitter();\n this.DZ_DRAGSTART = new EventEmitter();\n this.DZ_DRAGEND = new EventEmitter();\n this.DZ_DRAGENTER = new EventEmitter();\n this.DZ_DRAGOVER = new EventEmitter();\n this.DZ_DRAGLEAVE = new EventEmitter();\n this.DZ_THUMBNAIL = new EventEmitter();\n this.DZ_ADDEDFILE = new EventEmitter();\n this.DZ_REMOVEDFILE = new EventEmitter();\n this.DZ_UPLOADPROGRESS = new EventEmitter();\n this.DZ_MAXFILESREACHED = new EventEmitter();\n this.DZ_MAXFILESEXCEEDED = new EventEmitter();\n this.DZ_SUCCESSMULTIPLE = new EventEmitter();\n this.DZ_SENDINGMULTIPLE = new EventEmitter();\n this.DZ_CANCELEDMULTIPLE = new EventEmitter();\n this.DZ_COMPLETEMULTIPLE = new EventEmitter();\n this.DZ_PROCESSINGMULTIPLE = new EventEmitter();\n this.DZ_RESET = new EventEmitter();\n this.DZ_QUEUECOMPLETE = new EventEmitter();\n this.DZ_TOTALUPLOADPROGRESS = new EventEmitter();\n var /** @type {?} */ dz = Dropzone;\n dz.autoDiscover = false;\n }\n /**\n * @return {?}\n */\n DropzoneDirective.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n var /** @type {?} */ params = new DropzoneConfig(this.defaults);\n params.assign(this.config); // Custom configuration\n this.renderer.addClass(this.elementRef.nativeElement, (params.maxFiles === 1) ? 'dz-single' : 'dz-multiple');\n this.renderer.removeClass(this.elementRef.nativeElement, (params.maxFiles === 1) ? 'dz-multiple' : 'dz-single');\n this.zone.runOutsideAngular(function () {\n _this.instance = new Dropzone(_this.elementRef.nativeElement, params);\n });\n if (this.disabled) {\n this.instance.disable();\n }\n // Add auto reset handling for events\n this.instance.on('success', function (result) {\n if (params.autoReset != null) {\n setTimeout(function () { return _this.reset(); }, params.autoReset);\n }\n });\n this.instance.on('error', function (error) {\n if (params.errorReset != null) {\n setTimeout(function () { return _this.reset(); }, params.errorReset);\n }\n });\n this.instance.on('canceled', function (result) {\n if (params.cancelReset != null) {\n setTimeout(function () { return _this.reset(); }, params.cancelReset);\n }\n });\n // Add native Dropzone event handling\n DropzoneEvents.forEach(function (eventName) {\n _this.instance.on(eventName.toLowerCase(), function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n args = (args.length === 1) ? args[0] : args;\n _this.zone.run(function () {\n _this[\"DZ_\" + eventName.toUpperCase()].emit(args);\n });\n });\n });\n if (!this.configDiff) {\n this.configDiff = this.differs.find(this.config || {}).create();\n this.configDiff.diff(this.config || {});\n }\n };\n /**\n * @return {?}\n */\n DropzoneDirective.prototype.ngOnDestroy = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (this.instance) {\n this.zone.runOutsideAngular(function () {\n _this.instance.destroy();\n });\n this.instance = null;\n }\n };\n /**\n * @return {?}\n */\n DropzoneDirective.prototype.ngDoCheck = /**\n * @return {?}\n */\n function () {\n if (!this.disabled && this.configDiff) {\n var /** @type {?} */ changes = this.configDiff.diff(this.config || {});\n if (changes && this.instance) {\n this.ngOnDestroy();\n this.ngOnInit();\n }\n }\n };\n /**\n * @param {?} changes\n * @return {?}\n */\n DropzoneDirective.prototype.ngOnChanges = /**\n * @param {?} changes\n * @return {?}\n */\n function (changes) {\n var _this = this;\n if (this.instance && changes['disabled']) {\n if (changes['disabled'].currentValue !== changes['disabled'].previousValue) {\n if (changes['disabled'].currentValue === false) {\n this.zone.runOutsideAngular(function () {\n _this.instance.enable();\n });\n }\n else if (changes['disabled'].currentValue === true) {\n this.zone.runOutsideAngular(function () {\n _this.instance.disable();\n });\n }\n }\n }\n };\n /**\n * @return {?}\n */\n DropzoneDirective.prototype.dropzone = /**\n * @return {?}\n */\n function () {\n return this.instance;\n };\n /**\n * @param {?=} cancel\n * @return {?}\n */\n DropzoneDirective.prototype.reset = /**\n * @param {?=} cancel\n * @return {?}\n */\n function (cancel) {\n var _this = this;\n if (this.instance) {\n this.zone.runOutsideAngular(function () {\n _this.instance.removeAllFiles(cancel);\n });\n }\n };\n DropzoneDirective.decorators = [\n { type: Directive, args: [{\n selector: '[dropzone]',\n exportAs: 'ngxDropzone'\n },] }\n ];\n /** @nocollapse */\n DropzoneDirective.ctorParameters = function () { return [\n { type: NgZone, },\n { type: Renderer2, },\n { type: ElementRef, },\n { type: KeyValueDiffers, },\n { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] },] },\n { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DROPZONE_CONFIG,] },] },\n ]; };\n DropzoneDirective.propDecorators = {\n \"disabled\": [{ type: Input },],\n \"config\": [{ type: Input, args: ['dropzone',] },],\n \"DZ_ERROR\": [{ type: Output, args: ['error',] },],\n \"DZ_SUCCESS\": [{ type: Output, args: ['success',] },],\n \"DZ_SENDING\": [{ type: Output, args: ['sending',] },],\n \"DZ_CANCELED\": [{ type: Output, args: ['canceled',] },],\n \"DZ_COMPLETE\": [{ type: Output, args: ['complete',] },],\n \"DZ_PROCESSING\": [{ type: Output, args: ['processing',] },],\n \"DZ_DROP\": [{ type: Output, args: ['drop',] },],\n \"DZ_DRAGSTART\": [{ type: Output, args: ['dragStart',] },],\n \"DZ_DRAGEND\": [{ type: Output, args: ['dragEnd',] },],\n \"DZ_DRAGENTER\": [{ type: Output, args: ['dragEnter',] },],\n \"DZ_DRAGOVER\": [{ type: Output, args: ['dragOver',] },],\n \"DZ_DRAGLEAVE\": [{ type: Output, args: ['dragLeave',] },],\n \"DZ_THUMBNAIL\": [{ type: Output, args: ['thumbnail',] },],\n \"DZ_ADDEDFILE\": [{ type: Output, args: ['addedFile',] },],\n \"DZ_REMOVEDFILE\": [{ type: Output, args: ['removedFile',] },],\n \"DZ_UPLOADPROGRESS\": [{ type: Output, args: ['uploadProgress',] },],\n \"DZ_MAXFILESREACHED\": [{ type: Output, args: ['maxFilesReached',] },],\n \"DZ_MAXFILESEXCEEDED\": [{ type: Output, args: ['maxFilesExceeded',] },],\n \"DZ_SUCCESSMULTIPLE\": [{ type: Output, args: ['successMultiple',] },],\n \"DZ_SENDINGMULTIPLE\": [{ type: Output, args: ['sendingMultiple',] },],\n \"DZ_CANCELEDMULTIPLE\": [{ type: Output, args: ['canceledMultiple',] },],\n \"DZ_COMPLETEMULTIPLE\": [{ type: Output, args: ['completeMultiple',] },],\n \"DZ_PROCESSINGMULTIPLE\": [{ type: Output, args: ['processingMultiple',] },],\n \"DZ_RESET\": [{ type: Output, args: ['reset',] },],\n \"DZ_QUEUECOMPLETE\": [{ type: Output, args: ['queueComplete',] },],\n \"DZ_TOTALUPLOADPROGRESS\": [{ type: Output, args: ['totalUploadProgress',] },],\n };\n return DropzoneDirective;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar DropzoneComponent = /** @class */ (function () {\n function DropzoneComponent(platformId) {\n this.platformId = platformId;\n this.disabled = false;\n this.message = 'Click or drag files to upload';\n this.placeholder = '';\n this.useDropzoneClass = true;\n this.DZ_ERROR = new EventEmitter();\n this.DZ_SUCCESS = new EventEmitter();\n this.DZ_SENDING = new EventEmitter();\n this.DZ_CANCELED = new EventEmitter();\n this.DZ_COMPLETE = new EventEmitter();\n this.DZ_PROCESSING = new EventEmitter();\n this.DZ_DROP = new EventEmitter();\n this.DZ_DRAGSTART = new EventEmitter();\n this.DZ_DRAGEND = new EventEmitter();\n this.DZ_DRAGENTER = new EventEmitter();\n this.DZ_DRAGOVER = new EventEmitter();\n this.DZ_DRAGLEAVE = new EventEmitter();\n this.DZ_THUMBNAIL = new EventEmitter();\n this.DZ_ADDEDFILE = new EventEmitter();\n this.DZ_REMOVEDFILE = new EventEmitter();\n this.DZ_UPLOADPROGRESS = new EventEmitter();\n this.DZ_MAXFILESREACHED = new EventEmitter();\n this.DZ_MAXFILESEXCEEDED = new EventEmitter();\n this.DZ_SUCCESSMULTIPLE = new EventEmitter();\n this.DZ_SENDINGMULTIPLE = new EventEmitter();\n this.DZ_CANCELEDMULTIPLE = new EventEmitter();\n this.DZ_COMPLETEMULTIPLE = new EventEmitter();\n this.DZ_PROCESSINGMULTIPLE = new EventEmitter();\n this.DZ_RESET = new EventEmitter();\n this.DZ_QUEUECOMPLETE = new EventEmitter();\n this.DZ_TOTALUPLOADPROGRESS = new EventEmitter();\n }\n /**\n * @return {?}\n */\n DropzoneComponent.prototype.ngOnInit = /**\n * @return {?}\n */\n function () {\n var _this = this;\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n window.setTimeout(function () {\n if (_this.directiveRef) {\n DropzoneEvents.forEach(function (eventName) {\n eventName = \"DZ_\" + eventName.toUpperCase();\n _this.directiveRef[eventName] = _this[eventName];\n });\n }\n }, 0);\n };\n /**\n * @return {?}\n */\n DropzoneComponent.prototype.getPlaceholder = /**\n * @return {?}\n */\n function () {\n return 'url(' + encodeURI(this.placeholder) + ')';\n };\n DropzoneComponent.decorators = [\n { type: Component, args: [{\n selector: 'dropzone',\n exportAs: 'ngxDropzone',\n template: \"<div class=\\\"dz-wrapper\\\" [class.dropzone]=\\\"useDropzoneClass\\\" [dropzone]=\\\"config\\\" [disabled]=\\\"disabled\\\">\\n <div class=\\\"dz-message\\\" [class.disabled]=\\\"disabled\\\" [class.dz-placeholder]=\\\"placeholder\\\">\\n <div class=\\\"dz-text\\\" [innerHTML]=\\\"config?.dictDefaultMessage || message\\\"></div>\\n\\n <div *ngIf=\\\"placeholder\\\" class=\\\"dz-image\\\" [style.background-image]=\\\"getPlaceholder()\\\"></div>\\n </div>\\n\\n <ng-content></ng-content>\\n</div>\\n\",\n encapsulation: ViewEncapsulation.None,\n styles: [\"@-webkit-keyframes passing-through {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30%, 70% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); }\\n 100% {\\n opacity: 0;\\n -webkit-transform: translateY(-40px);\\n -moz-transform: translateY(-40px);\\n -ms-transform: translateY(-40px);\\n -o-transform: translateY(-40px);\\n transform: translateY(-40px); } }\\n\\n@-moz-keyframes passing-through {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30%, 70% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); }\\n 100% {\\n opacity: 0;\\n -webkit-transform: translateY(-40px);\\n -moz-transform: translateY(-40px);\\n -ms-transform: translateY(-40px);\\n -o-transform: translateY(-40px);\\n transform: translateY(-40px); } }\\n\\n@keyframes passing-through {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30%, 70% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); }\\n 100% {\\n opacity: 0;\\n -webkit-transform: translateY(-40px);\\n -moz-transform: translateY(-40px);\\n -ms-transform: translateY(-40px);\\n -o-transform: translateY(-40px);\\n transform: translateY(-40px); } }\\n\\n@-webkit-keyframes slide-in {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); } }\\n\\n@-moz-keyframes slide-in {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); } }\\n\\n@keyframes slide-in {\\n 0% {\\n opacity: 0;\\n -webkit-transform: translateY(40px);\\n -moz-transform: translateY(40px);\\n -ms-transform: translateY(40px);\\n -o-transform: translateY(40px);\\n transform: translateY(40px); }\\n 30% {\\n opacity: 1;\\n -webkit-transform: translateY(0px);\\n -moz-transform: translateY(0px);\\n -ms-transform: translateY(0px);\\n -o-transform: translateY(0px);\\n transform: translateY(0px); } }\\n\\n@-webkit-keyframes pulse {\\n 0% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); }\\n 10% {\\n -webkit-transform: scale(1.1);\\n -moz-transform: scale(1.1);\\n -ms-transform: scale(1.1);\\n -o-transform: scale(1.1);\\n transform: scale(1.1); }\\n 20% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); } }\\n\\n@-moz-keyframes pulse {\\n 0% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); }\\n 10% {\\n -webkit-transform: scale(1.1);\\n -moz-transform: scale(1.1);\\n -ms-transform: scale(1.1);\\n -o-transform: scale(1.1);\\n transform: scale(1.1); }\\n 20% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); } }\\n\\n@keyframes pulse {\\n 0% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); }\\n 10% {\\n -webkit-transform: scale(1.1);\\n -moz-transform: scale(1.1);\\n -ms-transform: scale(1.1);\\n -o-transform: scale(1.1);\\n transform: scale(1.1); }\\n 20% {\\n -webkit-transform: scale(1);\\n -moz-transform: scale(1);\\n -ms-transform: scale(1);\\n -o-transform: scale(1);\\n transform: scale(1); } }\\n\\n.dropzone, .dropzone * {\\n box-sizing: border-box; }\\n\\n.dropzone {\\n min-height: 150px;\\n border: 2px solid rgba(0, 0, 0, 0.3);\\n background: white;\\n padding: 20px 20px; }\\n\\n.dropzone.dz-clickable {\\n cursor: pointer; }\\n\\n.dropzone.dz-clickable * {\\n cursor: default; }\\n\\n.dropzone.dz-clickable .dz-message, .dropzone.dz-clickable .dz-message * {\\n cursor: pointer; }\\n\\n.dropzone.dz-started .dz-message {\\n display: none; }\\n\\n.dropzone.dz-drag-hover {\\n border-style: solid; }\\n\\n.dropzone.dz-drag-hover .dz-message {\\n opacity: 0.5; }\\n\\n.dropzone .dz-message {\\n text-align: center;\\n margin: 2em 0; }\\n\\n.dropzone .dz-preview {\\n position: relative;\\n display: inline-block;\\n vertical-align: top;\\n margin: 16px;\\n min-height: 100px; }\\n\\n.dropzone .dz-preview:hover {\\n z-index: 1000; }\\n\\n.dropzone .dz-preview:hover .dz-details {\\n opacity: 1; }\\n\\n.dropzone .dz-preview.dz-file-preview .dz-image {\\n border-radius: 20px;\\n background: #999;\\n background: linear-gradient(to bottom, #eee, #ddd); }\\n\\n.dropzone .dz-preview.dz-file-preview .dz-details {\\n opacity: 1; }\\n\\n.dropzone .dz-preview.dz-image-preview {\\n background: white; }\\n\\n.dropzone .dz-preview.dz-image-preview .dz-details {\\n -webkit-transition: opacity 0.2s linear;\\n -moz-transition: opacity 0.2s linear;\\n -ms-transition: opacity 0.2s linear;\\n -o-transition: opacity 0.2s linear;\\n transition: opacity 0.2s linear; }\\n\\n.dropzone .dz-preview .dz-remove {\\n font-size: 14px;\\n text-align: center;\\n display: block;\\n cursor: pointer;\\n border: none; }\\n\\n.dropzone .dz-preview .dz-remove:hover {\\n text-decoration: underline; }\\n\\n.dropzone .dz-preview:hover .dz-details {\\n opacity: 1; }\\n\\n.dropzone .dz-preview .dz-details {\\n z-index: 20;\\n position: absolute;\\n top: 0;\\n left: 0;\\n opacity: 0;\\n font-size: 13px;\\n min-width: 100%;\\n max-width: 100%;\\n padding: 2em 1em;\\n text-align: center;\\n color: rgba(0, 0, 0, 0.9);\\n line-height: 150%; }\\n\\n.dropzone .dz-preview .dz-details .dz-size {\\n margin-bottom: 1em;\\n font-size: 16px; }\\n\\n.dropzone .dz-preview .dz-details .dz-filename {\\n white-space: nowrap; }\\n\\n.dropzone .dz-preview .dz-details .dz-filename:hover span {\\n border: 1px solid rgba(200, 200, 200, 0.8);\\n background-color: rgba(255, 255, 255, 0.8); }\\n\\n.dropzone .dz-preview .dz-details .dz-filename:not(:hover) {\\n overflow: hidden;\\n text-overflow: ellipsis; }\\n\\n.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span {\\n border: 1px solid transparent; }\\n\\n.dropzone .dz-preview .dz-details .dz-filename span, .dropzone .dz-preview .dz-details .dz-size span {\\n background-color: rgba(255, 255, 255, 0.4);\\n padding: 0 0.4em;\\n border-radius: 3px; }\\n\\n.dropzone .dz-preview:hover .dz-image img {\\n -webkit-transform: scale(1.05, 1.05);\\n -moz-transform: scale(1.05, 1.05);\\n -ms-transform: scale(1.05, 1.05);\\n -o-transform: scale(1.05, 1.05);\\n transform: scale(1.05, 1.05);\\n -webkit-filter: blur(8px);\\n filter: blur(8px); }\\n\\n.dropzone .dz-preview .dz-image {\\n border-radius: 20px;\\n overflow: hidden;\\n width: 120px;\\n height: 120px;\\n position: relative;\\n display: block;\\n z-index: 10; }\\n\\n.dropzone .dz-preview .dz-image img {\\n display: block; }\\n\\n.dropzone .dz-preview.dz-success .dz-success-mark {\\n -webkit-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -moz-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -ms-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -o-animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);\\n animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1); }\\n\\n.dropzone .dz-preview.dz-error .dz-error-mark {\\n opacity: 1;\\n -webkit-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -moz-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -ms-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\\n -o-animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);\\n animation: slide-in 3s cubic-bezier(0.77, 0, 0.175, 1); }\\n\\n.dropzone .dz-preview .dz-success-mark, .dropzone .dz-preview .dz-error-mark {\\n pointer-events: none;\\n opacity: 0;\\n z-index: 500;\\n position: absolute;\\n display: block;\\n top: 50%;\\n left: 50%;\\n margin-left: -27px;\\n margin-top: -27px; }\\n\\n.dropzone .dz-preview .dz-success-mark svg, .dropzone .dz-preview .dz-error-mark svg {\\n display: block;\\n width: 54px;\\n height: 54px; }\\n\\n.dropzone .dz-preview.dz-processing .dz-progress {\\n opacity: 1;\\n -webkit-transition: all 0.2s linear;\\n -moz-transition: all 0.2s linear;\\n -ms-transition: all 0.2s linear;\\n -o-transition: all 0.2s linear;\\n transition: all 0.2s linear; }\\n\\n.dropzone .dz-preview.dz-complete .dz-progress {\\n opacity: 0;\\n -webkit-transition: opacity 0.4s ease-in;\\n -moz-transition: opacity 0.4s ease-in;\\n -ms-transition: opacity 0.4s ease-in;\\n -o-transition: opacity 0.4s ease-in;\\n transition: opacity 0.4s ease-in; }\\n\\n.dropzone .dz-preview:not(.dz-processing) .dz-progress {\\n -webkit-animation: pulse 6s ease infinite;\\n -moz-animation: pulse 6s ease infinite;\\n -ms-animation: pulse 6s ease infinite;\\n -o-animation: pulse 6s ease infinite;\\n animation: pulse 6s ease infinite; }\\n\\n.dropzone .dz-preview .dz-progress {\\n opacity: 1;\\n z-index: 1000;\\n pointer-events: none;\\n position: absolute;\\n height: 16px;\\n left: 50%;\\n top: 50%;\\n margin-top: -8px;\\n width: 80px;\\n margin-left: -40px;\\n background: rgba(255, 255, 255, 0.9);\\n -webkit-transform: scale(1);\\n border-radius: 8px;\\n overflow: hidden; }\\n\\n.dropzone .dz-preview .dz-progress .dz-upload {\\n background: #333;\\n background: linear-gradient(to bottom, #666, #444);\\n position: absolute;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n width: 0;\\n -webkit-transition: width 300ms ease-in-out;\\n -moz-transition: width 300ms ease-in-out;\\n -ms-transition: width 300ms ease-in-out;\\n -o-transition: width 300ms ease-in-out;\\n transition: width 300ms ease-in-out; }\\n\\n.dropzone .dz-preview.dz-error .dz-error-message {\\n display: block; }\\n\\n.dropzone .dz-preview.dz-error:hover .dz-error-message {\\n opacity: 1;\\n pointer-events: auto; }\\n\\n.dropzone .dz-preview .dz-error-message {\\n pointer-events: none;\\n z-index: 1000;\\n position: absolute;\\n display: block;\\n display: none;\\n opacity: 0;\\n -webkit-transition: opacity 0.3s ease;\\n -moz-transition: opacity 0.3s ease;\\n -ms-transition: opacity 0.3s ease;\\n -o-transition: opacity 0.3s ease;\\n transition: opacity 0.3s ease;\\n border-radius: 8px;\\n font-size: 13px;\\n top: 130px;\\n left: -10px;\\n width: 140px;\\n background: #be2626;\\n background: linear-gradient(to bottom, #be2626, #a92222);\\n padding: 0.5em 1.2em;\\n color: white; }\\n\\n.dropzone .dz-preview .dz-error-message:after {\\n content: '';\\n position: absolute;\\n top: -6px;\\n left: 64px;\\n width: 0;\\n height: 0;\\n border-left: 6px solid transparent;\\n border-right: 6px solid transparent;\\n border-bottom: 6px solid #be2626; }\\n\\ndropzone {\\n display: block;\\n width: 100%;\\n height: auto; }\\n dropzone[fxflex] {\\n display: flex;\\n flex-direction: inherit;\\n min-width: 0;\\n min-height: 0;\\n -webkit-box-direction: inherit;\\n -webkit-box-orient: inherit; }\\n dropzone[fxflex] > .dropzone.dz-wrapper {\\n flex: 1 1 auto;\\n min-width: 0;\\n min-height: 0;\\n -webkit-box-flex: 1; }\\n dropzone[fxlayout] {\\n align-items: inherit;\\n align-content: inherit;\\n justify-content: inherit;\\n -webkit-box-align: inherit;\\n -webkit-box-pack: inherit; }\\n dropzone[fxlayout] > .dropzone.dz-wrapper.dz-single {\\n display: flex;\\n flex-direction: column;\\n align-items: center;\\n align-content: center;\\n justify-content: center;\\n -webkit-box-align: center;\\n -webkit-box-direction: column;\\n -webkit-box-orient: column;\\n -webkit-box-pack: center; }\\n dropzone[fxlayout] > .dropzone.dz-wrapper.dz-multiple {\\n display: flex;\\n flex-flow: row wrap;\\n align-items: start;\\n align-content: start;\\n justify-content: space-between;\\n -webkit-box-align: start;\\n -webkit-box-direction: row;\\n -webkit-box-orient: row;\\n -webkit-box-pack: start; }\\n dropzone > .dropzone.dz-wrapper {\\n position: relative;\\n overflow: auto;\\n width: 100%;\\n min-height: 0;\\n max-height: 100%;\\n padding: 0;\\n border: none;\\n color: #666;\\n background: transparent; }\\n dropzone > .dropzone.dz-wrapper .dz-message {\\n position: relative;\\n display: inline-block;\\n overflow: auto;\\n width: calc(100% - 16px);\\n min-width: calc(100% - 16px);\\n min-height: 40px;\\n max-width: calc(100% - 16px);\\n max-height: 100%;\\n margin: 8px;\\n border: 2px dashed #aaa;\\n background-color: #eee; }\\n dropzone > .dropzone.dz-wrapper .dz-message .dz-text {\\n position: absolute;\\n top: 50%;\\n width: 100%;\\n padding: 8px 24px;\\n text-align: center;\\n transform: translateY(-50%); }\\n dropzone > .dropzone.dz-wrapper .dz-message .dz-image {\\n width: 100%;\\n height: 100%;\\n background-size: contain;\\n background-repeat: no-repeat;\\n background-position: 50% 50%; }\\n dropzone > .dropzone.dz-wrapper .dz-message.disabled {\\n cursor: not-allowed; }\\n dropzone > .dropzone.dz-wrapper .dz-message.disabled .dz-text {\\n opacity: 0.5; }\\n dropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder {\\n border-color: rgba(170, 170, 170, 0); }\\n dropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text {\\n position: absolute;\\n z-index: 1;\\n top: 0;\\n right: 10%;\\n left: 10%;\\n opacity: 0;\\n font-weight: bold;\\n background-color: rgba(255, 255, 255, 0.5);\\n transform: translateY(-50%);\\n transition: filter 250ms ease-in-out, opacity 250ms ease-in-out, border-color 250ms ease-in-out; }\\n dropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) {\\n border-color: #aaa; }\\n dropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text {\\n opacity: 1; }\\n dropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image {\\n -webkit-filter: blur(8px);\\n filter: blur(8px); }\\n dropzone > .dropzone.dz-wrapper .dz-preview {\\n margin: 8px; }\\n dropzone > .dropzone.dz-wrapper .dz-preview .dz-details {\\n padding: 24px; }\\n dropzone > .dropzone.dz-wrapper .dz-preview .dz-progress {\\n width: 80%;\\n margin-left: -40%;\\n border: 1px solid #aaa;\\n border-radius: 4px; }\\n dropzone > .dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload {\\n background-color: #666; }\\n dropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span {\\n display: block;\\n overflow: hidden;\\n width: 100%;\\n max-width: 100%;\\n text-overflow: ellipsis; }\\n dropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span:hover {\\n overflow: visible;\\n white-space: normal;\\n word-wrap: break-word; }\\n dropzone > .dropzone.dz-wrapper.dz-single.dz-started .dz-message {\\n display: none; }\\n dropzone > .dropzone.dz-wrapper.dz-single .dz-message {\\n width: 100%;\\n height: 100%; }\\n dropzone > .dropzone.dz-wrapper.dz-single .dz-preview {\\n width: calc(100% - 16px);\\n height: 100%; }\\n dropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image {\\n width: 100%;\\n height: 100%;\\n border-radius: 0; }\\n dropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image img {\\n display: block;\\n width: 100%;\\n height: auto;\\n margin: 0; }\\n dropzone > .dropzone.dz-wrapper.dz-single .dz-error-message {\\n top: 50%;\\n left: 50%;\\n transform: translateX(-50%) translateY(100%); }\\n dropzone > .dropzone.dz-wrapper.dz-multiple.dz-started .dz-message {\\n display: inline-block; }\\n\\n/*# sourceMappingURL=dropzone.component.css.map */\"]\n }] }\n ];\n /** @nocollapse */\n DropzoneComponent.ctorParameters = function () { return [\n { type: Object, decorators: [{ type: Inject, args: [PLATFORM_ID,] },] },\n ]; };\n DropzoneComponent.propDecorators = {\n \"disabled\": [{ type: Input },],\n \"config\": [{ type: Input },],\n \"message\": [{ type: Input },],\n \"placeholder\": [{ type: Input },],\n \"useDropzoneClass\": [{ type: Input },],\n \"directiveRef\": [{ type: ViewChild, args: [DropzoneDirective,] },],\n \"DZ_ERROR\": [{ type: Output, args: ['error',] },],\n \"DZ_SUCCESS\": [{ type: Output, args: ['success',] },],\n \"DZ_SENDING\": [{ type: Output, args: ['sending',] },],\n \"DZ_CANCELED\": [{ type: Output, args: ['canceled',] },],\n \"DZ_COMPLETE\": [{ type: Output, args: ['complete',] },],\n \"DZ_PROCESSING\": [{ type: Output, args: ['processing',] },],\n \"DZ_DROP\": [{ type: Output, args: ['drop',] },],\n \"DZ_DRAGSTART\": [{ type: Output, args: ['dragStart',] },],\n \"DZ_DRAGEND\": [{ type: Output, args: ['dragEnd',] },],\n \"DZ_DRAGENTER\": [{ type: Output, args: ['dragEnter',] },],\n \"DZ_DRAGOVER\": [{ type: Output, args: ['dragOver',] },],\n \"DZ_DRAGLEAVE\": [{ type: Output, args: ['dragLeave',] },],\n \"DZ_THUMBNAIL\": [{ type: Output, args: ['thumbnail',] },],\n \"DZ_ADDEDFILE\": [{ type: Output, args: ['addedFile',] },],\n \"DZ_REMOVEDFILE\": [{ type: Output, args: ['removedFile',] },],\n \"DZ_UPLOADPROGRESS\": [{ type: Output, args: ['uploadProgress',] },],\n \"DZ_MAXFILESREACHED\": [{ type: Output, args: ['maxFilesReached',] },],\n \"DZ_MAXFILESEXCEEDED\": [{ type: Output, args: ['maxFilesExceeded',] },],\n \"DZ_SUCCESSMULTIPLE\": [{ type: Output, args: ['successMultiple',] },],\n \"DZ_SENDINGMULTIPLE\": [{ type: Output, args: ['sendingMultiple',] },],\n \"DZ_CANCELEDMULTIPLE\": [{ type: Output, args: ['canceledMultiple',] },],\n \"DZ_COMPLETEMULTIPLE\": [{ type: Output, args: ['completeMultiple',] },],\n \"DZ_PROCESSINGMULTIPLE\": [{ type: Output, args: ['processingMultiple',] },],\n \"DZ_RESET\": [{ type: Output, args: ['reset',] },],\n \"DZ_QUEUECOMPLETE\": [{ type: Output, args: ['queueComplete',] },],\n \"DZ_TOTALUPLOADPROGRESS\": [{ type: Output, args: ['totalUploadProgress',] },],\n };\n return DropzoneComponent;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\nvar DropzoneModule = /** @class */ (function () {\n function DropzoneModule() {\n }\n DropzoneModule.decorators = [\n { type: NgModule, args: [{\n imports: [CommonModule],\n declarations: [DropzoneComponent, DropzoneDirective],\n exports: [CommonModule, DropzoneComponent, DropzoneDirective]\n },] }\n ];\n return DropzoneModule;\n}());\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\n/**\n * @fileoverview added by tsickle\n * @suppress {checkTypes} checked by tsc\n */\n\nexport { DropzoneComponent, DropzoneDirective, DROPZONE_CONFIG, DropzoneConfig, DropzoneModule };\n//# sourceMappingURL=ngx-dropzone-wrapper.es5.js.map\n","export { Observable } from 'rxjs';\n//# sourceMappingURL=Observable.js.map","export { Subject } from 'rxjs';\n//# sourceMappingURL=Subject.js.map","import { Observable, combineLatest as combineLatestStatic } from 'rxjs';\nObservable.combineLatest = combineLatestStatic;\n//# sourceMappingURL=combineLatest.js.map","import { Observable, from as staticFrom } from 'rxjs';\nObservable.from = staticFrom;\n//# sourceMappingURL=from.js.map","import { Observable, fromEvent as staticFromEvent } from 'rxjs';\nObservable.fromEvent = staticFromEvent;\n//# sourceMappingURL=fromEvent.js.map","import { Observable, merge as mergeStatic } from 'rxjs';\nObservable.merge = mergeStatic;\n//# sourceMappingURL=merge.js.map","import { Observable, timer as staticTimer } from 'rxjs';\nObservable.timer = staticTimer;\n//# sourceMappingURL=timer.js.map","import { Observable } from 'rxjs';\nimport { _catch } from '../../operator/catch';\nObservable.prototype.catch = _catch;\nObservable.prototype._catch = _catch;\n//# sourceMappingURL=catch.js.map","import { Observable } from 'rxjs';\nimport { combineLatest } from '../../operator/combineLatest';\nObservable.prototype.combineLatest = combineLatest;\n//# sourceMappingURL=combineLatest.js.map","import { Observable } from 'rxjs';\nimport { filter } from '../../operator/filter';\nObservable.prototype.filter = filter;\n//# sourceMappingURL=filter.js.map","import { Observable } from 'rxjs';\nimport { map } from '../../operator/map';\nObservable.prototype.map = map;\n//# sourceMappingURL=map.js.map","import { Observable } from 'rxjs';\nimport { mergeAll } from '../../operator/mergeAll';\nObservable.prototype.mergeAll = mergeAll;\n//# sourceMappingURL=mergeAll.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Observable, timer } from 'rxjs';\nvar TimerObservable = /** @class */ (function (_super) {\n __extends(TimerObservable, _super);\n function TimerObservable() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TimerObservable.create = function (initialDelay, period, scheduler) {\n if (initialDelay === void 0) { initialDelay = 0; }\n return timer(initialDelay, period, scheduler);\n };\n return TimerObservable;\n}(Observable));\nexport { TimerObservable };\n//# sourceMappingURL=TimerObservable.js.map","import { catchError as higherOrder } from 'rxjs/operators';\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * <img src=\"./img/catch.png\" width=\"100%\">\n *\n * @example <caption>Continues with a different Observable when there's an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n == 4) {\n * \t throw 'four!';\n * }\n *\t return n;\n * })\n * .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, I, II, III, IV, V\n *\n * @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n === 4) {\n * \t throw 'four!';\n * }\n * \t return n;\n * })\n * .catch((err, caught) => caught)\n * .take(30)\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, 1, 2, 3, ...\n *\n * @example <caption>Throws a new error when the source Observable throws an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * if (n == 4) {\n * throw 'four!';\n * }\n * return n;\n * })\n * .catch(err => {\n * throw 'error in source. Details: ' + err;\n * })\n * .subscribe(\n * x => console.log(x),\n * err => console.log(err)\n * );\n * // 1, 2, 3, error in source. Details: four!\n *\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} An observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @method catch\n * @name catch\n * @owner Observable\n */\nexport function _catch(selector) {\n return higherOrder(selector)(this);\n}\n//# sourceMappingURL=catch.js.map","import { of } from 'rxjs';\nimport { isArray, CombineLatestOperator } from 'rxjs/internal-compatibility';\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are\n * calculated from the latest values of each of its input Observables.\n *\n * <span class=\"informal\">Whenever any input Observable emits a value, it\n * computes a formula using the latest values from all the inputs, then emits\n * the output of that formula.</span>\n *\n * <img src=\"./img/combineLatest.png\" width=\"100%\">\n *\n * `combineLatest` combines the values from this Observable with values from\n * Observables passed as arguments. This is done by subscribing to each\n * Observable, in order, and collecting an array of each of the most recent\n * values any time any of the input Observables emits, then either taking that\n * array and passing it as arguments to an optional `project` function and\n * emitting the return value of that, or just emitting the array of recent\n * values directly if there is no `project` function.\n *\n * @example <caption>Dynamically calculate the Body-Mass Index from an Observable of weight and one for height</caption>\n * var weight = Rx.Observable.of(70, 72, 76, 79, 75);\n * var height = Rx.Observable.of(1.76, 1.77, 1.78);\n * var bmi = weight.combineLatest(height, (w, h) => w / (h * h));\n * bmi.subscribe(x => console.log('BMI is ' + x));\n *\n * // With output to console:\n * // BMI is 24.212293388429753\n * // BMI is 23.93948099205209\n * // BMI is 23.671253629592222\n *\n * @see {@link combineAll}\n * @see {@link merge}\n * @see {@link withLatestFrom}\n *\n * @param {ObservableInput} other An input Observable to combine with the source\n * Observable. More than one input Observables may be given as argument.\n * @param {function} [project] An optional function to project the values from\n * the combined latest values into a new value on the output Observable.\n * @return {Observable} An Observable of projected values from the most recent\n * values from each input Observable, or an array of the most recent values from\n * each input Observable.\n * @method combineLatest\n * @owner Observable\n */\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var project = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = observables.pop();\n }\n // if the first and only other argument besides the resultSelector is an array\n // assume it's been called with `combineLatest([obs1, obs2, obs3], project)`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0].slice();\n }\n return this.lift.call(of.apply(void 0, [this].concat(observables)), new CombineLatestOperator(project));\n}\n//# sourceMappingURL=combineLatest.js.map","import { filter as higherOrderFilter } from 'rxjs/operators';\n/* tslint:enable:max-line-length */\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * <img src=\"./img/filter.png\" width=\"100%\">\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * @example <caption>Emit only click events whose target was a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');\n * clicksOnDivs.subscribe(x => console.log(x));\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of values from the source that were\n * allowed by the `predicate` function.\n * @method filter\n * @owner Observable\n */\nexport function filter(predicate, thisArg) {\n return higherOrderFilter(predicate, thisArg)(this);\n}\n//# sourceMappingURL=filter.js.map","import { map as higherOrderMap } from 'rxjs/operators';\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * <span class=\"informal\">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.</span>\n *\n * <img src=\"./img/map.png\" width=\"100%\">\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * @example <caption>Map every click to the clientX position of that click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks.map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param {function(value: T, index: number): R} project The function to apply\n * to each `value` emitted by the source Observable. The `index` parameter is\n * the number `i` for the i-th emission that has happened since the\n * subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to define what `this` is in the\n * `project` function.\n * @return {Observable<R>} An Observable that emits the values from the source\n * Observable transformed by the given `project` function.\n * @method map\n * @owner Observable\n */\nexport function map(project, thisArg) {\n return higherOrderMap(project, thisArg)(this);\n}\n//# sourceMappingURL=map.js.map","import { mergeAll as higherOrder } from 'rxjs/operators';\n/**\n * Converts a higher-order Observable into a first-order Observable which\n * concurrently delivers all values that are emitted on the inner Observables.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables.</span>\n *\n * <img src=\"./img/mergeAll.png\" width=\"100%\">\n *\n * `mergeAll` subscribes to an Observable that emits Observables, also known as\n * a higher-order Observable. Each time it observes one of these emitted inner\n * Observables, it subscribes to that and delivers all the values from the\n * inner Observable on the output Observable. The output Observable only\n * completes once all inner Observables have completed. Any error delivered by\n * a inner Observable will be immediately emitted on the output Observable.\n *\n * @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));\n * var firstOrder = higherOrder.mergeAll();\n * firstOrder.subscribe(x => console.log(x));\n *\n * @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));\n * var firstOrder = higherOrder.mergeAll(2);\n * firstOrder.subscribe(x => console.log(x));\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link exhaust}\n * @see {@link merge}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switch}\n * @see {@link zipAll}\n *\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits values coming from all the\n * inner Observables emitted by the source Observable.\n * @method mergeAll\n * @owner Observable\n */\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }\n return higherOrder(concurrent)(this);\n}\n//# sourceMappingURL=mergeAll.js.map","/* Observable */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport { Observable } from './internal/Observable';\nexport { ConnectableObservable } from './internal/observable/ConnectableObservable';\nexport { GroupedObservable } from './internal/operators/groupBy';\nexport { observable } from './internal/symbol/observable';\n/* Subjects */\nexport { Subject } from './internal/Subject';\nexport { BehaviorSubject } from './internal/BehaviorSubject';\nexport { ReplaySubject } from './internal/ReplaySubject';\nexport { AsyncSubject } from './internal/AsyncSubject';\n/* Schedulers */\nexport { asap as asapScheduler } from './internal/scheduler/asap';\nexport { async as asyncScheduler } from './internal/scheduler/async';\nexport { queue as queueScheduler } from './internal/scheduler/queue';\nexport { animationFrame as animationFrameScheduler } from './internal/scheduler/animationFrame';\nexport { VirtualTimeScheduler, VirtualAction } from './internal/scheduler/VirtualTimeScheduler';\nexport { Scheduler } from './internal/Scheduler';\n/* Subscription */\nexport { Subscription } from './internal/Subscription';\nexport { Subscriber } from './internal/Subscriber';\n/* Notification */\nexport { Notification } from './internal/Notification';\n/* Utils */\nexport { pipe } from './internal/util/pipe';\nexport { noop } from './internal/util/noop';\nexport { identity } from './internal/util/identity';\n/* Error types */\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';\n/* Static observable creation exports */\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 { 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';\n/* Constants */\nexport { EMPTY } from './internal/observable/empty';\nexport { NEVER } from './internal/observable/never';\n/* Config */\nexport { config } from './internal/config';\n//# sourceMappingURL=index.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport { config } from '../internal/config';\nexport { InnerSubscriber } from '../internal/InnerSubscriber';\nexport { OuterSubscriber } from '../internal/OuterSubscriber';\nexport { Scheduler } from '../internal/Scheduler';\nexport { AnonymousSubject } from '../internal/Subject';\nexport { SubjectSubscription } from '../internal/SubjectSubscription';\nexport { Subscriber } from '../internal/Subscriber';\nexport { fromPromise } from '../internal/observable/fromPromise';\nexport { fromIterable } from '../internal/observable/fromIterable';\nexport { ajax } from '../internal/observable/dom/ajax';\nexport { webSocket } from '../internal/observable/dom/webSocket';\nexport { ajaxGet, ajaxPost, ajaxDelete, ajaxPut, ajaxPatch, ajaxGetJSON, AjaxObservable, AjaxSubscriber, AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';\nexport { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject';\nexport { CombineLatestOperator } from '../internal/observable/combineLatest';\nexport { dispatch } from '../internal/observable/range';\nexport { SubscribeOnObservable } from '../internal/observable/SubscribeOnObservable';\nexport { Timestamp } from '../internal/operators/timestamp';\nexport { TimeInterval } from '../internal/operators/timeInterval';\nexport { GroupedObservable } from '../internal/operators/groupBy';\nexport { defaultThrottleConfig } from '../internal/operators/throttle';\nexport { rxSubscriber } from '../internal/symbol/rxSubscriber';\nexport { iterator } from '../internal/symbol/iterator';\nexport { observable } from '../internal/symbol/observable';\nexport { ArgumentOutOfRangeError } from '../internal/util/ArgumentOutOfRangeError';\nexport { EmptyError } from '../internal/util/EmptyError';\nexport { Immediate } from '../internal/util/Immediate';\nexport { ObjectUnsubscribedError } from '../internal/util/ObjectUnsubscribedError';\nexport { TimeoutError } from '../internal/util/TimeoutError';\nexport { UnsubscriptionError } from '../internal/util/UnsubscriptionError';\nexport { applyMixins } from '../internal/util/applyMixins';\nexport { errorObject } from '../internal/util/errorObject';\nexport { hostReportError } from '../internal/util/hostReportError';\nexport { identity } from '../internal/util/identity';\nexport { isArray } from '../internal/util/isArray';\nexport { isArrayLike } from '../internal/util/isArrayLike';\nexport { isDate } from '../internal/util/isDate';\nexport { isFunction } from '../internal/util/isFunction';\nexport { isIterable } from '../internal/util/isIterable';\nexport { isNumeric } from '../internal/util/isNumeric';\nexport { isObject } from '../internal/util/isObject';\nexport { isObservable } from '../internal/util/isObservable';\nexport { isPromise } from '../internal/util/isPromise';\nexport { isScheduler } from '../internal/util/isScheduler';\nexport { noop } from '../internal/util/noop';\nexport { not } from '../internal/util/not';\nexport { pipe } from '../internal/util/pipe';\nexport { root } from '../internal/util/root';\nexport { subscribeTo } from '../internal/util/subscribeTo';\nexport { subscribeToArray } from '../internal/util/subscribeToArray';\nexport { subscribeToIterable } from '../internal/util/subscribeToIterable';\nexport { subscribeToObservable } from '../internal/util/subscribeToObservable';\nexport { subscribeToPromise } from '../internal/util/subscribeToPromise';\nexport { subscribeToResult } from '../internal/util/subscribeToResult';\nexport { toSubscriber } from '../internal/util/toSubscriber';\nexport { tryCatch } from '../internal/util/tryCatch';\n//# sourceMappingURL=index.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { Subscription } from './Subscription';\n/**\n * @class AsyncSubject<T>\n */\nvar AsyncSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncSubject, _super);\n function AsyncSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.value = null;\n _this.hasNext = false;\n _this.hasCompleted = false;\n return _this;\n }\n /** @deprecated This is an internal implementation detail, do not use. */\n AsyncSubject.prototype._subscribe = function (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.prototype._subscribe.call(this, subscriber);\n };\n AsyncSubject.prototype.next = function (value) {\n if (!this.hasCompleted) {\n this.value = value;\n this.hasNext = true;\n }\n };\n AsyncSubject.prototype.error = function (error) {\n if (!this.hasCompleted) {\n _super.prototype.error.call(this, error);\n }\n };\n AsyncSubject.prototype.complete = function () {\n this.hasCompleted = true;\n if (this.hasNext) {\n _super.prototype.next.call(this, this.value);\n }\n _super.prototype.complete.call(this);\n };\n return AsyncSubject;\n}(Subject));\nexport { AsyncSubject };\n//# sourceMappingURL=AsyncSubject.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\n/**\n * @class BehaviorSubject<T>\n */\nvar BehaviorSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BehaviorSubject, _super);\n function BehaviorSubject(_value) {\n var _this = _super.call(this) || this;\n _this._value = _value;\n return _this;\n }\n Object.defineProperty(BehaviorSubject.prototype, \"value\", {\n get: function () {\n return this.getValue();\n },\n enumerable: true,\n configurable: true\n });\n /** @deprecated This is an internal implementation detail, do not use. */\n BehaviorSubject.prototype._subscribe = function (subscriber) {\n var subscription = _super.prototype._subscribe.call(this, subscriber);\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n return subscription;\n };\n BehaviorSubject.prototype.getValue = function () {\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 BehaviorSubject.prototype.next = function (value) {\n _super.prototype.next.call(this, this._value = value);\n };\n return BehaviorSubject;\n}(Subject));\nexport { BehaviorSubject };\n//# sourceMappingURL=BehaviorSubject.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar InnerSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.outerValue = outerValue;\n _this.outerIndex = outerIndex;\n _this.index = 0;\n return _this;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber));\nexport { InnerSubscriber };\n//# sourceMappingURL=InnerSubscriber.js.map\n","/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */\nimport { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\n/**\n * Represents a push-based event or value that an {@link Observable} can emit.\n * This class is particularly useful for operators that manage notifications,\n * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and\n * others. Besides wrapping the actual delivered value, it also annotates it\n * with metadata of, for instance, what type of push message it is (`next`,\n * `error`, or `complete`).\n *\n * @see {@link materialize}\n * @see {@link dematerialize}\n * @see {@link observeOn}\n *\n * @class Notification<T>\n */\nvar Notification = /*@__PURE__*/ (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n /**\n * Delivers to the given `observer` the value wrapped by this Notification.\n * @param {Observer} observer\n * @return\n */\n Notification.prototype.observe = function (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 /**\n * Given some {@link Observer} callbacks, deliver the value represented by the\n * current Notification to the correctly corresponding callback.\n * @param {function(value: T): void} next An Observer `next` callback.\n * @param {function(err: any): void} [error] An Observer `error` callback.\n * @param {function(): void} [complete] An Observer `complete` callback.\n * @return {any}\n */\n Notification.prototype.do = function (next, error, complete) {\n var 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 /**\n * Takes an Observer or its individual callback functions, and calls `observe`\n * or `do` methods accordingly.\n * @param {Observer|function(value: T): void} nextOrObserver An Observer or\n * the `next` callback.\n * @param {function(err: any): void} [error] An Observer `error` callback.\n * @param {function(): void} [complete] An Observer `complete` callback.\n * @return {any}\n */\n Notification.prototype.accept = function (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 /**\n * Returns a simple Observable that just delivers the notification represented\n * by this Notification instance.\n * @return {any}\n */\n Notification.prototype.toObservable = function () {\n var 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 /**\n * A shortcut to create a Notification instance of the type `next` from a\n * given value.\n * @param {T} value The `next` value.\n * @return {Notification<T>} The \"next\" Notification representing the\n * argument.\n * @nocollapse\n */\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n /**\n * A shortcut to create a Notification instance of the type `error` from a\n * given error.\n * @param {any} [err] The `error` error.\n * @return {Notification<T>} The \"error\" Notification representing the\n * argument.\n * @nocollapse\n */\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n /**\n * A shortcut to create a Notification instance of the type `complete`.\n * @return {Notification<any>} The valueless \"complete\" Notification.\n * @nocollapse\n */\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexport { Notification };\n//# sourceMappingURL=Notification.js.map\n","/** PURE_IMPORTS_START _util_toSubscriber,_internal_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from '../internal/symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\n/**\n * A representation of any set of values over any amount of time. This is the most basic building block\n * of RxJS.\n *\n * @class Observable<T>\n */\nvar Observable = /*@__PURE__*/ (function () {\n /**\n * @constructor\n * @param {Function} subscribe the function that is called when the Observable is\n * initially subscribed to. This function is given a Subscriber, to which new values\n * can be `next`ed, or an `error` method can be called to raise an error, or\n * `complete` can be called to notify of a successful completion.\n */\n function Observable(subscribe) {\n /** Internal implementation detail, do not use directly. */\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n /**\n * Creates a new Observable, with this Observable as the source, and the passed\n * operator defined as the new observable's operator.\n * @method lift\n * @param {Operator} operator the operator defining the operation to take on the observable\n * @return {Observable} a new observable with the Operator applied\n */\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n /**\n * Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.\n *\n * <span class=\"informal\">Use it when you have all these Observables, but still nothing is happening.</span>\n *\n * `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It\n * might be for example a function that you passed to a {@link create} static factory, but most of the time it is\n * a library implementation, which defines what and when will be emitted by an Observable. This means that calling\n * `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often\n * thought.\n *\n * Apart from starting the execution of an Observable, this method allows you to listen for values\n * that an Observable emits, as well as for when it completes or errors. You can achieve this in two\n * following ways.\n *\n * The first way is creating an object that implements {@link Observer} interface. It should have methods\n * defined by that interface, but note that it should be just a regular JavaScript object, which you can create\n * yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular do\n * not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also\n * that your object does not have to implement all methods. If you find yourself creating a method that doesn't\n * do anything, you can simply omit it. Note however, that if `error` method is not provided, all errors will\n * be left uncaught.\n *\n * The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.\n * This means you can provide three functions as arguments to `subscribe`, where first function is equivalent\n * of a `next` method, second of an `error` method and third of a `complete` method. Just as in case of Observer,\n * if you do not need to listen for something, you can omit a function, preferably by passing `undefined` or `null`,\n * since `subscribe` recognizes these functions by where they were placed in function call. When it comes\n * to `error` function, just as before, if not provided, errors emitted by an Observable will be thrown.\n *\n * Whatever style of calling `subscribe` you use, in both cases it returns a Subscription object.\n * This object allows you to call `unsubscribe` on it, which in turn will stop work that an Observable does and will clean\n * up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback\n * provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.\n *\n * Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.\n * It is an Observable itself that decides when these functions will be called. For example {@link of}\n * by default emits all its values synchronously. Always check documentation for how given Observable\n * will behave when subscribed and if its default behavior can be modified with a {@link Scheduler}.\n *\n * @example <caption>Subscribe with an Observer</caption>\n * const sumObserver = {\n * sum: 0,\n * next(value) {\n * console.log('Adding: ' + value);\n * this.sum = this.sum + value;\n * },\n * error() { // We actually could just remove this method,\n * }, // since we do not really care about errors right now.\n * complete() {\n * console.log('Sum equals: ' + this.sum);\n * }\n * };\n *\n * Rx.Observable.of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.\n * .subscribe(sumObserver);\n *\n * // Logs:\n * // \"Adding: 1\"\n * // \"Adding: 2\"\n * // \"Adding: 3\"\n * // \"Sum equals: 6\"\n *\n *\n * @example <caption>Subscribe with functions</caption>\n * let sum = 0;\n *\n * Rx.Observable.of(1, 2, 3)\n * .subscribe(\n * function(value) {\n * console.log('Adding: ' + value);\n * sum = sum + value;\n * },\n * undefined,\n * function() {\n * console.log('Sum equals: ' + sum);\n * }\n * );\n *\n * // Logs:\n * // \"Adding: 1\"\n * // \"Adding: 2\"\n * // \"Adding: 3\"\n * // \"Sum equals: 6\"\n *\n *\n * @example <caption>Cancel a subscription</caption>\n * const subscription = Rx.Observable.interval(1000).subscribe(\n * num => console.log(num),\n * undefined,\n * () => console.log('completed!') // Will not be called, even\n * ); // when cancelling subscription\n *\n *\n * setTimeout(() => {\n * subscription.unsubscribe();\n * console.log('unsubscribed!');\n * }, 2500);\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // \"unsubscribed!\" after 2.5s\n *\n *\n * @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,\n * or the first of three possible handlers, which is the handler for each value emitted from the subscribed\n * Observable.\n * @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,\n * the error will be thrown as unhandled.\n * @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.\n * @return {ISubscription} a subscription reference to the registered handlers\n * @method subscribe\n */\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n operator.call(sink, this.source);\n }\n else {\n sink.add(this.source || !sink.syncErrorThrowable ? this._subscribe(sink) : 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 /** @deprecated This is an internal implementation detail, do not use. */\n Observable.prototype._trySubscribe = function (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 sink.error(err);\n }\n };\n /**\n * @method forEach\n * @param {Function} next a handler for each value emitted by the observable\n * @param {PromiseConstructor} [promiseCtor] a constructor function used to instantiate the Promise\n * @return {Promise} a promise that either resolves on observable completion or\n * rejects with the handled error\n */\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n // Must be declared in a separate statement to avoid a RefernceError when\n // accessing subscription below in the closure due to Temporal Dead Zone.\n var subscription;\n subscription = _this.subscribe(function (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 /** @deprecated This is an internal implementation detail, do not use. */\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n /**\n * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable\n * @method Symbol.observable\n * @return {Observable} this instance of the observable\n */\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n /* tslint:enable:max-line-length */\n /**\n * Used to stitch together functional operators into a chain.\n * @method pipe\n * @return {Observable} the Observable result of all of the operators having\n * been called in the order they were passed in.\n *\n * @example\n *\n * import { map, filter, scan } from 'rxjs/operators';\n *\n * Rx.Observable.interval(1000)\n * .pipe(\n * filter(x => x % 2 === 0),\n * map(x => x + x),\n * scan((acc, x) => acc + x)\n * )\n * .subscribe(x => console.log(x))\n */\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipeFromArray(operations)(this);\n };\n /* tslint:enable:max-line-length */\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n // HACK: Since TypeScript inherits static properties too, we have to\n // fight against TypeScript here so Subject can have a different static create signature\n /**\n * Creates a new cold Observable by calling the Observable constructor\n * @static true\n * @owner Observable\n * @method create\n * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor\n * @return {Observable} a new cold observable\n * @nocollapse\n */\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\n/**\n * Decides between a passed promise constructor from consuming code,\n * A default configured promise constructor, and the native promise\n * constructor and returns it. If nothing can be found, it will throw\n * an error.\n * @param promiseCtor The optional promise constructor to passed by consuming code\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\n","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar OuterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber));\nexport { OuterSubscriber };\n//# sourceMappingURL=OuterSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { 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';\n/**\n * @class ReplaySubject<T>\n */\nvar ReplaySubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ReplaySubject, _super);\n function ReplaySubject(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) {\n bufferSize = Number.POSITIVE_INFINITY;\n }\n if (windowTime === void 0) {\n windowTime = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this) || this;\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 return _this;\n }\n ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {\n var _events = this._events;\n _events.push(value);\n // Since this method is invoked in every next() call than the buffer\n // can overgrow the max size only by one item\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype.nextTimeWindow = function (value) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n _super.prototype.next.call(this, value);\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n ReplaySubject.prototype._subscribe = function (subscriber) {\n // When `_infiniteTimeWindow === true` then the buffer is already trimmed\n var _infiniteTimeWindow = this._infiniteTimeWindow;\n var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n var scheduler = this.scheduler;\n var len = _events.length;\n var 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 (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (var 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 ReplaySubject.prototype._getNow = function () {\n return (this.scheduler || queue).now();\n };\n ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n var now = this._getNow();\n var _bufferSize = this._bufferSize;\n var _windowTime = this._windowTime;\n var _events = this._events;\n var eventsCount = _events.length;\n var spliceCount = 0;\n // Trim events that fall out of the time window.\n // Start at the front of the list. Break early once\n // we encounter an event that falls within the window.\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 return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\nvar ReplayEvent = /*@__PURE__*/ (function () {\n function ReplayEvent(time, value) {\n this.time = time;\n this.value = value;\n }\n return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map\n","/**\n * An execution context and a data structure to order tasks and schedule their\n * execution. Provides a notion of (potentially virtual) time, through the\n * `now()` getter method.\n *\n * Each unit of work in a Scheduler is called an {@link Action}.\n *\n * ```ts\n * class Scheduler {\n * now(): number;\n * schedule(work, delay?, state?): Subscription;\n * }\n * ```\n *\n * @class Scheduler\n * @deprecated Scheduler is an internal implementation detail of RxJS, and\n * should not be used directly. Rather, create your own class and implement\n * {@link SchedulerLike}\n */\nvar Scheduler = /*@__PURE__*/ (function () {\n function Scheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n /**\n * Schedules a function, `work`, for execution. May happen at some point in\n * the future, according to the `delay` parameter, if specified. May be passed\n * some context object, `state`, which will be passed to the `work` function.\n *\n * The given arguments will be processed an stored as an Action object in a\n * queue of actions.\n *\n * @param {function(state: ?T): ?Subscription} work A function representing a\n * task, or some unit of work to be executed by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler itself.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @return {Subscription} A subscription in order to be able to unsubscribe\n * the scheduled work.\n */\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n return new this.SchedulerAction(this, work).schedule(state, delay);\n };\n /** @nocollapse */\n Scheduler.now = Date.now ? Date.now : function () { return +new Date(); };\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { 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';\n/**\n * @class SubjectSubscriber<T>\n */\nvar SubjectSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n return _this;\n }\n return SubjectSubscriber;\n}(Subscriber));\nexport { SubjectSubscriber };\n/**\n * @class Subject<T>\n */\nvar Subject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.observers = [];\n _this.closed = false;\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype[rxSubscriberSymbol] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n Subject.prototype._subscribe = function (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 Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n /**@nocollapse */\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\n/**\n * @class AnonymousSubject<T>\n */\nvar AnonymousSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from './Subscription';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SubjectSubscription = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n var _this = _super.call(this) || this;\n _this.subject = subject;\n _this.subscriber = subscriber;\n _this.closed = false;\n return _this;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription));\nexport { SubjectSubscription };\n//# sourceMappingURL=SubjectSubscription.js.map\n","/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { 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';\n/**\n * Implements the {@link Observer} interface and extends the\n * {@link Subscription} class. While the {@link Observer} is the public API for\n * consuming the values of an {@link Observable}, all Observers get converted to\n * a Subscriber, in order to provide Subscription-like capabilities such as\n * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for\n * implementing operators, but it is rarely used as a public API.\n *\n * @class Subscriber<T>\n */\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subscriber, _super);\n /**\n * @param {Observer|function(value: T): void} [destinationOrNext] A partially\n * defined Observer or a `next` callback function.\n * @param {function(e: ?any): void} [error] The `error` callback of an\n * Observer.\n * @param {function(): void} [complete] The `complete` callback of an\n * Observer.\n */\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n /** @internal */ _this.syncErrorValue = null;\n /** @internal */ _this.syncErrorThrown = false;\n /** @internal */ _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 // HACK(benlesh): For situations where Node has multiple copies of rxjs in\n // node_modules, we cannot rely on `instanceof` checks\n if (isTrustedSubscriber(destinationOrNext)) {\n var trustedSubscriber = destinationOrNext[rxSubscriberSymbol]();\n _this.syncErrorThrowable = trustedSubscriber.syncErrorThrowable;\n _this.destination = trustedSubscriber;\n trustedSubscriber.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 return _this;\n }\n Subscriber.prototype[rxSubscriberSymbol] = function () { return this; };\n /**\n * A static factory for a Subscriber, given a (potentially partial) definition\n * of an Observer.\n * @param {function(x: ?T): void} [next] The `next` callback of an Observer.\n * @param {function(e: ?any): void} [error] The `error` callback of an\n * Observer.\n * @param {function(): void} [complete] The `complete` callback of an\n * Observer.\n * @return {Subscriber<T>} A Subscriber wrapping the (partially defined)\n * Observer represented by the given arguments.\n * @nocollapse\n */\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n /**\n * The {@link Observer} callback to receive notifications of type `next` from\n * the Observable, with a value. The Observable may call this method 0 or more\n * times.\n * @param {T} [value] The `next` value.\n * @return {void}\n */\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n /**\n * The {@link Observer} callback to receive notifications of type `error` from\n * the Observable, with an attached {@link Error}. Notifies the Observer that\n * the Observable has experienced an error condition.\n * @param {any} [err] The `error` exception.\n * @return {void}\n */\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n /**\n * The {@link Observer} callback to receive a valueless notification of type\n * `complete` from the Observable. Notifies the Observer that the Observable\n * has finished sending push-based notifications.\n * @return {void}\n */\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n this._parent = null;\n this._parents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parent = _parent;\n this._parents = _parents;\n return this;\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SafeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this._parentSubscriber = _parentSubscriber;\n var next;\n var 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 return _this;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\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 SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;\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 SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _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 SafeSubscriber.prototype.__tryOrUnsub = function (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 SafeSubscriber.prototype.__tryOrSetError = function (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 /** @deprecated This is an internal implementation detail, do not use. */\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\nfunction isTrustedSubscriber(obj) {\n return obj instanceof Subscriber || ('syncErrorThrowable' in obj && obj[rxSubscriberSymbol]);\n}\n//# sourceMappingURL=Subscriber.js.map\n","/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_tryCatch,_util_errorObject,_util_UnsubscriptionError PURE_IMPORTS_END */\nimport { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { tryCatch } from './util/tryCatch';\nimport { errorObject } from './util/errorObject';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\n/**\n * Represents a disposable resource, such as the execution of an Observable. A\n * Subscription has one important method, `unsubscribe`, that takes no argument\n * and just disposes the resource held by the subscription.\n *\n * Additionally, subscriptions may be grouped together through the `add()`\n * method, which will attach a child Subscription to the current Subscription.\n * When a Subscription is unsubscribed, all its children (and its grandchildren)\n * will be unsubscribed as well.\n *\n * @class Subscription\n */\nvar Subscription = /*@__PURE__*/ (function () {\n /**\n * @param {function(): void} [unsubscribe] A function describing how to\n * perform the disposal of resources when the `unsubscribe` method is called.\n */\n function Subscription(unsubscribe) {\n /**\n * A flag to indicate whether this Subscription has already been unsubscribed.\n * @type {boolean}\n */\n this.closed = false;\n /** @internal */\n this._parent = null;\n /** @internal */\n this._parents = null;\n /** @internal */\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n /**\n * Disposes the resources held by the subscription. May, for instance, cancel\n * an ongoing Observable execution or cancel any other type of work that\n * started when the Subscription was created.\n * @return {void}\n */\n Subscription.prototype.unsubscribe = function () {\n var hasErrors = false;\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parent = _a._parent, _parents = _a._parents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parent = null;\n this._parents = null;\n // null out _subscriptions first so any child subscriptions that attempt\n // to remove themselves from this subscription will noop\n this._subscriptions = null;\n var index = -1;\n var len = _parents ? _parents.length : 0;\n // if this._parent is null, then so is this._parents, and we\n // don't have to remove ourselves from any parent subscriptions.\n while (_parent) {\n _parent.remove(this);\n // if this._parents is null or index >= len,\n // then _parent is set to null, and the loop exits\n _parent = ++index < len && _parents[index] || null;\n }\n if (isFunction(_unsubscribe)) {\n var trial = tryCatch(_unsubscribe).call(this);\n if (trial === errorObject) {\n hasErrors = true;\n errors = errors || (errorObject.e instanceof UnsubscriptionError ?\n flattenUnsubscriptionErrors(errorObject.e.errors) : [errorObject.e]);\n }\n }\n if (isArray(_subscriptions)) {\n index = -1;\n len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject(sub)) {\n var trial = tryCatch(sub.unsubscribe).call(sub);\n if (trial === errorObject) {\n hasErrors = true;\n errors = errors || [];\n var err = errorObject.e;\n if (err instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n }\n if (hasErrors) {\n throw new UnsubscriptionError(errors);\n }\n };\n /**\n * Adds a tear down to be called during the unsubscribe() of this\n * Subscription.\n *\n * If the tear down being added is a subscription that is already\n * unsubscribed, is the same reference `add` is being called on, or is\n * `Subscription.EMPTY`, it will not be added.\n *\n * If this subscription is already in an `closed` state, the passed\n * tear down logic will be executed immediately.\n *\n * @param {TeardownLogic} teardown The additional logic to execute on\n * teardown.\n * @return {Subscription} Returns the Subscription used or created to be\n * added to the inner subscriptions list. This Subscription can be used with\n * `remove()` to remove the passed teardown logic from the inner subscriptions\n * list.\n */\n Subscription.prototype.add = function (teardown) {\n if (!teardown || (teardown === Subscription.EMPTY)) {\n return Subscription.EMPTY;\n }\n if (teardown === this) {\n return this;\n }\n var subscription = teardown;\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (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 (typeof subscription._addParent !== 'function' /* quack quack */) {\n var 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 var subscriptions = this._subscriptions || (this._subscriptions = []);\n subscriptions.push(subscription);\n subscription._addParent(this);\n return subscription;\n };\n /**\n * Removes a Subscription from the internal list of subscriptions that will\n * unsubscribe during the unsubscribe process of this Subscription.\n * @param {Subscription} subscription The subscription to remove.\n * @return {void}\n */\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n /** @internal */\n Subscription.prototype._addParent = function (parent) {\n var _a = this, _parent = _a._parent, _parents = _a._parents;\n if (!_parent || _parent === parent) {\n // If we don't have a parent, or the new parent is the same as the\n // current parent, then set this._parent to the new parent.\n this._parent = parent;\n }\n else if (!_parents) {\n // If there's already one parent, but not multiple, allocate an Array to\n // store the rest of the parent Subscriptions.\n this._parents = [parent];\n }\n else if (_parents.indexOf(parent) === -1) {\n // Only add the new parent to the _parents list if it's not already there.\n _parents.push(parent);\n }\n };\n /** @nocollapse */\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexport { Subscription };\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\n/**\n * The global configuration object for RxJS, used to configure things\n * like what Promise contructor should used to create Promises\n */\nexport var config = {\n /**\n * The promise constructor used by default for methods such as\n * {@link toPromise} and {@link forEach}\n */\n Promise: undefined,\n /**\n * If true, turns on synchronous error rethrowing, which is a deprecated behavior\n * in v6 and higher. This behavior enables bad patterns like wrapping a subscribe\n * call in a try/catch block. It also enables producer interference, a nasty bug\n * where a multicast can be broken for all observers by a downstream consumer with\n * an unhandled error. DO NOT USE THIS FLAG UNLESS IT'S NEEDED TO BY TIME\n * FOR MIGRATION REASONS.\n */\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n var error = /*@__PURE__*/ new Error();\n /*@__PURE__*/ 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 /*@__PURE__*/ 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\n","/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\n/**\n * @class ConnectableObservable<T>\n */\nvar ConnectableObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._refCount = 0;\n /** @internal */\n _this._isComplete = false;\n return _this;\n }\n /** @deprecated This is an internal implementation detail, do not use. */\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var 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 else {\n this._connection = connection;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\nvar connectableProto = ConnectableObservable.prototype;\nexport var connectableObservableDescriptor = {\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};\nvar ConnectableSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var 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 return ConnectableSubscriber;\n}(SubjectSubscriber));\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var 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 ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // Observable.range(0, 10)\n // .publish()\n // .refCount()\n // .take(5)\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from '../Observable';\nimport { asap } from '../scheduler/asap';\nimport { isNumeric } from '../util/isNumeric';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar SubscribeOnObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubscribeOnObservable, _super);\n function SubscribeOnObservable(source, delayTime, scheduler) {\n if (delayTime === void 0) {\n delayTime = 0;\n }\n if (scheduler === void 0) {\n scheduler = asap;\n }\n var _this = _super.call(this) || this;\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 return _this;\n }\n /** @nocollapse */\n SubscribeOnObservable.create = function (source, delay, scheduler) {\n if (delay === void 0) {\n delay = 0;\n }\n if (scheduler === void 0) {\n scheduler = asap;\n }\n return new SubscribeOnObservable(source, delay, scheduler);\n };\n /** @nocollapse */\n SubscribeOnObservable.dispatch = function (arg) {\n var source = arg.source, subscriber = arg.subscriber;\n return this.add(source.subscribe(subscriber));\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n SubscribeOnObservable.prototype._subscribe = function (subscriber) {\n var delay = this.delayTime;\n var source = this.source;\n var scheduler = this.scheduler;\n return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {\n source: source, subscriber: subscriber\n });\n };\n return SubscribeOnObservable;\n}(Observable));\nexport { SubscribeOnObservable };\n//# sourceMappingURL=SubscribeOnObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isArray,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { isArray } from '../util/isArray';\nimport { isScheduler } from '../util/isScheduler';\n// tslint:enable:max-line-length\n/**\n * Converts a callback API to a function that returns an Observable.\n *\n * <span class=\"informal\">Give it a function `f` of type `f(x, callback)` and\n * it will return a function `g` that when called as `g(x)` will output an\n * Observable.</span>\n *\n * `bindCallback` is not an operator because its input and output are not\n * Observables. The input is a function `func` with some parameters, the\n * last parameter must be a callback function that `func` calls when it is\n * done.\n *\n * The output of `bindCallback` is a function that takes the same parameters\n * as `func`, except the last one (the callback). When the output function\n * is called with arguments it will return an Observable. If function `func`\n * calls its callback with one argument the Observable will emit that value.\n * If on the other hand the callback is called with multiple values the resulting\n * Observable will emit an array with said values as arguments.\n *\n * It is very important to remember that input function `func` is not called\n * when the output function is, but rather when the Observable returned by the output\n * function is subscribed. This means if `func` makes an AJAX request, that request\n * will be made every time someone subscribes to the resulting Observable, but not before.\n *\n * The last optional parameter - {@link Scheduler} - can be used to control when the call\n * to `func` happens after someone subscribes to Observable, as well as when results\n * passed to callback will be emitted. By default, the subscription to an Observable calls `func`\n * synchronously, but using `Scheduler.async` as the last parameter will defer the call to `func`,\n * just like wrapping the call in `setTimeout` with a timeout of `0` would. If you use the async Scheduler\n * and call `subscribe` on the output Observable all function calls that are currently executing\n * will end before `func` is invoked.\n *\n * By default results passed to the callback are emitted immediately after `func` invokes the callback.\n * In particular, if the callback is called synchronously the subscription of the resulting Observable\n * will call the `next` function synchronously as well. If you want to defer that call,\n * you may use `Scheduler.async` just as before. This means that by using `Scheduler.async` you can\n * ensure that `func` always calls its callback asynchronously, thus avoiding terrifying Zalgo.\n *\n * Note that the Observable created by the output function will always emit a single value\n * and then complete immediately. If `func` calls the callback multiple times, values from subsequent\n * calls will not appear in the stream. If you need to listen for multiple calls,\n * you probably want to use {@link fromEvent} or {@link fromEventPattern} instead.\n *\n * If `func` depends on some context (`this` property) and is not already bound the context of `func`\n * will be the context that the output function has at call time. In particular, if `func`\n * is called as a method of some objec and if `func` is not already bound, in order to preserve the context\n * it is recommended that the context of the output function is set to that object as well.\n *\n * If the input function calls its callback in the \"node style\" (i.e. first argument to callback is\n * optional error parameter signaling whether the call failed or not), {@link bindNodeCallback}\n * provides convenient error handling and probably is a better choice.\n * `bindCallback` will treat such functions the same as any other and error parameters\n * (whether passed or not) will always be interpreted as regular callback argument.\n *\n *\n * @example <caption>Convert jQuery's getJSON to an Observable API</caption>\n * // Suppose we have jQuery.getJSON('/my/url', callback)\n * var getJSONAsObservable = bindCallback(jQuery.getJSON);\n * var result = getJSONAsObservable('/my/url');\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n *\n * @example <caption>Receive an array of arguments passed to a callback</caption>\n * someFunction((a, b, c) => {\n * console.log(a); // 5\n * console.log(b); // 'some string'\n * console.log(c); // {someProperty: 'someValue'}\n * });\n *\n * const boundSomeFunction = bindCallback(someFunction);\n * boundSomeFunction().subscribe(values => {\n * console.log(values) // [5, 'some string', {someProperty: 'someValue'}]\n * });\n *\n *\n * @example <caption>Compare behaviour with and without async Scheduler</caption>\n * function iCallMyCallbackSynchronously(cb) {\n * cb();\n * }\n *\n * const boundSyncFn = bindCallback(iCallMyCallbackSynchronously);\n * const boundAsyncFn = bindCallback(iCallMyCallbackSynchronously, null, Rx.Scheduler.async);\n *\n * boundSyncFn().subscribe(() => console.log('I was sync!'));\n * boundAsyncFn().subscribe(() => console.log('I was async!'));\n * console.log('This happened...');\n *\n * // Logs:\n * // I was sync!\n * // This happened...\n * // I was async!\n *\n *\n * @example <caption>Use bindCallback on an object method</caption>\n * const boundMethod = bindCallback(someObject.methodWithCallback);\n * boundMethod.call(someObject) // make sure methodWithCallback has access to someObject\n * .subscribe(subscriber);\n *\n *\n * @see {@link bindNodeCallback}\n * @see {@link from}\n * @see {@link fromPromise}\n *\n * @param {function} func A function with a callback as the last parameter.\n * @param {Scheduler} [scheduler] The scheduler on which to schedule the\n * callbacks.\n * @return {function(...params: *): Observable} A function which returns the\n * Observable that delivers the same values the callback would deliver.\n * @name bindCallback\n */\nexport function bindCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n // DEPRECATED PATH\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n };\n }\n }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this;\n var subject;\n var params = {\n context: context,\n subject: subject,\n callbackFunc: callbackFunc,\n scheduler: scheduler,\n };\n return new Observable(function (subscriber) {\n if (!scheduler) {\n if (!subject) {\n subject = new AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);\n subject.complete();\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n subject.error(err);\n }\n }\n return subject.subscribe(subscriber);\n }\n else {\n var state = {\n args: args, subscriber: subscriber, params: params,\n };\n return scheduler.schedule(dispatch, 0, state);\n }\n });\n };\n}\nfunction dispatch(state) {\n var _this = this;\n var self = this;\n var args = state.args, subscriber = state.subscriber, params = state.params;\n var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;\n var subject = params.subject;\n if (!subject) {\n subject = params.subject = new AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n subject.error(err);\n }\n }\n this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(state) {\n var value = state.value, subject = state.subject;\n subject.next(value);\n subject.complete();\n}\nfunction dispatchError(state) {\n var err = state.err, subject = state.subject;\n subject.error(err);\n}\n//# sourceMappingURL=bindCallback.js.map\n","/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_isScheduler,_util_isArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { AsyncSubject } from '../AsyncSubject';\nimport { map } from '../operators/map';\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\n/**\n * Converts a Node.js-style callback API to a function that returns an\n * Observable.\n *\n * <span class=\"informal\">It's just like {@link bindCallback}, but the\n * callback is expected to be of type `callback(error, result)`.</span>\n *\n * `bindNodeCallback` is not an operator because its input and output are not\n * Observables. The input is a function `func` with some parameters, but the\n * last parameter must be a callback function that `func` calls when it is\n * done. The callback function is expected to follow Node.js conventions,\n * where the first argument to the callback is an error object, signaling\n * whether call was successful. If that object is passed to callback, it means\n * something went wrong.\n *\n * The output of `bindNodeCallback` is a function that takes the same\n * parameters as `func`, except the last one (the callback). When the output\n * function is called with arguments, it will return an Observable.\n * If `func` calls its callback with error parameter present, Observable will\n * error with that value as well. If error parameter is not passed, Observable will emit\n * second parameter. If there are more parameters (third and so on),\n * Observable will emit an array with all arguments, except first error argument.\n *\n * Note that `func` will not be called at the same time output function is,\n * but rather whenever resulting Observable is subscribed. By default call to\n * `func` will happen synchronously after subscription, but that can be changed\n * with proper {@link Scheduler} provided as optional third parameter. Scheduler\n * can also control when values from callback will be emitted by Observable.\n * To find out more, check out documentation for {@link bindCallback}, where\n * Scheduler works exactly the same.\n *\n * As in {@link bindCallback}, context (`this` property) of input function will be set to context\n * of returned function, when it is called.\n *\n * After Observable emits value, it will complete immediately. This means\n * even if `func` calls callback again, values from second and consecutive\n * calls will never appear on the stream. If you need to handle functions\n * that call callbacks multiple times, check out {@link fromEvent} or\n * {@link fromEventPattern} instead.\n *\n * Note that `bindNodeCallback` can be used in non-Node.js environments as well.\n * \"Node.js-style\" callbacks are just a convention, so if you write for\n * browsers or any other environment and API you use implements that callback style,\n * `bindNodeCallback` can be safely used on that API functions as well.\n *\n * Remember that Error object passed to callback does not have to be an instance\n * of JavaScript built-in `Error` object. In fact, it does not even have to an object.\n * Error parameter of callback function is interpreted as \"present\", when value\n * of that parameter is truthy. It could be, for example, non-zero number, non-empty\n * string or boolean `true`. In all of these cases resulting Observable would error\n * with that value. This means usually regular style callbacks will fail very often when\n * `bindNodeCallback` is used. If your Observable errors much more often then you\n * would expect, check if callback really is called in Node.js-style and, if not,\n * switch to {@link bindCallback} instead.\n *\n * Note that even if error parameter is technically present in callback, but its value\n * is falsy, it still won't appear in array emitted by Observable.\n *\n *\n * @example <caption>Read a file from the filesystem and get the data as an Observable</caption>\n * import * as fs from 'fs';\n * var readFileAsObservable = bindNodeCallback(fs.readFile);\n * var result = readFileAsObservable('./roadNames.txt', 'utf8');\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n *\n * @example <caption>Use on function calling callback with multiple arguments</caption>\n * someFunction((err, a, b) => {\n * console.log(err); // null\n * console.log(a); // 5\n * console.log(b); // \"some string\"\n * });\n * var boundSomeFunction = bindNodeCallback(someFunction);\n * boundSomeFunction()\n * .subscribe(value => {\n * console.log(value); // [5, \"some string\"]\n * });\n *\n * @example <caption>Use on function calling callback in regular style</caption>\n * someFunction(a => {\n * console.log(a); // 5\n * });\n * var boundSomeFunction = bindNodeCallback(someFunction);\n * boundSomeFunction()\n * .subscribe(\n * value => {} // never gets called\n * err => console.log(err) // 5\n * );\n *\n *\n * @see {@link bindCallback}\n * @see {@link from}\n * @see {@link fromPromise}\n *\n * @param {function} func Function with a Node.js-style callback as the last parameter.\n * @param {Scheduler} [scheduler] The scheduler on which to schedule the\n * callbacks.\n * @return {function(...params: *): Observable} A function which returns the\n * Observable that delivers the same values the Node.js callback would\n * deliver.\n * @name bindNodeCallback\n */\nexport function bindNodeCallback(callbackFunc, resultSelector, scheduler) {\n if (resultSelector) {\n if (isScheduler(resultSelector)) {\n scheduler = resultSelector;\n }\n else {\n // DEPRECATED PATH\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n };\n }\n }\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var params = {\n subject: undefined,\n args: args,\n callbackFunc: callbackFunc,\n scheduler: scheduler,\n context: this,\n };\n return new Observable(function (subscriber) {\n var context = params.context;\n var subject = params.subject;\n if (!scheduler) {\n if (!subject) {\n subject = params.subject = new AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var 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.concat([handler]));\n }\n catch (err) {\n subject.error(err);\n }\n }\n return subject.subscribe(subscriber);\n }\n else {\n return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });\n }\n });\n };\n}\nfunction dispatch(state) {\n var _this = this;\n var params = state.params, subscriber = state.subscriber, context = state.context;\n var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;\n var subject = params.subject;\n if (!subject) {\n subject = params.subject = new AsyncSubject();\n var handler = function () {\n var innerArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n innerArgs[_i] = arguments[_i];\n }\n var err = innerArgs.shift();\n if (err) {\n _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n }\n else {\n var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;\n _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));\n }\n };\n try {\n callbackFunc.apply(context, args.concat([handler]));\n }\n catch (err) {\n this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));\n }\n }\n this.add(subject.subscribe(subscriber));\n}\nfunction dispatchNext(arg) {\n var value = arg.value, subject = arg.subject;\n subject.next(value);\n subject.complete();\n}\nfunction dispatchError(arg) {\n var err = arg.err, subject = arg.subject;\n subject.error(err);\n}\n//# sourceMappingURL=bindNodeCallback.js.map\n","/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nvar NONE = {};\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are\n * calculated from the latest values of each of its input Observables.\n *\n * <span class=\"informal\">Whenever any input Observable emits a value, it\n * computes a formula using the latest values from all the inputs, then emits\n * the output of that formula.</span>\n *\n * <img src=\"./img/combineLatest.png\" width=\"100%\">\n *\n * `combineLatest` combines the values from all the Observables passed as\n * arguments. This is done by subscribing to each Observable in order and,\n * whenever any Observable emits, collecting an array of the most recent\n * values from each Observable. So if you pass `n` Observables to operator,\n * returned Observable will always emit an array of `n` values, in order\n * corresponding to order of passed Observables (value from the first Observable\n * on the first place and so on).\n *\n * Static version of `combineLatest` accepts either an array of Observables\n * or each Observable can be put directly as an argument. Note that array of\n * Observables is good choice, if you don't know beforehand how many Observables\n * you will combine. Passing empty array will result in Observable that\n * completes immediately.\n *\n * To ensure output array has always the same length, `combineLatest` will\n * actually wait for all input Observables to emit at least once,\n * before it starts emitting results. This means if some Observable emits\n * values before other Observables started emitting, all that values but last\n * will be lost. On the other hand, is some Observable does not emit value but\n * completes, resulting Observable will complete at the same moment without\n * emitting anything, since it will be now impossible to include value from\n * completed Observable in resulting array. Also, if some input Observable does\n * not emit any value and never completes, `combineLatest` will also never emit\n * and never complete, since, again, it will wait for all streams to emit some\n * value.\n *\n * If at least one Observable was passed to `combineLatest` and all passed Observables\n * emitted something, resulting Observable will complete when all combined\n * streams complete. So even if some Observable completes, result of\n * `combineLatest` will still emit values when other Observables do. In case\n * of completed Observable, its value from now on will always be the last\n * emitted value. On the other hand, if any Observable errors, `combineLatest`\n * will error immediately as well, and all other Observables will be unsubscribed.\n *\n * `combineLatest` accepts as optional parameter `project` function, which takes\n * as arguments all values that would normally be emitted by resulting Observable.\n * `project` can return any kind of value, which will be then emitted by Observable\n * instead of default array. Note that `project` does not take as argument that array\n * of values, but values themselves. That means default `project` can be imagined\n * as function that takes all its arguments and puts them into an array.\n *\n *\n * @example <caption>Combine two timer Observables</caption>\n * const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now\n * const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now\n * const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer);\n * combinedTimers.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0] after 0.5s\n * // [1, 0] after 1s\n * // [1, 1] after 1.5s\n * // [2, 1] after 2s\n *\n *\n * @example <caption>Combine an array of Observables</caption>\n * const observables = [1, 5, 10].map(\n * n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds\n * );\n * const combined = Rx.Observable.combineLatest(observables);\n * combined.subscribe(value => console.log(value));\n * // Logs\n * // [0, 0, 0] immediately\n * // [1, 0, 0] after 1s\n * // [1, 5, 0] after 5s\n * // [1, 5, 10] after 10s\n *\n *\n * @example <caption>Use project function to dynamically calculate the Body-Mass Index</caption>\n * var weight = Rx.Observable.of(70, 72, 76, 79, 75);\n * var height = Rx.Observable.of(1.76, 1.77, 1.78);\n * var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h));\n * bmi.subscribe(x => console.log('BMI is ' + x));\n *\n * // With output to console:\n * // BMI is 24.212293388429753\n * // BMI is 23.93948099205209\n * // BMI is 23.671253629592222\n *\n *\n * @see {@link combineAll}\n * @see {@link merge}\n * @see {@link withLatestFrom}\n *\n * @param {ObservableInput} observable1 An input Observable to combine with other Observables.\n * @param {ObservableInput} observable2 An input Observable to combine with other Observables.\n * More than one input Observables may be given as arguments\n * or an array of Observables may be given as the first argument.\n * @param {function} [project] An optional function to project the values from\n * the combined latest values into a new value on the output Observable.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to\n * each input Observable.\n * @return {Observable} An Observable of projected values from the most recent\n * values from each input Observable, or an array of the most recent values from\n * each input Observable.\n */\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = null;\n var scheduler = null;\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 the first and only other argument besides the resultSelector is an array\n // assume it's been called with `combineLatest([obs1, obs2, obs3], resultSelector)`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nvar CombineLatestOperator = /*@__PURE__*/ (function () {\n function CombineLatestOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n };\n return CombineLatestOperator;\n}());\nexport { CombineLatestOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, resultSelector) {\n var _this = _super.call(this, destination) || this;\n _this.resultSelector = resultSelector;\n _this.active = 0;\n _this.values = [];\n _this.observables = [];\n return _this;\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var 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 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n var 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 return CombineLatestSubscriber;\n}(OuterSubscriber));\nexport { CombineLatestSubscriber };\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START _util_isScheduler,_of,_from,_operators_concatAll PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { of } from './of';\nimport { from } from './from';\nimport { concatAll } from '../operators/concatAll';\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which sequentially emits all values from given\n * Observable and then moves on to the next.\n *\n * <span class=\"informal\">Concatenates multiple Observables together by\n * sequentially emitting their values, one Observable after the other.</span>\n *\n * <img src=\"./img/concat.png\" width=\"100%\">\n *\n * `concat` joins multiple Observables together, by subscribing to them one at a time and\n * merging their results into the output Observable. You can pass either an array of\n * Observables, or put them directly as arguments. Passing an empty array will result\n * in Observable that completes immediately.\n *\n * `concat` will subscribe to first input Observable and emit all its values, without\n * changing or affecting them in any way. When that Observable completes, it will\n * subscribe to then next Observable passed and, again, emit its values. This will be\n * repeated, until the operator runs out of Observables. When last input Observable completes,\n * `concat` will complete as well. At any given moment only one Observable passed to operator\n * emits values. If you would like to emit values from passed Observables concurrently, check out\n * {@link merge} instead, especially with optional `concurrent` parameter. As a matter of fact,\n * `concat` is an equivalent of `merge` operator with `concurrent` parameter set to `1`.\n *\n * Note that if some input Observable never completes, `concat` will also never complete\n * and Observables following the one that did not complete will never be subscribed. On the other\n * hand, if some Observable simply completes immediately after it is subscribed, it will be\n * invisible for `concat`, which will just move on to the next Observable.\n *\n * If any Observable in chain errors, instead of passing control to the next Observable,\n * `concat` will error immediately as well. Observables that would be subscribed after\n * the one that emitted error, never will.\n *\n * If you pass to `concat` the same Observable many times, its stream of values\n * will be \"replayed\" on every subscription, which means you can repeat given Observable\n * as many times as you like. If passing the same Observable to `concat` 1000 times becomes tedious,\n * you can always use {@link repeat}.\n *\n * @example <caption>Concatenate a timer counting from 0 to 3 with a synchronous sequence from 1 to 10</caption>\n * var timer = Rx.Observable.interval(1000).take(4);\n * var sequence = Rx.Observable.range(1, 10);\n * var result = Rx.Observable.concat(timer, sequence);\n * result.subscribe(x => console.log(x));\n *\n * // results in:\n * // 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3 -immediate-> 1 ... 10\n *\n *\n * @example <caption>Concatenate an array of 3 Observables</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var result = Rx.Observable.concat([timer1, timer2, timer3]); // note that array is passed\n * result.subscribe(x => console.log(x));\n *\n * // results in the following:\n * // (Prints to console sequentially)\n * // -1000ms-> 0 -1000ms-> 1 -1000ms-> ... 9\n * // -2000ms-> 0 -2000ms-> 1 -2000ms-> ... 5\n * // -500ms-> 0 -500ms-> 1 -500ms-> ... 9\n *\n *\n * @example <caption>Concatenate the same Observable to repeat it</caption>\n * const timer = Rx.Observable.interval(1000).take(2);\n *\n * Rx.Observable.concat(timer, timer) // concating the same Observable!\n * .subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('...and it is done!')\n * );\n *\n * // Logs:\n * // 0 after 1s\n * // 1 after 2s\n * // 0 after 3s\n * // 1 after 4s\n * // \"...and it is done!\" also after 4s\n *\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n *\n * @param {ObservableInput} input1 An input Observable to concatenate with others.\n * @param {ObservableInput} input2 An input Observable to concatenate with others.\n * More than one input Observables may be given as argument.\n * @param {Scheduler} [scheduler=null] An optional IScheduler to schedule each\n * Observable subscription on.\n * @return {Observable} All values of each passed Observable merged into a\n * single Observable, in order, in serial fashion.\n * @static true\n * @name concat\n * @owner Observable\n */\nexport function concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n if (observables.length === 1 || (observables.length === 2 && isScheduler(observables[1]))) {\n return from(observables[0]);\n }\n return concatAll()(of.apply(void 0, observables));\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from'; // lol\nimport { empty } from './empty';\n/**\n * Creates an Observable that, on subscribe, calls an Observable factory to\n * make an Observable for each new Observer.\n *\n * <span class=\"informal\">Creates the Observable lazily, that is, only when it\n * is subscribed.\n * </span>\n *\n * <img src=\"./img/defer.png\" width=\"100%\">\n *\n * `defer` allows you to create the Observable only when the Observer\n * subscribes, and create a fresh Observable for each Observer. It waits until\n * an Observer subscribes to it, and then it generates an Observable,\n * typically with an Observable factory function. It does this afresh for each\n * subscriber, so although each subscriber may think it is subscribing to the\n * same Observable, in fact each subscriber gets its own individual\n * Observable.\n *\n * @example <caption>Subscribe to either an Observable of clicks or an Observable of interval, at random</caption>\n * var clicksOrInterval = Rx.Observable.defer(function () {\n * if (Math.random() > 0.5) {\n * return Rx.Observable.fromEvent(document, 'click');\n * } else {\n * return Rx.Observable.interval(1000);\n * }\n * });\n * clicksOrInterval.subscribe(x => console.log(x));\n *\n * // Results in the following behavior:\n * // If the result of Math.random() is greater than 0.5 it will listen\n * // for clicks anywhere on the \"document\"; when document is clicked it\n * // will log a MouseEvent object to the console. If the result is less\n * // than 0.5 it will emit ascending numbers, one every second(1000ms).\n *\n * @see {@link create}\n *\n * @param {function(): SubscribableOrPromise} observableFactory The Observable\n * factory function to invoke for each Observer that subscribes to the output\n * Observable. May also return a Promise, which will be converted on the fly\n * to an Observable.\n * @return {Observable} An Observable whose Observers' subscriptions trigger\n * an invocation of the given Observable factory function.\n * @static true\n * @name defer\n * @owner Observable\n */\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n var input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map\n","/** PURE_IMPORTS_START tslib,_.._util_root,_.._util_tryCatch,_.._util_errorObject,_.._Observable,_.._Subscriber,_.._operators_map PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { root } from '../../util/root';\nimport { tryCatch } from '../../util/tryCatch';\nimport { errorObject } from '../../util/errorObject';\nimport { Observable } from '../../Observable';\nimport { Subscriber } from '../../Subscriber';\nimport { map } from '../../operators/map';\nfunction getCORSRequest() {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n }\n else if (!!root.XDomainRequest) {\n return new root.XDomainRequest();\n }\n else {\n throw new Error('CORS is not supported by your browser');\n }\n}\nfunction getXMLHttpRequest() {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n }\n else {\n var progId = void 0;\n try {\n var progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];\n for (var i = 0; i < 3; i++) {\n try {\n progId = progIds[i];\n if (new root.ActiveXObject(progId)) {\n break;\n }\n }\n catch (e) {\n //suppress exceptions\n }\n }\n return new root.ActiveXObject(progId);\n }\n catch (e) {\n throw new Error('XMLHttpRequest is not supported by your browser');\n }\n }\n}\nexport function ajaxGet(url, headers) {\n if (headers === void 0) {\n headers = null;\n }\n return new AjaxObservable({ method: 'GET', url: url, headers: headers });\n}\nexport function ajaxPost(url, body, headers) {\n return new AjaxObservable({ method: 'POST', url: url, body: body, headers: headers });\n}\nexport function ajaxDelete(url, headers) {\n return new AjaxObservable({ method: 'DELETE', url: url, headers: headers });\n}\nexport function ajaxPut(url, body, headers) {\n return new AjaxObservable({ method: 'PUT', url: url, body: body, headers: headers });\n}\nexport function ajaxPatch(url, body, headers) {\n return new AjaxObservable({ method: 'PATCH', url: url, body: body, headers: headers });\n}\nvar mapResponse = /*@__PURE__*/ map(function (x, index) { return x.response; });\nexport function ajaxGetJSON(url, headers) {\n return mapResponse(new AjaxObservable({\n method: 'GET',\n url: url,\n responseType: 'json',\n headers: headers\n }));\n}\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar AjaxObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxObservable, _super);\n function AjaxObservable(urlOrRequest) {\n var _this = _super.call(this) || this;\n var request = {\n async: true,\n createXHR: function () {\n return this.crossDomain ? getCORSRequest() : getXMLHttpRequest();\n },\n crossDomain: true,\n withCredentials: false,\n headers: {},\n method: 'GET',\n responseType: 'json',\n timeout: 0\n };\n if (typeof urlOrRequest === 'string') {\n request.url = urlOrRequest;\n }\n else {\n for (var prop in urlOrRequest) {\n if (urlOrRequest.hasOwnProperty(prop)) {\n request[prop] = urlOrRequest[prop];\n }\n }\n }\n _this.request = request;\n return _this;\n }\n /** @deprecated This is an internal implementation detail, do not use. */\n AjaxObservable.prototype._subscribe = function (subscriber) {\n return new AjaxSubscriber(subscriber, this.request);\n };\n /**\n * Creates an observable for an Ajax request with either a request object with\n * url, headers, etc or a string for a URL.\n *\n * @example\n * source = Rx.Observable.ajax('/products');\n * source = Rx.Observable.ajax({ url: 'products', method: 'GET' });\n *\n * @param {string|Object} request Can be one of the following:\n * A string of the URL to make the Ajax call.\n * An object with the following properties\n * - url: URL of the request\n * - body: The body of the request\n * - method: Method of the request, such as GET, POST, PUT, PATCH, DELETE\n * - async: Whether the request is async\n * - headers: Optional headers\n * - crossDomain: true if a cross domain request, else false\n * - createXHR: a function to override if you need to use an alternate\n * XMLHttpRequest implementation.\n * - resultSelector: a function to use to alter the output value type of\n * the Observable. Gets {@link AjaxResponse} as an argument.\n * @return {Observable} An observable sequence containing the XMLHttpRequest.\n * @static true\n * @name ajax\n * @owner Observable\n * @nocollapse\n */\n AjaxObservable.create = (function () {\n var create = function (urlOrRequest) {\n return new AjaxObservable(urlOrRequest);\n };\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n return create;\n })();\n return AjaxObservable;\n}(Observable));\nexport { AjaxObservable };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AjaxSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxSubscriber, _super);\n function AjaxSubscriber(destination, request) {\n var _this = _super.call(this, destination) || this;\n _this.request = request;\n _this.done = false;\n var headers = request.headers = request.headers || {};\n // force CORS if requested\n if (!request.crossDomain && !headers['X-Requested-With']) {\n headers['X-Requested-With'] = 'XMLHttpRequest';\n }\n // ensure content type is set\n if (!('Content-Type' in headers) && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {\n headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n // properly serialize body\n request.body = _this.serializeBody(request.body, request.headers['Content-Type']);\n _this.send();\n return _this;\n }\n AjaxSubscriber.prototype.next = function (e) {\n this.done = true;\n var _a = this, xhr = _a.xhr, request = _a.request, destination = _a.destination;\n var response = new AjaxResponse(e, xhr, request);\n destination.next(response);\n };\n AjaxSubscriber.prototype.send = function () {\n var _a = this, request = _a.request, _b = _a.request, user = _b.user, method = _b.method, url = _b.url, async = _b.async, password = _b.password, headers = _b.headers, body = _b.body;\n var createXHR = request.createXHR;\n var xhr = tryCatch(createXHR).call(request);\n if (xhr === errorObject) {\n this.error(errorObject.e);\n }\n else {\n this.xhr = xhr;\n // set up the events before open XHR\n // https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest\n // You need to add the event listeners before calling open() on the request.\n // Otherwise the progress events will not fire.\n this.setupEvents(xhr, request);\n // open XHR\n var result = void 0;\n if (user) {\n result = tryCatch(xhr.open).call(xhr, method, url, async, user, password);\n }\n else {\n result = tryCatch(xhr.open).call(xhr, method, url, async);\n }\n if (result === errorObject) {\n this.error(errorObject.e);\n return null;\n }\n // timeout, responseType and withCredentials can be set once the XHR is open\n if (async) {\n xhr.timeout = request.timeout;\n xhr.responseType = request.responseType;\n }\n if ('withCredentials' in xhr) {\n xhr.withCredentials = !!request.withCredentials;\n }\n // set headers\n this.setHeaders(xhr, headers);\n // finally send the request\n result = body ? tryCatch(xhr.send).call(xhr, body) : tryCatch(xhr.send).call(xhr);\n if (result === errorObject) {\n this.error(errorObject.e);\n return null;\n }\n }\n return xhr;\n };\n AjaxSubscriber.prototype.serializeBody = function (body, contentType) {\n if (!body || typeof body === 'string') {\n return body;\n }\n else if (root.FormData && body instanceof root.FormData) {\n return body;\n }\n if (contentType) {\n var splitIndex = contentType.indexOf(';');\n if (splitIndex !== -1) {\n contentType = contentType.substring(0, splitIndex);\n }\n }\n switch (contentType) {\n case 'application/x-www-form-urlencoded':\n return Object.keys(body).map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(body[key]); }).join('&');\n case 'application/json':\n return JSON.stringify(body);\n default:\n return body;\n }\n };\n AjaxSubscriber.prototype.setHeaders = function (xhr, headers) {\n for (var key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n };\n AjaxSubscriber.prototype.setupEvents = function (xhr, request) {\n var progressSubscriber = request.progressSubscriber;\n function xhrTimeout(e) {\n var _a = xhrTimeout, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxTimeoutError(this, request)); //TODO: Make betterer.\n }\n xhr.ontimeout = xhrTimeout;\n xhrTimeout.request = request;\n xhrTimeout.subscriber = this;\n xhrTimeout.progressSubscriber = progressSubscriber;\n if (xhr.upload && 'withCredentials' in xhr) {\n if (progressSubscriber) {\n var xhrProgress_1;\n xhrProgress_1 = function (e) {\n var progressSubscriber = xhrProgress_1.progressSubscriber;\n progressSubscriber.next(e);\n };\n if (root.XDomainRequest) {\n xhr.onprogress = xhrProgress_1;\n }\n else {\n xhr.upload.onprogress = xhrProgress_1;\n }\n xhrProgress_1.progressSubscriber = progressSubscriber;\n }\n var xhrError_1;\n xhrError_1 = function (e) {\n var _a = xhrError_1, progressSubscriber = _a.progressSubscriber, subscriber = _a.subscriber, request = _a.request;\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxError('ajax error', this, request));\n };\n xhr.onerror = xhrError_1;\n xhrError_1.request = request;\n xhrError_1.subscriber = this;\n xhrError_1.progressSubscriber = progressSubscriber;\n }\n function xhrReadyStateChange(e) {\n var _a = xhrReadyStateChange, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;\n if (this.readyState === 4) {\n // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)\n var status_1 = this.status === 1223 ? 204 : this.status;\n var response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status_1 === 0) {\n status_1 = response ? 200 : 0;\n }\n // 4xx and 5xx should error (https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)\n if (status_1 < 400) {\n if (progressSubscriber) {\n progressSubscriber.complete();\n }\n subscriber.next(e);\n subscriber.complete();\n }\n else {\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n subscriber.error(new AjaxError('ajax error ' + status_1, this, request));\n }\n }\n }\n xhr.onreadystatechange = xhrReadyStateChange;\n xhrReadyStateChange.subscriber = this;\n xhrReadyStateChange.progressSubscriber = progressSubscriber;\n xhrReadyStateChange.request = request;\n };\n AjaxSubscriber.prototype.unsubscribe = function () {\n var _a = this, done = _a.done, xhr = _a.xhr;\n if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {\n xhr.abort();\n }\n _super.prototype.unsubscribe.call(this);\n };\n return AjaxSubscriber;\n}(Subscriber));\nexport { AjaxSubscriber };\n/**\n * A normalized AJAX response.\n *\n * @see {@link ajax}\n *\n * @class AjaxResponse\n */\nvar AjaxResponse = /*@__PURE__*/ (function () {\n function AjaxResponse(originalEvent, xhr, request) {\n this.originalEvent = originalEvent;\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n }\n return AjaxResponse;\n}());\nexport { AjaxResponse };\n/**\n * A normalized AJAX error.\n *\n * @see {@link ajax}\n *\n * @class AjaxError\n */\nvar AjaxError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxError, _super);\n function AjaxError(message, xhr, request) {\n var _this = _super.call(this, message) || this;\n _this.message = message;\n _this.xhr = xhr;\n _this.request = request;\n _this.status = xhr.status;\n _this.responseType = xhr.responseType || request.responseType;\n _this.response = parseXhrResponse(_this.responseType, xhr);\n _this.name = 'AjaxError';\n Object.setPrototypeOf(_this, AjaxError.prototype);\n return _this;\n }\n return AjaxError;\n}(Error));\nexport { AjaxError };\nfunction parseXhrResponse(responseType, xhr) {\n switch (responseType) {\n case 'json':\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any XMLHttpRequest is defined to always have 'response' inferring xhr as never for the else clause.\n if ('response' in xhr) {\n //IE does not support json as responseType, parse it internally\n return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');\n }\n else {\n return JSON.parse(xhr.responseText || 'null');\n }\n case 'xml':\n return xhr.responseXML;\n case 'text':\n default:\n // HACK(benlesh): TypeScript shennanigans\n // tslint:disable-next-line:no-any XMLHttpRequest is defined to always have 'response' inferring xhr as never for the else sub-expression.\n return ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n}\n/**\n * @see {@link ajax}\n *\n * @class AjaxTimeoutError\n */\nvar AjaxTimeoutError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxTimeoutError, _super);\n function AjaxTimeoutError(xhr, request) {\n var _this = _super.call(this, 'ajax timeout', xhr, request) || this;\n Object.setPrototypeOf(_this, AjaxTimeoutError.prototype);\n return _this;\n }\n return AjaxTimeoutError;\n}(AjaxError));\nexport { AjaxTimeoutError };\n//# sourceMappingURL=AjaxObservable.js.map\n","/** PURE_IMPORTS_START tslib,_.._Subject,_.._Subscriber,_.._Observable,_.._Subscription,_.._ReplaySubject,_.._util_tryCatch,_.._util_errorObject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject, AnonymousSubject } from '../../Subject';\nimport { Subscriber } from '../../Subscriber';\nimport { Observable } from '../../Observable';\nimport { Subscription } from '../../Subscription';\nimport { ReplaySubject } from '../../ReplaySubject';\nimport { tryCatch } from '../../util/tryCatch';\nimport { errorObject } from '../../util/errorObject';\nvar DEFAULT_WEBSOCKET_CONFIG = {\n url: '',\n deserializer: function (e) { return JSON.parse(e.data); },\n serializer: function (value) { return JSON.stringify(value); },\n};\nvar WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @extends {Ignored}\n * @hide true\n */\nvar WebSocketSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WebSocketSubject, _super);\n function WebSocketSubject(urlConfigOrSource, destination) {\n var _this = _super.call(this) || this;\n if (urlConfigOrSource instanceof Observable) {\n _this.destination = destination;\n _this.source = urlConfigOrSource;\n }\n else {\n var config = _this._config = tslib_1.__assign({}, DEFAULT_WEBSOCKET_CONFIG);\n config.WebSocketCtor = WebSocket;\n _this._output = new Subject();\n if (typeof urlConfigOrSource === 'string') {\n config.url = urlConfigOrSource;\n }\n else {\n for (var key in urlConfigOrSource) {\n if (urlConfigOrSource.hasOwnProperty(key)) {\n config[key] = urlConfigOrSource[key];\n }\n }\n }\n if (!config.WebSocketCtor) {\n throw new Error('no WebSocket constructor can be found');\n }\n _this.destination = new ReplaySubject();\n }\n return _this;\n }\n WebSocketSubject.prototype.lift = function (operator) {\n var sock = new WebSocketSubject(this._config, this.destination);\n sock.operator = operator;\n sock.source = this;\n return sock;\n };\n WebSocketSubject.prototype._resetState = function () {\n this._socket = null;\n if (!this.source) {\n this.destination = new ReplaySubject();\n }\n this._output = new Subject();\n };\n /**\n * Creates an {@link Observable}, that when subscribed to, sends a message,\n * defined be the `subMsg` function, to the server over the socket to begin a\n * subscription to data over that socket. Once data arrives, the\n * `messageFilter` argument will be used to select the appropriate data for\n * the resulting Observable. When teardown occurs, either due to\n * unsubscription, completion or error, a message defined by the `unsubMsg`\n * argument will be send to the server over the WebSocketSubject.\n *\n * @param subMsg A function to generate the subscription message to be sent to\n * the server. This will still be processed by the serializer in the\n * WebSocketSubject's config. (Which defaults to JSON serialization)\n * @param unsubMsg A function to generate the unsubscription message to be\n * sent to the server at teardown. This will still be processed by the\n * serializer in the WebSocketSubject's config.\n * @param messageFilter A predicate for selecting the appropriate messages\n * from the server for the output stream.\n */\n WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {\n var self = this;\n return new Observable(function (observer) {\n var result = tryCatch(subMsg)();\n if (result === errorObject) {\n observer.error(errorObject.e);\n }\n else {\n self.next(result);\n }\n var subscription = self.subscribe(function (x) {\n var result = tryCatch(messageFilter)(x);\n if (result === errorObject) {\n observer.error(errorObject.e);\n }\n else if (result) {\n observer.next(x);\n }\n }, function (err) { return observer.error(err); }, function () { return observer.complete(); });\n return function () {\n var result = tryCatch(unsubMsg)();\n if (result === errorObject) {\n observer.error(errorObject.e);\n }\n else {\n self.next(result);\n }\n subscription.unsubscribe();\n };\n });\n };\n WebSocketSubject.prototype._connectSocket = function () {\n var _this = this;\n var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;\n var observer = this._output;\n var socket = null;\n try {\n socket = protocol ?\n new WebSocketCtor(url, protocol) :\n new WebSocketCtor(url);\n this._socket = socket;\n if (binaryType) {\n this._socket.binaryType = binaryType;\n }\n }\n catch (e) {\n observer.error(e);\n return;\n }\n var subscription = new Subscription(function () {\n _this._socket = null;\n if (socket && socket.readyState === 1) {\n socket.close();\n }\n });\n socket.onopen = function (e) {\n var openObserver = _this._config.openObserver;\n if (openObserver) {\n openObserver.next(e);\n }\n var queue = _this.destination;\n _this.destination = Subscriber.create(function (x) {\n if (socket.readyState === 1) {\n var serializer = _this._config.serializer;\n var msg = tryCatch(serializer)(x);\n if (msg === errorObject) {\n _this.destination.error(errorObject.e);\n return;\n }\n socket.send(msg);\n }\n }, function (e) {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n if (e && e.code) {\n socket.close(e.code, e.reason);\n }\n else {\n observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));\n }\n _this._resetState();\n }, function () {\n var closingObserver = _this._config.closingObserver;\n if (closingObserver) {\n closingObserver.next(undefined);\n }\n socket.close();\n _this._resetState();\n });\n if (queue && queue instanceof ReplaySubject) {\n subscription.add(queue.subscribe(_this.destination));\n }\n };\n socket.onerror = function (e) {\n _this._resetState();\n observer.error(e);\n };\n socket.onclose = function (e) {\n _this._resetState();\n var closeObserver = _this._config.closeObserver;\n if (closeObserver) {\n closeObserver.next(e);\n }\n if (e.wasClean) {\n observer.complete();\n }\n else {\n observer.error(e);\n }\n };\n socket.onmessage = function (e) {\n var deserializer = _this._config.deserializer;\n var result = tryCatch(deserializer)(e);\n if (result === errorObject) {\n observer.error(errorObject.e);\n }\n else {\n observer.next(result);\n }\n };\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n WebSocketSubject.prototype._subscribe = function (subscriber) {\n var _this = this;\n var source = this.source;\n if (source) {\n return source.subscribe(subscriber);\n }\n if (!this._socket) {\n this._connectSocket();\n }\n var subscription = new Subscription();\n subscription.add(this._output.subscribe(subscriber));\n subscription.add(function () {\n var _socket = _this._socket;\n if (_this._output.observers.length === 0) {\n if (_socket && _socket.readyState === 1) {\n _socket.close();\n }\n _this._resetState();\n }\n });\n return subscription;\n };\n WebSocketSubject.prototype.unsubscribe = function () {\n var _a = this, source = _a.source, _socket = _a._socket;\n if (_socket && _socket.readyState === 1) {\n _socket.close();\n this._resetState();\n }\n _super.prototype.unsubscribe.call(this);\n if (!source) {\n this.destination = new ReplaySubject();\n }\n };\n return WebSocketSubject;\n}(AnonymousSubject));\nexport { WebSocketSubject };\n//# sourceMappingURL=WebSocketSubject.js.map\n","/** PURE_IMPORTS_START _AjaxObservable PURE_IMPORTS_END */\nimport { AjaxObservable } from './AjaxObservable';\nexport var ajax = AjaxObservable.create;\n//# sourceMappingURL=ajax.js.map\n","/** PURE_IMPORTS_START _WebSocketSubject PURE_IMPORTS_END */\nimport { WebSocketSubject } from './WebSocketSubject';\n/**\n * Wrapper around the w3c-compatible WebSocket object provided by the browser.\n *\n * @example <caption>Wraps browser WebSocket</caption>\n *\n * import { webSocket } from 'rxjs/webSocket';\n *\n * let socket$ = webSocket('ws://localhost:8081');\n *\n * socket$.subscribe(\n * (msg) => console.log('message received: ' + msg),\n * (err) => console.log(err),\n * () => console.log('complete')\n * );\n *\n * socket$.next(JSON.stringify({ op: 'hello' }));\n *\n * @example <caption>Wraps WebSocket from nodejs-webSocket (using node.js)</caption>\n *\n * import { webSocket } from 'rxjs/webSocket';\n * import { w3cwebSocket } from 'webSocket';\n *\n * let socket$ = webSocket({\n * url: 'ws://localhost:8081',\n * WebSocketCtor: w3cwebSocket\n * });\n *\n * socket$.subscribe(\n * (msg) => console.log('message received: ' + msg),\n * (err) => console.log(err),\n * () => console.log('complete')\n * );\n *\n * socket$.next(JSON.stringify({ op: 'hello' }));\n *\n * @param {string | WebSocketSubjectConfig} urlConfigOrSource the source of the webSocket as an url or a structure defining the webSocket object\n * @return {WebSocketSubject}\n */\nexport function webSocket(urlConfigOrSource) {\n return new WebSocketSubject(urlConfigOrSource);\n}\n//# sourceMappingURL=webSocket.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\n/**\n * The same Observable instance returned by any call to {@link empty} without a\n * {@link Scheduler}. It is preferrable to use this over `empty()`.\n */\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\n/**\n * Creates an Observable that emits no items to the Observer and immediately\n * emits a complete notification.\n *\n * <span class=\"informal\">Just emits 'complete', and nothing else.\n * </span>\n *\n * <img src=\"./img/empty.png\" width=\"100%\">\n *\n * This static operator is useful for creating a simple Observable that only\n * emits the complete notification. It can be used for composing with other\n * Observables, such as in a {@link mergeMap}.\n *\n * @example <caption>Emit the number 7, then complete.</caption>\n * var result = Rx.Observable.empty().startWith(7);\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Map and flatten only odd numbers to the sequence 'a', 'b', 'c'</caption>\n * var interval = Rx.Observable.interval(1000);\n * var result = interval.mergeMap(x =>\n * x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty()\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following to the console:\n * // x is equal to the count on the interval eg(0,1,2,3,...)\n * // x will occur every 1000ms\n * // if x % 2 is equal to 1 print abc\n * // if x % 2 is not equal to 1 nothing will be output\n *\n * @see {@link create}\n * @see {@link never}\n * @see {@link of}\n * @see {@link throw}\n *\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emission of the complete notification.\n * @return {Observable} An \"empty\" Observable: emits only the complete\n * notification.\n * @static true\n * @name empty\n * @owner Observable\n * @deprecated Deprecated in favor of using EMPTY constant.\n */\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nexport function emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_util_isArray,_empty,_util_subscribeToResult,_OuterSubscriber,_operators_map PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { EMPTY } from './empty';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { map } from '../operators/map';\n/* tslint:enable:max-line-length */\n/**\n * Joins last values emitted by passed Observables.\n *\n * <span class=\"informal\">Wait for Observables to complete and then combine last values they emitted.</span>\n *\n * <img src=\"./img/forkJoin.png\" width=\"100%\">\n *\n * `forkJoin` is an operator that takes any number of Observables which can be passed either as an array\n * or directly as arguments. If no input Observables are provided, resulting stream will complete\n * immediately.\n *\n * `forkJoin` will wait for all passed Observables to complete and then it will emit an array with last\n * values from corresponding Observables. So if you pass `n` Observables to the operator, resulting\n * array will have `n` values, where first value is the last thing emitted by the first Observable,\n * second value is the last thing emitted by the second Observable and so on. That means `forkJoin` will\n * not emit more than once and it will complete after that. If you need to emit combined values not only\n * at the end of lifecycle of passed Observables, but also throughout it, try out {@link combineLatest}\n * or {@link zip} instead.\n *\n * In order for resulting array to have the same length as the number of input Observables, whenever any of\n * that Observables completes without emitting any value, `forkJoin` will complete at that moment as well\n * and it will not emit anything either, even if it already has some last values from other Observables.\n * Conversely, if there is an Observable that never completes, `forkJoin` will never complete as well,\n * unless at any point some other Observable completes without emitting value, which brings us back to\n * the previous case. Overall, in order for `forkJoin` to emit a value, all Observables passed as arguments\n * have to emit something at least once and complete.\n *\n * If any input Observable errors at some point, `forkJoin` will error as well and all other Observables\n * will be immediately unsubscribed.\n *\n * Optionally `forkJoin` accepts project function, that will be called with values which normally\n * would land in emitted array. Whatever is returned by project function, will appear in output\n * Observable instead. This means that default project can be thought of as a function that takes\n * all its arguments and puts them into an array. Note that project function will be called only\n * when output Observable is supposed to emit a result.\n *\n * @example <caption>Use forkJoin with operator emitting immediately</caption>\n * import { forkJoin, of } from 'rxjs';\n *\n * const observable = forkJoin(\n * of(1, 2, 3, 4),\n * of(5, 6, 7, 8)\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!')\n * );\n *\n * // Logs:\n * // [4, 8]\n * // \"This is how it ends!\"\n *\n *\n * @example <caption>Use forkJoin with operator emitting after some time</caption>\n * import { forkJoin, interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const observable = forkJoin(\n * interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete\n * interval(500).pipe(take(4)) // emit 0, 1, 2, 3 every half a second and complete\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!')\n * );\n *\n * // Logs:\n * // [2, 3] after 3 seconds\n * // \"This is how it ends!\" immediately after\n *\n *\n * @example <caption>Use forkJoin with project function</caption>\n * import { jorkJoin, interval } from 'rxjs';\n * import { take } from 'rxjs/operators';\n *\n * const observable = forkJoin(\n * interval(1000).pipe(take(3)), // emit 0, 1, 2 every second and complete\n * interval(500).pipe(take(4)), // emit 0, 1, 2, 3 every half a second and complete\n * (n, m) => n + m\n * );\n * observable.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('This is how it ends!')\n * );\n *\n * // Logs:\n * // 5 after 3 seconds\n * // \"This is how it ends!\" immediately after\n *\n * @see {@link combineLatest}\n * @see {@link zip}\n *\n * @param {...ObservableInput} sources Any number of Observables provided either as an array or as an arguments\n * passed directly to the operator.\n * @param {function} [project] Function that takes values emitted by input Observables and returns value\n * that will appear in resulting Observable instead of default array.\n * @return {Observable} Observable emitting either an array of last values emitted by passed Observables\n * or value from project function.\n */\nexport function forkJoin() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var resultSelector;\n if (typeof sources[sources.length - 1] === 'function') {\n // DEPRECATED PATH\n resultSelector = sources.pop();\n }\n // if the first and only other argument is an array\n // assume it's been called with `forkJoin([obs1, obs2, obs3])`\n if (sources.length === 1 && isArray(sources[0])) {\n sources = sources[0];\n }\n if (sources.length === 0) {\n return EMPTY;\n }\n if (resultSelector) {\n // DEPRECATED PATH\n return forkJoin(sources).pipe(map(function (args) { return resultSelector.apply(void 0, args); }));\n }\n return new Observable(function (subscriber) {\n return new ForkJoinSubscriber(subscriber, sources);\n });\n}\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ForkJoinSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ForkJoinSubscriber, _super);\n function ForkJoinSubscriber(destination, sources) {\n var _this = _super.call(this, destination) || this;\n _this.sources = sources;\n _this.completed = 0;\n _this.haveValues = 0;\n var len = sources.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n var source = sources[i];\n var innerSubscription = subscribeToResult(_this, source, null, i);\n if (innerSubscription) {\n _this.add(innerSubscription);\n }\n }\n return _this;\n }\n ForkJoinSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n if (!innerSub._hasValue) {\n innerSub._hasValue = true;\n this.haveValues++;\n }\n };\n ForkJoinSubscriber.prototype.notifyComplete = function (innerSub) {\n var _a = this, destination = _a.destination, haveValues = _a.haveValues, values = _a.values;\n var len = values.length;\n if (!innerSub._hasValue) {\n destination.complete();\n return;\n }\n this.completed++;\n if (this.completed !== len) {\n return;\n }\n if (haveValues === len) {\n destination.next(values);\n }\n destination.complete();\n };\n return ForkJoinSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=forkJoin.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isPromise,_util_isArrayLike,_util_isObservable,_util_isIterable,_fromArray,_fromPromise,_fromIterable,_fromObservable,_util_subscribeTo PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isObservable } from '../util/isObservable';\nimport { isIterable } from '../util/isIterable';\nimport { fromArray } from './fromArray';\nimport { fromPromise } from './fromPromise';\nimport { fromIterable } from './fromIterable';\nimport { fromObservable } from './fromObservable';\nimport { subscribeTo } from '../util/subscribeTo';\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 if (input != null) {\n if (isObservable(input)) {\n return fromObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return fromPromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return fromArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return fromIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=from.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { subscribeToArray } from '../util/subscribeToArray';\nexport function fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToArray(input));\n }\n else {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var 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}\n//# sourceMappingURL=fromArray.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nvar toString = Object.prototype.toString;\n/* tslint:enable:max-line-length */\n/**\n * Creates an Observable that emits events of a specific type coming from the\n * given event target.\n *\n * <span class=\"informal\">Creates an Observable from DOM events, or Node.js\n * EventEmitter events or others.</span>\n *\n * <img src=\"./img/fromEvent.png\" width=\"100%\">\n *\n * `fromEvent` accepts as a first argument event target, which is an object with methods\n * for registering event handler functions. As a second argument it takes string that indicates\n * type of event we want to listen for. `fromEvent` supports selected types of event targets,\n * which are described in detail below. If your event target does not match any of the ones listed,\n * you should use {@link fromEventPattern}, which can be used on arbitrary APIs.\n * When it comes to APIs supported by `fromEvent`, their methods for adding and removing event\n * handler functions have different names, but they all accept a string describing event type\n * and function itself, which will be called whenever said event happens.\n *\n * Every time resulting Observable is subscribed, event handler function will be registered\n * to event target on given event type. When that event fires, value\n * passed as a first argument to registered function will be emitted by output Observable.\n * When Observable is unsubscribed, function will be unregistered from event target.\n *\n * Note that if event target calls registered function with more than one argument, second\n * and following arguments will not appear in resulting stream. In order to get access to them,\n * you can pass to `fromEvent` optional project function, which will be called with all arguments\n * passed to event handler. Output Observable will then emit value returned by project function,\n * instead of the usual value.\n *\n * Remember that event targets listed below are checked via duck typing. It means that\n * no matter what kind of object you have and no matter what environment you work in,\n * you can safely use `fromEvent` on that object if it exposes described methods (provided\n * of course they behave as was described above). So for example if Node.js library exposes\n * event target which has the same method names as DOM EventTarget, `fromEvent` is still\n * a good choice.\n *\n * If the API you use is more callback then event handler oriented (subscribed\n * callback function fires only once and thus there is no need to manually\n * unregister it), you should use {@link bindCallback} or {@link bindNodeCallback}\n * instead.\n *\n * `fromEvent` supports following types of event targets:\n *\n * **DOM EventTarget**\n *\n * This is an object with `addEventListener` and `removeEventListener` methods.\n *\n * In the browser, `addEventListener` accepts - apart from event type string and event\n * handler function arguments - optional third parameter, which is either an object or boolean,\n * both used for additional configuration how and when passed function will be called. When\n * `fromEvent` is used with event target of that type, you can provide this values\n * as third parameter as well.\n *\n * **Node.js EventEmitter**\n *\n * An object with `addListener` and `removeListener` methods.\n *\n * **JQuery-style event target**\n *\n * An object with `on` and `off` methods\n *\n * **DOM NodeList**\n *\n * List of DOM Nodes, returned for example by `document.querySelectorAll` or `Node.childNodes`.\n *\n * Although this collection is not event target in itself, `fromEvent` will iterate over all Nodes\n * it contains and install event handler function in every of them. When returned Observable\n * is unsubscribed, function will be removed from all Nodes.\n *\n * **DOM HtmlCollection**\n *\n * Just as in case of NodeList it is a collection of DOM nodes. Here as well event handler function is\n * installed and removed in each of elements.\n *\n *\n * @example <caption>Emits clicks happening on the DOM document</caption>\n * var clicks = fromEvent(document, 'click');\n * clicks.subscribe(x => console.log(x));\n *\n * // Results in:\n * // MouseEvent object logged to console every time a click\n * // occurs on the document.\n *\n *\n * @example <caption>Use addEventListener with capture option</caption>\n * var clicksInDocument = fromEvent(document, 'click', true); // note optional configuration parameter\n * // which will be passed to addEventListener\n * var clicksInDiv = fromEvent(someDivInDocument, 'click');\n *\n * clicksInDocument.subscribe(() => console.log('document'));\n * clicksInDiv.subscribe(() => console.log('div'));\n *\n * // By default events bubble UP in DOM tree, so normally\n * // when we would click on div in document\n * // \"div\" would be logged first and then \"document\".\n * // Since we specified optional `capture` option, document\n * // will catch event when it goes DOWN DOM tree, so console\n * // will log \"document\" and then \"div\".\n *\n * @see {@link bindCallback}\n * @see {@link bindNodeCallback}\n * @see {@link fromEventPattern}\n *\n * @param {FromEventTarget<T>} target The DOM EventTarget, Node.js\n * EventEmitter, JQuery-like event target, NodeList or HTMLCollection to attach the event handler to.\n * @param {string} eventName The event name of interest, being emitted by the\n * `target`.\n * @param {EventListenerOptions} [options] Options to pass through to addEventListener\n * @return {Observable<T>}\n * @name fromEvent\n */\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n // DEPRECATED PATH\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n // DEPRECATED PATH\n return fromEvent(target, eventName, options).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (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 var unsubscribe;\n if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = function () { return source_2.off(eventName, handler); };\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n }\n else if (sourceObj && sourceObj.length) {\n for (var 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\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\n/* tslint:enable:max-line-length */\n/**\n * Creates an Observable from an API based on addHandler/removeHandler\n * functions.\n *\n * <span class=\"informal\">Converts any addHandler/removeHandler API to an\n * Observable.</span>\n *\n * <img src=\"./img/fromEventPattern.png\" width=\"100%\">\n *\n * Creates an Observable by using the `addHandler` and `removeHandler`\n * functions to add and remove the handlers. The `addHandler` is\n * called when the output Observable is subscribed, and `removeHandler` is\n * called when the Subscription is unsubscribed.\n *\n * @example <caption>Emits clicks happening on the DOM document</caption>\n * function addClickHandler(handler) {\n * document.addEventListener('click', handler);\n * }\n *\n * function removeClickHandler(handler) {\n * document.removeEventListener('click', handler);\n * }\n *\n * var clicks = fromEventPattern(\n * addClickHandler,\n * removeClickHandler\n * );\n * clicks.subscribe(x => console.log(x));\n *\n * @see {@link from}\n * @see {@link fromEvent}\n *\n * @param {function(handler: Function): any} addHandler A function that takes\n * a `handler` function as argument and attaches it somehow to the actual\n * source of events.\n * @param {function(handler: Function, signal?: any): void} [removeHandler] An optional function that\n * takes a `handler` function as argument and removes it in case it was\n * previously attached using `addHandler`. if addHandler returns signal to teardown when remove,\n * removeHandler function will forward it.\n * @return {Observable<T>}\n * @name fromEventPattern\n */\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n // DEPRECATED PATH\n return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var 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 function () { return removeHandler(handler, retValue); };\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator,_util_subscribeToIterable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { subscribeToIterable } from '../util/subscribeToIterable';\nexport function fromIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n if (!scheduler) {\n return new Observable(subscribeToIterable(input));\n }\n else {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var iterator;\n sub.add(function () {\n // Finalize generators\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator = input[Symbol_iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var 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}\n//# sourceMappingURL=fromIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable,_util_subscribeToObservable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nimport { subscribeToObservable } from '../util/subscribeToObservable';\nexport function fromObservable(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToObservable(input));\n }\n else {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[Symbol_observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n }\n}\n//# sourceMappingURL=fromObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_util_subscribeToPromise PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { subscribeToPromise } from '../util/subscribeToPromise';\nexport function fromPromise(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToPromise(input));\n }\n else {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n return input.then(function (value) {\n sub.add(scheduler.schedule(function () {\n subscriber.next(value);\n sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n }));\n }, function (err) {\n sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n });\n }));\n return sub;\n });\n }\n}\n//# sourceMappingURL=fromPromise.js.map\n","/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { identity } from '../util/identity';\nimport { isScheduler } from '../util/isScheduler';\nexport function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {\n var resultSelector;\n var initialState;\n if (arguments.length == 1) {\n var 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(function (subscriber) {\n var state = initialState;\n if (scheduler) {\n return scheduler.schedule(dispatch, 0, {\n subscriber: subscriber,\n iterate: iterate,\n condition: condition,\n resultSelector: resultSelector,\n state: state\n });\n }\n do {\n if (condition) {\n var conditionResult = void 0;\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 var value = void 0;\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 var subscriber = state.subscriber, condition = state.condition;\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 var conditionResult = void 0;\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 var 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\n","/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */\nimport { defer } from './defer';\nimport { EMPTY } from './empty';\n/**\n * Decides at subscription time which Observable will actually be subscribed.\n *\n * <span class=\"informal\">`If` statement for Observables.</span>\n *\n * `if` accepts a condition function and two Observables. When\n * an Observable returned by the operator is subscribed, condition function will be called.\n * Based on what boolean it returns at that moment, consumer will subscribe either to\n * the first Observable (if condition was true) or to the second (if condition was false). Condition\n * function may also not return anything - in that case condition will be evaluated as false and\n * second Observable will be subscribed.\n *\n * Note that Observables for both cases (true and false) are optional. If condition points to an Observable that\n * was left undefined, resulting stream will simply complete immediately. That allows you to, rather\n * then controlling which Observable will be subscribed, decide at runtime if consumer should have access\n * to given Observable or not.\n *\n * If you have more complex logic that requires decision between more than two Observables, {@link defer}\n * will probably be a better choice. Actually `if` can be easily implemented with {@link defer}\n * and exists only for convenience and readability reasons.\n *\n *\n * @example <caption>Change at runtime which Observable will be subscribed</caption>\n * let subscribeToFirst;\n * const firstOrSecond = Rx.Observable.if(\n * () => subscribeToFirst,\n * Rx.Observable.of('first'),\n * Rx.Observable.of('second')\n * );\n *\n * subscribeToFirst = true;\n * firstOrSecond.subscribe(value => console.log(value));\n *\n * // Logs:\n * // \"first\"\n *\n * subscribeToFirst = false;\n * firstOrSecond.subscribe(value => console.log(value));\n *\n * // Logs:\n * // \"second\"\n *\n *\n * @example <caption>Control an access to an Observable</caption>\n * let accessGranted;\n * const observableIfYouHaveAccess = Rx.Observable.if(\n * () => accessGranted,\n * Rx.Observable.of('It seems you have an access...') // Note that only one Observable is passed to the operator.\n * );\n *\n * accessGranted = true;\n * observableIfYouHaveAccess.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('The end')\n * );\n *\n * // Logs:\n * // \"It seems you have an access...\"\n * // \"The end\"\n *\n * accessGranted = false;\n * observableIfYouHaveAccess.subscribe(\n * value => console.log(value),\n * err => {},\n * () => console.log('The end')\n * );\n *\n * // Logs:\n * // \"The end\"\n *\n * @see {@link defer}\n *\n * @param {function(): boolean} condition Condition which Observable should be chosen.\n * @param {Observable} [trueObservable] An Observable that will be subscribed if condition is true.\n * @param {Observable} [falseObservable] An Observable that will be subscribed if condition is false.\n * @return {Observable} Either first or second Observable, depending on condition.\n * @static true\n * @name iif\n * @owner Observable\n */\nexport function iif(condition, trueResult, falseResult) {\n if (trueResult === void 0) {\n trueResult = EMPTY;\n }\n if (falseResult === void 0) {\n falseResult = EMPTY;\n }\n return defer(function () { return condition() ? trueResult : falseResult; });\n}\n//# sourceMappingURL=iif.js.map\n","/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\n/**\n * Creates an Observable that emits sequential numbers every specified\n * interval of time, on a specified IScheduler.\n *\n * <span class=\"informal\">Emits incremental numbers periodically in time.\n * </span>\n *\n * <img src=\"./img/interval.png\" width=\"100%\">\n *\n * `interval` returns an Observable that emits an infinite sequence of\n * ascending integers, with a constant interval of time of your choosing\n * between those emissions. The first emission is not sent immediately, but\n * only after the first period has passed. By default, this operator uses the\n * `async` IScheduler to provide a notion of time, but you may pass any\n * IScheduler to it.\n *\n * @example <caption>Emits ascending numbers, one every second (1000ms)</caption>\n * var numbers = Rx.Observable.interval(1000);\n * numbers.subscribe(x => console.log(x));\n *\n * @see {@link timer}\n * @see {@link delay}\n *\n * @param {number} [period=0] The interval size in milliseconds (by default)\n * or the time unit determined by the scheduler's clock.\n * @param {Scheduler} [scheduler=async] The IScheduler to use for scheduling\n * the emission of values, and providing a notion of \"time\".\n * @return {Observable} An Observable that emits a sequential number each time\n * interval.\n * @static true\n * @name interval\n * @owner Observable\n */\nexport function interval(period, scheduler) {\n if (period === void 0) {\n period = 0;\n }\n if (scheduler === void 0) {\n scheduler = async;\n }\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(function (subscriber) {\n subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));\n return subscriber;\n });\n}\nfunction dispatch(state) {\n var subscriber = state.subscriber, counter = state.counter, period = state.period;\n subscriber.next(counter);\n this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);\n}\n//# sourceMappingURL=interval.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\n/* tslint:enable:max-line-length */\n/**\n * Creates an output Observable which concurrently emits all values from every\n * given input Observable.\n *\n * <span class=\"informal\">Flattens multiple Observables together by blending\n * their values into one Observable.</span>\n *\n * <img src=\"./img/merge.png\" width=\"100%\">\n *\n * `merge` subscribes to each given input Observable (as arguments), and simply\n * forwards (without doing any transformation) all the values from all the input\n * Observables to the output Observable. The output Observable only completes\n * once all input Observables have completed. Any error delivered by an input\n * Observable will be immediately emitted on the output Observable.\n *\n * @example <caption>Merge together two Observables: 1s interval and clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var timer = Rx.Observable.interval(1000);\n * var clicksOrTimer = Rx.Observable.merge(clicks, timer);\n * clicksOrTimer.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // timer will emit ascending values, one every second(1000ms) to console\n * // clicks logs MouseEvents to console everytime the \"document\" is clicked\n * // Since the two streams are merged you see these happening\n * // as they occur.\n *\n * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>\n * var timer1 = Rx.Observable.interval(1000).take(10);\n * var timer2 = Rx.Observable.interval(2000).take(6);\n * var timer3 = Rx.Observable.interval(500).take(10);\n * var concurrent = 2; // the argument\n * var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent);\n * merged.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - First timer1 and timer2 will run concurrently\n * // - timer1 will emit a value every 1000ms for 10 iterations\n * // - timer2 will emit a value every 2000ms for 6 iterations\n * // - after timer1 hits it's max iteration, timer2 will\n * // continue, and timer3 will start to run concurrently with timer2\n * // - when timer2 hits it's max iteration it terminates, and\n * // timer3 will continue to emit a value every 500ms until it is complete\n *\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n *\n * @param {...ObservableInput} observables Input Observables to merge together.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for managing\n * concurrency of input Observables.\n * @return {Observable} an Observable that emits items that are the result of\n * every input Observable.\n * @static true\n * @name merge\n * @owner Observable\n */\nexport function merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var 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\n","/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { noop } from '../util/noop';\n/**\n * An Observable that emits no items to the Observer and never completes.\n *\n * <img src=\"./img/never.png\" width=\"100%\">\n *\n * A simple Observable that emits neither values nor errors nor the completion\n * notification. It can be used for testing purposes or for composing with other\n * Observables. Please note that by never emitting a complete notification, this\n * Observable keeps the subscription from being disposed automatically.\n * Subscriptions need to be manually disposed.\n *\n * @example <caption>Emit the number 7, then never emit anything else (not even complete).</caption>\n * function info() {\n * console.log('Will not be called');\n * }\n * var result = NEVER.startWith(7);\n * result.subscribe(x => console.log(x), info, info);\n *\n * @see {@link create}\n * @see {@link EMPTY}\n * @see {@link of}\n * @see {@link throwError}\n */\nexport var NEVER = /*@__PURE__*/ new Observable(noop);\n/**\n * @deprecated Deprecated in favor of using NEVER constant.\n */\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map\n","/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_empty,_scalar PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { empty } from './empty';\nimport { scalar } from './scalar';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = args[args.length - 1];\n if (isScheduler(scheduler)) {\n args.pop();\n }\n else {\n scheduler = undefined;\n }\n switch (args.length) {\n case 0:\n return empty(scheduler);\n case 1:\n return scheduler ? fromArray(args, scheduler) : scalar(args[0]);\n default:\n return fromArray(args, scheduler);\n }\n}\n//# sourceMappingURL=of.js.map\n","/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { isArray } from '../util/isArray';\nimport { EMPTY } from './empty';\n/* tslint:enable:max-line-length */\n/**\n * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one\n * that was passed.\n *\n * <span class=\"informal\">Execute series of Observables no matter what, even if it means swallowing errors.</span>\n *\n * <img src=\"./img/onErrorResumeNext.png\" width=\"100%\">\n *\n * `onErrorResumeNext` Will subscribe to each observable source it is provided, in order.\n * If the source it's subscribed to emits an error or completes, it will move to the next source\n * without error.\n *\n * If `onErrorResumeNext` is provided no arguments, or a single, empty array, it will return {@link EMPTY}.\n *\n * `onErrorResumeNext` is basically {@link concat}, only it will continue, even if one of its\n * sources emits an error.\n *\n * Note that there is no way to handle any errors thrown by sources via the resuult of\n * `onErrorResumeNext`. If you want to handle errors thrown in any given source, you can\n * always use the {@link catchError} operator on them before passing them into `onErrorResumeNext`.\n *\n * @example <caption>Subscribe to the next Observable after map fails</caption>\n * import { onErrorResumeNext, of } from 'rxjs/create';\n * import { map } from 'rxjs/operators';\n *\n * onErrorResumeNext(\n * of(1, 2, 3, 0).pipe(\n * map(x => {\n * if (x === 0) throw Error();\n * return 10 / x;\n * })\n * ),\n * of(1, 2, 3),\n * )\n * .subscribe(\n * val => console.log(val),\n * err => console.log(err), // Will never be called.\n * () => console.log('done')\n * );\n *\n * // Logs:\n * // 10\n * // 5\n * // 3.3333333333333335\n * // 1\n * // 2\n * // 3\n * // \"done\"\n *\n * @see {@link concat}\n * @see {@link catch}\n *\n * @param {...ObservableInput} sources Observables (or anything that *is* observable) passed either directly or as an array.\n * @return {Observable} An Observable that concatenates all sources, one after the other,\n * ignoring all errors, such that any error causes it to move on to the next source.\n */\nexport function onErrorResumeNext() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n if (sources.length === 0) {\n return EMPTY;\n }\n var first = sources[0], remainder = sources.slice(1);\n if (sources.length === 1 && isArray(first)) {\n return onErrorResumeNext.apply(void 0, first);\n }\n return new Observable(function (subscriber) {\n var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };\n return from(first).subscribe({\n next: function (value) { subscriber.next(value); },\n error: subNext,\n complete: subNext,\n });\n });\n}\n//# sourceMappingURL=onErrorResumeNext.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\n/**\n * Convert an object into an observable sequence of [key, value] pairs\n * using an optional IScheduler to enumerate the object.\n *\n * @example <caption>Converts a javascript object to an Observable</caption>\n * var obj = {\n * foo: 42,\n * bar: 56,\n * baz: 78\n * };\n *\n * var source = Rx.Observable.pairs(obj);\n *\n * var subscription = source.subscribe(\n * function (x) {\n * console.log('Next: %s', x);\n * },\n * function (err) {\n * console.log('Error: %s', err);\n * },\n * function () {\n * console.log('Completed');\n * });\n *\n * @param {Object} obj The object to inspect and turn into an\n * Observable sequence.\n * @param {Scheduler} [scheduler] An optional IScheduler to run the\n * enumeration of the input sequence on.\n * @returns {(Observable<[string, T]>)} An observable sequence of\n * [key, value] pairs from the object.\n */\nexport function pairs(obj, scheduler) {\n if (!scheduler) {\n return new Observable(function (subscriber) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length && !subscriber.closed; i++) {\n var 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(function (subscriber) {\n var keys = Object.keys(obj);\n var subscription = new Subscription();\n subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));\n return subscription;\n });\n }\n}\n/** @internal */\nexport function dispatch(state) {\n var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;\n if (!subscriber.closed) {\n if (index < keys.length) {\n var key = keys[index];\n subscriber.next([key, obj[key]]);\n subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));\n }\n else {\n subscriber.complete();\n }\n }\n}\n//# sourceMappingURL=pairs.js.map\n","/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isArray } from '../util/isArray';\nimport { fromArray } from './fromArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function race() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n // if the only argument is an array, it was most likely called with\n // `race([obs1, obs2, ...])`\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}\nvar RaceOperator = /*@__PURE__*/ (function () {\n function RaceOperator() {\n }\n RaceOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RaceSubscriber(subscriber));\n };\n return RaceOperator;\n}());\nexport { RaceOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar RaceSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RaceSubscriber, _super);\n function RaceSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasFirst = false;\n _this.observables = [];\n _this.subscriptions = [];\n return _this;\n }\n RaceSubscriber.prototype._next = function (observable) {\n this.observables.push(observable);\n };\n RaceSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n for (var i = 0; i < len && !this.hasFirst; i++) {\n var observable = observables[i];\n var subscription = subscribeToResult(this, observable, observable, i);\n if (this.subscriptions) {\n this.subscriptions.push(subscription);\n }\n this.add(subscription);\n }\n this.observables = null;\n }\n };\n RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (!this.hasFirst) {\n this.hasFirst = true;\n for (var i = 0; i < this.subscriptions.length; i++) {\n if (i !== outerIndex) {\n var 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 return RaceSubscriber;\n}(OuterSubscriber));\nexport { RaceSubscriber };\n//# sourceMappingURL=race.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\n/**\n * Creates an Observable that emits a sequence of numbers within a specified\n * range.\n *\n * <span class=\"informal\">Emits a sequence of numbers in a range.</span>\n *\n * <img src=\"./img/range.png\" width=\"100%\">\n *\n * `range` operator emits a range of sequential integers, in order, where you\n * select the `start` of the range and its `length`. By default, uses no\n * IScheduler and just delivers the notifications synchronously, but may use\n * an optional IScheduler to regulate those deliveries.\n *\n * @example <caption>Emits the numbers 1 to 10</caption>\n * var numbers = Rx.Observable.range(1, 10);\n * numbers.subscribe(x => console.log(x));\n *\n * @see {@link timer}\n * @see {@link interval}\n *\n * @param {number} [start=0] The value of the first integer in the sequence.\n * @param {number} [count=0] The number of sequential integers to generate.\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emissions of the notifications.\n * @return {Observable} An Observable of numbers that emits a finite range of\n * sequential integers.\n * @static true\n * @name range\n * @owner Observable\n */\nexport function range(start, count, scheduler) {\n if (start === void 0) {\n start = 0;\n }\n if (count === void 0) {\n count = 0;\n }\n return new Observable(function (subscriber) {\n var index = 0;\n if (scheduler) {\n return scheduler.schedule(dispatch, 0, {\n index: index, count: count, start: start, subscriber: subscriber\n });\n }\n else {\n do {\n if (index++ >= count) {\n subscriber.complete();\n break;\n }\n subscriber.next(start++);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n }\n return undefined;\n });\n}\n/** @internal */\nexport function dispatch(state) {\n var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;\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\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function scalar(value) {\n var result = new Observable(function (subscriber) {\n subscriber.next(value);\n subscriber.complete();\n });\n result._isScalar = true;\n result.value = value;\n return result;\n}\n//# sourceMappingURL=scalar.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\n/**\n * Creates an Observable that emits no items to the Observer and immediately\n * emits an error notification.\n *\n * <span class=\"informal\">Just emits 'error', and nothing else.\n * </span>\n *\n * <img src=\"./img/throw.png\" width=\"100%\">\n *\n * This static operator is useful for creating a simple Observable that only\n * emits the error notification. It can be used for composing with other\n * Observables, such as in a {@link mergeMap}.\n *\n * @example <caption>Emit the number 7, then emit an error.</caption>\n * import { throwError, concat, of } from 'rxjs/create';\n *\n * const result = concat(of(7), throwError(new Error('oops!')));\n * result.subscribe(x => console.log(x), e => console.error(e));\n *\n * @example <caption>Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 13</caption>\n * import { throwError, interval, of } from 'rxjs/create';\n * import { mergeMap } from 'rxjs/operators';\n *\n * interval(1000).pipe(\n * mergeMap(x => x === 13 ?\n * throwError('Thirteens are bad') :\n * of('a', 'b', 'c')\n * )\n * ).subscribe(x => console.log(x), e => console.error(e));\n *\n * @see {@link create}\n * @see {@link empty}\n * @see {@link never}\n * @see {@link of}\n *\n * @param {any} error The particular Error to pass to the error notification.\n * @param {Scheduler} [scheduler] A {@link IScheduler} to use for scheduling\n * the emission of the error notification.\n * @return {Observable} An error Observable: emits only the error notification\n * using the given error argument.\n * @static true\n * @name throw\n * @owner Observable\n */\nexport function throwError(error, scheduler) {\n if (!scheduler) {\n return new Observable(function (subscriber) { return subscriber.error(error); });\n }\n else {\n return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });\n }\n}\nfunction dispatch(_a) {\n var error = _a.error, subscriber = _a.subscriber;\n subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map\n","/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { async } from '../scheduler/async';\nimport { isNumeric } from '../util/isNumeric';\nimport { isScheduler } from '../util/isScheduler';\n/**\n * Creates an Observable that starts emitting after an `initialDelay` and\n * emits ever increasing numbers after each `period` of time thereafter.\n *\n * <span class=\"informal\">Its like {@link interval}, but you can specify when\n * should the emissions start.</span>\n *\n * <img src=\"./img/timer.png\" width=\"100%\">\n *\n * `timer` returns an Observable that emits an infinite sequence of ascending\n * integers, with a constant interval of time, `period` of your choosing\n * between those emissions. The first emission happens after the specified\n * `initialDelay`. The initial delay may be a {@link Date}. By default, this\n * operator uses the `async` IScheduler to provide a notion of time, but you\n * may pass any IScheduler to it. If `period` is not specified, the output\n * Observable emits only one value, `0`. Otherwise, it emits an infinite\n * sequence.\n *\n * @example <caption>Emits ascending numbers, one every second (1000ms), starting after 3 seconds</caption>\n * var numbers = Rx.Observable.timer(3000, 1000);\n * numbers.subscribe(x => console.log(x));\n *\n * @example <caption>Emits one number after five seconds</caption>\n * var numbers = Rx.Observable.timer(5000);\n * numbers.subscribe(x => console.log(x));\n *\n * @see {@link interval}\n * @see {@link delay}\n *\n * @param {number|Date} [dueTime] The initial delay time to wait before\n * emitting the first value of `0`.\n * @param {number|SchedulerLike} [periodOrScheduler] The period of time between emissions of the\n * subsequent numbers.\n * @param {SchedulerLike} [scheduler=async] The IScheduler to use for scheduling\n * the emission of values, and providing a notion of \"time\".\n * @return {Observable} An Observable that emits a `0` after the\n * `initialDelay` and ever increasing numbers after each `period` of time\n * thereafter.\n * @static true\n * @name timer\n * @owner Observable\n */\nexport function timer(dueTime, periodOrScheduler, scheduler) {\n if (dueTime === void 0) {\n dueTime = 0;\n }\n var 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(function (subscriber) {\n var due = isNumeric(dueTime)\n ? dueTime\n : (+dueTime - scheduler.now());\n return scheduler.schedule(dispatch, due, {\n index: 0, period: period, subscriber: subscriber\n });\n });\n}\nfunction dispatch(state) {\n var index = state.index, period = state.period, subscriber = state.subscriber;\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\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from'; // from from from! LAWL\nimport { EMPTY } from './empty';\n/**\n * Creates an Observable that uses a resource which will be disposed at the same time as the Observable.\n *\n * <span class=\"informal\">Use it when you catch yourself cleaning up after an Observable.</span>\n *\n * `using` is a factory operator, which accepts two functions. First function returns a disposable resource.\n * It can be an arbitrary object that implements `unsubscribe` method. Second function will be injected with\n * that object and should return an Observable. That Observable can use resource object during its execution.\n * Both functions passed to `using` will be called every time someone subscribes - neither an Observable nor\n * resource object will be shared in any way between subscriptions.\n *\n * When Observable returned by `using` is subscribed, Observable returned from the second function will be subscribed\n * as well. All its notifications (nexted values, completion and error events) will be emitted unchanged by the output\n * Observable. If however someone unsubscribes from the Observable or source Observable completes or errors by itself,\n * the `unsubscribe` method on resource object will be called. This can be used to do any necessary clean up, which\n * otherwise would have to be handled by hand. Note that complete or error notifications are not emitted when someone\n * cancels subscription to an Observable via `unsubscribe`, so `using` can be used as a hook, allowing you to make\n * sure that all resources which need to exist during an Observable execution will be disposed at appropriate time.\n *\n * @see {@link defer}\n *\n * @param {function(): ISubscription} resourceFactory A function which creates any resource object\n * that implements `unsubscribe` method.\n * @param {function(resource: ISubscription): Observable<T>} observableFactory A function which\n * creates an Observable, that can use injected resource object.\n * @return {Observable<T>} An Observable that behaves the same as Observable returned by `observableFactory`, but\n * which - when completed, errored or unsubscribed - will also call `unsubscribe` on created resource object.\n */\nexport function using(resourceFactory, observableFactory) {\n return new Observable(function (subscriber) {\n var resource;\n try {\n resource = resourceFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var result;\n try {\n result = observableFactory(resource);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = result ? from(result) : EMPTY;\n var subscription = source.subscribe(subscriber);\n return function () {\n subscription.unsubscribe();\n if (resource) {\n resource.unsubscribe();\n }\n };\n });\n}\n//# sourceMappingURL=using.js.map\n","/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { fromArray } from './fromArray';\nimport { isArray } from '../util/isArray';\nimport { Subscriber } from '../Subscriber';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { iterator as Symbol_iterator } from '../../internal/symbol/iterator';\n/* tslint:enable:max-line-length */\n/**\n * Combines multiple Observables to create an Observable whose values are calculated from the values, in order, of each\n * of its input Observables.\n *\n * If the latest parameter is a function, this function is used to compute the created value from the input values.\n * Otherwise, an array of the input values is returned.\n *\n * @example <caption>Combine age and name from different sources</caption>\n *\n * let age$ = Observable.of<number>(27, 25, 29);\n * let name$ = Observable.of<string>('Foo', 'Bar', 'Beer');\n * let isDev$ = Observable.of<boolean>(true, true, false);\n *\n * Observable\n * .zip(age$,\n * name$,\n * isDev$,\n * (age: number, name: string, isDev: boolean) => ({ age, name, isDev }))\n * .subscribe(x => console.log(x));\n *\n * // outputs\n * // { age: 27, name: 'Foo', isDev: true }\n * // { age: 25, name: 'Bar', isDev: true }\n * // { age: 29, name: 'Beer', isDev: false }\n *\n * @param observables\n * @return {Observable<R>}\n * @static true\n * @name zip\n * @owner Observable\n */\nexport function zip() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = observables[observables.length - 1];\n if (typeof resultSelector === 'function') {\n observables.pop();\n }\n return fromArray(observables, undefined).lift(new ZipOperator(resultSelector));\n}\nvar ZipOperator = /*@__PURE__*/ (function () {\n function ZipOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n ZipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));\n };\n return ZipOperator;\n}());\nexport { ZipOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ZipSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ZipSubscriber, _super);\n function ZipSubscriber(destination, resultSelector, values) {\n if (values === void 0) {\n values = Object.create(null);\n }\n var _this = _super.call(this, destination) || this;\n _this.iterators = [];\n _this.active = 0;\n _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;\n _this.values = values;\n return _this;\n }\n ZipSubscriber.prototype._next = function (value) {\n var 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 ZipSubscriber.prototype._complete = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n if (len === 0) {\n this.destination.complete();\n return;\n }\n this.active = len;\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (iterator.stillUnsubscribed) {\n this.add(iterator.subscribe(iterator, i));\n }\n else {\n this.active--; // not an observable\n }\n }\n };\n ZipSubscriber.prototype.notifyInactive = function () {\n this.active--;\n if (this.active === 0) {\n this.destination.complete();\n }\n };\n ZipSubscriber.prototype.checkIterators = function () {\n var iterators = this.iterators;\n var len = iterators.length;\n var destination = this.destination;\n // abort if not all of them have values\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {\n return;\n }\n }\n var shouldComplete = false;\n var args = [];\n for (var i = 0; i < len; i++) {\n var iterator = iterators[i];\n var result = iterator.next();\n // check to see if it's completed now that you've gotten\n // the next value.\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 ZipSubscriber.prototype._tryresultSelector = function (args) {\n var 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 return ZipSubscriber;\n}(Subscriber));\nexport { ZipSubscriber };\nvar StaticIterator = /*@__PURE__*/ (function () {\n function StaticIterator(iterator) {\n this.iterator = iterator;\n this.nextResult = iterator.next();\n }\n StaticIterator.prototype.hasValue = function () {\n return true;\n };\n StaticIterator.prototype.next = function () {\n var result = this.nextResult;\n this.nextResult = this.iterator.next();\n return result;\n };\n StaticIterator.prototype.hasCompleted = function () {\n var nextResult = this.nextResult;\n return nextResult && nextResult.done;\n };\n return StaticIterator;\n}());\nvar StaticArrayIterator = /*@__PURE__*/ (function () {\n function StaticArrayIterator(array) {\n this.array = array;\n this.index = 0;\n this.length = 0;\n this.length = array.length;\n }\n StaticArrayIterator.prototype[Symbol_iterator] = function () {\n return this;\n };\n StaticArrayIterator.prototype.next = function (value) {\n var i = this.index++;\n var array = this.array;\n return i < this.length ? { value: array[i], done: false } : { value: null, done: true };\n };\n StaticArrayIterator.prototype.hasValue = function () {\n return this.array.length > this.index;\n };\n StaticArrayIterator.prototype.hasCompleted = function () {\n return this.array.length === this.index;\n };\n return StaticArrayIterator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ZipBufferIterator = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ZipBufferIterator, _super);\n function ZipBufferIterator(destination, parent, observable) {\n var _this = _super.call(this, destination) || this;\n _this.parent = parent;\n _this.observable = observable;\n _this.stillUnsubscribed = true;\n _this.buffer = [];\n _this.isComplete = false;\n return _this;\n }\n ZipBufferIterator.prototype[Symbol_iterator] = function () {\n return this;\n };\n // NOTE: there is actually a name collision here with Subscriber.next and Iterator.next\n // this is legit because `next()` will never be called by a subscription in this case.\n ZipBufferIterator.prototype.next = function () {\n var 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 ZipBufferIterator.prototype.hasValue = function () {\n return this.buffer.length > 0;\n };\n ZipBufferIterator.prototype.hasCompleted = function () {\n return this.buffer.length === 0 && this.isComplete;\n };\n ZipBufferIterator.prototype.notifyComplete = function () {\n if (this.buffer.length > 0) {\n this.isComplete = true;\n this.parent.notifyInactive();\n }\n else {\n this.destination.complete();\n }\n };\n ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.buffer.push(innerValue);\n this.parent.checkIterators();\n };\n ZipBufferIterator.prototype.subscribe = function (value, index) {\n return subscribeToResult(this, this.observable, this, index);\n };\n return ZipBufferIterator;\n}(OuterSubscriber));\n//# sourceMappingURL=zip.js.map\n","/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Ignores source values for a duration determined by another Observable, then\n * emits the most recent value from the source Observable, then repeats this\n * process.\n *\n * <span class=\"informal\">It's like {@link auditTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * <img src=\"./img/audit.png\" width=\"100%\">\n *\n * `audit` is similar to `throttle`, but emits the last value from the silenced\n * time window, instead of the first value. `audit` emits the most recent value\n * from the source Observable on the output Observable as soon as its internal\n * timer becomes disabled, and ignores source values while the timer is enabled.\n * Initially, the timer is disabled. As soon as the first source value arrives,\n * the timer is enabled by calling the `durationSelector` function with the\n * source value, which returns the \"duration\" Observable. When the duration\n * Observable emits a value or completes, the timer is disabled, then the most\n * recent source value is emitted on the output Observable, and this process\n * repeats for the next source value.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.audit(ev => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttle}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration, returned as an Observable or a Promise.\n * @return {Observable<T>} An Observable that performs rate-limiting of\n * emissions from the source Observable.\n * @method audit\n * @owner Observable\n */\nexport function audit(durationSelector) {\n return function auditOperatorFunction(source) {\n return source.lift(new AuditOperator(durationSelector));\n };\n}\nvar AuditOperator = /*@__PURE__*/ (function () {\n function AuditOperator(durationSelector) {\n this.durationSelector = durationSelector;\n }\n AuditOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));\n };\n return AuditOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AuditSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AuditSubscriber, _super);\n function AuditSubscriber(destination, durationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.durationSelector = durationSelector;\n _this.hasValue = false;\n return _this;\n }\n AuditSubscriber.prototype._next = function (value) {\n this.value = value;\n this.hasValue = true;\n if (!this.throttled) {\n var duration = tryCatch(this.durationSelector)(value);\n if (duration === errorObject) {\n this.destination.error(errorObject.e);\n }\n else {\n var innerSubscription = subscribeToResult(this, duration);\n if (innerSubscription.closed) {\n this.clearThrottle();\n }\n else {\n this.add(this.throttled = innerSubscription);\n }\n }\n }\n };\n AuditSubscriber.prototype.clearThrottle = function () {\n var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;\n if (throttled) {\n this.remove(throttled);\n this.throttled = null;\n throttled.unsubscribe();\n }\n if (hasValue) {\n this.value = null;\n this.hasValue = false;\n this.destination.next(value);\n }\n };\n AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {\n this.clearThrottle();\n };\n AuditSubscriber.prototype.notifyComplete = function () {\n this.clearThrottle();\n };\n return AuditSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=audit.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\n/**\n * Ignores source values for `duration` milliseconds, then emits the most recent\n * value from the source Observable, then repeats this process.\n *\n * <span class=\"informal\">When it sees a source values, it ignores that plus\n * the next ones for `duration` milliseconds, and then it emits the most recent\n * value from the source.</span>\n *\n * <img src=\"./img/auditTime.png\" width=\"100%\">\n *\n * `auditTime` is similar to `throttleTime`, but emits the last value from the\n * silenced time window, instead of the first value. `auditTime` emits the most\n * recent value from the source Observable on the output Observable as soon as\n * its internal timer becomes disabled, and ignores source values while the\n * timer is enabled. Initially, the timer is disabled. As soon as the first\n * source value arrives, the timer is enabled. After `duration` milliseconds (or\n * the time unit determined internally by the optional `scheduler`) has passed,\n * the timer is disabled, then the most recent source value is emitted on the\n * output Observable, and this process repeats for the next source value.\n * Optionally takes a {@link IScheduler} for managing timers.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.auditTime(1000);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param {number} duration Time to wait before emitting the most recent source\n * value, measured in milliseconds or the time unit determined internally\n * by the optional `scheduler`.\n * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the rate-limiting behavior.\n * @return {Observable<T>} An Observable that performs rate-limiting of\n * emissions from the source Observable.\n * @method auditTime\n * @owner Observable\n */\nexport function auditTime(duration, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return audit(function () { return timer(duration, scheduler); });\n}\n//# sourceMappingURL=auditTime.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Buffers the source Observable values until `closingNotifier` emits.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * that array only when another Observable emits.</span>\n *\n * <img src=\"./img/buffer.png\" width=\"100%\">\n *\n * Buffers the incoming Observable values until the given `closingNotifier`\n * Observable emits a value, at which point it emits the buffer on the output\n * Observable and starts a new buffer internally, awaiting the next time\n * `closingNotifier` emits.\n *\n * @example <caption>On every click, emit array of most recent interval events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var interval = Rx.Observable.interval(1000);\n * var buffered = interval.buffer(clicks);\n * buffered.subscribe(x => console.log(x));\n *\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link window}\n *\n * @param {Observable<any>} closingNotifier An Observable that signals the\n * buffer to be emitted on the output Observable.\n * @return {Observable<T[]>} An Observable of buffers, which are arrays of\n * values.\n * @method buffer\n * @owner Observable\n */\nexport function buffer(closingNotifier) {\n return function bufferOperatorFunction(source) {\n return source.lift(new BufferOperator(closingNotifier));\n };\n}\nvar BufferOperator = /*@__PURE__*/ (function () {\n function BufferOperator(closingNotifier) {\n this.closingNotifier = closingNotifier;\n }\n BufferOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));\n };\n return BufferOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferSubscriber, _super);\n function BufferSubscriber(destination, closingNotifier) {\n var _this = _super.call(this, destination) || this;\n _this.buffer = [];\n _this.add(subscribeToResult(_this, closingNotifier));\n return _this;\n }\n BufferSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var buffer = this.buffer;\n this.buffer = [];\n this.destination.next(buffer);\n };\n return BufferSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=buffer.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Buffers the source Observable values until the size hits the maximum\n * `bufferSize` given.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * that array only when its size reaches `bufferSize`.</span>\n *\n * <img src=\"./img/bufferCount.png\" width=\"100%\">\n *\n * Buffers a number of values from the source Observable by `bufferSize` then\n * emits the buffer and clears it, and starts a new buffer each\n * `startBufferEvery` values. If `startBufferEvery` is not provided or is\n * `null`, then new buffers are started immediately at the start of the source\n * and when each buffer closes and is emitted.\n *\n * @example <caption>Emit the last two click events as an array</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferCount(2);\n * buffered.subscribe(x => console.log(x));\n *\n * @example <caption>On every click, emit the last two click events as an array</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferCount(2, 1);\n * buffered.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link pairwise}\n * @see {@link windowCount}\n *\n * @param {number} bufferSize The maximum size of the buffer emitted.\n * @param {number} [startBufferEvery] Interval at which to start a new buffer.\n * For example if `startBufferEvery` is `2`, then a new buffer will be started\n * on every other value from the source. A new buffer is started at the\n * beginning of the source by default.\n * @return {Observable<T[]>} An Observable of arrays of buffered values.\n * @method bufferCount\n * @owner Observable\n */\nexport function bufferCount(bufferSize, startBufferEvery) {\n if (startBufferEvery === void 0) {\n startBufferEvery = null;\n }\n return function bufferCountOperatorFunction(source) {\n return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));\n };\n}\nvar BufferCountOperator = /*@__PURE__*/ (function () {\n function BufferCountOperator(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 BufferCountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));\n };\n return BufferCountOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferCountSubscriber, _super);\n function BufferCountSubscriber(destination, bufferSize) {\n var _this = _super.call(this, destination) || this;\n _this.bufferSize = bufferSize;\n _this.buffer = [];\n return _this;\n }\n BufferCountSubscriber.prototype._next = function (value) {\n var buffer = this.buffer;\n buffer.push(value);\n if (buffer.length == this.bufferSize) {\n this.destination.next(buffer);\n this.buffer = [];\n }\n };\n BufferCountSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer.length > 0) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n return BufferCountSubscriber;\n}(Subscriber));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferSkipCountSubscriber, _super);\n function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {\n var _this = _super.call(this, destination) || this;\n _this.bufferSize = bufferSize;\n _this.startBufferEvery = startBufferEvery;\n _this.buffers = [];\n _this.count = 0;\n return _this;\n }\n BufferSkipCountSubscriber.prototype._next = function (value) {\n var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;\n this.count++;\n if (count % startBufferEvery === 0) {\n buffers.push([]);\n }\n for (var i = buffers.length; i--;) {\n var 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 BufferSkipCountSubscriber.prototype._complete = function () {\n var _a = this, buffers = _a.buffers, destination = _a.destination;\n while (buffers.length > 0) {\n var buffer = buffers.shift();\n if (buffer.length > 0) {\n destination.next(buffer);\n }\n }\n _super.prototype._complete.call(this);\n };\n return BufferSkipCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=bufferCount.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { Subscriber } from '../Subscriber';\nimport { isScheduler } from '../util/isScheduler';\n/* tslint:enable:max-line-length */\n/**\n * Buffers the source Observable values for a specific time period.\n *\n * <span class=\"informal\">Collects values from the past as an array, and emits\n * those arrays periodically in time.</span>\n *\n * <img src=\"./img/bufferTime.png\" width=\"100%\">\n *\n * Buffers values from the source for a specific time duration `bufferTimeSpan`.\n * Unless the optional argument `bufferCreationInterval` is given, it emits and\n * resets the buffer every `bufferTimeSpan` milliseconds. If\n * `bufferCreationInterval` is given, this operator opens the buffer every\n * `bufferCreationInterval` milliseconds and closes (emits and resets) the\n * buffer every `bufferTimeSpan` milliseconds. When the optional argument\n * `maxBufferSize` is specified, the buffer will be closed either after\n * `bufferTimeSpan` milliseconds or when it contains `maxBufferSize` elements.\n *\n * @example <caption>Every second, emit an array of the recent click events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferTime(1000);\n * buffered.subscribe(x => console.log(x));\n *\n * @example <caption>Every 5 seconds, emit the click events from the next 2 seconds</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferTime(2000, 5000);\n * buffered.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferToggle}\n * @see {@link bufferWhen}\n * @see {@link windowTime}\n *\n * @param {number} bufferTimeSpan The amount of time to fill each buffer array.\n * @param {number} [bufferCreationInterval] The interval at which to start new\n * buffers.\n * @param {number} [maxBufferSize] The maximum buffer size.\n * @param {Scheduler} [scheduler=async] The scheduler on which to schedule the\n * intervals that determine buffer boundaries.\n * @return {Observable<T[]>} An observable of arrays of buffered values.\n * @method bufferTime\n * @owner Observable\n */\nexport function bufferTime(bufferTimeSpan) {\n var length = arguments.length;\n var scheduler = async;\n if (isScheduler(arguments[arguments.length - 1])) {\n scheduler = arguments[arguments.length - 1];\n length--;\n }\n var bufferCreationInterval = null;\n if (length >= 2) {\n bufferCreationInterval = arguments[1];\n }\n var 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}\nvar BufferTimeOperator = /*@__PURE__*/ (function () {\n function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n this.bufferTimeSpan = bufferTimeSpan;\n this.bufferCreationInterval = bufferCreationInterval;\n this.maxBufferSize = maxBufferSize;\n this.scheduler = scheduler;\n }\n BufferTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));\n };\n return BufferTimeOperator;\n}());\nvar Context = /*@__PURE__*/ (function () {\n function Context() {\n this.buffer = [];\n }\n return Context;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferTimeSubscriber, _super);\n function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.bufferTimeSpan = bufferTimeSpan;\n _this.bufferCreationInterval = bufferCreationInterval;\n _this.maxBufferSize = maxBufferSize;\n _this.scheduler = scheduler;\n _this.contexts = [];\n var context = _this.openContext();\n _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;\n if (_this.timespanOnly) {\n var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };\n _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n }\n else {\n var closeState = { subscriber: _this, context: context };\n var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };\n _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));\n _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));\n }\n return _this;\n }\n BufferTimeSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n var len = contexts.length;\n var filledBufferContext;\n for (var i = 0; i < len; i++) {\n var context_1 = contexts[i];\n var buffer = context_1.buffer;\n buffer.push(value);\n if (buffer.length == this.maxBufferSize) {\n filledBufferContext = context_1;\n }\n }\n if (filledBufferContext) {\n this.onBufferFull(filledBufferContext);\n }\n };\n BufferTimeSubscriber.prototype._error = function (err) {\n this.contexts.length = 0;\n _super.prototype._error.call(this, err);\n };\n BufferTimeSubscriber.prototype._complete = function () {\n var _a = this, contexts = _a.contexts, destination = _a.destination;\n while (contexts.length > 0) {\n var context_2 = contexts.shift();\n destination.next(context_2.buffer);\n }\n _super.prototype._complete.call(this);\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n BufferTimeSubscriber.prototype._unsubscribe = function () {\n this.contexts = null;\n };\n BufferTimeSubscriber.prototype.onBufferFull = function (context) {\n this.closeContext(context);\n var closeAction = context.closeAction;\n closeAction.unsubscribe();\n this.remove(closeAction);\n if (!this.closed && this.timespanOnly) {\n context = this.openContext();\n var bufferTimeSpan = this.bufferTimeSpan;\n var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };\n this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));\n }\n };\n BufferTimeSubscriber.prototype.openContext = function () {\n var context = new Context();\n this.contexts.push(context);\n return context;\n };\n BufferTimeSubscriber.prototype.closeContext = function (context) {\n this.destination.next(context.buffer);\n var contexts = this.contexts;\n var spliceIndex = contexts ? contexts.indexOf(context) : -1;\n if (spliceIndex >= 0) {\n contexts.splice(contexts.indexOf(context), 1);\n }\n };\n return BufferTimeSubscriber;\n}(Subscriber));\nfunction dispatchBufferTimeSpanOnly(state) {\n var subscriber = state.subscriber;\n var 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 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;\n var context = subscriber.openContext();\n var action = this;\n if (!subscriber.closed) {\n subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));\n action.schedule(state, bufferCreationInterval);\n }\n}\nfunction dispatchBufferClose(arg) {\n var subscriber = arg.subscriber, context = arg.context;\n subscriber.closeContext(context);\n}\n//# sourceMappingURL=bufferTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\n/**\n * Buffers the source Observable values starting from an emission from\n * `openings` and ending when the output of `closingSelector` emits.\n *\n * <span class=\"informal\">Collects values from the past as an array. Starts\n * collecting only when `opening` emits, and calls the `closingSelector`\n * function to get an Observable that tells when to close the buffer.</span>\n *\n * <img src=\"./img/bufferToggle.png\" width=\"100%\">\n *\n * Buffers values from the source by opening the buffer via signals from an\n * Observable provided to `openings`, and closing and sending the buffers when\n * a Subscribable or Promise returned by the `closingSelector` function emits.\n *\n * @example <caption>Every other second, emit the click events from the next 500ms</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var openings = Rx.Observable.interval(1000);\n * var buffered = clicks.bufferToggle(openings, i =>\n * i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()\n * );\n * buffered.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferWhen}\n * @see {@link windowToggle}\n *\n * @param {SubscribableOrPromise<O>} openings A Subscribable or Promise of notifications to start new\n * buffers.\n * @param {function(value: O): SubscribableOrPromise} closingSelector A function that takes\n * the value emitted by the `openings` observable and returns a Subscribable or Promise,\n * which, when it emits, signals that the associated buffer should be emitted\n * and cleared.\n * @return {Observable<T[]>} An observable of arrays of buffered values.\n * @method bufferToggle\n * @owner Observable\n */\nexport function bufferToggle(openings, closingSelector) {\n return function bufferToggleOperatorFunction(source) {\n return source.lift(new BufferToggleOperator(openings, closingSelector));\n };\n}\nvar BufferToggleOperator = /*@__PURE__*/ (function () {\n function BufferToggleOperator(openings, closingSelector) {\n this.openings = openings;\n this.closingSelector = closingSelector;\n }\n BufferToggleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));\n };\n return BufferToggleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferToggleSubscriber, _super);\n function BufferToggleSubscriber(destination, openings, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.openings = openings;\n _this.closingSelector = closingSelector;\n _this.contexts = [];\n _this.add(subscribeToResult(_this, openings));\n return _this;\n }\n BufferToggleSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n var len = contexts.length;\n for (var i = 0; i < len; i++) {\n contexts[i].buffer.push(value);\n }\n };\n BufferToggleSubscriber.prototype._error = function (err) {\n var contexts = this.contexts;\n while (contexts.length > 0) {\n var context_1 = contexts.shift();\n context_1.subscription.unsubscribe();\n context_1.buffer = null;\n context_1.subscription = null;\n }\n this.contexts = null;\n _super.prototype._error.call(this, err);\n };\n BufferToggleSubscriber.prototype._complete = function () {\n var contexts = this.contexts;\n while (contexts.length > 0) {\n var context_2 = contexts.shift();\n this.destination.next(context_2.buffer);\n context_2.subscription.unsubscribe();\n context_2.buffer = null;\n context_2.subscription = null;\n }\n this.contexts = null;\n _super.prototype._complete.call(this);\n };\n BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);\n };\n BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {\n this.closeBuffer(innerSub.context);\n };\n BufferToggleSubscriber.prototype.openBuffer = function (value) {\n try {\n var closingSelector = this.closingSelector;\n var closingNotifier = closingSelector.call(this, value);\n if (closingNotifier) {\n this.trySubscribe(closingNotifier);\n }\n }\n catch (err) {\n this._error(err);\n }\n };\n BufferToggleSubscriber.prototype.closeBuffer = function (context) {\n var contexts = this.contexts;\n if (contexts && context) {\n var buffer = context.buffer, subscription = context.subscription;\n this.destination.next(buffer);\n contexts.splice(contexts.indexOf(context), 1);\n this.remove(subscription);\n subscription.unsubscribe();\n }\n };\n BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {\n var contexts = this.contexts;\n var buffer = [];\n var subscription = new Subscription();\n var context = { buffer: buffer, subscription: subscription };\n contexts.push(context);\n var 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 return BufferToggleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=bufferToggle.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Buffers the source Observable values, using a factory function of closing\n * Observables to determine when to close, emit, and reset the buffer.\n *\n * <span class=\"informal\">Collects values from the past as an array. When it\n * starts collecting values, it calls a function that returns an Observable that\n * tells when to close the buffer and restart collecting.</span>\n *\n * <img src=\"./img/bufferWhen.png\" width=\"100%\">\n *\n * Opens a buffer immediately, then closes the buffer when the observable\n * returned by calling `closingSelector` function emits a value. When it closes\n * the buffer, it immediately opens a new buffer and repeats the process.\n *\n * @example <caption>Emit an array of the last clicks every [1-5] random seconds</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var buffered = clicks.bufferWhen(() =>\n * Rx.Observable.interval(1000 + Math.random() * 4000)\n * );\n * buffered.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n * @see {@link bufferTime}\n * @see {@link bufferToggle}\n * @see {@link windowWhen}\n *\n * @param {function(): Observable} closingSelector A function that takes no\n * arguments and returns an Observable that signals buffer closure.\n * @return {Observable<T[]>} An observable of arrays of buffered values.\n * @method bufferWhen\n * @owner Observable\n */\nexport function bufferWhen(closingSelector) {\n return function (source) {\n return source.lift(new BufferWhenOperator(closingSelector));\n };\n}\nvar BufferWhenOperator = /*@__PURE__*/ (function () {\n function BufferWhenOperator(closingSelector) {\n this.closingSelector = closingSelector;\n }\n BufferWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));\n };\n return BufferWhenOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(BufferWhenSubscriber, _super);\n function BufferWhenSubscriber(destination, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.closingSelector = closingSelector;\n _this.subscribing = false;\n _this.openBuffer();\n return _this;\n }\n BufferWhenSubscriber.prototype._next = function (value) {\n this.buffer.push(value);\n };\n BufferWhenSubscriber.prototype._complete = function () {\n var buffer = this.buffer;\n if (buffer) {\n this.destination.next(buffer);\n }\n _super.prototype._complete.call(this);\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n BufferWhenSubscriber.prototype._unsubscribe = function () {\n this.buffer = null;\n this.subscribing = false;\n };\n BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openBuffer();\n };\n BufferWhenSubscriber.prototype.notifyComplete = function () {\n if (this.subscribing) {\n this.complete();\n }\n else {\n this.openBuffer();\n }\n };\n BufferWhenSubscriber.prototype.openBuffer = function () {\n var closingSubscription = this.closingSubscription;\n if (closingSubscription) {\n this.remove(closingSubscription);\n closingSubscription.unsubscribe();\n }\n var buffer = this.buffer;\n if (this.buffer) {\n this.destination.next(buffer);\n }\n this.buffer = [];\n var closingNotifier = tryCatch(this.closingSelector)();\n if (closingNotifier === errorObject) {\n this.error(errorObject.e);\n }\n else {\n closingSubscription = new Subscription();\n this.closingSubscription = closingSubscription;\n this.add(closingSubscription);\n this.subscribing = true;\n closingSubscription.add(subscribeToResult(this, closingNotifier));\n this.subscribing = false;\n }\n };\n return BufferWhenSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=bufferWhen.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Catches errors on the observable to be handled by returning a new observable or throwing an error.\n *\n * <img src=\"./img/catch.png\" width=\"100%\">\n *\n * @example <caption>Continues with a different Observable when there's an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n == 4) {\n * \t throw 'four!';\n * }\n *\t return n;\n * })\n * .catch(err => Observable.of('I', 'II', 'III', 'IV', 'V'))\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, I, II, III, IV, V\n *\n * @example <caption>Retries the caught source Observable again in case of error, similar to retry() operator</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * \t if (n === 4) {\n * \t throw 'four!';\n * }\n * \t return n;\n * })\n * .catch((err, caught) => caught)\n * .take(30)\n * .subscribe(x => console.log(x));\n * // 1, 2, 3, 1, 2, 3, ...\n *\n * @example <caption>Throws a new error when the source Observable throws an error</caption>\n *\n * Observable.of(1, 2, 3, 4, 5)\n * .map(n => {\n * if (n == 4) {\n * throw 'four!';\n * }\n * return n;\n * })\n * .catch(err => {\n * throw 'error in source. Details: ' + err;\n * })\n * .subscribe(\n * x => console.log(x),\n * err => console.log(err)\n * );\n * // 1, 2, 3, error in source. Details: four!\n *\n * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which\n * is the source observable, in case you'd like to \"retry\" that observable by returning it again. Whatever observable\n * is returned by the `selector` will be used to continue the observable chain.\n * @return {Observable} An observable that originates from either the source or the observable returned by the\n * catch `selector` function.\n * @name catchError\n */\nexport function catchError(selector) {\n return function catchErrorOperatorFunction(source) {\n var operator = new CatchOperator(selector);\n var caught = source.lift(operator);\n return (operator.caught = caught);\n };\n}\nvar CatchOperator = /*@__PURE__*/ (function () {\n function CatchOperator(selector) {\n this.selector = selector;\n }\n CatchOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));\n };\n return CatchOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar CatchSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CatchSubscriber, _super);\n function CatchSubscriber(destination, selector, caught) {\n var _this = _super.call(this, destination) || this;\n _this.selector = selector;\n _this.caught = caught;\n return _this;\n }\n // NOTE: overriding `error` instead of `_error` because we don't want\n // to have this flag this subscriber as `isStopped`. We can mimic the\n // behavior of the RetrySubscriber (from the `retry` operator), where\n // we unsubscribe from our source chain, reset our Subscriber flags,\n // then subscribe to the selector result.\n CatchSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var result = void 0;\n try {\n result = this.selector(err, this.caught);\n }\n catch (err2) {\n _super.prototype.error.call(this, err2);\n return;\n }\n this._unsubscribeAndRecycle();\n this.add(subscribeToResult(this, result));\n }\n };\n return CatchSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=catchError.js.map\n","/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */\nimport { CombineLatestOperator } from '../observable/combineLatest';\nexport function combineAll(project) {\n return function (source) { return source.lift(new CombineLatestOperator(project)); };\n}\n//# sourceMappingURL=combineAll.js.map\n","/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */\nimport { isArray } from '../util/isArray';\nimport { CombineLatestOperator } from '../observable/combineLatest';\nimport { from } from '../observable/from';\nvar none = {};\n/* tslint:enable:max-line-length */\n/**\n * @deprecated Deprecated in favor of static combineLatest.\n */\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var project = null;\n if (typeof observables[observables.length - 1] === 'function') {\n project = observables.pop();\n }\n // if the first and only other argument besides the resultSelector is an array\n // assume it's been called with `combineLatest([obs1, obs2, obs3], project)`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0].slice();\n }\n return function (source) { return source.lift.call(from([source].concat(observables)), new CombineLatestOperator(project)); };\n}\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */\nimport { concat as concatStatic } from '../observable/concat';\n/* tslint:enable:max-line-length */\n/**\n * @deprecated Deprecated in favor of static concat.\n */\nexport function concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function (source) { return source.lift.call(concatStatic.apply(void 0, [source].concat(observables))); };\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */\nimport { mergeAll } from './mergeAll';\n/**\n * Converts a higher-order Observable into a first-order Observable by\n * concatenating the inner Observables in order.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables by putting one\n * inner Observable after the other.</span>\n *\n * <img src=\"./img/concatAll.png\" width=\"100%\">\n *\n * Joins every Observable emitted by the source (a higher-order Observable), in\n * a serial fashion. It subscribes to each inner Observable only after the\n * previous inner Observable has completed, and merges all of their values into\n * the returned observable.\n *\n * __Warning:__ If the source Observable emits Observables quickly and\n * endlessly, and the inner Observables it emits generally complete slower than\n * the source emits, you can run into memory issues as the incoming Observables\n * collect in an unbounded buffer.\n *\n * Note: `concatAll` is equivalent to `mergeAll` with concurrency parameter set\n * to `1`.\n *\n * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map(ev => Rx.Observable.interval(1000).take(4));\n * var firstOrder = higherOrder.concatAll();\n * firstOrder.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n *\n * @see {@link combineAll}\n * @see {@link concat}\n * @see {@link concatMap}\n * @see {@link concatMapTo}\n * @see {@link exhaust}\n * @see {@link mergeAll}\n * @see {@link switch}\n * @see {@link zipAll}\n *\n * @return {Observable} An Observable emitting values from all the inner\n * Observables concatenated.\n * @method concatAll\n * @owner Observable\n */\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map\n","/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, in a serialized fashion waiting for each one to complete before\n * merging the next.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link concatAll}.</span>\n *\n * <img src=\"./img/concatMap.png\" width=\"100%\">\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each new inner Observable is\n * concatenated with the previous inner Observable.\n *\n * __Warning:__ if source values arrive endlessly and faster than their\n * corresponding inner Observables can complete, it will result in memory issues\n * as inner Observables amass in an unbounded buffer waiting for their turn to\n * be subscribed to.\n *\n * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set\n * to `1`.\n *\n * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4));\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n *\n * @see {@link concat}\n * @see {@link concatAll}\n * @see {@link concatMapTo}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional `resultSelector`) to each item emitted\n * by the source Observable and taking values from each projected inner\n * Observable sequentially.\n * @method concatMap\n * @owner Observable\n */\nexport function concatMap(project, resultSelector) {\n return mergeMap(project, resultSelector, 1);\n}\n//# sourceMappingURL=concatMap.js.map\n","/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */\nimport { concatMap } from './concatMap';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to the same Observable which is merged multiple\n * times in a serialized fashion on the output Observable.\n *\n * <span class=\"informal\">It's like {@link concatMap}, but maps each value\n * always to the same inner Observable.</span>\n *\n * <img src=\"./img/concatMapTo.png\" width=\"100%\">\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then flattens those resulting Observables into one\n * single Observable, which is the output Observable. Each new `innerObservable`\n * instance emitted on the output Observable is concatenated with the previous\n * `innerObservable` instance.\n *\n * __Warning:__ if source values arrive endlessly and faster than their\n * corresponding inner Observables can complete, it will result in memory issues\n * as inner Observables amass in an unbounded buffer waiting for their turn to\n * be subscribed to.\n *\n * Note: `concatMapTo` is equivalent to `mergeMapTo` with concurrency parameter\n * set to `1`.\n *\n * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.concatMapTo(Rx.Observable.interval(1000).take(4));\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // (results are not concurrent)\n * // For every click on the \"document\" it will emit values 0 to 3 spaced\n * // on a 1000ms interval\n * // one click = 1000ms-> 0 -1000ms-> 1 -1000ms-> 2 -1000ms-> 3\n *\n * @see {@link concat}\n * @see {@link concatAll}\n * @see {@link concatMap}\n * @see {@link mergeMapTo}\n * @see {@link switchMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @return {Observable} An observable of values merged together by joining the\n * passed observable with itself, one after the other, for each value emitted\n * from the source.\n * @method concatMapTo\n * @owner Observable\n */\nexport function concatMapTo(innerObservable, resultSelector) {\n return concatMap(function () { return innerObservable; }, resultSelector);\n}\n//# sourceMappingURL=concatMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Counts the number of emissions on the source and emits that number when the\n * source completes.\n *\n * <span class=\"informal\">Tells how many values were emitted, when the source\n * completes.</span>\n *\n * <img src=\"./img/count.png\" width=\"100%\">\n *\n * `count` transforms an Observable that emits values into an Observable that\n * emits a single value that represents the number of values emitted by the\n * source Observable. If the source Observable terminates with an error, `count`\n * will pass this error notification along without emitting a value first. If\n * the source Observable does not terminate at all, `count` will neither emit\n * a value nor terminate. This operator takes an optional `predicate` function\n * as argument, in which case the output emission will represent the number of\n * source values that matched `true` with the `predicate`.\n *\n * @example <caption>Counts how many seconds have passed before the first click happened</caption>\n * var seconds = Rx.Observable.interval(1000);\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var secondsBeforeClick = seconds.takeUntil(clicks);\n * var result = secondsBeforeClick.count();\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Counts how many odd numbers are there between 1 and 7</caption>\n * var numbers = Rx.Observable.range(1, 7);\n * var result = numbers.count(i => i % 2 === 1);\n * result.subscribe(x => console.log(x));\n *\n * // Results in:\n * // 4\n *\n * @see {@link max}\n * @see {@link min}\n * @see {@link reduce}\n *\n * @param {function(value: T, i: number, source: Observable<T>): boolean} [predicate] A\n * boolean function to select what values are to be counted. It is provided with\n * arguments of:\n * - `value`: the value from the source Observable.\n * - `index`: the (zero-based) \"index\" of the value from the source Observable.\n * - `source`: the source Observable instance itself.\n * @return {Observable} An Observable of one number that represents the count as\n * described above.\n * @method count\n * @owner Observable\n */\nexport function count(predicate) {\n return function (source) { return source.lift(new CountOperator(predicate, source)); };\n}\nvar CountOperator = /*@__PURE__*/ (function () {\n function CountOperator(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n CountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));\n };\n return CountOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar CountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CountSubscriber, _super);\n function CountSubscriber(destination, predicate, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.count = 0;\n _this.index = 0;\n return _this;\n }\n CountSubscriber.prototype._next = function (value) {\n if (this.predicate) {\n this._tryPredicate(value);\n }\n else {\n this.count++;\n }\n };\n CountSubscriber.prototype._tryPredicate = function (value) {\n var 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 CountSubscriber.prototype._complete = function () {\n this.destination.next(this.count);\n this.destination.complete();\n };\n return CountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=count.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Emits a value from the source Observable only after a particular time span\n * determined by another Observable has passed without another source emission.\n *\n * <span class=\"informal\">It's like {@link debounceTime}, but the time span of\n * emission silence is determined by a second Observable.</span>\n *\n * <img src=\"./img/debounce.png\" width=\"100%\">\n *\n * `debounce` delays values emitted by the source Observable, but drops previous\n * pending delayed emissions if a new value arrives on the source Observable.\n * This operator keeps track of the most recent value from the source\n * Observable, and spawns a duration Observable by calling the\n * `durationSelector` function. The value is emitted only when the duration\n * Observable emits a value or completes, and if no other value was emitted on\n * the source Observable since the duration Observable was spawned. If a new\n * value appears before the duration Observable emits, the previous value will\n * be dropped and will not be emitted on the output Observable.\n *\n * Like {@link debounceTime}, this is a rate-limiting operator, and also a\n * delay-like operator since output emissions do not necessarily occur at the\n * same time as they did on the source Observable.\n *\n * @example <caption>Emit the most recent click after a burst of clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.debounce(() => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delayWhen}\n * @see {@link throttle}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the timeout\n * duration for each source value, returned as an Observable or a Promise.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified duration Observable returned by\n * `durationSelector`, and may drop some values if they occur too frequently.\n * @method debounce\n * @owner Observable\n */\nexport function debounce(durationSelector) {\n return function (source) { return source.lift(new DebounceOperator(durationSelector)); };\n}\nvar DebounceOperator = /*@__PURE__*/ (function () {\n function DebounceOperator(durationSelector) {\n this.durationSelector = durationSelector;\n }\n DebounceOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));\n };\n return DebounceOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DebounceSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DebounceSubscriber, _super);\n function DebounceSubscriber(destination, durationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.durationSelector = durationSelector;\n _this.hasValue = false;\n _this.durationSubscription = null;\n return _this;\n }\n DebounceSubscriber.prototype._next = function (value) {\n try {\n var 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 DebounceSubscriber.prototype._complete = function () {\n this.emitValue();\n this.destination.complete();\n };\n DebounceSubscriber.prototype._tryNext = function (value, duration) {\n var subscription = this.durationSubscription;\n this.value = value;\n this.hasValue = true;\n if (subscription) {\n subscription.unsubscribe();\n this.remove(subscription);\n }\n subscription = subscribeToResult(this, duration);\n if (subscription && !subscription.closed) {\n this.add(this.durationSubscription = subscription);\n }\n };\n DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.emitValue();\n };\n DebounceSubscriber.prototype.notifyComplete = function () {\n this.emitValue();\n };\n DebounceSubscriber.prototype.emitValue = function () {\n if (this.hasValue) {\n var value = this.value;\n var subscription = this.durationSubscription;\n if (subscription) {\n this.durationSubscription = null;\n subscription.unsubscribe();\n this.remove(subscription);\n }\n // This must be done *before* passing the value\n // along to the destination because it's possible for\n // the value to synchronously re-enter this operator\n // recursively if the duration selector Observable\n // emits synchronously\n this.value = null;\n this.hasValue = false;\n _super.prototype._next.call(this, value);\n }\n };\n return DebounceSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=debounce.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\n/**\n * Emits a value from the source Observable only after a particular time span\n * has passed without another source emission.\n *\n * <span class=\"informal\">It's like {@link delay}, but passes only the most\n * recent value from each burst of emissions.</span>\n *\n * <img src=\"./img/debounceTime.png\" width=\"100%\">\n *\n * `debounceTime` delays values emitted by the source Observable, but drops\n * previous pending delayed emissions if a new value arrives on the source\n * Observable. This operator keeps track of the most recent value from the\n * source Observable, and emits that only when `dueTime` enough time has passed\n * without any other value appearing on the source Observable. If a new value\n * appears before `dueTime` silence occurs, the previous value will be dropped\n * and will not be emitted on the output Observable.\n *\n * This is a rate-limiting operator, because it is impossible for more than one\n * value to be emitted in any time window of duration `dueTime`, but it is also\n * a delay-like operator since output emissions do not occur at the same time as\n * they did on the source Observable. Optionally takes a {@link IScheduler} for\n * managing timers.\n *\n * @example <caption>Emit the most recent click after a burst of clicks</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.debounceTime(1000);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link auditTime}\n * @see {@link debounce}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param {number} dueTime The timeout duration in milliseconds (or the time\n * unit determined internally by the optional `scheduler`) for the window of\n * time required to wait for emission silence before emitting the most recent\n * source value.\n * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the timeout for each value.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified `dueTime`, and may drop some values if they occur\n * too frequently.\n * @method debounceTime\n * @owner Observable\n */\nexport function debounceTime(dueTime, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };\n}\nvar DebounceTimeOperator = /*@__PURE__*/ (function () {\n function DebounceTimeOperator(dueTime, scheduler) {\n this.dueTime = dueTime;\n this.scheduler = scheduler;\n }\n DebounceTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));\n };\n return DebounceTimeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DebounceTimeSubscriber, _super);\n function DebounceTimeSubscriber(destination, dueTime, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.dueTime = dueTime;\n _this.scheduler = scheduler;\n _this.debouncedSubscription = null;\n _this.lastValue = null;\n _this.hasValue = false;\n return _this;\n }\n DebounceTimeSubscriber.prototype._next = function (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 DebounceTimeSubscriber.prototype._complete = function () {\n this.debouncedNext();\n this.destination.complete();\n };\n DebounceTimeSubscriber.prototype.debouncedNext = function () {\n this.clearDebounce();\n if (this.hasValue) {\n var lastValue = this.lastValue;\n // This must be done *before* passing the value\n // along to the destination because it's possible for\n // the value to synchronously re-enter this operator\n // recursively when scheduled with things like\n // VirtualScheduler/TestScheduler.\n this.lastValue = null;\n this.hasValue = false;\n this.destination.next(lastValue);\n }\n };\n DebounceTimeSubscriber.prototype.clearDebounce = function () {\n var debouncedSubscription = this.debouncedSubscription;\n if (debouncedSubscription !== null) {\n this.remove(debouncedSubscription);\n debouncedSubscription.unsubscribe();\n this.debouncedSubscription = null;\n }\n };\n return DebounceTimeSubscriber;\n}(Subscriber));\nfunction dispatchNext(subscriber) {\n subscriber.debouncedNext();\n}\n//# sourceMappingURL=debounceTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/* tslint:enable:max-line-length */\n/**\n * Emits a given value if the source Observable completes without emitting any\n * `next` value, otherwise mirrors the source Observable.\n *\n * <span class=\"informal\">If the source Observable turns out to be empty, then\n * this operator will emit a default value.</span>\n *\n * <img src=\"./img/defaultIfEmpty.png\" width=\"100%\">\n *\n * `defaultIfEmpty` emits the values emitted by the source Observable or a\n * specified default value if the source Observable is empty (completes without\n * having emitted any `next` value).\n *\n * @example <caption>If no clicks happen in 5 seconds, then emit \"no clicks\"</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var clicksBeforeFive = clicks.takeUntil(Rx.Observable.interval(5000));\n * var result = clicksBeforeFive.defaultIfEmpty('no clicks');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link empty}\n * @see {@link last}\n *\n * @param {any} [defaultValue=null] The default value used if the source\n * Observable is empty.\n * @return {Observable} An Observable that emits either the specified\n * `defaultValue` if the source Observable emits no items, or the values emitted\n * by the source Observable.\n * @method defaultIfEmpty\n * @owner Observable\n */\nexport function defaultIfEmpty(defaultValue) {\n if (defaultValue === void 0) {\n defaultValue = null;\n }\n return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };\n}\nvar DefaultIfEmptyOperator = /*@__PURE__*/ (function () {\n function DefaultIfEmptyOperator(defaultValue) {\n this.defaultValue = defaultValue;\n }\n DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));\n };\n return DefaultIfEmptyOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DefaultIfEmptySubscriber, _super);\n function DefaultIfEmptySubscriber(destination, defaultValue) {\n var _this = _super.call(this, destination) || this;\n _this.defaultValue = defaultValue;\n _this.isEmpty = true;\n return _this;\n }\n DefaultIfEmptySubscriber.prototype._next = function (value) {\n this.isEmpty = false;\n this.destination.next(value);\n };\n DefaultIfEmptySubscriber.prototype._complete = function () {\n if (this.isEmpty) {\n this.destination.next(this.defaultValue);\n }\n this.destination.complete();\n };\n return DefaultIfEmptySubscriber;\n}(Subscriber));\n//# sourceMappingURL=defaultIfEmpty.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\n/**\n * Delays the emission of items from the source Observable by a given timeout or\n * until a given Date.\n *\n * <span class=\"informal\">Time shifts each item by some specified amount of\n * milliseconds.</span>\n *\n * <img src=\"./img/delay.png\" width=\"100%\">\n *\n * If the delay argument is a Number, this operator time shifts the source\n * Observable by that amount of time expressed in milliseconds. The relative\n * time intervals between the values are preserved.\n *\n * If the delay argument is a Date, this operator time shifts the start of the\n * Observable execution until the given date occurs.\n *\n * @example <caption>Delay each click by one second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second\n * delayedClicks.subscribe(x => console.log(x));\n *\n * @example <caption>Delay all clicks until a future date happens</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var date = new Date('March 15, 2050 12:00:00'); // in the future\n * var delayedClicks = clicks.delay(date); // click emitted only after that date\n * delayedClicks.subscribe(x => console.log(x));\n *\n * @see {@link debounceTime}\n * @see {@link delayWhen}\n *\n * @param {number|Date} delay The delay duration in milliseconds (a `number`) or\n * a `Date` until which the emission of the source items is delayed.\n * @param {Scheduler} [scheduler=async] The IScheduler to use for\n * managing the timers that handle the time-shift for each item.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by the specified timeout or Date.\n * @method delay\n * @owner Observable\n */\nexport function delay(delay, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n var absoluteDelay = isDate(delay);\n var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };\n}\nvar DelayOperator = /*@__PURE__*/ (function () {\n function DelayOperator(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n DelayOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n };\n return DelayOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DelaySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DelaySubscriber, _super);\n function DelaySubscriber(destination, delay, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.delay = delay;\n _this.scheduler = scheduler;\n _this.queue = [];\n _this.active = false;\n _this.errored = false;\n return _this;\n }\n DelaySubscriber.dispatch = function (state) {\n var source = state.source;\n var queue = source.queue;\n var scheduler = state.scheduler;\n var 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 var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay_1);\n }\n else {\n source.active = false;\n }\n };\n DelaySubscriber.prototype._schedule = function (scheduler) {\n this.active = true;\n this.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n };\n DelaySubscriber.prototype.scheduleNotification = function (notification) {\n if (this.errored === true) {\n return;\n }\n var scheduler = this.scheduler;\n var 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 DelaySubscriber.prototype._next = function (value) {\n this.scheduleNotification(Notification.createNext(value));\n };\n DelaySubscriber.prototype._error = function (err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n };\n DelaySubscriber.prototype._complete = function () {\n this.scheduleNotification(Notification.createComplete());\n };\n return DelaySubscriber;\n}(Subscriber));\nvar DelayMessage = /*@__PURE__*/ (function () {\n function DelayMessage(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Observable } from '../Observable';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Delays the emission of items from the source Observable by a given time span\n * determined by the emissions of another Observable.\n *\n * <span class=\"informal\">It's like {@link delay}, but the time span of the\n * delay duration is determined by a second Observable.</span>\n *\n * <img src=\"./img/delayWhen.png\" width=\"100%\">\n *\n * `delayWhen` time shifts each emitted value from the source Observable by a\n * time span determined by another Observable. When the source emits a value,\n * the `delayDurationSelector` function is called with the source value as\n * argument, and should return an Observable, called the \"duration\" Observable.\n * The source value is emitted on the output Observable only when the duration\n * Observable emits a value or completes.\n *\n * Optionally, `delayWhen` takes a second argument, `subscriptionDelay`, which\n * is an Observable. When `subscriptionDelay` emits its first value or\n * completes, the source Observable is subscribed to and starts behaving like\n * described in the previous paragraph. If `subscriptionDelay` is not provided,\n * `delayWhen` will subscribe to the source Observable as soon as the output\n * Observable is subscribed.\n *\n * @example <caption>Delay each click by a random amount of time, between 0 and 5 seconds</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var delayedClicks = clicks.delayWhen(event =>\n * Rx.Observable.interval(Math.random() * 5000)\n * );\n * delayedClicks.subscribe(x => console.log(x));\n *\n * @see {@link debounce}\n * @see {@link delay}\n *\n * @param {function(value: T): Observable} delayDurationSelector A function that\n * returns an Observable for each value emitted by the source Observable, which\n * is then used to delay the emission of that item on the output Observable\n * until the Observable returned from this function emits a value.\n * @param {Observable} subscriptionDelay An Observable that triggers the\n * subscription to the source Observable once it emits any value.\n * @return {Observable} An Observable that delays the emissions of the source\n * Observable by an amount of time specified by the Observable returned by\n * `delayDurationSelector`.\n * @method delayWhen\n * @owner Observable\n */\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return function (source) {\n return new SubscriptionDelayObservable(source, subscriptionDelay)\n .lift(new DelayWhenOperator(delayDurationSelector));\n };\n }\n return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };\n}\nvar DelayWhenOperator = /*@__PURE__*/ (function () {\n function DelayWhenOperator(delayDurationSelector) {\n this.delayDurationSelector = delayDurationSelector;\n }\n DelayWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));\n };\n return DelayWhenOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DelayWhenSubscriber, _super);\n function DelayWhenSubscriber(destination, delayDurationSelector) {\n var _this = _super.call(this, destination) || this;\n _this.delayDurationSelector = delayDurationSelector;\n _this.completed = false;\n _this.delayNotifierSubscriptions = [];\n _this.values = [];\n return _this;\n }\n DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(outerValue);\n this.removeSubscription(innerSub);\n this.tryComplete();\n };\n DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {\n var value = this.removeSubscription(innerSub);\n if (value) {\n this.destination.next(value);\n }\n this.tryComplete();\n };\n DelayWhenSubscriber.prototype._next = function (value) {\n try {\n var delayNotifier = this.delayDurationSelector(value);\n if (delayNotifier) {\n this.tryDelay(delayNotifier, value);\n }\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n DelayWhenSubscriber.prototype._complete = function () {\n this.completed = true;\n this.tryComplete();\n };\n DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {\n subscription.unsubscribe();\n var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);\n var value = null;\n if (subscriptionIdx !== -1) {\n value = this.values[subscriptionIdx];\n this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);\n this.values.splice(subscriptionIdx, 1);\n }\n return value;\n };\n DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {\n var notifierSubscription = subscribeToResult(this, delayNotifier, value);\n if (notifierSubscription && !notifierSubscription.closed) {\n this.add(notifierSubscription);\n this.delayNotifierSubscriptions.push(notifierSubscription);\n }\n this.values.push(value);\n };\n DelayWhenSubscriber.prototype.tryComplete = function () {\n if (this.completed && this.delayNotifierSubscriptions.length === 0) {\n this.destination.complete();\n }\n };\n return DelayWhenSubscriber;\n}(OuterSubscriber));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubscriptionDelayObservable, _super);\n function SubscriptionDelayObservable(source, subscriptionDelay) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subscriptionDelay = subscriptionDelay;\n return _this;\n }\n /** @deprecated This is an internal implementation detail, do not use. */\n SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {\n this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));\n };\n return SubscriptionDelayObservable;\n}(Observable));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubscriptionDelaySubscriber, _super);\n function SubscriptionDelaySubscriber(parent, source) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.source = source;\n _this.sourceSubscribed = false;\n return _this;\n }\n SubscriptionDelaySubscriber.prototype._next = function (unused) {\n this.subscribeToSource();\n };\n SubscriptionDelaySubscriber.prototype._error = function (err) {\n this.unsubscribe();\n this.parent.error(err);\n };\n SubscriptionDelaySubscriber.prototype._complete = function () {\n this.subscribeToSource();\n };\n SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {\n if (!this.sourceSubscribed) {\n this.sourceSubscribed = true;\n this.unsubscribe();\n this.source.subscribe(this.parent);\n }\n };\n return SubscriptionDelaySubscriber;\n}(Subscriber));\n//# sourceMappingURL=delayWhen.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Converts an Observable of {@link Notification} objects into the emissions\n * that they represent.\n *\n * <span class=\"informal\">Unwraps {@link Notification} objects as actual `next`,\n * `error` and `complete` emissions. The opposite of {@link materialize}.</span>\n *\n * <img src=\"./img/dematerialize.png\" width=\"100%\">\n *\n * `dematerialize` is assumed to operate an Observable that only emits\n * {@link Notification} objects as `next` emissions, and does not emit any\n * `error`. Such Observable is the output of a `materialize` operation. Those\n * notifications are then unwrapped using the metadata they contain, and emitted\n * as `next`, `error`, and `complete` on the output Observable.\n *\n * Use this operator in conjunction with {@link materialize}.\n *\n * @example <caption>Convert an Observable of Notifications to an actual Observable</caption>\n * var notifA = new Rx.Notification('N', 'A');\n * var notifB = new Rx.Notification('N', 'B');\n * var notifE = new Rx.Notification('E', void 0,\n * new TypeError('x.toUpperCase is not a function')\n * );\n * var materialized = Rx.Observable.of(notifA, notifB, notifE);\n * var upperCase = materialized.dematerialize();\n * upperCase.subscribe(x => console.log(x), e => console.error(e));\n *\n * // Results in:\n * // A\n * // B\n * // TypeError: x.toUpperCase is not a function\n *\n * @see {@link Notification}\n * @see {@link materialize}\n *\n * @return {Observable} An Observable that emits items and notifications\n * embedded in Notification objects emitted by the source Observable.\n * @method dematerialize\n * @owner Observable\n */\nexport function dematerialize() {\n return function dematerializeOperatorFunction(source) {\n return source.lift(new DeMaterializeOperator());\n };\n}\nvar DeMaterializeOperator = /*@__PURE__*/ (function () {\n function DeMaterializeOperator() {\n }\n DeMaterializeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DeMaterializeSubscriber(subscriber));\n };\n return DeMaterializeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DeMaterializeSubscriber, _super);\n function DeMaterializeSubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n DeMaterializeSubscriber.prototype._next = function (value) {\n value.observe(this.destination);\n };\n return DeMaterializeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=dematerialize.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.\n *\n * If a keySelector function is provided, then it will project each value from the source observable into a new value that it will\n * check for equality with previously projected values. If a keySelector function is not provided, it will use each value from the\n * source observable directly with an equality check against previous values.\n *\n * In JavaScript runtimes that support `Set`, this operator will use a `Set` to improve performance of the distinct value checking.\n *\n * In other runtimes, this operator will use a minimal implementation of `Set` that relies on an `Array` and `indexOf` under the\n * hood, so performance will degrade as more values are checked for distinction. Even in newer browsers, a long-running `distinct`\n * use might result in memory leaks. To help alleviate this in some scenarios, an optional `flushes` parameter is also provided so\n * that the internal `Set` can be \"flushed\", basically clearing it of values.\n *\n * @example <caption>A simple example with numbers</caption>\n * Observable.of(1, 1, 2, 2, 2, 1, 2, 3, 4, 3, 2, 1)\n * .distinct()\n * .subscribe(x => console.log(x)); // 1, 2, 3, 4\n *\n * @example <caption>An example using a keySelector function</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'})\n * .distinct((p: Person) => p.name)\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n *\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n *\n * @param {function} [keySelector] Optional function to select which value you want to check as distinct.\n * @param {Observable} [flushes] Optional Observable for flushing the internal HashSet of the operator.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values.\n * @method distinct\n * @owner Observable\n */\nexport function distinct(keySelector, flushes) {\n return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };\n}\nvar DistinctOperator = /*@__PURE__*/ (function () {\n function DistinctOperator(keySelector, flushes) {\n this.keySelector = keySelector;\n this.flushes = flushes;\n }\n DistinctOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));\n };\n return DistinctOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DistinctSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DistinctSubscriber, _super);\n function DistinctSubscriber(destination, keySelector, flushes) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.values = new Set();\n if (flushes) {\n _this.add(subscribeToResult(_this, flushes));\n }\n return _this;\n }\n DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values.clear();\n };\n DistinctSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n DistinctSubscriber.prototype._next = function (value) {\n if (this.keySelector) {\n this._useKeySelector(value);\n }\n else {\n this._finalizeNext(value, value);\n }\n };\n DistinctSubscriber.prototype._useKeySelector = function (value) {\n var key;\n var destination = this.destination;\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 DistinctSubscriber.prototype._finalizeNext = function (key, value) {\n var values = this.values;\n if (!values.has(key)) {\n values.add(key);\n this.destination.next(value);\n }\n };\n return DistinctSubscriber;\n}(OuterSubscriber));\nexport { DistinctSubscriber };\n//# sourceMappingURL=distinct.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\n/* tslint:enable:max-line-length */\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.\n *\n * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.\n *\n * If a comparator function is not provided, an equality check is used by default.\n *\n * @example <caption>A simple example with numbers</caption>\n * Observable.of(1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 4)\n * .distinctUntilChanged()\n * .subscribe(x => console.log(x)); // 1, 2, 1, 2, 3, 4\n *\n * @example <caption>An example using a compare function</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'})\n * { age: 6, name: 'Foo'})\n * .distinctUntilChanged((p: Person, q: Person) => p.name === q.name)\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo' }\n *\n * @see {@link distinct}\n * @see {@link distinctUntilKeyChanged}\n *\n * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values.\n * @method distinctUntilChanged\n * @owner Observable\n */\nexport function distinctUntilChanged(compare, keySelector) {\n return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };\n}\nvar DistinctUntilChangedOperator = /*@__PURE__*/ (function () {\n function DistinctUntilChangedOperator(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n };\n return DistinctUntilChangedOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DistinctUntilChangedSubscriber, _super);\n function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.hasKey = false;\n if (typeof compare === 'function') {\n _this.compare = compare;\n }\n return _this;\n }\n DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n return x === y;\n };\n DistinctUntilChangedSubscriber.prototype._next = function (value) {\n var keySelector = this.keySelector;\n var key = value;\n if (keySelector) {\n key = tryCatch(this.keySelector)(value);\n if (key === errorObject) {\n return this.destination.error(errorObject.e);\n }\n }\n var result = false;\n if (this.hasKey) {\n result = tryCatch(this.compare)(this.key, key);\n if (result === errorObject) {\n return this.destination.error(errorObject.e);\n }\n }\n else {\n this.hasKey = true;\n }\n if (Boolean(result) === false) {\n this.key = key;\n this.destination.next(value);\n }\n };\n return DistinctUntilChangedSubscriber;\n}(Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map\n","/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */\nimport { distinctUntilChanged } from './distinctUntilChanged';\n/* tslint:enable:max-line-length */\n/**\n * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,\n * using a property accessed by using the key provided to check if the two items are distinct.\n *\n * If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.\n *\n * If a comparator function is not provided, an equality check is used by default.\n *\n * @example <caption>An example comparing the name of persons</caption>\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo'},\n * { age: 6, name: 'Foo'})\n * .distinctUntilKeyChanged('name')\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo' }\n *\n * @example <caption>An example comparing the first letters of the name</caption>\n *\n * interface Person {\n * age: number,\n * name: string\n * }\n *\n * Observable.of<Person>(\n * { age: 4, name: 'Foo1'},\n * { age: 7, name: 'Bar'},\n * { age: 5, name: 'Foo2'},\n * { age: 6, name: 'Foo3'})\n * .distinctUntilKeyChanged('name', (x: string, y: string) => x.substring(0, 3) === y.substring(0, 3))\n * .subscribe(x => console.log(x));\n *\n * // displays:\n * // { age: 4, name: 'Foo1' }\n * // { age: 7, name: 'Bar' }\n * // { age: 5, name: 'Foo2' }\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n *\n * @param {string} key String key for object property lookup on each item.\n * @param {function} [compare] Optional comparison function called to test if an item is distinct from the previous item in the source.\n * @return {Observable} An Observable that emits items from the source Observable with distinct values based on the key specified.\n * @method distinctUntilKeyChanged\n * @owner Observable\n */\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map\n","/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { filter } from './filter';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { take } from './take';\n/**\n * Emits the single value at the specified `index` in a sequence of emissions\n * from the source Observable.\n *\n * <span class=\"informal\">Emits only the i-th value, then completes.</span>\n *\n * <img src=\"./img/elementAt.png\" width=\"100%\">\n *\n * `elementAt` returns an Observable that emits the item at the specified\n * `index` in the source Observable, or a default value if that `index` is out\n * of range and the `default` argument is provided. If the `default` argument is\n * not given and the `index` is out of range, the output Observable will emit an\n * `ArgumentOutOfRangeError` error.\n *\n * @example <caption>Emit only the third click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.elementAt(2);\n * result.subscribe(x => console.log(x));\n *\n * // Results in:\n * // click 1 = nothing\n * // click 2 = nothing\n * // click 3 = MouseEvent object logged to console\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link skip}\n * @see {@link single}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0` or the\n * Observable has completed before emitting the i-th `next` notification.\n *\n * @param {number} index Is the number `i` for the i-th source emission that has\n * happened since the subscription, starting from the number `0`.\n * @param {T} [defaultValue] The default value returned for missing indices.\n * @return {Observable} An Observable that emits a single item, if it is found.\n * Otherwise, will emit the default value if given. If not, then emits an error.\n * @method elementAt\n * @owner Observable\n */\nexport function elementAt(index, defaultValue) {\n if (index < 0) {\n throw new ArgumentOutOfRangeError();\n }\n var hasDefaultValue = arguments.length >= 2;\n return function (source) {\n return source.pipe(filter(function (v, i) { return i === index; }), take(1), hasDefaultValue\n ? defaultIfEmpty(defaultValue)\n : throwIfEmpty(function () { return new ArgumentOutOfRangeError(); }));\n };\n}\n//# sourceMappingURL=elementAt.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Returns an Observable that emits whether or not every item of the source satisfies the condition specified.\n *\n * @example <caption>A simple example emitting true if all elements are less than 5, false otherwise</caption>\n * Observable.of(1, 2, 3, 4, 5, 6)\n * .every(x => x < 5)\n * .subscribe(x => console.log(x)); // -> false\n *\n * @param {function} predicate A function for determining if an item meets a specified condition.\n * @param {any} [thisArg] Optional object to use for `this` in the callback.\n * @return {Observable} An Observable of booleans that determines if all items of the source Observable meet the condition specified.\n * @method every\n * @owner Observable\n */\nexport function every(predicate, thisArg) {\n return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };\n}\nvar EveryOperator = /*@__PURE__*/ (function () {\n function EveryOperator(predicate, thisArg, source) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n this.source = source;\n }\n EveryOperator.prototype.call = function (observer, source) {\n return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));\n };\n return EveryOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar EverySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(EverySubscriber, _super);\n function EverySubscriber(destination, predicate, thisArg, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.source = source;\n _this.index = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {\n this.destination.next(everyValueMatch);\n this.destination.complete();\n };\n EverySubscriber.prototype._next = function (value) {\n var 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 EverySubscriber.prototype._complete = function () {\n this.notifyComplete(true);\n };\n return EverySubscriber;\n}(Subscriber));\n//# sourceMappingURL=every.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Converts a higher-order Observable into a first-order Observable by dropping\n * inner Observables while the previous inner Observable has not yet completed.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables by dropping the\n * next inner Observables while the current inner is still executing.</span>\n *\n * <img src=\"./img/exhaust.png\" width=\"100%\">\n *\n * `exhaust` subscribes to an Observable that emits Observables, also known as a\n * higher-order Observable. Each time it observes one of these emitted inner\n * Observables, the output Observable begins emitting the items emitted by that\n * inner Observable. So far, it behaves like {@link mergeAll}. However,\n * `exhaust` ignores every new inner Observable if the previous Observable has\n * not yet completed. Once that one completes, it will accept and flatten the\n * next inner Observable and repeat this process.\n *\n * @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(5));\n * var result = higherOrder.exhaust();\n * result.subscribe(x => console.log(x));\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link switch}\n * @see {@link mergeAll}\n * @see {@link exhaustMap}\n * @see {@link zipAll}\n *\n * @return {Observable} An Observable that takes a source of Observables and propagates the first observable\n * exclusively until it completes before subscribing to the next.\n * @method exhaust\n * @owner Observable\n */\nexport function exhaust() {\n return function (source) { return source.lift(new SwitchFirstOperator()); };\n}\nvar SwitchFirstOperator = /*@__PURE__*/ (function () {\n function SwitchFirstOperator() {\n }\n SwitchFirstOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchFirstSubscriber(subscriber));\n };\n return SwitchFirstOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SwitchFirstSubscriber, _super);\n function SwitchFirstSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasCompleted = false;\n _this.hasSubscription = false;\n return _this;\n }\n SwitchFirstSubscriber.prototype._next = function (value) {\n if (!this.hasSubscription) {\n this.hasSubscription = true;\n this.add(subscribeToResult(this, value));\n }\n };\n SwitchFirstSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n };\n SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {\n this.remove(innerSub);\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete();\n }\n };\n return SwitchFirstSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=exhaust.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { map } from './map';\nimport { from } from '../observable/from';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable only if the previous projected Observable has completed.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link exhaust}.</span>\n *\n * <img src=\"./img/exhaustMap.png\" width=\"100%\">\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. When it projects a source value to\n * an Observable, the output Observable begins emitting the items emitted by\n * that projected Observable. However, `exhaustMap` ignores every new projected\n * Observable if the previous projected Observable has not yet completed. Once\n * that one completes, it will accept and flatten the next projected Observable\n * and repeat this process.\n *\n * @example <caption>Run a finite timer for each click, only if there is no currently active timer</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.exhaustMap((ev) => Rx.Observable.interval(1000).take(5));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link concatMap}\n * @see {@link exhaust}\n * @see {@link mergeMap}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable containing projected Observables\n * of each item of the source, ignoring projected Observables that start before\n * their preceding Observable has completed.\n * @method exhaustMap\n * @owner Observable\n */\nexport function exhaustMap(project, resultSelector) {\n if (resultSelector) {\n // DEPRECATED PATH\n return function (source) { return source.pipe(exhaustMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) {\n return source.lift(new ExhauseMapOperator(project));\n };\n}\nvar ExhauseMapOperator = /*@__PURE__*/ (function () {\n function ExhauseMapOperator(project) {\n this.project = project;\n }\n ExhauseMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));\n };\n return ExhauseMapOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ExhaustMapSubscriber, _super);\n function ExhaustMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.hasSubscription = false;\n _this.hasCompleted = false;\n _this.index = 0;\n return _this;\n }\n ExhaustMapSubscriber.prototype._next = function (value) {\n if (!this.hasSubscription) {\n this.tryNext(value);\n }\n };\n ExhaustMapSubscriber.prototype.tryNext = function (value) {\n var index = this.index++;\n var destination = this.destination;\n try {\n var result = this.project(value, index);\n this.hasSubscription = true;\n this.add(subscribeToResult(this, result, value, index));\n }\n catch (err) {\n destination.error(err);\n }\n };\n ExhaustMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (!this.hasSubscription) {\n this.destination.complete();\n }\n };\n ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n ExhaustMapSubscriber.prototype.notifyError = function (err) {\n this.destination.error(err);\n };\n ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {\n this.remove(innerSub);\n this.hasSubscription = false;\n if (this.hasCompleted) {\n this.destination.complete();\n }\n };\n return ExhaustMapSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=exhaustMap.js.map\n","/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/* tslint:enable:max-line-length */\n/**\n * Recursively projects each source value to an Observable which is merged in\n * the output Observable.\n *\n * <span class=\"informal\">It's similar to {@link mergeMap}, but applies the\n * projection function to every source value as well as every output value.\n * It's recursive.</span>\n *\n * <img src=\"./img/expand.png\" width=\"100%\">\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an Observable, and then merging those resulting Observables and\n * emitting the results of this merger. *Expand* will re-emit on the output\n * Observable every source value. Then, each output value is given to the\n * `project` function which returns an inner Observable to be merged on the\n * output Observable. Those output values resulting from the projection are also\n * given to the `project` function to produce new output values. This is how\n * *expand* behaves recursively.\n *\n * @example <caption>Start emitting the powers of two on every click, at most 10 of them</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var powersOfTwo = clicks\n * .mapTo(1)\n * .expand(x => Rx.Observable.of(2 * x).delay(1000))\n * .take(10);\n * powersOfTwo.subscribe(x => console.log(x));\n *\n * @see {@link mergeMap}\n * @see {@link mergeScan}\n *\n * @param {function(value: T, index: number) => Observable} project A function\n * that, when applied to an item emitted by the source or the output Observable,\n * returns an Observable.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to\n * each projected inner Observable.\n * @return {Observable} An Observable that emits the source values and also\n * result of applying the projection function to each value emitted on the\n * output Observable and and merging the results of the Observables obtained\n * from this transformation.\n * @method expand\n * @owner Observable\n */\nexport function expand(project, concurrent, scheduler) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (scheduler === void 0) {\n scheduler = undefined;\n }\n concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;\n return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };\n}\nvar ExpandOperator = /*@__PURE__*/ (function () {\n function ExpandOperator(project, concurrent, scheduler) {\n this.project = project;\n this.concurrent = concurrent;\n this.scheduler = scheduler;\n }\n ExpandOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));\n };\n return ExpandOperator;\n}());\nexport { ExpandOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ExpandSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ExpandSubscriber, _super);\n function ExpandSubscriber(destination, project, concurrent, scheduler) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n ExpandSubscriber.dispatch = function (arg) {\n var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;\n subscriber.subscribeToProjection(result, value, index);\n };\n ExpandSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (destination.closed) {\n this._complete();\n return;\n }\n var index = this.index++;\n if (this.active < this.concurrent) {\n destination.next(value);\n var result = tryCatch(this.project)(value, index);\n if (result === errorObject) {\n destination.error(errorObject.e);\n }\n else if (!this.scheduler) {\n this.subscribeToProjection(result, value, index);\n }\n else {\n var state = { subscriber: this, result: result, value: value, index: index };\n this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));\n }\n }\n else {\n this.buffer.push(value);\n }\n };\n ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {\n this.active++;\n this.add(subscribeToResult(this, result, value, index));\n };\n ExpandSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.hasCompleted && this.active === 0) {\n this.destination.complete();\n }\n };\n ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this._next(innerValue);\n };\n ExpandSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\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 return ExpandSubscriber;\n}(OuterSubscriber));\nexport { ExpandSubscriber };\n//# sourceMappingURL=expand.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/* tslint:enable:max-line-length */\n/**\n * Filter items emitted by the source Observable by only emitting those that\n * satisfy a specified predicate.\n *\n * <span class=\"informal\">Like\n * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),\n * it only emits a value from the source if it passes a criterion function.</span>\n *\n * <img src=\"./img/filter.png\" width=\"100%\">\n *\n * Similar to the well-known `Array.prototype.filter` method, this operator\n * takes values from the source Observable, passes them through a `predicate`\n * function and only emits those values that yielded `true`.\n *\n * @example <caption>Emit only click events whose target was a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');\n * clicksOnDivs.subscribe(x => console.log(x));\n *\n * @see {@link distinct}\n * @see {@link distinctUntilChanged}\n * @see {@link distinctUntilKeyChanged}\n * @see {@link ignoreElements}\n * @see {@link partition}\n * @see {@link skip}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted, if `false` the value is not passed to the output\n * Observable. The `index` parameter is the number `i` for the i-th source\n * emission that has happened since the subscription, starting from the number\n * `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of values from the source that were\n * allowed by the `predicate` function.\n * @method filter\n * @owner Observable\n */\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nvar FilterOperator = /*@__PURE__*/ (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FilterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n // the try catch block below is left specifically for\n // optimization and perf reasons. a tryCatcher is not necessary here.\n FilterSubscriber.prototype._next = function (value) {\n var 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 return FilterSubscriber;\n}(Subscriber));\n//# sourceMappingURL=filter.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\n/**\n * Returns an Observable that mirrors the source Observable, but will call a specified function when\n * the source terminates on complete or error.\n * @param {function} callback Function to be called when source terminates.\n * @return {Observable} An Observable that mirrors the source, but will call the specified function on termination.\n * @method finally\n * @owner Observable\n */\nexport function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Emits only the first value emitted by the source Observable that meets some\n * condition.\n *\n * <span class=\"informal\">Finds the first value that passes some test and emits\n * that.</span>\n *\n * <img src=\"./img/find.png\" width=\"100%\">\n *\n * `find` searches for the first item in the source Observable that matches the\n * specified condition embodied by the `predicate`, and returns the first\n * occurrence in the source. Unlike {@link first}, the `predicate` is required\n * in `find`, and does not emit an error if a valid value is not found.\n *\n * @example <caption>Find and emit the first click that happens on a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.find(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link filter}\n * @see {@link first}\n * @see {@link findIndex}\n * @see {@link take}\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} predicate\n * A function called with each item to test for condition matching.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable<T>} An Observable of the first item that matches the\n * condition.\n * @method find\n * @owner Observable\n */\nexport function find(predicate, thisArg) {\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate is not a function');\n }\n return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };\n}\nvar FindValueOperator = /*@__PURE__*/ (function () {\n function FindValueOperator(predicate, source, yieldIndex, thisArg) {\n this.predicate = predicate;\n this.source = source;\n this.yieldIndex = yieldIndex;\n this.thisArg = thisArg;\n }\n FindValueOperator.prototype.call = function (observer, source) {\n return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));\n };\n return FindValueOperator;\n}());\nexport { FindValueOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar FindValueSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FindValueSubscriber, _super);\n function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.yieldIndex = yieldIndex;\n _this.thisArg = thisArg;\n _this.index = 0;\n return _this;\n }\n FindValueSubscriber.prototype.notifyComplete = function (value) {\n var destination = this.destination;\n destination.next(value);\n destination.complete();\n };\n FindValueSubscriber.prototype._next = function (value) {\n var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;\n var index = this.index++;\n try {\n var 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 FindValueSubscriber.prototype._complete = function () {\n this.notifyComplete(this.yieldIndex ? -1 : undefined);\n };\n return FindValueSubscriber;\n}(Subscriber));\nexport { FindValueSubscriber };\n//# sourceMappingURL=find.js.map\n","/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */\nimport { FindValueOperator } from '../operators/find';\n/**\n * Emits only the index of the first value emitted by the source Observable that\n * meets some condition.\n *\n * <span class=\"informal\">It's like {@link find}, but emits the index of the\n * found value, not the value itself.</span>\n *\n * <img src=\"./img/findIndex.png\" width=\"100%\">\n *\n * `findIndex` searches for the first item in the source Observable that matches\n * the specified condition embodied by the `predicate`, and returns the\n * (zero-based) index of the first occurrence in the source. Unlike\n * {@link first}, the `predicate` is required in `findIndex`, and does not emit\n * an error if a valid value is not found.\n *\n * @example <caption>Emit the index of first click that happens on a DIV element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.findIndex(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link first}\n * @see {@link take}\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} predicate\n * A function called with each item to test for condition matching.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {Observable} An Observable of the index of the first item that\n * matches the condition.\n * @method find\n * @owner Observable\n */\nexport function findIndex(predicate, thisArg) {\n return function (source) { return source.lift(new FindValueOperator(predicate, source, true, thisArg)); };\n}\n//# sourceMappingURL=findIndex.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { 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';\n/**\n * Emits only the first value (or the first value that meets some condition)\n * emitted by the source Observable.\n *\n * <span class=\"informal\">Emits only the first value. Or emits only the first\n * value that passes some test.</span>\n *\n * <img src=\"./img/first.png\" width=\"100%\">\n *\n * If called with no arguments, `first` emits the first value of the source\n * Observable, then completes. If called with a `predicate` function, `first`\n * emits the first value of the source that matches the specified condition. It\n * may also take a `resultSelector` function to produce the output value from\n * the input value, and a `defaultValue` to emit in case the source completes\n * before it is able to emit a valid value. Throws an error if `defaultValue`\n * was not provided and a matching element is not found.\n *\n * @example <caption>Emit only the first click that happens on the DOM</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first();\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Emits the first click that happens on a DIV</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.first(ev => ev.target.tagName === 'DIV');\n * result.subscribe(x => console.log(x));\n *\n * @see {@link filter}\n * @see {@link find}\n * @see {@link take}\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n *\n * @param {function(value: T, index: number, source: Observable<T>): boolean} [predicate]\n * An optional function called with each item to test for condition matching.\n * @param {R} [defaultValue] The default value emitted in case no valid value\n * was found on the source.\n * @return {Observable<T|R>} An Observable of the first item that matches the\n * condition.\n * @method first\n * @owner Observable\n */\nexport function first(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=first.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { Observable } from '../Observable';\nimport { Subject } from '../Subject';\n/* tslint:enable:max-line-length */\n/**\n * Groups the items emitted by an Observable according to a specified criterion,\n * and emits these grouped items as `GroupedObservables`, one\n * {@link GroupedObservable} per group.\n *\n * <img src=\"./img/groupBy.png\" width=\"100%\">\n *\n * @example <caption>Group objects by id and return as array</caption>\n * Observable.of<Obj>({id: 1, name: 'aze1'},\n * {id: 2, name: 'sf2'},\n * {id: 2, name: 'dg2'},\n * {id: 1, name: 'erg1'},\n * {id: 1, name: 'df1'},\n * {id: 2, name: 'sfqfb2'},\n * {id: 3, name: 'qfs3'},\n * {id: 2, name: 'qsgqsfg2'}\n * )\n * .groupBy(p => p.id)\n * .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], []))\n * .subscribe(p => console.log(p));\n *\n * // displays:\n * // [ { id: 1, name: 'aze1' },\n * // { id: 1, name: 'erg1' },\n * // { id: 1, name: 'df1' } ]\n * //\n * // [ { id: 2, name: 'sf2' },\n * // { id: 2, name: 'dg2' },\n * // { id: 2, name: 'sfqfb2' },\n * // { id: 2, name: 'qsgqsfg2' } ]\n * //\n * // [ { id: 3, name: 'qfs3' } ]\n *\n * @example <caption>Pivot data on the id field</caption>\n * Observable.of<Obj>({id: 1, name: 'aze1'},\n * {id: 2, name: 'sf2'},\n * {id: 2, name: 'dg2'},\n * {id: 1, name: 'erg1'},\n * {id: 1, name: 'df1'},\n * {id: 2, name: 'sfqfb2'},\n * {id: 3, name: 'qfs1'},\n * {id: 2, name: 'qsgqsfg2'}\n * )\n * .groupBy(p => p.id, p => p.name)\n * .flatMap( (group$) => group$.reduce((acc, cur) => [...acc, cur], [\"\" + group$.key]))\n * .map(arr => ({'id': parseInt(arr[0]), 'values': arr.slice(1)}))\n * .subscribe(p => console.log(p));\n *\n * // displays:\n * // { id: 1, values: [ 'aze1', 'erg1', 'df1' ] }\n * // { id: 2, values: [ 'sf2', 'dg2', 'sfqfb2', 'qsgqsfg2' ] }\n * // { id: 3, values: [ 'qfs1' ] }\n *\n * @param {function(value: T): K} keySelector A function that extracts the key\n * for each item.\n * @param {function(value: T): R} [elementSelector] A function that extracts the\n * return element for each item.\n * @param {function(grouped: GroupedObservable<K,R>): Observable<any>} [durationSelector]\n * A function that returns an Observable to determine how long each group should\n * exist.\n * @return {Observable<GroupedObservable<K,R>>} An Observable that emits\n * GroupedObservables, each of which corresponds to a unique key value and each\n * of which emits those items from the source Observable that share that key\n * value.\n * @method groupBy\n * @owner Observable\n */\nexport function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {\n return function (source) {\n return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));\n };\n}\nvar GroupByOperator = /*@__PURE__*/ (function () {\n function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {\n this.keySelector = keySelector;\n this.elementSelector = elementSelector;\n this.durationSelector = durationSelector;\n this.subjectSelector = subjectSelector;\n }\n GroupByOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));\n };\n return GroupByOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar GroupBySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(GroupBySubscriber, _super);\n function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n GroupBySubscriber.prototype._next = function (value) {\n var 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 GroupBySubscriber.prototype._group = function (value, key) {\n var groups = this.groups;\n if (!groups) {\n groups = this.groups = new Map();\n }\n var group = groups.get(key);\n var 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 var groupedObservable = new GroupedObservable(key, group, this);\n this.destination.next(groupedObservable);\n if (this.durationSelector) {\n var duration = void 0;\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 GroupBySubscriber.prototype._error = function (err) {\n var groups = this.groups;\n if (groups) {\n groups.forEach(function (group, key) {\n group.error(err);\n });\n groups.clear();\n }\n this.destination.error(err);\n };\n GroupBySubscriber.prototype._complete = function () {\n var groups = this.groups;\n if (groups) {\n groups.forEach(function (group, key) {\n group.complete();\n });\n groups.clear();\n }\n this.destination.complete();\n };\n GroupBySubscriber.prototype.removeGroup = function (key) {\n this.groups.delete(key);\n };\n GroupBySubscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.attemptedToUnsubscribe = true;\n if (this.count === 0) {\n _super.prototype.unsubscribe.call(this);\n }\n }\n };\n return GroupBySubscriber;\n}(Subscriber));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(GroupDurationSubscriber, _super);\n function GroupDurationSubscriber(key, group, parent) {\n var _this = _super.call(this, group) || this;\n _this.key = key;\n _this.group = group;\n _this.parent = parent;\n return _this;\n }\n GroupDurationSubscriber.prototype._next = function (value) {\n this.complete();\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n GroupDurationSubscriber.prototype._unsubscribe = function () {\n var _a = this, parent = _a.parent, key = _a.key;\n this.key = this.parent = null;\n if (parent) {\n parent.removeGroup(key);\n }\n };\n return GroupDurationSubscriber;\n}(Subscriber));\n/**\n * An Observable representing values belonging to the same group represented by\n * a common key. The values emitted by a GroupedObservable come from the source\n * Observable. The common key is available as the field `key` on a\n * GroupedObservable instance.\n *\n * @class GroupedObservable<K, T>\n */\nvar GroupedObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(GroupedObservable, _super);\n /** @deprecated Do not construct this type. Internal use only */\n function GroupedObservable(key, groupSubject, refCountSubscription) {\n var _this = _super.call(this) || this;\n _this.key = key;\n _this.groupSubject = groupSubject;\n _this.refCountSubscription = refCountSubscription;\n return _this;\n }\n /** @deprecated This is an internal implementation detail, do not use. */\n GroupedObservable.prototype._subscribe = function (subscriber) {\n var subscription = new Subscription();\n var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;\n if (refCountSubscription && !refCountSubscription.closed) {\n subscription.add(new InnerRefCountSubscription(refCountSubscription));\n }\n subscription.add(groupSubject.subscribe(subscriber));\n return subscription;\n };\n return GroupedObservable;\n}(Observable));\nexport { GroupedObservable };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(InnerRefCountSubscription, _super);\n function InnerRefCountSubscription(parent) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n parent.count++;\n return _this;\n }\n InnerRefCountSubscription.prototype.unsubscribe = function () {\n var parent = this.parent;\n if (!parent.closed && !this.closed) {\n _super.prototype.unsubscribe.call(this);\n parent.count -= 1;\n if (parent.count === 0 && parent.attemptedToUnsubscribe) {\n parent.unsubscribe();\n }\n }\n };\n return InnerRefCountSubscription;\n}(Subscription));\n//# sourceMappingURL=groupBy.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.\n *\n * <img src=\"./img/ignoreElements.png\" width=\"100%\">\n *\n * @return {Observable} An empty Observable that only calls `complete`\n * or `error`, based on which one is called by the source Observable.\n * @method ignoreElements\n * @owner Observable\n */\nexport function ignoreElements() {\n return function ignoreElementsOperatorFunction(source) {\n return source.lift(new IgnoreElementsOperator());\n };\n}\nvar IgnoreElementsOperator = /*@__PURE__*/ (function () {\n function IgnoreElementsOperator() {\n }\n IgnoreElementsOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new IgnoreElementsSubscriber(subscriber));\n };\n return IgnoreElementsOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(IgnoreElementsSubscriber, _super);\n function IgnoreElementsSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n IgnoreElementsSubscriber.prototype._next = function (unused) {\n // Do nothing\n };\n return IgnoreElementsSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ignoreElements.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function isEmpty() {\n return function (source) { return source.lift(new IsEmptyOperator()); };\n}\nvar IsEmptyOperator = /*@__PURE__*/ (function () {\n function IsEmptyOperator() {\n }\n IsEmptyOperator.prototype.call = function (observer, source) {\n return source.subscribe(new IsEmptySubscriber(observer));\n };\n return IsEmptyOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar IsEmptySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(IsEmptySubscriber, _super);\n function IsEmptySubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {\n var destination = this.destination;\n destination.next(isEmpty);\n destination.complete();\n };\n IsEmptySubscriber.prototype._next = function (value) {\n this.notifyComplete(false);\n };\n IsEmptySubscriber.prototype._complete = function () {\n this.notifyComplete(true);\n };\n return IsEmptySubscriber;\n}(Subscriber));\n//# sourceMappingURL=isEmpty.js.map\n","/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */\nimport { 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';\n/**\n * Returns an Observable that emits only the last item emitted by the source Observable.\n * It optionally takes a predicate function as a parameter, in which case, rather than emitting\n * the last item from the source Observable, the resulting Observable will emit the last item\n * from the source Observable that satisfies the predicate.\n *\n * <img src=\"./img/last.png\" width=\"100%\">\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * @param {function} [predicate] - The condition any source emitted item has to satisfy.\n * @param {any} [defaultValue] - An optional default value to provide if last\n * predicate isn't met or no values were emitted.\n * @return {Observable} An Observable that emits only the last item satisfying the given condition\n * from the source, or an NoSuchElementException if no such items are emitted.\n * @throws - Throws if no items that match the predicate are emitted by the source Observable.\n */\nexport function last(predicate, defaultValue) {\n var hasDefaultValue = arguments.length >= 2;\n return function (source) { return source.pipe(predicate ? filter(function (v, i) { return predicate(v, i, source); }) : identity, takeLast(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(function () { return new EmptyError(); })); };\n}\n//# sourceMappingURL=last.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Applies a given `project` function to each value emitted by the source\n * Observable, and emits the resulting values as an Observable.\n *\n * <span class=\"informal\">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),\n * it passes each source value through a transformation function to get\n * corresponding output values.</span>\n *\n * <img src=\"./img/map.png\" width=\"100%\">\n *\n * Similar to the well known `Array.prototype.map` function, this operator\n * applies a projection to each value and emits that projection in the output\n * Observable.\n *\n * @example <caption>Map every click to the clientX position of that click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks.map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link mapTo}\n * @see {@link pluck}\n *\n * @param {function(value: T, index: number): R} project The function to apply\n * to each `value` emitted by the source Observable. The `index` parameter is\n * the number `i` for the i-th emission that has happened since the\n * subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to define what `this` is in the\n * `project` function.\n * @return {Observable<R>} An Observable that emits the values from the source\n * Observable transformed by the given `project` function.\n * @method map\n * @owner Observable\n */\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}\nvar MapOperator = /*@__PURE__*/ (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexport { MapOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n // NOTE: This looks unoptimized, but it's actually purposefully NOT\n // using try/catch optimizations.\n MapSubscriber.prototype._next = function (value) {\n var 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 return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Emits the given constant value on the output Observable every time the source\n * Observable emits a value.\n *\n * <span class=\"informal\">Like {@link map}, but it maps every source value to\n * the same output value every time.</span>\n *\n * <img src=\"./img/mapTo.png\" width=\"100%\">\n *\n * Takes a constant `value` as argument, and emits that whenever the source\n * Observable emits a value. In other words, ignores the actual source value,\n * and simply uses the emission moment to know when to emit the given `value`.\n *\n * @example <caption>Map every click to the string 'Hi'</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var greetings = clicks.mapTo('Hi');\n * greetings.subscribe(x => console.log(x));\n *\n * @see {@link map}\n *\n * @param {any} value The value to map each source value to.\n * @return {Observable} An Observable that emits the given `value` every time\n * the source Observable emits something.\n * @method mapTo\n * @owner Observable\n */\nexport function mapTo(value) {\n return function (source) { return source.lift(new MapToOperator(value)); };\n}\nvar MapToOperator = /*@__PURE__*/ (function () {\n function MapToOperator(value) {\n this.value = value;\n }\n MapToOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n };\n return MapToOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MapToSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapToSubscriber, _super);\n function MapToSubscriber(destination, value) {\n var _this = _super.call(this, destination) || this;\n _this.value = value;\n return _this;\n }\n MapToSubscriber.prototype._next = function (x) {\n this.destination.next(this.value);\n };\n return MapToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=mapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\n/**\n * Represents all of the notifications from the source Observable as `next`\n * emissions marked with their original types within {@link Notification}\n * objects.\n *\n * <span class=\"informal\">Wraps `next`, `error` and `complete` emissions in\n * {@link Notification} objects, emitted as `next` on the output Observable.\n * </span>\n *\n * <img src=\"./img/materialize.png\" width=\"100%\">\n *\n * `materialize` returns an Observable that emits a `next` notification for each\n * `next`, `error`, or `complete` emission of the source Observable. When the\n * source Observable emits `complete`, the output Observable will emit `next` as\n * a Notification of type \"complete\", and then it will emit `complete` as well.\n * When the source Observable emits `error`, the output will emit `next` as a\n * Notification of type \"error\", and then `complete`.\n *\n * This operator is useful for producing metadata of the source Observable, to\n * be consumed as `next` emissions. Use it in conjunction with\n * {@link dematerialize}.\n *\n * @example <caption>Convert a faulty Observable to an Observable of Notifications</caption>\n * var letters = Rx.Observable.of('a', 'b', 13, 'd');\n * var upperCase = letters.map(x => x.toUpperCase());\n * var materialized = upperCase.materialize();\n * materialized.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // - Notification {kind: \"N\", value: \"A\", error: undefined, hasValue: true}\n * // - Notification {kind: \"N\", value: \"B\", error: undefined, hasValue: true}\n * // - Notification {kind: \"E\", value: undefined, error: TypeError:\n * // x.toUpperCase is not a function at MapSubscriber.letters.map.x\n * // [as project] (http://1…, hasValue: false}\n *\n * @see {@link Notification}\n * @see {@link dematerialize}\n *\n * @return {Observable<Notification<T>>} An Observable that emits\n * {@link Notification} objects that wrap the original emissions from the source\n * Observable with metadata.\n * @method materialize\n * @owner Observable\n */\nexport function materialize() {\n return function materializeOperatorFunction(source) {\n return source.lift(new MaterializeOperator());\n };\n}\nvar MaterializeOperator = /*@__PURE__*/ (function () {\n function MaterializeOperator() {\n }\n MaterializeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MaterializeSubscriber(subscriber));\n };\n return MaterializeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MaterializeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MaterializeSubscriber, _super);\n function MaterializeSubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n MaterializeSubscriber.prototype._next = function (value) {\n this.destination.next(Notification.createNext(value));\n };\n MaterializeSubscriber.prototype._error = function (err) {\n var destination = this.destination;\n destination.next(Notification.createError(err));\n destination.complete();\n };\n MaterializeSubscriber.prototype._complete = function () {\n var destination = this.destination;\n destination.next(Notification.createComplete());\n destination.complete();\n };\n return MaterializeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=materialize.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { reduce } from './reduce';\n/**\n * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function),\n * and when source Observable completes it emits a single item: the item with the largest value.\n *\n * <img src=\"./img/max.png\" width=\"100%\">\n *\n * @example <caption>Get the maximal value of a series of numbers</caption>\n * Rx.Observable.of(5, 4, 7, 2, 8)\n * .max()\n * .subscribe(x => console.log(x)); // -> 8\n *\n * @example <caption>Use a comparer function to get the maximal item</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n * Observable.of<Person>({age: 7, name: 'Foo'},\n * {age: 5, name: 'Bar'},\n * {age: 9, name: 'Beer'})\n * .max<Person>((a: Person, b: Person) => a.age < b.age ? -1 : 1)\n * .subscribe((x: Person) => console.log(x.name)); // -> 'Beer'\n * }\n *\n * @see {@link min}\n *\n * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the\n * value of two items.\n * @return {Observable} An Observable that emits item with the largest value.\n * @method max\n * @owner Observable\n */\nexport function max(comparer) {\n var max = (typeof comparer === 'function')\n ? function (x, y) { return comparer(x, y) > 0 ? x : y; }\n : function (x, y) { return x > y ? x : y; };\n return reduce(max);\n}\n//# sourceMappingURL=max.js.map\n","/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */\nimport { merge as mergeStatic } from '../observable/merge';\n/* tslint:enable:max-line-length */\n/**\n * @deprecated Deprecated in favor of static merge.\n */\nexport function merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function (source) { return source.lift.call(mergeStatic.apply(void 0, [source].concat(observables))); };\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\n/**\n * Converts a higher-order Observable into a first-order Observable which\n * concurrently delivers all values that are emitted on the inner Observables.\n *\n * <span class=\"informal\">Flattens an Observable-of-Observables.</span>\n *\n * <img src=\"./img/mergeAll.png\" width=\"100%\">\n *\n * `mergeAll` subscribes to an Observable that emits Observables, also known as\n * a higher-order Observable. Each time it observes one of these emitted inner\n * Observables, it subscribes to that and delivers all the values from the\n * inner Observable on the output Observable. The output Observable only\n * completes once all inner Observables have completed. Any error delivered by\n * a inner Observable will be immediately emitted on the output Observable.\n *\n * @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));\n * var firstOrder = higherOrder.mergeAll();\n * firstOrder.subscribe(x => console.log(x));\n *\n * @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));\n * var firstOrder = higherOrder.mergeAll(2);\n * firstOrder.subscribe(x => console.log(x));\n *\n * @see {@link combineAll}\n * @see {@link concatAll}\n * @see {@link exhaust}\n * @see {@link merge}\n * @see {@link mergeMap}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switch}\n * @see {@link zipAll}\n *\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits values coming from all the\n * inner Observables emitted by the source Observable.\n * @method mergeAll\n * @owner Observable\n */\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map\n","/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { map } from './map';\nimport { from } from '../observable/from';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link mergeAll}.</span>\n *\n * <img src=\"./img/mergeMap.png\" width=\"100%\">\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an Observable, and then merging those resulting Observables and\n * emitting the results of this merger.\n *\n * @example <caption>Map and flatten each letter to an Observable ticking every 1 second</caption>\n * var letters = Rx.Observable.of('a', 'b', 'c');\n * var result = letters.mergeMap(x =>\n * Rx.Observable.interval(1000).map(i => x+i)\n * );\n * result.subscribe(x => console.log(x));\n *\n * // Results in the following:\n * // a0\n * // b0\n * // c0\n * // a1\n * // b1\n * // c1\n * // continues to list a,b,c with respective ascending integers\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMapTo}\n * @see {@link mergeScan}\n * @see {@link switchMap}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional `resultSelector`) to each item emitted\n * by the source Observable and merging the results of the Observables obtained\n * from this transformation.\n * @method mergeMap\n * @owner Observable\n */\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\n // DEPRECATED PATH\n return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nvar MergeMapOperator = /*@__PURE__*/ (function () {\n function MergeMapOperator(project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n this.project = project;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexport { MergeMapOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MergeMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var 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, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n this.add(subscribeToResult(this, ish, value, index));\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\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 return MergeMapSubscriber;\n}(OuterSubscriber));\nexport { MergeMapSubscriber };\n//# sourceMappingURL=mergeMap.js.map\n","/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to the same Observable which is merged multiple\n * times in the output Observable.\n *\n * <span class=\"informal\">It's like {@link mergeMap}, but maps each value always\n * to the same inner Observable.</span>\n *\n * <img src=\"./img/mergeMapTo.png\" width=\"100%\">\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then merges those resulting Observables into one\n * single Observable, which is the output Observable.\n *\n * @example <caption>For each click event, start an interval Observable ticking every 1 second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.mergeMapTo(Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link concatMapTo}\n * @see {@link merge}\n * @see {@link mergeAll}\n * @see {@link mergeMap}\n * @see {@link mergeScan}\n * @see {@link switchMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input\n * Observables being subscribed to concurrently.\n * @return {Observable} An Observable that emits items from the given\n * `innerObservable`\n * @method mergeMapTo\n * @owner Observable\n */\nexport function mergeMapTo(innerObservable, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\n return mergeMap(function () { return innerObservable; }, resultSelector, concurrent);\n }\n if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return mergeMap(function () { return innerObservable; }, concurrent);\n}\n//# sourceMappingURL=mergeMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_util_tryCatch,_util_errorObject,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\n/**\n * Applies an accumulator function over the source Observable where the\n * accumulator function itself returns an Observable, then each intermediate\n * Observable returned is merged into the output Observable.\n *\n * <span class=\"informal\">It's like {@link scan}, but the Observables returned\n * by the accumulator are merged into the outer Observable.</span>\n *\n * @example <caption>Count the number of click events</caption>\n * const click$ = Rx.Observable.fromEvent(document, 'click');\n * const one$ = click$.mapTo(1);\n * const seed = 0;\n * const count$ = one$.mergeScan((acc, one) => Rx.Observable.of(acc + one), seed);\n * count$.subscribe(x => console.log(x));\n *\n * // Results:\n * 1\n * 2\n * 3\n * 4\n * // ...and so on for each click\n *\n * @param {function(acc: R, value: T): Observable<R>} accumulator\n * The accumulator function called on each source value.\n * @param seed The initial accumulation value.\n * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of\n * input Observables being subscribed to concurrently.\n * @return {Observable<R>} An observable of the accumulated values.\n * @method mergeScan\n * @owner Observable\n */\nexport function mergeScan(accumulator, seed, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };\n}\nvar MergeScanOperator = /*@__PURE__*/ (function () {\n function MergeScanOperator(accumulator, seed, concurrent) {\n this.accumulator = accumulator;\n this.seed = seed;\n this.concurrent = concurrent;\n }\n MergeScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));\n };\n return MergeScanOperator;\n}());\nexport { MergeScanOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar MergeScanSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MergeScanSubscriber, _super);\n function MergeScanSubscriber(destination, accumulator, acc, concurrent) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n MergeScanSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n var index = this.index++;\n var ish = tryCatch(this.accumulator)(this.acc, value);\n var destination = this.destination;\n if (ish === errorObject) {\n destination.error(errorObject.e);\n }\n else {\n this.active++;\n this._innerSub(ish, value, index);\n }\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {\n this.add(subscribeToResult(this, ish, value, index));\n };\n MergeScanSubscriber.prototype._complete = function () {\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 };\n MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var destination = this.destination;\n this.acc = innerValue;\n this.hasValue = true;\n destination.next(innerValue);\n };\n MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\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 return MergeScanSubscriber;\n}(OuterSubscriber));\nexport { MergeScanSubscriber };\n//# sourceMappingURL=mergeScan.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { reduce } from './reduce';\n/**\n * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function),\n * and when source Observable completes it emits a single item: the item with the smallest value.\n *\n * <img src=\"./img/min.png\" width=\"100%\">\n *\n * @example <caption>Get the minimal value of a series of numbers</caption>\n * Rx.Observable.of(5, 4, 7, 2, 8)\n * .min()\n * .subscribe(x => console.log(x)); // -> 2\n *\n * @example <caption>Use a comparer function to get the minimal item</caption>\n * interface Person {\n * age: number,\n * name: string\n * }\n * Observable.of<Person>({age: 7, name: 'Foo'},\n * {age: 5, name: 'Bar'},\n * {age: 9, name: 'Beer'})\n * .min<Person>( (a: Person, b: Person) => a.age < b.age ? -1 : 1)\n * .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'\n * }\n *\n * @see {@link max}\n *\n * @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the\n * value of two items.\n * @return {Observable<R>} An Observable that emits item with the smallest value.\n * @method min\n * @owner Observable\n */\nexport function min(comparer) {\n var min = (typeof comparer === 'function')\n ? function (x, y) { return comparer(x, y) < 0 ? x : y; }\n : function (x, y) { return x < y ? x : y; };\n return reduce(min);\n}\n//# sourceMappingURL=min.js.map\n","/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */\nimport { connectableObservableDescriptor } from '../observable/ConnectableObservable';\n/* tslint:enable:max-line-length */\n/**\n * Returns an Observable that emits the results of invoking a specified selector on items\n * emitted by a ConnectableObservable that shares a single subscription to the underlying stream.\n *\n * <img src=\"./img/multicast.png\" width=\"100%\">\n *\n * @param {Function|Subject} subjectOrSubjectFactory - Factory function to create an intermediate subject through\n * which the source sequence's elements will be multicast to the selector function\n * or Subject to push source elements into.\n * @param {Function} [selector] - Optional selector function that can use the multicasted source stream\n * as many times as needed, without causing multiple subscriptions to the source stream.\n * Subscribers to the given source will receive all notifications of the source from the\n * time of the subscription forward.\n * @return {Observable} An Observable that emits the results of invoking the selector\n * on the items emitted by a `ConnectableObservable` that shares a single subscription to\n * the underlying stream.\n * @method multicast\n * @owner Observable\n */\nexport function multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var 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 var connectable = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nvar MulticastOperator = /*@__PURE__*/ (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexport { MulticastOperator };\n//# sourceMappingURL=multicast.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\n/**\n *\n * Re-emits all notifications from source Observable with specified scheduler.\n *\n * <span class=\"informal\">Ensure a specific scheduler is used, from outside of an Observable.</span>\n *\n * `observeOn` is an operator that accepts a scheduler as a first parameter, which will be used to reschedule\n * notifications emitted by the source Observable. It might be useful, if you do not have control over\n * internal scheduler of a given Observable, but want to control when its values are emitted nevertheless.\n *\n * Returned Observable emits the same notifications (nexted values, complete and error events) as the source Observable,\n * but rescheduled with provided scheduler. Note that this doesn't mean that source Observables internal\n * scheduler will be replaced in any way. Original scheduler still will be used, but when the source Observable emits\n * notification, it will be immediately scheduled again - this time with scheduler passed to `observeOn`.\n * An anti-pattern would be calling `observeOn` on Observable that emits lots of values synchronously, to split\n * that emissions into asynchronous chunks. For this to happen, scheduler would have to be passed into the source\n * Observable directly (usually into the operator that creates it). `observeOn` simply delays notifications a\n * little bit more, to ensure that they are emitted at expected moments.\n *\n * As a matter of fact, `observeOn` accepts second parameter, which specifies in milliseconds with what delay notifications\n * will be emitted. The main difference between {@link delay} operator and `observeOn` is that `observeOn`\n * will delay all notifications - including error notifications - while `delay` will pass through error\n * from source Observable immediately when it is emitted. In general it is highly recommended to use `delay` operator\n * for any kind of delaying of values in the stream, while using `observeOn` to specify which scheduler should be used\n * for notification emissions in general.\n *\n * @example <caption>Ensure values in subscribe are called just before browser repaint.</caption>\n * const intervals = Rx.Observable.interval(10); // Intervals are scheduled\n * // with async scheduler by default...\n *\n * intervals\n * .observeOn(Rx.Scheduler.animationFrame) // ...but we will observe on animationFrame\n * .subscribe(val => { // scheduler to ensure smooth animation.\n * someDiv.style.height = val + 'px';\n * });\n *\n * @see {@link delay}\n *\n * @param {SchedulerLike} scheduler Scheduler that will be used to reschedule notifications from source Observable.\n * @param {number} [delay] Number of milliseconds that states with what delay every notification should be rescheduled.\n * @return {Observable<T>} Observable that emits the same notifications as the source Observable,\n * but with provided scheduler.\n *\n * @method observeOn\n * @owner Observable\n */\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return function observeOnOperatorFunction(source) {\n return source.lift(new ObserveOnOperator(scheduler, delay));\n };\n}\nvar ObserveOnOperator = /*@__PURE__*/ (function () {\n function ObserveOnOperator(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n };\n return ObserveOnOperator;\n}());\nexport { ObserveOnOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ObserveOnSubscriber, _super);\n function ObserveOnSubscriber(destination, scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n var _this = _super.call(this, destination) || this;\n _this.scheduler = scheduler;\n _this.delay = delay;\n return _this;\n }\n /** @nocollapse */\n ObserveOnSubscriber.dispatch = function (arg) {\n var notification = arg.notification, destination = arg.destination;\n notification.observe(destination);\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n };\n ObserveOnSubscriber.prototype._next = function (value) {\n this.scheduleMessage(Notification.createNext(value));\n };\n ObserveOnSubscriber.prototype._error = function (err) {\n this.scheduleMessage(Notification.createError(err));\n };\n ObserveOnSubscriber.prototype._complete = function () {\n this.scheduleMessage(Notification.createComplete());\n };\n return ObserveOnSubscriber;\n}(Subscriber));\nexport { ObserveOnSubscriber };\nvar ObserveOnMessage = /*@__PURE__*/ (function () {\n function ObserveOnMessage(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n return ObserveOnMessage;\n}());\nexport { ObserveOnMessage };\n//# sourceMappingURL=observeOn.js.map\n","/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { from } from '../observable/from';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/* tslint:enable:max-line-length */\n/**\n * When any of the provided Observable emits an complete or error notification, it immediately subscribes to the next one\n * that was passed.\n *\n * <span class=\"informal\">Execute series of Observables no matter what, even if it means swallowing errors.</span>\n *\n * <img src=\"./img/onErrorResumeNext.png\" width=\"100%\">\n *\n * `onErrorResumeNext` is an operator that accepts a series of Observables, provided either directly as\n * arguments or as an array. If no single Observable is provided, returned Observable will simply behave the same\n * as the source.\n *\n * `onErrorResumeNext` returns an Observable that starts by subscribing and re-emitting values from the source Observable.\n * When its stream of values ends - no matter if Observable completed or emitted an error - `onErrorResumeNext`\n * will subscribe to the first Observable that was passed as an argument to the method. It will start re-emitting\n * its values as well and - again - when that stream ends, `onErrorResumeNext` will proceed to subscribing yet another\n * Observable in provided series, no matter if previous Observable completed or ended with an error. This will\n * be happening until there is no more Observables left in the series, at which point returned Observable will\n * complete - even if the last subscribed stream ended with an error.\n *\n * `onErrorResumeNext` can be therefore thought of as version of {@link concat} operator, which is more permissive\n * when it comes to the errors emitted by its input Observables. While `concat` subscribes to the next Observable\n * in series only if previous one successfully completed, `onErrorResumeNext` subscribes even if it ended with\n * an error.\n *\n * Note that you do not get any access to errors emitted by the Observables. In particular do not\n * expect these errors to appear in error callback passed to {@link subscribe}. If you want to take\n * specific actions based on what error was emitted by an Observable, you should try out {@link catch} instead.\n *\n *\n * @example <caption>Subscribe to the next Observable after map fails</caption>\n * Rx.Observable.of(1, 2, 3, 0)\n * .map(x => {\n * if (x === 0) { throw Error(); }\n return 10 / x;\n * })\n * .onErrorResumeNext(Rx.Observable.of(1, 2, 3))\n * .subscribe(\n * val => console.log(val),\n * err => console.log(err), // Will never be called.\n * () => console.log('that\\'s it!')\n * );\n *\n * // Logs:\n * // 10\n * // 5\n * // 3.3333333333333335\n * // 1\n * // 2\n * // 3\n * // \"that's it!\"\n *\n * @see {@link concat}\n * @see {@link catch}\n *\n * @param {...ObservableInput} observables Observables passed either directly or as an array.\n * @return {Observable} An Observable that emits values from source Observable, but - if it errors - subscribes\n * to the next passed Observable and so on, until it completes or runs out of Observables.\n * @method onErrorResumeNext\n * @owner Observable\n */\nexport function onErrorResumeNext() {\n var nextSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nextSources[_i] = arguments[_i];\n }\n if (nextSources.length === 1 && isArray(nextSources[0])) {\n nextSources = nextSources[0];\n }\n return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };\n}\n/* tslint:enable:max-line-length */\nexport function onErrorResumeNextStatic() {\n var nextSources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n nextSources[_i] = arguments[_i];\n }\n var source = null;\n if (nextSources.length === 1 && isArray(nextSources[0])) {\n nextSources = nextSources[0];\n }\n source = nextSources.shift();\n return from(source, null).lift(new OnErrorResumeNextOperator(nextSources));\n}\nvar OnErrorResumeNextOperator = /*@__PURE__*/ (function () {\n function OnErrorResumeNextOperator(nextSources) {\n this.nextSources = nextSources;\n }\n OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));\n };\n return OnErrorResumeNextOperator;\n}());\nvar OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(OnErrorResumeNextSubscriber, _super);\n function OnErrorResumeNextSubscriber(destination, nextSources) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.nextSources = nextSources;\n return _this;\n }\n OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype._error = function (err) {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype._complete = function () {\n this.subscribeToNextSource();\n };\n OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {\n var next = this.nextSources.shift();\n if (next) {\n this.add(subscribeToResult(this, next));\n }\n else {\n this.destination.complete();\n }\n };\n return OnErrorResumeNextSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=onErrorResumeNext.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Groups pairs of consecutive emissions together and emits them as an array of\n * two values.\n *\n * <span class=\"informal\">Puts the current value and previous value together as\n * an array, and emits that.</span>\n *\n * <img src=\"./img/pairwise.png\" width=\"100%\">\n *\n * The Nth emission from the source Observable will cause the output Observable\n * to emit an array [(N-1)th, Nth] of the previous and the current value, as a\n * pair. For this reason, `pairwise` emits on the second and subsequent\n * emissions from the source Observable, but not on the first emission, because\n * there is no previous value in that case.\n *\n * @example <caption>On every click (starting from the second), emit the relative distance to the previous click</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var pairs = clicks.pairwise();\n * var distance = pairs.map(pair => {\n * var x0 = pair[0].clientX;\n * var y0 = pair[0].clientY;\n * var x1 = pair[1].clientX;\n * var y1 = pair[1].clientY;\n * return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));\n * });\n * distance.subscribe(x => console.log(x));\n *\n * @see {@link buffer}\n * @see {@link bufferCount}\n *\n * @return {Observable<Array<T>>} An Observable of pairs (as arrays) of\n * consecutive values from the source Observable.\n * @method pairwise\n * @owner Observable\n */\nexport function pairwise() {\n return function (source) { return source.lift(new PairwiseOperator()); };\n}\nvar PairwiseOperator = /*@__PURE__*/ (function () {\n function PairwiseOperator() {\n }\n PairwiseOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new PairwiseSubscriber(subscriber));\n };\n return PairwiseOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar PairwiseSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(PairwiseSubscriber, _super);\n function PairwiseSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.hasPrev = false;\n return _this;\n }\n PairwiseSubscriber.prototype._next = function (value) {\n if (this.hasPrev) {\n this.destination.next([this.prev, value]);\n }\n else {\n this.hasPrev = true;\n }\n this.prev = value;\n };\n return PairwiseSubscriber;\n}(Subscriber));\n//# sourceMappingURL=pairwise.js.map\n","/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */\nimport { not } from '../util/not';\nimport { filter } from './filter';\n/**\n * Splits the source Observable into two, one with values that satisfy a\n * predicate, and another with values that don't satisfy the predicate.\n *\n * <span class=\"informal\">It's like {@link filter}, but returns two Observables:\n * one like the output of {@link filter}, and the other with values that did not\n * pass the condition.</span>\n *\n * <img src=\"./img/partition.png\" width=\"100%\">\n *\n * `partition` outputs an array with two Observables that partition the values\n * from the source Observable through the given `predicate` function. The first\n * Observable in that array emits source values for which the predicate argument\n * returns true. The second Observable emits source values for which the\n * predicate returns false. The first behaves like {@link filter} and the second\n * behaves like {@link filter} with the predicate negated.\n *\n * @example <caption>Partition click events into those on DIV elements and those elsewhere</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var parts = clicks.partition(ev => ev.target.tagName === 'DIV');\n * var clicksOnDivs = parts[0];\n * var clicksElsewhere = parts[1];\n * clicksOnDivs.subscribe(x => console.log('DIV clicked: ', x));\n * clicksElsewhere.subscribe(x => console.log('Other clicked: ', x));\n *\n * @see {@link filter}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates each value emitted by the source Observable. If it returns `true`,\n * the value is emitted on the first Observable in the returned array, if\n * `false` the value is emitted on the second Observable in the array. The\n * `index` parameter is the number `i` for the i-th source emission that has\n * happened since the subscription, starting from the number `0`.\n * @param {any} [thisArg] An optional argument to determine the value of `this`\n * in the `predicate` function.\n * @return {[Observable<T>, Observable<T>]} An array with two Observables: one\n * with values that passed the predicate, and another with values that did not\n * pass the predicate.\n * @method partition\n * @owner Observable\n */\nexport function partition(predicate, thisArg) {\n return function (source) {\n return [\n filter(predicate, thisArg)(source),\n filter(not(predicate, thisArg))(source)\n ];\n };\n}\n//# sourceMappingURL=partition.js.map\n","/** PURE_IMPORTS_START _map PURE_IMPORTS_END */\nimport { map } from './map';\n/**\n * Maps each source value (an object) to its specified nested property.\n *\n * <span class=\"informal\">Like {@link map}, but meant only for picking one of\n * the nested properties of every emitted object.</span>\n *\n * <img src=\"./img/pluck.png\" width=\"100%\">\n *\n * Given a list of strings describing a path to an object property, retrieves\n * the value of a specified nested property from all values in the source\n * Observable. If a property can't be resolved, it will return `undefined` for\n * that value.\n *\n * @example <caption>Map every click to the tagName of the clicked target element</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var tagNames = clicks.pluck('target', 'tagName');\n * tagNames.subscribe(x => console.log(x));\n *\n * @see {@link map}\n *\n * @param {...string} properties The nested properties to pluck from each source\n * value (an object).\n * @return {Observable} A new Observable of property values from the source values.\n * @method pluck\n * @owner Observable\n */\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return function (source) { return map(plucker(properties, length))(source); };\n}\nfunction plucker(props, length) {\n var mapper = function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n };\n return mapper;\n}\n//# sourceMappingURL=pluck.js.map\n","/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */\nimport { Subject } from '../Subject';\nimport { multicast } from './multicast';\n/* tslint:enable:max-line-length */\n/**\n * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called\n * before it begins emitting items to those Observers that have subscribed to it.\n *\n * <img src=\"./img/publish.png\" width=\"100%\">\n *\n * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times\n * as needed, without causing multiple subscriptions to the source sequence.\n * Subscribers to the given source will receive all notifications of the source from the time of the subscription on.\n * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.\n * @method publish\n * @owner Observable\n */\nexport function publish(selector) {\n return selector ?\n multicast(function () { return new Subject(); }, selector) :\n multicast(new Subject());\n}\n//# sourceMappingURL=publish.js.map\n","/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */\nimport { BehaviorSubject } from '../BehaviorSubject';\nimport { multicast } from './multicast';\n/**\n * @param value\n * @return {ConnectableObservable<T>}\n * @method publishBehavior\n * @owner Observable\n */\nexport function publishBehavior(value) {\n return function (source) { return multicast(new BehaviorSubject(value))(source); };\n}\n//# sourceMappingURL=publishBehavior.js.map\n","/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */\nimport { AsyncSubject } from '../AsyncSubject';\nimport { multicast } from './multicast';\nexport function publishLast() {\n return function (source) { return multicast(new AsyncSubject())(source); };\n}\n//# sourceMappingURL=publishLast.js.map\n","/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\nimport { multicast } from './multicast';\n/* tslint:enable:max-line-length */\nexport function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {\n if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {\n scheduler = selectorOrScheduler;\n }\n var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;\n var subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n return function (source) { return multicast(function () { return subject; }, selector)(source); };\n}\n//# sourceMappingURL=publishReplay.js.map\n","/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */\nimport { isArray } from '../util/isArray';\nimport { race as raceStatic } from '../observable/race';\n/* tslint:enable:max-line-length */\n/**\n * Returns an Observable that mirrors the first source Observable to emit an item\n * from the combination of this Observable and supplied Observables.\n * @param {...Observables} ...observables Sources used to race for which Observable emits first.\n * @return {Observable} An Observable that mirrors the output of the first Observable to emit an item.\n * @method race\n * @owner Observable\n */\nexport function race() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function raceOperatorFunction(source) {\n // if the only argument is an array, it was most likely called with\n // `pair([obs1, obs2, ...])`\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return source.lift.call(raceStatic.apply(void 0, [source].concat(observables)));\n };\n}\n//# sourceMappingURL=race.js.map\n","/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */\nimport { scan } from './scan';\nimport { takeLast } from './takeLast';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { pipe } from '../util/pipe';\n/* tslint:enable:max-line-length */\n/**\n * Applies an accumulator function over the source Observable, and returns the\n * accumulated result when the source completes, given an optional seed value.\n *\n * <span class=\"informal\">Combines together all values emitted on the source,\n * using an accumulator function that knows how to join a new source value into\n * the accumulation from the past.</span>\n *\n * <img src=\"./img/reduce.png\" width=\"100%\">\n *\n * Like\n * [Array.prototype.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce),\n * `reduce` applies an `accumulator` function against an accumulation and each\n * value of the source Observable (from the past) to reduce it to a single\n * value, emitted on the output Observable. Note that `reduce` will only emit\n * one value, only when the source Observable completes. It is equivalent to\n * applying operator {@link scan} followed by operator {@link last}.\n *\n * Returns an Observable that applies a specified `accumulator` function to each\n * item emitted by the source Observable. If a `seed` value is specified, then\n * that value will be used as the initial value for the accumulator. If no seed\n * value is specified, the first item of the source is used as the seed.\n *\n * @example <caption>Count the number of click events that happened in 5 seconds</caption>\n * var clicksInFiveSeconds = Rx.Observable.fromEvent(document, 'click')\n * .takeUntil(Rx.Observable.interval(5000));\n * var ones = clicksInFiveSeconds.mapTo(1);\n * var seed = 0;\n * var count = ones.reduce((acc, one) => acc + one, seed);\n * count.subscribe(x => console.log(x));\n *\n * @see {@link count}\n * @see {@link expand}\n * @see {@link mergeScan}\n * @see {@link scan}\n *\n * @param {function(acc: R, value: T, index: number): R} accumulator The accumulator function\n * called on each source value.\n * @param {R} [seed] The initial accumulation value.\n * @return {Observable<R>} An Observable that emits a single value that is the\n * result of accumulating the values emitted by the source Observable.\n * @method reduce\n * @owner Observable\n */\nexport function reduce(accumulator, seed) {\n // providing a seed of `undefined` *should* be valid and trigger\n // hasSeed! so don't use `seed !== undefined` checks!\n // For this reason, we have to check it here at the original call site\n // otherwise inside Operator/Subscriber we won't know if `undefined`\n // means they didn't provide anything or if they literally provided `undefined`\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(function (acc, value, index) {\n return accumulator(acc, value, index + 1);\n }), takeLast(1))(source);\n };\n}\n//# sourceMappingURL=reduce.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var 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 ///\n // Compare the local RefCountSubscriber's connection Subscription to the\n // connection Subscription on the shared ConnectableObservable. In cases\n // where the ConnectableObservable source synchronously emits values, and\n // the RefCountSubscriber's downstream Observers synchronously unsubscribe,\n // execution continues to here before the RefCountOperator has a chance to\n // supply the RefCountSubscriber with the shared connection Subscription.\n // For example:\n // ```\n // Observable.range(0, 10)\n // .publish()\n // .refCount()\n // .take(5)\n // .subscribe();\n // ```\n // In order to account for this case, RefCountSubscriber should only dispose\n // the ConnectableObservable's shared connection Subscription if the\n // connection Subscription exists, *and* either:\n // a. RefCountSubscriber doesn't have a reference to the shared connection\n // Subscription yet, or,\n // b. RefCountSubscriber's connection Subscription reference is identical\n // to the shared connection Subscription\n ///\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=refCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { empty } from '../observable/empty';\n/**\n * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times.\n *\n * <img src=\"./img/repeat.png\" width=\"100%\">\n *\n * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield\n * an empty Observable.\n * @return {Observable} An Observable that repeats the stream of items emitted by the source Observable at most\n * count times.\n * @method repeat\n * @owner Observable\n */\nexport function repeat(count) {\n if (count === void 0) {\n count = -1;\n }\n return function (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}\nvar RepeatOperator = /*@__PURE__*/ (function () {\n function RepeatOperator(count, source) {\n this.count = count;\n this.source = source;\n }\n RepeatOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));\n };\n return RepeatOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar RepeatSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RepeatSubscriber, _super);\n function RepeatSubscriber(destination, count, source) {\n var _this = _super.call(this, destination) || this;\n _this.count = count;\n _this.source = source;\n return _this;\n }\n RepeatSubscriber.prototype.complete = function () {\n if (!this.isStopped) {\n var _a = this, source = _a.source, count = _a.count;\n if (count === 0) {\n return _super.prototype.complete.call(this);\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n };\n return RepeatSubscriber;\n}(Subscriber));\n//# sourceMappingURL=repeat.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source\n * Observable calls `complete`, this method will emit to the Observable returned from `notifier`. If that Observable\n * calls `complete` or `error`, then this method will call `complete` or `error` on the child subscription. Otherwise\n * this method will resubscribe to the source Observable.\n *\n * <img src=\"./img/repeatWhen.png\" width=\"100%\">\n *\n * @param {function(notifications: Observable): Observable} notifier - Receives an Observable of notifications with\n * which a user can `complete` or `error`, aborting the repetition.\n * @return {Observable} The source Observable modified with repeat logic.\n * @method repeatWhen\n * @owner Observable\n */\nexport function repeatWhen(notifier) {\n return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };\n}\nvar RepeatWhenOperator = /*@__PURE__*/ (function () {\n function RepeatWhenOperator(notifier) {\n this.notifier = notifier;\n }\n RepeatWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));\n };\n return RepeatWhenOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RepeatWhenSubscriber, _super);\n function RepeatWhenSubscriber(destination, notifier, source) {\n var _this = _super.call(this, destination) || this;\n _this.notifier = notifier;\n _this.source = source;\n _this.sourceIsBeingSubscribedTo = true;\n return _this;\n }\n RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.sourceIsBeingSubscribedTo = true;\n this.source.subscribe(this);\n };\n RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {\n if (this.sourceIsBeingSubscribedTo === false) {\n return _super.prototype.complete.call(this);\n }\n };\n RepeatWhenSubscriber.prototype.complete = function () {\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.prototype.complete.call(this);\n }\n this._unsubscribeAndRecycle();\n this.notifications.next();\n }\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n RepeatWhenSubscriber.prototype._unsubscribe = function () {\n var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;\n if (notifications) {\n notifications.unsubscribe();\n this.notifications = null;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = null;\n }\n this.retries = null;\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {\n var _unsubscribe = this._unsubscribe;\n this._unsubscribe = null;\n _super.prototype._unsubscribeAndRecycle.call(this);\n this._unsubscribe = _unsubscribe;\n return this;\n };\n RepeatWhenSubscriber.prototype.subscribeToRetries = function () {\n this.notifications = new Subject();\n var retries = tryCatch(this.notifier)(this.notifications);\n if (retries === errorObject) {\n return _super.prototype.complete.call(this);\n }\n this.retries = retries;\n this.retriesSubscription = subscribeToResult(this, retries);\n };\n return RepeatWhenSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=repeatWhen.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will resubscribe to the source Observable for a maximum of `count` resubscriptions (given\n * as a number parameter) rather than propagating the `error` call.\n *\n * <img src=\"./img/retry.png\" width=\"100%\">\n *\n * Any and all items emitted by the source Observable will be emitted by the resulting Observable, even those emitted\n * during failed subscriptions. For example, if an Observable fails at first but emits [1, 2] then succeeds the second\n * time and emits: [1, 2, 3, 4, 5] then the complete stream of emissions and notifications\n * would be: [1, 2, 1, 2, 3, 4, 5, `complete`].\n * @param {number} count - Number of retry attempts before failing.\n * @return {Observable} The source Observable modified with the retry logic.\n * @method retry\n * @owner Observable\n */\nexport function retry(count) {\n if (count === void 0) {\n count = -1;\n }\n return function (source) { return source.lift(new RetryOperator(count, source)); };\n}\nvar RetryOperator = /*@__PURE__*/ (function () {\n function RetryOperator(count, source) {\n this.count = count;\n this.source = source;\n }\n RetryOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));\n };\n return RetryOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar RetrySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RetrySubscriber, _super);\n function RetrySubscriber(destination, count, source) {\n var _this = _super.call(this, destination) || this;\n _this.count = count;\n _this.source = source;\n return _this;\n }\n RetrySubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _a = this, source = _a.source, count = _a.count;\n if (count === 0) {\n return _super.prototype.error.call(this, err);\n }\n else if (count > -1) {\n this.count = count - 1;\n }\n source.subscribe(this._unsubscribeAndRecycle());\n }\n };\n return RetrySubscriber;\n}(Subscriber));\n//# sourceMappingURL=retry.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable\n * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`.\n * If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child\n * subscription. Otherwise this method will resubscribe to the source Observable.\n *\n * <img src=\"./img/retryWhen.png\" width=\"100%\">\n *\n * @param {function(errors: Observable): Observable} notifier - Receives an Observable of notifications with which a\n * user can `complete` or `error`, aborting the retry.\n * @return {Observable} The source Observable modified with retry logic.\n * @method retryWhen\n * @owner Observable\n */\nexport function retryWhen(notifier) {\n return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };\n}\nvar RetryWhenOperator = /*@__PURE__*/ (function () {\n function RetryWhenOperator(notifier, source) {\n this.notifier = notifier;\n this.source = source;\n }\n RetryWhenOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));\n };\n return RetryWhenOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RetryWhenSubscriber, _super);\n function RetryWhenSubscriber(destination, notifier, source) {\n var _this = _super.call(this, destination) || this;\n _this.notifier = notifier;\n _this.source = source;\n return _this;\n }\n RetryWhenSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var errors = this.errors;\n var retries = this.retries;\n var retriesSubscription = this.retriesSubscription;\n if (!retries) {\n errors = new Subject();\n retries = tryCatch(this.notifier)(errors);\n if (retries === errorObject) {\n return _super.prototype.error.call(this, errorObject.e);\n }\n retriesSubscription = subscribeToResult(this, retries);\n }\n else {\n this.errors = null;\n this.retriesSubscription = null;\n }\n this._unsubscribeAndRecycle();\n this.errors = errors;\n this.retries = retries;\n this.retriesSubscription = retriesSubscription;\n errors.next(err);\n }\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n RetryWhenSubscriber.prototype._unsubscribe = function () {\n var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;\n if (errors) {\n errors.unsubscribe();\n this.errors = null;\n }\n if (retriesSubscription) {\n retriesSubscription.unsubscribe();\n this.retriesSubscription = null;\n }\n this.retries = null;\n };\n RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var _unsubscribe = this._unsubscribe;\n this._unsubscribe = null;\n this._unsubscribeAndRecycle();\n this._unsubscribe = _unsubscribe;\n this.source.subscribe(this);\n };\n return RetryWhenSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=retryWhen.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Emits the most recently emitted value from the source Observable whenever\n * another Observable, the `notifier`, emits.\n *\n * <span class=\"informal\">It's like {@link sampleTime}, but samples whenever\n * the `notifier` Observable emits something.</span>\n *\n * <img src=\"./img/sample.png\" width=\"100%\">\n *\n * Whenever the `notifier` Observable emits a value or completes, `sample`\n * looks at the source Observable and emits whichever value it has most recently\n * emitted since the previous sampling, unless the source has not emitted\n * anything since the previous sampling. The `notifier` is subscribed to as soon\n * as the output Observable is subscribed.\n *\n * @example <caption>On every click, sample the most recent \"seconds\" timer</caption>\n * var seconds = Rx.Observable.interval(1000);\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = seconds.sample(clicks);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link sampleTime}\n * @see {@link throttle}\n *\n * @param {Observable<any>} notifier The Observable to use for sampling the\n * source Observable.\n * @return {Observable<T>} An Observable that emits the results of sampling the\n * values emitted by the source Observable whenever the notifier Observable\n * emits value or completes.\n * @method sample\n * @owner Observable\n */\nexport function sample(notifier) {\n return function (source) { return source.lift(new SampleOperator(notifier)); };\n}\nvar SampleOperator = /*@__PURE__*/ (function () {\n function SampleOperator(notifier) {\n this.notifier = notifier;\n }\n SampleOperator.prototype.call = function (subscriber, source) {\n var sampleSubscriber = new SampleSubscriber(subscriber);\n var subscription = source.subscribe(sampleSubscriber);\n subscription.add(subscribeToResult(sampleSubscriber, this.notifier));\n return subscription;\n };\n return SampleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SampleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SampleSubscriber, _super);\n function SampleSubscriber() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.hasValue = false;\n return _this;\n }\n SampleSubscriber.prototype._next = function (value) {\n this.value = value;\n this.hasValue = true;\n };\n SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.emitValue();\n };\n SampleSubscriber.prototype.notifyComplete = function () {\n this.emitValue();\n };\n SampleSubscriber.prototype.emitValue = function () {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.value);\n }\n };\n return SampleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=sample.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\n/**\n * Emits the most recently emitted value from the source Observable within\n * periodic time intervals.\n *\n * <span class=\"informal\">Samples the source Observable at periodic time\n * intervals, emitting what it samples.</span>\n *\n * <img src=\"./img/sampleTime.png\" width=\"100%\">\n *\n * `sampleTime` periodically looks at the source Observable and emits whichever\n * value it has most recently emitted since the previous sampling, unless the\n * source has not emitted anything since the previous sampling. The sampling\n * happens periodically in time every `period` milliseconds (or the time unit\n * defined by the optional `scheduler` argument). The sampling starts as soon as\n * the output Observable is subscribed.\n *\n * @example <caption>Every second, emit the most recent click at most once</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.sampleTime(1000);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link auditTime}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param {number} period The sampling period expressed in milliseconds or the\n * time unit determined internally by the optional `scheduler`.\n * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the sampling.\n * @return {Observable<T>} An Observable that emits the results of sampling the\n * values emitted by the source Observable at the specified time interval.\n * @method sampleTime\n * @owner Observable\n */\nexport function sampleTime(period, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };\n}\nvar SampleTimeOperator = /*@__PURE__*/ (function () {\n function SampleTimeOperator(period, scheduler) {\n this.period = period;\n this.scheduler = scheduler;\n }\n SampleTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));\n };\n return SampleTimeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SampleTimeSubscriber, _super);\n function SampleTimeSubscriber(destination, period, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.period = period;\n _this.scheduler = scheduler;\n _this.hasValue = false;\n _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));\n return _this;\n }\n SampleTimeSubscriber.prototype._next = function (value) {\n this.lastValue = value;\n this.hasValue = true;\n };\n SampleTimeSubscriber.prototype.notifyNext = function () {\n if (this.hasValue) {\n this.hasValue = false;\n this.destination.next(this.lastValue);\n }\n };\n return SampleTimeSubscriber;\n}(Subscriber));\nfunction dispatchNotification(state) {\n var subscriber = state.subscriber, period = state.period;\n subscriber.notifyNext();\n this.schedule(state, period);\n}\n//# sourceMappingURL=sampleTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/* tslint:enable:max-line-length */\n/**\n * Applies an accumulator function over the source Observable, and returns each\n * intermediate result, with an optional seed value.\n *\n * <span class=\"informal\">It's like {@link reduce}, but emits the current\n * accumulation whenever the source emits a value.</span>\n *\n * <img src=\"./img/scan.png\" width=\"100%\">\n *\n * Combines together all values emitted on the source, using an accumulator\n * function that knows how to join a new source value into the accumulation from\n * the past. Is similar to {@link reduce}, but emits the intermediate\n * accumulations.\n *\n * Returns an Observable that applies a specified `accumulator` function to each\n * item emitted by the source Observable. If a `seed` value is specified, then\n * that value will be used as the initial value for the accumulator. If no seed\n * value is specified, the first item of the source is used as the seed.\n *\n * @example <caption>Count the number of click events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var ones = clicks.mapTo(1);\n * var seed = 0;\n * var count = ones.scan((acc, one) => acc + one, seed);\n * count.subscribe(x => console.log(x));\n *\n * @see {@link expand}\n * @see {@link mergeScan}\n * @see {@link reduce}\n *\n * @param {function(acc: R, value: T, index: number): R} accumulator\n * The accumulator function called on each source value.\n * @param {T|R} [seed] The initial accumulation value.\n * @return {Observable<R>} An observable of the accumulated values.\n * @method scan\n * @owner Observable\n */\nexport function scan(accumulator, seed) {\n var hasSeed = false;\n // providing a seed of `undefined` *should* be valid and trigger\n // hasSeed! so don't use `seed !== undefined` checks!\n // For this reason, we have to check it here at the original call site\n // otherwise inside Operator/Subscriber we won't know if `undefined`\n // means they didn't provide anything or if they literally provided `undefined`\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}\nvar ScanOperator = /*@__PURE__*/ (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) {\n hasSeed = false;\n }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ScanSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this._seed = _seed;\n _this.hasSeed = hasSeed;\n _this.index = 0;\n return _this;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (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 ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var 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 return ScanSubscriber;\n}(Subscriber));\n//# sourceMappingURL=scan.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_tryCatch,_util_errorObject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\n/**\n * Compares all values of two observables in sequence using an optional comparor function\n * and returns an observable of a single boolean value representing whether or not the two sequences\n * are equal.\n *\n * <span class=\"informal\">Checks to see of all values emitted by both observables are equal, in order.</span>\n *\n * <img src=\"./img/sequenceEqual.png\" width=\"100%\">\n *\n * `sequenceEqual` subscribes to two observables and buffers incoming values from each observable. Whenever either\n * observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom\n * up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the\n * observables completes, the operator will wait for the other observable to complete; If the other\n * observable emits before completing, the returned observable will emit `false` and complete. If one observable never\n * completes or emits after the other complets, the returned observable will never complete.\n *\n * @example <caption>figure out if the Konami code matches</caption>\n * var code = Rx.Observable.from([\n * \"ArrowUp\",\n * \"ArrowUp\",\n * \"ArrowDown\",\n * \"ArrowDown\",\n * \"ArrowLeft\",\n * \"ArrowRight\",\n * \"ArrowLeft\",\n * \"ArrowRight\",\n * \"KeyB\",\n * \"KeyA\",\n * \"Enter\" // no start key, clearly.\n * ]);\n *\n * var keys = Rx.Observable.fromEvent(document, 'keyup')\n * .map(e => e.code);\n * var matches = keys.bufferCount(11, 1)\n * .mergeMap(\n * last11 =>\n * Rx.Observable.from(last11)\n * .sequenceEqual(code)\n * );\n * matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched));\n *\n * @see {@link combineLatest}\n * @see {@link zip}\n * @see {@link withLatestFrom}\n *\n * @param {Observable} compareTo The observable sequence to compare the source sequence to.\n * @param {function} [comparor] An optional function to compare each value pair\n * @return {Observable} An Observable of a single boolean value representing whether or not\n * the values emitted by both observables were equal in sequence.\n * @method sequenceEqual\n * @owner Observable\n */\nexport function sequenceEqual(compareTo, comparor) {\n return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparor)); };\n}\nvar SequenceEqualOperator = /*@__PURE__*/ (function () {\n function SequenceEqualOperator(compareTo, comparor) {\n this.compareTo = compareTo;\n this.comparor = comparor;\n }\n SequenceEqualOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparor));\n };\n return SequenceEqualOperator;\n}());\nexport { SequenceEqualOperator };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SequenceEqualSubscriber, _super);\n function SequenceEqualSubscriber(destination, compareTo, comparor) {\n var _this = _super.call(this, destination) || this;\n _this.compareTo = compareTo;\n _this.comparor = comparor;\n _this._a = [];\n _this._b = [];\n _this._oneComplete = false;\n _this.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));\n return _this;\n }\n SequenceEqualSubscriber.prototype._next = function (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 SequenceEqualSubscriber.prototype._complete = function () {\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 SequenceEqualSubscriber.prototype.checkValues = function () {\n var _c = this, _a = _c._a, _b = _c._b, comparor = _c.comparor;\n while (_a.length > 0 && _b.length > 0) {\n var a = _a.shift();\n var b = _b.shift();\n var areEqual = false;\n if (comparor) {\n areEqual = tryCatch(comparor)(a, b);\n if (areEqual === errorObject) {\n this.destination.error(errorObject.e);\n }\n }\n else {\n areEqual = a === b;\n }\n if (!areEqual) {\n this.emit(false);\n }\n }\n };\n SequenceEqualSubscriber.prototype.emit = function (value) {\n var destination = this.destination;\n destination.next(value);\n destination.complete();\n };\n SequenceEqualSubscriber.prototype.nextB = function (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 return SequenceEqualSubscriber;\n}(Subscriber));\nexport { SequenceEqualSubscriber };\nvar SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SequenceEqualCompareToSubscriber, _super);\n function SequenceEqualCompareToSubscriber(destination, parent) {\n var _this = _super.call(this, destination) || this;\n _this.parent = parent;\n return _this;\n }\n SequenceEqualCompareToSubscriber.prototype._next = function (value) {\n this.parent.nextB(value);\n };\n SequenceEqualCompareToSubscriber.prototype._error = function (err) {\n this.parent.error(err);\n };\n SequenceEqualCompareToSubscriber.prototype._complete = function () {\n this.parent._complete();\n };\n return SequenceEqualCompareToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=sequenceEqual.js.map\n","/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n return new Subject();\n}\n/**\n * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one\n * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will\n * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.\n * This is an alias for .multicast(() => new Subject()).refCount().\n *\n * <img src=\"./img/share.png\" width=\"100%\">\n *\n * @return {Observable<T>} An Observable that upon connection causes the source Observable to emit items to its Observers.\n * @method share\n * @owner Observable\n */\nexport function share() {\n return function (source) { return refCount()(multicast(shareSubjectFactory)(source)); };\n}\n//# sourceMappingURL=share.js.map\n","/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\n/**\n * @method shareReplay\n * @owner Observable\n */\nexport function shareReplay(bufferSize, windowTime, scheduler) {\n return function (source) { return source.lift(shareReplayOperator(bufferSize, windowTime, scheduler)); };\n}\nfunction shareReplayOperator(bufferSize, windowTime, scheduler) {\n var subject;\n var refCount = 0;\n var subscription;\n var hasError = false;\n var isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next: function (value) { subject.next(value); },\n error: function (err) {\n hasError = true;\n subject.error(err);\n },\n complete: function () {\n isComplete = true;\n subject.complete();\n },\n });\n }\n var innerSub = subject.subscribe(this);\n return function () {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && refCount === 0 && isComplete) {\n subscription.unsubscribe();\n }\n };\n };\n}\n//# sourceMappingURL=shareReplay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { EmptyError } from '../util/EmptyError';\n/**\n * Returns an Observable that emits the single item emitted by the source Observable that matches a specified\n * predicate, if that Observable emits one such item. If the source Observable emits more than one such item or no\n * items, notify of an IllegalArgumentException or NoSuchElementException respectively. If the source Observable\n * emits items but none match the specified predicate then `undefined` is emiited.\n *\n * <img src=\"./img/single.png\" width=\"100%\">\n *\n * @throws {EmptyError} Delivers an EmptyError to the Observer's `error`\n * callback if the Observable completes before any `next` notification was sent.\n * @param {Function} predicate - A predicate function to evaluate items emitted by the source Observable.\n * @return {Observable<T>} An Observable that emits the single item emitted by the source Observable that matches\n * the predicate or `undefined` when no items match.\n *\n * @method single\n * @owner Observable\n */\nexport function single(predicate) {\n return function (source) { return source.lift(new SingleOperator(predicate, source)); };\n}\nvar SingleOperator = /*@__PURE__*/ (function () {\n function SingleOperator(predicate, source) {\n this.predicate = predicate;\n this.source = source;\n }\n SingleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));\n };\n return SingleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SingleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SingleSubscriber, _super);\n function SingleSubscriber(destination, predicate, source) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.source = source;\n _this.seenValue = false;\n _this.index = 0;\n return _this;\n }\n SingleSubscriber.prototype.applySingleValue = function (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 SingleSubscriber.prototype._next = function (value) {\n var index = this.index++;\n if (this.predicate) {\n this.tryNext(value, index);\n }\n else {\n this.applySingleValue(value);\n }\n };\n SingleSubscriber.prototype.tryNext = function (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 SingleSubscriber.prototype._complete = function () {\n var 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 return SingleSubscriber;\n}(Subscriber));\n//# sourceMappingURL=single.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Returns an Observable that skips the first `count` items emitted by the source Observable.\n *\n * <img src=\"./img/skip.png\" width=\"100%\">\n *\n * @param {Number} count - The number of times, items emitted by source Observable should be skipped.\n * @return {Observable} An Observable that skips values emitted by the source Observable.\n *\n * @method skip\n * @owner Observable\n */\nexport function skip(count) {\n return function (source) { return source.lift(new SkipOperator(count)); };\n}\nvar SkipOperator = /*@__PURE__*/ (function () {\n function SkipOperator(total) {\n this.total = total;\n }\n SkipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n };\n return SkipOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipSubscriber, _super);\n function SkipSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n SkipSubscriber.prototype._next = function (x) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n };\n return SkipSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skip.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\n/**\n * Skip the last `count` values emitted by the source Observable.\n *\n * <img src=\"./img/skipLast.png\" width=\"100%\">\n *\n * `skipLast` returns an Observable that accumulates a queue with a length\n * enough to store the first `count` values. As more values are received,\n * values are taken from the front of the queue and produced on the result\n * sequence. This causes values to be delayed.\n *\n * @example <caption>Skip the last 2 values of an Observable with many values</caption>\n * var many = Rx.Observable.range(1, 5);\n * var skipLastTwo = many.skipLast(2);\n * skipLastTwo.subscribe(x => console.log(x));\n *\n * // Results in:\n * // 1 2 3\n *\n * @see {@link skip}\n * @see {@link skipUntil}\n * @see {@link skipWhile}\n * @see {@link take}\n *\n * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws\n * ArgumentOutOrRangeError if `i < 0`.\n *\n * @param {number} count Number of elements to skip from the end of the source Observable.\n * @returns {Observable<T>} An Observable that skips the last count values\n * emitted by the source Observable.\n * @method skipLast\n * @owner Observable\n */\nexport function skipLast(count) {\n return function (source) { return source.lift(new SkipLastOperator(count)); };\n}\nvar SkipLastOperator = /*@__PURE__*/ (function () {\n function SkipLastOperator(_skipCount) {\n this._skipCount = _skipCount;\n if (this._skipCount < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n SkipLastOperator.prototype.call = function (subscriber, source) {\n if (this._skipCount === 0) {\n // If we don't want to skip any values then just subscribe\n // to Subscriber without any further logic.\n return source.subscribe(new Subscriber(subscriber));\n }\n else {\n return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));\n }\n };\n return SkipLastOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipLastSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipLastSubscriber, _super);\n function SkipLastSubscriber(destination, _skipCount) {\n var _this = _super.call(this, destination) || this;\n _this._skipCount = _skipCount;\n _this._count = 0;\n _this._ring = new Array(_skipCount);\n return _this;\n }\n SkipLastSubscriber.prototype._next = function (value) {\n var skipCount = this._skipCount;\n var count = this._count++;\n if (count < skipCount) {\n this._ring[count] = value;\n }\n else {\n var currentIndex = count % skipCount;\n var ring = this._ring;\n var oldValue = ring[currentIndex];\n ring[currentIndex] = value;\n this.destination.next(oldValue);\n }\n };\n return SkipLastSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skipLast.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item.\n *\n * <img src=\"./img/skipUntil.png\" width=\"100%\">\n *\n * @param {Observable} notifier - The second Observable that has to emit an item before the source Observable's elements begin to\n * be mirrored by the resulting Observable.\n * @return {Observable<T>} An Observable that skips items from the source Observable until the second Observable emits\n * an item, then emits the remaining items.\n * @method skipUntil\n * @owner Observable\n */\nexport function skipUntil(notifier) {\n return function (source) { return source.lift(new SkipUntilOperator(notifier)); };\n}\nvar SkipUntilOperator = /*@__PURE__*/ (function () {\n function SkipUntilOperator(notifier) {\n this.notifier = notifier;\n }\n SkipUntilOperator.prototype.call = function (destination, source) {\n return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));\n };\n return SkipUntilOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipUntilSubscriber, _super);\n function SkipUntilSubscriber(destination, notifier) {\n var _this = _super.call(this, destination) || this;\n _this.hasValue = false;\n _this.add(_this.innerSubscription = subscribeToResult(_this, notifier));\n return _this;\n }\n SkipUntilSubscriber.prototype._next = function (value) {\n if (this.hasValue) {\n _super.prototype._next.call(this, value);\n }\n };\n SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.hasValue = true;\n this.innerSubscription.unsubscribe();\n };\n SkipUntilSubscriber.prototype.notifyComplete = function () {\n /* do nothing */\n };\n return SkipUntilSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=skipUntil.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds\n * true, but emits all further source items as soon as the condition becomes false.\n *\n * <img src=\"./img/skipWhile.png\" width=\"100%\">\n *\n * @param {Function} predicate - A function to test each item emitted from the source Observable.\n * @return {Observable<T>} An Observable that begins emitting items emitted by the source Observable when the\n * specified predicate becomes false.\n * @method skipWhile\n * @owner Observable\n */\nexport function skipWhile(predicate) {\n return function (source) { return source.lift(new SkipWhileOperator(predicate)); };\n}\nvar SkipWhileOperator = /*@__PURE__*/ (function () {\n function SkipWhileOperator(predicate) {\n this.predicate = predicate;\n }\n SkipWhileOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));\n };\n return SkipWhileOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipWhileSubscriber, _super);\n function SkipWhileSubscriber(destination, predicate) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.skipping = true;\n _this.index = 0;\n return _this;\n }\n SkipWhileSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n if (this.skipping) {\n this.tryCallPredicate(value);\n }\n if (!this.skipping) {\n destination.next(value);\n }\n };\n SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {\n try {\n var result = this.predicate(value, this.index++);\n this.skipping = Boolean(result);\n }\n catch (err) {\n this.destination.error(err);\n }\n };\n return SkipWhileSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skipWhile.js.map\n","/** PURE_IMPORTS_START _observable_fromArray,_observable_scalar,_observable_empty,_observable_concat,_util_isScheduler PURE_IMPORTS_END */\nimport { fromArray } from '../observable/fromArray';\nimport { scalar } from '../observable/scalar';\nimport { empty } from '../observable/empty';\nimport { concat as concatStatic } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\n/* tslint:enable:max-line-length */\n/**\n * Returns an Observable that emits the items you specify as arguments before it begins to emit\n * items emitted by the source Observable.\n *\n * <img src=\"./img/startWith.png\" width=\"100%\">\n *\n * @param {...T} values - Items you want the modified Observable to emit first.\n * @param {Scheduler} [scheduler] - A {@link IScheduler} to use for scheduling\n * the emissions of the `next` notifications.\n * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items\n * emitted by the source Observable.\n * @method startWith\n * @owner Observable\n */\nexport function startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n return function (source) {\n var scheduler = array[array.length - 1];\n if (isScheduler(scheduler)) {\n array.pop();\n }\n else {\n scheduler = null;\n }\n var len = array.length;\n if (len === 1 && !scheduler) {\n return concatStatic(scalar(array[0]), source);\n }\n else if (len > 0) {\n return concatStatic(fromArray(array, scheduler), source);\n }\n else {\n return concatStatic(empty(scheduler), source);\n }\n };\n}\n//# sourceMappingURL=startWith.js.map\n","/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */\nimport { SubscribeOnObservable } from '../observable/SubscribeOnObservable';\n/**\n * Asynchronously subscribes Observers to this Observable on the specified IScheduler.\n *\n * <img src=\"./img/subscribeOn.png\" width=\"100%\">\n *\n * @param {Scheduler} scheduler - The IScheduler to perform subscription actions on.\n * @return {Observable<T>} The source Observable modified so that its subscriptions happen on the specified IScheduler.\n .\n * @method subscribeOn\n * @owner Observable\n */\nexport function subscribeOn(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return function subscribeOnOperatorFunction(source) {\n return source.lift(new SubscribeOnOperator(scheduler, delay));\n };\n}\nvar SubscribeOnOperator = /*@__PURE__*/ (function () {\n function SubscribeOnOperator(scheduler, delay) {\n this.scheduler = scheduler;\n this.delay = delay;\n }\n SubscribeOnOperator.prototype.call = function (subscriber, source) {\n return new SubscribeOnObservable(source, this.delay, this.scheduler).subscribe(subscriber);\n };\n return SubscribeOnOperator;\n}());\n//# sourceMappingURL=subscribeOn.js.map\n","/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\nimport { identity } from '../util/identity';\nexport function switchAll() {\n return switchMap(identity);\n}\n//# sourceMappingURL=switchAll.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { map } from './map';\nimport { from } from '../observable/from';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to an Observable which is merged in the output\n * Observable, emitting values only from the most recently projected Observable.\n *\n * <span class=\"informal\">Maps each value to an Observable, then flattens all of\n * these inner Observables using {@link switch}.</span>\n *\n * <img src=\"./img/switchMap.png\" width=\"100%\">\n *\n * Returns an Observable that emits items based on applying a function that you\n * supply to each item emitted by the source Observable, where that function\n * returns an (so-called \"inner\") Observable. Each time it observes one of these\n * inner Observables, the output Observable begins emitting the items emitted by\n * that inner Observable. When a new inner Observable is emitted, `switchMap`\n * stops emitting items from the earlier-emitted inner Observable and begins\n * emitting items from the new one. It continues to behave like this for\n * subsequent inner Observables.\n *\n * @example <caption>Rerun an interval Observable on every click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.switchMap((ev) => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link concatMap}\n * @see {@link exhaustMap}\n * @see {@link mergeMap}\n * @see {@link switch}\n * @see {@link switchMapTo}\n *\n * @param {function(value: T, ?index: number): ObservableInput} project A function\n * that, when applied to an item emitted by the source Observable, returns an\n * Observable.\n * @return {Observable} An Observable that emits the result of applying the\n * projection function (and the optional `resultSelector`) to each item emitted\n * by the source Observable and taking only the values from the most recently\n * projected inner Observable.\n * @method switchMap\n * @owner Observable\n */\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nvar SwitchMapOperator = /*@__PURE__*/ (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var 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, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n this.add(this.innerSubscription = subscribeToResult(this, result, value, index));\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n this.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map\n","/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\n/* tslint:enable:max-line-length */\n/**\n * Projects each source value to the same Observable which is flattened multiple\n * times with {@link switch} in the output Observable.\n *\n * <span class=\"informal\">It's like {@link switchMap}, but maps each value\n * always to the same inner Observable.</span>\n *\n * <img src=\"./img/switchMapTo.png\" width=\"100%\">\n *\n * Maps each source value to the given Observable `innerObservable` regardless\n * of the source value, and then flattens those resulting Observables into one\n * single Observable, which is the output Observable. The output Observables\n * emits values only from the most recently emitted instance of\n * `innerObservable`.\n *\n * @example <caption>Rerun an interval Observable on every click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.switchMapTo(Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link concatMapTo}\n * @see {@link switch}\n * @see {@link switchMap}\n * @see {@link mergeMapTo}\n *\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n * @return {Observable} An Observable that emits items from the given\n * `innerObservable` (and optionally transformed through `resultSelector`) every\n * time a value is emitted on the source Observable, and taking only the values\n * from the most recently projected inner Observable.\n * @method switchMapTo\n * @owner Observable\n */\nexport function switchMapTo(innerObservable, resultSelector) {\n return resultSelector ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\n/**\n * Emits only the first `count` values emitted by the source Observable.\n *\n * <span class=\"informal\">Takes the first `count` values from the source, then\n * completes.</span>\n *\n * <img src=\"./img/take.png\" width=\"100%\">\n *\n * `take` returns an Observable that emits only the first `count` values emitted\n * by the source Observable. If the source emits fewer than `count` values then\n * all of its values are emitted. After that, it completes, regardless if the\n * source completes.\n *\n * @example <caption>Take the first 5 seconds of an infinite 1-second interval Observable</caption>\n * var interval = Rx.Observable.interval(1000);\n * var five = interval.take(5);\n * five.subscribe(x => console.log(x));\n *\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @throws {ArgumentOutOfRangeError} When using `take(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.\n *\n * @param {number} count The maximum number of `next` values to emit.\n * @return {Observable<T>} An Observable that emits only the first `count`\n * values emitted by the source Observable, or all of the values from the source\n * if the source emits fewer than `count` values.\n * @method take\n * @owner Observable\n */\nexport function take(count) {\n return function (source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\nvar TakeOperator = /*@__PURE__*/ (function () {\n function TakeOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n TakeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n };\n return TakeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeSubscriber, _super);\n function TakeSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n TakeSubscriber.prototype._next = function (value) {\n var total = this.total;\n var 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 return TakeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=take.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\n/**\n * Emits only the last `count` values emitted by the source Observable.\n *\n * <span class=\"informal\">Remembers the latest `count` values, then emits those\n * only when the source completes.</span>\n *\n * <img src=\"./img/takeLast.png\" width=\"100%\">\n *\n * `takeLast` returns an Observable that emits at most the last `count` values\n * emitted by the source Observable. If the source emits fewer than `count`\n * values then all of its values are emitted. This operator must wait until the\n * `complete` notification emission from the source in order to emit the `next`\n * values on the output Observable, because otherwise it is impossible to know\n * whether or not more values will be emitted on the source. For this reason,\n * all values are emitted synchronously, followed by the complete notification.\n *\n * @example <caption>Take the last 3 values of an Observable with many values</caption>\n * var many = Rx.Observable.range(1, 100);\n * var lastThree = many.pipe(takeLast(3));\n * lastThree.subscribe(x => console.log(x));\n *\n * @see {@link take}\n * @see {@link takeUntil}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @throws {ArgumentOutOfRangeError} When using `takeLast(i)`, it delivers an\n * ArgumentOutOrRangeError to the Observer's `error` callback if `i < 0`.\n *\n * @param {number} count The maximum number of values to emit from the end of\n * the sequence of values emitted by the source Observable.\n * @return {Observable<T>} An Observable that emits at most the last count\n * values emitted by the source Observable.\n * @method takeLast\n * @owner Observable\n */\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}\nvar TakeLastOperator = /*@__PURE__*/ (function () {\n function TakeLastOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n TakeLastOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeLastSubscriber(subscriber, this.total));\n };\n return TakeLastOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeLastSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeLastSubscriber, _super);\n function TakeLastSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.ring = new Array();\n _this.count = 0;\n return _this;\n }\n TakeLastSubscriber.prototype._next = function (value) {\n var ring = this.ring;\n var total = this.total;\n var count = this.count++;\n if (ring.length < total) {\n ring.push(value);\n }\n else {\n var index = count % total;\n ring[index] = value;\n }\n };\n TakeLastSubscriber.prototype._complete = function () {\n var destination = this.destination;\n var count = this.count;\n if (count > 0) {\n var total = this.count >= this.total ? this.total : this.count;\n var ring = this.ring;\n for (var i = 0; i < total; i++) {\n var idx = (count++) % total;\n destination.next(ring[idx]);\n }\n }\n destination.complete();\n };\n return TakeLastSubscriber;\n}(Subscriber));\n//# sourceMappingURL=takeLast.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Emits the values emitted by the source Observable until a `notifier`\n * Observable emits a value.\n *\n * <span class=\"informal\">Lets values pass until a second Observable,\n * `notifier`, emits a value. Then, it completes.</span>\n *\n * <img src=\"./img/takeUntil.png\" width=\"100%\">\n *\n * `takeUntil` subscribes and begins mirroring the source Observable. It also\n * monitors a second Observable, `notifier` that you provide. If the `notifier`\n * emits a value, the output Observable stops mirroring the source Observable\n * and completes. If the `notifier` doesn't emit any value and completes\n * then `takeUntil` will pass all values.\n *\n * @example <caption>Tick every second until the first click happens</caption>\n * var interval = Rx.Observable.interval(1000);\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = interval.takeUntil(clicks);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link take}\n * @see {@link takeLast}\n * @see {@link takeWhile}\n * @see {@link skip}\n *\n * @param {Observable} notifier The Observable whose first emitted value will\n * cause the output Observable of `takeUntil` to stop emitting values from the\n * source Observable.\n * @return {Observable<T>} An Observable that emits the values from the source\n * Observable until such time as `notifier` emits its first value.\n * @method takeUntil\n * @owner Observable\n */\nexport function takeUntil(notifier) {\n return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nvar TakeUntilOperator = /*@__PURE__*/ (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n var notifierSubscription = subscribeToResult(takeUntilSubscriber, this.notifier);\n if (notifierSubscription && !notifierSubscription.closed) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n };\n return TakeUntilOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination) {\n return _super.call(this, destination) || this;\n }\n TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n // noop\n };\n return TakeUntilSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\n/**\n * Emits values emitted by the source Observable so long as each value satisfies\n * the given `predicate`, and then completes as soon as this `predicate` is not\n * satisfied.\n *\n * <span class=\"informal\">Takes values from the source only while they pass the\n * condition given. When the first value does not satisfy, it completes.</span>\n *\n * <img src=\"./img/takeWhile.png\" width=\"100%\">\n *\n * `takeWhile` subscribes and begins mirroring the source Observable. Each value\n * emitted on the source is given to the `predicate` function which returns a\n * boolean, representing a condition to be satisfied by the source values. The\n * output Observable emits the source values until such time as the `predicate`\n * returns false, at which point `takeWhile` stops mirroring the source\n * Observable and completes the output Observable.\n *\n * @example <caption>Emit click events only while the clientX property is greater than 200</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.takeWhile(ev => ev.clientX > 200);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link take}\n * @see {@link takeLast}\n * @see {@link takeUntil}\n * @see {@link skip}\n *\n * @param {function(value: T, index: number): boolean} predicate A function that\n * evaluates a value emitted by the source Observable and returns a boolean.\n * Also takes the (zero-based) index as the second argument.\n * @return {Observable<T>} An Observable that emits the values from the source\n * Observable so long as each value satisfies the condition defined by the\n * `predicate`, then completes.\n * @method takeWhile\n * @owner Observable\n */\nexport function takeWhile(predicate) {\n return function (source) { return source.lift(new TakeWhileOperator(predicate)); };\n}\nvar TakeWhileOperator = /*@__PURE__*/ (function () {\n function TakeWhileOperator(predicate) {\n this.predicate = predicate;\n }\n TakeWhileOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate));\n };\n return TakeWhileOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeWhileSubscriber, _super);\n function TakeWhileSubscriber(destination, predicate) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.index = 0;\n return _this;\n }\n TakeWhileSubscriber.prototype._next = function (value) {\n var destination = this.destination;\n var 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 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {\n var destination = this.destination;\n if (Boolean(predicateResult)) {\n destination.next(value);\n }\n else {\n destination.complete();\n }\n };\n return TakeWhileSubscriber;\n}(Subscriber));\n//# sourceMappingURL=takeWhile.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\n/* tslint:enable:max-line-length */\n/**\n * Perform a side effect for every emission on the source Observable, but return\n * an Observable that is identical to the source.\n *\n * <span class=\"informal\">Intercepts each emission on the source and runs a\n * function, but returns an output which is identical to the source as long as errors don't occur.</span>\n *\n * <img src=\"./img/do.png\" width=\"100%\">\n *\n * Returns a mirrored Observable of the source Observable, but modified so that\n * the provided Observer is called to perform a side effect for every value,\n * error, and completion emitted by the source. Any errors that are thrown in\n * the aforementioned Observer or handlers are safely sent down the error path\n * of the output Observable.\n *\n * This operator is useful for debugging your Observables for the correct values\n * or performing other side effects.\n *\n * Note: this is different to a `subscribe` on the Observable. If the Observable\n * returned by `do` is not subscribed, the side effects specified by the\n * Observer will never happen. `do` therefore simply spies on existing\n * execution, it does not trigger an execution to happen like `subscribe` does.\n *\n * @example <caption>Map every click to the clientX position of that click, while also logging the click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks\n * .do(ev => console.log(ev))\n * .map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link map}\n * @see {@link subscribe}\n *\n * @param {Observer|function} [nextOrObserver] A normal Observer object or a\n * callback for `next`.\n * @param {function} [error] Callback for errors in the source.\n * @param {function} [complete] Callback for the completion of the source.\n * @return {Observable} An Observable identical to the source, but runs the\n * specified Observer or callback(s) for each item.\n * @name tap\n */\nexport function tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nvar DoOperator = /*@__PURE__*/ (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TapSubscriber, _super);\n function TapSubscriber(destination, observerOrNext, error, complete) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n TapSubscriber.prototype._next = function (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 TapSubscriber.prototype._error = function (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 TapSubscriber.prototype._complete = function () {\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 return TapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=tap.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport var defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for a duration determined by another Observable, then repeats this\n * process.\n *\n * <span class=\"informal\">It's like {@link throttleTime}, but the silencing\n * duration is determined by a second Observable.</span>\n *\n * <img src=\"./img/throttle.png\" width=\"100%\">\n *\n * `throttle` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled by calling the `durationSelector` function with the source value,\n * which returns the \"duration\" Observable. When the duration Observable emits a\n * value or completes, the timer is disabled, and this process repeats for the\n * next source value.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.throttle(ev => Rx.Observable.interval(1000));\n * result.subscribe(x => console.log(x));\n *\n * @see {@link audit}\n * @see {@link debounce}\n * @see {@link delayWhen}\n * @see {@link sample}\n * @see {@link throttleTime}\n *\n * @param {function(value: T): SubscribableOrPromise} durationSelector A function\n * that receives a value from the source Observable, for computing the silencing\n * duration for each source value, returned as an Observable or a Promise.\n * @param {Object} config a configuration object to define `leading` and `trailing` behavior. Defaults\n * to `{ leading: true, trailing: false }`.\n * @return {Observable<T>} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttle\n * @owner Observable\n */\nexport function throttle(durationSelector, config) {\n if (config === void 0) {\n config = defaultThrottleConfig;\n }\n return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };\n}\nvar ThrottleOperator = /*@__PURE__*/ (function () {\n function ThrottleOperator(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n };\n return ThrottleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc\n * @ignore\n * @extends {Ignored}\n */\nvar ThrottleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ThrottleSubscriber, _super);\n function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.durationSelector = durationSelector;\n _this._leading = _leading;\n _this._trailing = _trailing;\n _this._hasValue = false;\n return _this;\n }\n ThrottleSubscriber.prototype._next = function (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 ThrottleSubscriber.prototype.send = function () {\n var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = null;\n };\n ThrottleSubscriber.prototype.throttle = function (value) {\n var duration = this.tryDurationSelector(value);\n if (duration) {\n this.add(this._throttled = subscribeToResult(this, duration));\n }\n };\n ThrottleSubscriber.prototype.tryDurationSelector = function (value) {\n try {\n return this.durationSelector(value);\n }\n catch (err) {\n this.destination.error(err);\n return null;\n }\n };\n ThrottleSubscriber.prototype.throttlingDone = function () {\n var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = null;\n if (_trailing) {\n this.send();\n }\n };\n ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.throttlingDone();\n };\n ThrottleSubscriber.prototype.notifyComplete = function () {\n this.throttlingDone();\n };\n return ThrottleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=throttle.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { async } from '../scheduler/async';\nimport { defaultThrottleConfig } from './throttle';\n/**\n * Emits a value from the source Observable, then ignores subsequent source\n * values for `duration` milliseconds, then repeats this process.\n *\n * <span class=\"informal\">Lets a value pass, then ignores source values for the\n * next `duration` milliseconds.</span>\n *\n * <img src=\"./img/throttleTime.png\" width=\"100%\">\n *\n * `throttleTime` emits the source Observable values on the output Observable\n * when its internal timer is disabled, and ignores source values when the timer\n * is enabled. Initially, the timer is disabled. As soon as the first source\n * value arrives, it is forwarded to the output Observable, and then the timer\n * is enabled. After `duration` milliseconds (or the time unit determined\n * internally by the optional `scheduler`) has passed, the timer is disabled,\n * and this process repeats for the next source value. Optionally takes a\n * {@link IScheduler} for managing timers.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.throttleTime(1000);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link auditTime}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttle}\n *\n * @param {number} duration Time to wait before emitting another value after\n * emitting the last value, measured in milliseconds or the time unit determined\n * internally by the optional `scheduler`.\n * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the throttling.\n * @param {Object} config a configuration object to define `leading` and\n * `trailing` behavior. Defaults to `{ leading: true, trailing: false }`.\n * @return {Observable<T>} An Observable that performs the throttle operation to\n * limit the rate of emissions from the source.\n * @method throttleTime\n * @owner Observable\n */\nexport function throttleTime(duration, scheduler, config) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n if (config === void 0) {\n config = defaultThrottleConfig;\n }\n return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };\n}\nvar ThrottleTimeOperator = /*@__PURE__*/ (function () {\n function ThrottleTimeOperator(duration, scheduler, leading, trailing) {\n this.duration = duration;\n this.scheduler = scheduler;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));\n };\n return ThrottleTimeOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ThrottleTimeSubscriber, _super);\n function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n ThrottleTimeSubscriber.prototype._next = function (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 }\n };\n ThrottleTimeSubscriber.prototype._complete = function () {\n if (this._hasTrailingValue) {\n this.destination.next(this._trailingValue);\n this.destination.complete();\n }\n else {\n this.destination.complete();\n }\n };\n ThrottleTimeSubscriber.prototype.clearThrottle = function () {\n var 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 return ThrottleTimeSubscriber;\n}(Subscriber));\nfunction dispatchNext(arg) {\n var subscriber = arg.subscriber;\n subscriber.clearThrottle();\n}\n//# sourceMappingURL=throttleTime.js.map\n","/** PURE_IMPORTS_START _tap,_util_EmptyError PURE_IMPORTS_END */\nimport { tap } from './tap';\nimport { EmptyError } from '../util/EmptyError';\n/**\n * If the source observable completes without emitting a value, it will emit\n * an error. The error will be created at that time by the optional\n * `errorFactory` argument, otherwise, the error will be {@link ErrorEmpty}.\n *\n * @example\n *\n * const click$ = fromEvent(button, 'click');\n *\n * clicks$.pipe(\n * takeUntil(timer(1000)),\n * throwIfEmpty(\n * () => new Error('the button was not clicked within 1 second')\n * ),\n * )\n * .subscribe({\n * next() { console.log('The button was clicked'); },\n * error(err) { console.error(err); },\n * });\n * @param {Function} [errorFactory] A factory function called to produce the\n * error to be thrown when the source observable completes without emitting a\n * value.\n */\nexport var throwIfEmpty = function (errorFactory) {\n if (errorFactory === void 0) {\n errorFactory = defaultErrorFactory;\n }\n return tap({\n hasValue: false,\n next: function () { this.hasValue = true; },\n complete: function () {\n if (!this.hasValue) {\n throw errorFactory();\n }\n }\n });\n};\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { scan } from './scan';\nimport { defer } from '../observable/defer';\nimport { map } from './map';\nexport function timeInterval(scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return function (source) {\n return defer(function () {\n return source.pipe(\n // HACK: the typings seem off with scan\n scan(function (_a, value) {\n var current = _a.current;\n return ({ value: value, current: scheduler.now(), last: current });\n }, { current: scheduler.now(), value: undefined, last: undefined }), map(function (_a) {\n var current = _a.current, last = _a.last, value = _a.value;\n return new TimeInterval(value, current - last);\n }));\n });\n };\n}\nvar TimeInterval = /*@__PURE__*/ (function () {\n function TimeInterval(value, interval) {\n this.value = value;\n this.interval = interval;\n }\n return TimeInterval;\n}());\nexport { TimeInterval };\n//# sourceMappingURL=timeInterval.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { TimeoutError } from '../util/TimeoutError';\nimport { timeoutWith } from './timeoutWith';\nimport { throwError } from '../observable/throwError';\n/**\n *\n * Errors if Observable does not emit a value in given time span.\n *\n * <span class=\"informal\">Timeouts on Observable that doesn't emit values fast enough.</span>\n *\n * <img src=\"./img/timeout.png\" width=\"100%\">\n *\n * `timeout` operator accepts as an argument either a number or a Date.\n *\n * If number was provided, it returns an Observable that behaves like a source\n * Observable, unless there is a period of time where there is no value emitted.\n * So if you provide `100` as argument and first value comes after 50ms from\n * the moment of subscription, this value will be simply re-emitted by the resulting\n * Observable. If however after that 100ms passes without a second value being emitted,\n * stream will end with an error and source Observable will be unsubscribed.\n * These checks are performed throughout whole lifecycle of Observable - from the moment\n * it was subscribed to, until it completes or errors itself. Thus every value must be\n * emitted within specified period since previous value.\n *\n * If provided argument was Date, returned Observable behaves differently. It throws\n * if Observable did not complete before provided Date. This means that periods between\n * emission of particular values do not matter in this case. If Observable did not complete\n * before provided Date, source Observable will be unsubscribed. Other than that, resulting\n * stream behaves just as source Observable.\n *\n * `timeout` accepts also a Scheduler as a second parameter. It is used to schedule moment (or moments)\n * when returned Observable will check if source stream emitted value or completed.\n *\n * @example <caption>Check if ticks are emitted within certain timespan</caption>\n * const seconds = Rx.Observable.interval(1000);\n *\n * seconds.timeout(1100) // Let's use bigger timespan to be safe,\n * // since `interval` might fire a bit later then scheduled.\n * .subscribe(\n * value => console.log(value), // Will emit numbers just as regular `interval` would.\n * err => console.log(err) // Will never be called.\n * );\n *\n * seconds.timeout(900).subscribe(\n * value => console.log(value), // Will never be called.\n * err => console.log(err) // Will emit error before even first value is emitted,\n * // since it did not arrive within 900ms period.\n * );\n *\n * @example <caption>Use Date to check if Observable completed</caption>\n * const seconds = Rx.Observable.interval(1000);\n *\n * seconds.timeout(new Date(\"December 17, 2020 03:24:00\"))\n * .subscribe(\n * value => console.log(value), // Will emit values as regular `interval` would\n * // until December 17, 2020 at 03:24:00.\n * err => console.log(err) // On December 17, 2020 at 03:24:00 it will emit an error,\n * // since Observable did not complete by then.\n * );\n *\n * @see {@link timeoutWith}\n *\n * @param {number|Date} due Number specifying period within which Observable must emit values\n * or Date specifying before when Observable should complete\n * @param {Scheduler} [scheduler] Scheduler controlling when timeout checks occur.\n * @return {Observable<T>} Observable that mirrors behaviour of source, unless timeout checks fail.\n * @method timeout\n * @owner Observable\n */\nexport function timeout(due, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return timeoutWith(due, throwError(new TimeoutError()), scheduler);\n}\n//# sourceMappingURL=timeout.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/* tslint:enable:max-line-length */\n/**\n *\n * Errors if Observable does not emit a value in given time span, in case of which\n * subscribes to the second Observable.\n *\n * <span class=\"informal\">It's a version of `timeout` operator that let's you specify fallback Observable.</span>\n *\n * <img src=\"./img/timeoutWith.png\" width=\"100%\">\n *\n * `timeoutWith` is a variation of `timeout` operator. It behaves exactly the same,\n * still accepting as a first argument either a number or a Date, which control - respectively -\n * when values of source Observable should be emitted or when it should complete.\n *\n * The only difference is that it accepts a second, required parameter. This parameter\n * should be an Observable which will be subscribed when source Observable fails any timeout check.\n * So whenever regular `timeout` would emit an error, `timeoutWith` will instead start re-emitting\n * values from second Observable. Note that this fallback Observable is not checked for timeouts\n * itself, so it can emit values and complete at arbitrary points in time. From the moment of a second\n * subscription, Observable returned from `timeoutWith` simply mirrors fallback stream. When that\n * stream completes, it completes as well.\n *\n * Scheduler, which in case of `timeout` is provided as as second argument, can be still provided\n * here - as a third, optional parameter. It still is used to schedule timeout checks and -\n * as a consequence - when second Observable will be subscribed, since subscription happens\n * immediately after failing check.\n *\n * @example <caption>Add fallback observable</caption>\n * const seconds = Rx.Observable.interval(1000);\n * const minutes = Rx.Observable.interval(60 * 1000);\n *\n * seconds.timeoutWith(900, minutes)\n * .subscribe(\n * value => console.log(value), // After 900ms, will start emitting `minutes`,\n * // since first value of `seconds` will not arrive fast enough.\n * err => console.log(err) // Would be called after 900ms in case of `timeout`,\n * // but here will never be called.\n * );\n *\n * @param {number|Date} due Number specifying period within which Observable must emit values\n * or Date specifying before when Observable should complete\n * @param {Observable<T>} withObservable Observable which will be subscribed if source fails timeout check.\n * @param {Scheduler} [scheduler] Scheduler controlling when timeout checks occur.\n * @return {Observable<T>} Observable that mirrors behaviour of source or, when timeout check fails, of an Observable\n * passed as a second parameter.\n * @method timeoutWith\n * @owner Observable\n */\nexport function timeoutWith(due, withObservable, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return function (source) {\n var absoluteTimeout = isDate(due);\n var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);\n return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));\n };\n}\nvar TimeoutWithOperator = /*@__PURE__*/ (function () {\n function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {\n this.waitFor = waitFor;\n this.absoluteTimeout = absoluteTimeout;\n this.withObservable = withObservable;\n this.scheduler = scheduler;\n }\n TimeoutWithOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));\n };\n return TimeoutWithOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TimeoutWithSubscriber, _super);\n function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.absoluteTimeout = absoluteTimeout;\n _this.waitFor = waitFor;\n _this.withObservable = withObservable;\n _this.scheduler = scheduler;\n _this.action = null;\n _this.scheduleTimeout();\n return _this;\n }\n TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {\n var withObservable = subscriber.withObservable;\n subscriber._unsubscribeAndRecycle();\n subscriber.add(subscribeToResult(subscriber, withObservable));\n };\n TimeoutWithSubscriber.prototype.scheduleTimeout = function () {\n var action = this.action;\n if (action) {\n // Recycle the action if we've already scheduled one. All the production\n // Scheduler Actions mutate their state/delay time and return themeselves.\n // VirtualActions are immutable, so they create and return a clone. In this\n // case, we need to set the action reference to the most recent VirtualAction,\n // to ensure that's the one we clone from next time.\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 TimeoutWithSubscriber.prototype._next = function (value) {\n if (!this.absoluteTimeout) {\n this.scheduleTimeout();\n }\n _super.prototype._next.call(this, value);\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n TimeoutWithSubscriber.prototype._unsubscribe = function () {\n this.action = null;\n this.scheduler = null;\n this.withObservable = null;\n };\n return TimeoutWithSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=timeoutWith.js.map\n","/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */\nimport { async } from '../scheduler/async';\nimport { map } from './map';\n/**\n * @param scheduler\n * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}\n * @method timestamp\n * @owner Observable\n */\nexport function timestamp(scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n return map(function (value) { return new Timestamp(value, scheduler.now()); });\n // return (source: Observable<T>) => source.lift(new TimestampOperator(scheduler));\n}\nvar Timestamp = /*@__PURE__*/ (function () {\n function Timestamp(value, timestamp) {\n this.value = value;\n this.timestamp = timestamp;\n }\n return Timestamp;\n}());\nexport { Timestamp };\n//# sourceMappingURL=timestamp.js.map\n","/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */\nimport { 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\n","/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Branch out the source Observable values as a nested Observable whenever\n * `windowBoundaries` emits.\n *\n * <span class=\"informal\">It's like {@link buffer}, but emits a nested Observable\n * instead of an array.</span>\n *\n * <img src=\"./img/window.png\" width=\"100%\">\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits connected, non-overlapping\n * windows. It emits the current window and opens a new one whenever the\n * Observable `windowBoundaries` emits an item. Because each window is an\n * Observable, the output is a higher-order Observable.\n *\n * @example <caption>In every window of 1 second each, emit at most 2 click events</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var interval = Rx.Observable.interval(1000);\n * var result = clicks.window(interval)\n * .map(win => win.take(2)) // each window has at most 2 emissions\n * .mergeAll(); // flatten the Observable-of-Observables\n * result.subscribe(x => console.log(x));\n *\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link windowWhen}\n * @see {@link buffer}\n *\n * @param {Observable<any>} windowBoundaries An Observable that completes the\n * previous window and starts a new window.\n * @return {Observable<Observable<T>>} An Observable of windows, which are\n * Observables emitting values of the source Observable.\n * @method window\n * @owner Observable\n */\nexport function window(windowBoundaries) {\n return function windowOperatorFunction(source) {\n return source.lift(new WindowOperator(windowBoundaries));\n };\n}\nvar WindowOperator = /*@__PURE__*/ (function () {\n function WindowOperator(windowBoundaries) {\n this.windowBoundaries = windowBoundaries;\n }\n WindowOperator.prototype.call = function (subscriber, source) {\n var windowSubscriber = new WindowSubscriber(subscriber);\n var sourceSubscription = source.subscribe(windowSubscriber);\n if (!sourceSubscription.closed) {\n windowSubscriber.add(subscribeToResult(windowSubscriber, this.windowBoundaries));\n }\n return sourceSubscription;\n };\n return WindowOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WindowSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WindowSubscriber, _super);\n function WindowSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.window = new Subject();\n destination.next(_this.window);\n return _this;\n }\n WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openWindow();\n };\n WindowSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n WindowSubscriber.prototype.notifyComplete = function (innerSub) {\n this._complete();\n };\n WindowSubscriber.prototype._next = function (value) {\n this.window.next(value);\n };\n WindowSubscriber.prototype._error = function (err) {\n this.window.error(err);\n this.destination.error(err);\n };\n WindowSubscriber.prototype._complete = function () {\n this.window.complete();\n this.destination.complete();\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n WindowSubscriber.prototype._unsubscribe = function () {\n this.window = null;\n };\n WindowSubscriber.prototype.openWindow = function () {\n var prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n var destination = this.destination;\n var newWindow = this.window = new Subject();\n destination.next(newWindow);\n };\n return WindowSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=window.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subject } from '../Subject';\n/**\n * Branch out the source Observable values as a nested Observable with each\n * nested Observable emitting at most `windowSize` values.\n *\n * <span class=\"informal\">It's like {@link bufferCount}, but emits a nested\n * Observable instead of an array.</span>\n *\n * <img src=\"./img/windowCount.png\" width=\"100%\">\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits windows every `startWindowEvery`\n * items, each containing no more than `windowSize` items. When the source\n * Observable completes or encounters an error, the output Observable emits\n * the current window and propagates the notification from the source\n * Observable. If `startWindowEvery` is not provided, then new windows are\n * started immediately at the start of the source and when each window completes\n * with size `windowSize`.\n *\n * @example <caption>Ignore every 3rd click event, starting from the first one</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.windowCount(3)\n * .map(win => win.skip(1)) // skip first of every 3 clicks\n * .mergeAll(); // flatten the Observable-of-Observables\n * result.subscribe(x => console.log(x));\n *\n * @example <caption>Ignore every 3rd click event, starting from the third one</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.windowCount(2, 3)\n * .mergeAll(); // flatten the Observable-of-Observables\n * result.subscribe(x => console.log(x));\n *\n * @see {@link window}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link windowWhen}\n * @see {@link bufferCount}\n *\n * @param {number} windowSize The maximum number of values emitted by each\n * window.\n * @param {number} [startWindowEvery] Interval at which to start a new window.\n * For example if `startWindowEvery` is `2`, then a new window will be started\n * on every other value from the source. A new window is started at the\n * beginning of the source by default.\n * @return {Observable<Observable<T>>} An Observable of windows, which in turn\n * are Observable of values.\n * @method windowCount\n * @owner Observable\n */\nexport function windowCount(windowSize, startWindowEvery) {\n if (startWindowEvery === void 0) {\n startWindowEvery = 0;\n }\n return function windowCountOperatorFunction(source) {\n return source.lift(new WindowCountOperator(windowSize, startWindowEvery));\n };\n}\nvar WindowCountOperator = /*@__PURE__*/ (function () {\n function WindowCountOperator(windowSize, startWindowEvery) {\n this.windowSize = windowSize;\n this.startWindowEvery = startWindowEvery;\n }\n WindowCountOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));\n };\n return WindowCountOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WindowCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WindowCountSubscriber, _super);\n function WindowCountSubscriber(destination, windowSize, startWindowEvery) {\n var _this = _super.call(this, destination) || this;\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 return _this;\n }\n WindowCountSubscriber.prototype._next = function (value) {\n var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;\n var destination = this.destination;\n var windowSize = this.windowSize;\n var windows = this.windows;\n var len = windows.length;\n for (var i = 0; i < len && !this.closed; i++) {\n windows[i].next(value);\n }\n var 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 var window_1 = new Subject();\n windows.push(window_1);\n destination.next(window_1);\n }\n };\n WindowCountSubscriber.prototype._error = function (err) {\n var 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 WindowCountSubscriber.prototype._complete = function () {\n var 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 WindowCountSubscriber.prototype._unsubscribe = function () {\n this.count = 0;\n this.windows = null;\n };\n return WindowCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=windowCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { 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 var scheduler = async;\n var windowCreationInterval = null;\n var 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 = arguments[2];\n }\n if (isScheduler(arguments[1])) {\n scheduler = arguments[1];\n }\n else if (isNumeric(arguments[1])) {\n windowCreationInterval = arguments[1];\n }\n return function windowTimeOperatorFunction(source) {\n return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));\n };\n}\nvar WindowTimeOperator = /*@__PURE__*/ (function () {\n function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n this.windowTimeSpan = windowTimeSpan;\n this.windowCreationInterval = windowCreationInterval;\n this.maxWindowSize = maxWindowSize;\n this.scheduler = scheduler;\n }\n WindowTimeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));\n };\n return WindowTimeOperator;\n}());\nvar CountedSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CountedSubject, _super);\n function CountedSubject() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this._numberOfNextedValues = 0;\n return _this;\n }\n CountedSubject.prototype.next = function (value) {\n this._numberOfNextedValues++;\n _super.prototype.next.call(this, value);\n };\n Object.defineProperty(CountedSubject.prototype, \"numberOfNextedValues\", {\n get: function () {\n return this._numberOfNextedValues;\n },\n enumerable: true,\n configurable: true\n });\n return CountedSubject;\n}(Subject));\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WindowTimeSubscriber, _super);\n function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.windowTimeSpan = windowTimeSpan;\n _this.windowCreationInterval = windowCreationInterval;\n _this.maxWindowSize = maxWindowSize;\n _this.scheduler = scheduler;\n _this.windows = [];\n var window = _this.openWindow();\n if (windowCreationInterval !== null && windowCreationInterval >= 0) {\n var closeState = { subscriber: _this, window: window, context: null };\n var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };\n _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));\n _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));\n }\n else {\n var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };\n _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));\n }\n return _this;\n }\n WindowTimeSubscriber.prototype._next = function (value) {\n var windows = this.windows;\n var len = windows.length;\n for (var i = 0; i < len; i++) {\n var window_1 = windows[i];\n if (!window_1.closed) {\n window_1.next(value);\n if (window_1.numberOfNextedValues >= this.maxWindowSize) {\n this.closeWindow(window_1);\n }\n }\n }\n };\n WindowTimeSubscriber.prototype._error = function (err) {\n var windows = this.windows;\n while (windows.length > 0) {\n windows.shift().error(err);\n }\n this.destination.error(err);\n };\n WindowTimeSubscriber.prototype._complete = function () {\n var windows = this.windows;\n while (windows.length > 0) {\n var window_2 = windows.shift();\n if (!window_2.closed) {\n window_2.complete();\n }\n }\n this.destination.complete();\n };\n WindowTimeSubscriber.prototype.openWindow = function () {\n var window = new CountedSubject();\n this.windows.push(window);\n var destination = this.destination;\n destination.next(window);\n return window;\n };\n WindowTimeSubscriber.prototype.closeWindow = function (window) {\n window.complete();\n var windows = this.windows;\n windows.splice(windows.indexOf(window), 1);\n };\n return WindowTimeSubscriber;\n}(Subscriber));\nfunction dispatchWindowTimeSpanOnly(state) {\n var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;\n if (window) {\n subscriber.closeWindow(window);\n }\n state.window = subscriber.openWindow();\n this.schedule(state, windowTimeSpan);\n}\nfunction dispatchWindowCreation(state) {\n var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;\n var window = subscriber.openWindow();\n var action = this;\n var context = { action: action, subscription: null };\n var timeSpanState = { subscriber: subscriber, window: window, context: context };\n context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);\n action.add(context.subscription);\n action.schedule(state, windowCreationInterval);\n}\nfunction dispatchWindowClose(state) {\n var subscriber = state.subscriber, window = state.window, context = state.context;\n if (context && context.action && context.subscription) {\n context.action.remove(context.subscription);\n }\n subscriber.closeWindow(window);\n}\n//# sourceMappingURL=windowTime.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { Subscription } from '../Subscription';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Branch out the source Observable values as a nested Observable starting from\n * an emission from `openings` and ending when the output of `closingSelector`\n * emits.\n *\n * <span class=\"informal\">It's like {@link bufferToggle}, but emits a nested\n * Observable instead of an array.</span>\n *\n * <img src=\"./img/windowToggle.png\" width=\"100%\">\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits windows that contain those items\n * emitted by the source Observable between the time when the `openings`\n * Observable emits an item and when the Observable returned by\n * `closingSelector` emits an item.\n *\n * @example <caption>Every other second, emit the click events from the next 500ms</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var openings = Rx.Observable.interval(1000);\n * var result = clicks.windowToggle(openings, i =>\n * i % 2 ? Rx.Observable.interval(500) : Rx.Observable.empty()\n * ).mergeAll();\n * result.subscribe(x => console.log(x));\n *\n * @see {@link window}\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowWhen}\n * @see {@link bufferToggle}\n *\n * @param {Observable<O>} openings An observable of notifications to start new\n * windows.\n * @param {function(value: O): Observable} closingSelector A function that takes\n * the value emitted by the `openings` observable and returns an Observable,\n * which, when it emits (either `next` or `complete`), signals that the\n * associated window should complete.\n * @return {Observable<Observable<T>>} An observable of windows, which in turn\n * are Observables.\n * @method windowToggle\n * @owner Observable\n */\nexport function windowToggle(openings, closingSelector) {\n return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };\n}\nvar WindowToggleOperator = /*@__PURE__*/ (function () {\n function WindowToggleOperator(openings, closingSelector) {\n this.openings = openings;\n this.closingSelector = closingSelector;\n }\n WindowToggleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));\n };\n return WindowToggleOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WindowToggleSubscriber, _super);\n function WindowToggleSubscriber(destination, openings, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.openings = openings;\n _this.closingSelector = closingSelector;\n _this.contexts = [];\n _this.add(_this.openSubscription = subscribeToResult(_this, openings, openings));\n return _this;\n }\n WindowToggleSubscriber.prototype._next = function (value) {\n var contexts = this.contexts;\n if (contexts) {\n var len = contexts.length;\n for (var i = 0; i < len; i++) {\n contexts[i].window.next(value);\n }\n }\n };\n WindowToggleSubscriber.prototype._error = function (err) {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_1 = contexts[index];\n context_1.window.error(err);\n context_1.subscription.unsubscribe();\n }\n }\n _super.prototype._error.call(this, err);\n };\n WindowToggleSubscriber.prototype._complete = function () {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_2 = contexts[index];\n context_2.window.complete();\n context_2.subscription.unsubscribe();\n }\n }\n _super.prototype._complete.call(this);\n };\n /** @deprecated This is an internal implementation detail, do not use. */\n WindowToggleSubscriber.prototype._unsubscribe = function () {\n var contexts = this.contexts;\n this.contexts = null;\n if (contexts) {\n var len = contexts.length;\n var index = -1;\n while (++index < len) {\n var context_3 = contexts[index];\n context_3.window.unsubscribe();\n context_3.subscription.unsubscribe();\n }\n }\n };\n WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n if (outerValue === this.openings) {\n var closingSelector = this.closingSelector;\n var closingNotifier = tryCatch(closingSelector)(innerValue);\n if (closingNotifier === errorObject) {\n return this.error(errorObject.e);\n }\n else {\n var window_1 = new Subject();\n var subscription = new Subscription();\n var context_4 = { window: window_1, subscription: subscription };\n this.contexts.push(context_4);\n var innerSubscription = subscribeToResult(this, closingNotifier, context_4);\n if (innerSubscription.closed) {\n this.closeWindow(this.contexts.length - 1);\n }\n else {\n innerSubscription.context = context_4;\n subscription.add(innerSubscription);\n }\n this.destination.next(window_1);\n }\n }\n else {\n this.closeWindow(this.contexts.indexOf(outerValue));\n }\n };\n WindowToggleSubscriber.prototype.notifyError = function (err) {\n this.error(err);\n };\n WindowToggleSubscriber.prototype.notifyComplete = function (inner) {\n if (inner !== this.openSubscription) {\n this.closeWindow(this.contexts.indexOf(inner.context));\n }\n };\n WindowToggleSubscriber.prototype.closeWindow = function (index) {\n if (index === -1) {\n return;\n }\n var contexts = this.contexts;\n var context = contexts[index];\n var window = context.window, subscription = context.subscription;\n contexts.splice(index, 1);\n window.complete();\n subscription.unsubscribe();\n };\n return WindowToggleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=windowToggle.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_util_tryCatch,_util_errorObject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from '../Subject';\nimport { tryCatch } from '../util/tryCatch';\nimport { errorObject } from '../util/errorObject';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/**\n * Branch out the source Observable values as a nested Observable using a\n * factory function of closing Observables to determine when to start a new\n * window.\n *\n * <span class=\"informal\">It's like {@link bufferWhen}, but emits a nested\n * Observable instead of an array.</span>\n *\n * <img src=\"./img/windowWhen.png\" width=\"100%\">\n *\n * Returns an Observable that emits windows of items it collects from the source\n * Observable. The output Observable emits connected, non-overlapping windows.\n * It emits the current window and opens a new one whenever the Observable\n * produced by the specified `closingSelector` function emits an item. The first\n * window is opened immediately when subscribing to the output Observable.\n *\n * @example <caption>Emit only the first two clicks events in every window of [1-5] random seconds</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks\n * .windowWhen(() => Rx.Observable.interval(1000 + Math.random() * 4000))\n * .map(win => win.take(2)) // each window has at most 2 emissions\n * .mergeAll(); // flatten the Observable-of-Observables\n * result.subscribe(x => console.log(x));\n *\n * @see {@link window}\n * @see {@link windowCount}\n * @see {@link windowTime}\n * @see {@link windowToggle}\n * @see {@link bufferWhen}\n *\n * @param {function(): Observable} closingSelector A function that takes no\n * arguments and returns an Observable that signals (on either `next` or\n * `complete`) when to close the previous window and start a new one.\n * @return {Observable<Observable<T>>} An observable of windows, which in turn\n * are Observables.\n * @method windowWhen\n * @owner Observable\n */\nexport function windowWhen(closingSelector) {\n return function windowWhenOperatorFunction(source) {\n return source.lift(new WindowOperator(closingSelector));\n };\n}\nvar WindowOperator = /*@__PURE__*/ (function () {\n function WindowOperator(closingSelector) {\n this.closingSelector = closingSelector;\n }\n WindowOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));\n };\n return WindowOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WindowSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WindowSubscriber, _super);\n function WindowSubscriber(destination, closingSelector) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.closingSelector = closingSelector;\n _this.openWindow();\n return _this;\n }\n WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.openWindow(innerSub);\n };\n WindowSubscriber.prototype.notifyError = function (error, innerSub) {\n this._error(error);\n };\n WindowSubscriber.prototype.notifyComplete = function (innerSub) {\n this.openWindow(innerSub);\n };\n WindowSubscriber.prototype._next = function (value) {\n this.window.next(value);\n };\n WindowSubscriber.prototype._error = function (err) {\n this.window.error(err);\n this.destination.error(err);\n this.unsubscribeClosingNotification();\n };\n WindowSubscriber.prototype._complete = function () {\n this.window.complete();\n this.destination.complete();\n this.unsubscribeClosingNotification();\n };\n WindowSubscriber.prototype.unsubscribeClosingNotification = function () {\n if (this.closingNotification) {\n this.closingNotification.unsubscribe();\n }\n };\n WindowSubscriber.prototype.openWindow = function (innerSub) {\n if (innerSub === void 0) {\n innerSub = null;\n }\n if (innerSub) {\n this.remove(innerSub);\n innerSub.unsubscribe();\n }\n var prevWindow = this.window;\n if (prevWindow) {\n prevWindow.complete();\n }\n var window = this.window = new Subject();\n this.destination.next(window);\n var closingNotifier = tryCatch(this.closingSelector)();\n if (closingNotifier === errorObject) {\n var err = errorObject.e;\n this.destination.error(err);\n this.window.error(err);\n }\n else {\n this.add(this.closingNotification = subscribeToResult(this, closingNotifier));\n }\n };\n return WindowSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=windowWhen.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\n/* tslint:enable:max-line-length */\n/**\n * Combines the source Observable with other Observables to create an Observable\n * whose values are calculated from the latest values of each, only when the\n * source emits.\n *\n * <span class=\"informal\">Whenever the source Observable emits a value, it\n * computes a formula using that value plus the latest values from other input\n * Observables, then emits the output of that formula.</span>\n *\n * <img src=\"./img/withLatestFrom.png\" width=\"100%\">\n *\n * `withLatestFrom` combines each value from the source Observable (the\n * instance) with the latest values from the other input Observables only when\n * the source emits a value, optionally using a `project` function to determine\n * the value to be emitted on the output Observable. All input Observables must\n * emit at least one value before the output Observable will emit a value.\n *\n * @example <caption>On every click event, emit an array with the latest timer event plus the click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var timer = Rx.Observable.interval(1000);\n * var result = clicks.withLatestFrom(timer);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link combineLatest}\n *\n * @param {ObservableInput} other An input Observable to combine with the source\n * Observable. More than one input Observables may be given as argument.\n * @param {Function} [project] Projection function for combining values\n * together. Receives all values in order of the Observables passed, where the\n * first parameter is a value from the source Observable. (e.g.\n * `a.withLatestFrom(b, c, (a1, b1, c1) => a1 + b1 + c1)`). If this is not\n * passed, arrays will be emitted on the output Observable.\n * @return {Observable} An Observable of projected values from the most recent\n * values from each input Observable, or an array of the most recent values from\n * each input Observable.\n * @method withLatestFrom\n * @owner Observable\n */\nexport function withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (source) {\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\nvar WithLatestFromOperator = /*@__PURE__*/ (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n var _this = _super.call(this, destination) || this;\n _this.observables = observables;\n _this.project = project;\n _this.toRespond = [];\n var len = observables.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n _this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n _this.add(subscribeToResult(_this, observable, observable, i));\n }\n return _this;\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n // noop\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var 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 return WithLatestFromSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.js.map\n","/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */\nimport { zip as zipStatic } from '../observable/zip';\n/* tslint:enable:max-line-length */\n/**\n * @deprecated Deprecated in favor of static zip.\n */\nexport function zip() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return function zipOperatorFunction(source) {\n return source.lift.call(zipStatic.apply(void 0, [source].concat(observables)));\n };\n}\n//# sourceMappingURL=zip.js.map\n","/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */\nimport { ZipOperator } from '../observable/zip';\nexport function zipAll(project) {\n return function (source) { return source.lift(new ZipOperator(project)); };\n}\n//# sourceMappingURL=zipAll.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\n/**\n * A unit of work to be executed in a {@link Scheduler}. An action is typically\n * created from within a Scheduler and an RxJS user does not need to concern\n * themselves about creating and manipulating an Action.\n *\n * ```ts\n * class Action<T> extends Subscription {\n * new (scheduler: Scheduler, work: (state?: T) => void);\n * schedule(state?: T, delay: number = 0): Subscription;\n * }\n * ```\n *\n * @class Action<T>\n */\nvar Action = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n /**\n * Schedules this action on its parent Scheduler for execution. May be passed\n * some context object, `state`. May happen at some point in the future,\n * according to the `delay` parameter, if specified.\n * @param {T} [state] Some contextual data that the `work` function uses when\n * called by the Scheduler.\n * @param {number} [delay] Time to wait before executing the work, where the\n * time unit is implicit and defined by the Scheduler.\n * @return {void}\n */\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AnimationFrameAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If an animation frame has already been requested, don't request another\n // one. If an animation frame hasn't been requested yet, request one. Return\n // the current animation frame request id.\n return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n // If the scheduler queue is empty, cancel the requested animation frame and\n // set the scheduled flag to undefined so the next AnimationFrameAction will\n // request its own.\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var 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 return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Immediate } from '../util/Immediate';\nimport { AsyncAction } from './AsyncAction';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AsapAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsapAction, _super);\n function AsapAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If delay is greater than 0, request as an async action.\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n // Push the action to the end of the scheduler queue.\n scheduler.actions.push(this);\n // If a microtask has already been scheduled, don't schedule another\n // one. If a microtask hasn't been scheduled yet, schedule one now. Return\n // the current scheduled microtask id.\n return scheduler.scheduled || (scheduler.scheduled = Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));\n };\n AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n // If the scheduler queue is empty, cancel the requested microtask and\n // set the scheduled flag to undefined so the next AsapAction will schedule\n // its own.\n if (scheduler.actions.length === 0) {\n Immediate.clearImmediate(id);\n scheduler.scheduled = undefined;\n }\n // Return undefined so the action knows to request a new async id if it's rescheduled.\n return undefined;\n };\n return AsapAction;\n}(AsyncAction));\nexport { AsapAction };\n//# sourceMappingURL=AsapAction.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AsapScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsapScheduler, _super);\n function AsapScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AsapScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var 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 return AsapScheduler;\n}(AsyncScheduler));\nexport { AsapScheduler };\n//# sourceMappingURL=AsapScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Action } from './Action';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar AsyncAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (this.closed) {\n return this;\n }\n // Always replace the current state with the new state.\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n //\n // Important implementation note:\n //\n // Actions only execute once by default, unless rescheduled from within the\n // scheduled callback. This allows us to implement single and repeat\n // actions via the same code path, without adding API surface area, as well\n // as mimic traditional recursion but across asynchronous boundaries.\n //\n // However, JS runtimes and timers distinguish between intervals achieved by\n // serial `setTimeout` calls vs. a single `setInterval` call. An interval of\n // serial `setTimeout` calls can be individually delayed, which delays\n // scheduling the next `setTimeout`, and so on. `setInterval` attempts to\n // guarantee the interval callback will be invoked more precisely to the\n // interval period, regardless of load.\n //\n // Therefore, we use `setInterval` to schedule single and repeat actions.\n // If the action reschedules itself with the same delay, the interval is not\n // canceled. If the action doesn't reschedule, or reschedules with a\n // different delay, the interval will be canceled after scheduled callback\n // execution.\n //\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n // Set the pending flag indicating that this action has been scheduled, or\n // has recursively rescheduled itself.\n this.pending = true;\n this.delay = delay;\n // If this action has already an async Id, don't request a new one.\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If this action is rescheduled with the same delay time, don't clear the interval id.\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n // Otherwise, if the action's delay time is different from the current delay,\n // or the action has been rescheduled before it's executed, clear the interval id\n return clearInterval(id) && undefined || undefined;\n };\n /**\n * Immediately executes this action and the `work` it contains.\n * @return {any}\n */\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n // Dequeue if the action didn't reschedule itself. Don't call\n // unsubscribe(), because the action could reschedule later.\n // For example:\n // ```\n // scheduler.schedule(function doWork(counter) {\n // /* ... I'm a busy worker bee ... */\n // var originalAction = this;\n // /* wait 100ms before rescheduling the action */\n // setTimeout(function () {\n // originalAction.schedule(counter + 1);\n // }, 100);\n // }, 1000);\n // ```\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var 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 /** @deprecated This is an internal implementation detail, do not use. */\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var 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 return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map\n","/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n var _this = _super.call(this, SchedulerAction, function () {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {\n return AsyncScheduler.delegate.now();\n }\n else {\n return now();\n }\n }) || this;\n _this.actions = [];\n /**\n * A flag to indicate whether the Scheduler is currently executing a batch of\n * queued actions.\n * @type {boolean}\n */\n _this.active = false;\n /**\n * An internal ID used to track the latest asynchronous task such as those\n * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and\n * others.\n * @type {any}\n */\n _this.scheduled = undefined;\n return _this;\n }\n AsyncScheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.schedule(work, delay, state);\n }\n else {\n return _super.prototype.schedule.call(this, work, delay, state);\n }\n };\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this.active) {\n actions.push(action);\n return;\n }\n var error;\n this.active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift()); // exhaust the scheduler queue\n this.active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar QueueAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return (delay > 0 || this.closed) ?\n _super.prototype.execute.call(this, state, delay) :\n this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n // If delay exists and is greater than 0, or if the delay is null (the\n // action wasn't rescheduled) but was originally scheduled as an async\n // action, then recycle as an async action.\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n // Otherwise flush the scheduler starting with this action.\n return scheduler.flush(this);\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(SchedulerAction, maxFrames) {\n if (SchedulerAction === void 0) {\n SchedulerAction = VirtualAction;\n }\n if (maxFrames === void 0) {\n maxFrames = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n /**\n * Prompt the Scheduler to execute all of its queued actions, therefore\n * clearing its queue.\n * @return {void}\n */\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error, action;\n while ((action = actions.shift()) && (this.frame = action.delay) <= maxFrames) {\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 VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nvar VirtualAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) {\n index = scheduler.index += 1;\n }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n // If an action is rescheduled, we save allocations by mutating its state,\n // pushing it to the end of the scheduler queue, and recycling the action.\n // But since the VirtualTimeScheduler is used for testing, VirtualActions\n // must be immutable so they can be inspected later.\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return true;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (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 return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map\n","/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */\nimport { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\n/**\n *\n * Animation Frame Scheduler\n *\n * <span class=\"informal\">Perform task when `window.requestAnimationFrame` would fire</span>\n *\n * When `animationFrame` scheduler is used with delay, it will fall back to {@link async} scheduler\n * behaviour.\n *\n * Without delay, `animationFrame` scheduler can be used to create smooth browser animations.\n * It makes sure scheduled task will happen just before next browser content repaint,\n * thus performing animations as efficiently as possible.\n *\n * @example <caption>Schedule div height animation</caption>\n * const div = document.querySelector('.some-div');\n *\n * Rx.Scheduler.animationFrame.schedule(function(height) {\n * div.style.height = height + \"px\";\n *\n * this.schedule(height + 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * }, 0, 0);\n *\n * // You will see .some-div element growing in height\n *\n *\n * @static true\n * @name animationFrame\n * @owner Scheduler\n */\nexport var animationFrame = /*@__PURE__*/ new AnimationFrameScheduler(AnimationFrameAction);\n//# sourceMappingURL=animationFrame.js.map\n","/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */\nimport { AsapAction } from './AsapAction';\nimport { AsapScheduler } from './AsapScheduler';\n/**\n *\n * Asap Scheduler\n *\n * <span class=\"informal\">Perform task as fast as it can be performed asynchronously</span>\n *\n * `asap` scheduler behaves the same as {@link async} scheduler when you use it to delay task\n * in time. If however you set delay to `0`, `asap` will wait for current synchronously executing\n * code to end and then it will try to execute given task as fast as possible.\n *\n * `asap` scheduler will do its best to minimize time between end of currently executing code\n * and start of scheduled task. This makes it best candidate for performing so called \"deferring\".\n * Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves\n * some (although minimal) unwanted delay.\n *\n * Note that using `asap` scheduler does not necessarily mean that your task will be first to process\n * after currently executing code. In particular, if some task was also scheduled with `asap` before,\n * that task will execute first. That being said, if you need to schedule task asynchronously, but\n * as soon as possible, `asap` scheduler is your best bet.\n *\n * @example <caption>Compare async and asap scheduler</caption>\n *\n * Rx.Scheduler.async.schedule(() => console.log('async')); // scheduling 'async' first...\n * Rx.Scheduler.asap.schedule(() => console.log('asap'));\n *\n * // Logs:\n * // \"asap\"\n * // \"async\"\n * // ... but 'asap' goes first!\n *\n * @static true\n * @name asap\n * @owner Scheduler\n */\nexport var asap = /*@__PURE__*/ new AsapScheduler(AsapAction);\n//# sourceMappingURL=asap.js.map\n","/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\n/**\n *\n * Async Scheduler\n *\n * <span class=\"informal\">Schedule task as if you used setTimeout(task, duration)</span>\n *\n * `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript\n * event loop queue. It is best used to delay tasks in time or to schedule tasks repeating\n * in intervals.\n *\n * If you just want to \"defer\" task, that is to perform it right after currently\n * executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),\n * better choice will be the {@link asap} scheduler.\n *\n * @example <caption>Use async scheduler to delay task</caption>\n * const task = () => console.log('it works!');\n *\n * Rx.Scheduler.async.schedule(task, 2000);\n *\n * // After 2 seconds logs:\n * // \"it works!\"\n *\n *\n * @example <caption>Use async scheduler to repeat task in intervals</caption>\n * function task(state) {\n * console.log(state);\n * this.schedule(state + 1, 1000); // `this` references currently executing Action,\n * // which we reschedule with new state and delay\n * }\n *\n * Rx.Scheduler.async.schedule(task, 3000, 0);\n *\n * // Logs:\n * // 0 after 3s\n * // 1 after 4s\n * // 2 after 5s\n * // 3 after 6s\n *\n * @static true\n * @name async\n * @owner Scheduler\n */\nexport var async = /*@__PURE__*/ new AsyncScheduler(AsyncAction);\n//# sourceMappingURL=async.js.map\n","/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */\nimport { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\n/**\n *\n * Queue Scheduler\n *\n * <span class=\"informal\">Put every next task on a queue, instead of executing it immediately</span>\n *\n * `queue` scheduler, when used with delay, behaves the same as {@link async} scheduler.\n *\n * When used without delay, it schedules given task synchronously - executes it right when\n * it is scheduled. However when called recursively, that is when inside the scheduled task,\n * another task is scheduled with queue scheduler, instead of executing immediately as well,\n * that task will be put on a queue and wait for current one to finish.\n *\n * This means that when you execute task with `queue` scheduler, you are sure it will end\n * before any other task scheduled with that scheduler will start.\n *\n * @examples <caption>Schedule recursively first, then do something</caption>\n *\n * Rx.Scheduler.queue.schedule(() => {\n * Rx.Scheduler.queue.schedule(() => console.log('second')); // will not happen now, but will be put on a queue\n *\n * console.log('first');\n * });\n *\n * // Logs:\n * // \"first\"\n * // \"second\"\n *\n *\n * @example <caption>Reschedule itself recursively</caption>\n *\n * Rx.Scheduler.queue.schedule(function(state) {\n * if (state !== 0) {\n * console.log('before', state);\n * this.schedule(state - 1); // `this` references currently executing Action,\n * // which we reschedule with new state\n * console.log('after', state);\n * }\n * }, 0, 3);\n *\n * // In scheduler that runs recursively, you would expect:\n * // \"before\", 3\n * // \"before\", 2\n * // \"before\", 1\n * // \"after\", 1\n * // \"after\", 2\n * // \"after\", 3\n *\n * // But with queue it logs:\n * // \"before\", 3\n * // \"after\", 3\n * // \"before\", 2\n * // \"after\", 2\n * // \"before\", 1\n * // \"after\", 1\n *\n *\n * @static true\n * @name queue\n * @owner Scheduler\n */\nexport var queue = /*@__PURE__*/ new QueueScheduler(QueueAction);\n//# sourceMappingURL=queue.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = /*@__PURE__*/ getSymbolIterator();\n/**\n * @deprecated use {@link iterator} instead\n */\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\n","/** Symbol.observable or a string \"@@observable\". Used for interop */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';\n//# sourceMappingURL=observable.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function')\n ? /*@__PURE__*/ Symbol.for('rxSubscriber')\n : '@@rxSubscriber';\n/**\n * @deprecated use rxSubscriber instead\n */\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\n/**\n * An error thrown when an element was queried at a certain index of an\n * Observable, but no such index or position exists in that sequence.\n *\n * @see {@link elementAt}\n * @see {@link take}\n * @see {@link takeLast}\n *\n * @class ArgumentOutOfRangeError\n */\nvar ArgumentOutOfRangeError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ArgumentOutOfRangeError, _super);\n function ArgumentOutOfRangeError() {\n var _this = _super.call(this, 'argument out of range') || this;\n _this.name = 'ArgumentOutOfRangeError';\n Object.setPrototypeOf(_this, ArgumentOutOfRangeError.prototype);\n return _this;\n }\n return ArgumentOutOfRangeError;\n}(Error));\nexport { ArgumentOutOfRangeError };\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\n/**\n * An error thrown when an Observable or a sequence was queried but has no\n * elements.\n *\n * @see {@link first}\n * @see {@link last}\n * @see {@link single}\n *\n * @class EmptyError\n */\nvar EmptyError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(EmptyError, _super);\n function EmptyError() {\n var _this = _super.call(this, 'no elements in sequence') || this;\n _this.name = 'EmptyError';\n Object.setPrototypeOf(_this, EmptyError.prototype);\n return _this;\n }\n return EmptyError;\n}(Error));\nexport { EmptyError };\n//# sourceMappingURL=EmptyError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar nextHandle = 0;\nvar tasksByHandle = {};\nfunction runIfPresent(handle) {\n var cb = tasksByHandle[handle];\n if (cb) {\n cb();\n }\n}\nexport var Immediate = {\n setImmediate: function (cb) {\n var handle = nextHandle++;\n tasksByHandle[handle] = cb;\n Promise.resolve().then(function () { return runIfPresent(handle); });\n return handle;\n },\n clearImmediate: function (handle) {\n delete tasksByHandle[handle];\n },\n};\n//# sourceMappingURL=Immediate.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\n/**\n * An error thrown when an action is invalid because the object has been\n * unsubscribed.\n *\n * @see {@link Subject}\n * @see {@link BehaviorSubject}\n *\n * @class ObjectUnsubscribedError\n */\nvar ObjectUnsubscribedError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ObjectUnsubscribedError, _super);\n function ObjectUnsubscribedError() {\n var _this = _super.call(this, 'object unsubscribed') || this;\n _this.name = 'ObjectUnsubscribedError';\n Object.setPrototypeOf(_this, ObjectUnsubscribedError.prototype);\n return _this;\n }\n return ObjectUnsubscribedError;\n}(Error));\nexport { ObjectUnsubscribedError };\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\n/**\n * An error thrown when duetime elapses.\n *\n * @see {@link timeout}\n *\n * @class TimeoutError\n */\nvar TimeoutError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TimeoutError, _super);\n function TimeoutError() {\n var _this = _super.call(this, 'Timeout has occurred') || this;\n Object.setPrototypeOf(_this, TimeoutError.prototype);\n return _this;\n }\n return TimeoutError;\n}(Error));\nexport { TimeoutError };\n//# sourceMappingURL=TimeoutError.js.map\n","/** PURE_IMPORTS_START tslib PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\n/**\n * An error thrown when one or more errors have occurred during the\n * `unsubscribe` of a {@link Subscription}.\n */\nvar UnsubscriptionError = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(UnsubscriptionError, _super);\n function UnsubscriptionError(errors) {\n var _this = _super.call(this, errors ?\n errors.length + \" errors occurred during unsubscription:\\n \" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ') : '') || this;\n _this.errors = errors;\n _this.name = 'UnsubscriptionError';\n Object.setPrototypeOf(_this, UnsubscriptionError.prototype);\n return _this;\n }\n return UnsubscriptionError;\n}(Error));\nexport { UnsubscriptionError };\n//# sourceMappingURL=UnsubscriptionError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function applyMixins(derivedCtor, baseCtors) {\n for (var i = 0, len = baseCtors.length; i < len; i++) {\n var baseCtor = baseCtors[i];\n var propertyKeys = Object.getOwnPropertyNames(baseCtor.prototype);\n for (var j = 0, len2 = propertyKeys.length; j < len2; j++) {\n var name_1 = propertyKeys[j];\n derivedCtor.prototype[name_1] = baseCtor.prototype[name_1];\n }\n }\n}\n//# sourceMappingURL=applyMixins.js.map\n","// typeof any so that it we don't have to cast when comparing a result to the error object\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var errorObject = { e: {} };\n//# sourceMappingURL=errorObject.js.map\n","/**\n * Throws an error on another job so that it's picked up by the runtime's\n * uncaught error handling mechanism.\n * @param err the error to throw\n */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function hostReportError(err) {\n setTimeout(function () { throw err; });\n}\n//# sourceMappingURL=hostReportError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });\n//# sourceMappingURL=isArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\n//# sourceMappingURL=isDate.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\n/** Identifies an input as being an Iterable */\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */\nimport { isArray } from './isArray';\nexport function isNumeric(val) {\n // parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n // ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n // subtraction forces infinities to NaN\n // adding 1 corrects loss of precision from parseFloat (#15100)\n return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n}\n//# sourceMappingURL=isNumeric.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isObject(x) {\n return x != null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\n/** Identifies an input as being Observable (but not necessary an Rx Observable) */\nexport function isObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isObservable.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isPromise(value) {\n return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map\n","/* tslint:disable:no-empty */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function noop() { }\n//# sourceMappingURL=noop.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport 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\n","/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */\nimport { noop } from './noop';\n/* tslint:enable:max-line-length */\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\n/* @internal */\nexport function pipeFromArray(fns) {\n if (!fns) {\n return noop;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map\n","// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _root = __window || __global || __self;\n// Workaround Closure Compiler restriction: The body of a goog.module cannot use throw.\n// This is needed when used with angular/tsickle which inserts a goog.module statement.\n// Wrap in IIFE\n/*@__PURE__*/ (function () {\n if (!_root) {\n throw /*@__PURE__*/ new Error('RxJS could not find any global context (window, self, global)');\n }\n})();\nexport { _root as root };\n//# sourceMappingURL=root.js.map\n","/** PURE_IMPORTS_START _Observable,_subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { 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 var subscribeTo = function (result) {\n if (result instanceof Observable) {\n return function (subscriber) {\n if (result._isScalar) {\n subscriber.next(result.value);\n subscriber.complete();\n return undefined;\n }\n else {\n return result.subscribe(subscriber);\n }\n };\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 if (result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else {\n var value = isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var 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\n","/**\n * Subscribes to an ArrayLike with a subscriber\n * @param array The array or array-like to subscribe to\n */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var subscribeToArray = function (array) {\n return function (subscriber) {\n for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n if (!subscriber.closed) {\n subscriber.complete();\n }\n };\n};\n//# sourceMappingURL=subscribeToArray.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport var subscribeToIterable = function (iterable) {\n return function (subscriber) {\n var iterator = iterable[Symbol_iterator]();\n do {\n var item = iterator.next();\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 // Finalize the iterator if it happens to be a Generator\n if (typeof iterator.return === 'function') {\n subscriber.add(function () {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToIterable.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\n/**\n * Subscribes to an object that implements Symbol.observable with the given\n * Subscriber.\n * @param obj An object that implements Symbol.observable\n */\nexport var subscribeToObservable = function (obj) {\n return function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n // Should be caught by observable subscribe function error handling.\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n };\n};\n//# sourceMappingURL=subscribeToObservable.js.map\n","/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */\nimport { hostReportError } from './hostReportError';\nexport var subscribeToPromise = function (promise) {\n return function (subscriber) {\n promise.then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, hostReportError);\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToPromise.js.map\n","/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo PURE_IMPORTS_END */\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {\n var destination = new InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n return subscribeTo(result)(destination);\n}\n//# sourceMappingURL=subscribeToResult.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { 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\n","/** PURE_IMPORTS_START _errorObject PURE_IMPORTS_END */\nimport { errorObject } from './errorObject';\nvar tryCatchTarget;\nfunction tryCatcher() {\n try {\n return tryCatchTarget.apply(this, arguments);\n }\n catch (e) {\n errorObject.e = e;\n return errorObject;\n }\n}\nexport function tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n}\n//# sourceMappingURL=tryCatch.js.map\n","/* Operator exports */\n/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport { 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 { 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 } from '../internal/operators/mergeMap';\nexport { mergeMap as 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\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar 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 (b.hasOwnProperty(p)) d[p] = b[p]; };\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 = 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\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++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\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 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) : new P(function (resolve) { resolve(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 = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, 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 function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n 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}\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 __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) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\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];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src/buffering/buffering\"));\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYnVmZmVyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsK0NBQTBDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvYnVmZmVyaW5nL2J1ZmZlcmluZyc7XG4iXX0=","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src/controls/controls\"));\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjb250cm9scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDZDQUF3QyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL2NvbnRyb2xzL2NvbnRyb2xzJztcbiJdfQ==","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src/core/core\"));\n// CustomEvent polyfill for IE9/10/11\n(function () {\n if (typeof window === \"undefined\" || typeof window['CustomEvent'] === \"function\")\n return false;\n function CustomEvent(event, params) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n CustomEvent.prototype = window['Event'].prototype;\n window['CustomEvent'] = CustomEvent;\n})();\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxQ0FBZ0M7O0FBR2hDLENBQUM7SUFFRyxFQUFFLENBQUMsQ0FBRSxPQUFPLE1BQU0sS0FBSyxXQUFXLElBQUksT0FBTyxNQUFNLENBQUMsYUFBYSxDQUFDLEtBQUssVUFBVyxDQUFDO1FBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQztJQUVqRyxxQkFBdUIsS0FBSyxFQUFFLE1BQU07UUFDaEMsTUFBTSxHQUFHLE1BQU0sSUFBSSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsU0FBUyxFQUFFLENBQUM7UUFDNUUsSUFBSSxHQUFHLEdBQUcsUUFBUSxDQUFDLFdBQVcsQ0FBRSxhQUFhLENBQUUsQ0FBQztRQUNoRCxHQUFHLENBQUMsZUFBZSxDQUFFLEtBQUssRUFBRSxNQUFNLENBQUMsT0FBTyxFQUFFLE1BQU0sQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLE1BQU0sQ0FBRSxDQUFDO1FBQy9FLE1BQU0sQ0FBQyxHQUFHLENBQUM7S0FDZDtJQUVELFdBQVcsQ0FBQyxTQUFTLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLFNBQVMsQ0FBQztJQUVsRCxNQUFNLENBQUMsYUFBYSxDQUFDLEdBQUcsV0FBVyxDQUFDO0NBQ3ZDLENBQUMsRUFBRSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvY29yZS9jb3JlJztcblxuLy8gQ3VzdG9tRXZlbnQgcG9seWZpbGwgZm9yIElFOS8xMC8xMVxuKGZ1bmN0aW9uICgpIHtcblxuICAgIGlmICggdHlwZW9mIHdpbmRvdyA9PT0gXCJ1bmRlZmluZWRcIiB8fCB0eXBlb2Ygd2luZG93WydDdXN0b21FdmVudCddID09PSBcImZ1bmN0aW9uXCIgKSByZXR1cm4gZmFsc2U7XG5cbiAgICBmdW5jdGlvbiBDdXN0b21FdmVudCAoIGV2ZW50LCBwYXJhbXMgKSB7XG4gICAgICAgIHBhcmFtcyA9IHBhcmFtcyB8fCB7IGJ1YmJsZXM6IGZhbHNlLCBjYW5jZWxhYmxlOiBmYWxzZSwgZGV0YWlsOiB1bmRlZmluZWQgfTtcbiAgICAgICAgdmFyIGV2dCA9IGRvY3VtZW50LmNyZWF0ZUV2ZW50KCAnQ3VzdG9tRXZlbnQnICk7XG4gICAgICAgIGV2dC5pbml0Q3VzdG9tRXZlbnQoIGV2ZW50LCBwYXJhbXMuYnViYmxlcywgcGFyYW1zLmNhbmNlbGFibGUsIHBhcmFtcy5kZXRhaWwgKTtcbiAgICAgICAgcmV0dXJuIGV2dDtcbiAgICB9XG5cbiAgICBDdXN0b21FdmVudC5wcm90b3R5cGUgPSB3aW5kb3dbJ0V2ZW50J10ucHJvdG90eXBlO1xuXG4gICAgd2luZG93WydDdXN0b21FdmVudCddID0gQ3VzdG9tRXZlbnQ7XG59KSgpO1xuIl19","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./src/overlay-play/overlay-play\"));\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmxheS1wbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsib3ZlcmxheS1wbGF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQWdEIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvb3ZlcmxheS1wbGF5L292ZXJsYXktcGxheSc7XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar common_1 = require(\"@angular/common\");\nvar vg_buffering_1 = require(\"./vg-buffering\");\nvar VgBufferingModule = (function () {\n function VgBufferingModule() {\n }\n VgBufferingModule.decorators = [\n { type: core_1.NgModule, args: [{\n imports: [common_1.CommonModule],\n declarations: [\n vg_buffering_1.VgBuffering\n ],\n exports: [\n vg_buffering_1.VgBuffering\n ]\n },] },\n ];\n return VgBufferingModule;\n}());\nexports.VgBufferingModule = VgBufferingModule;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVmZmVyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYnVmZmVyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQXlDO0FBQ3pDLDBDQUErQztBQUUvQywrQ0FBNkM7Ozs7O2dCQUU1QyxlQUFRLFNBQUM7b0JBQ04sT0FBTyxFQUFFLENBQUUscUJBQVksQ0FBRTtvQkFDekIsWUFBWSxFQUFFO3dCQUNWLDBCQUFXO3FCQUNkO29CQUNELE9BQU8sRUFBRTt3QkFDTCwwQkFBVztxQkFDZDtpQkFDSjs7NEJBYkQ7O0FBY2EsOENBQWlCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IENvbW1vbk1vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvbW1vbic7XG5cbmltcG9ydCB7IFZnQnVmZmVyaW5nIH0gZnJvbSAnLi92Zy1idWZmZXJpbmcnO1xuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFsgQ29tbW9uTW9kdWxlIF0sXG4gICAgZGVjbGFyYXRpb25zOiBbXG4gICAgICAgIFZnQnVmZmVyaW5nXG4gICAgXSxcbiAgICBleHBvcnRzOiBbXG4gICAgICAgIFZnQnVmZmVyaW5nXG4gICAgXVxufSlcbmV4cG9ydCBjbGFzcyBWZ0J1ZmZlcmluZ01vZHVsZSB7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../core/services/vg-api\");\nvar VgBuffering = (function () {\n function VgBuffering(ref, API) {\n this.API = API;\n this.checkInterval = 50;\n this.currentPlayPos = 0;\n this.lastPlayPos = 0;\n this.subscriptions = [];\n this.isBuffering = false;\n this.elem = ref.nativeElement;\n }\n VgBuffering.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgBuffering.prototype.onPlayerReady = function () {\n var _this = this;\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.target.subscriptions.bufferDetected.subscribe(function (isBuffering) { return _this.onUpdateBuffer(isBuffering); }));\n };\n VgBuffering.prototype.onUpdateBuffer = function (isBuffering) {\n this.isBuffering = isBuffering;\n };\n VgBuffering.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgBuffering.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-buffering',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<div class=\\\"vg-buffering\\\">\\n <div class=\\\"bufferingContainer\\\">\\n <div class=\\\"loadingSpinner\\\"></div>\\n </div>\\n </div>\",\n styles: [\"\\n vg-buffering {\\n display: none;\\n z-index: 201;\\n }\\n\\n vg-buffering.is-buffering {\\n display: block;\\n }\\n \\n .vg-buffering {\\n position: absolute;\\n display: block;\\n width: 100%;\\n height: 100%;\\n }\\n\\n .vg-buffering .bufferingContainer {\\n width: 100%;\\n position: absolute;\\n cursor: pointer;\\n top: 50%;\\n margin-top: -50px;\\n\\n zoom: 1;\\n filter: alpha(opacity=60);\\n opacity: 0.6;\\n }\\n\\n /* Loading Spinner\\n * http://www.alessioatzeni.com/blog/css3-loading-animation-loop/\\n */\\n .vg-buffering .loadingSpinner {\\n background-color: rgba(0, 0, 0, 0);\\n border: 5px solid rgba(255, 255, 255, 1);\\n opacity: .9;\\n border-top: 5px solid rgba(0, 0, 0, 0);\\n border-left: 5px solid rgba(0, 0, 0, 0);\\n border-radius: 50px;\\n box-shadow: 0 0 35px #FFFFFF;\\n width: 50px;\\n height: 50px;\\n margin: 0 auto;\\n -moz-animation: spin .5s infinite linear;\\n -webkit-animation: spin .5s infinite linear;\\n }\\n\\n .vg-buffering .loadingSpinner .stop {\\n -webkit-animation-play-state: paused;\\n -moz-animation-play-state: paused;\\n }\\n\\n @-moz-keyframes spin {\\n 0% {\\n -moz-transform: rotate(0deg);\\n }\\n 100% {\\n -moz-transform: rotate(360deg);\\n }\\n }\\n\\n @-moz-keyframes spinoff {\\n 0% {\\n -moz-transform: rotate(0deg);\\n }\\n 100% {\\n -moz-transform: rotate(-360deg);\\n }\\n }\\n\\n @-webkit-keyframes spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n }\\n }\\n\\n @-webkit-keyframes spinoff {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(-360deg);\\n }\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgBuffering.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgBuffering.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"isBuffering\": [{ type: core_1.HostBinding, args: ['class.is-buffering',] },],\n };\n return VgBuffering;\n}());\nexports.VgBuffering = VgBuffering;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctYnVmZmVyaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctYnVmZmVyaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQWdIO0FBQ2hILGtEQUFnRDs7SUFtSDVDLHFCQUFZLEdBQWUsRUFBUyxHQUFVO1FBQVYsUUFBRyxHQUFILEdBQUcsQ0FBTzs2QkFSdEIsRUFBRTs4QkFDRCxDQUFDOzJCQUNKLENBQUM7NkJBRVMsRUFBRTsyQkFFd0IsS0FBSztRQUczRCxJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxhQUFhLENBQUM7S0FDakM7SUFFRCw4QkFBUSxHQUFSO1FBQUEsaUJBU0M7UUFSRyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FDbkIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxhQUFhLEVBQUUsRUFBcEIsQ0FBb0IsQ0FBQyxDQUNsRSxDQUFDO1NBQ0w7S0FDSjtJQUVELG1DQUFhLEdBQWI7UUFBQSxpQkFRQztRQVBHLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBRWhELElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUNuQixJQUFJLENBQUMsTUFBTSxDQUFDLGFBQWEsQ0FBQyxjQUFjLENBQUMsU0FBUyxDQUM5QyxVQUFBLFdBQVcsSUFBSSxPQUFBLEtBQUksQ0FBQyxjQUFjLENBQUMsV0FBVyxDQUFDLEVBQWhDLENBQWdDLENBQ2xELENBQ0osQ0FBQztLQUNMO0lBRUQsb0NBQWMsR0FBZCxVQUFlLFdBQVc7UUFDdEIsSUFBSSxDQUFDLFdBQVcsR0FBRyxXQUFXLENBQUM7S0FDbEM7SUFFRCxpQ0FBVyxHQUFYO1FBQ0ksSUFBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQWYsQ0FBZSxDQUFDLENBQUM7S0FDcEQ7O2dCQTdJSixnQkFBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSxjQUFjO29CQUN4QixhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLHdLQUlDO29CQUNYLE1BQU0sRUFBRSxDQUFFLHl4RUF1RlQsQ0FBRTtpQkFDTjs7OztnQkF0R21CLGlCQUFVO2dCQUNyQixjQUFLOzs7MEJBdUdULFlBQUs7Z0NBVUwsa0JBQVcsU0FBQyxvQkFBb0I7O3NCQWxIckM7O0FBdUdhLGtDQUFXIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBFbGVtZW50UmVmLCBIb3N0QmluZGluZywgSW5wdXQsIE9uRGVzdHJveSwgT25Jbml0LCBWaWV3RW5jYXBzdWxhdGlvbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBJUGxheWFibGUgfSBmcm9tICcuLi9jb3JlL3ZnLW1lZGlhL2ktcGxheWFibGUnO1xuaW1wb3J0IHsgVmdTdGF0ZXMgfSBmcm9tICcuLi9jb3JlL3N0YXRlcy92Zy1zdGF0ZXMnO1xuaW1wb3J0IHsgU3Vic2NyaXB0aW9uIH0gZnJvbSAncnhqcy9TdWJzY3JpcHRpb24nO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLWJ1ZmZlcmluZycsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYDxkaXYgY2xhc3M9XCJ2Zy1idWZmZXJpbmdcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJidWZmZXJpbmdDb250YWluZXJcIj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwibG9hZGluZ1NwaW5uZXJcIj48L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5gLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLWJ1ZmZlcmluZyB7XG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgICAgICAgei1pbmRleDogMjAxO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctYnVmZmVyaW5nLmlzLWJ1ZmZlcmluZyB7XG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgLnZnLWJ1ZmZlcmluZyB7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgICAgICB9XG5cbiAgICAgICAgLnZnLWJ1ZmZlcmluZyAuYnVmZmVyaW5nQ29udGFpbmVyIHtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgdG9wOiA1MCU7XG4gICAgICAgICAgICBtYXJnaW4tdG9wOiAtNTBweDtcblxuICAgICAgICAgICAgem9vbTogMTtcbiAgICAgICAgICAgIGZpbHRlcjogYWxwaGEob3BhY2l0eT02MCk7XG4gICAgICAgICAgICBvcGFjaXR5OiAwLjY7XG4gICAgICAgIH1cblxuICAgICAgICAvKiBMb2FkaW5nIFNwaW5uZXJcbiAgICAgICAgKiBodHRwOi8vd3d3LmFsZXNzaW9hdHplbmkuY29tL2Jsb2cvY3NzMy1sb2FkaW5nLWFuaW1hdGlvbi1sb29wL1xuICAgICAgICAqL1xuICAgICAgICAudmctYnVmZmVyaW5nIC5sb2FkaW5nU3Bpbm5lciB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDAsIDAsIDAsIDApO1xuICAgICAgICAgICAgYm9yZGVyOiA1cHggc29saWQgcmdiYSgyNTUsIDI1NSwgMjU1LCAxKTtcbiAgICAgICAgICAgIG9wYWNpdHk6IC45O1xuICAgICAgICAgICAgYm9yZGVyLXRvcDogNXB4IHNvbGlkIHJnYmEoMCwgMCwgMCwgMCk7XG4gICAgICAgICAgICBib3JkZXItbGVmdDogNXB4IHNvbGlkIHJnYmEoMCwgMCwgMCwgMCk7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MHB4O1xuICAgICAgICAgICAgYm94LXNoYWRvdzogMCAwIDM1cHggI0ZGRkZGRjtcbiAgICAgICAgICAgIHdpZHRoOiA1MHB4O1xuICAgICAgICAgICAgaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgbWFyZ2luOiAwIGF1dG87XG4gICAgICAgICAgICAtbW96LWFuaW1hdGlvbjogc3BpbiAuNXMgaW5maW5pdGUgbGluZWFyO1xuICAgICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246IHNwaW4gLjVzIGluZmluaXRlIGxpbmVhcjtcbiAgICAgICAgfVxuXG4gICAgICAgIC52Zy1idWZmZXJpbmcgLmxvYWRpbmdTcGlubmVyIC5zdG9wIHtcbiAgICAgICAgICAgIC13ZWJraXQtYW5pbWF0aW9uLXBsYXktc3RhdGU6IHBhdXNlZDtcbiAgICAgICAgICAgIC1tb3otYW5pbWF0aW9uLXBsYXktc3RhdGU6IHBhdXNlZDtcbiAgICAgICAgfVxuXG4gICAgICAgIEAtbW96LWtleWZyYW1lcyBzcGluIHtcbiAgICAgICAgICAgIDAlIHtcbiAgICAgICAgICAgICAgICAtbW96LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgMTAwJSB7XG4gICAgICAgICAgICAgICAgLW1vei10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgQC1tb3ota2V5ZnJhbWVzIHNwaW5vZmYge1xuICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICAgIC1tb3otdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAxMDAlIHtcbiAgICAgICAgICAgICAgICAtbW96LXRyYW5zZm9ybTogcm90YXRlKC0zNjBkZWcpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIHNwaW4ge1xuICAgICAgICAgICAgMCUge1xuICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAxMDAlIHtcbiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgc3Bpbm9mZiB7XG4gICAgICAgICAgICAwJSB7XG4gICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIDEwMCUge1xuICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoLTM2MGRlZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdCdWZmZXJpbmcgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcblxuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHRhcmdldDogSVBsYXlhYmxlO1xuICAgIGNoZWNrSW50ZXJ2YWw6IG51bWJlciA9IDUwO1xuICAgIGN1cnJlbnRQbGF5UG9zOiBudW1iZXIgPSAwO1xuICAgIGxhc3RQbGF5UG9zOiBudW1iZXIgPSAwO1xuXG4gICAgc3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcblxuICAgIEBIb3N0QmluZGluZygnY2xhc3MuaXMtYnVmZmVyaW5nJykgaXNCdWZmZXJpbmc6IGJvb2xlYW4gPSBmYWxzZTtcblxuICAgIGNvbnN0cnVjdG9yKHJlZjogRWxlbWVudFJlZiwgcHVibGljIEFQSTogVmdBUEkpIHtcbiAgICAgICAgdGhpcy5lbGVtID0gcmVmLm5hdGl2ZUVsZW1lbnQ7XG4gICAgfVxuXG4gICAgbmdPbkluaXQoKSB7XG4gICAgICAgIGlmICh0aGlzLkFQSS5pc1BsYXllclJlYWR5KSB7XG4gICAgICAgICAgICB0aGlzLm9uUGxheWVyUmVhZHkoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKFxuICAgICAgICAgICAgICAgIHRoaXMuQVBJLnBsYXllclJlYWR5RXZlbnQuc3Vic2NyaWJlKCgpID0+IHRoaXMub25QbGF5ZXJSZWFkeSgpKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUGxheWVyUmVhZHkoKSB7XG4gICAgICAgIHRoaXMudGFyZ2V0ID0gdGhpcy5BUEkuZ2V0TWVkaWFCeUlkKHRoaXMudmdGb3IpO1xuXG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKFxuICAgICAgICAgICAgdGhpcy50YXJnZXQuc3Vic2NyaXB0aW9ucy5idWZmZXJEZXRlY3RlZC5zdWJzY3JpYmUoXG4gICAgICAgICAgICAgICAgaXNCdWZmZXJpbmcgPT4gdGhpcy5vblVwZGF0ZUJ1ZmZlcihpc0J1ZmZlcmluZylcbiAgICAgICAgICAgIClcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBvblVwZGF0ZUJ1ZmZlcihpc0J1ZmZlcmluZykge1xuICAgICAgICB0aGlzLmlzQnVmZmVyaW5nID0gaXNCdWZmZXJpbmc7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar common_1 = require(\"@angular/common\");\nvar vg_controls_1 = require(\"./vg-controls\");\nvar vg_fullscreen_1 = require(\"./vg-fullscreen/vg-fullscreen\");\nvar vg_mute_1 = require(\"./vg-mute/vg-mute\");\nvar vg_volume_1 = require(\"./vg-volume/vg-volume\");\nvar vg_play_pause_1 = require(\"./vg-play-pause/vg-play-pause\");\nvar vg_playback_button_1 = require(\"./vg-playback-button/vg-playback-button\");\nvar vg_scrub_bar_1 = require(\"./vg-scrub-bar/vg-scrub-bar\");\nvar vg_scrub_bar_buffering_time_1 = require(\"./vg-scrub-bar/vg-scrub-bar-buffering-time/vg-scrub-bar-buffering-time\");\nvar vg_scrub_bar_cue_points_1 = require(\"./vg-scrub-bar/vg-scrub-bar-cue-points/vg-scrub-bar-cue-points\");\nvar vg_scrub_bar_current_time_1 = require(\"./vg-scrub-bar/vg-scrub-bar-current-time/vg-scrub-bar-current-time\");\nvar vg_time_display_1 = require(\"./vg-time-display/vg-time-display\");\nvar vg_track_selector_1 = require(\"./vg-track-selector/vg-track-selector\");\nvar vg_controls_hidden_1 = require(\"../core/services/vg-controls-hidden\");\nvar vg_quality_selector_1 = require(\"./vg-quality-selector/vg-quality-selector\");\nvar VgControlsModule = (function () {\n function VgControlsModule() {\n }\n VgControlsModule.decorators = [\n { type: core_1.NgModule, args: [{\n imports: [common_1.CommonModule],\n declarations: [\n vg_controls_1.VgControls,\n vg_fullscreen_1.VgFullscreen,\n vg_mute_1.VgMute,\n vg_volume_1.VgVolume,\n vg_play_pause_1.VgPlayPause,\n vg_playback_button_1.VgPlaybackButton,\n vg_scrub_bar_1.VgScrubBar,\n vg_scrub_bar_buffering_time_1.VgScrubBarBufferingTime,\n vg_scrub_bar_cue_points_1.VgScrubBarCuePoints,\n vg_scrub_bar_current_time_1.VgScrubBarCurrentTime,\n vg_time_display_1.VgTimeDisplay,\n vg_time_display_1.VgUtcPipe,\n vg_track_selector_1.VgTrackSelector,\n vg_quality_selector_1.VgQualitySelector\n ],\n exports: [\n vg_controls_1.VgControls,\n vg_fullscreen_1.VgFullscreen,\n vg_mute_1.VgMute,\n vg_volume_1.VgVolume,\n vg_play_pause_1.VgPlayPause,\n vg_playback_button_1.VgPlaybackButton,\n vg_scrub_bar_1.VgScrubBar,\n vg_scrub_bar_buffering_time_1.VgScrubBarBufferingTime,\n vg_scrub_bar_cue_points_1.VgScrubBarCuePoints,\n vg_scrub_bar_current_time_1.VgScrubBarCurrentTime,\n vg_time_display_1.VgTimeDisplay,\n vg_time_display_1.VgUtcPipe,\n vg_track_selector_1.VgTrackSelector,\n vg_quality_selector_1.VgQualitySelector\n ],\n providers: [vg_controls_hidden_1.VgControlsHidden]\n },] },\n ];\n return VgControlsModule;\n}());\nexports.VgControlsModule = VgControlsModule;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJjb250cm9scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUF5QztBQUN6QywwQ0FBK0M7QUFDL0MsNkNBQTJDO0FBQzNDLCtEQUE2RDtBQUM3RCw2Q0FBMkM7QUFDM0MsbURBQWlEO0FBQ2pELCtEQUE0RDtBQUM1RCw4RUFBMkU7QUFDM0UsNERBQXlEO0FBQ3pELHNIQUFpSDtBQUNqSCwwR0FBcUc7QUFDckcsZ0hBQTJHO0FBQzNHLHFFQUE2RTtBQUM3RSwyRUFBd0U7QUFDeEUsMEVBQXVFO0FBQ3ZFLGlGQUE4RTs7Ozs7Z0JBRTdFLGVBQVEsU0FBQztvQkFDTixPQUFPLEVBQUUsQ0FBRSxxQkFBWSxDQUFFO29CQUN6QixZQUFZLEVBQUU7d0JBQ1Ysd0JBQVU7d0JBQ1YsNEJBQVk7d0JBQ1osZ0JBQU07d0JBQ04sb0JBQVE7d0JBQ1IsMkJBQVc7d0JBQ1gscUNBQWdCO3dCQUNoQix5QkFBVTt3QkFDVixxREFBdUI7d0JBQ3ZCLDZDQUFtQjt3QkFDbkIsaURBQXFCO3dCQUNyQiwrQkFBYTt3QkFDYiwyQkFBUzt3QkFDVCxtQ0FBZTt3QkFDZix1Q0FBaUI7cUJBQ3BCO29CQUNELE9BQU8sRUFBRTt3QkFDTCx3QkFBVTt3QkFDViw0QkFBWTt3QkFDWixnQkFBTTt3QkFDTixvQkFBUTt3QkFDUiwyQkFBVzt3QkFDWCxxQ0FBZ0I7d0JBQ2hCLHlCQUFVO3dCQUNWLHFEQUF1Qjt3QkFDdkIsNkNBQW1CO3dCQUNuQixpREFBcUI7d0JBQ3JCLCtCQUFhO3dCQUNiLDJCQUFTO3dCQUNULG1DQUFlO3dCQUNmLHVDQUFpQjtxQkFDcEI7b0JBQ0QsU0FBUyxFQUFFLENBQUUscUNBQWdCLENBQUU7aUJBQ2xDOzsyQkFwREQ7O0FBcURhLDRDQUFnQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuaW1wb3J0IHsgVmdDb250cm9scyB9IGZyb20gJy4vdmctY29udHJvbHMnO1xuaW1wb3J0IHsgVmdGdWxsc2NyZWVuIH0gZnJvbSAnLi92Zy1mdWxsc2NyZWVuL3ZnLWZ1bGxzY3JlZW4nO1xuaW1wb3J0IHsgVmdNdXRlIH0gZnJvbSAnLi92Zy1tdXRlL3ZnLW11dGUnO1xuaW1wb3J0IHsgVmdWb2x1bWUgfSBmcm9tICcuL3ZnLXZvbHVtZS92Zy12b2x1bWUnO1xuaW1wb3J0IHsgVmdQbGF5UGF1c2UgfSBmcm9tICcuL3ZnLXBsYXktcGF1c2UvdmctcGxheS1wYXVzZSc7XG5pbXBvcnQgeyBWZ1BsYXliYWNrQnV0dG9uIH0gZnJvbSAnLi92Zy1wbGF5YmFjay1idXR0b24vdmctcGxheWJhY2stYnV0dG9uJztcbmltcG9ydCB7IFZnU2NydWJCYXIgfSBmcm9tICcuL3ZnLXNjcnViLWJhci92Zy1zY3J1Yi1iYXInO1xuaW1wb3J0IHsgVmdTY3J1YkJhckJ1ZmZlcmluZ1RpbWUgfSBmcm9tICcuL3ZnLXNjcnViLWJhci92Zy1zY3J1Yi1iYXItYnVmZmVyaW5nLXRpbWUvdmctc2NydWItYmFyLWJ1ZmZlcmluZy10aW1lJztcbmltcG9ydCB7IFZnU2NydWJCYXJDdWVQb2ludHMgfSBmcm9tICcuL3ZnLXNjcnViLWJhci92Zy1zY3J1Yi1iYXItY3VlLXBvaW50cy92Zy1zY3J1Yi1iYXItY3VlLXBvaW50cyc7XG5pbXBvcnQgeyBWZ1NjcnViQmFyQ3VycmVudFRpbWUgfSBmcm9tICcuL3ZnLXNjcnViLWJhci92Zy1zY3J1Yi1iYXItY3VycmVudC10aW1lL3ZnLXNjcnViLWJhci1jdXJyZW50LXRpbWUnO1xuaW1wb3J0IHsgVmdUaW1lRGlzcGxheSwgVmdVdGNQaXBlIH0gZnJvbSAnLi92Zy10aW1lLWRpc3BsYXkvdmctdGltZS1kaXNwbGF5JztcbmltcG9ydCB7IFZnVHJhY2tTZWxlY3RvciB9IGZyb20gJy4vdmctdHJhY2stc2VsZWN0b3IvdmctdHJhY2stc2VsZWN0b3InO1xuaW1wb3J0IHsgVmdDb250cm9sc0hpZGRlbiB9IGZyb20gJy4uL2NvcmUvc2VydmljZXMvdmctY29udHJvbHMtaGlkZGVuJztcbmltcG9ydCB7IFZnUXVhbGl0eVNlbGVjdG9yIH0gZnJvbSAnLi92Zy1xdWFsaXR5LXNlbGVjdG9yL3ZnLXF1YWxpdHktc2VsZWN0b3InO1xuXG5ATmdNb2R1bGUoe1xuICAgIGltcG9ydHM6IFsgQ29tbW9uTW9kdWxlIF0sXG4gICAgZGVjbGFyYXRpb25zOiBbXG4gICAgICAgIFZnQ29udHJvbHMsXG4gICAgICAgIFZnRnVsbHNjcmVlbixcbiAgICAgICAgVmdNdXRlLFxuICAgICAgICBWZ1ZvbHVtZSxcbiAgICAgICAgVmdQbGF5UGF1c2UsXG4gICAgICAgIFZnUGxheWJhY2tCdXR0b24sXG4gICAgICAgIFZnU2NydWJCYXIsXG4gICAgICAgIFZnU2NydWJCYXJCdWZmZXJpbmdUaW1lLFxuICAgICAgICBWZ1NjcnViQmFyQ3VlUG9pbnRzLFxuICAgICAgICBWZ1NjcnViQmFyQ3VycmVudFRpbWUsXG4gICAgICAgIFZnVGltZURpc3BsYXksXG4gICAgICAgIFZnVXRjUGlwZSxcbiAgICAgICAgVmdUcmFja1NlbGVjdG9yLFxuICAgICAgICBWZ1F1YWxpdHlTZWxlY3RvclxuICAgIF0sXG4gICAgZXhwb3J0czogW1xuICAgICAgICBWZ0NvbnRyb2xzLFxuICAgICAgICBWZ0Z1bGxzY3JlZW4sXG4gICAgICAgIFZnTXV0ZSxcbiAgICAgICAgVmdWb2x1bWUsXG4gICAgICAgIFZnUGxheVBhdXNlLFxuICAgICAgICBWZ1BsYXliYWNrQnV0dG9uLFxuICAgICAgICBWZ1NjcnViQmFyLFxuICAgICAgICBWZ1NjcnViQmFyQnVmZmVyaW5nVGltZSxcbiAgICAgICAgVmdTY3J1YkJhckN1ZVBvaW50cyxcbiAgICAgICAgVmdTY3J1YkJhckN1cnJlbnRUaW1lLFxuICAgICAgICBWZ1RpbWVEaXNwbGF5LFxuICAgICAgICBWZ1V0Y1BpcGUsXG4gICAgICAgIFZnVHJhY2tTZWxlY3RvcixcbiAgICAgICAgVmdRdWFsaXR5U2VsZWN0b3JcbiAgICBdLFxuICAgIHByb3ZpZGVyczogWyBWZ0NvbnRyb2xzSGlkZGVuIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdDb250cm9sc01vZHVsZSB7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar Observable_1 = require(\"rxjs/Observable\");\nvar vg_api_1 = require(\"../core/services/vg-api\");\nvar vg_controls_hidden_1 = require(\"./../core/services/vg-controls-hidden\");\nrequire(\"rxjs/add/observable/fromEvent\");\nvar vg_states_1 = require(\"../core/states/vg-states\");\nvar VgControls = (function () {\n function VgControls(API, ref, hidden) {\n this.API = API;\n this.ref = ref;\n this.hidden = hidden;\n this.isAdsPlaying = 'initial';\n this.hideControls = false;\n this.vgAutohide = false;\n this.vgAutohideTime = 3;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgControls.prototype.ngOnInit = function () {\n var _this = this;\n var mouseMove = Observable_1.Observable.fromEvent(this.API.videogularElement, 'mousemove');\n this.subscriptions.push(mouseMove.subscribe(this.show.bind(this)));\n var touchStart = Observable_1.Observable.fromEvent(this.API.videogularElement, 'touchstart');\n this.subscriptions.push(touchStart.subscribe(this.show.bind(this)));\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgControls.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.target.subscriptions.play.subscribe(this.onPlay.bind(this)));\n this.subscriptions.push(this.target.subscriptions.pause.subscribe(this.onPause.bind(this)));\n this.subscriptions.push(this.target.subscriptions.startAds.subscribe(this.onStartAds.bind(this)));\n this.subscriptions.push(this.target.subscriptions.endAds.subscribe(this.onEndAds.bind(this)));\n };\n VgControls.prototype.ngAfterViewInit = function () {\n if (this.vgAutohide) {\n this.hide();\n }\n else {\n this.show();\n }\n };\n VgControls.prototype.onPlay = function () {\n if (this.vgAutohide) {\n this.hide();\n }\n };\n VgControls.prototype.onPause = function () {\n clearTimeout(this.timer);\n this.hideControls = false;\n this.hidden.state(false);\n };\n VgControls.prototype.onStartAds = function () {\n this.isAdsPlaying = 'none';\n };\n VgControls.prototype.onEndAds = function () {\n this.isAdsPlaying = 'initial';\n };\n VgControls.prototype.hide = function () {\n if (this.vgAutohide) {\n clearTimeout(this.timer);\n this.hideAsync();\n }\n };\n VgControls.prototype.show = function () {\n clearTimeout(this.timer);\n this.hideControls = false;\n this.hidden.state(false);\n if (this.vgAutohide) {\n this.hideAsync();\n }\n };\n VgControls.prototype.hideAsync = function () {\n var _this = this;\n if (this.API.state === vg_states_1.VgStates.VG_PLAYING) {\n this.timer = setTimeout(function () {\n _this.hideControls = true;\n _this.hidden.state(true);\n }, this.vgAutohideTime * 1000);\n }\n };\n VgControls.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgControls.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-controls',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<ng-content></ng-content>\",\n styles: [\"\\n vg-controls {\\n position: absolute;\\n display: flex;\\n width: 100%;\\n height: 50px;\\n z-index: 300;\\n bottom: 0;\\n background-color: rgba(0, 0, 0, 0.5);\\n -webkit-transition: bottom 1s;\\n -khtml-transition: bottom 1s;\\n -moz-transition: bottom 1s;\\n -ms-transition: bottom 1s;\\n transition: bottom 1s;\\n }\\n\\n vg-controls.hide { \\n bottom: -50px;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgControls.ctorParameters = function () { return [\n { type: vg_api_1.VgAPI, },\n { type: core_1.ElementRef, },\n { type: vg_controls_hidden_1.VgControlsHidden, },\n ]; };\n VgControls.propDecorators = {\n \"isAdsPlaying\": [{ type: core_1.HostBinding, args: ['style.pointer-events',] },],\n \"hideControls\": [{ type: core_1.HostBinding, args: ['class.hide',] },],\n \"vgFor\": [{ type: core_1.Input },],\n \"vgAutohide\": [{ type: core_1.Input },],\n \"vgAutohideTime\": [{ type: core_1.Input },],\n };\n return VgControls;\n}());\nexports.VgControls = VgControls;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctY29udHJvbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy1jb250cm9scy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUd1QjtBQUN2Qiw4Q0FBNkM7QUFDN0Msa0RBQWdEO0FBQ2hELDRFQUF5RTtBQUN6RSx5Q0FBdUM7QUFDdkMsc0RBQW9EOztJQTRDaEQsb0JBQW9CLEdBQVUsRUFBVSxHQUFlLEVBQVUsTUFBd0I7UUFBckUsUUFBRyxHQUFILEdBQUcsQ0FBTztRQUFVLFFBQUcsR0FBSCxHQUFHLENBQVk7UUFBVSxXQUFNLEdBQU4sTUFBTSxDQUFrQjs0QkFaN0IsU0FBUzs0QkFDbEIsS0FBSzswQkFHekIsS0FBSzs4QkFDRixDQUFDOzZCQUtILEVBQUU7UUFHOUIsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO0tBQ2pDO0lBRUQsNkJBQVEsR0FBUjtRQUFBLGlCQWFDO1FBWkcsSUFBSSxTQUFTLEdBQUcsdUJBQVUsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsRUFBRSxXQUFXLENBQUMsQ0FBQztRQUM5RSxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUVuRSxJQUFJLFVBQVUsR0FBRyx1QkFBVSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGlCQUFpQixFQUFFLFlBQVksQ0FBQyxDQUFDO1FBQ2hGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRXBFLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLGNBQU0sT0FBQSxLQUFJLENBQUMsYUFBYSxFQUFFLEVBQXBCLENBQW9CLENBQUMsQ0FBQyxDQUFDO1NBQzVGO0tBQ0o7SUFFRCxrQ0FBYSxHQUFiO1FBQ0ksSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFaEQsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDMUYsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDNUYsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDbEcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7S0FDakc7SUFFRCxvQ0FBZSxHQUFmO1FBQ0ksRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7WUFDbEIsSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDO1NBQ2Y7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxJQUFJLEVBQUUsQ0FBQztTQUNmO0tBQ0o7SUFFRCwyQkFBTSxHQUFOO1FBQ0ksRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7WUFDbEIsSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDO1NBQ2Y7S0FDSjtJQUVELDRCQUFPLEdBQVA7UUFDSSxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3pCLElBQUksQ0FBQyxZQUFZLEdBQUcsS0FBSyxDQUFDO1FBQzFCLElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQzVCO0lBRUQsK0JBQVUsR0FBVjtRQUNJLElBQUksQ0FBQyxZQUFZLEdBQUcsTUFBTSxDQUFDO0tBQzlCO0lBRUQsNkJBQVEsR0FBUjtRQUNJLElBQUksQ0FBQyxZQUFZLEdBQUcsU0FBUyxDQUFDO0tBQ2pDO0lBRUQseUJBQUksR0FBSjtRQUNJLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO1lBQ2xCLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDO1NBQ3BCO0tBQ0o7SUFFRCx5QkFBSSxHQUFKO1FBQ0ksWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUN6QixJQUFJLENBQUMsWUFBWSxHQUFHLEtBQUssQ0FBQztRQUMxQixJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUV6QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztZQUNsQixJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7U0FDcEI7S0FDSjtJQUVPLDhCQUFTLEdBQWpCO1FBQUEsaUJBT0M7UUFORyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssS0FBSyxvQkFBUSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7WUFDekMsSUFBSSxDQUFDLEtBQUssR0FBRyxVQUFVLENBQUM7Z0JBQ3BCLEtBQUksQ0FBQyxZQUFZLEdBQUcsSUFBSSxDQUFDO2dCQUN6QixLQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQzthQUMzQixFQUFFLElBQUksQ0FBQyxjQUFjLEdBQUcsSUFBSSxDQUFDLENBQUM7U0FDbEM7S0FDSjtJQUVELGdDQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztLQUNwRDs7Z0JBOUhKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLGFBQWE7b0JBQ3ZCLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUsMkJBQTJCO29CQUNyQyxNQUFNLEVBQUUsQ0FBRSxxaEJBbUJULENBQUM7aUJBQ0w7Ozs7Z0JBOUJRLGNBQUs7Z0JBSmdCLGlCQUFVO2dCQUsvQixxQ0FBZ0I7OztpQ0FrQ3BCLGtCQUFXLFNBQUMsc0JBQXNCO2lDQUNsQyxrQkFBVyxTQUFDLFlBQVk7MEJBRXhCLFlBQUs7K0JBQ0wsWUFBSzttQ0FDTCxZQUFLOztxQkE3Q1Y7O0FBb0NhLGdDQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgICBDb21wb25lbnQsIElucHV0LCBPbkluaXQsIEVsZW1lbnRSZWYsIEhvc3RCaW5kaW5nLCBBZnRlclZpZXdJbml0LCBWaWV3RW5jYXBzdWxhdGlvbixcbiAgICBFdmVudEVtaXR0ZXIsIE91dHB1dFxufSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzL09ic2VydmFibGUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBWZ0NvbnRyb2xzSGlkZGVuIH0gZnJvbSAnLi8uLi9jb3JlL3NlcnZpY2VzL3ZnLWNvbnRyb2xzLWhpZGRlbic7XG5pbXBvcnQgJ3J4anMvYWRkL29ic2VydmFibGUvZnJvbUV2ZW50JztcbmltcG9ydCB7IFZnU3RhdGVzIH0gZnJvbSAnLi4vY29yZS9zdGF0ZXMvdmctc3RhdGVzJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICd2Zy1jb250cm9scycsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYDxuZy1jb250ZW50PjwvbmctY29udGVudD5gLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLWNvbnRyb2xzIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogNTBweDtcbiAgICAgICAgICAgIHotaW5kZXg6IDMwMDtcbiAgICAgICAgICAgIGJvdHRvbTogMDtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC41KTtcbiAgICAgICAgICAgIC13ZWJraXQtdHJhbnNpdGlvbjogYm90dG9tIDFzO1xuICAgICAgICAgICAgLWtodG1sLXRyYW5zaXRpb246IGJvdHRvbSAxcztcbiAgICAgICAgICAgIC1tb3otdHJhbnNpdGlvbjogYm90dG9tIDFzO1xuICAgICAgICAgICAgLW1zLXRyYW5zaXRpb246IGJvdHRvbSAxcztcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGJvdHRvbSAxcztcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLWNvbnRyb2xzLmhpZGUgeyAgXG4gICAgICAgICAgICBib3R0b206IC01MHB4O1xuICAgICAgICB9XG4gICAgYF1cbn0pXG5leHBvcnQgY2xhc3MgVmdDb250cm9scyBpbXBsZW1lbnRzIE9uSW5pdCwgQWZ0ZXJWaWV3SW5pdCB7XG4gICAgZWxlbTogSFRNTEVsZW1lbnQ7XG4gICAgdGFyZ2V0OiBhbnk7XG5cbiAgICBASG9zdEJpbmRpbmcoJ3N0eWxlLnBvaW50ZXItZXZlbnRzJykgaXNBZHNQbGF5aW5nOiBzdHJpbmcgPSAnaW5pdGlhbCc7XG4gICAgQEhvc3RCaW5kaW5nKCdjbGFzcy5oaWRlJykgaGlkZUNvbnRyb2xzOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBASW5wdXQoKSB2Z0Zvcjogc3RyaW5nO1xuICAgIEBJbnB1dCgpIHZnQXV0b2hpZGU6IGJvb2xlYW4gPSBmYWxzZTtcbiAgICBASW5wdXQoKSB2Z0F1dG9oaWRlVGltZTogbnVtYmVyID0gMztcblxuICAgIHByaXZhdGUgdGltZXI6IGFueTtcbiAgICBwcml2YXRlIGhpZGVUaW1lcjogYW55O1xuXG4gICAgc3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgQVBJOiBWZ0FQSSwgcHJpdmF0ZSByZWY6IEVsZW1lbnRSZWYsIHByaXZhdGUgaGlkZGVuOiBWZ0NvbnRyb2xzSGlkZGVuKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBsZXQgbW91c2VNb3ZlID0gT2JzZXJ2YWJsZS5mcm9tRXZlbnQodGhpcy5BUEkudmlkZW9ndWxhckVsZW1lbnQsICdtb3VzZW1vdmUnKTtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2gobW91c2VNb3ZlLnN1YnNjcmliZSh0aGlzLnNob3cuYmluZCh0aGlzKSkpO1xuXG4gICAgICAgIGxldCB0b3VjaFN0YXJ0ID0gT2JzZXJ2YWJsZS5mcm9tRXZlbnQodGhpcy5BUEkudmlkZW9ndWxhckVsZW1lbnQsICd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKHRvdWNoU3RhcnQuc3Vic2NyaWJlKHRoaXMuc2hvdy5iaW5kKHRoaXMpKSk7XG5cbiAgICAgICAgaWYgKHRoaXMuQVBJLmlzUGxheWVyUmVhZHkpIHtcbiAgICAgICAgICAgIHRoaXMub25QbGF5ZXJSZWFkeSgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2godGhpcy5BUEkucGxheWVyUmVhZHlFdmVudC5zdWJzY3JpYmUoKCkgPT4gdGhpcy5vblBsYXllclJlYWR5KCkpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUGxheWVyUmVhZHkoKSB7XG4gICAgICAgIHRoaXMudGFyZ2V0ID0gdGhpcy5BUEkuZ2V0TWVkaWFCeUlkKHRoaXMudmdGb3IpO1xuXG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKHRoaXMudGFyZ2V0LnN1YnNjcmlwdGlvbnMucGxheS5zdWJzY3JpYmUodGhpcy5vblBsYXkuYmluZCh0aGlzKSkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLnRhcmdldC5zdWJzY3JpcHRpb25zLnBhdXNlLnN1YnNjcmliZSh0aGlzLm9uUGF1c2UuYmluZCh0aGlzKSkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLnRhcmdldC5zdWJzY3JpcHRpb25zLnN0YXJ0QWRzLnN1YnNjcmliZSh0aGlzLm9uU3RhcnRBZHMuYmluZCh0aGlzKSkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLnRhcmdldC5zdWJzY3JpcHRpb25zLmVuZEFkcy5zdWJzY3JpYmUodGhpcy5vbkVuZEFkcy5iaW5kKHRoaXMpKSk7XG4gICAgfVxuXG4gICAgbmdBZnRlclZpZXdJbml0KCkge1xuICAgICAgICBpZiAodGhpcy52Z0F1dG9oaWRlKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc2hvdygpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5KCkge1xuICAgICAgICBpZiAodGhpcy52Z0F1dG9oaWRlKSB7XG4gICAgICAgICAgICB0aGlzLmhpZGUoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUGF1c2UoKSB7XG4gICAgICAgIGNsZWFyVGltZW91dCh0aGlzLnRpbWVyKTtcbiAgICAgICAgdGhpcy5oaWRlQ29udHJvbHMgPSBmYWxzZTtcbiAgICAgICAgdGhpcy5oaWRkZW4uc3RhdGUoZmFsc2UpO1xuICAgIH1cblxuICAgIG9uU3RhcnRBZHMoKSB7XG4gICAgICAgIHRoaXMuaXNBZHNQbGF5aW5nID0gJ25vbmUnO1xuICAgIH1cblxuICAgIG9uRW5kQWRzKCkge1xuICAgICAgICB0aGlzLmlzQWRzUGxheWluZyA9ICdpbml0aWFsJztcbiAgICB9XG5cbiAgICBoaWRlKCkge1xuICAgICAgICBpZiAodGhpcy52Z0F1dG9oaWRlKSB7XG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGhpcy50aW1lcik7XG4gICAgICAgICAgICB0aGlzLmhpZGVBc3luYygpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgc2hvdygpIHtcbiAgICAgICAgY2xlYXJUaW1lb3V0KHRoaXMudGltZXIpO1xuICAgICAgICB0aGlzLmhpZGVDb250cm9scyA9IGZhbHNlO1xuICAgICAgICB0aGlzLmhpZGRlbi5zdGF0ZShmYWxzZSk7XG5cbiAgICAgICAgaWYgKHRoaXMudmdBdXRvaGlkZSkge1xuICAgICAgICAgICAgdGhpcy5oaWRlQXN5bmMoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByaXZhdGUgaGlkZUFzeW5jKCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuc3RhdGUgPT09IFZnU3RhdGVzLlZHX1BMQVlJTkcpIHtcbiAgICAgICAgICAgIHRoaXMudGltZXIgPSBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGVDb250cm9scyA9IHRydWU7XG4gICAgICAgICAgICAgICAgdGhpcy5oaWRkZW4uc3RhdGUodHJ1ZSk7XG4gICAgICAgICAgICB9LCB0aGlzLnZnQXV0b2hpZGVUaW1lICogMTAwMCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLmZvckVhY2gocyA9PiBzLnVuc3Vic2NyaWJlKCkpO1xuICAgIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar vg_fullscreen_api_1 = require(\"../../core/services/vg-fullscreen-api\");\nvar VgFullscreen = (function () {\n function VgFullscreen(ref, API, fsAPI) {\n this.API = API;\n this.fsAPI = fsAPI;\n this.isFullscreen = false;\n this.subscriptions = [];\n this.ariaValue = 'normal mode';\n this.elem = ref.nativeElement;\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n }\n VgFullscreen.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgFullscreen.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgFullscreen.prototype.onChangeFullscreen = function (fsState) {\n this.ariaValue = fsState ? 'fullscren mode' : 'normal mode';\n this.isFullscreen = fsState;\n };\n VgFullscreen.prototype.onClick = function () {\n this.changeFullscreenState();\n };\n VgFullscreen.prototype.onKeyDown = function (event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.changeFullscreenState();\n }\n };\n VgFullscreen.prototype.changeFullscreenState = function () {\n var element = this.target;\n if (this.target instanceof vg_api_1.VgAPI) {\n element = null;\n }\n this.fsAPI.toggleFullscreen(element);\n };\n VgFullscreen.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgFullscreen.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-fullscreen',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"icon\\\"\\n [class.vg-icon-fullscreen]=\\\"!isFullscreen\\\"\\n [class.vg-icon-fullscreen_exit]=\\\"isFullscreen\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"button\\\"\\n aria-label=\\\"fullscreen button\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n </div>\",\n styles: [\"\\n vg-fullscreen {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n\\n vg-fullscreen .icon {\\n pointer-events: none;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgFullscreen.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n { type: vg_fullscreen_api_1.VgFullscreenAPI, },\n ]; };\n VgFullscreen.propDecorators = {\n \"onClick\": [{ type: core_1.HostListener, args: ['click',] },],\n \"onKeyDown\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgFullscreen;\n}());\nexports.VgFullscreen = VgFullscreen;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctZnVsbHNjcmVlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLWZ1bGxzY3JlZW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBMEc7QUFDMUcscURBQW1EO0FBQ25ELDJFQUF3RTs7SUFnRHBFLHNCQUFZLEdBQWUsRUFBUyxHQUFVLEVBQVMsS0FBc0I7UUFBekMsUUFBRyxHQUFILEdBQUcsQ0FBTztRQUFTLFVBQUssR0FBTCxLQUFLLENBQWlCOzRCQU5yRCxLQUFLOzZCQUVHLEVBQUU7eUJBRXRCLGFBQWE7UUFHckIsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO1FBQzlCLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsa0JBQWtCLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ3hHO0lBRUQsK0JBQVEsR0FBUjtRQUFBLGlCQU9DO1FBTkcsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztTQUN4QjtRQUNELElBQUksQ0FBQyxDQUFDO1lBQ0YsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxhQUFhLEVBQUUsRUFBcEIsQ0FBb0IsQ0FBQyxDQUFDLENBQUM7U0FDNUY7S0FDSjtJQUVELG9DQUFhLEdBQWI7UUFDSSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztLQUNuRDtJQUVELHlDQUFrQixHQUFsQixVQUFtQixPQUFnQjtRQUMvQixJQUFJLENBQUMsU0FBUyxHQUFHLE9BQU8sR0FBRyxnQkFBZ0IsR0FBRyxhQUFhLENBQUM7UUFDNUQsSUFBSSxDQUFDLFlBQVksR0FBRyxPQUFPLENBQUM7S0FDL0I7SUFHRCw4QkFBTztRQUNILElBQUksQ0FBQyxxQkFBcUIsRUFBRSxDQUFDOztJQUlqQyxnQ0FBUyxhQUFDLEtBQW9COztRQUUxQixFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDL0MsS0FBSyxDQUFDLGNBQWMsRUFBRSxDQUFDO1lBQ3ZCLElBQUksQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1NBQ2hDOztJQUdMLDRDQUFxQixHQUFyQjtRQUNJLElBQUksT0FBTyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUM7UUFFMUIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sWUFBWSxjQUFLLENBQUMsQ0FBQyxDQUFDO1lBQy9CLE9BQU8sR0FBRyxJQUFJLENBQUM7U0FDbEI7UUFFRCxJQUFJLENBQUMsS0FBSyxDQUFDLGdCQUFnQixDQUFDLE9BQU8sQ0FBQyxDQUFDO0tBQ3hDO0lBRUQsa0NBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkE3RkosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsZUFBZTtvQkFDekIsYUFBYSxFQUFFLHdCQUFpQixDQUFDLElBQUk7b0JBQ3JDLFFBQVEsRUFBRSxzVUFRQztvQkFDWCxNQUFNLEVBQUUsQ0FBRSw2aUJBb0JULENBQUU7aUJBQ047Ozs7Z0JBdkNtQixpQkFBVTtnQkFDckIsY0FBSztnQkFDTCxtQ0FBZTs7OzRCQXVFbkIsbUJBQVksU0FBQyxPQUFPOzhCQUtwQixtQkFBWSxTQUFDLFNBQVMsRUFBRSxDQUFDLFFBQVEsQ0FBQzs7dUJBOUV2Qzs7QUF3Q2Esb0NBQVkiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIEVsZW1lbnRSZWYsIEhvc3RMaXN0ZW5lciwgT25EZXN0cm95LCBPbkluaXQsIFZpZXdFbmNhcHN1bGF0aW9uIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFZnRnVsbHNjcmVlbkFQSSB9IGZyb20gJy4uLy4uL2NvcmUvc2VydmljZXMvdmctZnVsbHNjcmVlbi1hcGknO1xuaW1wb3J0IHsgU3Vic2NyaXB0aW9uIH0gZnJvbSAncnhqcy9TdWJzY3JpcHRpb24nO1xuXG5cbkBDb21wb25lbnQoe1xuICAgIHNlbGVjdG9yOiAndmctZnVsbHNjcmVlbicsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYFxuICAgICAgICA8ZGl2IGNsYXNzPVwiaWNvblwiXG4gICAgICAgICAgICAgW2NsYXNzLnZnLWljb24tZnVsbHNjcmVlbl09XCIhaXNGdWxsc2NyZWVuXCJcbiAgICAgICAgICAgICBbY2xhc3MudmctaWNvbi1mdWxsc2NyZWVuX2V4aXRdPVwiaXNGdWxsc2NyZWVuXCJcbiAgICAgICAgICAgICB0YWJpbmRleD1cIjBcIlxuICAgICAgICAgICAgIHJvbGU9XCJidXR0b25cIlxuICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJmdWxsc2NyZWVuIGJ1dHRvblwiXG4gICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZXRleHRdPVwiYXJpYVZhbHVlXCI+XG4gICAgICAgIDwvZGl2PmAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctZnVsbHNjcmVlbiB7XG4gICAgICAgICAgICAtd2Via2l0LXRvdWNoLWNhbGxvdXQ6IG5vbmU7XG4gICAgICAgICAgICAtd2Via2l0LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLWtodG1sLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1vei11c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIC1tcy11c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIHVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgICAgICAgaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgd2lkdGg6IDUwcHg7XG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgICAgICBjb2xvcjogd2hpdGU7XG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNTBweDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLWZ1bGxzY3JlZW4gLmljb24ge1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdGdWxsc2NyZWVuIGltcGxlbWVudHMgT25Jbml0LCBPbkRlc3Ryb3kge1xuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHZnRm9yOiBzdHJpbmc7XG4gICAgdGFyZ2V0OiBPYmplY3Q7XG4gICAgaXNGdWxsc2NyZWVuOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBzdWJzY3JpcHRpb25zOiBTdWJzY3JpcHRpb25bXSA9IFtdO1xuXG4gICAgYXJpYVZhbHVlID0gJ25vcm1hbCBtb2RlJztcblxuICAgIGNvbnN0cnVjdG9yKHJlZjogRWxlbWVudFJlZiwgcHVibGljIEFQSTogVmdBUEksIHB1YmxpYyBmc0FQSTogVmdGdWxsc2NyZWVuQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLmZzQVBJLm9uQ2hhbmdlRnVsbHNjcmVlbi5zdWJzY3JpYmUodGhpcy5vbkNoYW5nZUZ1bGxzY3JlZW4uYmluZCh0aGlzKSkpO1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgb25DaGFuZ2VGdWxsc2NyZWVuKGZzU3RhdGU6IGJvb2xlYW4pIHtcbiAgICAgICAgdGhpcy5hcmlhVmFsdWUgPSBmc1N0YXRlID8gJ2Z1bGxzY3JlbiBtb2RlJyA6ICdub3JtYWwgbW9kZSc7XG4gICAgICAgIHRoaXMuaXNGdWxsc2NyZWVuID0gZnNTdGF0ZTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdjbGljaycpXG4gICAgb25DbGljaygpIHtcbiAgICAgICAgdGhpcy5jaGFuZ2VGdWxsc2NyZWVuU3RhdGUoKTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duJywgWyckZXZlbnQnXSlcbiAgICBvbktleURvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgLy8gT24gcHJlc3MgRW50ZXIgKDEzKSBvciBTcGFjZSAoMzIpXG4gICAgICAgIGlmIChldmVudC5rZXlDb2RlID09PSAxMyB8fCBldmVudC5rZXlDb2RlID09PSAzMikge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuY2hhbmdlRnVsbHNjcmVlblN0YXRlKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjaGFuZ2VGdWxsc2NyZWVuU3RhdGUoKSB7XG4gICAgICAgIGxldCBlbGVtZW50ID0gdGhpcy50YXJnZXQ7XG5cbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0IGluc3RhbmNlb2YgVmdBUEkpIHtcbiAgICAgICAgICAgIGVsZW1lbnQgPSBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5mc0FQSS50b2dnbGVGdWxsc2NyZWVuKGVsZW1lbnQpO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar VgMute = (function () {\n function VgMute(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.ariaValue = 'unmuted';\n this.elem = ref.nativeElement;\n }\n VgMute.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgMute.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n this.currentVolume = this.target.volume;\n };\n VgMute.prototype.onClick = function () {\n this.changeMuteState();\n };\n VgMute.prototype.onKeyDown = function (event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.changeMuteState();\n }\n };\n VgMute.prototype.changeMuteState = function () {\n var volume = this.getVolume();\n if (volume === 0) {\n if (this.target.volume === 0 && this.currentVolume === 0) {\n this.currentVolume = 1;\n }\n this.target.volume = this.currentVolume;\n }\n else {\n this.currentVolume = volume;\n this.target.volume = 0;\n }\n };\n VgMute.prototype.getVolume = function () {\n var volume = this.target ? this.target.volume : 0;\n this.ariaValue = volume ? 'unmuted' : 'muted';\n return volume;\n };\n VgMute.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgMute.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-mute',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"icon\\\"\\n [class.vg-icon-volume_up]=\\\"getVolume() >= 0.75\\\"\\n [class.vg-icon-volume_down]=\\\"getVolume() >= 0.25 && getVolume() < 0.75\\\"\\n [class.vg-icon-volume_mute]=\\\"getVolume() > 0 && getVolume() < 0.25\\\"\\n [class.vg-icon-volume_off]=\\\"getVolume() === 0\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"button\\\"\\n aria-label=\\\"mute button\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n </div>\",\n styles: [\"\\n vg-mute {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n\\n vg-mute .icon {\\n pointer-events: none;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgMute.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgMute.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"onClick\": [{ type: core_1.HostListener, args: ['click',] },],\n \"onKeyDown\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgMute;\n}());\nexports.VgMute = VgMute;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctbXV0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLW11dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBaUg7QUFDakgscURBQW1EOztJQW1EL0MsZ0JBQVksR0FBZSxFQUFTLEdBQVU7UUFBVixRQUFHLEdBQUgsR0FBRyxDQUFPOzZCQUpkLEVBQUU7eUJBRXRCLFNBQVM7UUFHakIsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO0tBQ2pDO0lBRUQseUJBQVEsR0FBUjtRQUFBLGlCQU9DO1FBTkcsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztTQUN4QjtRQUNELElBQUksQ0FBQyxDQUFDO1lBQ0YsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxhQUFhLEVBQUUsRUFBcEIsQ0FBb0IsQ0FBQyxDQUFDLENBQUM7U0FDNUY7S0FDSjtJQUVELDhCQUFhLEdBQWI7UUFDSSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNoRCxJQUFJLENBQUMsYUFBYSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDO0tBQzNDO0lBR0Qsd0JBQU87UUFDSCxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUM7O0lBSTNCLDBCQUFTLGFBQUMsS0FBb0I7O1FBRTFCLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFPLEtBQUssRUFBRSxJQUFJLEtBQUssQ0FBQyxPQUFPLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztZQUMvQyxLQUFLLENBQUMsY0FBYyxFQUFFLENBQUM7WUFDdkIsSUFBSSxDQUFDLGVBQWUsRUFBRSxDQUFDO1NBQzFCOztJQUdMLGdDQUFlLEdBQWY7UUFDSSxJQUFJLE1BQU0sR0FBRyxJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7UUFFOUIsRUFBRSxDQUFDLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDZixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sS0FBSyxDQUFDLElBQUksSUFBSSxDQUFDLGFBQWEsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUN2RCxJQUFJLENBQUMsYUFBYSxHQUFHLENBQUMsQ0FBQzthQUMxQjtZQUVELElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUM7U0FDM0M7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLEdBQUcsTUFBTSxDQUFDO1lBQzVCLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQztTQUMxQjtLQUNKO0lBRUQsMEJBQVMsR0FBVDtRQUNJLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDO1FBQ3BELElBQUksQ0FBQyxTQUFTLEdBQUcsTUFBTSxHQUFHLFNBQVMsR0FBRyxPQUFPLENBQUM7UUFDOUMsTUFBTSxDQUFDLE1BQU0sQ0FBQztLQUNqQjtJQUVELDRCQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztLQUNwRDs7Z0JBdkdKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLFNBQVM7b0JBQ25CLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUsaWZBVUM7b0JBQ1gsTUFBTSxFQUFFLENBQUUsaWlCQW9CVCxDQUFFO2lCQUNOOzs7O2dCQXhDMEIsaUJBQVU7Z0JBQzVCLGNBQUs7OzswQkF5Q1QsWUFBSzs0QkE0QkwsbUJBQVksU0FBQyxPQUFPOzhCQUtwQixtQkFBWSxTQUFDLFNBQVMsRUFBRSxDQUFDLFFBQVEsQ0FBQzs7aUJBM0V2Qzs7QUF5Q2Esd0JBQU0iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsIElucHV0LCBFbGVtZW50UmVmLCBIb3N0TGlzdGVuZXIsIE9uSW5pdCwgVmlld0VuY2Fwc3VsYXRpb24sIE9uRGVzdHJveSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi8uLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBTdWJzY3JpcHRpb24gfSBmcm9tICdyeGpzL1N1YnNjcmlwdGlvbic7XG5cblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICd2Zy1tdXRlJyxcbiAgICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgIHRlbXBsYXRlOiBgXG4gICAgICAgIDxkaXYgY2xhc3M9XCJpY29uXCJcbiAgICAgICAgICAgICBbY2xhc3MudmctaWNvbi12b2x1bWVfdXBdPVwiZ2V0Vm9sdW1lKCkgPj0gMC43NVwiXG4gICAgICAgICAgICAgW2NsYXNzLnZnLWljb24tdm9sdW1lX2Rvd25dPVwiZ2V0Vm9sdW1lKCkgPj0gMC4yNSAmJiBnZXRWb2x1bWUoKSA8IDAuNzVcIlxuICAgICAgICAgICAgIFtjbGFzcy52Zy1pY29uLXZvbHVtZV9tdXRlXT1cImdldFZvbHVtZSgpID4gMCAmJiBnZXRWb2x1bWUoKSA8IDAuMjVcIlxuICAgICAgICAgICAgIFtjbGFzcy52Zy1pY29uLXZvbHVtZV9vZmZdPVwiZ2V0Vm9sdW1lKCkgPT09IDBcIlxuICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgcm9sZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgYXJpYS1sYWJlbD1cIm11dGUgYnV0dG9uXCJcbiAgICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVldGV4dF09XCJhcmlhVmFsdWVcIj5cbiAgICAgICAgPC9kaXY+YCxcbiAgICBzdHlsZXM6IFsgYFxuICAgICAgICB2Zy1tdXRlIHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAta2h0bWwtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICAgICAgICB3aWR0aDogNTBweDtcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA1MHB4O1xuICAgICAgICB9XG5cbiAgICAgICAgdmctbXV0ZSAuaWNvbiB7XG4gICAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICAgICAgfVxuICAgIGAgXVxufSlcbmV4cG9ydCBjbGFzcyBWZ011dGUgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcblxuICAgIGN1cnJlbnRWb2x1bWU6IG51bWJlcjtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBhcmlhVmFsdWUgPSAndW5tdXRlZCc7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgICAgIHRoaXMuY3VycmVudFZvbHVtZSA9IHRoaXMudGFyZ2V0LnZvbHVtZTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdjbGljaycpXG4gICAgb25DbGljaygpIHtcbiAgICAgICAgdGhpcy5jaGFuZ2VNdXRlU3RhdGUoKTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duJywgWyckZXZlbnQnXSlcbiAgICBvbktleURvd24oZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgLy8gT24gcHJlc3MgRW50ZXIgKDEzKSBvciBTcGFjZSAoMzIpXG4gICAgICAgIGlmIChldmVudC5rZXlDb2RlID09PSAxMyB8fCBldmVudC5rZXlDb2RlID09PSAzMikge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIHRoaXMuY2hhbmdlTXV0ZVN0YXRlKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjaGFuZ2VNdXRlU3RhdGUoKSB7XG4gICAgICAgIGxldCB2b2x1bWUgPSB0aGlzLmdldFZvbHVtZSgpO1xuXG4gICAgICAgIGlmICh2b2x1bWUgPT09IDApIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhcmdldC52b2x1bWUgPT09IDAgJiYgdGhpcy5jdXJyZW50Vm9sdW1lID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jdXJyZW50Vm9sdW1lID0gMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy50YXJnZXQudm9sdW1lID0gdGhpcy5jdXJyZW50Vm9sdW1lO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jdXJyZW50Vm9sdW1lID0gdm9sdW1lO1xuICAgICAgICAgICAgdGhpcy50YXJnZXQudm9sdW1lID0gMDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldFZvbHVtZSgpIHtcbiAgICAgICAgY29uc3Qgdm9sdW1lID0gdGhpcy50YXJnZXQgPyB0aGlzLnRhcmdldC52b2x1bWUgOiAwO1xuICAgICAgICB0aGlzLmFyaWFWYWx1ZSA9IHZvbHVtZSA/ICd1bm11dGVkJyA6ICdtdXRlZCc7XG4gICAgICAgIHJldHVybiB2b2x1bWU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar vg_states_1 = require(\"../../core/states/vg-states\");\nvar VgPlayPause = (function () {\n function VgPlayPause(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.ariaValue = vg_states_1.VgStates.VG_PAUSED;\n this.elem = ref.nativeElement;\n }\n VgPlayPause.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgPlayPause.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgPlayPause.prototype.onClick = function () {\n this.playPause();\n };\n VgPlayPause.prototype.onKeyDown = function (event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.playPause();\n }\n };\n VgPlayPause.prototype.playPause = function () {\n var state = this.getState();\n switch (state) {\n case vg_states_1.VgStates.VG_PLAYING:\n this.target.pause();\n break;\n case vg_states_1.VgStates.VG_PAUSED:\n case vg_states_1.VgStates.VG_ENDED:\n this.target.play();\n break;\n }\n };\n VgPlayPause.prototype.getState = function () {\n this.ariaValue = this.target ? this.target.state : vg_states_1.VgStates.VG_PAUSED;\n return this.ariaValue;\n };\n VgPlayPause.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgPlayPause.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-play-pause',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"icon\\\"\\n [class.vg-icon-pause]=\\\"getState() === 'playing'\\\"\\n [class.vg-icon-play_arrow]=\\\"getState() === 'paused' || getState() === 'ended'\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"button\\\"\\n [attr.aria-label]=\\\"getState() === 'paused'?'play':'pause'\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n </div>\",\n styles: [\"\\n vg-play-pause {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -khtml-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n\\n vg-play-pause .icon {\\n pointer-events: none;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgPlayPause.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgPlayPause.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"onClick\": [{ type: core_1.HostListener, args: ['click',] },],\n \"onKeyDown\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgPlayPause;\n}());\nexports.VgPlayPause = VgPlayPause;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctcGxheS1wYXVzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLXBsYXktcGF1c2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBaUg7QUFDakgscURBQW1EO0FBQ25ELHlEQUF1RDs7SUErQ25ELHFCQUFZLEdBQWUsRUFBUyxHQUFVO1FBQVYsUUFBRyxHQUFILEdBQUcsQ0FBTzs2QkFKZCxFQUFFO3lCQUV0QixvQkFBUSxDQUFDLFNBQVM7UUFHMUIsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO0tBQ2pDO0lBRUQsOEJBQVEsR0FBUjtRQUFBLGlCQU9DO1FBTkcsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztTQUN4QjtRQUNELElBQUksQ0FBQyxDQUFDO1lBQ0YsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxhQUFhLEVBQUUsRUFBcEIsQ0FBb0IsQ0FBQyxDQUFDLENBQUM7U0FDNUY7S0FDSjtJQUVELG1DQUFhLEdBQWI7UUFDSSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztLQUNuRDtJQUdELDZCQUFPO1FBQ0gsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDOztJQUlyQiwrQkFBUyxhQUFDLEtBQW9COztRQUUxQixFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDL0MsS0FBSyxDQUFDLGNBQWMsRUFBRSxDQUFDO1lBQ3ZCLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztTQUNwQjs7SUFHTCwrQkFBUyxHQUFUO1FBQ0ksSUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLFFBQVEsRUFBRSxDQUFDO1FBRTVCLE1BQU0sQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7WUFDWixLQUFLLG9CQUFRLENBQUMsVUFBVTtnQkFDcEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsQ0FBQztnQkFDcEIsS0FBSyxDQUFDO1lBRVYsS0FBSyxvQkFBUSxDQUFDLFNBQVMsQ0FBQztZQUN4QixLQUFLLG9CQUFRLENBQUMsUUFBUTtnQkFDbEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsQ0FBQztnQkFDbkIsS0FBSyxDQUFDO1NBQ2I7S0FDSjtJQUVELDhCQUFRLEdBQVI7UUFDSSxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEdBQUcsb0JBQVEsQ0FBQyxTQUFTLENBQUM7UUFDdEUsTUFBTSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUM7S0FDekI7SUFFRCxpQ0FBVyxHQUFYO1FBQ0ksSUFBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQWYsQ0FBZSxDQUFDLENBQUM7S0FDcEQ7O2dCQWpHSixnQkFBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSxlQUFlO29CQUN6QixhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLHdZQVFDO29CQUNYLE1BQU0sRUFBRSxDQUFFLDZpQkFvQlQsQ0FBRTtpQkFDTjs7OztnQkF0Q21CLGlCQUFVO2dCQUNyQixjQUFLOzs7MEJBdUNULFlBQUs7NEJBMEJMLG1CQUFZLFNBQUMsT0FBTzs4QkFLcEIsbUJBQVksU0FBQyxTQUFTLEVBQUUsQ0FBQyxRQUFRLENBQUM7O3NCQXZFdkM7O0FBdUNhLGtDQUFXIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBFbGVtZW50UmVmLCBIb3N0TGlzdGVuZXIsIE9uSW5pdCwgSW5wdXQsIFZpZXdFbmNhcHN1bGF0aW9uLCBPbkRlc3Ryb3kgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFZnQVBJIH0gZnJvbSAnLi4vLi4vY29yZS9zZXJ2aWNlcy92Zy1hcGknO1xuaW1wb3J0IHsgVmdTdGF0ZXMgfSBmcm9tICcuLi8uLi9jb3JlL3N0YXRlcy92Zy1zdGF0ZXMnO1xuaW1wb3J0IHsgU3Vic2NyaXB0aW9uIH0gZnJvbSAncnhqcy9TdWJzY3JpcHRpb24nO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXBsYXktcGF1c2UnLFxuICAgIGVuY2Fwc3VsYXRpb246IFZpZXdFbmNhcHN1bGF0aW9uLk5vbmUsXG4gICAgdGVtcGxhdGU6IGBcbiAgICAgICAgPGRpdiBjbGFzcz1cImljb25cIlxuICAgICAgICAgICAgIFtjbGFzcy52Zy1pY29uLXBhdXNlXT1cImdldFN0YXRlKCkgPT09ICdwbGF5aW5nJ1wiXG4gICAgICAgICAgICAgW2NsYXNzLnZnLWljb24tcGxheV9hcnJvd109XCJnZXRTdGF0ZSgpID09PSAncGF1c2VkJyB8fCBnZXRTdGF0ZSgpID09PSAnZW5kZWQnXCJcbiAgICAgICAgICAgICB0YWJpbmRleD1cIjBcIlxuICAgICAgICAgICAgIHJvbGU9XCJidXR0b25cIlxuICAgICAgICAgICAgIFthdHRyLmFyaWEtbGFiZWxdPVwiZ2V0U3RhdGUoKSA9PT0gJ3BhdXNlZCc/J3BsYXknOidwYXVzZSdcIlxuICAgICAgICAgICAgIFthdHRyLmFyaWEtdmFsdWV0ZXh0XT1cImFyaWFWYWx1ZVwiPlxuICAgICAgICA8L2Rpdj5gLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLXBsYXktcGF1c2Uge1xuICAgICAgICAgICAgLXdlYmtpdC10b3VjaC1jYWxsb3V0OiBub25lO1xuICAgICAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIC1raHRtbC11c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbXMtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICB1c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgICAgIGhlaWdodDogNTBweDtcbiAgICAgICAgICAgIHdpZHRoOiA1MHB4O1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgY29sb3I6IHdoaXRlO1xuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDUwcHg7XG4gICAgICAgIH1cblxuICAgICAgICB2Zy1wbGF5LXBhdXNlIC5pY29uIHtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICB9XG4gICAgYCBdXG59KVxuZXhwb3J0IGNsYXNzIFZnUGxheVBhdXNlIGltcGxlbWVudHMgT25Jbml0LCBPbkRlc3Ryb3kge1xuICAgIEBJbnB1dCgpIHZnRm9yOiBzdHJpbmc7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBhcmlhVmFsdWUgPSBWZ1N0YXRlcy5WR19QQVVTRUQ7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgQEhvc3RMaXN0ZW5lcignY2xpY2snKVxuICAgIG9uQ2xpY2soKSB7XG4gICAgICAgIHRoaXMucGxheVBhdXNlKCk7XG4gICAgfVxuXG4gICAgQEhvc3RMaXN0ZW5lcigna2V5ZG93bicsIFsnJGV2ZW50J10pXG4gICAgb25LZXlEb3duKGV2ZW50OiBLZXlib2FyZEV2ZW50KSB7XG4gICAgICAgIC8vIE9uIHByZXNzIEVudGVyICgxMykgb3IgU3BhY2UgKDMyKVxuICAgICAgICBpZiAoZXZlbnQua2V5Q29kZSA9PT0gMTMgfHwgZXZlbnQua2V5Q29kZSA9PT0gMzIpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB0aGlzLnBsYXlQYXVzZSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcGxheVBhdXNlKCkge1xuICAgICAgICBsZXQgc3RhdGUgPSB0aGlzLmdldFN0YXRlKCk7XG5cbiAgICAgICAgc3dpdGNoIChzdGF0ZSkge1xuICAgICAgICAgICAgY2FzZSBWZ1N0YXRlcy5WR19QTEFZSU5HOlxuICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0LnBhdXNlKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgVmdTdGF0ZXMuVkdfUEFVU0VEOlxuICAgICAgICAgICAgY2FzZSBWZ1N0YXRlcy5WR19FTkRFRDpcbiAgICAgICAgICAgICAgICB0aGlzLnRhcmdldC5wbGF5KCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRTdGF0ZSgpIHtcbiAgICAgICAgdGhpcy5hcmlhVmFsdWUgPSB0aGlzLnRhcmdldCA/IHRoaXMudGFyZ2V0LnN0YXRlIDogVmdTdGF0ZXMuVkdfUEFVU0VEO1xuICAgICAgICByZXR1cm4gdGhpcy5hcmlhVmFsdWU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar VgPlaybackButton = (function () {\n function VgPlaybackButton(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.ariaValue = 1;\n this.elem = ref.nativeElement;\n this.playbackValues = ['0.5', '1.0', '1.5', '2.0'];\n this.playbackIndex = 1;\n }\n VgPlaybackButton.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgPlaybackButton.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgPlaybackButton.prototype.onClick = function () {\n this.updatePlaybackSpeed();\n };\n VgPlaybackButton.prototype.onKeyDown = function (event) {\n // On press Enter (13) or Space (32)\n if (event.keyCode === 13 || event.keyCode === 32) {\n event.preventDefault();\n this.updatePlaybackSpeed();\n }\n };\n VgPlaybackButton.prototype.updatePlaybackSpeed = function () {\n this.playbackIndex = ++this.playbackIndex % this.playbackValues.length;\n if (this.target instanceof vg_api_1.VgAPI) {\n this.target.playbackRate = (this.playbackValues[this.playbackIndex]);\n }\n else {\n this.target.playbackRate[this.vgFor] = (this.playbackValues[this.playbackIndex]);\n }\n };\n VgPlaybackButton.prototype.getPlaybackRate = function () {\n this.ariaValue = this.target ? this.target.playbackRate : 1.0;\n return this.ariaValue;\n };\n VgPlaybackButton.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgPlaybackButton.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-playback-button',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <span class=\\\"button\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"button\\\"\\n aria-label=\\\"playback speed button\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n {{getPlaybackRate()}}x\\n </span>\",\n styles: [\"\\n vg-playback-button {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\\n }\\n\\n vg-playback-button .button {\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n width: 50px;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgPlaybackButton.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgPlaybackButton.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"playbackValues\": [{ type: core_1.Input },],\n \"onClick\": [{ type: core_1.HostListener, args: ['click',] },],\n \"onKeyDown\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgPlaybackButton;\n}());\nexports.VgPlaybackButton = VgPlaybackButton;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctcGxheWJhY2stYnV0dG9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctcGxheWJhY2stYnV0dG9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQWlIO0FBQ2pILHFEQUFtRDs7SUFvRC9DLDBCQUFZLEdBQWUsRUFBUyxHQUFVO1FBQVYsUUFBRyxHQUFILEdBQUcsQ0FBTzs2QkFKZCxFQUFFO3lCQUV0QixDQUFDO1FBR1QsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO1FBQzlCLElBQUksQ0FBQyxjQUFjLEdBQUcsQ0FBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxLQUFLLENBQUUsQ0FBQztRQUNyRCxJQUFJLENBQUMsYUFBYSxHQUFHLENBQUMsQ0FBQztLQUMxQjtJQUVELG1DQUFRLEdBQVI7UUFBQSxpQkFPQztRQU5HLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLGNBQU0sT0FBQSxLQUFJLENBQUMsYUFBYSxFQUFFLEVBQXBCLENBQW9CLENBQUMsQ0FBQyxDQUFDO1NBQzVGO0tBQ0o7SUFFRCx3Q0FBYSxHQUFiO1FBQ0ksSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7S0FDbkQ7SUFHRCxrQ0FBTztRQUNILElBQUksQ0FBQyxtQkFBbUIsRUFBRSxDQUFDOztJQUkvQixvQ0FBUyxhQUFDLEtBQW9COztRQUUxQixFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDL0MsS0FBSyxDQUFDLGNBQWMsRUFBRSxDQUFDO1lBQ3ZCLElBQUksQ0FBQyxtQkFBbUIsRUFBRSxDQUFDO1NBQzlCOztJQUdMLDhDQUFtQixHQUFuQjtRQUNJLElBQUksQ0FBQyxhQUFhLEdBQUcsRUFBRSxJQUFJLENBQUMsYUFBYSxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsTUFBTSxDQUFDO1FBRXZFLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLFlBQVksY0FBSyxDQUFDLENBQUMsQ0FBQztZQUMvQixJQUFJLENBQUMsTUFBTSxDQUFDLFlBQVksR0FBRyxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUUsSUFBSSxDQUFDLGFBQWEsQ0FBRSxDQUFDLENBQUM7U0FDMUU7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFFLElBQUksQ0FBQyxLQUFLLENBQUUsR0FBRyxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUUsSUFBSSxDQUFDLGFBQWEsQ0FBRSxDQUFDLENBQUM7U0FDeEY7S0FDSjtJQUVELDBDQUFlLEdBQWY7UUFDSSxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxZQUFZLEdBQUcsR0FBRyxDQUFDO1FBQzlELE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDO0tBQ3pCO0lBRUQsc0NBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkFwR0osZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsb0JBQW9CO29CQUM5QixhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLGdPQU9GO29CQUNSLE1BQU0sRUFBRSxDQUFFLHFyQkF1QlQsQ0FBRTtpQkFDTjs7OztnQkF2QzBCLGlCQUFVO2dCQUM1QixjQUFLOzs7MEJBd0NULFlBQUs7bUNBS0wsWUFBSzs0QkEwQkwsbUJBQVksU0FBQyxPQUFPOzhCQUtwQixtQkFBWSxTQUFDLFNBQVMsRUFBRSxDQUFDLFFBQVEsQ0FBQzs7MkJBN0V2Qzs7QUF3Q2EsNENBQWdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBJbnB1dCwgRWxlbWVudFJlZiwgSG9zdExpc3RlbmVyLCBPbkluaXQsIFZpZXdFbmNhcHN1bGF0aW9uLCBPbkRlc3Ryb3kgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFZnQVBJIH0gZnJvbSAnLi4vLi4vY29yZS9zZXJ2aWNlcy92Zy1hcGknO1xuaW1wb3J0IHsgU3Vic2NyaXB0aW9uIH0gZnJvbSAncnhqcy9TdWJzY3JpcHRpb24nO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXBsYXliYWNrLWJ1dHRvbicsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYFxuICAgIDxzcGFuIGNsYXNzPVwiYnV0dG9uXCJcbiAgICAgICAgICB0YWJpbmRleD1cIjBcIlxuICAgICAgICAgIHJvbGU9XCJidXR0b25cIlxuICAgICAgICAgIGFyaWEtbGFiZWw9XCJwbGF5YmFjayBzcGVlZCBidXR0b25cIlxuICAgICAgICAgIFthdHRyLmFyaWEtdmFsdWV0ZXh0XT1cImFyaWFWYWx1ZVwiPlxuICAgICAgICB7e2dldFBsYXliYWNrUmF0ZSgpfX14XG4gICAgPC9zcGFuPmAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctcGxheWJhY2stYnV0dG9uIHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICAgICAgICB3aWR0aDogNTBweDtcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IEhlbHZldGljYSBOZXVlLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctcGxheWJhY2stYnV0dG9uIC5idXR0b24ge1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgICAgIHdpZHRoOiA1MHB4O1xuICAgICAgICB9XG4gICAgYCBdXG59KVxuZXhwb3J0IGNsYXNzIFZnUGxheWJhY2tCdXR0b24gaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcblxuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHRhcmdldDogYW55O1xuXG4gICAgQElucHV0KCkgcGxheWJhY2tWYWx1ZXM6IEFycmF5PHN0cmluZz47XG4gICAgcGxheWJhY2tJbmRleDogbnVtYmVyO1xuXG4gICAgc3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcblxuICAgIGFyaWFWYWx1ZSA9IDE7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgICAgICB0aGlzLnBsYXliYWNrVmFsdWVzID0gWyAnMC41JywgJzEuMCcsICcxLjUnLCAnMi4wJyBdO1xuICAgICAgICB0aGlzLnBsYXliYWNrSW5kZXggPSAxO1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgQEhvc3RMaXN0ZW5lcignY2xpY2snKVxuICAgIG9uQ2xpY2soKSB7XG4gICAgICAgIHRoaXMudXBkYXRlUGxheWJhY2tTcGVlZCgpO1xuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ2tleWRvd24nLCBbJyRldmVudCddKVxuICAgIG9uS2V5RG93bihldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICAvLyBPbiBwcmVzcyBFbnRlciAoMTMpIG9yIFNwYWNlICgzMilcbiAgICAgICAgaWYgKGV2ZW50LmtleUNvZGUgPT09IDEzIHx8IGV2ZW50LmtleUNvZGUgPT09IDMyKSB7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVQbGF5YmFja1NwZWVkKCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICB1cGRhdGVQbGF5YmFja1NwZWVkKCkge1xuICAgICAgICB0aGlzLnBsYXliYWNrSW5kZXggPSArK3RoaXMucGxheWJhY2tJbmRleCAlIHRoaXMucGxheWJhY2tWYWx1ZXMubGVuZ3RoO1xuXG4gICAgICAgIGlmICh0aGlzLnRhcmdldCBpbnN0YW5jZW9mIFZnQVBJKSB7XG4gICAgICAgICAgICB0aGlzLnRhcmdldC5wbGF5YmFja1JhdGUgPSAodGhpcy5wbGF5YmFja1ZhbHVlc1sgdGhpcy5wbGF5YmFja0luZGV4IF0pO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy50YXJnZXQucGxheWJhY2tSYXRlWyB0aGlzLnZnRm9yIF0gPSAodGhpcy5wbGF5YmFja1ZhbHVlc1sgdGhpcy5wbGF5YmFja0luZGV4IF0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0UGxheWJhY2tSYXRlKCkge1xuICAgICAgICB0aGlzLmFyaWFWYWx1ZSA9IHRoaXMudGFyZ2V0ID8gdGhpcy50YXJnZXQucGxheWJhY2tSYXRlIDogMS4wO1xuICAgICAgICByZXR1cm4gdGhpcy5hcmlhVmFsdWU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar VgQualitySelector = (function () {\n function VgQualitySelector(ref, API) {\n this.API = API;\n this.onBitrateChange = new core_1.EventEmitter();\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgQualitySelector.prototype.ngOnInit = function () {\n };\n VgQualitySelector.prototype.ngOnChanges = function (changes) {\n if (changes['bitrates'].currentValue && changes['bitrates'].currentValue.length) {\n this.bitrates.forEach(function (item) { return item.label = item.label || Math.round(item.bitrate / 1000).toString(); });\n }\n };\n VgQualitySelector.prototype.selectBitrate = function (index) {\n this.bitrateSelected = this.bitrates[index];\n this.onBitrateChange.emit(this.bitrates[index]);\n };\n VgQualitySelector.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgQualitySelector.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-quality-selector',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"container\\\">\\n <div class=\\\"quality-selected\\\"\\n [class.vg-icon-hd]=\\\"!bitrateSelected\\\">\\n {{ bitrateSelected?.label }}\\n </div>\\n \\n <select class=\\\"quality-selector\\\" \\n (change)=\\\"selectBitrate($event.target.value)\\\"\\n tabindex=\\\"0\\\"\\n aria-label=\\\"quality selector\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n <option \\n *ngFor=\\\"let bitrate of bitrates\\\"\\n [value]=\\\"bitrate.qualityIndex\\\"\\n [selected]=\\\"bitrate.qualityIndex === bitrateSelected?.qualityIndex\\\">\\n {{ bitrate.label }}\\n </option>\\n </select>\\n </div>\\n \",\n styles: [\"\\n vg-quality-selector {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n width: 50px;\\n height: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n vg-quality-selector .container {\\n position: relative;\\n display: flex;\\n flex-grow: 1;\\n align-items: center;\\n \\n padding: 0;\\n margin: 5px;\\n }\\n vg-quality-selector select.quality-selector {\\n width: 50px;\\n padding: 5px 8px;\\n border: none;\\n background: none;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n color: transparent;\\n font-size: 16px;\\n }\\n vg-quality-selector select.quality-selector::-ms-expand {\\n display: none;\\n }\\n vg-quality-selector select.quality-selector option {\\n color: #000;\\n }\\n vg-quality-selector .quality-selected {\\n position: absolute;\\n width: 100%;\\n height: 50px;\\n top: -6px;\\n text-align: center;\\n text-transform: uppercase;\\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\\n padding-top: 2px;\\n pointer-events: none;\\n }\\n vg-quality-selector .vg-icon-closed_caption:before {\\n width: 100%;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgQualitySelector.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgQualitySelector.propDecorators = {\n \"bitrates\": [{ type: core_1.Input },],\n \"onBitrateChange\": [{ type: core_1.Output },],\n };\n return VgQualitySelector;\n}());\nexports.VgQualitySelector = VgQualitySelector;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctcXVhbGl0eS1zZWxlY3Rvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLXF1YWxpdHktc2VsZWN0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FTdUI7QUFDdkIscURBQW1EOztJQW1HL0MsMkJBQVksR0FBZSxFQUFTLEdBQVU7UUFBVixRQUFHLEdBQUgsR0FBRyxDQUFPOytCQVhXLElBQUksbUJBQVksRUFBRTs2QkFPM0MsRUFBRTtRQUs5QixJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxhQUFhLENBQUM7S0FDakM7SUFFRCxvQ0FBUSxHQUFSO0tBQ0M7SUFFRCx1Q0FBVyxHQUFYLFVBQVksT0FBc0I7UUFDOUIsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxDQUFDLFlBQVksSUFBSSxPQUFPLENBQUMsVUFBVSxDQUFDLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDOUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsVUFBQSxJQUFJLElBQUksT0FBQSxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxDQUFDLFFBQVEsRUFBRSxFQUFyRSxDQUFxRSxDQUFDLENBQUE7U0FDdkc7S0FDSjtJQUVELHlDQUFhLEdBQWIsVUFBYyxLQUFhO1FBQ3ZCLElBQUksQ0FBQyxlQUFlLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUM1QyxJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7S0FDbkQ7SUFFRCx1Q0FBVyxHQUFYO1FBQ0ksSUFBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQWYsQ0FBZSxDQUFDLENBQUM7S0FDcEQ7O2dCQW5ISixnQkFBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSxxQkFBcUI7b0JBQy9CLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUsMnpCQW9CVDtvQkFDRCxNQUFNLEVBQUUsQ0FBRSx3ckRBdURULENBQUU7aUJBQ047Ozs7Z0JBNUZHLGlCQUFVO2dCQVFMLGNBQUs7Ozs2QkFzRlQsWUFBSztvQ0FFTCxhQUFNOzs0QkFsR1g7O0FBK0ZhLDhDQUFpQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gICAgQ29tcG9uZW50LFxuICAgIEVsZW1lbnRSZWYsXG4gICAgT25Jbml0LFxuICAgIElucHV0LFxuICAgIFZpZXdFbmNhcHN1bGF0aW9uLFxuICAgIE9uRGVzdHJveSxcbiAgICBTaW1wbGVDaGFuZ2VzLFxuICAgIE9uQ2hhbmdlcywgT3V0cHV0LCBFdmVudEVtaXR0ZXJcbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcbmltcG9ydCB7IEJpdHJhdGVPcHRpb24gfSBmcm9tICcuLi8uLi9jb3JlL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXF1YWxpdHktc2VsZWN0b3InLFxuICAgIGVuY2Fwc3VsYXRpb246IFZpZXdFbmNhcHN1bGF0aW9uLk5vbmUsXG4gICAgdGVtcGxhdGU6IGBcbiAgICAgICAgPGRpdiBjbGFzcz1cImNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInF1YWxpdHktc2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICBbY2xhc3MudmctaWNvbi1oZF09XCIhYml0cmF0ZVNlbGVjdGVkXCI+XG4gICAgICAgICAgICAgICAge3sgYml0cmF0ZVNlbGVjdGVkPy5sYWJlbCB9fVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIDxzZWxlY3QgY2xhc3M9XCJxdWFsaXR5LXNlbGVjdG9yXCIgXG4gICAgICAgICAgICAgICAgICAgIChjaGFuZ2UpPVwic2VsZWN0Qml0cmF0ZSgkZXZlbnQudGFyZ2V0LnZhbHVlKVwiXG4gICAgICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJxdWFsaXR5IHNlbGVjdG9yXCJcbiAgICAgICAgICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZXRleHRdPVwiYXJpYVZhbHVlXCI+XG4gICAgICAgICAgICAgICAgPG9wdGlvbiBcbiAgICAgICAgICAgICAgICAgICAgKm5nRm9yPVwibGV0IGJpdHJhdGUgb2YgYml0cmF0ZXNcIlxuICAgICAgICAgICAgICAgICAgICBbdmFsdWVdPVwiYml0cmF0ZS5xdWFsaXR5SW5kZXhcIlxuICAgICAgICAgICAgICAgICAgICBbc2VsZWN0ZWRdPVwiYml0cmF0ZS5xdWFsaXR5SW5kZXggPT09IGJpdHJhdGVTZWxlY3RlZD8ucXVhbGl0eUluZGV4XCI+XG4gICAgICAgICAgICAgICAgICAgIHt7IGJpdHJhdGUubGFiZWwgfX1cbiAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICA8L2Rpdj5cbiAgICBgLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLXF1YWxpdHktc2VsZWN0b3Ige1xuICAgICAgICAgICAgLXdlYmtpdC10b3VjaC1jYWxsb3V0OiBub25lO1xuICAgICAgICAgICAgLXdlYmtpdC11c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbXMtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICB1c2VyLXNlbGVjdDogbm9uZTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgICAgIHdpZHRoOiA1MHB4O1xuICAgICAgICAgICAgaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgY29sb3I6IHdoaXRlO1xuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDUwcHg7XG4gICAgICAgIH1cbiAgICAgICAgdmctcXVhbGl0eS1zZWxlY3RvciAuY29udGFpbmVyIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBmbGV4LWdyb3c6IDE7XG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBwYWRkaW5nOiAwO1xuICAgICAgICAgICAgbWFyZ2luOiA1cHg7XG4gICAgICAgIH1cbiAgICAgICAgdmctcXVhbGl0eS1zZWxlY3RvciBzZWxlY3QucXVhbGl0eS1zZWxlY3RvciB7XG4gICAgICAgICAgICB3aWR0aDogNTBweDtcbiAgICAgICAgICAgIHBhZGRpbmc6IDVweCA4cHg7XG4gICAgICAgICAgICBib3JkZXI6IG5vbmU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiBub25lO1xuICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lO1xuICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lO1xuICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTtcbiAgICAgICAgICAgIGNvbG9yOiB0cmFuc3BhcmVudDtcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgICAgICAgfVxuICAgICAgICB2Zy1xdWFsaXR5LXNlbGVjdG9yIHNlbGVjdC5xdWFsaXR5LXNlbGVjdG9yOjotbXMtZXhwYW5kIHtcbiAgICAgICAgICAgIGRpc3BsYXk6IG5vbmU7XG4gICAgICAgIH1cbiAgICAgICAgdmctcXVhbGl0eS1zZWxlY3RvciBzZWxlY3QucXVhbGl0eS1zZWxlY3RvciBvcHRpb24ge1xuICAgICAgICAgICAgY29sb3I6ICMwMDA7XG4gICAgICAgIH1cbiAgICAgICAgdmctcXVhbGl0eS1zZWxlY3RvciAucXVhbGl0eS1zZWxlY3RlZCB7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogNTBweDtcbiAgICAgICAgICAgIHRvcDogLTZweDtcbiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgICAgICAgICAgIHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG4gICAgICAgICAgICBmb250LWZhbWlseTogSGVsdmV0aWNhIE5ldWUsIEhlbHZldGljYSwgQXJpYWwsIHNhbnMtc2VyaWY7XG4gICAgICAgICAgICBwYWRkaW5nLXRvcDogMnB4O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgIH1cbiAgICAgICAgdmctcXVhbGl0eS1zZWxlY3RvciAudmctaWNvbi1jbG9zZWRfY2FwdGlvbjpiZWZvcmUge1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdRdWFsaXR5U2VsZWN0b3IgaW1wbGVtZW50cyBPbkluaXQsIE9uQ2hhbmdlcywgT25EZXN0cm95IHtcbiAgICBASW5wdXQoKSBiaXRyYXRlczogQml0cmF0ZU9wdGlvbltdO1xuXG4gICAgQE91dHB1dCgpIG9uQml0cmF0ZUNoYW5nZTogRXZlbnRFbWl0dGVyPEJpdHJhdGVPcHRpb24+ID0gbmV3IEV2ZW50RW1pdHRlcigpO1xuXG4gICAgYml0cmF0ZVNlbGVjdGVkOiBCaXRyYXRlT3B0aW9uO1xuXG4gICAgZWxlbTogSFRNTEVsZW1lbnQ7XG4gICAgdGFyZ2V0OiBhbnk7XG5cbiAgICBzdWJzY3JpcHRpb25zOiBTdWJzY3JpcHRpb25bXSA9IFtdO1xuXG4gICAgYXJpYVZhbHVlOiBzdHJpbmc7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgIH1cblxuICAgIG5nT25DaGFuZ2VzKGNoYW5nZXM6IFNpbXBsZUNoYW5nZXMpIHtcbiAgICAgICAgaWYgKGNoYW5nZXNbJ2JpdHJhdGVzJ10uY3VycmVudFZhbHVlICYmIGNoYW5nZXNbJ2JpdHJhdGVzJ10uY3VycmVudFZhbHVlLmxlbmd0aCkge1xuICAgICAgICAgICAgdGhpcy5iaXRyYXRlcy5mb3JFYWNoKGl0ZW0gPT4gaXRlbS5sYWJlbCA9IGl0ZW0ubGFiZWwgfHwgTWF0aC5yb3VuZChpdGVtLmJpdHJhdGUgLyAxMDAwKS50b1N0cmluZygpKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgc2VsZWN0Qml0cmF0ZShpbmRleDogbnVtYmVyKSB7XG4gICAgICAgIHRoaXMuYml0cmF0ZVNlbGVjdGVkID0gdGhpcy5iaXRyYXRlc1tpbmRleF07XG4gICAgICAgIHRoaXMub25CaXRyYXRlQ2hhbmdlLmVtaXQodGhpcy5iaXRyYXRlc1tpbmRleF0pO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../../core/services/vg-api\");\nvar VgScrubBarBufferingTime = (function () {\n function VgScrubBarBufferingTime(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgScrubBarBufferingTime.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgScrubBarBufferingTime.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgScrubBarBufferingTime.prototype.getBufferTime = function () {\n var bufferTime = \"0%\";\n if (this.target && this.target.buffer && this.target.buffered.length) {\n if (this.target.time.total === 0) {\n bufferTime = '0%';\n }\n else {\n bufferTime = ((this.target.buffer.end / this.target.time.total) * 100) + '%';\n }\n }\n return bufferTime;\n };\n VgScrubBarBufferingTime.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgScrubBarBufferingTime.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-scrub-bar-buffering-time',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<div class=\\\"background\\\" [style.width]=\\\"getBufferTime()\\\"></div>\",\n styles: [\"\\n vg-scrub-bar-buffering-time {\\n display: flex;\\n width: 100%;\\n height: 5px;\\n pointer-events: none;\\n position: absolute;\\n }\\n\\n vg-scrub-bar-buffering-time .background {\\n background-color: rgba(255, 255, 255, 0.3);\\n }\\n\\n vg-controls vg-scrub-bar-buffering-time {\\n position: absolute;\\n top: calc(50% - 3px);\\n }\\n\\n vg-controls vg-scrub-bar-buffering-time .background {\\n -webkit-border-radius: 2px;\\n -moz-border-radius: 2px;\\n border-radius: 2px;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgScrubBarBufferingTime.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgScrubBarBufferingTime.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n };\n return VgScrubBarBufferingTime;\n}());\nexports.VgScrubBarBufferingTime = VgScrubBarBufferingTime;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctc2NydWItYmFyLWJ1ZmZlcmluZy10aW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctc2NydWItYmFyLWJ1ZmZlcmluZy10aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQW1HO0FBQ25HLHdEQUFzRDs7SUF3Q2xELGlDQUFZLEdBQWUsRUFBUyxHQUFVO1FBQVYsUUFBRyxHQUFILEdBQUcsQ0FBTzs2QkFGZCxFQUFFO1FBRzlCLElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQztLQUNqQztJQUVELDBDQUFRLEdBQVI7UUFBQSxpQkFPQztRQU5HLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLGNBQU0sT0FBQSxLQUFJLENBQUMsYUFBYSxFQUFFLEVBQXBCLENBQW9CLENBQUMsQ0FBQyxDQUFDO1NBQzVGO0tBQ0o7SUFFRCwrQ0FBYSxHQUFiO1FBQ0ksSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7S0FDbkQ7SUFFRCwrQ0FBYSxHQUFiO1FBQ0ksSUFBSSxVQUFVLEdBQUcsSUFBSSxDQUFDO1FBRXRCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUNuRSxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLEtBQUssQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDL0IsVUFBVSxHQUFHLElBQUksQ0FBQzthQUNyQjtZQUNELElBQUksQ0FBQyxDQUFDO2dCQUNGLFVBQVUsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEdBQUcsQ0FBQyxHQUFHLEdBQUcsQ0FBQzthQUNoRjtTQUNKO1FBRUQsTUFBTSxDQUFDLFVBQVUsQ0FBQztLQUNyQjtJQUVELDZDQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztLQUNwRDs7Z0JBdkVKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLDZCQUE2QjtvQkFDdkMsYUFBYSxFQUFFLHdCQUFpQixDQUFDLElBQUk7b0JBQ3JDLFFBQVEsRUFBRSxvRUFBZ0U7b0JBQzFFLE1BQU0sRUFBRSxDQUFFLHVvQkF1QlQsQ0FBRTtpQkFDTjs7OztnQkFoQzBCLGlCQUFVO2dCQUM1QixjQUFLOzs7MEJBaUNULFlBQUs7O2tDQWxDVjs7QUFpQ2EsMERBQXVCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBJbnB1dCwgRWxlbWVudFJlZiwgT25Jbml0LCBWaWV3RW5jYXBzdWxhdGlvbiwgT25EZXN0cm95IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICd2Zy1zY3J1Yi1iYXItYnVmZmVyaW5nLXRpbWUnLFxuICAgIGVuY2Fwc3VsYXRpb246IFZpZXdFbmNhcHN1bGF0aW9uLk5vbmUsXG4gICAgdGVtcGxhdGU6IGA8ZGl2IGNsYXNzPVwiYmFja2dyb3VuZFwiIFtzdHlsZS53aWR0aF09XCJnZXRCdWZmZXJUaW1lKClcIj48L2Rpdj5gLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLXNjcnViLWJhci1idWZmZXJpbmctdGltZSB7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgICBoZWlnaHQ6IDVweDtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctc2NydWItYmFyLWJ1ZmZlcmluZy10aW1lIC5iYWNrZ3JvdW5kIHtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LCAyNTUsIDI1NSwgMC4zKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLWNvbnRyb2xzIHZnLXNjcnViLWJhci1idWZmZXJpbmctdGltZSB7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICB0b3A6IGNhbGMoNTAlIC0gM3B4KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLWNvbnRyb2xzIHZnLXNjcnViLWJhci1idWZmZXJpbmctdGltZSAuYmFja2dyb3VuZCB7XG4gICAgICAgICAgICAtd2Via2l0LWJvcmRlci1yYWRpdXM6IDJweDtcbiAgICAgICAgICAgIC1tb3otYm9yZGVyLXJhZGl1czogMnB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMnB4O1xuICAgICAgICB9XG4gICAgYCBdXG59KVxuZXhwb3J0IGNsYXNzIFZnU2NydWJCYXJCdWZmZXJpbmdUaW1lIGltcGxlbWVudHMgT25Jbml0LCBPbkRlc3Ryb3kge1xuICAgIEBJbnB1dCgpIHZnRm9yOiBzdHJpbmc7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgZ2V0QnVmZmVyVGltZSgpIHtcbiAgICAgICAgbGV0IGJ1ZmZlclRpbWUgPSBcIjAlXCI7XG5cbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0ICYmIHRoaXMudGFyZ2V0LmJ1ZmZlciAmJiB0aGlzLnRhcmdldC5idWZmZXJlZC5sZW5ndGgpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhcmdldC50aW1lLnRvdGFsID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnVmZmVyVGltZSA9ICcwJSc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBidWZmZXJUaW1lID0gKCh0aGlzLnRhcmdldC5idWZmZXIuZW5kIC8gdGhpcy50YXJnZXQudGltZS50b3RhbCkgKiAxMDApICsgJyUnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGJ1ZmZlclRpbWU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../../core/services/vg-api\");\nvar VgScrubBarCuePoints = (function () {\n function VgScrubBarCuePoints(ref, API) {\n this.API = API;\n this.onLoadedMetadataCalled = false;\n this.cuePoints = [];\n this.subscriptions = [];\n this.totalCues = 0;\n this.elem = ref.nativeElement;\n }\n VgScrubBarCuePoints.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgScrubBarCuePoints.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n var onTimeUpdate = this.target.subscriptions.loadedMetadata;\n this.subscriptions.push(onTimeUpdate.subscribe(this.onLoadedMetadata.bind(this)));\n if (this.onLoadedMetadataCalled) {\n this.onLoadedMetadata();\n }\n };\n VgScrubBarCuePoints.prototype.onLoadedMetadata = function () {\n if (this.vgCuePoints) {\n // We need to transform the TextTrackCueList to Array or it doesn't work on IE11/Edge.\n // See: https://github.com/videogular/videogular2/issues/369\n this.cuePoints = [];\n for (var i = 0, l = this.vgCuePoints.length; i < l; i++) {\n var end = (this.vgCuePoints[i].endTime >= 0) ? this.vgCuePoints[i].endTime : this.vgCuePoints[i].startTime + 1;\n var cuePointDuration = (end - this.vgCuePoints[i].startTime) * 1000;\n var position = '0';\n var percentWidth = '0';\n if (typeof cuePointDuration === 'number' && this.target.time.total) {\n percentWidth = ((cuePointDuration * 100) / this.target.time.total) + \"%\";\n position = (this.vgCuePoints[i].startTime * 100 / (Math.round(this.target.time.total / 1000))) + \"%\";\n }\n this.vgCuePoints[i].$$style = {\n width: percentWidth,\n left: position\n };\n this.cuePoints.push(this.vgCuePoints[i]);\n }\n }\n };\n VgScrubBarCuePoints.prototype.updateCuePoints = function () {\n if (!this.target) {\n this.onLoadedMetadataCalled = true;\n return;\n }\n this.onLoadedMetadata();\n };\n VgScrubBarCuePoints.prototype.ngOnChanges = function (changes) {\n if (changes['vgCuePoints'].currentValue) {\n this.updateCuePoints();\n }\n };\n VgScrubBarCuePoints.prototype.ngDoCheck = function () {\n if (this.vgCuePoints) {\n var changes = this.totalCues !== this.vgCuePoints.length;\n if (changes) {\n this.totalCues = this.vgCuePoints.length;\n this.updateCuePoints();\n }\n }\n };\n VgScrubBarCuePoints.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgScrubBarCuePoints.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-scrub-bar-cue-points',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"cue-point-container\\\">\\n <span *ngFor=\\\"let cp of cuePoints\\\" [style.width]=\\\"cp.$$style?.width\\\" [style.left]=\\\"cp.$$style?.left\\\"\\n class=\\\"cue-point\\\"></span>\\n </div>\\n \",\n styles: [\"\\n vg-scrub-bar-cue-points {\\n display: flex;\\n width: 100%;\\n height: 5px;\\n pointer-events: none;\\n position: absolute;\\n }\\n\\n vg-scrub-bar-cue-points .cue-point-container .cue-point {\\n position: absolute;\\n height: 5px;\\n background-color: rgba(255, 204, 0, 0.7);\\n }\\n\\n vg-controls vg-scrub-bar-cue-points {\\n position: absolute;\\n top: calc(50% - 3px);\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgScrubBarCuePoints.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgScrubBarCuePoints.propDecorators = {\n \"vgCuePoints\": [{ type: core_1.Input },],\n \"vgFor\": [{ type: core_1.Input },],\n };\n return VgScrubBarCuePoints;\n}());\nexports.VgScrubBarCuePoints = VgScrubBarCuePoints;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctc2NydWItYmFyLWN1ZS1wb2ludHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy1zY3J1Yi1iYXItY3VlLXBvaW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQVN1QjtBQUN2Qix3REFBc0Q7O0lBOENsRCw2QkFBWSxHQUFlLEVBQVMsR0FBVTtRQUFWLFFBQUcsR0FBSCxHQUFHLENBQU87c0NBUFosS0FBSzt5QkFDZixFQUFFOzZCQUVNLEVBQUU7eUJBRXRCLENBQUM7UUFHVCxJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxhQUFhLENBQUM7S0FDakM7SUFFRCxzQ0FBUSxHQUFSO1FBQUEsaUJBT0M7UUFORyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxjQUFNLE9BQUEsS0FBSSxDQUFDLGFBQWEsRUFBRSxFQUFwQixDQUFvQixDQUFDLENBQUMsQ0FBQztTQUM1RjtLQUNKO0lBRUQsMkNBQWEsR0FBYjtRQUNJLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBRWhELElBQUksWUFBWSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsYUFBYSxDQUFDLGNBQWMsQ0FBQztRQUM1RCxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRWxGLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxzQkFBc0IsQ0FBQyxDQUFDLENBQUM7WUFDOUIsSUFBSSxDQUFDLGdCQUFnQixFQUFFLENBQUM7U0FDM0I7S0FDSjtJQUVELDhDQUFnQixHQUFoQjtRQUNJLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDOzs7WUFHbkIsSUFBSSxDQUFDLFNBQVMsR0FBRyxFQUFFLENBQUM7WUFFcEIsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7Z0JBQ3RELElBQUksR0FBRyxHQUFHLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBRSxDQUFDLENBQUUsQ0FBQyxPQUFPLElBQUksQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBRSxDQUFDLENBQUUsQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBRSxDQUFDLENBQUUsQ0FBQyxTQUFTLEdBQUcsQ0FBQyxDQUFDO2dCQUNySCxJQUFJLGdCQUFnQixHQUFHLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUUsQ0FBQyxDQUFFLENBQUMsU0FBUyxDQUFDLEdBQUcsSUFBSSxDQUFDO2dCQUN0RSxJQUFJLFFBQVEsR0FBRyxHQUFHLENBQUM7Z0JBQ25CLElBQUksWUFBWSxHQUFHLEdBQUcsQ0FBQztnQkFFdkIsRUFBRSxDQUFDLENBQUMsT0FBTyxnQkFBZ0IsS0FBSyxRQUFRLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztvQkFDakUsWUFBWSxHQUFHLENBQUMsQ0FBQyxnQkFBZ0IsR0FBRyxHQUFHLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxHQUFHLENBQUM7b0JBQ3pFLFFBQVEsR0FBRyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUUsQ0FBQyxDQUFFLENBQUMsU0FBUyxHQUFHLEdBQUcsR0FBRyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxHQUFHLElBQUksQ0FBQyxDQUFDLENBQUMsR0FBRyxHQUFHLENBQUM7aUJBQzFHO2dCQUVLLElBQUksQ0FBQyxXQUFXLENBQUUsQ0FBQyxDQUFHLENBQUMsT0FBTyxHQUFHO29CQUNuQyxLQUFLLEVBQUUsWUFBWTtvQkFDbkIsSUFBSSxFQUFFLFFBQVE7aUJBQ2pCLENBQUM7Z0JBRUYsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBRSxDQUFDLENBQUUsQ0FBQyxDQUFDO2FBQzlDO1NBQ0o7S0FDSjtJQUVELDZDQUFlLEdBQWY7UUFDSSxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2YsSUFBSSxDQUFDLHNCQUFzQixHQUFHLElBQUksQ0FBQztZQUNuQyxNQUFNLENBQUM7U0FDVjtRQUNELElBQUksQ0FBQyxnQkFBZ0IsRUFBRSxDQUFDO0tBQzNCO0lBRUQseUNBQVcsR0FBWCxVQUFZLE9BQTZDO1FBQ3JELEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBRSxhQUFhLENBQUUsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDO1lBQ3hDLElBQUksQ0FBQyxlQUFlLEVBQUUsQ0FBQztTQUMxQjtLQUNKO0lBRUQsdUNBQVMsR0FBVDtRQUNJLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDO1lBQ25CLElBQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxTQUFTLEtBQUssSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUM7WUFFM0QsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztnQkFDVixJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDO2dCQUN6QyxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUM7YUFDMUI7U0FDSjtLQUNKO0lBRUQseUNBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkF6SEosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUseUJBQXlCO29CQUNuQyxhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLDRPQUtUO29CQUNELE1BQU0sRUFBRSxDQUFFLDRnQkFtQlQsQ0FBRTtpQkFDTjs7OztnQkF4Q0csaUJBQVU7Z0JBUUwsY0FBSzs7O2dDQWtDVCxZQUFLOzBCQUNMLFlBQUs7OzhCQTdDVjs7QUEyQ2Esa0RBQW1CIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgICBDb21wb25lbnQsXG4gICAgRWxlbWVudFJlZixcbiAgICBJbnB1dCxcbiAgICBPbkNoYW5nZXMsXG4gICAgT25EZXN0cm95LFxuICAgIE9uSW5pdCxcbiAgICBTaW1wbGVDaGFuZ2UsXG4gICAgVmlld0VuY2Fwc3VsYXRpb25cbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICd2Zy1zY3J1Yi1iYXItY3VlLXBvaW50cycsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYFxuICAgICAgICA8ZGl2IGNsYXNzPVwiY3VlLXBvaW50LWNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPHNwYW4gKm5nRm9yPVwibGV0IGNwIG9mIGN1ZVBvaW50c1wiIFtzdHlsZS53aWR0aF09XCJjcC4kJHN0eWxlPy53aWR0aFwiIFtzdHlsZS5sZWZ0XT1cImNwLiQkc3R5bGU/LmxlZnRcIlxuICAgICAgICAgICAgICAgICAgY2xhc3M9XCJjdWUtcG9pbnRcIj48L3NwYW4+XG4gICAgICAgIDwvZGl2PlxuICAgIGAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctc2NydWItYmFyLWN1ZS1wb2ludHMge1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgaGVpZ2h0OiA1cHg7XG4gICAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLXNjcnViLWJhci1jdWUtcG9pbnRzIC5jdWUtcG9pbnQtY29udGFpbmVyIC5jdWUtcG9pbnQge1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgaGVpZ2h0OiA1cHg7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDI1NSwgMjA0LCAwLCAwLjcpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctY29udHJvbHMgdmctc2NydWItYmFyLWN1ZS1wb2ludHMge1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgdG9wOiBjYWxjKDUwJSAtIDNweCk7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdTY3J1YkJhckN1ZVBvaW50cyBpbXBsZW1lbnRzIE9uSW5pdCwgT25DaGFuZ2VzLCBPbkRlc3Ryb3kge1xuICAgIEBJbnB1dCgpIHZnQ3VlUG9pbnRzOiBUZXh0VHJhY2tDdWVMaXN0O1xuICAgIEBJbnB1dCgpIHZnRm9yOiBzdHJpbmc7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcbiAgICBvbkxvYWRlZE1ldGFkYXRhQ2FsbGVkOiBib29sZWFuID0gZmFsc2U7XG4gICAgY3VlUG9pbnRzOiBBcnJheTxhbnk+ID0gW107XG5cbiAgICBzdWJzY3JpcHRpb25zOiBTdWJzY3JpcHRpb25bXSA9IFtdO1xuXG4gICAgdG90YWxDdWVzID0gMDtcblxuICAgIGNvbnN0cnVjdG9yKHJlZjogRWxlbWVudFJlZiwgcHVibGljIEFQSTogVmdBUEkpIHtcbiAgICAgICAgdGhpcy5lbGVtID0gcmVmLm5hdGl2ZUVsZW1lbnQ7XG4gICAgfVxuXG4gICAgbmdPbkluaXQoKSB7XG4gICAgICAgIGlmICh0aGlzLkFQSS5pc1BsYXllclJlYWR5KSB7XG4gICAgICAgICAgICB0aGlzLm9uUGxheWVyUmVhZHkoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKHRoaXMuQVBJLnBsYXllclJlYWR5RXZlbnQuc3Vic2NyaWJlKCgpID0+IHRoaXMub25QbGF5ZXJSZWFkeSgpKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvblBsYXllclJlYWR5KCkge1xuICAgICAgICB0aGlzLnRhcmdldCA9IHRoaXMuQVBJLmdldE1lZGlhQnlJZCh0aGlzLnZnRm9yKTtcblxuICAgICAgICBsZXQgb25UaW1lVXBkYXRlID0gdGhpcy50YXJnZXQuc3Vic2NyaXB0aW9ucy5sb2FkZWRNZXRhZGF0YTtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2gob25UaW1lVXBkYXRlLnN1YnNjcmliZSh0aGlzLm9uTG9hZGVkTWV0YWRhdGEuYmluZCh0aGlzKSkpO1xuXG4gICAgICAgIGlmICh0aGlzLm9uTG9hZGVkTWV0YWRhdGFDYWxsZWQpIHtcbiAgICAgICAgICAgIHRoaXMub25Mb2FkZWRNZXRhZGF0YSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25Mb2FkZWRNZXRhZGF0YSgpIHtcbiAgICAgICAgaWYgKHRoaXMudmdDdWVQb2ludHMpIHtcbiAgICAgICAgICAgIC8vIFdlIG5lZWQgdG8gdHJhbnNmb3JtIHRoZSBUZXh0VHJhY2tDdWVMaXN0IHRvIEFycmF5IG9yIGl0IGRvZXNuJ3Qgd29yayBvbiBJRTExL0VkZ2UuXG4gICAgICAgICAgICAvLyBTZWU6IGh0dHBzOi8vZ2l0aHViLmNvbS92aWRlb2d1bGFyL3ZpZGVvZ3VsYXIyL2lzc3Vlcy8zNjlcbiAgICAgICAgICAgIHRoaXMuY3VlUG9pbnRzID0gW107XG5cbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gdGhpcy52Z0N1ZVBvaW50cy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICBsZXQgZW5kID0gKHRoaXMudmdDdWVQb2ludHNbIGkgXS5lbmRUaW1lID49IDApID8gdGhpcy52Z0N1ZVBvaW50c1sgaSBdLmVuZFRpbWUgOiB0aGlzLnZnQ3VlUG9pbnRzWyBpIF0uc3RhcnRUaW1lICsgMTtcbiAgICAgICAgICAgICAgICBsZXQgY3VlUG9pbnREdXJhdGlvbiA9IChlbmQgLSB0aGlzLnZnQ3VlUG9pbnRzWyBpIF0uc3RhcnRUaW1lKSAqIDEwMDA7XG4gICAgICAgICAgICAgICAgbGV0IHBvc2l0aW9uID0gJzAnO1xuICAgICAgICAgICAgICAgIGxldCBwZXJjZW50V2lkdGggPSAnMCc7XG5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGN1ZVBvaW50RHVyYXRpb24gPT09ICdudW1iZXInICYmIHRoaXMudGFyZ2V0LnRpbWUudG90YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcGVyY2VudFdpZHRoID0gKChjdWVQb2ludER1cmF0aW9uICogMTAwKSAvIHRoaXMudGFyZ2V0LnRpbWUudG90YWwpICsgXCIlXCI7XG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gKHRoaXMudmdDdWVQb2ludHNbIGkgXS5zdGFydFRpbWUgKiAxMDAgLyAoTWF0aC5yb3VuZCh0aGlzLnRhcmdldC50aW1lLnRvdGFsIC8gMTAwMCkpKSArIFwiJVwiO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICg8YW55PnRoaXMudmdDdWVQb2ludHNbIGkgXSkuJCRzdHlsZSA9IHtcbiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IHBlcmNlbnRXaWR0aCxcbiAgICAgICAgICAgICAgICAgICAgbGVmdDogcG9zaXRpb25cbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgdGhpcy5jdWVQb2ludHMucHVzaCh0aGlzLnZnQ3VlUG9pbnRzWyBpIF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgdXBkYXRlQ3VlUG9pbnRzKCkge1xuICAgICAgICBpZiAoIXRoaXMudGFyZ2V0KSB7XG4gICAgICAgICAgICB0aGlzLm9uTG9hZGVkTWV0YWRhdGFDYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMub25Mb2FkZWRNZXRhZGF0YSgpO1xuICAgIH1cblxuICAgIG5nT25DaGFuZ2VzKGNoYW5nZXM6IHsgW3Byb3BOYW1lOiBzdHJpbmddOiBTaW1wbGVDaGFuZ2UgfSkge1xuICAgICAgICBpZiAoY2hhbmdlc1sgJ3ZnQ3VlUG9pbnRzJyBdLmN1cnJlbnRWYWx1ZSkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVDdWVQb2ludHMoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5nRG9DaGVjaygpIHtcbiAgICAgICAgaWYgKHRoaXMudmdDdWVQb2ludHMpIHtcbiAgICAgICAgICAgIGNvbnN0IGNoYW5nZXMgPSB0aGlzLnRvdGFsQ3VlcyAhPT0gdGhpcy52Z0N1ZVBvaW50cy5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChjaGFuZ2VzKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50b3RhbEN1ZXMgPSB0aGlzLnZnQ3VlUG9pbnRzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZUN1ZVBvaW50cygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../../core/services/vg-api\");\nvar VgScrubBarCurrentTime = (function () {\n function VgScrubBarCurrentTime(ref, API) {\n this.API = API;\n this.vgSlider = false;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgScrubBarCurrentTime.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgScrubBarCurrentTime.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgScrubBarCurrentTime.prototype.getPercentage = function () {\n return this.target ? ((this.target.time.current * 100) / this.target.time.total) + '%' : '0%';\n };\n VgScrubBarCurrentTime.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgScrubBarCurrentTime.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-scrub-bar-current-time',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<div class=\\\"background\\\" [style.width]=\\\"getPercentage()\\\"></div><span class=\\\"slider\\\" *ngIf=\\\"vgSlider\\\"></span>\",\n styles: [\"\\n vg-scrub-bar-current-time {\\n display: flex;\\n width: 100%;\\n height: 5px;\\n pointer-events: none;\\n position: absolute;\\n }\\n\\n vg-scrub-bar-current-time .background {\\n background-color: white;\\n }\\n\\n vg-controls vg-scrub-bar-current-time {\\n position: absolute;\\n top: calc(50% - 3px);\\n -webkit-border-radius: 2px;\\n -moz-border-radius: 2px;\\n border-radius: 2px;\\n }\\n\\n vg-controls vg-scrub-bar-current-time .background {\\n border: 1px solid white;\\n -webkit-border-radius: 2px;\\n -moz-border-radius: 2px;\\n border-radius: 2px;\\n }\\n \\n vg-scrub-bar-current-time .slider{\\n background: white;\\n height: 15px;\\n width: 15px;\\n border-radius: 50%;\\n box-shadow: 0px 0px 10px black;\\n margin-top: -5px;\\n margin-left: -10px;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgScrubBarCurrentTime.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgScrubBarCurrentTime.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"vgSlider\": [{ type: core_1.Input },],\n };\n return VgScrubBarCurrentTime;\n}());\nexports.VgScrubBarCurrentTime = VgScrubBarCurrentTime;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctc2NydWItYmFyLWN1cnJlbnQtdGltZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLXNjcnViLWJhci1jdXJyZW50LXRpbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBbUc7QUFDbkcsd0RBQXNEOztJQXVEbEQsK0JBQVksR0FBZSxFQUFTLEdBQVU7UUFBVixRQUFHLEdBQUgsR0FBRyxDQUFPO3dCQVBqQixLQUFLOzZCQUtGLEVBQUU7UUFHOUIsSUFBSSxDQUFDLElBQUksR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFDO0tBQ2pDO0lBRUQsd0NBQVEsR0FBUjtRQUFBLGlCQU9DO1FBTkcsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLElBQUksQ0FBQyxhQUFhLEVBQUUsQ0FBQztTQUN4QjtRQUNELElBQUksQ0FBQyxDQUFDO1lBQ0YsSUFBSSxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxhQUFhLEVBQUUsRUFBcEIsQ0FBb0IsQ0FBQyxDQUFDLENBQUM7U0FDNUY7S0FDSjtJQUVELDZDQUFhLEdBQWI7UUFDSSxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztLQUNuRDtJQUVELDZDQUFhLEdBQWI7UUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLEdBQUcsQ0FBQyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEdBQUcsR0FBRyxJQUFJLENBQUM7S0FDakc7SUFFRCwyQ0FBVyxHQUFYO1FBQ0ksSUFBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQWYsQ0FBZSxDQUFDLENBQUM7S0FDcEQ7O2dCQTNFSixnQkFBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSwyQkFBMkI7b0JBQ3JDLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUscUhBQTZHO29CQUN2SCxNQUFNLEVBQUUsQ0FBRSxzaUNBcUNULENBQUU7aUJBQ047Ozs7Z0JBOUMwQixpQkFBVTtnQkFDNUIsY0FBSzs7OzBCQStDVCxZQUFLOzZCQUNMLFlBQUs7O2dDQWpEVjs7QUErQ2Esc0RBQXFCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBJbnB1dCwgRWxlbWVudFJlZiwgT25Jbml0LCBWaWV3RW5jYXBzdWxhdGlvbiwgT25EZXN0cm95IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuQENvbXBvbmVudCh7XG4gICAgc2VsZWN0b3I6ICd2Zy1zY3J1Yi1iYXItY3VycmVudC10aW1lJyxcbiAgICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgIHRlbXBsYXRlOiBgPGRpdiBjbGFzcz1cImJhY2tncm91bmRcIiBbc3R5bGUud2lkdGhdPVwiZ2V0UGVyY2VudGFnZSgpXCI+PC9kaXY+PHNwYW4gY2xhc3M9XCJzbGlkZXJcIiAqbmdJZj1cInZnU2xpZGVyXCI+PC9zcGFuPmAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctc2NydWItYmFyLWN1cnJlbnQtdGltZSB7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgICBoZWlnaHQ6IDVweDtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctc2NydWItYmFyLWN1cnJlbnQtdGltZSAuYmFja2dyb3VuZCB7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLWNvbnRyb2xzIHZnLXNjcnViLWJhci1jdXJyZW50LXRpbWUge1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgdG9wOiBjYWxjKDUwJSAtIDNweCk7XG4gICAgICAgICAgICAtd2Via2l0LWJvcmRlci1yYWRpdXM6IDJweDtcbiAgICAgICAgICAgIC1tb3otYm9yZGVyLXJhZGl1czogMnB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMnB4O1xuICAgICAgICB9XG5cbiAgICAgICAgdmctY29udHJvbHMgdmctc2NydWItYmFyLWN1cnJlbnQtdGltZSAuYmFja2dyb3VuZCB7XG4gICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB3aGl0ZTtcbiAgICAgICAgICAgIC13ZWJraXQtYm9yZGVyLXJhZGl1czogMnB4O1xuICAgICAgICAgICAgLW1vei1ib3JkZXItcmFkaXVzOiAycHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiAycHg7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZnLXNjcnViLWJhci1jdXJyZW50LXRpbWUgLnNsaWRlcntcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHdoaXRlO1xuICAgICAgICAgICAgaGVpZ2h0OiAxNXB4O1xuICAgICAgICAgICAgd2lkdGg6IDE1cHg7XG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XG4gICAgICAgICAgICBib3gtc2hhZG93OiAwcHggMHB4IDEwcHggYmxhY2s7XG4gICAgICAgICAgICBtYXJnaW4tdG9wOiAtNXB4O1xuICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0xMHB4O1xuICAgICAgICB9XG4gICAgYCBdXG59KVxuZXhwb3J0IGNsYXNzIFZnU2NydWJCYXJDdXJyZW50VGltZSBpbXBsZW1lbnRzIE9uSW5pdCwgT25EZXN0cm95IHtcbiAgICBASW5wdXQoKSB2Z0Zvcjogc3RyaW5nO1xuICAgIEBJbnB1dCgpIHZnU2xpZGVyOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgZ2V0UGVyY2VudGFnZSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudGFyZ2V0ID8gKCh0aGlzLnRhcmdldC50aW1lLmN1cnJlbnQgKiAxMDApIC8gdGhpcy50YXJnZXQudGltZS50b3RhbCkgKyAnJScgOiAnMCUnO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar vg_controls_hidden_1 = require(\"./../../core/services/vg-controls-hidden\");\nvar vg_states_1 = require(\"../../core/states/vg-states\");\nvar VgScrubBar = (function () {\n function VgScrubBar(ref, API, vgControlsHiddenState) {\n var _this = this;\n this.API = API;\n this.hideScrubBar = false;\n this.vgSlider = true;\n this.isSeeking = false;\n this.wasPlaying = false;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.subscriptions.push(vgControlsHiddenState.isHidden.subscribe(function (hide) { return _this.onHideScrubBar(hide); }));\n }\n VgScrubBar.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgScrubBar.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgScrubBar.prototype.seekStart = function () {\n if (this.target.canPlay) {\n this.isSeeking = true;\n if (this.target.state === vg_states_1.VgStates.VG_PLAYING) {\n this.wasPlaying = true;\n }\n this.target.pause();\n }\n };\n VgScrubBar.prototype.seekMove = function (offset) {\n if (this.isSeeking) {\n var percentage = Math.max(Math.min(offset * 100 / this.elem.scrollWidth, 99.9), 0);\n this.target.time.current = percentage * this.target.time.total / 100;\n this.target.seekTime(percentage, true);\n }\n };\n VgScrubBar.prototype.seekEnd = function (offset) {\n this.isSeeking = false;\n if (this.target.canPlay) {\n var percentage = Math.max(Math.min(offset * 100 / this.elem.scrollWidth, 99.9), 0);\n this.target.seekTime(percentage, true);\n if (this.wasPlaying) {\n this.wasPlaying = false;\n this.target.play();\n }\n }\n };\n VgScrubBar.prototype.touchEnd = function () {\n this.isSeeking = false;\n if (this.wasPlaying) {\n this.wasPlaying = false;\n this.target.play();\n }\n };\n VgScrubBar.prototype.getTouchOffset = function (event) {\n var offsetLeft = 0;\n var element = event.target;\n while (element) {\n offsetLeft += element.offsetLeft;\n element = element.offsetParent;\n }\n return event.touches[0].pageX - offsetLeft;\n };\n VgScrubBar.prototype.onMouseDownScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive) {\n if (!this.vgSlider) {\n this.seekEnd($event.offsetX);\n }\n else {\n this.seekStart();\n }\n }\n }\n };\n VgScrubBar.prototype.onMouseMoveScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekMove($event.offsetX);\n }\n }\n };\n VgScrubBar.prototype.onMouseUpScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekEnd($event.offsetX);\n }\n }\n };\n VgScrubBar.prototype.onTouchStartScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive) {\n if (!this.vgSlider) {\n this.seekEnd(this.getTouchOffset($event));\n }\n else {\n this.seekStart();\n }\n }\n }\n };\n VgScrubBar.prototype.onTouchMoveScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.seekMove(this.getTouchOffset($event));\n }\n }\n };\n VgScrubBar.prototype.onTouchCancelScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.touchEnd();\n }\n }\n };\n VgScrubBar.prototype.onTouchEndScrubBar = function ($event) {\n if (this.target) {\n if (!this.target.isLive && this.vgSlider && this.isSeeking) {\n this.touchEnd();\n }\n }\n };\n VgScrubBar.prototype.arrowAdjustVolume = function (event) {\n if (this.target) {\n if (event.keyCode === 38 || event.keyCode === 39) {\n event.preventDefault();\n this.target.seekTime((this.target.time.current + 5000) / 1000, false);\n }\n else if (event.keyCode === 37 || event.keyCode === 40) {\n event.preventDefault();\n this.target.seekTime((this.target.time.current - 5000) / 1000, false);\n }\n }\n };\n VgScrubBar.prototype.getPercentage = function () {\n return this.target ? ((this.target.time.current * 100) / this.target.time.total) + '%' : '0%';\n };\n VgScrubBar.prototype.onHideScrubBar = function (hide) {\n this.hideScrubBar = hide;\n };\n VgScrubBar.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgScrubBar.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-scrub-bar',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"scrubBar\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"slider\\\"\\n aria-label=\\\"scrub bar\\\"\\n aria-level=\\\"polite\\\"\\n [attr.aria-valuenow]=\\\"getPercentage()\\\"\\n aria-valuemin=\\\"0\\\"\\n aria-valuemax=\\\"100\\\"\\n [attr.aria-valuetext]=\\\"getPercentage() + '%'\\\">\\n <ng-content></ng-content>\\n </div>\\n \\n \",\n styles: [\"\\n vg-scrub-bar {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n position: absolute;\\n width: 100%;\\n height: 5px;\\n bottom: 50px;\\n margin: 0;\\n cursor: pointer;\\n align-items: center;\\n background: rgba(0, 0, 0, 0.75);\\n z-index: 250;\\n -webkit-transition: bottom 1s, opacity 0.5s;\\n -khtml-transition: bottom 1s, opacity 0.5s;\\n -moz-transition: bottom 1s, opacity 0.5s;\\n -ms-transition: bottom 1s, opacity 0.5s;\\n transition: bottom 1s, opacity 0.5s;\\n }\\n \\n vg-scrub-bar .scrubBar {\\n position: relative;\\n display: flex;\\n flex-grow: 1;\\n align-items: center;\\n height: 100%;\\n }\\n\\n vg-controls vg-scrub-bar {\\n position: relative;\\n bottom: 0;\\n background: transparent;\\n height: 50px;\\n flex-grow: 1;\\n flex-basis: 0;\\n margin: 0 10px;\\n -webkit-transition: initial;\\n -khtml-transition: initial;\\n -moz-transition: initial;\\n -ms-transition: initial;\\n transition: initial;\\n }\\n\\n vg-scrub-bar.hide {\\n bottom: 0;\\n opacity: 0;\\n }\\n\\n vg-controls vg-scrub-bar.hide {\\n bottom: initial;\\n opacity: initial;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgScrubBar.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n { type: vg_controls_hidden_1.VgControlsHidden, },\n ]; };\n VgScrubBar.propDecorators = {\n \"hideScrubBar\": [{ type: core_1.HostBinding, args: ['class.hide',] },],\n \"vgFor\": [{ type: core_1.Input },],\n \"vgSlider\": [{ type: core_1.Input },],\n \"onMouseDownScrubBar\": [{ type: core_1.HostListener, args: ['mousedown', ['$event'],] },],\n \"onMouseMoveScrubBar\": [{ type: core_1.HostListener, args: ['document:mousemove', ['$event'],] },],\n \"onMouseUpScrubBar\": [{ type: core_1.HostListener, args: ['document:mouseup', ['$event'],] },],\n \"onTouchStartScrubBar\": [{ type: core_1.HostListener, args: ['touchstart', ['$event'],] },],\n \"onTouchMoveScrubBar\": [{ type: core_1.HostListener, args: ['document:touchmove', ['$event'],] },],\n \"onTouchCancelScrubBar\": [{ type: core_1.HostListener, args: ['document:touchcancel', ['$event'],] },],\n \"onTouchEndScrubBar\": [{ type: core_1.HostListener, args: ['document:touchend', ['$event'],] },],\n \"arrowAdjustVolume\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgScrubBar;\n}());\nexports.VgScrubBar = VgScrubBar;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctc2NydWItYmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctc2NydWItYmFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBR3VCO0FBQ3ZCLHFEQUFtRDtBQUNuRCwrRUFBNEU7QUFDNUUseURBQXVEOztJQTBGbkQsb0JBQVksR0FBZSxFQUFTLEdBQVUsRUFBRSxxQkFBdUM7UUFBdkYsaUJBR0M7UUFIbUMsUUFBRyxHQUFILEdBQUcsQ0FBTzs0QkFaSyxLQUFLO3dCQUczQixJQUFJO3lCQUlaLEtBQUs7MEJBQ0osS0FBSzs2QkFFSyxFQUFFO1FBRzlCLElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQztRQUM5QixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxxQkFBcUIsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLFVBQUEsSUFBSSxJQUFJLE9BQUEsS0FBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsRUFBekIsQ0FBeUIsQ0FBQyxDQUFDLENBQUM7S0FDeEc7SUFFRCw2QkFBUSxHQUFSO1FBQUEsaUJBT0M7UUFORyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxjQUFNLE9BQUEsS0FBSSxDQUFDLGFBQWEsRUFBRSxFQUFwQixDQUFvQixDQUFDLENBQUMsQ0FBQztTQUM1RjtLQUNKO0lBRUQsa0NBQWEsR0FBYjtRQUNJLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQ25EO0lBRVMsOEJBQVMsR0FBbkI7UUFDSSxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFDdEIsSUFBSSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUM7WUFDdEIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEtBQUssb0JBQVEsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUM1QyxJQUFJLENBQUMsVUFBVSxHQUFHLElBQUksQ0FBQzthQUMxQjtZQUNELElBQUksQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLENBQUM7U0FDdkI7S0FDSjtJQUVTLDZCQUFRLEdBQWxCLFVBQW1CLE1BQWM7UUFDN0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7WUFDakIsSUFBSSxVQUFVLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sR0FBRyxHQUFHLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDbkYsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLFVBQVUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxLQUFLLEdBQUcsR0FBRyxDQUFDO1lBQ3JFLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQztTQUMxQztLQUNKO0lBRVMsNEJBQU8sR0FBakIsVUFBa0IsTUFBYztRQUM1QixJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQztRQUN2QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7WUFDdEIsSUFBSSxVQUFVLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sR0FBRyxHQUFHLEdBQUcsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDbkYsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsVUFBVSxFQUFFLElBQUksQ0FBQyxDQUFDO1lBQ3ZDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO2dCQUNsQixJQUFJLENBQUMsVUFBVSxHQUFHLEtBQUssQ0FBQztnQkFDeEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsQ0FBQzthQUN0QjtTQUNKO0tBQ0o7SUFFUyw2QkFBUSxHQUFsQjtRQUNJLElBQUksQ0FBQyxTQUFTLEdBQUcsS0FBSyxDQUFDO1FBQ3ZCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO1lBQ2xCLElBQUksQ0FBQyxVQUFVLEdBQUcsS0FBSyxDQUFDO1lBQ3hCLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7U0FDdEI7S0FDSjtJQUVTLG1DQUFjLEdBQXhCLFVBQXlCLEtBQVU7UUFDL0IsSUFBSSxVQUFVLEdBQVcsQ0FBQyxDQUFDO1FBQzNCLElBQUksT0FBTyxHQUFRLEtBQUssQ0FBQyxNQUFNLENBQUM7UUFDaEMsT0FBTyxPQUFPLEVBQUUsQ0FBQztZQUNiLFVBQVUsSUFBSSxPQUFPLENBQUMsVUFBVSxDQUFDO1lBQ2pDLE9BQU8sR0FBRyxPQUFPLENBQUMsWUFBWSxDQUFDO1NBQ2xDO1FBQ0QsTUFBTSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUUsQ0FBQyxDQUFFLENBQUMsS0FBSyxHQUFHLFVBQVUsQ0FBQztLQUNoRDtJQUdELHdDQUFtQixhQUFDLE1BQVc7UUFDM0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZCxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztnQkFDdEIsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztvQkFDakIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7aUJBQ2hDO2dCQUNELElBQUksQ0FBQyxDQUFDO29CQUNGLElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztpQkFDcEI7YUFDSjtTQUNKOztJQUlMLHdDQUFtQixhQUFDLE1BQVc7UUFDM0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZCxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyxRQUFRLElBQUksSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3pELElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO2FBQ2pDO1NBQ0o7O0lBSUwsc0NBQWlCLGFBQUMsTUFBVztRQUN6QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUNkLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLElBQUksSUFBSSxDQUFDLFFBQVEsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztnQkFDekQsSUFBSSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7YUFDaEM7U0FDSjs7SUFJTCx5Q0FBb0IsYUFBQyxNQUFXO1FBQzVCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2QsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ3RCLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7b0JBQ2pCLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO2lCQUM3QztnQkFDRCxJQUFJLENBQUMsQ0FBQztvQkFDRixJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7aUJBQ3BCO2FBQ0o7U0FDSjs7SUFJTCx3Q0FBbUIsYUFBQyxNQUFXO1FBQzNCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2QsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sSUFBSSxJQUFJLENBQUMsUUFBUSxJQUFJLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO2dCQUN6RCxJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQzthQUM5QztTQUNKOztJQUlMLDBDQUFxQixhQUFDLE1BQVc7UUFDN0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZCxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyxRQUFRLElBQUksSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3pELElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQzthQUNuQjtTQUNKOztJQUlMLHVDQUFrQixhQUFDLE1BQVc7UUFDMUIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDZCxFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxJQUFJLElBQUksQ0FBQyxRQUFRLElBQUksSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7Z0JBQ3pELElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQzthQUNuQjtTQUNKOztJQUlMLHNDQUFpQixhQUFDLEtBQW9CO1FBQ2xDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2QsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sS0FBSyxFQUFFLElBQUksS0FBSyxDQUFDLE9BQU8sS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDO2dCQUMvQyxLQUFLLENBQUMsY0FBYyxFQUFFLENBQUM7Z0JBQ3ZCLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUksRUFBRSxLQUFLLENBQUMsQ0FBQzthQUN6RTtZQUNELElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsSUFBSSxLQUFLLENBQUMsT0FBTyxLQUFLLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQ3BELEtBQUssQ0FBQyxjQUFjLEVBQUUsQ0FBQztnQkFDdkIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxFQUFFLEtBQUssQ0FBQyxDQUFDO2FBQ3pFO1NBQ0o7O0lBR0wsa0NBQWEsR0FBYjtRQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLEdBQUcsR0FBRyxDQUFDLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsR0FBRyxHQUFHLElBQUksQ0FBQztLQUNqRztJQUVELG1DQUFjLEdBQWQsVUFBZSxJQUFhO1FBQ3hCLElBQUksQ0FBQyxZQUFZLEdBQUcsSUFBSSxDQUFDO0tBQzVCO0lBRUQsZ0NBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkExUEosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsY0FBYztvQkFDeEIsYUFBYSxFQUFFLHdCQUFpQixDQUFDLElBQUk7b0JBQ3JDLFFBQVEsRUFBRSw0YUFhVDtvQkFDRCxNQUFNLEVBQUUsQ0FBRSxvbURBdURULENBQUU7aUJBQ047Ozs7Z0JBakZjLGlCQUFVO2dCQUdoQixjQUFLO2dCQUNMLHFDQUFnQjs7O2lDQStFcEIsa0JBQVcsU0FBQyxZQUFZOzBCQUV4QixZQUFLOzZCQUNMLFlBQUs7d0NBMkVMLG1CQUFZLFNBQUMsV0FBVyxFQUFFLENBQUUsUUFBUSxDQUFFO3dDQWN0QyxtQkFBWSxTQUFDLG9CQUFvQixFQUFFLENBQUUsUUFBUSxDQUFFO3NDQVMvQyxtQkFBWSxTQUFDLGtCQUFrQixFQUFFLENBQUUsUUFBUSxDQUFFO3lDQVM3QyxtQkFBWSxTQUFDLFlBQVksRUFBRSxDQUFFLFFBQVEsQ0FBRTt3Q0FjdkMsbUJBQVksU0FBQyxvQkFBb0IsRUFBRSxDQUFFLFFBQVEsQ0FBRTswQ0FTL0MsbUJBQVksU0FBQyxzQkFBc0IsRUFBRSxDQUFFLFFBQVEsQ0FBRTt1Q0FTakQsbUJBQVksU0FBQyxtQkFBbUIsRUFBRSxDQUFFLFFBQVEsQ0FBRTtzQ0FTOUMsbUJBQVksU0FBQyxTQUFTLEVBQUUsQ0FBQyxRQUFRLENBQUM7O3FCQTNPdkM7O0FBbUZhLGdDQUFVIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgICBDb21wb25lbnQsIEVsZW1lbnRSZWYsIElucHV0LCBIb3N0TGlzdGVuZXIsIE9uSW5pdCwgVmlld0VuY2Fwc3VsYXRpb24sIEhvc3RCaW5kaW5nLFxuICAgIE9uRGVzdHJveVxufSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFZnQVBJIH0gZnJvbSAnLi4vLi4vY29yZS9zZXJ2aWNlcy92Zy1hcGknO1xuaW1wb3J0IHsgVmdDb250cm9sc0hpZGRlbiB9IGZyb20gJy4vLi4vLi4vY29yZS9zZXJ2aWNlcy92Zy1jb250cm9scy1oaWRkZW4nO1xuaW1wb3J0IHsgVmdTdGF0ZXMgfSBmcm9tICcuLi8uLi9jb3JlL3N0YXRlcy92Zy1zdGF0ZXMnO1xuaW1wb3J0IHsgU3Vic2NyaXB0aW9uIH0gZnJvbSAncnhqcy9TdWJzY3JpcHRpb24nO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXNjcnViLWJhcicsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYFxuICAgICAgICA8ZGl2IGNsYXNzPVwic2NydWJCYXJcIlxuICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgcm9sZT1cInNsaWRlclwiXG4gICAgICAgICAgICAgYXJpYS1sYWJlbD1cInNjcnViIGJhclwiXG4gICAgICAgICAgICAgYXJpYS1sZXZlbD1cInBvbGl0ZVwiXG4gICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW5vd109XCJnZXRQZXJjZW50YWdlKClcIlxuICAgICAgICAgICAgIGFyaWEtdmFsdWVtaW49XCIwXCJcbiAgICAgICAgICAgICBhcmlhLXZhbHVlbWF4PVwiMTAwXCJcbiAgICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVldGV4dF09XCJnZXRQZXJjZW50YWdlKCkgKyAnJSdcIj5cbiAgICAgICAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIFxuICAgIGAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctc2NydWItYmFyIHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogNXB4O1xuICAgICAgICAgICAgYm90dG9tOiA1MHB4O1xuICAgICAgICAgICAgbWFyZ2luOiAwO1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHJnYmEoMCwgMCwgMCwgMC43NSk7XG4gICAgICAgICAgICB6LWluZGV4OiAyNTA7XG4gICAgICAgICAgICAtd2Via2l0LXRyYW5zaXRpb246IGJvdHRvbSAxcywgb3BhY2l0eSAwLjVzO1xuICAgICAgICAgICAgLWtodG1sLXRyYW5zaXRpb246IGJvdHRvbSAxcywgb3BhY2l0eSAwLjVzO1xuICAgICAgICAgICAgLW1vei10cmFuc2l0aW9uOiBib3R0b20gMXMsIG9wYWNpdHkgMC41cztcbiAgICAgICAgICAgIC1tcy10cmFuc2l0aW9uOiBib3R0b20gMXMsIG9wYWNpdHkgMC41cztcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGJvdHRvbSAxcywgb3BhY2l0eSAwLjVzO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2Zy1zY3J1Yi1iYXIgLnNjcnViQmFyIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICBmbGV4LWdyb3c6IDE7XG4gICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgICAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctY29udHJvbHMgdmctc2NydWItYmFyIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICAgICAgICAgIGJvdHRvbTogMDtcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xuICAgICAgICAgICAgaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgZmxleC1ncm93OiAxO1xuICAgICAgICAgICAgZmxleC1iYXNpczogMDtcbiAgICAgICAgICAgIG1hcmdpbjogMCAxMHB4O1xuICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uOiBpbml0aWFsO1xuICAgICAgICAgICAgLWtodG1sLXRyYW5zaXRpb246IGluaXRpYWw7XG4gICAgICAgICAgICAtbW96LXRyYW5zaXRpb246IGluaXRpYWw7XG4gICAgICAgICAgICAtbXMtdHJhbnNpdGlvbjogaW5pdGlhbDtcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGluaXRpYWw7XG4gICAgICAgIH1cblxuICAgICAgICB2Zy1zY3J1Yi1iYXIuaGlkZSB7XG4gICAgICAgICAgICBib3R0b206IDA7XG4gICAgICAgICAgICBvcGFjaXR5OiAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctY29udHJvbHMgdmctc2NydWItYmFyLmhpZGUge1xuICAgICAgICAgICAgYm90dG9tOiBpbml0aWFsO1xuICAgICAgICAgICAgb3BhY2l0eTogaW5pdGlhbDtcbiAgICAgICAgfVxuICAgIGAgXVxufSlcbmV4cG9ydCBjbGFzcyBWZ1NjcnViQmFyIGltcGxlbWVudHMgT25Jbml0LCBPbkRlc3Ryb3kge1xuICAgIEBIb3N0QmluZGluZygnY2xhc3MuaGlkZScpIGhpZGVTY3J1YkJhcjogYm9vbGVhbiA9IGZhbHNlO1xuXG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcbiAgICBASW5wdXQoKSB2Z1NsaWRlcjogYm9vbGVhbiA9IHRydWU7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcbiAgICBpc1NlZWtpbmc6IGJvb2xlYW4gPSBmYWxzZTtcbiAgICB3YXNQbGF5aW5nOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBzdWJzY3JpcHRpb25zOiBTdWJzY3JpcHRpb25bXSA9IFtdO1xuXG4gICAgY29uc3RydWN0b3IocmVmOiBFbGVtZW50UmVmLCBwdWJsaWMgQVBJOiBWZ0FQSSwgdmdDb250cm9sc0hpZGRlblN0YXRlOiBWZ0NvbnRyb2xzSGlkZGVuKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh2Z0NvbnRyb2xzSGlkZGVuU3RhdGUuaXNIaWRkZW4uc3Vic2NyaWJlKGhpZGUgPT4gdGhpcy5vbkhpZGVTY3J1YkJhcihoaWRlKSkpO1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIHNlZWtTdGFydCgpIHtcbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0LmNhblBsYXkpIHtcbiAgICAgICAgICAgIHRoaXMuaXNTZWVraW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhcmdldC5zdGF0ZSA9PT0gVmdTdGF0ZXMuVkdfUExBWUlORykge1xuICAgICAgICAgICAgICAgIHRoaXMud2FzUGxheWluZyA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnRhcmdldC5wYXVzZSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIHNlZWtNb3ZlKG9mZnNldDogbnVtYmVyKSB7XG4gICAgICAgIGlmICh0aGlzLmlzU2Vla2luZykge1xuICAgICAgICAgICAgbGV0IHBlcmNlbnRhZ2UgPSBNYXRoLm1heChNYXRoLm1pbihvZmZzZXQgKiAxMDAgLyB0aGlzLmVsZW0uc2Nyb2xsV2lkdGgsIDk5LjkpLCAwKTtcbiAgICAgICAgICAgIHRoaXMudGFyZ2V0LnRpbWUuY3VycmVudCA9IHBlcmNlbnRhZ2UgKiB0aGlzLnRhcmdldC50aW1lLnRvdGFsIC8gMTAwO1xuICAgICAgICAgICAgdGhpcy50YXJnZXQuc2Vla1RpbWUocGVyY2VudGFnZSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgc2Vla0VuZChvZmZzZXQ6IG51bWJlcikge1xuICAgICAgICB0aGlzLmlzU2Vla2luZyA9IGZhbHNlO1xuICAgICAgICBpZiAodGhpcy50YXJnZXQuY2FuUGxheSkge1xuICAgICAgICAgICAgbGV0IHBlcmNlbnRhZ2UgPSBNYXRoLm1heChNYXRoLm1pbihvZmZzZXQgKiAxMDAgLyB0aGlzLmVsZW0uc2Nyb2xsV2lkdGgsIDk5LjkpLCAwKTtcbiAgICAgICAgICAgIHRoaXMudGFyZ2V0LnNlZWtUaW1lKHBlcmNlbnRhZ2UsIHRydWUpO1xuICAgICAgICAgICAgaWYgKHRoaXMud2FzUGxheWluZykge1xuICAgICAgICAgICAgICAgIHRoaXMud2FzUGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0LnBsYXkoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByb3RlY3RlZCB0b3VjaEVuZCgpIHtcbiAgICAgICAgdGhpcy5pc1NlZWtpbmcgPSBmYWxzZTtcbiAgICAgICAgaWYgKHRoaXMud2FzUGxheWluZykge1xuICAgICAgICAgICAgdGhpcy53YXNQbGF5aW5nID0gZmFsc2U7XG4gICAgICAgICAgICB0aGlzLnRhcmdldC5wbGF5KCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgZ2V0VG91Y2hPZmZzZXQoZXZlbnQ6IGFueSkge1xuICAgICAgICBsZXQgb2Zmc2V0TGVmdDogbnVtYmVyID0gMDtcbiAgICAgICAgbGV0IGVsZW1lbnQ6IGFueSA9IGV2ZW50LnRhcmdldDtcbiAgICAgICAgd2hpbGUgKGVsZW1lbnQpIHtcbiAgICAgICAgICAgIG9mZnNldExlZnQgKz0gZWxlbWVudC5vZmZzZXRMZWZ0O1xuICAgICAgICAgICAgZWxlbWVudCA9IGVsZW1lbnQub2Zmc2V0UGFyZW50O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBldmVudC50b3VjaGVzWyAwIF0ucGFnZVggLSBvZmZzZXRMZWZ0O1xuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ21vdXNlZG93bicsIFsgJyRldmVudCcgXSlcbiAgICBvbk1vdXNlRG93blNjcnViQmFyKCRldmVudDogYW55KSB7XG4gICAgICAgIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnRhcmdldC5pc0xpdmUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMudmdTbGlkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWVrRW5kKCRldmVudC5vZmZzZXRYKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2Vla1N0YXJ0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgQEhvc3RMaXN0ZW5lcignZG9jdW1lbnQ6bW91c2Vtb3ZlJywgWyAnJGV2ZW50JyBdKVxuICAgIG9uTW91c2VNb3ZlU2NydWJCYXIoJGV2ZW50OiBhbnkpIHtcbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0KSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMudGFyZ2V0LmlzTGl2ZSAmJiB0aGlzLnZnU2xpZGVyICYmIHRoaXMuaXNTZWVraW5nKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZWVrTW92ZSgkZXZlbnQub2Zmc2V0WCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdkb2N1bWVudDptb3VzZXVwJywgWyAnJGV2ZW50JyBdKVxuICAgIG9uTW91c2VVcFNjcnViQmFyKCRldmVudDogYW55KSB7XG4gICAgICAgIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnRhcmdldC5pc0xpdmUgJiYgdGhpcy52Z1NsaWRlciAmJiB0aGlzLmlzU2Vla2luZykge1xuICAgICAgICAgICAgICAgIHRoaXMuc2Vla0VuZCgkZXZlbnQub2Zmc2V0WCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCd0b3VjaHN0YXJ0JywgWyAnJGV2ZW50JyBdKVxuICAgIG9uVG91Y2hTdGFydFNjcnViQmFyKCRldmVudDogYW55KSB7XG4gICAgICAgIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnRhcmdldC5pc0xpdmUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMudmdTbGlkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWVrRW5kKHRoaXMuZ2V0VG91Y2hPZmZzZXQoJGV2ZW50KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlZWtTdGFydCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ2RvY3VtZW50OnRvdWNobW92ZScsIFsgJyRldmVudCcgXSlcbiAgICBvblRvdWNoTW92ZVNjcnViQmFyKCRldmVudDogYW55KSB7XG4gICAgICAgIGlmICh0aGlzLnRhcmdldCkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnRhcmdldC5pc0xpdmUgJiYgdGhpcy52Z1NsaWRlciAmJiB0aGlzLmlzU2Vla2luZykge1xuICAgICAgICAgICAgICAgIHRoaXMuc2Vla01vdmUodGhpcy5nZXRUb3VjaE9mZnNldCgkZXZlbnQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ2RvY3VtZW50OnRvdWNoY2FuY2VsJywgWyAnJGV2ZW50JyBdKVxuICAgIG9uVG91Y2hDYW5jZWxTY3J1YkJhcigkZXZlbnQ6IGFueSkge1xuICAgICAgICBpZiAodGhpcy50YXJnZXQpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy50YXJnZXQuaXNMaXZlICYmIHRoaXMudmdTbGlkZXIgJiYgdGhpcy5pc1NlZWtpbmcpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvdWNoRW5kKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdkb2N1bWVudDp0b3VjaGVuZCcsIFsgJyRldmVudCcgXSlcbiAgICBvblRvdWNoRW5kU2NydWJCYXIoJGV2ZW50OiBhbnkpIHtcbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0KSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMudGFyZ2V0LmlzTGl2ZSAmJiB0aGlzLnZnU2xpZGVyICYmIHRoaXMuaXNTZWVraW5nKSB7XG4gICAgICAgICAgICAgICAgdGhpcy50b3VjaEVuZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgQEhvc3RMaXN0ZW5lcigna2V5ZG93bicsIFsnJGV2ZW50J10pXG4gICAgYXJyb3dBZGp1c3RWb2x1bWUoZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0KSB7XG4gICAgICAgICAgICBpZiAoZXZlbnQua2V5Q29kZSA9PT0gMzggfHwgZXZlbnQua2V5Q29kZSA9PT0gMzkpIHtcbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMudGFyZ2V0LnNlZWtUaW1lKCh0aGlzLnRhcmdldC50aW1lLmN1cnJlbnQgKyA1MDAwKSAvIDEwMDAsIGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGV2ZW50LmtleUNvZGUgPT09IDM3IHx8IGV2ZW50LmtleUNvZGUgPT09IDQwKSB7XG4gICAgICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRhcmdldC5zZWVrVGltZSgodGhpcy50YXJnZXQudGltZS5jdXJyZW50IC0gNTAwMCkgLyAxMDAwLCBmYWxzZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRQZXJjZW50YWdlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy50YXJnZXQgPyAoKHRoaXMudGFyZ2V0LnRpbWUuY3VycmVudCAqIDEwMCkgLyB0aGlzLnRhcmdldC50aW1lLnRvdGFsKSArICclJyA6ICcwJSc7XG4gICAgfVxuXG4gICAgb25IaWRlU2NydWJCYXIoaGlkZTogYm9vbGVhbikge1xuICAgICAgICB0aGlzLmhpZGVTY3J1YkJhciA9IGhpZGU7XG4gICAgfVxuXG4gICAgbmdPbkRlc3Ryb3koKSB7XG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\n// Workaround until we can use UTC with Angular Date Pipe\nvar VgUtcPipe = (function () {\n function VgUtcPipe() {\n }\n VgUtcPipe.prototype.transform = function (value, format) {\n var date = new Date(value);\n var result = format;\n var ss = date.getUTCSeconds();\n var mm = date.getUTCMinutes();\n var hh = date.getUTCHours();\n if (ss < 10) {\n ss = '0' + ss;\n }\n if (mm < 10) {\n mm = '0' + mm;\n }\n if (hh < 10) {\n hh = '0' + hh;\n }\n result = result.replace(/ss/g, ss);\n result = result.replace(/mm/g, mm);\n result = result.replace(/hh/g, hh);\n return result;\n };\n VgUtcPipe.decorators = [\n { type: core_1.Pipe, args: [{ name: 'vgUtc' },] },\n ];\n return VgUtcPipe;\n}());\nexports.VgUtcPipe = VgUtcPipe;\nvar VgTimeDisplay = (function () {\n function VgTimeDisplay(ref, API) {\n this.API = API;\n this.vgProperty = 'current';\n this.vgFormat = 'mm:ss';\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgTimeDisplay.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgTimeDisplay.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n };\n VgTimeDisplay.prototype.getTime = function () {\n var t = 0;\n if (this.target) {\n t = Math.round(this.target.time[this.vgProperty]);\n t = isNaN(t) || this.target.isLive ? 0 : t;\n }\n return t;\n };\n VgTimeDisplay.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgTimeDisplay.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-time-display',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <span *ngIf=\\\"target?.isLive\\\">LIVE</span>\\n <span *ngIf=\\\"!target?.isLive\\\">{{ getTime() | vgUtc:vgFormat }}</span>\\n <ng-content></ng-content>\\n \",\n styles: [\"\\n vg-time-display {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 60px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n pointer-events: none;\\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgTimeDisplay.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgTimeDisplay.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"vgProperty\": [{ type: core_1.Input },],\n \"vgFormat\": [{ type: core_1.Input },],\n };\n return VgTimeDisplay;\n}());\nexports.VgTimeDisplay = VgTimeDisplay;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctdGltZS1kaXNwbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctdGltZS1kaXNwbGF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQXdIO0FBQ3hILHFEQUFtRDs7Ozs7SUFNL0MsNkJBQVMsR0FBVCxVQUFVLEtBQWEsRUFBRSxNQUFjO1FBQ25DLElBQUksSUFBSSxHQUFHLElBQUksSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzNCLElBQUksTUFBTSxHQUFHLE1BQU0sQ0FBQztRQUNwQixJQUFJLEVBQUUsR0FBa0IsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1FBQzdDLElBQUksRUFBRSxHQUFrQixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7UUFDN0MsSUFBSSxFQUFFLEdBQWtCLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUUzQyxFQUFFLENBQUMsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQztZQUNWLEVBQUUsR0FBRyxHQUFHLEdBQUcsRUFBRSxDQUFDO1NBQ2pCO1FBQ0QsRUFBRSxDQUFDLENBQUMsRUFBRSxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUM7WUFDVixFQUFFLEdBQUcsR0FBRyxHQUFHLEVBQUUsQ0FBQztTQUNqQjtRQUNELEVBQUUsQ0FBQyxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO1lBQ1YsRUFBRSxHQUFHLEdBQUcsR0FBRyxFQUFFLENBQUM7U0FDakI7UUFFRCxNQUFNLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQVUsRUFBRSxDQUFDLENBQUM7UUFDM0MsTUFBTSxHQUFHLE1BQU0sQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFVLEVBQUUsQ0FBQyxDQUFDO1FBQzNDLE1BQU0sR0FBRyxNQUFNLENBQUMsT0FBTyxDQUFDLEtBQUssRUFBVSxFQUFFLENBQUMsQ0FBQztRQUUzQyxNQUFNLENBQUMsTUFBTSxDQUFDO0tBQ2pCOztnQkF4QkosV0FBSSxTQUFDLEVBQUUsSUFBSSxFQUFFLE9BQU8sRUFBRTs7b0JBTHZCOztBQU1hLDhCQUFTOztJQStEbEIsdUJBQVksR0FBZSxFQUFTLEdBQVU7UUFBVixRQUFHLEdBQUgsR0FBRyxDQUFPOzBCQVJoQixTQUFTO3dCQUNYLE9BQU87NkJBS0gsRUFBRTtRQUc5QixJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxhQUFhLENBQUM7S0FDakM7SUFFRCxnQ0FBUSxHQUFSO1FBQUEsaUJBT0M7UUFORyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxjQUFNLE9BQUEsS0FBSSxDQUFDLGFBQWEsRUFBRSxFQUFwQixDQUFvQixDQUFDLENBQUMsQ0FBQztTQUM1RjtLQUNKO0lBRUQscUNBQWEsR0FBYjtRQUNJLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQ25EO0lBRUQsK0JBQU8sR0FBUDtRQUNJLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUVWLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2QsQ0FBQyxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUUsSUFBSSxDQUFDLFVBQVUsQ0FBRSxDQUFDLENBQUM7WUFDcEQsQ0FBQyxHQUFHLEtBQUssQ0FBQyxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDO1NBQzlDO1FBRUQsTUFBTSxDQUFDLENBQUMsQ0FBQztLQUNaO0lBRUQsbUNBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkFuRUosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsaUJBQWlCO29CQUMzQixhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLGdMQUlUO29CQUNELE1BQU0sRUFBRSxDQUFFLG9pQkFpQlQsQ0FBRTtpQkFDTjs7OztnQkExRDBCLGlCQUFVO2dCQUM1QixjQUFLOzs7MEJBMkRULFlBQUs7K0JBQ0wsWUFBSzs2QkFDTCxZQUFLOzt3QkE5RFY7O0FBMkRhLHNDQUFhIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBJbnB1dCwgRWxlbWVudFJlZiwgT25Jbml0LCBQaXBlVHJhbnNmb3JtLCBQaXBlLCBWaWV3RW5jYXBzdWxhdGlvbiwgT25EZXN0cm95IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uLy4uL2NvcmUvc2VydmljZXMvdmctYXBpJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuLy8gV29ya2Fyb3VuZCB1bnRpbCB3ZSBjYW4gdXNlIFVUQyB3aXRoIEFuZ3VsYXIgRGF0ZSBQaXBlXG5AUGlwZSh7IG5hbWU6ICd2Z1V0YycgfSlcbmV4cG9ydCBjbGFzcyBWZ1V0Y1BpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcbiAgICB0cmFuc2Zvcm0odmFsdWU6IG51bWJlciwgZm9ybWF0OiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICBsZXQgZGF0ZSA9IG5ldyBEYXRlKHZhbHVlKTtcbiAgICAgICAgbGV0IHJlc3VsdCA9IGZvcm1hdDtcbiAgICAgICAgbGV0IHNzOiBzdHJpbmd8bnVtYmVyID0gZGF0ZS5nZXRVVENTZWNvbmRzKCk7XG4gICAgICAgIGxldCBtbTogc3RyaW5nfG51bWJlciA9IGRhdGUuZ2V0VVRDTWludXRlcygpO1xuICAgICAgICBsZXQgaGg6IHN0cmluZ3xudW1iZXIgPSBkYXRlLmdldFVUQ0hvdXJzKCk7XG5cbiAgICAgICAgaWYgKHNzIDwgMTApIHtcbiAgICAgICAgICAgIHNzID0gJzAnICsgc3M7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1tIDwgMTApIHtcbiAgICAgICAgICAgIG1tID0gJzAnICsgbW07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGhoIDwgMTApIHtcbiAgICAgICAgICAgIGhoID0gJzAnICsgaGg7XG4gICAgICAgIH1cblxuICAgICAgICByZXN1bHQgPSByZXN1bHQucmVwbGFjZSgvc3MvZywgPHN0cmluZz5zcyk7XG4gICAgICAgIHJlc3VsdCA9IHJlc3VsdC5yZXBsYWNlKC9tbS9nLCA8c3RyaW5nPm1tKTtcbiAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnJlcGxhY2UoL2hoL2csIDxzdHJpbmc+aGgpO1xuXG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxufVxuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXRpbWUtZGlzcGxheScsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYFxuICAgICAgICA8c3BhbiAqbmdJZj1cInRhcmdldD8uaXNMaXZlXCI+TElWRTwvc3Bhbj5cbiAgICAgICAgPHNwYW4gKm5nSWY9XCIhdGFyZ2V0Py5pc0xpdmVcIj57eyBnZXRUaW1lKCkgfCB2Z1V0Yzp2Z0Zvcm1hdCB9fTwvc3Bhbj5cbiAgICAgICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICAgIGAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctdGltZS1kaXNwbGF5IHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICAgICAgICB3aWR0aDogNjBweDtcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA1MHB4O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgICAgICBmb250LWZhbWlseTogSGVsdmV0aWNhIE5ldWUsIEhlbHZldGljYSwgQXJpYWwsIHNhbnMtc2VyaWY7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdUaW1lRGlzcGxheSBpbXBsZW1lbnRzIE9uSW5pdCwgT25EZXN0cm95IHtcbiAgICBASW5wdXQoKSB2Z0Zvcjogc3RyaW5nO1xuICAgIEBJbnB1dCgpIHZnUHJvcGVydHk6IHN0cmluZyA9ICdjdXJyZW50JztcbiAgICBASW5wdXQoKSB2Z0Zvcm1hdDogc3RyaW5nID0gJ21tOnNzJztcblxuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHRhcmdldDogYW55O1xuXG4gICAgc3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcblxuICAgIGNvbnN0cnVjdG9yKHJlZjogRWxlbWVudFJlZiwgcHVibGljIEFQSTogVmdBUEkpIHtcbiAgICAgICAgdGhpcy5lbGVtID0gcmVmLm5hdGl2ZUVsZW1lbnQ7XG4gICAgfVxuXG4gICAgbmdPbkluaXQoKSB7XG4gICAgICAgIGlmICh0aGlzLkFQSS5pc1BsYXllclJlYWR5KSB7XG4gICAgICAgICAgICB0aGlzLm9uUGxheWVyUmVhZHkoKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucy5wdXNoKHRoaXMuQVBJLnBsYXllclJlYWR5RXZlbnQuc3Vic2NyaWJlKCgpID0+IHRoaXMub25QbGF5ZXJSZWFkeSgpKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvblBsYXllclJlYWR5KCkge1xuICAgICAgICB0aGlzLnRhcmdldCA9IHRoaXMuQVBJLmdldE1lZGlhQnlJZCh0aGlzLnZnRm9yKTtcbiAgICB9XG5cbiAgICBnZXRUaW1lKCkge1xuICAgICAgICBsZXQgdCA9IDA7XG5cbiAgICAgICAgaWYgKHRoaXMudGFyZ2V0KSB7XG4gICAgICAgICAgICB0ID0gTWF0aC5yb3VuZCh0aGlzLnRhcmdldC50aW1lWyB0aGlzLnZnUHJvcGVydHkgXSk7XG4gICAgICAgICAgICB0ID0gaXNOYU4odCkgfHwgdGhpcy50YXJnZXQuaXNMaXZlID8gMCA6IHQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdDtcbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLmZvckVhY2gocyA9PiBzLnVuc3Vic2NyaWJlKCkpO1xuICAgIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar VgTrackSelector = (function () {\n function VgTrackSelector(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n }\n VgTrackSelector.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgTrackSelector.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n var subs = Array.from(this.API.getMasterMedia().elem.children)\n .filter(function (item) { return item.tagName === 'TRACK'; })\n .filter(function (item) { return item.kind === 'subtitles'; })\n .map(function (item) {\n return ({\n label: item.label,\n selected: item.default === true,\n id: item.srclang\n });\n });\n this.tracks = subs.concat([\n {\n id: null,\n label: 'Off',\n selected: subs.every(function (item) { return item.selected === false; })\n }\n ]);\n var track = this.tracks.filter(function (item) { return item.selected === true; })[0];\n this.trackSelected = track.id;\n this.ariaValue = track.label;\n };\n VgTrackSelector.prototype.selectTrack = function (trackId) {\n var _this = this;\n this.trackSelected = (trackId === 'null') ? null : trackId;\n this.ariaValue = 'No track selected';\n Array.from(this.API.getMasterMedia().elem.textTracks)\n .forEach(function (item) {\n if (item.language === trackId) {\n _this.ariaValue = item.label;\n item.mode = 'showing';\n }\n else {\n item.mode = 'hidden';\n }\n });\n };\n VgTrackSelector.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgTrackSelector.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-track-selector',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div class=\\\"container\\\">\\n <div class=\\\"track-selected\\\"\\n [class.vg-icon-closed_caption]=\\\"!trackSelected\\\">\\n {{ trackSelected || '' }}\\n </div>\\n \\n <select class=\\\"trackSelector\\\" \\n (change)=\\\"selectTrack($event.target.value)\\\"\\n tabindex=\\\"0\\\"\\n aria-label=\\\"track selector\\\"\\n [attr.aria-valuetext]=\\\"ariaValue\\\">\\n <option \\n *ngFor=\\\"let track of tracks\\\"\\n [value]=\\\"track.id\\\"\\n [selected]=\\\"track.selected === true\\\">\\n {{ track.label }}\\n </option>\\n </select>\\n </div>\\n \",\n styles: [\"\\n vg-track-selector {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n width: 50px;\\n height: 50px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n vg-track-selector .container {\\n position: relative;\\n display: flex;\\n flex-grow: 1;\\n align-items: center;\\n \\n padding: 0;\\n margin: 5px;\\n }\\n vg-track-selector select.trackSelector {\\n width: 50px;\\n padding: 5px 8px;\\n border: none;\\n background: none;\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n appearance: none;\\n color: transparent;\\n font-size: 16px;\\n }\\n vg-track-selector select.trackSelector::-ms-expand {\\n display: none;\\n }\\n vg-track-selector select.trackSelector option {\\n color: #000;\\n }\\n vg-track-selector .track-selected {\\n position: absolute;\\n width: 100%;\\n height: 50px;\\n top: -6px;\\n text-align: center;\\n text-transform: uppercase;\\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\\n padding-top: 2px;\\n pointer-events: none;\\n }\\n vg-track-selector .vg-icon-closed_caption:before {\\n width: 100%;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgTrackSelector.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgTrackSelector.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n };\n return VgTrackSelector;\n}());\nexports.VgTrackSelector = VgTrackSelector;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctdHJhY2stc2VsZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy10cmFjay1zZWxlY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUFtRztBQUNuRyxxREFBbUQ7O0lBc0cvQyx5QkFBWSxHQUFlLEVBQVMsR0FBVTtRQUFWLFFBQUcsR0FBSCxHQUFHLENBQU87NkJBSmQsRUFBRTtRQUs5QixJQUFJLENBQUMsSUFBSSxHQUFHLEdBQUcsQ0FBQyxhQUFhLENBQUM7S0FDakM7SUFFRCxrQ0FBUSxHQUFSO1FBQUEsaUJBT0M7UUFORyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7WUFDekIsSUFBSSxDQUFDLGFBQWEsRUFBRSxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxjQUFNLE9BQUEsS0FBSSxDQUFDLGFBQWEsRUFBRSxFQUFwQixDQUFvQixDQUFDLENBQUMsQ0FBQztTQUM1RjtLQUNKO0lBRUQsdUNBQWEsR0FBYjtRQUNJLElBQUksQ0FBQyxNQUFNLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBRWhELElBQU0sSUFBSSxHQUFrQixLQUFLLENBQUMsSUFBSSxDQUFFLElBQUksQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFLENBQUMsSUFBeUIsQ0FBQyxRQUFRLENBQUM7YUFDaEcsTUFBTSxDQUFDLFVBQUMsSUFBaUIsSUFBSyxPQUFBLElBQUksQ0FBQyxPQUFPLEtBQUssT0FBTyxFQUF4QixDQUF3QixDQUFDO2FBQ3ZELE1BQU0sQ0FBQyxVQUFDLElBQXNCLElBQUssT0FBQSxJQUFJLENBQUMsSUFBSSxLQUFLLFdBQVcsRUFBekIsQ0FBeUIsQ0FBQzthQUM3RCxHQUFHLENBQUMsVUFBQyxJQUFzQjtZQUFLLE9BQUEsQ0FBQztnQkFDOUIsS0FBSyxFQUFFLElBQUksQ0FBQyxLQUFLO2dCQUNqQixRQUFRLEVBQUUsSUFBSSxDQUFDLE9BQU8sS0FBSyxJQUFJO2dCQUMvQixFQUFFLEVBQUUsSUFBSSxDQUFDLE9BQU87YUFDbkIsQ0FBQztRQUorQixDQUkvQixDQUFDLENBQUM7UUFFUixJQUFJLENBQUMsTUFBTSxHQUNKLElBQUk7WUFDUDtnQkFDSSxFQUFFLEVBQUUsSUFBSTtnQkFDUixLQUFLLEVBQUUsS0FBSztnQkFDWixRQUFRLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFDLElBQVksSUFBSyxPQUFBLElBQUksQ0FBQyxRQUFRLEtBQUssS0FBSyxFQUF2QixDQUF1QixDQUFDO2FBQ2xFO1VBQ0osQ0FBQztRQUVGLElBQU0sS0FBSyxHQUFXLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDLFVBQUMsSUFBWSxJQUFLLE9BQUEsSUFBSSxDQUFDLFFBQVEsS0FBSyxJQUFJLEVBQXRCLENBQXNCLENBQUMsQ0FBRSxDQUFDLENBQUUsQ0FBQztRQUN4RixJQUFJLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQyxFQUFFLENBQUM7UUFDOUIsSUFBSSxDQUFDLFNBQVMsR0FBRyxLQUFLLENBQUMsS0FBSyxDQUFDO0tBQ2hDO0lBRUQscUNBQVcsR0FBWCxVQUFZLE9BQWU7UUFBM0IsaUJBY0M7UUFiRyxJQUFJLENBQUMsYUFBYSxHQUFHLENBQUMsT0FBTyxLQUFLLE1BQU0sQ0FBQyxHQUFHLElBQUksR0FBRyxPQUFPLENBQUM7UUFFM0QsSUFBSSxDQUFDLFNBQVMsR0FBRyxtQkFBbUIsQ0FBQztRQUVyQyxLQUFLLENBQUMsSUFBSSxDQUFFLElBQUksQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFLENBQUMsSUFBeUIsQ0FBQyxVQUFVLENBQUM7YUFDdEUsT0FBTyxDQUFDLFVBQUMsSUFBZTtZQUNyQixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxLQUFLLE9BQU8sQ0FBQyxDQUFDLENBQUM7Z0JBQzVCLEtBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQztnQkFDNUIsSUFBSSxDQUFDLElBQUksR0FBRyxTQUFTLENBQUM7YUFDekI7WUFBQyxJQUFJLENBQUMsQ0FBQztnQkFDSixJQUFJLENBQUMsSUFBSSxHQUFHLFFBQVEsQ0FBQzthQUN4QjtTQUNKLENBQUMsQ0FBQztLQUNWO0lBRUQscUNBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkF0SkosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsbUJBQW1CO29CQUM3QixhQUFhLEVBQUUsd0JBQWlCLENBQUMsSUFBSTtvQkFDckMsUUFBUSxFQUFFLHd3QkFvQlQ7b0JBQ0QsTUFBTSxFQUFFLENBQUUsK3BEQXVEVCxDQUFFO2lCQUNOOzs7O2dCQTFGbUIsaUJBQVU7Z0JBQ3JCLGNBQUs7OzswQkEyRlQsWUFBSzs7MEJBNUZWOztBQTJGYSwwQ0FBZSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgRWxlbWVudFJlZiwgT25Jbml0LCBJbnB1dCwgVmlld0VuY2Fwc3VsYXRpb24sIE9uRGVzdHJveSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi8uLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBTdWJzY3JpcHRpb24gfSBmcm9tICdyeGpzL1N1YnNjcmlwdGlvbic7XG5cbmV4cG9ydCBpbnRlcmZhY2UgT3B0aW9uIHtcbiAgICBpZDogc3RyaW5nO1xuICAgIGxhYmVsOiBzdHJpbmc7XG4gICAgc2VsZWN0ZWQ6IGJvb2xlYW47XG59XG5cbkBDb21wb25lbnQoe1xuICAgIHNlbGVjdG9yOiAndmctdHJhY2stc2VsZWN0b3InLFxuICAgIGVuY2Fwc3VsYXRpb246IFZpZXdFbmNhcHN1bGF0aW9uLk5vbmUsXG4gICAgdGVtcGxhdGU6IGBcbiAgICAgICAgPGRpdiBjbGFzcz1cImNvbnRhaW5lclwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRyYWNrLXNlbGVjdGVkXCJcbiAgICAgICAgICAgICAgICAgW2NsYXNzLnZnLWljb24tY2xvc2VkX2NhcHRpb25dPVwiIXRyYWNrU2VsZWN0ZWRcIj5cbiAgICAgICAgICAgICAgICB7eyB0cmFja1NlbGVjdGVkIHx8ICcnIH19XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgPHNlbGVjdCBjbGFzcz1cInRyYWNrU2VsZWN0b3JcIiBcbiAgICAgICAgICAgICAgICAgICAgKGNoYW5nZSk9XCJzZWxlY3RUcmFjaygkZXZlbnQudGFyZ2V0LnZhbHVlKVwiXG4gICAgICAgICAgICAgICAgICAgIHRhYmluZGV4PVwiMFwiXG4gICAgICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJ0cmFjayBzZWxlY3RvclwiXG4gICAgICAgICAgICAgICAgICAgIFthdHRyLmFyaWEtdmFsdWV0ZXh0XT1cImFyaWFWYWx1ZVwiPlxuICAgICAgICAgICAgICAgIDxvcHRpb24gXG4gICAgICAgICAgICAgICAgICAgICpuZ0Zvcj1cImxldCB0cmFjayBvZiB0cmFja3NcIlxuICAgICAgICAgICAgICAgICAgICBbdmFsdWVdPVwidHJhY2suaWRcIlxuICAgICAgICAgICAgICAgICAgICBbc2VsZWN0ZWRdPVwidHJhY2suc2VsZWN0ZWQgPT09IHRydWVcIj5cbiAgICAgICAgICAgICAgICAgICAge3sgdHJhY2subGFiZWwgfX1cbiAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICA8L2Rpdj5cbiAgICBgLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLXRyYWNrLXNlbGVjdG9yIHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgICAgICB3aWR0aDogNTBweDtcbiAgICAgICAgICAgIGhlaWdodDogNTBweDtcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA1MHB4O1xuICAgICAgICB9XG4gICAgICAgIHZnLXRyYWNrLXNlbGVjdG9yIC5jb250YWluZXIge1xuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGZsZXgtZ3JvdzogMTtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHBhZGRpbmc6IDA7XG4gICAgICAgICAgICBtYXJnaW46IDVweDtcbiAgICAgICAgfVxuICAgICAgICB2Zy10cmFjay1zZWxlY3RvciBzZWxlY3QudHJhY2tTZWxlY3RvciB7XG4gICAgICAgICAgICB3aWR0aDogNTBweDtcbiAgICAgICAgICAgIHBhZGRpbmc6IDVweCA4cHg7XG4gICAgICAgICAgICBib3JkZXI6IG5vbmU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiBub25lO1xuICAgICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBub25lO1xuICAgICAgICAgICAgLW1vei1hcHBlYXJhbmNlOiBub25lO1xuICAgICAgICAgICAgYXBwZWFyYW5jZTogbm9uZTtcbiAgICAgICAgICAgIGNvbG9yOiB0cmFuc3BhcmVudDtcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgICAgICAgfVxuICAgICAgICB2Zy10cmFjay1zZWxlY3RvciBzZWxlY3QudHJhY2tTZWxlY3Rvcjo6LW1zLWV4cGFuZCB7XG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xuICAgICAgICB9XG4gICAgICAgIHZnLXRyYWNrLXNlbGVjdG9yIHNlbGVjdC50cmFja1NlbGVjdG9yIG9wdGlvbiB7XG4gICAgICAgICAgICBjb2xvcjogIzAwMDtcbiAgICAgICAgfVxuICAgICAgICB2Zy10cmFjay1zZWxlY3RvciAudHJhY2stc2VsZWN0ZWQge1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICAgICAgICB0b3A6IC02cHg7XG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XG4gICAgICAgICAgICB0ZXh0LXRyYW5zZm9ybTogdXBwZXJjYXNlO1xuICAgICAgICAgICAgZm9udC1mYW1pbHk6IEhlbHZldGljYSBOZXVlLCBIZWx2ZXRpY2EsIEFyaWFsLCBzYW5zLXNlcmlmO1xuICAgICAgICAgICAgcGFkZGluZy10b3A6IDJweDtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICB9XG4gICAgICAgIHZnLXRyYWNrLXNlbGVjdG9yIC52Zy1pY29uLWNsb3NlZF9jYXB0aW9uOmJlZm9yZSB7XG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgfVxuICAgIGAgXVxufSlcbmV4cG9ydCBjbGFzcyBWZ1RyYWNrU2VsZWN0b3IgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcblxuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHRhcmdldDogYW55O1xuICAgIHRyYWNrczogQXJyYXk8T3B0aW9uPjtcbiAgICB0cmFja1NlbGVjdGVkOiBzdHJpbmc7XG5cbiAgICBzdWJzY3JpcHRpb25zOiBTdWJzY3JpcHRpb25bXSA9IFtdO1xuXG4gICAgYXJpYVZhbHVlOiBzdHJpbmc7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgIH1cblxuICAgIG5nT25Jbml0KCkge1xuICAgICAgICBpZiAodGhpcy5BUEkuaXNQbGF5ZXJSZWFkeSkge1xuICAgICAgICAgICAgdGhpcy5vblBsYXllclJlYWR5KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLkFQSS5wbGF5ZXJSZWFkeUV2ZW50LnN1YnNjcmliZSgoKSA9PiB0aGlzLm9uUGxheWVyUmVhZHkoKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25QbGF5ZXJSZWFkeSgpIHtcbiAgICAgICAgdGhpcy50YXJnZXQgPSB0aGlzLkFQSS5nZXRNZWRpYUJ5SWQodGhpcy52Z0Zvcik7XG5cbiAgICAgICAgY29uc3Qgc3ViczogQXJyYXk8T3B0aW9uPiA9IEFycmF5LmZyb20oKHRoaXMuQVBJLmdldE1hc3Rlck1lZGlhKCkuZWxlbSBhcyBIVE1MTWVkaWFFbGVtZW50KS5jaGlsZHJlbilcbiAgICAgICAgICAgIC5maWx0ZXIoKGl0ZW06IEhUTUxFbGVtZW50KSA9PiBpdGVtLnRhZ05hbWUgPT09ICdUUkFDSycpXG4gICAgICAgICAgICAuZmlsdGVyKChpdGVtOiBIVE1MVHJhY2tFbGVtZW50KSA9PiBpdGVtLmtpbmQgPT09ICdzdWJ0aXRsZXMnKVxuICAgICAgICAgICAgLm1hcCgoaXRlbTogSFRNTFRyYWNrRWxlbWVudCkgPT4gKHtcbiAgICAgICAgICAgICAgICBsYWJlbDogaXRlbS5sYWJlbCxcbiAgICAgICAgICAgICAgICBzZWxlY3RlZDogaXRlbS5kZWZhdWx0ID09PSB0cnVlLFxuICAgICAgICAgICAgICAgIGlkOiBpdGVtLnNyY2xhbmdcbiAgICAgICAgICAgIH0pKTtcblxuICAgICAgICB0aGlzLnRyYWNrcyA9IFtcbiAgICAgICAgICAgIC4uLnN1YnMsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWQ6IG51bGwsXG4gICAgICAgICAgICAgICAgbGFiZWw6ICdPZmYnLFxuICAgICAgICAgICAgICAgIHNlbGVjdGVkOiBzdWJzLmV2ZXJ5KChpdGVtOiBPcHRpb24pID0+IGl0ZW0uc2VsZWN0ZWQgPT09IGZhbHNlKVxuICAgICAgICAgICAgfVxuICAgICAgICBdO1xuXG4gICAgICAgIGNvbnN0IHRyYWNrOiBPcHRpb24gPSB0aGlzLnRyYWNrcy5maWx0ZXIoKGl0ZW06IE9wdGlvbikgPT4gaXRlbS5zZWxlY3RlZCA9PT0gdHJ1ZSlbIDAgXTtcbiAgICAgICAgdGhpcy50cmFja1NlbGVjdGVkID0gdHJhY2suaWQ7XG4gICAgICAgIHRoaXMuYXJpYVZhbHVlID0gdHJhY2subGFiZWw7XG4gICAgfVxuXG4gICAgc2VsZWN0VHJhY2sodHJhY2tJZDogc3RyaW5nKSB7XG4gICAgICAgIHRoaXMudHJhY2tTZWxlY3RlZCA9ICh0cmFja0lkID09PSAnbnVsbCcpID8gbnVsbCA6IHRyYWNrSWQ7XG5cbiAgICAgICAgdGhpcy5hcmlhVmFsdWUgPSAnTm8gdHJhY2sgc2VsZWN0ZWQnO1xuXG4gICAgICAgIEFycmF5LmZyb20oKHRoaXMuQVBJLmdldE1hc3Rlck1lZGlhKCkuZWxlbSBhcyBIVE1MTWVkaWFFbGVtZW50KS50ZXh0VHJhY2tzKVxuICAgICAgICAgICAgLmZvckVhY2goKGl0ZW06IFRleHRUcmFjaykgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChpdGVtLmxhbmd1YWdlID09PSB0cmFja0lkKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYXJpYVZhbHVlID0gaXRlbS5sYWJlbDtcbiAgICAgICAgICAgICAgICAgICAgaXRlbS5tb2RlID0gJ3Nob3dpbmcnO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGl0ZW0ubW9kZSA9ICdoaWRkZW4nO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../../core/services/vg-api\");\nvar VgVolume = (function () {\n function VgVolume(ref, API) {\n this.API = API;\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.isDragging = false;\n }\n VgVolume.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgVolume.prototype.onPlayerReady = function () {\n this.target = this.API.getMediaById(this.vgFor);\n this.ariaValue = this.getVolume() * 100;\n };\n VgVolume.prototype.onClick = function (event) {\n this.setVolume(this.calculateVolume(event.clientX));\n };\n VgVolume.prototype.onMouseDown = function (event) {\n this.mouseDownPosX = event.clientX;\n this.isDragging = true;\n };\n VgVolume.prototype.onDrag = function (event) {\n if (this.isDragging) {\n this.setVolume(this.calculateVolume(event.clientX));\n }\n };\n VgVolume.prototype.onStopDrag = function (event) {\n if (this.isDragging) {\n this.isDragging = false;\n if (this.mouseDownPosX === event.clientX) {\n this.setVolume(this.calculateVolume(event.clientX));\n }\n }\n };\n VgVolume.prototype.arrowAdjustVolume = function (event) {\n if (event.keyCode === 38 || event.keyCode === 39) {\n event.preventDefault();\n this.setVolume(Math.max(0, Math.min(100, (this.getVolume() * 100) + 10)));\n }\n else if (event.keyCode === 37 || event.keyCode === 40) {\n event.preventDefault();\n this.setVolume(Math.max(0, Math.min(100, (this.getVolume() * 100) - 10)));\n }\n };\n VgVolume.prototype.calculateVolume = function (mousePosX) {\n var recObj = this.volumeBarRef.nativeElement.getBoundingClientRect();\n var volumeBarOffsetLeft = recObj.left;\n var volumeBarWidth = recObj.width;\n return (mousePosX - volumeBarOffsetLeft) / volumeBarWidth * 100;\n };\n VgVolume.prototype.setVolume = function (vol) {\n this.target.volume = Math.max(0, Math.min(1, vol / 100));\n this.ariaValue = this.target.volume * 100;\n };\n VgVolume.prototype.getVolume = function () {\n return this.target ? this.target.volume : 0;\n };\n VgVolume.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgVolume.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-volume',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"\\n <div \\n #volumeBar\\n class=\\\"volumeBar\\\"\\n tabindex=\\\"0\\\"\\n role=\\\"slider\\\"\\n aria-label=\\\"volume level\\\"\\n aria-level=\\\"polite\\\"\\n [attr.aria-valuenow]=\\\"ariaValue\\\"\\n aria-valuemin=\\\"0\\\"\\n aria-valuemax=\\\"100\\\"\\n aria-orientation=\\\"horizontal\\\"\\n [attr.aria-valuetext]=\\\"ariaValue + '%'\\\"\\n (click)=\\\"onClick($event)\\\"\\n (mousedown)=\\\"onMouseDown($event)\\\">\\n <div class=\\\"volumeBackground\\\" [ngClass]=\\\"{dragging: isDragging}\\\">\\n <div class=\\\"volumeValue\\\" [style.width]=\\\"(getVolume() * (100-15)) + '%'\\\"></div>\\n <div class=\\\"volumeKnob\\\" [style.left]=\\\"(getVolume() * (100-15)) + '%'\\\"></div>\\n </div>\\n </div>\\n \",\n styles: [\"\\n vg-volume {\\n -webkit-touch-callout: none;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n display: flex;\\n justify-content: center;\\n height: 50px;\\n width: 100px;\\n cursor: pointer;\\n color: white;\\n line-height: 50px;\\n }\\n vg-volume .volumeBar {\\n position: relative;\\n display: flex;\\n flex-grow: 1;\\n align-items: center;\\n }\\n vg-volume .volumeBackground {\\n display: flex;\\n flex-grow: 1;\\n height: 5px;\\n pointer-events: none;\\n background-color: #333;\\n }\\n vg-volume .volumeValue {\\n display: flex;\\n height: 5px;\\n pointer-events: none;\\n background-color: #FFF;\\n transition:all 0.2s ease-out;\\n }\\n vg-volume .volumeKnob {\\n position: absolute;\\n width: 15px; height: 15px;\\n left: 0; top: 50%;\\n transform: translateY(-50%);\\n border-radius: 15px;\\n pointer-events: none;\\n background-color: #FFF;\\n transition:all 0.2s ease-out;\\n }\\n vg-volume .volumeBackground.dragging .volumeValue,\\n vg-volume .volumeBackground.dragging .volumeKnob {\\n transition: none;\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgVolume.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n ]; };\n VgVolume.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"volumeBarRef\": [{ type: core_1.ViewChild, args: ['volumeBar',] },],\n \"onDrag\": [{ type: core_1.HostListener, args: ['document:mousemove', ['$event'],] },],\n \"onStopDrag\": [{ type: core_1.HostListener, args: ['document:mouseup', ['$event'],] },],\n \"arrowAdjustVolume\": [{ type: core_1.HostListener, args: ['keydown', ['$event'],] },],\n };\n return VgVolume;\n}());\nexports.VgVolume = VgVolume;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctdm9sdW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctdm9sdW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBR3VCO0FBQ3ZCLHFEQUFtRDs7SUEwRi9DLGtCQUFZLEdBQWUsRUFBUyxHQUFVO1FBQVYsUUFBRyxHQUFILEdBQUcsQ0FBTzs2QkFGZCxFQUFFO1FBRzlCLElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQztRQUM5QixJQUFJLENBQUMsVUFBVSxHQUFHLEtBQUssQ0FBQztLQUMzQjtJQUVELDJCQUFRLEdBQVI7UUFBQSxpQkFPQztRQU5HLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLGNBQU0sT0FBQSxLQUFJLENBQUMsYUFBYSxFQUFFLEVBQXBCLENBQW9CLENBQUMsQ0FBQyxDQUFDO1NBQzVGO0tBQ0o7SUFFRCxnQ0FBYSxHQUFiO1FBQ0ksSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDaEQsSUFBSSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUMsU0FBUyxFQUFFLEdBQUcsR0FBRyxDQUFDO0tBQzNDO0lBRUQsMEJBQU8sR0FBUCxVQUFRLEtBQTBCO1FBQzlCLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztLQUN2RDtJQUVELDhCQUFXLEdBQVgsVUFBWSxLQUEwQjtRQUNsQyxJQUFJLENBQUMsYUFBYSxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUM7UUFDbkMsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUM7S0FDMUI7SUFHRCx5QkFBTSxhQUFDLEtBQTBCO1FBQzdCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO1lBQ2xCLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztTQUN2RDs7SUFJTCw2QkFBVSxhQUFDLEtBQTBCO1FBQ2pDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDO1lBQ2xCLElBQUksQ0FBQyxVQUFVLEdBQUcsS0FBSyxDQUFDO1lBQ3hCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxhQUFhLEtBQUssS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7Z0JBQ3ZDLElBQUksQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQzthQUN2RDtTQUNKOztJQUlMLG9DQUFpQixhQUFDLEtBQW9CO1FBQ2xDLEVBQUUsQ0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFPLEtBQUssRUFBRSxJQUFJLEtBQUssQ0FBQyxPQUFPLEtBQUssRUFBRSxDQUFDLENBQUMsQ0FBQztZQUMvQyxLQUFLLENBQUMsY0FBYyxFQUFFLENBQUM7WUFDdkIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsRUFBRSxJQUFJLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBQyxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUsR0FBRyxHQUFHLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDNUU7UUFDRCxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sS0FBSyxFQUFFLElBQUksS0FBSyxDQUFDLE9BQU8sS0FBSyxFQUFFLENBQUMsQ0FBQyxDQUFDO1lBQ3BELEtBQUssQ0FBQyxjQUFjLEVBQUUsQ0FBQztZQUN2QixJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxHQUFHLEdBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUM1RTs7SUFHTCxrQ0FBZSxHQUFmLFVBQWdCLFNBQWlCO1FBQzdCLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsYUFBYSxDQUFDLHFCQUFxQixFQUFFLENBQUM7UUFDdkUsSUFBTSxtQkFBbUIsR0FBVyxNQUFNLENBQUMsSUFBSSxDQUFDO1FBQ2hELElBQU0sY0FBYyxHQUFXLE1BQU0sQ0FBQyxLQUFLLENBQUM7UUFDNUMsTUFBTSxDQUFDLENBQUMsU0FBUyxHQUFHLG1CQUFtQixDQUFDLEdBQUcsY0FBYyxHQUFHLEdBQUcsQ0FBQztLQUNuRTtJQUVELDRCQUFTLEdBQVQsVUFBVSxHQUFXO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLEdBQUcsR0FBRyxHQUFHLENBQUMsQ0FBQyxDQUFDO1FBQ3pELElBQUksQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEdBQUcsR0FBRyxDQUFDO0tBQzdDO0lBRUQsNEJBQVMsR0FBVDtRQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQztLQUMvQztJQUVELDhCQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztLQUNwRDs7Z0JBbEtKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLFdBQVc7b0JBQ3JCLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUscTBCQW9CVDtvQkFDRCxNQUFNLEVBQUUsQ0FBRSxnL0NBaURULENBQUU7aUJBQ047Ozs7Z0JBaEZxQixpQkFBVTtnQkFHdkIsY0FBSzs7OzBCQStFVCxZQUFLO2lDQUNMLGdCQUFTLFNBQUMsV0FBVzsyQkFzQ3JCLG1CQUFZLFNBQUMsb0JBQW9CLEVBQUUsQ0FBRSxRQUFRLENBQUU7K0JBTy9DLG1CQUFZLFNBQUMsa0JBQWtCLEVBQUUsQ0FBRSxRQUFRLENBQUU7c0NBVTdDLG1CQUFZLFNBQUMsU0FBUyxFQUFFLENBQUMsUUFBUSxDQUFDOzttQkEzSXZDOztBQWtGYSw0QkFBUSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gICAgQ29tcG9uZW50LCBJbnB1dCwgRWxlbWVudFJlZiwgSG9zdExpc3RlbmVyLCBPbkluaXQsIFZpZXdFbmNhcHN1bGF0aW9uLCBWaWV3Q2hpbGQsXG4gICAgT25EZXN0cm95XG59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi8uLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBTdWJzY3JpcHRpb24gfSBmcm9tICdyeGpzL1N1YnNjcmlwdGlvbic7XG5cbkBDb21wb25lbnQoe1xuICAgIHNlbGVjdG9yOiAndmctdm9sdW1lJyxcbiAgICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgIHRlbXBsYXRlOiBgXG4gICAgICAgIDxkaXYgXG4gICAgICAgICAgICAjdm9sdW1lQmFyXG4gICAgICAgICAgICBjbGFzcz1cInZvbHVtZUJhclwiXG4gICAgICAgICAgICB0YWJpbmRleD1cIjBcIlxuICAgICAgICAgICAgcm9sZT1cInNsaWRlclwiXG4gICAgICAgICAgICBhcmlhLWxhYmVsPVwidm9sdW1lIGxldmVsXCJcbiAgICAgICAgICAgIGFyaWEtbGV2ZWw9XCJwb2xpdGVcIlxuICAgICAgICAgICAgW2F0dHIuYXJpYS12YWx1ZW5vd109XCJhcmlhVmFsdWVcIlxuICAgICAgICAgICAgYXJpYS12YWx1ZW1pbj1cIjBcIlxuICAgICAgICAgICAgYXJpYS12YWx1ZW1heD1cIjEwMFwiXG4gICAgICAgICAgICBhcmlhLW9yaWVudGF0aW9uPVwiaG9yaXpvbnRhbFwiXG4gICAgICAgICAgICBbYXR0ci5hcmlhLXZhbHVldGV4dF09XCJhcmlhVmFsdWUgKyAnJSdcIlxuICAgICAgICAgICAgKGNsaWNrKT1cIm9uQ2xpY2soJGV2ZW50KVwiXG4gICAgICAgICAgICAobW91c2Vkb3duKT1cIm9uTW91c2VEb3duKCRldmVudClcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ2b2x1bWVCYWNrZ3JvdW5kXCIgW25nQ2xhc3NdPVwie2RyYWdnaW5nOiBpc0RyYWdnaW5nfVwiPlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ2b2x1bWVWYWx1ZVwiIFtzdHlsZS53aWR0aF09XCIoZ2V0Vm9sdW1lKCkgKiAoMTAwLTE1KSkgKyAnJSdcIj48L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwidm9sdW1lS25vYlwiIFtzdHlsZS5sZWZ0XT1cIihnZXRWb2x1bWUoKSAqICgxMDAtMTUpKSArICclJ1wiPjwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgIGAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctdm9sdW1lIHtcbiAgICAgICAgICAgIC13ZWJraXQtdG91Y2gtY2FsbG91dDogbm9uZTtcbiAgICAgICAgICAgIC13ZWJraXQtdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICAtbW96LXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgLW1zLXVzZXItc2VsZWN0OiBub25lO1xuICAgICAgICAgICAgdXNlci1zZWxlY3Q6IG5vbmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gICAgICAgICAgICBoZWlnaHQ6IDUwcHg7XG4gICAgICAgICAgICB3aWR0aDogMTAwcHg7XG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgICAgICBjb2xvcjogd2hpdGU7XG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNTBweDtcbiAgICAgICAgfVxuICAgICAgICB2Zy12b2x1bWUgLnZvbHVtZUJhciB7XG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgZmxleC1ncm93OiAxO1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgfVxuICAgICAgICB2Zy12b2x1bWUgLnZvbHVtZUJhY2tncm91bmQge1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGZsZXgtZ3JvdzogMTtcbiAgICAgICAgICAgIGhlaWdodDogNXB4O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjMzMzO1xuICAgICAgICB9XG4gICAgICAgIHZnLXZvbHVtZSAudm9sdW1lVmFsdWUge1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGhlaWdodDogNXB4O1xuICAgICAgICAgICAgcG9pbnRlci1ldmVudHM6IG5vbmU7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjRkZGO1xuICAgICAgICAgICAgdHJhbnNpdGlvbjphbGwgMC4ycyBlYXNlLW91dDtcbiAgICAgICAgfVxuICAgICAgICB2Zy12b2x1bWUgLnZvbHVtZUtub2Ige1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgd2lkdGg6IDE1cHg7IGhlaWdodDogMTVweDtcbiAgICAgICAgICAgIGxlZnQ6IDA7IHRvcDogNTAlO1xuICAgICAgICAgICAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC01MCUpO1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTVweDtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI0ZGRjtcbiAgICAgICAgICAgIHRyYW5zaXRpb246YWxsIDAuMnMgZWFzZS1vdXQ7XG4gICAgICAgIH1cbiAgICAgICAgdmctdm9sdW1lIC52b2x1bWVCYWNrZ3JvdW5kLmRyYWdnaW5nIC52b2x1bWVWYWx1ZSxcbiAgICAgICAgdmctdm9sdW1lIC52b2x1bWVCYWNrZ3JvdW5kLmRyYWdnaW5nIC52b2x1bWVLbm9iIHtcbiAgICAgICAgICAgIHRyYW5zaXRpb246IG5vbmU7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdWb2x1bWUgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSB7XG4gICAgQElucHV0KCkgdmdGb3I6IHN0cmluZztcbiAgICBAVmlld0NoaWxkKCd2b2x1bWVCYXInKSB2b2x1bWVCYXJSZWY6IEVsZW1lbnRSZWY7XG5cbiAgICBlbGVtOiBIVE1MRWxlbWVudDtcbiAgICB0YXJnZXQ6IGFueTtcbiAgICBpc0RyYWdnaW5nOiBib29sZWFuO1xuICAgIG1vdXNlRG93blBvc1g6IG51bWJlcjtcbiAgICBhcmlhVmFsdWU6IG51bWJlcjtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJKSB7XG4gICAgICAgIHRoaXMuZWxlbSA9IHJlZi5uYXRpdmVFbGVtZW50O1xuICAgICAgICB0aGlzLmlzRHJhZ2dpbmcgPSBmYWxzZTtcbiAgICB9XG5cbiAgICBuZ09uSW5pdCgpIHtcbiAgICAgICAgaWYgKHRoaXMuQVBJLmlzUGxheWVyUmVhZHkpIHtcbiAgICAgICAgICAgIHRoaXMub25QbGF5ZXJSZWFkeSgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2godGhpcy5BUEkucGxheWVyUmVhZHlFdmVudC5zdWJzY3JpYmUoKCkgPT4gdGhpcy5vblBsYXllclJlYWR5KCkpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUGxheWVyUmVhZHkoKSB7XG4gICAgICAgIHRoaXMudGFyZ2V0ID0gdGhpcy5BUEkuZ2V0TWVkaWFCeUlkKHRoaXMudmdGb3IpO1xuICAgICAgICB0aGlzLmFyaWFWYWx1ZSA9IHRoaXMuZ2V0Vm9sdW1lKCkgKiAxMDA7XG4gICAgfVxuXG4gICAgb25DbGljayhldmVudDogeyBjbGllbnRYOiBudW1iZXIgfSkge1xuICAgICAgICB0aGlzLnNldFZvbHVtZSh0aGlzLmNhbGN1bGF0ZVZvbHVtZShldmVudC5jbGllbnRYKSk7XG4gICAgfVxuXG4gICAgb25Nb3VzZURvd24oZXZlbnQ6IHsgY2xpZW50WDogbnVtYmVyIH0pIHtcbiAgICAgICAgdGhpcy5tb3VzZURvd25Qb3NYID0gZXZlbnQuY2xpZW50WDtcbiAgICAgICAgdGhpcy5pc0RyYWdnaW5nID0gdHJ1ZTtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdkb2N1bWVudDptb3VzZW1vdmUnLCBbICckZXZlbnQnIF0pXG4gICAgb25EcmFnKGV2ZW50OiB7IGNsaWVudFg6IG51bWJlciB9KSB7XG4gICAgICAgIGlmICh0aGlzLmlzRHJhZ2dpbmcpIHtcbiAgICAgICAgICAgIHRoaXMuc2V0Vm9sdW1lKHRoaXMuY2FsY3VsYXRlVm9sdW1lKGV2ZW50LmNsaWVudFgpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIEBIb3N0TGlzdGVuZXIoJ2RvY3VtZW50Om1vdXNldXAnLCBbICckZXZlbnQnIF0pXG4gICAgb25TdG9wRHJhZyhldmVudDogeyBjbGllbnRYOiBudW1iZXIgfSkge1xuICAgICAgICBpZiAodGhpcy5pc0RyYWdnaW5nKSB7XG4gICAgICAgICAgICB0aGlzLmlzRHJhZ2dpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmICh0aGlzLm1vdXNlRG93blBvc1ggPT09IGV2ZW50LmNsaWVudFgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFZvbHVtZSh0aGlzLmNhbGN1bGF0ZVZvbHVtZShldmVudC5jbGllbnRYKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdrZXlkb3duJywgWyckZXZlbnQnXSlcbiAgICBhcnJvd0FkanVzdFZvbHVtZShldmVudDogS2V5Ym9hcmRFdmVudCkge1xuICAgICAgICBpZiAoZXZlbnQua2V5Q29kZSA9PT0gMzggfHwgZXZlbnQua2V5Q29kZSA9PT0gMzkpIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB0aGlzLnNldFZvbHVtZShNYXRoLm1heCgwLCBNYXRoLm1pbigxMDAsKHRoaXMuZ2V0Vm9sdW1lKCkgKiAxMDApICsgMTApKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoZXZlbnQua2V5Q29kZSA9PT0gMzcgfHwgZXZlbnQua2V5Q29kZSA9PT0gNDApIHtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB0aGlzLnNldFZvbHVtZShNYXRoLm1heCgwLCBNYXRoLm1pbigxMDAsKHRoaXMuZ2V0Vm9sdW1lKCkgKiAxMDApIC0gMTApKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjYWxjdWxhdGVWb2x1bWUobW91c2VQb3NYOiBudW1iZXIpIHtcbiAgICAgICAgY29uc3QgcmVjT2JqID0gdGhpcy52b2x1bWVCYXJSZWYubmF0aXZlRWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgY29uc3Qgdm9sdW1lQmFyT2Zmc2V0TGVmdDogbnVtYmVyID0gcmVjT2JqLmxlZnQ7XG4gICAgICAgIGNvbnN0IHZvbHVtZUJhcldpZHRoOiBudW1iZXIgPSByZWNPYmoud2lkdGg7XG4gICAgICAgIHJldHVybiAobW91c2VQb3NYIC0gdm9sdW1lQmFyT2Zmc2V0TGVmdCkgLyB2b2x1bWVCYXJXaWR0aCAqIDEwMDtcbiAgICB9XG5cbiAgICBzZXRWb2x1bWUodm9sOiBudW1iZXIpIHtcbiAgICAgICAgdGhpcy50YXJnZXQudm9sdW1lID0gTWF0aC5tYXgoMCwgTWF0aC5taW4oMSwgdm9sIC8gMTAwKSk7XG4gICAgICAgIHRoaXMuYXJpYVZhbHVlID0gdGhpcy50YXJnZXQudm9sdW1lICogMTAwO1xuICAgIH1cblxuICAgIGdldFZvbHVtZSgpOiBudW1iZXIge1xuICAgICAgICByZXR1cm4gdGhpcy50YXJnZXQgPyB0aGlzLnRhcmdldC52b2x1bWUgOiAwO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_player_1 = require(\"./vg-player/vg-player\");\nvar vg_media_1 = require(\"./vg-media/vg-media\");\nvar vg_cue_points_1 = require(\"./vg-cue-points/vg-cue-points\");\nvar vg_api_1 = require(\"./services/vg-api\");\nvar vg_fullscreen_api_1 = require(\"./services/vg-fullscreen-api\");\nvar vg_utils_1 = require(\"./services/vg-utils\");\nvar vg_controls_hidden_1 = require(\"./services/vg-controls-hidden\");\n// components\n__export(require(\"./vg-player/vg-player\"));\n__export(require(\"./vg-media/vg-media\"));\n__export(require(\"./vg-cue-points/vg-cue-points\"));\n// services\n__export(require(\"./services/vg-api\"));\n__export(require(\"./services/vg-fullscreen-api\"));\n__export(require(\"./services/vg-utils\"));\n__export(require(\"./services/vg-controls-hidden\"));\n// types\n__export(require(\"./events/vg-events\"));\n__export(require(\"./states/vg-states\"));\n// utility classes\n__export(require(\"./vg-media/vg-media-element\"));\n/**\n * @internal\n */\nfunction coreDirectives() {\n return [\n vg_player_1.VgPlayer, vg_media_1.VgMedia, vg_cue_points_1.VgCuePoints\n ];\n}\nexports.coreDirectives = coreDirectives;\nfunction coreServices() {\n return [\n vg_api_1.VgAPI, vg_fullscreen_api_1.VgFullscreenAPI, vg_utils_1.VgUtils, vg_controls_hidden_1.VgControlsHidden\n ];\n}\nexports.coreServices = coreServices;\nvar VgCoreModule = (function () {\n function VgCoreModule() {\n }\n VgCoreModule.decorators = [\n { type: core_1.NgModule, args: [{\n declarations: coreDirectives(),\n exports: coreDirectives(),\n providers: coreServices()\n },] },\n ];\n return VgCoreModule;\n}());\nexports.VgCoreModule = VgCoreModule;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvcmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzQ0FBbUQ7QUFDbkQsbURBQWlEO0FBQ2pELGdEQUE4QztBQUM5QywrREFBNEQ7QUFDNUQsNENBQTBDO0FBQzFDLGtFQUErRDtBQUMvRCxnREFBOEM7QUFDOUMsb0VBQWlFO0FBR2pFLGFBQWE7QUFDYiwyQ0FBc0M7QUFDdEMseUNBQW9DO0FBQ3BDLG1EQUE4QztBQUU5QyxXQUFXO0FBQ1gsdUNBQWtDO0FBQ2xDLGtEQUE2QztBQUM3Qyx5Q0FBb0M7QUFDcEMsbURBQThDO0FBRTlDLFFBQVE7QUFDUix3Q0FBbUM7QUFDbkMsd0NBQW1DO0FBS25DLGtCQUFrQjtBQUNsQixpREFBNEM7Ozs7QUFjNUM7SUFDSSxNQUFNLENBQUM7UUFDSCxvQkFBUSxFQUFFLGtCQUFPLEVBQUUsMkJBQVc7S0FDakMsQ0FBQztDQUNMO0FBSkQsd0NBSUM7QUFFRDtJQUNJLE1BQU0sQ0FBQztRQUNILGNBQUssRUFBRSxtQ0FBZSxFQUFFLGtCQUFPLEVBQUUscUNBQWdCO0tBQ3BELENBQUM7Q0FDTDtBQUpELG9DQUlDOzs7OztnQkFFQSxlQUFRLFNBQUM7b0JBQ04sWUFBWSxFQUFFLGNBQWMsRUFBRTtvQkFDOUIsT0FBTyxFQUFFLGNBQWMsRUFBRTtvQkFDekIsU0FBUyxFQUFFLFlBQVksRUFBRTtpQkFDNUI7O3VCQTNERDs7QUE0RGEsb0NBQVkiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSwgUHJvdmlkZXIgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IFZnUGxheWVyIH0gZnJvbSAnLi92Zy1wbGF5ZXIvdmctcGxheWVyJztcbmltcG9ydCB7IFZnTWVkaWEgfSBmcm9tICcuL3ZnLW1lZGlhL3ZnLW1lZGlhJztcbmltcG9ydCB7IFZnQ3VlUG9pbnRzIH0gZnJvbSAnLi92Zy1jdWUtcG9pbnRzL3ZnLWN1ZS1wb2ludHMnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBWZ0Z1bGxzY3JlZW5BUEkgfSBmcm9tICcuL3NlcnZpY2VzL3ZnLWZ1bGxzY3JlZW4tYXBpJztcbmltcG9ydCB7IFZnVXRpbHMgfSBmcm9tICcuL3NlcnZpY2VzL3ZnLXV0aWxzJztcbmltcG9ydCB7IFZnQ29udHJvbHNIaWRkZW4gfSBmcm9tICcuL3NlcnZpY2VzL3ZnLWNvbnRyb2xzLWhpZGRlbic7XG5cblxuLy8gY29tcG9uZW50c1xuZXhwb3J0ICogZnJvbSAnLi92Zy1wbGF5ZXIvdmctcGxheWVyJztcbmV4cG9ydCAqIGZyb20gJy4vdmctbWVkaWEvdmctbWVkaWEnO1xuZXhwb3J0ICogZnJvbSAnLi92Zy1jdWUtcG9pbnRzL3ZnLWN1ZS1wb2ludHMnO1xuXG4vLyBzZXJ2aWNlc1xuZXhwb3J0ICogZnJvbSAnLi9zZXJ2aWNlcy92Zy1hcGknO1xuZXhwb3J0ICogZnJvbSAnLi9zZXJ2aWNlcy92Zy1mdWxsc2NyZWVuLWFwaSc7XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2VzL3ZnLXV0aWxzJztcbmV4cG9ydCAqIGZyb20gJy4vc2VydmljZXMvdmctY29udHJvbHMtaGlkZGVuJztcblxuLy8gdHlwZXNcbmV4cG9ydCAqIGZyb20gJy4vZXZlbnRzL3ZnLWV2ZW50cyc7XG5leHBvcnQgKiBmcm9tICcuL3N0YXRlcy92Zy1zdGF0ZXMnO1xuXG4vLyBpbnRlcmZhY2VzXG5leHBvcnQgKiBmcm9tICcuL3ZnLW1lZGlhL2ktbWVkaWEtZWxlbWVudCc7XG5cbi8vIHV0aWxpdHkgY2xhc3Nlc1xuZXhwb3J0ICogZnJvbSAnLi92Zy1tZWRpYS92Zy1tZWRpYS1lbGVtZW50JztcblxuZXhwb3J0IGludGVyZmFjZSBCaXRyYXRlT3B0aW9uIHtcbiAgICBxdWFsaXR5SW5kZXg6IG51bWJlcjtcbiAgICB3aWR0aDogbnVtYmVyO1xuICAgIGhlaWdodDogbnVtYmVyO1xuICAgIGJpdHJhdGU6IG51bWJlcjtcbiAgICBtZWRpYVR5cGU6IHN0cmluZztcbiAgICBsYWJlbD86IHN0cmluZztcbn1cblxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNvcmVEaXJlY3RpdmVzKCkge1xuICAgIHJldHVybiBbXG4gICAgICAgIFZnUGxheWVyLCBWZ01lZGlhLCBWZ0N1ZVBvaW50c1xuICAgIF07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBjb3JlU2VydmljZXMoKTogUHJvdmlkZXJbXSB7XG4gICAgcmV0dXJuIFtcbiAgICAgICAgVmdBUEksIFZnRnVsbHNjcmVlbkFQSSwgVmdVdGlscywgVmdDb250cm9sc0hpZGRlblxuICAgIF07XG59XG5cbkBOZ01vZHVsZSh7XG4gICAgZGVjbGFyYXRpb25zOiBjb3JlRGlyZWN0aXZlcygpLFxuICAgIGV4cG9ydHM6IGNvcmVEaXJlY3RpdmVzKCksXG4gICAgcHJvdmlkZXJzOiBjb3JlU2VydmljZXMoKVxufSlcbmV4cG9ydCBjbGFzcyBWZ0NvcmVNb2R1bGUge1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar VgEvents = (function () {\n function VgEvents() {\n }\n VgEvents.VG_ABORT = 'abort';\n VgEvents.VG_CAN_PLAY = 'canplay';\n VgEvents.VG_CAN_PLAY_THROUGH = 'canplaythrough';\n VgEvents.VG_DURATION_CHANGE = 'durationchange';\n VgEvents.VG_EMPTIED = 'emptied';\n VgEvents.VG_ENCRYPTED = 'encrypted';\n VgEvents.VG_ENDED = 'ended';\n VgEvents.VG_ERROR = 'error';\n VgEvents.VG_LOADED_DATA = 'loadeddata';\n VgEvents.VG_LOADED_METADATA = 'loadedmetadata';\n VgEvents.VG_LOAD_START = 'loadstart';\n VgEvents.VG_PAUSE = 'pause';\n VgEvents.VG_PLAY = 'play';\n VgEvents.VG_PLAYING = 'playing';\n VgEvents.VG_PROGRESS = 'progress';\n VgEvents.VG_RATE_CHANGE = 'ratechange';\n VgEvents.VG_SEEK = 'seek';\n VgEvents.VG_SEEKED = 'seeked';\n VgEvents.VG_SEEKING = 'seeking';\n VgEvents.VG_STALLED = 'stalled';\n VgEvents.VG_SUSPEND = 'suspend';\n VgEvents.VG_TIME_UPDATE = 'timeupdate';\n VgEvents.VG_VOLUME_CHANGE = 'volumechange';\n VgEvents.VG_WAITING = 'waiting';\n VgEvents.VG_LOAD = 'load';\n VgEvents.VG_ENTER = 'enter';\n VgEvents.VG_EXIT = 'exit';\n VgEvents.VG_START_ADS = 'startads';\n VgEvents.VG_END_ADS = 'endads';\n VgEvents.decorators = [\n { type: core_1.Injectable },\n ];\n return VgEvents;\n}());\nexports.VgEvents = VgEvents;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctZXZlbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctZXZlbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQXlDOzs7O3dCQUlYLE9BQU87MkJBQ0osU0FBUzttQ0FDRCxnQkFBZ0I7a0NBQ2pCLGdCQUFnQjswQkFDeEIsU0FBUzs0QkFDUCxXQUFXO3dCQUNmLE9BQU87d0JBQ1AsT0FBTzs4QkFDRCxZQUFZO2tDQUNSLGdCQUFnQjs2QkFDckIsV0FBVzt3QkFDaEIsT0FBTzt1QkFDUixNQUFNOzBCQUNILFNBQVM7MkJBQ1IsVUFBVTs4QkFDUCxZQUFZO3VCQUNuQixNQUFNO3lCQUNKLFFBQVE7MEJBQ1AsU0FBUzswQkFDVCxTQUFTOzBCQUNULFNBQVM7OEJBQ0wsWUFBWTtnQ0FDVixjQUFjOzBCQUNwQixTQUFTO3VCQUVaLE1BQU07d0JBQ0wsT0FBTzt1QkFDUixNQUFNOzRCQUVELFVBQVU7MEJBQ1osUUFBUTs7Z0JBaEN2QyxpQkFBVTs7bUJBRlg7O0FBR2EsNEJBQVEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0luamVjdGFibGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgVmdFdmVudHMge1xuICAgIHN0YXRpYyBWR19BQk9SVDogc3RyaW5nID0gJ2Fib3J0JztcbiAgICBzdGF0aWMgVkdfQ0FOX1BMQVk6IHN0cmluZyA9ICdjYW5wbGF5JztcbiAgICBzdGF0aWMgVkdfQ0FOX1BMQVlfVEhST1VHSDogc3RyaW5nID0gJ2NhbnBsYXl0aHJvdWdoJztcbiAgICBzdGF0aWMgVkdfRFVSQVRJT05fQ0hBTkdFOiBzdHJpbmcgPSAnZHVyYXRpb25jaGFuZ2UnO1xuICAgIHN0YXRpYyBWR19FTVBUSUVEOiBzdHJpbmcgPSAnZW1wdGllZCc7XG4gICAgc3RhdGljIFZHX0VOQ1JZUFRFRDogc3RyaW5nID0gJ2VuY3J5cHRlZCc7XG4gICAgc3RhdGljIFZHX0VOREVEOiBzdHJpbmcgPSAnZW5kZWQnO1xuICAgIHN0YXRpYyBWR19FUlJPUjogc3RyaW5nID0gJ2Vycm9yJztcbiAgICBzdGF0aWMgVkdfTE9BREVEX0RBVEE6IHN0cmluZyA9ICdsb2FkZWRkYXRhJztcbiAgICBzdGF0aWMgVkdfTE9BREVEX01FVEFEQVRBOiBzdHJpbmcgPSAnbG9hZGVkbWV0YWRhdGEnO1xuICAgIHN0YXRpYyBWR19MT0FEX1NUQVJUOiBzdHJpbmcgPSAnbG9hZHN0YXJ0JztcbiAgICBzdGF0aWMgVkdfUEFVU0U6IHN0cmluZyA9ICdwYXVzZSc7XG4gICAgc3RhdGljIFZHX1BMQVk6IHN0cmluZyA9ICdwbGF5JztcbiAgICBzdGF0aWMgVkdfUExBWUlORzogc3RyaW5nID0gJ3BsYXlpbmcnO1xuICAgIHN0YXRpYyBWR19QUk9HUkVTUzogc3RyaW5nID0gJ3Byb2dyZXNzJztcbiAgICBzdGF0aWMgVkdfUkFURV9DSEFOR0U6IHN0cmluZyA9ICdyYXRlY2hhbmdlJztcbiAgICBzdGF0aWMgVkdfU0VFSzogc3RyaW5nID0gJ3NlZWsnO1xuICAgIHN0YXRpYyBWR19TRUVLRUQ6IHN0cmluZyA9ICdzZWVrZWQnO1xuICAgIHN0YXRpYyBWR19TRUVLSU5HOiBzdHJpbmcgPSAnc2Vla2luZyc7XG4gICAgc3RhdGljIFZHX1NUQUxMRUQ6IHN0cmluZyA9ICdzdGFsbGVkJztcbiAgICBzdGF0aWMgVkdfU1VTUEVORDogc3RyaW5nID0gJ3N1c3BlbmQnO1xuICAgIHN0YXRpYyBWR19USU1FX1VQREFURTogc3RyaW5nID0gJ3RpbWV1cGRhdGUnO1xuICAgIHN0YXRpYyBWR19WT0xVTUVfQ0hBTkdFOiBzdHJpbmcgPSAndm9sdW1lY2hhbmdlJztcbiAgICBzdGF0aWMgVkdfV0FJVElORzogc3RyaW5nID0gJ3dhaXRpbmcnO1xuICAgIFxuICAgIHN0YXRpYyBWR19MT0FEOiBzdHJpbmcgPSAnbG9hZCc7XG4gICAgc3RhdGljIFZHX0VOVEVSOiBzdHJpbmcgPSAnZW50ZXInO1xuICAgIHN0YXRpYyBWR19FWElUOiBzdHJpbmcgPSAnZXhpdCc7XG5cbiAgICBzdGF0aWMgVkdfU1RBUlRfQURTOiBzdHJpbmcgPSAnc3RhcnRhZHMnO1xuICAgIHN0YXRpYyBWR19FTkRfQURTOiBzdHJpbmcgPSAnZW5kYWRzJztcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_states_1 = require(\"../states/vg-states\");\nvar VgAPI = (function () {\n function VgAPI() {\n this.medias = {};\n this.playerReadyEvent = new core_1.EventEmitter(true);\n this.isPlayerReady = false;\n }\n VgAPI.prototype.onPlayerReady = function (fsAPI) {\n this.fsAPI = fsAPI;\n this.isPlayerReady = true;\n this.playerReadyEvent.emit(this);\n };\n VgAPI.prototype.getDefaultMedia = function () {\n for (var item in this.medias) {\n if (this.medias[item]) {\n return this.medias[item];\n }\n }\n };\n VgAPI.prototype.getMasterMedia = function () {\n var master;\n for (var id in this.medias) {\n if (this.medias[id].vgMedia === 'true' || this.medias[id].vgMedia === true) {\n master = this.medias[id];\n break;\n }\n }\n return master || this.getDefaultMedia();\n };\n VgAPI.prototype.isMasterDefined = function () {\n var result = false;\n for (var id in this.medias) {\n if (this.medias[id].vgMedia === 'true' || this.medias[id].vgMedia === true) {\n result = true;\n break;\n }\n }\n return result;\n };\n VgAPI.prototype.getMediaById = function (id) {\n if (id === void 0) { id = null; }\n var media = this.medias[id];\n if (!id || id === '*') {\n media = this;\n }\n return media;\n };\n VgAPI.prototype.play = function () {\n for (var id in this.medias) {\n if (this.medias[id]) {\n this.medias[id].play();\n }\n }\n };\n VgAPI.prototype.pause = function () {\n for (var id in this.medias) {\n if (this.medias[id]) {\n this.medias[id].pause();\n }\n }\n };\n Object.defineProperty(VgAPI.prototype, \"duration\", {\n get: function () {\n return this.$$getAllProperties('duration');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"currentTime\", {\n get: function () {\n return this.$$getAllProperties('currentTime');\n },\n set: function (seconds) {\n this.$$setAllProperties('currentTime', seconds);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"state\", {\n get: function () {\n return this.$$getAllProperties('state');\n },\n set: function (state) {\n this.$$setAllProperties('state', state);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"volume\", {\n get: function () {\n return this.$$getAllProperties('volume');\n },\n set: function (volume) {\n this.$$setAllProperties('volume', volume);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"playbackRate\", {\n get: function () {\n return this.$$getAllProperties('playbackRate');\n },\n set: function (rate) {\n this.$$setAllProperties('playbackRate', rate);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"canPlay\", {\n get: function () {\n return this.$$getAllProperties('canPlay');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"canPlayThrough\", {\n get: function () {\n return this.$$getAllProperties('canPlayThrough');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"isMetadataLoaded\", {\n get: function () {\n return this.$$getAllProperties('isMetadataLoaded');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"isWaiting\", {\n get: function () {\n return this.$$getAllProperties('isWaiting');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"isCompleted\", {\n get: function () {\n return this.$$getAllProperties('isCompleted');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"isLive\", {\n get: function () {\n return this.$$getAllProperties('isLive');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"isMaster\", {\n get: function () {\n return this.$$getAllProperties('isMaster');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"time\", {\n get: function () {\n return this.$$getAllProperties('time');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"buffer\", {\n get: function () {\n return this.$$getAllProperties('buffer');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"buffered\", {\n get: function () {\n return this.$$getAllProperties('buffered');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"subscriptions\", {\n get: function () {\n return this.$$getAllProperties('subscriptions');\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgAPI.prototype, \"textTracks\", {\n get: function () {\n return this.$$getAllProperties('textTracks');\n },\n enumerable: true,\n configurable: true\n });\n VgAPI.prototype.seekTime = function (value, byPercent) {\n if (byPercent === void 0) { byPercent = false; }\n for (var id in this.medias) {\n if (this.medias[id]) {\n this.$$seek(this.medias[id], value, byPercent);\n }\n }\n };\n VgAPI.prototype.$$seek = function (media, value, byPercent) {\n if (byPercent === void 0) { byPercent = false; }\n var second;\n var duration = media.duration;\n if (byPercent) {\n if (this.isMasterDefined()) {\n duration = this.getMasterMedia().duration;\n }\n second = value * duration / 100;\n }\n else {\n second = value;\n }\n media.currentTime = second;\n };\n VgAPI.prototype.addTextTrack = function (type, label, language) {\n for (var id in this.medias) {\n if (this.medias[id]) {\n this.$$addTextTrack(this.medias[id], type, label, language);\n }\n }\n };\n VgAPI.prototype.$$addTextTrack = function (media, type, label, language) {\n media.addTextTrack(type, label, language);\n };\n VgAPI.prototype.$$getAllProperties = function (property) {\n var medias = {};\n var result;\n for (var id in this.medias) {\n if (this.medias[id]) {\n medias[id] = this.medias[id];\n }\n }\n var nMedias = Object.keys(medias).length;\n switch (nMedias) {\n case 0:\n // Return default values until vgMedia is initialized\n switch (property) {\n case 'state':\n result = vg_states_1.VgStates.VG_PAUSED;\n break;\n case 'playbackRate':\n case 'volume':\n result = 1;\n break;\n case 'time':\n result = { current: 0, total: 0, left: 0 };\n break;\n }\n break;\n case 1:\n // If there's only one media element then return the plain value\n var firstMediaId = Object.keys(medias)[0];\n result = medias[firstMediaId][property];\n break;\n default:\n // TODO: return 'master' value\n var master = this.getMasterMedia();\n result = medias[master.id][property];\n }\n return result;\n };\n VgAPI.prototype.$$setAllProperties = function (property, value) {\n for (var id in this.medias) {\n if (this.medias[id]) {\n this.medias[id][property] = value;\n }\n }\n };\n VgAPI.prototype.registerElement = function (elem) {\n this.videogularElement = elem;\n };\n VgAPI.prototype.registerMedia = function (media) {\n this.medias[media.id] = media;\n };\n VgAPI.prototype.unregisterMedia = function (media) {\n delete this.medias[media.id];\n };\n VgAPI.decorators = [\n { type: core_1.Injectable },\n ];\n /** @nocollapse */\n VgAPI.ctorParameters = function () { return []; };\n return VgAPI;\n}());\nexports.VgAPI = VgAPI;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQXVEO0FBRXZELGlEQUE2Qzs7SUFXekM7c0JBTmdCLEVBQUU7Z0NBRW9CLElBQUksbUJBQVksQ0FBQyxJQUFJLENBQUM7NkJBQ25DLEtBQUs7S0FLN0I7SUFFRCw2QkFBYSxHQUFiLFVBQWMsS0FBc0I7UUFDaEMsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7UUFDbkIsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLENBQUM7UUFDMUIsSUFBSSxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUNwQztJQUVELCtCQUFlLEdBQWY7UUFDSSxHQUFHLENBQUMsQ0FBQyxJQUFJLElBQUksSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUMzQixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDcEIsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDNUI7U0FDSjtLQUNKO0lBRUQsOEJBQWMsR0FBZDtRQUNJLElBQUksTUFBVSxDQUFDO1FBQ2YsR0FBRyxDQUFDLENBQUMsSUFBSSxFQUFFLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDekIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxPQUFPLEtBQUssTUFBTSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUM7Z0JBQ3pFLE1BQU0sR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDO2dCQUN6QixLQUFLLENBQUM7YUFDVDtTQUNKO1FBQ0QsTUFBTSxDQUFDLE1BQU0sSUFBSSxJQUFJLENBQUMsZUFBZSxFQUFFLENBQUM7S0FDM0M7SUFFRCwrQkFBZSxHQUFmO1FBQ0ksSUFBSSxNQUFNLEdBQUcsS0FBSyxDQUFDO1FBQ25CLEdBQUcsQ0FBQyxDQUFDLElBQUksRUFBRSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsT0FBTyxLQUFLLE1BQU0sSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sS0FBSyxJQUFJLENBQUMsQ0FBQyxDQUFDO2dCQUN6RSxNQUFNLEdBQUcsSUFBSSxDQUFDO2dCQUNkLEtBQUssQ0FBQzthQUNUO1NBQ0o7UUFDRCxNQUFNLENBQUMsTUFBTSxDQUFDO0tBQ2pCO0lBRUQsNEJBQVksR0FBWixVQUFhLEVBQWdCO1FBQWhCLG1CQUFBLEVBQUEsU0FBZ0I7UUFDekIsSUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQztRQUU1QixFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsSUFBSSxFQUFFLEtBQUssR0FBRyxDQUFDLENBQUMsQ0FBQztZQUNwQixLQUFLLEdBQUcsSUFBSSxDQUFDO1NBQ2hCO1FBRUQsTUFBTSxDQUFDLEtBQUssQ0FBQztLQUNoQjtJQUVELG9CQUFJLEdBQUo7UUFDSSxHQUFHLENBQUMsQ0FBQyxJQUFJLEVBQUUsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUN6QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDbEIsSUFBSSxDQUFDLE1BQU0sQ0FBRSxFQUFFLENBQUUsQ0FBQyxJQUFJLEVBQUUsQ0FBQzthQUM1QjtTQUNKO0tBQ0o7SUFFRCxxQkFBSyxHQUFMO1FBQ0ksR0FBRyxDQUFDLENBQUMsSUFBSSxFQUFFLElBQUksSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7WUFDekIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7Z0JBQ2xCLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUM7YUFDM0I7U0FDSjtLQUNKO0lBRUQsc0JBQUksMkJBQVE7YUFBWjtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsVUFBVSxDQUFDLENBQUM7U0FDOUM7OztPQUFBO0lBRUQsc0JBQUksOEJBQVc7YUFJZjtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsYUFBYSxDQUFDLENBQUM7U0FDakQ7YUFORCxVQUFnQixPQUFPO1lBQ25CLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxhQUFhLEVBQUUsT0FBTyxDQUFDLENBQUM7U0FDbkQ7OztPQUFBO0lBTUQsc0JBQUksd0JBQUs7YUFJVDtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsT0FBTyxDQUFDLENBQUM7U0FDM0M7YUFORCxVQUFVLEtBQUs7WUFDWCxJQUFJLENBQUMsa0JBQWtCLENBQUMsT0FBTyxFQUFFLEtBQUssQ0FBQyxDQUFDO1NBQzNDOzs7T0FBQTtJQU1ELHNCQUFJLHlCQUFNO2FBSVY7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxDQUFDO1NBQzVDO2FBTkQsVUFBVyxNQUFNO1lBQ2IsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsRUFBRSxNQUFNLENBQUMsQ0FBQztTQUM3Qzs7O09BQUE7SUFNRCxzQkFBSSwrQkFBWTthQUloQjtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsY0FBYyxDQUFDLENBQUM7U0FDbEQ7YUFORCxVQUFpQixJQUFJO1lBQ2pCLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxjQUFjLEVBQUUsSUFBSSxDQUFDLENBQUM7U0FDakQ7OztPQUFBO0lBTUQsc0JBQUksMEJBQU87YUFBWDtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsU0FBUyxDQUFDLENBQUM7U0FDN0M7OztPQUFBO0lBRUQsc0JBQUksaUNBQWM7YUFBbEI7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLGdCQUFnQixDQUFDLENBQUM7U0FDcEQ7OztPQUFBO0lBRUQsc0JBQUksbUNBQWdCO2FBQXBCO1lBQ0ksTUFBTSxDQUFDLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO1NBQ3REOzs7T0FBQTtJQUVELHNCQUFJLDRCQUFTO2FBQWI7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFdBQVcsQ0FBQyxDQUFDO1NBQy9DOzs7T0FBQTtJQUVELHNCQUFJLDhCQUFXO2FBQWY7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLGFBQWEsQ0FBQyxDQUFDO1NBQ2pEOzs7T0FBQTtJQUVELHNCQUFJLHlCQUFNO2FBQVY7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxDQUFDO1NBQzVDOzs7T0FBQTtJQUVELHNCQUFJLDJCQUFRO2FBQVo7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFVBQVUsQ0FBQyxDQUFDO1NBQzlDOzs7T0FBQTtJQUVELHNCQUFJLHVCQUFJO2FBQVI7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLE1BQU0sQ0FBQyxDQUFDO1NBQzFDOzs7T0FBQTtJQUVELHNCQUFJLHlCQUFNO2FBQVY7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFFBQVEsQ0FBQyxDQUFDO1NBQzVDOzs7T0FBQTtJQUVELHNCQUFJLDJCQUFRO2FBQVo7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLFVBQVUsQ0FBQyxDQUFDO1NBQzlDOzs7T0FBQTtJQUVELHNCQUFJLGdDQUFhO2FBQWpCO1lBQ0ksTUFBTSxDQUFDLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsQ0FBQztTQUNuRDs7O09BQUE7SUFFRCxzQkFBSSw2QkFBVTthQUFkO1lBQ0ksTUFBTSxDQUFDLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxZQUFZLENBQUMsQ0FBQztTQUNoRDs7O09BQUE7SUFFRCx3QkFBUSxHQUFSLFVBQVMsS0FBWSxFQUFFLFNBQXlCO1FBQXpCLDBCQUFBLEVBQUEsaUJBQXlCO1FBQzVDLEdBQUcsQ0FBQyxDQUFDLElBQUksRUFBRSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUNsQixJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUUsRUFBRSxDQUFFLEVBQUUsS0FBSyxFQUFFLFNBQVMsQ0FBQyxDQUFDO2FBQ3BEO1NBQ0o7S0FDSjtJQUVELHNCQUFNLEdBQU4sVUFBTyxLQUFlLEVBQUUsS0FBWSxFQUFFLFNBQXlCO1FBQXpCLDBCQUFBLEVBQUEsaUJBQXlCO1FBQzNELElBQUksTUFBYSxDQUFDO1FBQ2xCLElBQUksUUFBUSxHQUFVLEtBQUssQ0FBQyxRQUFRLENBQUM7UUFFckMsRUFBRSxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztZQUNaLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxlQUFlLEVBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQ3pCLFFBQVEsR0FBRyxJQUFJLENBQUMsY0FBYyxFQUFFLENBQUMsUUFBUSxDQUFDO2FBQzdDO1lBRUQsTUFBTSxHQUFHLEtBQUssR0FBRyxRQUFRLEdBQUcsR0FBRyxDQUFDO1NBQ25DO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixNQUFNLEdBQUcsS0FBSyxDQUFDO1NBQ2xCO1FBRUQsS0FBSyxDQUFDLFdBQVcsR0FBRyxNQUFNLENBQUM7S0FDOUI7SUFFRCw0QkFBWSxHQUFaLFVBQWEsSUFBVyxFQUFFLEtBQWEsRUFBRSxRQUFnQjtRQUNyRCxHQUFHLENBQUMsQ0FBQyxJQUFJLEVBQUUsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUN6QixFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDbEIsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFFLEVBQUUsQ0FBRSxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsUUFBUSxDQUFDLENBQUM7YUFDakU7U0FDSjtLQUNKO0lBQ0QsOEJBQWMsR0FBZCxVQUFlLEtBQWUsRUFBRSxJQUFXLEVBQUUsS0FBYSxFQUFFLFFBQWdCO1FBQ3hFLEtBQUssQ0FBQyxZQUFZLENBQUMsSUFBSSxFQUFFLEtBQUssRUFBRSxRQUFRLENBQUMsQ0FBQztLQUM3QztJQUVELGtDQUFrQixHQUFsQixVQUFtQixRQUFlO1FBQzlCLElBQU0sTUFBTSxHQUFHLEVBQUUsQ0FBQztRQUNsQixJQUFJLE1BQVUsQ0FBQztRQUVmLEdBQUcsQ0FBQyxDQUFDLElBQUksRUFBRSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUNsQixNQUFNLENBQUUsRUFBRSxDQUFFLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBRSxFQUFFLENBQUUsQ0FBQzthQUNwQztTQUNKO1FBRUQsSUFBTSxPQUFPLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxNQUFNLENBQUM7UUFDM0MsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztZQUNkLEtBQUssQ0FBQzs7Z0JBRUYsTUFBTSxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztvQkFDZixLQUFLLE9BQU87d0JBQ1IsTUFBTSxHQUFHLG9CQUFRLENBQUMsU0FBUyxDQUFDO3dCQUM1QixLQUFLLENBQUM7b0JBRVYsS0FBSyxjQUFjLENBQUM7b0JBQ3BCLEtBQUssUUFBUTt3QkFDVCxNQUFNLEdBQUcsQ0FBQyxDQUFDO3dCQUNYLEtBQUssQ0FBQztvQkFFVixLQUFLLE1BQU07d0JBQ1AsTUFBTSxHQUFHLEVBQUMsT0FBTyxFQUFFLENBQUMsRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUMsQ0FBQzt3QkFDekMsS0FBSyxDQUFDO2lCQUNiO2dCQUNELEtBQUssQ0FBQztZQUVWLEtBQUssQ0FBQzs7Z0JBRUYsSUFBTSxZQUFZLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztnQkFDNUMsTUFBTSxHQUFHLE1BQU0sQ0FBQyxZQUFZLENBQUMsQ0FBQyxRQUFRLENBQUMsQ0FBQztnQkFDeEMsS0FBSyxDQUFDO1lBRVY7O2dCQUVJLElBQUksTUFBTSxHQUFHLElBQUksQ0FBQyxjQUFjLEVBQUUsQ0FBQztnQkFDbkMsTUFBTSxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUM7U0FDNUM7UUFFRCxNQUFNLENBQUMsTUFBTSxDQUFDO0tBQ2pCO0lBRUQsa0NBQWtCLEdBQWxCLFVBQW1CLFFBQWUsRUFBRSxLQUFTO1FBQ3pDLEdBQUcsQ0FBQyxDQUFDLElBQUksRUFBRSxJQUFJLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ3pCLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUNsQixJQUFJLENBQUMsTUFBTSxDQUFFLEVBQUUsQ0FBRSxDQUFFLFFBQVEsQ0FBRSxHQUFHLEtBQUssQ0FBQzthQUN6QztTQUNKO0tBQ0o7SUFFRCwrQkFBZSxHQUFmLFVBQWdCLElBQWdCO1FBQzVCLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLENBQUM7S0FDakM7SUFFRCw2QkFBYSxHQUFiLFVBQWMsS0FBZTtRQUN6QixJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUM7S0FDakM7SUFFRCwrQkFBZSxHQUFmLFVBQWdCLEtBQWU7UUFDM0IsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQztLQUNoQzs7Z0JBbFFKLGlCQUFVOzs7O2dCQUxYOztBQU1hLHNCQUFLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtJbmplY3RhYmxlLCBFdmVudEVtaXR0ZXJ9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHtJUGxheWFibGV9IGZyb20gXCIuLi92Zy1tZWRpYS9pLXBsYXlhYmxlXCI7XG5pbXBvcnQge1ZnU3RhdGVzfSBmcm9tIFwiLi4vc3RhdGVzL3ZnLXN0YXRlc1wiO1xuaW1wb3J0IHsgVmdGdWxsc2NyZWVuQVBJIH0gZnJvbSAnLi92Zy1mdWxsc2NyZWVuLWFwaSc7XG5cbkBJbmplY3RhYmxlKClcbmV4cG9ydCBjbGFzcyBWZ0FQSSB7XG4gICAgbWVkaWFzOk9iamVjdCA9IHt9Oy8vIFRPRE86IHJlZmFjdG9yIHRvIFNldDxJUGxheWFibGU+IFxuICAgIHZpZGVvZ3VsYXJFbGVtZW50OiBhbnk7XG4gICAgcGxheWVyUmVhZHlFdmVudDogRXZlbnRFbWl0dGVyPGFueT4gPSBuZXcgRXZlbnRFbWl0dGVyKHRydWUpO1xuICAgIGlzUGxheWVyUmVhZHk6IGJvb2xlYW4gPSBmYWxzZTtcbiAgICBmc0FQSTogVmdGdWxsc2NyZWVuQVBJO1xuXG4gICAgY29uc3RydWN0b3IoKSB7XG5cbiAgICB9XG5cbiAgICBvblBsYXllclJlYWR5KGZzQVBJOiBWZ0Z1bGxzY3JlZW5BUEkpIHtcbiAgICAgICAgdGhpcy5mc0FQSSA9IGZzQVBJO1xuICAgICAgICB0aGlzLmlzUGxheWVyUmVhZHkgPSB0cnVlO1xuICAgICAgICB0aGlzLnBsYXllclJlYWR5RXZlbnQuZW1pdCh0aGlzKTtcbiAgICB9XG5cbiAgICBnZXREZWZhdWx0TWVkaWEoKTpJUGxheWFibGUge1xuICAgICAgICBmb3IgKGxldCBpdGVtIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaXRlbV0pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5tZWRpYXNbaXRlbV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRNYXN0ZXJNZWRpYSgpOklQbGF5YWJsZSB7XG4gICAgICAgIGxldCBtYXN0ZXI6YW55O1xuICAgICAgICBmb3IgKGxldCBpZCBpbiB0aGlzLm1lZGlhcykge1xuICAgICAgICAgICAgaWYgKHRoaXMubWVkaWFzW2lkXS52Z01lZGlhID09PSAndHJ1ZScgfHwgdGhpcy5tZWRpYXNbaWRdLnZnTWVkaWEgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBtYXN0ZXIgPSB0aGlzLm1lZGlhc1tpZF07XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1hc3RlciB8fCB0aGlzLmdldERlZmF1bHRNZWRpYSgpO1xuICAgIH1cblxuICAgIGlzTWFzdGVyRGVmaW5lZCgpOmJvb2xlYW4ge1xuICAgICAgICBsZXQgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgIGZvciAobGV0IGlkIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaWRdLnZnTWVkaWEgPT09ICd0cnVlJyB8fCB0aGlzLm1lZGlhc1tpZF0udmdNZWRpYSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICBnZXRNZWRpYUJ5SWQoaWQ6c3RyaW5nID0gbnVsbCk6SVBsYXlhYmxlIHtcbiAgICAgICAgbGV0IG1lZGlhID0gdGhpcy5tZWRpYXNbaWRdO1xuXG4gICAgICAgIGlmICghaWQgfHwgaWQgPT09ICcqJykge1xuICAgICAgICAgICAgbWVkaWEgPSB0aGlzO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG1lZGlhO1xuICAgIH1cblxuICAgIHBsYXkoKSB7XG4gICAgICAgIGZvciAobGV0IGlkIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaWRdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5tZWRpYXNbIGlkIF0ucGxheSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcGF1c2UoKSB7XG4gICAgICAgIGZvciAobGV0IGlkIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaWRdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5tZWRpYXNbaWRdLnBhdXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXQgZHVyYXRpb24oKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiQkZ2V0QWxsUHJvcGVydGllcygnZHVyYXRpb24nKTtcbiAgICB9XG5cbiAgICBzZXQgY3VycmVudFRpbWUoc2Vjb25kcykge1xuICAgICAgICB0aGlzLiQkc2V0QWxsUHJvcGVydGllcygnY3VycmVudFRpbWUnLCBzZWNvbmRzKTtcbiAgICB9XG5cbiAgICBnZXQgY3VycmVudFRpbWUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiQkZ2V0QWxsUHJvcGVydGllcygnY3VycmVudFRpbWUnKTtcbiAgICB9XG5cbiAgICBzZXQgc3RhdGUoc3RhdGUpIHtcbiAgICAgICAgdGhpcy4kJHNldEFsbFByb3BlcnRpZXMoJ3N0YXRlJywgc3RhdGUpO1xuICAgIH1cblxuICAgIGdldCBzdGF0ZSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCdzdGF0ZScpO1xuICAgIH1cblxuICAgIHNldCB2b2x1bWUodm9sdW1lKSB7XG4gICAgICAgIHRoaXMuJCRzZXRBbGxQcm9wZXJ0aWVzKCd2b2x1bWUnLCB2b2x1bWUpO1xuICAgIH1cblxuICAgIGdldCB2b2x1bWUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiQkZ2V0QWxsUHJvcGVydGllcygndm9sdW1lJyk7XG4gICAgfVxuXG4gICAgc2V0IHBsYXliYWNrUmF0ZShyYXRlKSB7XG4gICAgICAgIHRoaXMuJCRzZXRBbGxQcm9wZXJ0aWVzKCdwbGF5YmFja1JhdGUnLCByYXRlKTtcbiAgICB9XG5cbiAgICBnZXQgcGxheWJhY2tSYXRlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ3BsYXliYWNrUmF0ZScpO1xuICAgIH1cblxuICAgIGdldCBjYW5QbGF5KCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ2NhblBsYXknKTtcbiAgICB9XG5cbiAgICBnZXQgY2FuUGxheVRocm91Z2goKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiQkZ2V0QWxsUHJvcGVydGllcygnY2FuUGxheVRocm91Z2gnKTtcbiAgICB9XG5cbiAgICBnZXQgaXNNZXRhZGF0YUxvYWRlZCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCdpc01ldGFkYXRhTG9hZGVkJyk7XG4gICAgfVxuXG4gICAgZ2V0IGlzV2FpdGluZygpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCdpc1dhaXRpbmcnKTtcbiAgICB9XG5cbiAgICBnZXQgaXNDb21wbGV0ZWQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiQkZ2V0QWxsUHJvcGVydGllcygnaXNDb21wbGV0ZWQnKTtcbiAgICB9XG5cbiAgICBnZXQgaXNMaXZlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ2lzTGl2ZScpO1xuICAgIH1cblxuICAgIGdldCBpc01hc3RlcigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCdpc01hc3RlcicpO1xuICAgIH1cblxuICAgIGdldCB0aW1lKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ3RpbWUnKTtcbiAgICB9XG5cbiAgICBnZXQgYnVmZmVyKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ2J1ZmZlcicpO1xuICAgIH1cblxuICAgIGdldCBidWZmZXJlZCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCdidWZmZXJlZCcpO1xuICAgIH1cblxuICAgIGdldCBzdWJzY3JpcHRpb25zKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kJGdldEFsbFByb3BlcnRpZXMoJ3N1YnNjcmlwdGlvbnMnKTtcbiAgICB9XG5cbiAgICBnZXQgdGV4dFRyYWNrcygpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuJCRnZXRBbGxQcm9wZXJ0aWVzKCd0ZXh0VHJhY2tzJyk7XG4gICAgfVxuXG4gICAgc2Vla1RpbWUodmFsdWU6bnVtYmVyLCBieVBlcmNlbnQ6Ym9vbGVhbiA9IGZhbHNlKSB7XG4gICAgICAgIGZvciAobGV0IGlkIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaWRdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kJHNlZWsodGhpcy5tZWRpYXNbIGlkIF0sIHZhbHVlLCBieVBlcmNlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgJCRzZWVrKG1lZGlhOklQbGF5YWJsZSwgdmFsdWU6bnVtYmVyLCBieVBlcmNlbnQ6Ym9vbGVhbiA9IGZhbHNlKSB7XG4gICAgICAgIGxldCBzZWNvbmQ6bnVtYmVyO1xuICAgICAgICBsZXQgZHVyYXRpb246bnVtYmVyID0gbWVkaWEuZHVyYXRpb247XG5cbiAgICAgICAgaWYgKGJ5UGVyY2VudCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaXNNYXN0ZXJEZWZpbmVkKCkpIHtcbiAgICAgICAgICAgICAgICBkdXJhdGlvbiA9IHRoaXMuZ2V0TWFzdGVyTWVkaWEoKS5kdXJhdGlvbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2Vjb25kID0gdmFsdWUgKiBkdXJhdGlvbiAvIDEwMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHNlY29uZCA9IHZhbHVlO1xuICAgICAgICB9XG5cbiAgICAgICAgbWVkaWEuY3VycmVudFRpbWUgPSBzZWNvbmQ7XG4gICAgfVxuXG4gICAgYWRkVGV4dFRyYWNrKHR5cGU6c3RyaW5nLCBsYWJlbD86c3RyaW5nLCBsYW5ndWFnZT86c3RyaW5nKSB7XG4gICAgICAgIGZvciAobGV0IGlkIGluIHRoaXMubWVkaWFzKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5tZWRpYXNbaWRdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kJGFkZFRleHRUcmFjayh0aGlzLm1lZGlhc1sgaWQgXSwgdHlwZSwgbGFiZWwsIGxhbmd1YWdlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICAkJGFkZFRleHRUcmFjayhtZWRpYTpJUGxheWFibGUsIHR5cGU6c3RyaW5nLCBsYWJlbD86c3RyaW5nLCBsYW5ndWFnZT86c3RyaW5nKSB7XG4gICAgICAgIG1lZGlhLmFkZFRleHRUcmFjayh0eXBlLCBsYWJlbCwgbGFuZ3VhZ2UpO1xuICAgIH1cblxuICAgICQkZ2V0QWxsUHJvcGVydGllcyhwcm9wZXJ0eTpzdHJpbmcpe1xuICAgICAgICBjb25zdCBtZWRpYXMgPSB7fTtcbiAgICAgICAgbGV0IHJlc3VsdDphbnk7XG5cbiAgICAgICAgZm9yIChsZXQgaWQgaW4gdGhpcy5tZWRpYXMpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLm1lZGlhc1tpZF0pIHtcbiAgICAgICAgICAgICAgICBtZWRpYXNbIGlkIF0gPSB0aGlzLm1lZGlhc1sgaWQgXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IG5NZWRpYXMgPSBPYmplY3Qua2V5cyhtZWRpYXMpLmxlbmd0aDtcbiAgICAgICAgc3dpdGNoIChuTWVkaWFzKSB7XG4gICAgICAgICAgICBjYXNlIDA6XG4gICAgICAgICAgICAgICAgLy8gUmV0dXJuIGRlZmF1bHQgdmFsdWVzIHVudGlsIHZnTWVkaWEgaXMgaW5pdGlhbGl6ZWRcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHByb3BlcnR5KSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3N0YXRlJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IFZnU3RhdGVzLlZHX1BBVVNFRDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3BsYXliYWNrUmF0ZSc6XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ3ZvbHVtZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICAgICAgY2FzZSAndGltZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB7Y3VycmVudDogMCwgdG90YWw6IDAsIGxlZnQ6IDB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBvbmx5IG9uZSBtZWRpYSBlbGVtZW50IHRoZW4gcmV0dXJuIHRoZSBwbGFpbiB2YWx1ZVxuICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0TWVkaWFJZCA9IE9iamVjdC5rZXlzKG1lZGlhcylbMF07XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gbWVkaWFzW2ZpcnN0TWVkaWFJZF1bcHJvcGVydHldO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXR1cm4gJ21hc3RlcicgdmFsdWVcbiAgICAgICAgICAgICAgICBsZXQgbWFzdGVyID0gdGhpcy5nZXRNYXN0ZXJNZWRpYSgpO1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IG1lZGlhc1ttYXN0ZXIuaWRdW3Byb3BlcnR5XTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAkJHNldEFsbFByb3BlcnRpZXMocHJvcGVydHk6c3RyaW5nLCB2YWx1ZTphbnkpe1xuICAgICAgICBmb3IgKGxldCBpZCBpbiB0aGlzLm1lZGlhcykge1xuICAgICAgICAgICAgaWYgKHRoaXMubWVkaWFzW2lkXSkge1xuICAgICAgICAgICAgICAgIHRoaXMubWVkaWFzWyBpZCBdWyBwcm9wZXJ0eSBdID0gdmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZWdpc3RlckVsZW1lbnQoZWxlbTpIVE1MRWxlbWVudCkge1xuICAgICAgICB0aGlzLnZpZGVvZ3VsYXJFbGVtZW50ID0gZWxlbTtcbiAgICB9XG5cbiAgICByZWdpc3Rlck1lZGlhKG1lZGlhOklQbGF5YWJsZSkge1xuICAgICAgICB0aGlzLm1lZGlhc1ttZWRpYS5pZF0gPSBtZWRpYTtcbiAgICB9XG5cbiAgICB1bnJlZ2lzdGVyTWVkaWEobWVkaWE6SVBsYXlhYmxlKSB7XG4gICAgICAgIGRlbGV0ZSB0aGlzLm1lZGlhc1ttZWRpYS5pZF07XG4gICAgfVxuXG5cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Subject_1 = require(\"rxjs/Subject\");\nvar core_1 = require(\"@angular/core\");\nvar VgControlsHidden = (function () {\n function VgControlsHidden() {\n this.isHiddenSubject = new Subject_1.Subject();\n this.isHidden = this.isHiddenSubject.asObservable();\n }\n VgControlsHidden.prototype.state = function (hidden) {\n this.isHiddenSubject.next(hidden);\n };\n VgControlsHidden.decorators = [\n { type: core_1.Injectable },\n ];\n /** @nocollapse */\n VgControlsHidden.ctorParameters = function () { return []; };\n return VgControlsHidden;\n}());\nexports.VgControlsHidden = VgControlsHidden;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctY29udHJvbHMtaGlkZGVuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctY29udHJvbHMtaGlkZGVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsd0NBQXVDO0FBRXZDLHNDQUEyQzs7SUFRdkM7K0JBRjRDLElBQUksaUJBQU8sRUFBVztRQUc5RCxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxlQUFlLENBQUMsWUFBWSxFQUFFLENBQUM7S0FDdkQ7SUFFRCxnQ0FBSyxHQUFMLFVBQU0sTUFBZTtRQUNqQixJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztLQUNyQzs7Z0JBWkosaUJBQVU7Ozs7MkJBSlg7O0FBS2EsNENBQWdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3ViamVjdCB9IGZyb20gJ3J4anMvU3ViamVjdCc7XG5pbXBvcnQgeyBPYnNlcnZhYmxlIH0gZnJvbSAncnhqcy9PYnNlcnZhYmxlJztcbmltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIFZnQ29udHJvbHNIaWRkZW4ge1xuICAgIGlzSGlkZGVuOiBPYnNlcnZhYmxlPGJvb2xlYW4+O1xuXG4gICAgcHJpdmF0ZSBpc0hpZGRlblN1YmplY3Q6IFN1YmplY3Q8Ym9vbGVhbj4gPSBuZXcgU3ViamVjdDxib29sZWFuPigpO1xuXG4gICAgY29uc3RydWN0b3IoKSB7XG4gICAgICAgIHRoaXMuaXNIaWRkZW4gPSB0aGlzLmlzSGlkZGVuU3ViamVjdC5hc09ic2VydmFibGUoKTtcbiAgICB9XG5cbiAgICBzdGF0ZShoaWRkZW46IGJvb2xlYW4pIHtcbiAgICAgICAgdGhpcy5pc0hpZGRlblN1YmplY3QubmV4dChoaWRkZW4pO1xuICAgIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_utils_1 = require(\"./vg-utils\");\nvar Observable_1 = require(\"rxjs/Observable\");\nvar VgFullscreenAPI = (function () {\n function VgFullscreenAPI() {\n this.nativeFullscreen = true;\n this.isFullscreen = false;\n this.onChangeFullscreen = new core_1.EventEmitter();\n }\n VgFullscreenAPI.prototype.init = function (elem, medias) {\n var _this = this;\n this.videogularElement = elem;\n this.medias = medias;\n var APIs = {\n w3: {\n enabled: 'fullscreenEnabled',\n element: 'fullscreenElement',\n request: 'requestFullscreen',\n exit: 'exitFullscreen',\n onchange: 'fullscreenchange',\n onerror: 'fullscreenerror'\n },\n newWebkit: {\n enabled: 'webkitFullscreenEnabled',\n element: 'webkitFullscreenElement',\n request: 'webkitRequestFullscreen',\n exit: 'webkitExitFullscreen',\n onchange: 'webkitfullscreenchange',\n onerror: 'webkitfullscreenerror'\n },\n oldWebkit: {\n enabled: 'webkitIsFullScreen',\n element: 'webkitCurrentFullScreenElement',\n request: 'webkitRequestFullScreen',\n exit: 'webkitCancelFullScreen',\n onchange: 'webkitfullscreenchange',\n onerror: 'webkitfullscreenerror'\n },\n moz: {\n enabled: 'mozFullScreen',\n element: 'mozFullScreenElement',\n request: 'mozRequestFullScreen',\n exit: 'mozCancelFullScreen',\n onchange: 'mozfullscreenchange',\n onerror: 'mozfullscreenerror'\n },\n ios: {\n enabled: 'webkitFullscreenEnabled',\n element: 'webkitFullscreenElement',\n request: 'webkitEnterFullscreen',\n exit: 'webkitExitFullscreen',\n onchange: 'webkitendfullscreen',\n // Hack for iOS: webkitfullscreenchange it's not firing\n onerror: 'webkitfullscreenerror'\n },\n ms: {\n enabled: 'msFullscreenEnabled',\n element: 'msFullscreenElement',\n request: 'msRequestFullscreen',\n exit: 'msExitFullscreen',\n onchange: 'MSFullscreenChange',\n onerror: 'MSFullscreenError'\n }\n };\n for (var browser in APIs) {\n if (APIs[browser].enabled in document) {\n this.polyfill = APIs[browser];\n break;\n }\n }\n if (vg_utils_1.VgUtils.isiOSDevice()) {\n this.polyfill = APIs.ios;\n }\n this.isAvailable = (this.polyfill != null);\n if (this.polyfill == null) {\n return;\n }\n var fsElemDispatcher;\n switch (this.polyfill.onchange) {\n // Mozilla dispatches the fullscreen change event from document, not the element\n // See: https://bugzilla.mozilla.org/show_bug.cgi?id=724816#c3\n case 'mozfullscreenchange':\n fsElemDispatcher = document;\n break;\n // iOS dispatches the fullscreen change event from video element\n case 'webkitendfullscreen':\n fsElemDispatcher = this.medias.toArray()[0].elem;\n break;\n // HTML5 implementation dispatches the fullscreen change event from the element\n default:\n fsElemDispatcher = elem;\n }\n this.fsChangeSubscription = Observable_1.Observable.fromEvent(fsElemDispatcher, this.polyfill.onchange).subscribe(function () {\n _this.onFullscreenChange();\n });\n };\n VgFullscreenAPI.prototype.onFullscreenChange = function () {\n this.isFullscreen = !!document[this.polyfill.element];\n this.onChangeFullscreen.next(this.isFullscreen);\n };\n VgFullscreenAPI.prototype.toggleFullscreen = function (element) {\n if (element === void 0) { element = null; }\n if (this.isFullscreen) {\n this.exit();\n }\n else {\n this.request(element);\n }\n };\n VgFullscreenAPI.prototype.request = function (elem) {\n if (!elem) {\n elem = this.videogularElement;\n }\n this.isFullscreen = true;\n this.onChangeFullscreen.next(true);\n // Perform native full screen support\n if (this.isAvailable && this.nativeFullscreen) {\n // Fullscreen for mobile devices\n if (vg_utils_1.VgUtils.isMobileDevice()) {\n // We should make fullscreen the video object if it doesn't have native fullscreen support\n // Fallback! We can't set vg-player on fullscreen, only video/audio objects\n if ((!this.polyfill.enabled && elem === this.videogularElement) || vg_utils_1.VgUtils.isiOSDevice()) {\n elem = this.medias.toArray()[0].elem;\n }\n this.enterElementInFullScreen(elem);\n }\n else {\n this.enterElementInFullScreen(this.videogularElement);\n }\n }\n };\n VgFullscreenAPI.prototype.enterElementInFullScreen = function (elem) {\n elem[this.polyfill.request]();\n };\n VgFullscreenAPI.prototype.exit = function () {\n this.isFullscreen = false;\n this.onChangeFullscreen.next(false);\n // Exit from native fullscreen\n if (this.isAvailable && this.nativeFullscreen) {\n document[this.polyfill.exit]();\n }\n };\n VgFullscreenAPI.decorators = [\n { type: core_1.Injectable },\n ];\n /** @nocollapse */\n VgFullscreenAPI.ctorParameters = function () { return []; };\n return VgFullscreenAPI;\n}());\nexports.VgFullscreenAPI = VgFullscreenAPI;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctZnVsbHNjcmVlbi1hcGkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy1mdWxsc2NyZWVuLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUFvRTtBQUNwRSx1Q0FBcUM7QUFHckMsOENBQTZDOztJQWdCekM7Z0NBVDRCLElBQUk7NEJBQ1IsS0FBSztrQ0FNVyxJQUFJLG1CQUFZLEVBQUU7S0FHekQ7SUFFRCw4QkFBSSxHQUFKLFVBQUssSUFBaUIsRUFBRSxNQUEwQjtRQUFsRCxpQkE4RkM7UUE3RkcsSUFBSSxDQUFDLGlCQUFpQixHQUFHLElBQUksQ0FBQztRQUM5QixJQUFJLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztRQUVyQixJQUFNLElBQUksR0FBRztZQUNULEVBQUUsRUFBRTtnQkFDQSxPQUFPLEVBQUUsbUJBQW1CO2dCQUM1QixPQUFPLEVBQUUsbUJBQW1CO2dCQUM1QixPQUFPLEVBQUUsbUJBQW1CO2dCQUM1QixJQUFJLEVBQUUsZ0JBQWdCO2dCQUN0QixRQUFRLEVBQUUsa0JBQWtCO2dCQUM1QixPQUFPLEVBQUUsaUJBQWlCO2FBQzdCO1lBQ0QsU0FBUyxFQUFFO2dCQUNQLE9BQU8sRUFBRSx5QkFBeUI7Z0JBQ2xDLE9BQU8sRUFBRSx5QkFBeUI7Z0JBQ2xDLE9BQU8sRUFBRSx5QkFBeUI7Z0JBQ2xDLElBQUksRUFBRSxzQkFBc0I7Z0JBQzVCLFFBQVEsRUFBRSx3QkFBd0I7Z0JBQ2xDLE9BQU8sRUFBRSx1QkFBdUI7YUFDbkM7WUFDRCxTQUFTLEVBQUU7Z0JBQ1AsT0FBTyxFQUFFLG9CQUFvQjtnQkFDN0IsT0FBTyxFQUFFLGdDQUFnQztnQkFDekMsT0FBTyxFQUFFLHlCQUF5QjtnQkFDbEMsSUFBSSxFQUFFLHdCQUF3QjtnQkFDOUIsUUFBUSxFQUFFLHdCQUF3QjtnQkFDbEMsT0FBTyxFQUFFLHVCQUF1QjthQUNuQztZQUNELEdBQUcsRUFBRTtnQkFDRCxPQUFPLEVBQUUsZUFBZTtnQkFDeEIsT0FBTyxFQUFFLHNCQUFzQjtnQkFDL0IsT0FBTyxFQUFFLHNCQUFzQjtnQkFDL0IsSUFBSSxFQUFFLHFCQUFxQjtnQkFDM0IsUUFBUSxFQUFFLHFCQUFxQjtnQkFDL0IsT0FBTyxFQUFFLG9CQUFvQjthQUNoQztZQUNELEdBQUcsRUFBRTtnQkFDRCxPQUFPLEVBQUUseUJBQXlCO2dCQUNsQyxPQUFPLEVBQUUseUJBQXlCO2dCQUNsQyxPQUFPLEVBQUUsdUJBQXVCO2dCQUNoQyxJQUFJLEVBQUUsc0JBQXNCO2dCQUM1QixRQUFRLEVBQUUscUJBQXFCOztnQkFDL0IsT0FBTyxFQUFFLHVCQUF1QjthQUNuQztZQUNELEVBQUUsRUFBRTtnQkFDQSxPQUFPLEVBQUUscUJBQXFCO2dCQUM5QixPQUFPLEVBQUUscUJBQXFCO2dCQUM5QixPQUFPLEVBQUUscUJBQXFCO2dCQUM5QixJQUFJLEVBQUUsa0JBQWtCO2dCQUN4QixRQUFRLEVBQUUsb0JBQW9CO2dCQUM5QixPQUFPLEVBQUUsbUJBQW1CO2FBQy9CO1NBQ0osQ0FBQztRQUVGLEdBQUcsQ0FBQyxDQUFDLElBQUksT0FBTyxJQUFJLElBQUksQ0FBQyxDQUFDLENBQUM7WUFDdkIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFFLE9BQU8sQ0FBRSxDQUFDLE9BQU8sSUFBSSxRQUFRLENBQUMsQ0FBQyxDQUFDO2dCQUN0QyxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBRSxPQUFPLENBQUUsQ0FBQztnQkFDaEMsS0FBSyxDQUFDO2FBQ1Q7U0FDSjtRQUVELEVBQUUsQ0FBQyxDQUFDLGtCQUFPLENBQUMsV0FBVyxFQUFFLENBQUMsQ0FBQyxDQUFDO1lBQ3hCLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQTtTQUMzQjtRQUVELElBQUksQ0FBQyxXQUFXLEdBQUcsQ0FBQyxJQUFJLENBQUMsUUFBUSxJQUFJLElBQUksQ0FBQyxDQUFDO1FBRTNDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLElBQUksSUFBSSxDQUFDLENBQUMsQ0FBQztZQUN4QixNQUFNLENBQUM7U0FDVjtRQUVELElBQUksZ0JBQWdCLENBQUM7UUFFckIsTUFBTSxDQUFDLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDOzs7WUFHN0IsS0FBSyxxQkFBcUI7Z0JBQ3RCLGdCQUFnQixHQUFHLFFBQVEsQ0FBQztnQkFDNUIsS0FBSyxDQUFDOztZQUdWLEtBQUsscUJBQXFCO2dCQUN0QixnQkFBZ0IsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLE9BQU8sRUFBRSxDQUFFLENBQUMsQ0FBRSxDQUFDLElBQUksQ0FBQztnQkFDbkQsS0FBSyxDQUFDOztZQUdWO2dCQUNJLGdCQUFnQixHQUFHLElBQUksQ0FBQztTQUMvQjtRQUVELElBQUksQ0FBQyxvQkFBb0IsR0FBRyx1QkFBVSxDQUFDLFNBQVMsQ0FBQyxnQkFBZ0IsRUFBRSxJQUFJLENBQUMsUUFBUSxDQUFDLFFBQVEsQ0FBQyxDQUFDLFNBQVMsQ0FBQztZQUNqRyxLQUFJLENBQUMsa0JBQWtCLEVBQUUsQ0FBQztTQUM3QixDQUFDLENBQUM7S0FDTjtJQUVELDRDQUFrQixHQUFsQjtRQUNJLElBQUksQ0FBQyxZQUFZLEdBQUcsQ0FBQyxDQUFDLFFBQVEsQ0FBRSxJQUFJLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBRSxDQUFDO1FBQ3hELElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDO0tBQ25EO0lBRUQsMENBQWdCLEdBQWhCLFVBQWlCLE9BQW1CO1FBQW5CLHdCQUFBLEVBQUEsY0FBbUI7UUFDaEMsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUM7WUFDcEIsSUFBSSxDQUFDLElBQUksRUFBRSxDQUFDO1NBQ2Y7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUM7U0FDekI7S0FDSjtJQUVELGlDQUFPLEdBQVAsVUFBUSxJQUFTO1FBQ2IsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBQ1IsSUFBSSxHQUFHLElBQUksQ0FBQyxpQkFBaUIsQ0FBQztTQUNqQztRQUVELElBQUksQ0FBQyxZQUFZLEdBQUcsSUFBSSxDQUFDO1FBQ3pCLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7O1FBR25DLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxXQUFXLElBQUksSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQzs7WUFFNUMsRUFBRSxDQUFDLENBQUMsa0JBQU8sQ0FBQyxjQUFjLEVBQUUsQ0FBQyxDQUFDLENBQUM7OztnQkFHM0IsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxJQUFJLElBQUksS0FBSyxJQUFJLENBQUMsaUJBQWlCLENBQUMsSUFBSSxrQkFBTyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUMsQ0FBQztvQkFDdkYsSUFBSSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxFQUFFLENBQUUsQ0FBQyxDQUFFLENBQUMsSUFBSSxDQUFDO2lCQUMxQztnQkFFRCxJQUFJLENBQUMsd0JBQXdCLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDdkM7WUFDRCxJQUFJLENBQUMsQ0FBQztnQkFDRixJQUFJLENBQUMsd0JBQXdCLENBQUMsSUFBSSxDQUFDLGlCQUFpQixDQUFDLENBQUM7YUFDekQ7U0FDSjtLQUNKO0lBRUQsa0RBQXdCLEdBQXhCLFVBQXlCLElBQVM7UUFDOUIsSUFBSSxDQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxDQUFFLEVBQUUsQ0FBQztLQUNuQztJQUVELDhCQUFJLEdBQUo7UUFDSSxJQUFJLENBQUMsWUFBWSxHQUFHLEtBQUssQ0FBQztRQUMxQixJQUFJLENBQUMsa0JBQWtCLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDOztRQUdwQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7WUFDNUMsUUFBUSxDQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFFLEVBQUUsQ0FBQztTQUNwQztLQUNKOztnQkFyS0osaUJBQVU7Ozs7MEJBTlg7O0FBT2EsMENBQWUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBFdmVudEVtaXR0ZXIsIEluamVjdGFibGUsIFF1ZXJ5TGlzdCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdVdGlscyB9IGZyb20gJy4vdmctdXRpbHMnO1xuaW1wb3J0IHsgVmdNZWRpYSB9IGZyb20gJy4uL3ZnLW1lZGlhL3ZnLW1lZGlhJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcbmltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzL09ic2VydmFibGUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgVmdGdWxsc2NyZWVuQVBJIHtcbiAgICBwb2x5ZmlsbDogYW55O1xuICAgIG9uY2hhbmdlOiBzdHJpbmc7XG4gICAgb25lcnJvcjogc3RyaW5nO1xuICAgIG5hdGl2ZUZ1bGxzY3JlZW46IGJvb2xlYW4gPSB0cnVlO1xuICAgIGlzRnVsbHNjcmVlbjogYm9vbGVhbiA9IGZhbHNlO1xuICAgIGlzQXZhaWxhYmxlOiBib29sZWFuO1xuICAgIHZpZGVvZ3VsYXJFbGVtZW50OiBIVE1MRWxlbWVudDtcbiAgICBtZWRpYXM6IFF1ZXJ5TGlzdDxWZ01lZGlhPjtcblxuICAgIGZzQ2hhbmdlU3Vic2NyaXB0aW9uOiBTdWJzY3JpcHRpb247XG4gICAgb25DaGFuZ2VGdWxsc2NyZWVuOiBFdmVudEVtaXR0ZXI8YW55PiA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcblxuICAgIGNvbnN0cnVjdG9yKCkge1xuICAgIH1cblxuICAgIGluaXQoZWxlbTogSFRNTEVsZW1lbnQsIG1lZGlhczogUXVlcnlMaXN0PFZnTWVkaWE+KSB7XG4gICAgICAgIHRoaXMudmlkZW9ndWxhckVsZW1lbnQgPSBlbGVtO1xuICAgICAgICB0aGlzLm1lZGlhcyA9IG1lZGlhcztcblxuICAgICAgICBjb25zdCBBUElzID0ge1xuICAgICAgICAgICAgdzM6IHtcbiAgICAgICAgICAgICAgICBlbmFibGVkOiAnZnVsbHNjcmVlbkVuYWJsZWQnLFxuICAgICAgICAgICAgICAgIGVsZW1lbnQ6ICdmdWxsc2NyZWVuRWxlbWVudCcsXG4gICAgICAgICAgICAgICAgcmVxdWVzdDogJ3JlcXVlc3RGdWxsc2NyZWVuJyxcbiAgICAgICAgICAgICAgICBleGl0OiAnZXhpdEZ1bGxzY3JlZW4nLFxuICAgICAgICAgICAgICAgIG9uY2hhbmdlOiAnZnVsbHNjcmVlbmNoYW5nZScsXG4gICAgICAgICAgICAgICAgb25lcnJvcjogJ2Z1bGxzY3JlZW5lcnJvcidcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXdXZWJraXQ6IHtcbiAgICAgICAgICAgICAgICBlbmFibGVkOiAnd2Via2l0RnVsbHNjcmVlbkVuYWJsZWQnLFxuICAgICAgICAgICAgICAgIGVsZW1lbnQ6ICd3ZWJraXRGdWxsc2NyZWVuRWxlbWVudCcsXG4gICAgICAgICAgICAgICAgcmVxdWVzdDogJ3dlYmtpdFJlcXVlc3RGdWxsc2NyZWVuJyxcbiAgICAgICAgICAgICAgICBleGl0OiAnd2Via2l0RXhpdEZ1bGxzY3JlZW4nLFxuICAgICAgICAgICAgICAgIG9uY2hhbmdlOiAnd2Via2l0ZnVsbHNjcmVlbmNoYW5nZScsXG4gICAgICAgICAgICAgICAgb25lcnJvcjogJ3dlYmtpdGZ1bGxzY3JlZW5lcnJvcidcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBvbGRXZWJraXQ6IHtcbiAgICAgICAgICAgICAgICBlbmFibGVkOiAnd2Via2l0SXNGdWxsU2NyZWVuJyxcbiAgICAgICAgICAgICAgICBlbGVtZW50OiAnd2Via2l0Q3VycmVudEZ1bGxTY3JlZW5FbGVtZW50JyxcbiAgICAgICAgICAgICAgICByZXF1ZXN0OiAnd2Via2l0UmVxdWVzdEZ1bGxTY3JlZW4nLFxuICAgICAgICAgICAgICAgIGV4aXQ6ICd3ZWJraXRDYW5jZWxGdWxsU2NyZWVuJyxcbiAgICAgICAgICAgICAgICBvbmNoYW5nZTogJ3dlYmtpdGZ1bGxzY3JlZW5jaGFuZ2UnLFxuICAgICAgICAgICAgICAgIG9uZXJyb3I6ICd3ZWJraXRmdWxsc2NyZWVuZXJyb3InXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbW96OiB7XG4gICAgICAgICAgICAgICAgZW5hYmxlZDogJ21vekZ1bGxTY3JlZW4nLFxuICAgICAgICAgICAgICAgIGVsZW1lbnQ6ICdtb3pGdWxsU2NyZWVuRWxlbWVudCcsXG4gICAgICAgICAgICAgICAgcmVxdWVzdDogJ21velJlcXVlc3RGdWxsU2NyZWVuJyxcbiAgICAgICAgICAgICAgICBleGl0OiAnbW96Q2FuY2VsRnVsbFNjcmVlbicsXG4gICAgICAgICAgICAgICAgb25jaGFuZ2U6ICdtb3pmdWxsc2NyZWVuY2hhbmdlJyxcbiAgICAgICAgICAgICAgICBvbmVycm9yOiAnbW96ZnVsbHNjcmVlbmVycm9yJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlvczoge1xuICAgICAgICAgICAgICAgIGVuYWJsZWQ6ICd3ZWJraXRGdWxsc2NyZWVuRW5hYmxlZCcsXG4gICAgICAgICAgICAgICAgZWxlbWVudDogJ3dlYmtpdEZ1bGxzY3JlZW5FbGVtZW50JyxcbiAgICAgICAgICAgICAgICByZXF1ZXN0OiAnd2Via2l0RW50ZXJGdWxsc2NyZWVuJyxcbiAgICAgICAgICAgICAgICBleGl0OiAnd2Via2l0RXhpdEZ1bGxzY3JlZW4nLFxuICAgICAgICAgICAgICAgIG9uY2hhbmdlOiAnd2Via2l0ZW5kZnVsbHNjcmVlbicsIC8vIEhhY2sgZm9yIGlPUzogd2Via2l0ZnVsbHNjcmVlbmNoYW5nZSBpdCdzIG5vdCBmaXJpbmdcbiAgICAgICAgICAgICAgICBvbmVycm9yOiAnd2Via2l0ZnVsbHNjcmVlbmVycm9yJ1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1zOiB7XG4gICAgICAgICAgICAgICAgZW5hYmxlZDogJ21zRnVsbHNjcmVlbkVuYWJsZWQnLFxuICAgICAgICAgICAgICAgIGVsZW1lbnQ6ICdtc0Z1bGxzY3JlZW5FbGVtZW50JyxcbiAgICAgICAgICAgICAgICByZXF1ZXN0OiAnbXNSZXF1ZXN0RnVsbHNjcmVlbicsXG4gICAgICAgICAgICAgICAgZXhpdDogJ21zRXhpdEZ1bGxzY3JlZW4nLFxuICAgICAgICAgICAgICAgIG9uY2hhbmdlOiAnTVNGdWxsc2NyZWVuQ2hhbmdlJyxcbiAgICAgICAgICAgICAgICBvbmVycm9yOiAnTVNGdWxsc2NyZWVuRXJyb3InXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgZm9yIChsZXQgYnJvd3NlciBpbiBBUElzKSB7XG4gICAgICAgICAgICBpZiAoQVBJc1sgYnJvd3NlciBdLmVuYWJsZWQgaW4gZG9jdW1lbnQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnBvbHlmaWxsID0gQVBJc1sgYnJvd3NlciBdO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKFZnVXRpbHMuaXNpT1NEZXZpY2UoKSkge1xuICAgICAgICAgICAgdGhpcy5wb2x5ZmlsbCA9IEFQSXMuaW9zXG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmlzQXZhaWxhYmxlID0gKHRoaXMucG9seWZpbGwgIT0gbnVsbCk7XG5cbiAgICAgICAgaWYgKHRoaXMucG9seWZpbGwgPT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgbGV0IGZzRWxlbURpc3BhdGNoZXI7XG5cbiAgICAgICAgc3dpdGNoICh0aGlzLnBvbHlmaWxsLm9uY2hhbmdlKSB7XG4gICAgICAgICAgICAvLyBNb3ppbGxhIGRpc3BhdGNoZXMgdGhlIGZ1bGxzY3JlZW4gY2hhbmdlIGV2ZW50IGZyb20gZG9jdW1lbnQsIG5vdCB0aGUgZWxlbWVudFxuICAgICAgICAgICAgLy8gU2VlOiBodHRwczovL2J1Z3ppbGxhLm1vemlsbGEub3JnL3Nob3dfYnVnLmNnaT9pZD03MjQ4MTYjYzNcbiAgICAgICAgICAgIGNhc2UgJ21vemZ1bGxzY3JlZW5jaGFuZ2UnOlxuICAgICAgICAgICAgICAgIGZzRWxlbURpc3BhdGNoZXIgPSBkb2N1bWVudDtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgLy8gaU9TIGRpc3BhdGNoZXMgdGhlIGZ1bGxzY3JlZW4gY2hhbmdlIGV2ZW50IGZyb20gdmlkZW8gZWxlbWVudFxuICAgICAgICAgICAgY2FzZSAnd2Via2l0ZW5kZnVsbHNjcmVlbic6XG4gICAgICAgICAgICAgICAgZnNFbGVtRGlzcGF0Y2hlciA9IHRoaXMubWVkaWFzLnRvQXJyYXkoKVsgMCBdLmVsZW07XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIC8vIEhUTUw1IGltcGxlbWVudGF0aW9uIGRpc3BhdGNoZXMgdGhlIGZ1bGxzY3JlZW4gY2hhbmdlIGV2ZW50IGZyb20gdGhlIGVsZW1lbnRcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgZnNFbGVtRGlzcGF0Y2hlciA9IGVsZW07XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmZzQ2hhbmdlU3Vic2NyaXB0aW9uID0gT2JzZXJ2YWJsZS5mcm9tRXZlbnQoZnNFbGVtRGlzcGF0Y2hlciwgdGhpcy5wb2x5ZmlsbC5vbmNoYW5nZSkuc3Vic2NyaWJlKCgpID0+IHtcbiAgICAgICAgICAgIHRoaXMub25GdWxsc2NyZWVuQ2hhbmdlKCk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIG9uRnVsbHNjcmVlbkNoYW5nZSgpIHtcbiAgICAgICAgdGhpcy5pc0Z1bGxzY3JlZW4gPSAhIWRvY3VtZW50WyB0aGlzLnBvbHlmaWxsLmVsZW1lbnQgXTtcbiAgICAgICAgdGhpcy5vbkNoYW5nZUZ1bGxzY3JlZW4ubmV4dCh0aGlzLmlzRnVsbHNjcmVlbik7XG4gICAgfVxuXG4gICAgdG9nZ2xlRnVsbHNjcmVlbihlbGVtZW50OiBhbnkgPSBudWxsKSB7XG4gICAgICAgIGlmICh0aGlzLmlzRnVsbHNjcmVlbikge1xuICAgICAgICAgICAgdGhpcy5leGl0KCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLnJlcXVlc3QoZWxlbWVudCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXF1ZXN0KGVsZW06IGFueSkge1xuICAgICAgICBpZiAoIWVsZW0pIHtcbiAgICAgICAgICAgIGVsZW0gPSB0aGlzLnZpZGVvZ3VsYXJFbGVtZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5pc0Z1bGxzY3JlZW4gPSB0cnVlO1xuICAgICAgICB0aGlzLm9uQ2hhbmdlRnVsbHNjcmVlbi5uZXh0KHRydWUpO1xuXG4gICAgICAgIC8vIFBlcmZvcm0gbmF0aXZlIGZ1bGwgc2NyZWVuIHN1cHBvcnRcbiAgICAgICAgaWYgKHRoaXMuaXNBdmFpbGFibGUgJiYgdGhpcy5uYXRpdmVGdWxsc2NyZWVuKSB7XG4gICAgICAgICAgICAvLyBGdWxsc2NyZWVuIGZvciBtb2JpbGUgZGV2aWNlc1xuICAgICAgICAgICAgaWYgKFZnVXRpbHMuaXNNb2JpbGVEZXZpY2UoKSkge1xuICAgICAgICAgICAgICAgIC8vIFdlIHNob3VsZCBtYWtlIGZ1bGxzY3JlZW4gdGhlIHZpZGVvIG9iamVjdCBpZiBpdCBkb2Vzbid0IGhhdmUgbmF0aXZlIGZ1bGxzY3JlZW4gc3VwcG9ydFxuICAgICAgICAgICAgICAgIC8vIEZhbGxiYWNrISBXZSBjYW4ndCBzZXQgdmctcGxheWVyIG9uIGZ1bGxzY3JlZW4sIG9ubHkgdmlkZW8vYXVkaW8gb2JqZWN0c1xuICAgICAgICAgICAgICAgIGlmICgoIXRoaXMucG9seWZpbGwuZW5hYmxlZCAmJiBlbGVtID09PSB0aGlzLnZpZGVvZ3VsYXJFbGVtZW50KSB8fCBWZ1V0aWxzLmlzaU9TRGV2aWNlKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbSA9IHRoaXMubWVkaWFzLnRvQXJyYXkoKVsgMCBdLmVsZW07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdGhpcy5lbnRlckVsZW1lbnRJbkZ1bGxTY3JlZW4oZWxlbSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVudGVyRWxlbWVudEluRnVsbFNjcmVlbih0aGlzLnZpZGVvZ3VsYXJFbGVtZW50KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGVudGVyRWxlbWVudEluRnVsbFNjcmVlbihlbGVtOiBhbnkpIHtcbiAgICAgICAgZWxlbVsgdGhpcy5wb2x5ZmlsbC5yZXF1ZXN0IF0oKTtcbiAgICB9XG5cbiAgICBleGl0KCkge1xuICAgICAgICB0aGlzLmlzRnVsbHNjcmVlbiA9IGZhbHNlO1xuICAgICAgICB0aGlzLm9uQ2hhbmdlRnVsbHNjcmVlbi5uZXh0KGZhbHNlKTtcblxuICAgICAgICAvLyBFeGl0IGZyb20gbmF0aXZlIGZ1bGxzY3JlZW5cbiAgICAgICAgaWYgKHRoaXMuaXNBdmFpbGFibGUgJiYgdGhpcy5uYXRpdmVGdWxsc2NyZWVuKSB7XG4gICAgICAgICAgICBkb2N1bWVudFsgdGhpcy5wb2x5ZmlsbC5leGl0IF0oKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar VgUtils = (function () {\n function VgUtils() {\n }\n /**\n * Inspired by Paul Irish\n * https://gist.github.com/paulirish/211209\n * @returns {number}\n */\n /**\n * Inspired by Paul Irish\n * https://gist.github.com/paulirish/211209\n * @returns {number}\n */\n VgUtils.getZIndex = /**\n * Inspired by Paul Irish\n * https://gist.github.com/paulirish/211209\n * @returns {number}\n */\n function () {\n var zIndex = 1;\n var elementZIndex;\n var tags = document.getElementsByTagName('*');\n for (var i = 0, l = tags.length; i < l; i++) {\n elementZIndex = parseInt(window.getComputedStyle(tags[i])[\"z-index\"], 10);\n if (elementZIndex > zIndex) {\n zIndex = elementZIndex + 1;\n }\n }\n return zIndex;\n };\n // Very simple mobile detection, not 100% reliable\n // Very simple mobile detection, not 100% reliable\n VgUtils.isMobileDevice = \n // Very simple mobile detection, not 100% reliable\n function () {\n return (typeof window.orientation !== \"undefined\") || (navigator.userAgent.indexOf(\"IEMobile\") !== -1);\n };\n ;\n VgUtils.isiOSDevice = function () {\n return (navigator.userAgent.match(/ip(hone|ad|od)/i) && !navigator.userAgent.match(/(iemobile)[\\/\\s]?([\\w\\.]*)/i));\n };\n ;\n VgUtils.isCordova = function () {\n return document.URL.indexOf('http://') === -1 && document.URL.indexOf('https://') === -1;\n };\n ;\n VgUtils.decorators = [\n { type: core_1.Injectable },\n ];\n return VgUtils;\n}());\nexports.VgUtils = VgUtils;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctdXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUF5Qzs7OztJQUlyQzs7OztPQUlHOzs7Ozs7SUFDSSxpQkFBUzs7Ozs7SUFBaEI7UUFDSSxJQUFJLE1BQU0sR0FBRyxDQUFDLENBQUM7UUFDZixJQUFJLGFBQW9CLENBQUM7UUFFekIsSUFBSSxJQUFJLEdBQUcsUUFBUSxDQUFDLG9CQUFvQixDQUFDLEdBQUcsQ0FBQyxDQUFDO1FBRTlDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7WUFDMUMsYUFBYSxHQUFHLFFBQVEsQ0FBQyxNQUFNLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7WUFFMUUsRUFBRSxDQUFDLENBQUMsYUFBYSxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ3pCLE1BQU0sR0FBRyxhQUFhLEdBQUcsQ0FBQyxDQUFDO2FBQzlCO1NBQ0o7UUFFRCxNQUFNLENBQUMsTUFBTSxDQUFDO0tBQ2pCO0lBRUQsa0RBQWtEOztJQUMzQyxzQkFBYzs7SUFBckI7UUFDSSxNQUFNLENBQUMsQ0FBQyxPQUFPLE1BQU0sQ0FBQyxXQUFXLEtBQUssV0FBVyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQzFHO0lBQUEsQ0FBQztJQUVLLG1CQUFXLEdBQWxCO1FBQ0ksTUFBTSxDQUFDLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBQyxLQUFLLENBQUMsaUJBQWlCLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLDZCQUE2QixDQUFDLENBQUMsQ0FBQztLQUN0SDtJQUFBLENBQUM7SUFFSyxpQkFBUyxHQUFoQjtRQUNJLE1BQU0sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLENBQUMsSUFBSSxRQUFRLENBQUMsR0FBRyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztLQUM1RjtJQUFBLENBQUM7O2dCQW5DTCxpQkFBVTs7a0JBRlg7O0FBR2EsMEJBQU8iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0luamVjdGFibGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgVmdVdGlscyB7XG4gICAgLyoqXG4gICAgICogSW5zcGlyZWQgYnkgUGF1bCBJcmlzaFxuICAgICAqIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL3BhdWxpcmlzaC8yMTEyMDlcbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfVxuICAgICAqL1xuICAgIHN0YXRpYyBnZXRaSW5kZXgoKTpudW1iZXIge1xuICAgICAgICBsZXQgekluZGV4ID0gMTtcbiAgICAgICAgbGV0IGVsZW1lbnRaSW5kZXg6bnVtYmVyO1xuXG4gICAgICAgIGxldCB0YWdzID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJyonKTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IHRhZ3MubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBlbGVtZW50WkluZGV4ID0gcGFyc2VJbnQod2luZG93LmdldENvbXB1dGVkU3R5bGUodGFnc1tpXSlbXCJ6LWluZGV4XCJdLCAxMCk7XG5cbiAgICAgICAgICAgIGlmIChlbGVtZW50WkluZGV4ID4gekluZGV4KSB7XG4gICAgICAgICAgICAgICAgekluZGV4ID0gZWxlbWVudFpJbmRleCArIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gekluZGV4O1xuICAgIH1cblxuICAgIC8vIFZlcnkgc2ltcGxlIG1vYmlsZSBkZXRlY3Rpb24sIG5vdCAxMDAlIHJlbGlhYmxlXG4gICAgc3RhdGljIGlzTW9iaWxlRGV2aWNlKCkge1xuICAgICAgICByZXR1cm4gKHR5cGVvZiB3aW5kb3cub3JpZW50YXRpb24gIT09IFwidW5kZWZpbmVkXCIpIHx8IChuYXZpZ2F0b3IudXNlckFnZW50LmluZGV4T2YoXCJJRU1vYmlsZVwiKSAhPT0gLTEpO1xuICAgIH07XG5cbiAgICBzdGF0aWMgaXNpT1NEZXZpY2UoKSB7XG4gICAgICAgIHJldHVybiAobmF2aWdhdG9yLnVzZXJBZ2VudC5tYXRjaCgvaXAoaG9uZXxhZHxvZCkvaSkgJiYgIW5hdmlnYXRvci51c2VyQWdlbnQubWF0Y2goLyhpZW1vYmlsZSlbXFwvXFxzXT8oW1xcd1xcLl0qKS9pKSk7XG4gICAgfTtcblxuICAgIHN0YXRpYyBpc0NvcmRvdmEoKSB7XG4gICAgICAgIHJldHVybiBkb2N1bWVudC5VUkwuaW5kZXhPZignaHR0cDovLycpID09PSAtMSAmJiBkb2N1bWVudC5VUkwuaW5kZXhPZignaHR0cHM6Ly8nKSA9PT0gLTE7XG4gICAgfTtcbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar VgStates = (function () {\n function VgStates() {\n }\n VgStates.VG_ENDED = 'ended';\n VgStates.VG_PAUSED = 'paused';\n VgStates.VG_PLAYING = 'playing';\n VgStates.VG_LOADING = 'waiting';\n VgStates.decorators = [\n { type: core_1.Injectable },\n ];\n return VgStates;\n}());\nexports.VgStates = VgStates;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctc3RhdGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctc3RhdGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQXlDOzs7O3dCQUlYLE9BQU87eUJBQ04sUUFBUTswQkFDUCxTQUFTOzBCQUNULFNBQVM7O2dCQUx4QyxpQkFBVTs7bUJBRlg7O0FBR2EsNEJBQVEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge0luamVjdGFibGV9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgVmdTdGF0ZXMge1xuICAgIHN0YXRpYyBWR19FTkRFRDogc3RyaW5nID0gJ2VuZGVkJztcbiAgICBzdGF0aWMgVkdfUEFVU0VEOiBzdHJpbmcgPSAncGF1c2VkJztcbiAgICBzdGF0aWMgVkdfUExBWUlORzogc3RyaW5nID0gJ3BsYXlpbmcnO1xuICAgIHN0YXRpYyBWR19MT0FESU5HOiBzdHJpbmcgPSAnd2FpdGluZyc7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_events_1 = require(\"../events/vg-events\");\nvar Observable_1 = require(\"rxjs/Observable\");\nrequire(\"rxjs/add/observable/fromEvent\");\nvar VgCuePoints = (function () {\n function VgCuePoints(ref) {\n this.ref = ref;\n this.onEnterCuePoint = new core_1.EventEmitter();\n this.onUpdateCuePoint = new core_1.EventEmitter();\n this.onExitCuePoint = new core_1.EventEmitter();\n this.onCompleteCuePoint = new core_1.EventEmitter();\n this.subscriptions = [];\n this.cuesSubscriptions = [];\n this.totalCues = 0;\n }\n VgCuePoints.prototype.ngOnInit = function () {\n var onLoad = Observable_1.Observable.fromEvent(this.ref.nativeElement, vg_events_1.VgEvents.VG_LOAD);\n this.subscriptions.push(onLoad.subscribe(this.onLoad.bind(this)));\n };\n VgCuePoints.prototype.onLoad = function (event) {\n var cues = event.target.track.cues;\n this.ref.nativeElement.cues = cues;\n this.updateCuePoints(cues);\n };\n VgCuePoints.prototype.updateCuePoints = function (cues) {\n this.cuesSubscriptions.forEach(function (s) { return s.unsubscribe(); });\n for (var i = 0, l = cues.length; i < l; i++) {\n var onEnter = Observable_1.Observable.fromEvent(cues[i], vg_events_1.VgEvents.VG_ENTER);\n this.cuesSubscriptions.push(onEnter.subscribe(this.onEnter.bind(this)));\n var onExit = Observable_1.Observable.fromEvent(cues[i], vg_events_1.VgEvents.VG_EXIT);\n this.cuesSubscriptions.push(onExit.subscribe(this.onExit.bind(this)));\n }\n };\n VgCuePoints.prototype.onEnter = function (event) {\n this.onEnterCuePoint.next(event.target);\n };\n VgCuePoints.prototype.onExit = function (event) {\n this.onExitCuePoint.next(event.target);\n };\n VgCuePoints.prototype.ngDoCheck = function () {\n if (this.ref.nativeElement.cues) {\n var changes = this.totalCues !== this.ref.nativeElement.track.cues.length;\n if (changes) {\n this.totalCues = this.ref.nativeElement.track.cues.length;\n this.ref.nativeElement.cues = this.ref.nativeElement.track.cues;\n this.updateCuePoints(this.ref.nativeElement.track.cues);\n }\n }\n };\n VgCuePoints.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgCuePoints.decorators = [\n { type: core_1.Directive, args: [{\n selector: '[vgCuePoints]'\n },] },\n ];\n /** @nocollapse */\n VgCuePoints.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n ]; };\n VgCuePoints.propDecorators = {\n \"onEnterCuePoint\": [{ type: core_1.Output, args: ['onEnterCuePoint',] },],\n \"onUpdateCuePoint\": [{ type: core_1.Output, args: ['onUpdateCuePoint',] },],\n \"onExitCuePoint\": [{ type: core_1.Output, args: ['onExitCuePoint',] },],\n \"onCompleteCuePoint\": [{ type: core_1.Output, args: ['onCompleteCuePoint',] },],\n };\n return VgCuePoints;\n}());\nexports.VgCuePoints = VgCuePoints;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctY3VlLXBvaW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLWN1ZS1wb2ludHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzQ0FBK0Y7QUFDL0YsaURBQStDO0FBQy9DLDhDQUE2QztBQUM3Qyx5Q0FBdUM7O0lBaUJuQyxxQkFBbUIsR0FBZTtRQUFmLFFBQUcsR0FBSCxHQUFHLENBQVk7K0JBVjhCLElBQUksbUJBQVksRUFBRTtnQ0FDaEIsSUFBSSxtQkFBWSxFQUFFOzhCQUN0QixJQUFJLG1CQUFZLEVBQUU7a0NBQ1YsSUFBSSxtQkFBWSxFQUFFOzZCQUV4RCxFQUFFO2lDQUNFLEVBQUU7eUJBRTFCLENBQUM7S0FHWjtJQUVELDhCQUFRLEdBQVI7UUFDSSxJQUFJLE1BQU0sR0FBRyx1QkFBVSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsRUFBRSxvQkFBUSxDQUFDLE9BQU8sQ0FBQyxDQUFDO1FBQzVFLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0tBQ3JFO0lBRUQsNEJBQU0sR0FBTixVQUFPLEtBQVU7UUFDYixJQUFJLElBQUksR0FBbUIsS0FBSyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDO1FBRW5ELElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUM7UUFFbkMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUM5QjtJQUVELHFDQUFlLEdBQWYsVUFBZ0IsSUFBb0I7UUFDaEMsSUFBSSxDQUFDLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztRQUVyRCxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDO1lBQzFDLElBQUksT0FBTyxHQUFHLHVCQUFVLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBRSxDQUFDLENBQUUsRUFBRSxvQkFBUSxDQUFDLFFBQVEsQ0FBQyxDQUFDO1lBQ2pFLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFFeEUsSUFBSSxNQUFNLEdBQUcsdUJBQVUsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFFLENBQUMsQ0FBRSxFQUFFLG9CQUFRLENBQUMsT0FBTyxDQUFDLENBQUM7WUFDL0QsSUFBSSxDQUFDLGlCQUFpQixDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUN6RTtLQUNKO0lBRUQsNkJBQU8sR0FBUCxVQUFRLEtBQVU7UUFDZCxJQUFJLENBQUMsZUFBZSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUM7S0FDM0M7SUFFRCw0QkFBTSxHQUFOLFVBQU8sS0FBVTtRQUNiLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsQ0FBQztLQUMxQztJQUVELCtCQUFTLEdBQVQ7UUFDSSxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBQzlCLElBQU0sT0FBTyxHQUFHLElBQUksQ0FBQyxTQUFTLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7WUFFNUUsRUFBRSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztnQkFDVixJQUFJLENBQUMsU0FBUyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDO2dCQUMxRCxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQztnQkFDaEUsSUFBSSxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDM0Q7U0FDSjtLQUNKO0lBRUQsaUNBQVcsR0FBWDtRQUNJLElBQUksQ0FBQyxhQUFhLENBQUMsT0FBTyxDQUFDLFVBQUEsQ0FBQyxJQUFJLE9BQUEsQ0FBQyxDQUFDLFdBQVcsRUFBRSxFQUFmLENBQWUsQ0FBQyxDQUFDO0tBQ3BEOztnQkFoRUosZ0JBQVMsU0FBQztvQkFDUCxRQUFRLEVBQUUsZUFBZTtpQkFDNUI7Ozs7Z0JBUm1CLGlCQUFVOzs7b0NBVXpCLGFBQU0sU0FBQyxpQkFBaUI7cUNBQ3hCLGFBQU0sU0FBQyxrQkFBa0I7bUNBQ3pCLGFBQU0sU0FBQyxnQkFBZ0I7dUNBQ3ZCLGFBQU0sU0FBQyxvQkFBb0I7O3NCQWJoQzs7QUFTYSxrQ0FBVyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSwgRWxlbWVudFJlZiwgRXZlbnRFbWl0dGVyLCBPbkRlc3Ryb3ksIE9uSW5pdCwgT3V0cHV0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0V2ZW50cyB9IGZyb20gJy4uL2V2ZW50cy92Zy1ldmVudHMnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMvT2JzZXJ2YWJsZSc7XG5pbXBvcnQgJ3J4anMvYWRkL29ic2VydmFibGUvZnJvbUV2ZW50JztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcblxuQERpcmVjdGl2ZSh7XG4gICAgc2VsZWN0b3I6ICdbdmdDdWVQb2ludHNdJ1xufSlcbmV4cG9ydCBjbGFzcyBWZ0N1ZVBvaW50cyBpbXBsZW1lbnRzIE9uSW5pdCwgT25EZXN0cm95IHtcbiAgICBAT3V0cHV0KCdvbkVudGVyQ3VlUG9pbnQnKSBvbkVudGVyQ3VlUG9pbnQ6IEV2ZW50RW1pdHRlcjxhbnk+ID0gbmV3IEV2ZW50RW1pdHRlcigpO1xuICAgIEBPdXRwdXQoJ29uVXBkYXRlQ3VlUG9pbnQnKSBvblVwZGF0ZUN1ZVBvaW50OiBFdmVudEVtaXR0ZXI8YW55PiA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcbiAgICBAT3V0cHV0KCdvbkV4aXRDdWVQb2ludCcpIG9uRXhpdEN1ZVBvaW50OiBFdmVudEVtaXR0ZXI8YW55PiA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcbiAgICBAT3V0cHV0KCdvbkNvbXBsZXRlQ3VlUG9pbnQnKSBvbkNvbXBsZXRlQ3VlUG9pbnQ6IEV2ZW50RW1pdHRlcjxhbnk+ID0gbmV3IEV2ZW50RW1pdHRlcigpO1xuXG4gICAgc3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcbiAgICBjdWVzU3Vic2NyaXB0aW9uczogU3Vic2NyaXB0aW9uW10gPSBbXTtcblxuICAgIHRvdGFsQ3VlcyA9IDA7XG5cbiAgICBjb25zdHJ1Y3RvcihwdWJsaWMgcmVmOiBFbGVtZW50UmVmKSB7XG4gICAgfVxuXG4gICAgbmdPbkluaXQoKSB7XG4gICAgICAgIGxldCBvbkxvYWQgPSBPYnNlcnZhYmxlLmZyb21FdmVudCh0aGlzLnJlZi5uYXRpdmVFbGVtZW50LCBWZ0V2ZW50cy5WR19MT0FEKTtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2gob25Mb2FkLnN1YnNjcmliZSh0aGlzLm9uTG9hZC5iaW5kKHRoaXMpKSk7XG4gICAgfVxuXG4gICAgb25Mb2FkKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgbGV0IGN1ZXM6IFRleHRUcmFja0N1ZVtdID0gZXZlbnQudGFyZ2V0LnRyYWNrLmN1ZXM7XG5cbiAgICAgICAgdGhpcy5yZWYubmF0aXZlRWxlbWVudC5jdWVzID0gY3VlcztcblxuICAgICAgICB0aGlzLnVwZGF0ZUN1ZVBvaW50cyhjdWVzKTtcbiAgICB9XG5cbiAgICB1cGRhdGVDdWVQb2ludHMoY3VlczogVGV4dFRyYWNrQ3VlW10pIHtcbiAgICAgICAgdGhpcy5jdWVzU3Vic2NyaXB0aW9ucy5mb3JFYWNoKHMgPT4gcy51bnN1YnNjcmliZSgpKTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMCwgbCA9IGN1ZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBsZXQgb25FbnRlciA9IE9ic2VydmFibGUuZnJvbUV2ZW50KGN1ZXNbIGkgXSwgVmdFdmVudHMuVkdfRU5URVIpO1xuICAgICAgICAgICAgdGhpcy5jdWVzU3Vic2NyaXB0aW9ucy5wdXNoKG9uRW50ZXIuc3Vic2NyaWJlKHRoaXMub25FbnRlci5iaW5kKHRoaXMpKSk7XG5cbiAgICAgICAgICAgIGxldCBvbkV4aXQgPSBPYnNlcnZhYmxlLmZyb21FdmVudChjdWVzWyBpIF0sIFZnRXZlbnRzLlZHX0VYSVQpO1xuICAgICAgICAgICAgdGhpcy5jdWVzU3Vic2NyaXB0aW9ucy5wdXNoKG9uRXhpdC5zdWJzY3JpYmUodGhpcy5vbkV4aXQuYmluZCh0aGlzKSkpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgb25FbnRlcihldmVudDogYW55KSB7XG4gICAgICAgIHRoaXMub25FbnRlckN1ZVBvaW50Lm5leHQoZXZlbnQudGFyZ2V0KTtcbiAgICB9XG5cbiAgICBvbkV4aXQoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLm9uRXhpdEN1ZVBvaW50Lm5leHQoZXZlbnQudGFyZ2V0KTtcbiAgICB9XG5cbiAgICBuZ0RvQ2hlY2soKSB7XG4gICAgICAgIGlmICh0aGlzLnJlZi5uYXRpdmVFbGVtZW50LmN1ZXMpIHtcbiAgICAgICAgICAgIGNvbnN0IGNoYW5nZXMgPSB0aGlzLnRvdGFsQ3VlcyAhPT0gdGhpcy5yZWYubmF0aXZlRWxlbWVudC50cmFjay5jdWVzLmxlbmd0aDtcblxuICAgICAgICAgICAgaWYgKGNoYW5nZXMpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvdGFsQ3VlcyA9IHRoaXMucmVmLm5hdGl2ZUVsZW1lbnQudHJhY2suY3Vlcy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgdGhpcy5yZWYubmF0aXZlRWxlbWVudC5jdWVzID0gdGhpcy5yZWYubmF0aXZlRWxlbWVudC50cmFjay5jdWVzO1xuICAgICAgICAgICAgICAgIHRoaXMudXBkYXRlQ3VlUG9pbnRzKHRoaXMucmVmLm5hdGl2ZUVsZW1lbnQudHJhY2suY3Vlcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLmZvckVhY2gocyA9PiBzLnVuc3Vic2NyaWJlKCkpO1xuICAgIH1cbn1cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar VgMediaElement = (function () {\n function VgMediaElement() {\n }\n Object.defineProperty(VgMediaElement.prototype, \"audioTracks\", {\n get: function () { return null; },\n enumerable: true,\n configurable: true\n });\n ;\n VgMediaElement.prototype.addTextTrack = function (kind, label, language) {\n return null;\n };\n VgMediaElement.prototype.canPlayType = function (type) {\n return null;\n };\n VgMediaElement.prototype.load = function () {\n };\n VgMediaElement.prototype.msClearEffects = function () {\n };\n VgMediaElement.prototype.msGetAsCastingSource = function () {\n return null;\n };\n VgMediaElement.prototype.msInsertAudioEffect = function (activatableClassId, effectRequired, config) {\n };\n VgMediaElement.prototype.msSetMediaKeys = function (mediaKeys) {\n };\n VgMediaElement.prototype.msSetMediaProtectionManager = function (mediaProtectionManager) {\n };\n VgMediaElement.prototype.pause = function () {\n };\n VgMediaElement.prototype.play = function () {\n return null;\n };\n VgMediaElement.prototype.setMediaKeys = function (mediaKeys) {\n return null;\n };\n VgMediaElement.prototype.addEventListener = function (type, listener, useCapture) {\n };\n return VgMediaElement;\n}());\nexports.VgMediaElement = VgMediaElement;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctbWVkaWEtZWxlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInZnLW1lZGlhLWVsZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFQSxJQUFBOzs7SUFHSSxzQkFBSSx1Q0FBVzthQUFmLGNBQW9DLE1BQU0sQ0FBQyxJQUFJLENBQUMsRUFBRTs7O09BQUE7SUFBQSxDQUFDO0lBaURuRCxxQ0FBWSxHQUFaLFVBQWEsSUFBWSxFQUFFLEtBQWMsRUFBRSxRQUFpQjtRQUN4RCxNQUFNLENBQUMsSUFBSSxDQUFDO0tBQ2Y7SUFFRCxvQ0FBVyxHQUFYLFVBQVksSUFBWTtRQUNwQixNQUFNLENBQUMsSUFBSSxDQUFDO0tBQ2Y7SUFFRCw2QkFBSSxHQUFKO0tBQ0M7SUFFRCx1Q0FBYyxHQUFkO0tBQ0M7SUFFRCw2Q0FBb0IsR0FBcEI7UUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDO0tBQ2Y7SUFFRCw0Q0FBbUIsR0FBbkIsVUFBb0Isa0JBQTBCLEVBQUUsY0FBdUIsRUFBRSxNQUFZO0tBQ3BGO0lBRUQsdUNBQWMsR0FBZCxVQUFlLFNBQXNCO0tBQ3BDO0lBRUQsb0RBQTJCLEdBQTNCLFVBQTRCLHNCQUE0QjtLQUN2RDtJQUVELDhCQUFLLEdBQUw7S0FDQztJQUVELDZCQUFJLEdBQUo7UUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDO0tBQ2Y7SUFFRCxxQ0FBWSxHQUFaLFVBQWEsU0FBMEI7UUFDbkMsTUFBTSxDQUFDLElBQUksQ0FBQztLQUNmO0lBRUQseUNBQWdCLEdBQWhCLFVBQWlCLElBQVksRUFBRSxRQUE0QyxFQUFFLFVBQW9CO0tBQ2hHO3lCQTdGTDtJQThGQyxDQUFBO0FBNUZZLHdDQUFjIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSU1lZGlhRWxlbWVudCB9IGZyb20gJy4vaS1tZWRpYS1lbGVtZW50JztcblxuZXhwb3J0IGNsYXNzIFZnTWVkaWFFbGVtZW50IGltcGxlbWVudHMgSU1lZGlhRWxlbWVudCB7XG4gICAgaWQ6IHN0cmluZztcbiAgICBlbGVtOiBhbnk7XG4gICAgZ2V0IGF1ZGlvVHJhY2tzKCk6IEF1ZGlvVHJhY2tMaXN0IHsgcmV0dXJuIG51bGw7IH07XG4gICAgYXV0b3BsYXk6IGJvb2xlYW47XG4gICAgYnVmZmVyZWQ6IFRpbWVSYW5nZXM7XG4gICAgY29udHJvbHM6IGJvb2xlYW47XG4gICAgY3Jvc3NPcmlnaW46IHN0cmluZyB8IGFueTtcbiAgICBjdXJyZW50U3JjOiBzdHJpbmc7XG4gICAgY3VycmVudFRpbWU6IG51bWJlcjtcbiAgICBkZWZhdWx0TXV0ZWQ6IGJvb2xlYW47XG4gICAgZGVmYXVsdFBsYXliYWNrUmF0ZTogbnVtYmVyO1xuICAgIGR1cmF0aW9uOiBudW1iZXI7XG4gICAgZW5kZWQ6IGJvb2xlYW47XG4gICAgZXJyb3I6IE1lZGlhRXJyb3I7XG4gICAgbG9vcDogYm9vbGVhbjtcbiAgICBtZWRpYUtleXM6IE1lZGlhS2V5cyB8IGFueTtcbiAgICBtc0F1ZGlvQ2F0ZWdvcnk6IHN0cmluZztcbiAgICBtc0F1ZGlvRGV2aWNlVHlwZTogc3RyaW5nO1xuICAgIG1zR3JhcGhpY3NUcnVzdFN0YXR1czogTVNHcmFwaGljc1RydXN0O1xuICAgIG1zS2V5czogTVNNZWRpYUtleXM7XG4gICAgbXNQbGF5VG9EaXNhYmxlZDogYm9vbGVhbjtcbiAgICBtc1BsYXlUb1ByZWZlcnJlZFNvdXJjZVVyaTogc3RyaW5nO1xuICAgIG1zUGxheVRvUHJpbWFyeTogYm9vbGVhbjtcbiAgICBtc1BsYXlUb1NvdXJjZTogYW55O1xuICAgIG1zUmVhbFRpbWU6IGJvb2xlYW47XG4gICAgbXV0ZWQ6IGJvb2xlYW47XG4gICAgbmV0d29ya1N0YXRlOiBudW1iZXI7XG4gICAgb25lbmNyeXB0ZWQ6IChldjogTWVkaWFFbmNyeXB0ZWRFdmVudCkgPT4gYW55O1xuICAgIG9ubXNuZWVka2V5OiAoZXY6IE1TTWVkaWFLZXlOZWVkZWRFdmVudCkgPT4gYW55O1xuICAgIHBhdXNlZDogYm9vbGVhbjtcbiAgICBwbGF5YmFja1JhdGU6IG51bWJlcjtcbiAgICBwbGF5ZWQ6IFRpbWVSYW5nZXM7XG4gICAgcHJlbG9hZDogc3RyaW5nO1xuICAgIHJlYWR5U3RhdGU6IG51bWJlcjtcbiAgICBzZWVrYWJsZTogVGltZVJhbmdlcztcbiAgICBzZWVraW5nOiBib29sZWFuO1xuICAgIHNyYzogc3RyaW5nO1xuICAgIHNyY09iamVjdDogTWVkaWFTdHJlYW0gfCBhbnk7XG4gICAgdGV4dFRyYWNrczogVGV4dFRyYWNrTGlzdDtcbiAgICB2aWRlb1RyYWNrczogVmlkZW9UcmFja0xpc3Q7XG4gICAgdm9sdW1lOiBudW1iZXI7XG4gICAgSEFWRV9DVVJSRU5UX0RBVEE6IG51bWJlcjtcbiAgICBIQVZFX0VOT1VHSF9EQVRBOiBudW1iZXI7XG4gICAgSEFWRV9GVVRVUkVfREFUQTogbnVtYmVyO1xuICAgIEhBVkVfTUVUQURBVEE6IG51bWJlcjtcbiAgICBIQVZFX05PVEhJTkc6IG51bWJlcjtcbiAgICBORVRXT1JLX0VNUFRZOiBudW1iZXI7XG4gICAgTkVUV09SS19JRExFOiBudW1iZXI7XG4gICAgTkVUV09SS19MT0FESU5HOiBudW1iZXI7XG4gICAgTkVUV09SS19OT19TT1VSQ0U6IG51bWJlcjtcblxuICAgIGFkZFRleHRUcmFjayhraW5kOiBzdHJpbmcsIGxhYmVsPzogc3RyaW5nLCBsYW5ndWFnZT86IHN0cmluZyk6IFRleHRUcmFjayB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGNhblBsYXlUeXBlKHR5cGU6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGxvYWQoKTogdm9pZCB7XG4gICAgfVxuXG4gICAgbXNDbGVhckVmZmVjdHMoKTogdm9pZCB7XG4gICAgfVxuXG4gICAgbXNHZXRBc0Nhc3RpbmdTb3VyY2UoKTogYW55IHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgbXNJbnNlcnRBdWRpb0VmZmVjdChhY3RpdmF0YWJsZUNsYXNzSWQ6IHN0cmluZywgZWZmZWN0UmVxdWlyZWQ6IGJvb2xlYW4sIGNvbmZpZz86IGFueSk6IHZvaWQge1xuICAgIH1cblxuICAgIG1zU2V0TWVkaWFLZXlzKG1lZGlhS2V5czogTVNNZWRpYUtleXMpOiB2b2lkIHtcbiAgICB9XG5cbiAgICBtc1NldE1lZGlhUHJvdGVjdGlvbk1hbmFnZXIobWVkaWFQcm90ZWN0aW9uTWFuYWdlcj86IGFueSk6IHZvaWQge1xuICAgIH1cblxuICAgIHBhdXNlKCk6IHZvaWQge1xuICAgIH1cblxuICAgIHBsYXkoKTogUHJvbWlzZTxhbnk+IHtcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgc2V0TWVkaWFLZXlzKG1lZGlhS2V5czogTWVkaWFLZXlzIHwgYW55KTogUHJvbWlzZTx2b2lkPiB7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGFkZEV2ZW50TGlzdGVuZXIodHlwZTogc3RyaW5nLCBsaXN0ZW5lcjogRXZlbnRMaXN0ZW5lck9yRXZlbnRMaXN0ZW5lck9iamVjdCwgdXNlQ2FwdHVyZT86IGJvb2xlYW4pOiB2b2lkIHtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar Observable_1 = require(\"rxjs/Observable\");\nvar TimerObservable_1 = require(\"rxjs/observable/TimerObservable\");\nvar vg_states_1 = require(\"../states/vg-states\");\nvar vg_api_1 = require(\"../services/vg-api\");\nvar vg_events_1 = require(\"../events/vg-events\");\nvar Subject_1 = require(\"rxjs/Subject\");\nrequire(\"rxjs/add/observable/fromEvent\");\nrequire(\"rxjs/add/observable/combineLatest\");\nvar VgMedia = (function () {\n function VgMedia(api, ref) {\n this.api = api;\n this.ref = ref;\n this.state = vg_states_1.VgStates.VG_PAUSED;\n this.time = { current: 0, total: 0, left: 0 };\n this.buffer = { end: 0 };\n this.canPlay = false;\n this.canPlayThrough = false;\n this.isMetadataLoaded = false;\n this.isWaiting = false;\n this.isCompleted = false;\n this.isLive = false;\n this.isBufferDetected = false;\n this.checkInterval = 200;\n this.currentPlayPos = 0;\n this.lastPlayPos = 0;\n this.playAtferSync = false;\n this.bufferDetected = new Subject_1.Subject();\n }\n VgMedia.prototype.ngOnInit = function () {\n var _this = this;\n if (this.vgMedia.nodeName) {\n // It's a native element\n this.elem = this.vgMedia;\n }\n else {\n // It's an Angular Class\n this.elem = this.vgMedia.elem;\n }\n // Just in case we're creating this vgMedia dynamically register again into API\n this.api.registerMedia(this);\n this.subscriptions = {\n // Native events\n abort: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_ABORT),\n canPlay: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_CAN_PLAY),\n canPlayThrough: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_CAN_PLAY_THROUGH),\n durationChange: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_DURATION_CHANGE),\n emptied: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_EMPTIED),\n encrypted: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_ENCRYPTED),\n ended: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_ENDED),\n error: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_ERROR),\n loadedData: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_LOADED_DATA),\n loadedMetadata: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_LOADED_METADATA),\n loadStart: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_LOAD_START),\n pause: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_PAUSE),\n play: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_PLAY),\n playing: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_PLAYING),\n progress: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_PROGRESS),\n rateChange: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_RATE_CHANGE),\n seeked: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_SEEKED),\n seeking: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_SEEKING),\n stalled: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_STALLED),\n suspend: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_SUSPEND),\n timeUpdate: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_TIME_UPDATE),\n volumeChange: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_VOLUME_CHANGE),\n waiting: Observable_1.Observable.fromEvent(this.elem, vg_events_1.VgEvents.VG_WAITING),\n // Advertisement only events\n startAds: Observable_1.Observable.fromEvent(window, vg_events_1.VgEvents.VG_START_ADS),\n endAds: Observable_1.Observable.fromEvent(window, vg_events_1.VgEvents.VG_END_ADS),\n // See changes on <source> child elements to reload the video file\n mutation: Observable_1.Observable.create(function (observer) {\n var domObs = new MutationObserver(function (mutations) {\n observer.next(mutations);\n });\n domObs.observe(_this.elem, { childList: true, attributes: true });\n return function () {\n domObs.disconnect();\n };\n }),\n // Custom buffering detection\n bufferDetected: this.bufferDetected\n };\n this.mutationObs = this.subscriptions.mutation.subscribe(this.onMutation.bind(this));\n this.canPlayObs = this.subscriptions.canPlay.subscribe(this.onCanPlay.bind(this));\n this.canPlayThroughObs = this.subscriptions.canPlayThrough.subscribe(this.onCanPlayThrough.bind(this));\n this.loadedMetadataObs = this.subscriptions.loadedMetadata.subscribe(this.onLoadMetadata.bind(this));\n this.waitingObs = this.subscriptions.waiting.subscribe(this.onWait.bind(this));\n this.progressObs = this.subscriptions.progress.subscribe(this.onProgress.bind(this));\n this.endedObs = this.subscriptions.ended.subscribe(this.onComplete.bind(this));\n this.playingObs = this.subscriptions.playing.subscribe(this.onStartPlaying.bind(this));\n this.playObs = this.subscriptions.play.subscribe(this.onPlay.bind(this));\n this.pauseObs = this.subscriptions.pause.subscribe(this.onPause.bind(this));\n this.timeUpdateObs = this.subscriptions.timeUpdate.subscribe(this.onTimeUpdate.bind(this));\n this.volumeChangeObs = this.subscriptions.volumeChange.subscribe(this.onVolumeChange.bind(this));\n this.errorObs = this.subscriptions.error.subscribe(this.onError.bind(this));\n if (this.vgMaster) {\n this.api.playerReadyEvent.subscribe(function () {\n _this.prepareSync();\n });\n }\n };\n VgMedia.prototype.prepareSync = function () {\n var _this = this;\n var canPlayAll = [];\n for (var media in this.api.medias) {\n if (this.api.medias[media]) {\n canPlayAll.push(this.api.medias[media].subscriptions.canPlay);\n }\n }\n this.canPlayAllSubscription = Observable_1.Observable.combineLatest(canPlayAll, function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n var allReady = params.some(function (event) { return event.target.readyState === 4; });\n if (allReady && !_this.syncSubscription) {\n _this.startSync();\n _this.syncSubscription.unsubscribe();\n }\n }).subscribe();\n };\n VgMedia.prototype.startSync = function () {\n var _this = this;\n this.syncSubscription = TimerObservable_1.TimerObservable.create(0, 1000).subscribe(function () {\n for (var media in _this.api.medias) {\n if (_this.api.medias[media] !== _this) {\n var diff = _this.api.medias[media].currentTime - _this.currentTime;\n if (diff < -0.3 || diff > 0.3) {\n _this.playAtferSync = (_this.state === vg_states_1.VgStates.VG_PLAYING);\n _this.pause();\n _this.api.medias[media].pause();\n _this.api.medias[media].currentTime = _this.currentTime;\n }\n else {\n if (_this.playAtferSync) {\n _this.play();\n _this.api.medias[media].play();\n _this.playAtferSync = false;\n }\n }\n }\n }\n });\n };\n VgMedia.prototype.onMutation = function (mutations) {\n // Detect changes only for source elements or src attribute\n for (var i = 0, l = mutations.length; i < l; i++) {\n var mut = mutations[i];\n if (mut.type === 'attributes' && mut.attributeName === 'src') {\n // Only load src file if it's not a blob (for DASH / HLS sources)\n if (mut.target['src'] && mut.target['src'].length > 0 && mut.target['src'].indexOf('blob:') < 0) {\n this.loadMedia();\n break;\n }\n }\n else if (mut.type === 'childList' && mut.removedNodes.length && mut.removedNodes[0].nodeName.toLowerCase() === 'source') {\n this.loadMedia();\n break;\n }\n }\n };\n VgMedia.prototype.loadMedia = function () {\n var _this = this;\n this.vgMedia.pause();\n this.vgMedia.currentTime = 0;\n // Start buffering until we can play the media file\n this.stopBufferCheck();\n this.isBufferDetected = true;\n this.bufferDetected.next(this.isBufferDetected);\n // TODO: This is ugly, we should find something cleaner. For some reason a TimerObservable doesn't works.\n setTimeout(function () { return _this.vgMedia.load(); }, 10);\n };\n VgMedia.prototype.play = function () {\n var _this = this;\n // short-circuit if already playing\n if (this.playPromise || (this.state !== vg_states_1.VgStates.VG_PAUSED && this.state !== vg_states_1.VgStates.VG_ENDED)) {\n return;\n }\n this.playPromise = this.vgMedia.play();\n // browser has async play promise\n if (this.playPromise && this.playPromise.then && this.playPromise.catch) {\n this.playPromise\n .then(function () {\n _this.playPromise = null;\n })\n .catch(function () {\n // deliberately empty for the sake of eating console noise\n });\n }\n return this.playPromise;\n };\n VgMedia.prototype.pause = function () {\n var _this = this;\n // browser has async play promise\n if (this.playPromise) {\n this.playPromise\n .then(function () {\n _this.vgMedia.pause();\n });\n }\n else {\n this.vgMedia.pause();\n }\n };\n Object.defineProperty(VgMedia.prototype, \"id\", {\n get: function () {\n // We should return undefined if vgMedia still doesn't exist\n var result = undefined;\n if (this.vgMedia) {\n result = this.vgMedia.id;\n }\n return result;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"duration\", {\n get: function () {\n return this.vgMedia.duration;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"currentTime\", {\n get: function () {\n return this.vgMedia.currentTime;\n },\n set: function (seconds) {\n this.vgMedia.currentTime = seconds;\n // this.elem.dispatchEvent(new CustomEvent(VgEvents.VG_SEEK));\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"volume\", {\n get: function () {\n return this.vgMedia.volume;\n },\n set: function (volume) {\n this.vgMedia.volume = volume;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"playbackRate\", {\n get: function () {\n return this.vgMedia.playbackRate;\n },\n set: function (rate) {\n this.vgMedia.playbackRate = rate;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"buffered\", {\n get: function () {\n return this.vgMedia.buffered;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(VgMedia.prototype, \"textTracks\", {\n get: function () {\n return this.vgMedia.textTracks;\n },\n enumerable: true,\n configurable: true\n });\n VgMedia.prototype.onCanPlay = function (event) {\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n this.canPlay = true;\n this.ref.detectChanges();\n };\n VgMedia.prototype.onCanPlayThrough = function (event) {\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n this.canPlayThrough = true;\n this.ref.detectChanges();\n };\n VgMedia.prototype.onLoadMetadata = function (event) {\n this.isMetadataLoaded = true;\n this.time = {\n current: 0,\n left: 0,\n total: this.duration * 1000\n };\n this.state = vg_states_1.VgStates.VG_PAUSED;\n // Live streaming check\n var t = Math.round(this.time.total);\n this.isLive = (t === Infinity);\n this.ref.detectChanges();\n };\n VgMedia.prototype.onWait = function (event) {\n this.isWaiting = true;\n this.ref.detectChanges();\n };\n VgMedia.prototype.onComplete = function (event) {\n this.isCompleted = true;\n this.state = vg_states_1.VgStates.VG_ENDED;\n this.ref.detectChanges();\n };\n VgMedia.prototype.onStartPlaying = function (event) {\n this.state = vg_states_1.VgStates.VG_PLAYING;\n this.ref.detectChanges();\n };\n VgMedia.prototype.onPlay = function (event) {\n this.state = vg_states_1.VgStates.VG_PLAYING;\n if (this.vgMaster) {\n if (!this.syncSubscription || this.syncSubscription.closed) {\n this.startSync();\n }\n }\n this.startBufferCheck();\n this.ref.detectChanges();\n };\n VgMedia.prototype.onPause = function (event) {\n this.state = vg_states_1.VgStates.VG_PAUSED;\n if (this.vgMaster) {\n if (!this.playAtferSync) {\n this.syncSubscription.unsubscribe();\n }\n }\n this.stopBufferCheck();\n this.ref.detectChanges();\n };\n VgMedia.prototype.onTimeUpdate = function (event) {\n var end = this.buffered.length - 1;\n this.time = {\n current: this.currentTime * 1000,\n total: this.time.total,\n left: (this.duration - this.currentTime) * 1000\n };\n if (end >= 0) {\n this.buffer = { end: this.buffered.end(end) * 1000 };\n }\n this.ref.detectChanges();\n };\n VgMedia.prototype.onProgress = function (event) {\n var end = this.buffered.length - 1;\n if (end >= 0) {\n this.buffer = { end: this.buffered.end(end) * 1000 };\n }\n this.ref.detectChanges();\n };\n VgMedia.prototype.onVolumeChange = function (event) {\n // TODO: Save to localstorage the current volume\n this.ref.detectChanges();\n };\n VgMedia.prototype.onError = function (event) {\n // TODO: Handle error messages\n this.ref.detectChanges();\n };\n // http://stackoverflow.com/a/23828241/779529\n // http://stackoverflow.com/a/23828241/779529\n VgMedia.prototype.bufferCheck = \n // http://stackoverflow.com/a/23828241/779529\n function () {\n var offset = 1 / this.checkInterval;\n this.currentPlayPos = this.currentTime;\n if (!this.isBufferDetected && this.currentPlayPos < (this.lastPlayPos + offset)) {\n this.isBufferDetected = true;\n }\n if (this.isBufferDetected && this.currentPlayPos > (this.lastPlayPos + offset)) {\n this.isBufferDetected = false;\n }\n // Prevent calls to bufferCheck after ngOnDestroy have been called\n if (!this.bufferDetected.closed) {\n this.bufferDetected.next(this.isBufferDetected);\n }\n this.lastPlayPos = this.currentPlayPos;\n };\n VgMedia.prototype.startBufferCheck = function () {\n var _this = this;\n this.checkBufferSubscription = TimerObservable_1.TimerObservable.create(0, this.checkInterval).subscribe(function () {\n _this.bufferCheck();\n });\n };\n VgMedia.prototype.stopBufferCheck = function () {\n if (this.checkBufferSubscription) {\n this.checkBufferSubscription.unsubscribe();\n }\n this.isBufferDetected = false;\n this.bufferDetected.next(this.isBufferDetected);\n };\n VgMedia.prototype.seekTime = function (value, byPercent) {\n if (byPercent === void 0) { byPercent = false; }\n var second;\n var duration = this.duration;\n if (byPercent) {\n second = value * duration / 100;\n }\n else {\n second = value;\n }\n this.currentTime = second;\n };\n VgMedia.prototype.addTextTrack = function (type, label, language, mode) {\n var newTrack = this.vgMedia.addTextTrack(type, label, language);\n if (mode) {\n newTrack.mode = mode;\n }\n return newTrack;\n };\n VgMedia.prototype.ngOnDestroy = function () {\n this.vgMedia.src = '';\n this.mutationObs.unsubscribe();\n this.canPlayObs.unsubscribe();\n this.canPlayThroughObs.unsubscribe();\n this.loadedMetadataObs.unsubscribe();\n this.waitingObs.unsubscribe();\n this.progressObs.unsubscribe();\n this.endedObs.unsubscribe();\n this.playingObs.unsubscribe();\n this.playObs.unsubscribe();\n this.pauseObs.unsubscribe();\n this.timeUpdateObs.unsubscribe();\n this.volumeChangeObs.unsubscribe();\n this.errorObs.unsubscribe();\n if (this.checkBufferSubscription) {\n this.checkBufferSubscription.unsubscribe();\n }\n if (this.syncSubscription) {\n this.syncSubscription.unsubscribe();\n }\n this.bufferDetected.complete();\n this.bufferDetected.unsubscribe();\n this.api.unregisterMedia(this);\n };\n VgMedia.decorators = [\n { type: core_1.Directive, args: [{\n selector: '[vgMedia]'\n },] },\n ];\n /** @nocollapse */\n VgMedia.ctorParameters = function () { return [\n { type: vg_api_1.VgAPI, },\n { type: core_1.ChangeDetectorRef, },\n ]; };\n VgMedia.propDecorators = {\n \"vgMedia\": [{ type: core_1.Input },],\n \"vgMaster\": [{ type: core_1.Input },],\n };\n return VgMedia;\n}());\nexports.VgMedia = VgMedia;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctbWVkaWEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ2Zy1tZWRpYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNDQUFtRztBQUVuRyw4Q0FBNkM7QUFDN0MsbUVBQWtFO0FBR2xFLGlEQUErQztBQUMvQyw2Q0FBMkM7QUFDM0MsaURBQStDO0FBQy9DLHdDQUF1QztBQUd2Qyx5Q0FBdUM7QUFDdkMsNkNBQTJDOztJQXNEdkMsaUJBQW9CLEdBQVUsRUFBVSxHQUFzQjtRQUExQyxRQUFHLEdBQUgsR0FBRyxDQUFPO1FBQVUsUUFBRyxHQUFILEdBQUcsQ0FBbUI7cUJBM0M5QyxvQkFBUSxDQUFDLFNBQVM7b0JBRXRCLEVBQUUsT0FBTyxFQUFFLENBQUMsRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUU7c0JBQy9CLEVBQUUsR0FBRyxFQUFFLENBQUMsRUFBRTt1QkFJTCxLQUFLOzhCQUNFLEtBQUs7Z0NBQ0gsS0FBSzt5QkFDWixLQUFLOzJCQUNILEtBQUs7c0JBQ1YsS0FBSztnQ0FFSyxLQUFLOzZCQUVULEdBQUc7OEJBQ0YsQ0FBQzsyQkFDSixDQUFDOzZCQUtFLEtBQUs7OEJBZ0JLLElBQUksaUJBQU8sRUFBRTtLQU0vQztJQUVELDBCQUFRLEdBQVI7UUFBQSxpQkFtRkM7UUFsRkcsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDOztZQUV4QixJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUM7U0FDNUI7UUFBQyxJQUFJLENBQUMsQ0FBQzs7WUFFSixJQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDO1NBQ2pDOztRQUdELElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBRTdCLElBQUksQ0FBQyxhQUFhLEdBQUc7O1lBRWpCLEtBQUssRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsUUFBUSxDQUFDO1lBQzlELE9BQU8sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsV0FBVyxDQUFDO1lBQ25FLGNBQWMsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsbUJBQW1CLENBQUM7WUFDbEYsY0FBYyxFQUFFLHVCQUFVLENBQUMsU0FBUyxDQUFNLElBQUksQ0FBQyxJQUFJLEVBQUUsb0JBQVEsQ0FBQyxrQkFBa0IsQ0FBQztZQUNqRixPQUFPLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLFVBQVUsQ0FBQztZQUNsRSxTQUFTLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLFlBQVksQ0FBQztZQUN0RSxLQUFLLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLFFBQVEsQ0FBQztZQUM5RCxLQUFLLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLFFBQVEsQ0FBQztZQUM5RCxVQUFVLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLGNBQWMsQ0FBQztZQUN6RSxjQUFjLEVBQUUsdUJBQVUsQ0FBQyxTQUFTLENBQU0sSUFBSSxDQUFDLElBQUksRUFBRSxvQkFBUSxDQUFDLGtCQUFrQixDQUFDO1lBQ2pGLFNBQVMsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsYUFBYSxDQUFDO1lBQ3ZFLEtBQUssRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsUUFBUSxDQUFDO1lBQzlELElBQUksRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsT0FBTyxDQUFDO1lBQzVELE9BQU8sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsVUFBVSxDQUFDO1lBQ2xFLFFBQVEsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsV0FBVyxDQUFDO1lBQ3BFLFVBQVUsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsY0FBYyxDQUFDO1lBQ3pFLE1BQU0sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsU0FBUyxDQUFDO1lBQ2hFLE9BQU8sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsVUFBVSxDQUFDO1lBQ2xFLE9BQU8sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsVUFBVSxDQUFDO1lBQ2xFLE9BQU8sRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsVUFBVSxDQUFDO1lBQ2xFLFVBQVUsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsY0FBYyxDQUFDO1lBQ3pFLFlBQVksRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxJQUFJLENBQUMsSUFBSSxFQUFFLG9CQUFRLENBQUMsZ0JBQWdCLENBQUM7WUFDN0UsT0FBTyxFQUFFLHVCQUFVLENBQUMsU0FBUyxDQUFNLElBQUksQ0FBQyxJQUFJLEVBQUUsb0JBQVEsQ0FBQyxVQUFVLENBQUM7O1lBR2xFLFFBQVEsRUFBRSx1QkFBVSxDQUFDLFNBQVMsQ0FBTSxNQUFNLEVBQUUsb0JBQVEsQ0FBQyxZQUFZLENBQUM7WUFDbEUsTUFBTSxFQUFFLHVCQUFVLENBQUMsU0FBUyxDQUFNLE1BQU0sRUFBRSxvQkFBUSxDQUFDLFVBQVUsQ0FBQzs7WUFHOUQsUUFBUSxFQUFFLHVCQUFVLENBQUMsTUFBTSxDQUN2QixVQUFDLFFBQWE7Z0JBRVYsSUFBSSxNQUFNLEdBQUcsSUFBSSxnQkFBZ0IsQ0FBQyxVQUFDLFNBQVM7b0JBQ3hDLFFBQVEsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUM7aUJBQzVCLENBQUMsQ0FBQztnQkFFSCxNQUFNLENBQUMsT0FBTyxDQUFNLEtBQUksQ0FBQyxJQUFJLEVBQUUsRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsQ0FBQyxDQUFDO2dCQUV0RSxNQUFNLENBQUM7b0JBQ0gsTUFBTSxDQUFDLFVBQVUsRUFBRSxDQUFDO2lCQUN2QixDQUFDO2FBQ0wsQ0FDSjs7WUFHRCxjQUFjLEVBQUUsSUFBSSxDQUFDLGNBQWM7U0FDdEMsQ0FBQztRQUVGLElBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDckYsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUNsRixJQUFJLENBQUMsaUJBQWlCLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxjQUFjLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUN2RyxJQUFJLENBQUMsaUJBQWlCLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxjQUFjLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDckcsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUMvRSxJQUFJLENBQUMsV0FBVyxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ3JGLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDL0UsSUFBSSxDQUFDLFVBQVUsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUN2RixJQUFJLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ3pFLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFDNUUsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLENBQUMsYUFBYSxDQUFDLFVBQVUsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztRQUMzRixJQUFJLENBQUMsZUFBZSxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUMsWUFBWSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1FBQ2pHLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7UUFFNUUsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUM7WUFDaEIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxnQkFBZ0IsQ0FBQyxTQUFTLENBQy9CO2dCQUNJLEtBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQzthQUN0QixDQUNKLENBQUM7U0FDTDtLQUNKO0lBRUQsNkJBQVcsR0FBWDtRQUFBLGlCQW1CQztRQWxCRyxJQUFJLFVBQVUsR0FBMkIsRUFBRSxDQUFDO1FBRTVDLEdBQUcsQ0FBQyxDQUFDLElBQUksS0FBSyxJQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztZQUNoQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBRSxLQUFLLENBQUUsQ0FBQyxDQUFDLENBQUM7Z0JBQzNCLFVBQVUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUUsS0FBSyxDQUFFLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxDQUFDO2FBQ25FO1NBQ0o7UUFFRCxJQUFJLENBQUMsc0JBQXNCLEdBQUcsdUJBQVUsQ0FBQyxhQUFhLENBQUMsVUFBVSxFQUM3RDtZQUFDLGdCQUFTO2lCQUFULFVBQVMsRUFBVCxxQkFBUyxFQUFULElBQVM7Z0JBQVQsMkJBQVM7O1lBQ04sSUFBSSxRQUFRLEdBQVksTUFBTSxDQUFDLElBQUksQ0FBQyxVQUFBLEtBQUssSUFBSSxPQUFBLEtBQUssQ0FBQyxNQUFNLENBQUMsVUFBVSxLQUFLLENBQUMsRUFBN0IsQ0FBNkIsQ0FBQyxDQUFDO1lBRTVFLEVBQUUsQ0FBQyxDQUFDLFFBQVEsSUFBSSxDQUFDLEtBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7Z0JBQ3JDLEtBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztnQkFDakIsS0FBSSxDQUFDLGdCQUFnQixDQUFDLFdBQVcsRUFBRSxDQUFDO2FBQ3ZDO1NBQ0osQ0FDSixDQUFDLFNBQVMsRUFBRSxDQUFDO0tBQ2pCO0lBRUQsMkJBQVMsR0FBVDtRQUFBLGlCQXlCQztRQXhCRyxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsaUNBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxDQUFDLFNBQVMsQ0FDN0Q7WUFDSSxHQUFHLENBQUMsQ0FBQyxJQUFJLEtBQUssSUFBSSxLQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7Z0JBQ2hDLEVBQUUsQ0FBQyxDQUFDLEtBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFFLEtBQUssQ0FBRSxLQUFLLEtBQUksQ0FBQyxDQUFDLENBQUM7b0JBQ3BDLElBQUksSUFBSSxHQUFXLEtBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFFLEtBQUssQ0FBRSxDQUFDLFdBQVcsR0FBRyxLQUFJLENBQUMsV0FBVyxDQUFDO29CQUUzRSxFQUFFLENBQUMsQ0FBQyxJQUFJLEdBQUcsQ0FBQyxHQUFHLElBQUksSUFBSSxHQUFHLEdBQUcsQ0FBQyxDQUFDLENBQUM7d0JBQzVCLEtBQUksQ0FBQyxhQUFhLEdBQUcsQ0FBQyxLQUFJLENBQUMsS0FBSyxLQUFLLG9CQUFRLENBQUMsVUFBVSxDQUFDLENBQUM7d0JBRTFELEtBQUksQ0FBQyxLQUFLLEVBQUUsQ0FBQzt3QkFDYixLQUFJLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBRSxLQUFLLENBQUUsQ0FBQyxLQUFLLEVBQUUsQ0FBQzt3QkFDakMsS0FBSSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUUsS0FBSyxDQUFFLENBQUMsV0FBVyxHQUFHLEtBQUksQ0FBQyxXQUFXLENBQUM7cUJBQzNEO29CQUNELElBQUksQ0FBQyxDQUFDO3dCQUNGLEVBQUUsQ0FBQyxDQUFDLEtBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDOzRCQUNyQixLQUFJLENBQUMsSUFBSSxFQUFFLENBQUM7NEJBQ1osS0FBSSxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUUsS0FBSyxDQUFFLENBQUMsSUFBSSxFQUFFLENBQUM7NEJBQ2hDLEtBQUksQ0FBQyxhQUFhLEdBQUcsS0FBSyxDQUFDO3lCQUM5QjtxQkFDSjtpQkFDSjthQUNKO1NBQ0osQ0FDSixDQUFDO0tBQ0w7SUFFRCw0QkFBVSxHQUFWLFVBQVcsU0FBZ0M7O1FBRXZDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFDLENBQUMsRUFBRSxDQUFDLEdBQUMsU0FBUyxDQUFDLE1BQU0sRUFBRSxDQUFDLEdBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxFQUFFLENBQUM7WUFDekMsSUFBSSxHQUFHLEdBQW1CLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUV2QyxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsSUFBSSxLQUFLLFlBQVksSUFBSSxHQUFHLENBQUMsYUFBYSxLQUFLLEtBQUssQ0FBQyxDQUFDLENBQUM7O2dCQUUzRCxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLEdBQUcsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsTUFBTSxHQUFHLENBQUMsSUFBSSxHQUFHLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO29CQUM5RixJQUFJLENBQUMsU0FBUyxFQUFFLENBQUM7b0JBQ2pCLEtBQUssQ0FBQztpQkFDVDthQUNKO1lBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxJQUFJLEtBQUssV0FBVyxJQUFJLEdBQUcsQ0FBQyxZQUFZLENBQUMsTUFBTSxJQUFJLEdBQUcsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLFdBQVcsRUFBRSxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUM7Z0JBQ3hILElBQUksQ0FBQyxTQUFTLEVBQUUsQ0FBQztnQkFDakIsS0FBSyxDQUFDO2FBQ1Q7U0FDSjtLQUNKO0lBRUQsMkJBQVMsR0FBVDtRQUFBLGlCQVdDO1FBVkcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztRQUNyQixJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsR0FBRyxDQUFDLENBQUM7O1FBRzdCLElBQUksQ0FBQyxlQUFlLEVBQUUsQ0FBQztRQUN2QixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDO1FBQzdCLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDOztRQUdoRCxVQUFVLENBQUMsY0FBTSxPQUFBLEtBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxFQUFFLEVBQW5CLENBQW1CLEVBQUUsRUFBRSxDQUFDLENBQUM7S0FDN0M7SUFFRCxzQkFBSSxHQUFKO1FBQUEsaUJBb0JDOztRQWxCRyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssS0FBSyxvQkFBUSxDQUFDLFNBQVMsSUFBSSxJQUFJLENBQUMsS0FBSyxLQUFLLG9CQUFRLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQzlGLE1BQU0sQ0FBQztTQUNWO1FBRUQsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxDQUFDOztRQUd2QyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsV0FBVyxJQUFJLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztZQUN0RSxJQUFJLENBQUMsV0FBVztpQkFDWCxJQUFJLENBQUM7Z0JBQ0YsS0FBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUM7YUFDM0IsQ0FBQztpQkFDRCxLQUFLLENBQUM7O2FBRU4sQ0FBQyxDQUFDO1NBQ1Y7UUFFRCxNQUFNLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQztLQUMzQjtJQUVELHVCQUFLLEdBQUw7UUFBQSxpQkFXQzs7UUFURyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztZQUNuQixJQUFJLENBQUMsV0FBVztpQkFDWCxJQUFJLENBQUM7Z0JBQ0YsS0FBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQzthQUN4QixDQUFDLENBQUM7U0FDVjtRQUNELElBQUksQ0FBQyxDQUFDO1lBQ0YsSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztTQUN4QjtLQUNKO0lBRUQsc0JBQUksdUJBQUU7YUFBTjs7WUFFSSxJQUFJLE1BQU0sR0FBRyxTQUFTLENBQUM7WUFFdkIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7Z0JBQ2YsTUFBTSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDO2FBQzVCO1lBRUQsTUFBTSxDQUFDLE1BQU0sQ0FBQztTQUNqQjs7O09BQUE7SUFFRCxzQkFBSSw2QkFBUTthQUFaO1lBQ0ksTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDO1NBQ2hDOzs7T0FBQTtJQUVELHNCQUFJLGdDQUFXO2FBS2Y7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUM7U0FDbkM7YUFQRCxVQUFnQixPQUFPO1lBQ25CLElBQUksQ0FBQyxPQUFPLENBQUMsV0FBVyxHQUFHLE9BQU8sQ0FBQzs7U0FFdEM7OztPQUFBO0lBTUQsc0JBQUksMkJBQU07YUFJVjtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQztTQUM5QjthQU5ELFVBQVcsTUFBTTtZQUNiLElBQUksQ0FBQyxPQUFPLENBQUMsTUFBTSxHQUFHLE1BQU0sQ0FBQztTQUNoQzs7O09BQUE7SUFNRCxzQkFBSSxpQ0FBWTthQUloQjtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFlBQVksQ0FBQztTQUNwQzthQU5ELFVBQWlCLElBQUk7WUFDakIsSUFBSSxDQUFDLE9BQU8sQ0FBQyxZQUFZLEdBQUcsSUFBSSxDQUFDO1NBQ3BDOzs7T0FBQTtJQU1ELHNCQUFJLDZCQUFRO2FBQVo7WUFDSSxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUM7U0FDaEM7OztPQUFBO0lBRUQsc0JBQUksK0JBQVU7YUFBZDtZQUNJLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQztTQUNsQzs7O09BQUE7SUFFRCwyQkFBUyxHQUFULFVBQVUsS0FBVTtRQUNoQixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDO1FBQzlCLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO1FBQ2hELElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDO1FBQ3BCLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUM7S0FDNUI7SUFFRCxrQ0FBZ0IsR0FBaEIsVUFBaUIsS0FBVTtRQUN2QixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDO1FBQzlCLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO1FBQ2hELElBQUksQ0FBQyxjQUFjLEdBQUcsSUFBSSxDQUFDO1FBQzNCLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUM7S0FDNUI7SUFFRCxnQ0FBYyxHQUFkLFVBQWUsS0FBVTtRQUNyQixJQUFJLENBQUMsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDO1FBRTdCLElBQUksQ0FBQyxJQUFJLEdBQUc7WUFDUixPQUFPLEVBQUUsQ0FBQztZQUNWLElBQUksRUFBRSxDQUFDO1lBQ1AsS0FBSyxFQUFFLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSTtTQUM5QixDQUFDO1FBRUYsSUFBSSxDQUFDLEtBQUssR0FBRyxvQkFBUSxDQUFDLFNBQVMsQ0FBQzs7UUFHaEMsSUFBSSxDQUFDLEdBQVUsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzNDLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLEtBQUssUUFBUSxDQUFDLENBQUM7UUFDL0IsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsQ0FBQztLQUM1QjtJQUVELHdCQUFNLEdBQU4sVUFBTyxLQUFVO1FBQ2IsSUFBSSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUM7UUFDdEIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsQ0FBQztLQUM1QjtJQUVELDRCQUFVLEdBQVYsVUFBVyxLQUFVO1FBQ2pCLElBQUksQ0FBQyxXQUFXLEdBQUcsSUFBSSxDQUFDO1FBQ3hCLElBQUksQ0FBQyxLQUFLLEdBQUcsb0JBQVEsQ0FBQyxRQUFRLENBQUM7UUFDL0IsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsQ0FBQztLQUM1QjtJQUVELGdDQUFjLEdBQWQsVUFBZSxLQUFVO1FBQ3JCLElBQUksQ0FBQyxLQUFLLEdBQUcsb0JBQVEsQ0FBQyxVQUFVLENBQUM7UUFDakMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsQ0FBQztLQUM1QjtJQUVELHdCQUFNLEdBQU4sVUFBTyxLQUFVO1FBQ2IsSUFBSSxDQUFDLEtBQUssR0FBRyxvQkFBUSxDQUFDLFVBQVUsQ0FBQztRQUVqQyxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQztZQUNoQixFQUFFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsSUFBSSxJQUFJLENBQUMsZ0JBQWdCLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQztnQkFDekQsSUFBSSxDQUFDLFNBQVMsRUFBRSxDQUFDO2FBQ3BCO1NBQ0o7UUFFRCxJQUFJLENBQUMsZ0JBQWdCLEVBQUUsQ0FBQztRQUN4QixJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsRUFBRSxDQUFDO0tBQzVCO0lBRUQseUJBQU8sR0FBUCxVQUFRLEtBQVU7UUFDZCxJQUFJLENBQUMsS0FBSyxHQUFHLG9CQUFRLENBQUMsU0FBUyxDQUFDO1FBRWhDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDO1lBQ2hCLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7Z0JBQ3RCLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxXQUFXLEVBQUUsQ0FBQzthQUN2QztTQUNKO1FBRUQsSUFBSSxDQUFDLGVBQWUsRUFBRSxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUM7S0FDNUI7SUFFRCw4QkFBWSxHQUFaLFVBQWEsS0FBVTtRQUNuQixJQUFJLEdBQUcsR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUM7UUFFbkMsSUFBSSxDQUFDLElBQUksR0FBRztZQUNSLE9BQU8sRUFBRSxJQUFJLENBQUMsV0FBVyxHQUFHLElBQUk7WUFDaEMsS0FBSyxFQUFFLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSztZQUN0QixJQUFJLEVBQUUsQ0FBQyxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxJQUFJO1NBQ2xELENBQUM7UUFFRixFQUFFLENBQUMsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUNYLElBQUksQ0FBQyxNQUFNLEdBQUcsRUFBRSxHQUFHLEVBQUUsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsSUFBSSxFQUFFLENBQUM7U0FDeEQ7UUFDRCxJQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsRUFBRSxDQUFDO0tBQzVCO0lBRUQsNEJBQVUsR0FBVixVQUFXLEtBQVU7UUFDakIsSUFBSSxHQUFHLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDO1FBRW5DLEVBQUUsQ0FBQyxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ1gsSUFBSSxDQUFDLE1BQU0sR0FBRyxFQUFFLEdBQUcsRUFBRSxJQUFJLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxJQUFJLEVBQUUsQ0FBQztTQUN4RDtRQUNELElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUM7S0FDNUI7SUFFRCxnQ0FBYyxHQUFkLFVBQWUsS0FBVTs7UUFFckIsSUFBSSxDQUFDLEdBQUcsQ0FBQyxhQUFhLEVBQUUsQ0FBQztLQUM1QjtJQUVELHlCQUFPLEdBQVAsVUFBUSxLQUFVOztRQUVkLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUM7S0FDNUI7SUFFRCw2Q0FBNkM7O0lBQzdDLDZCQUFXOztJQUFYO1FBQ0ksSUFBTSxNQUFNLEdBQUcsQ0FBQyxHQUFHLElBQUksQ0FBQyxhQUFhLENBQUM7UUFDdEMsSUFBSSxDQUFDLGNBQWMsR0FBRyxJQUFJLENBQUMsV0FBVyxDQUFDO1FBRXZDLEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFnQixJQUFJLElBQUksQ0FBQyxjQUFjLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUM5RSxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsSUFBSSxDQUFDO1NBQ2hDO1FBRUQsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLGdCQUFnQixJQUFJLElBQUksQ0FBQyxjQUFjLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxHQUFHLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQztZQUM3RSxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDO1NBQ2pDOztRQUdELEVBQUUsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQzlCLElBQUksQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDO1NBQ25EO1FBRUQsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUMsY0FBYyxDQUFDO0tBQzFDO0lBRUQsa0NBQWdCLEdBQWhCO1FBQUEsaUJBTUM7UUFMRyxJQUFJLENBQUMsdUJBQXVCLEdBQUcsaUNBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxTQUFTLENBQ2xGO1lBQ0ksS0FBSSxDQUFDLFdBQVcsRUFBRSxDQUFDO1NBQ3RCLENBQ0osQ0FBQztLQUNMO0lBRUQsaUNBQWUsR0FBZjtRQUNJLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDLENBQUM7WUFDL0IsSUFBSSxDQUFDLHVCQUF1QixDQUFDLFdBQVcsRUFBRSxDQUFDO1NBQzlDO1FBRUQsSUFBSSxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQztRQUU5QixJQUFJLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztLQUNuRDtJQUVELDBCQUFRLEdBQVIsVUFBUyxLQUFZLEVBQUUsU0FBeUI7UUFBekIsMEJBQUEsRUFBQSxpQkFBeUI7UUFDNUMsSUFBSSxNQUFhLENBQUM7UUFDbEIsSUFBSSxRQUFRLEdBQVUsSUFBSSxDQUFDLFFBQVEsQ0FBQztRQUVwQyxFQUFFLENBQUMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO1lBQ1osTUFBTSxHQUFHLEtBQUssR0FBRyxRQUFRLEdBQUcsR0FBRyxDQUFDO1NBQ25DO1FBQ0QsSUFBSSxDQUFDLENBQUM7WUFDRixNQUFNLEdBQUcsS0FBSyxDQUFDO1NBQ2xCO1FBRUQsSUFBSSxDQUFDLFdBQVcsR0FBRyxNQUFNLENBQUM7S0FDN0I7SUFFRCw4QkFBWSxHQUFaLFVBQWEsSUFBVyxFQUFFLEtBQWEsRUFBRSxRQUFnQixFQUFFLElBQXVDO1FBQzlGLElBQU0sUUFBUSxHQUFhLElBQUksQ0FBQyxPQUFPLENBQUMsWUFBWSxDQUFDLElBQUksRUFBRSxLQUFLLEVBQUUsUUFBUSxDQUFDLENBQUM7UUFFNUUsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQztZQUNQLFFBQVEsQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO1NBQ3hCO1FBQ0QsTUFBTSxDQUFDLFFBQVEsQ0FBQztLQUNuQjtJQUVELDZCQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsT0FBTyxDQUFDLEdBQUcsR0FBRyxFQUFFLENBQUM7UUFDdEIsSUFBSSxDQUFDLFdBQVcsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUMvQixJQUFJLENBQUMsVUFBVSxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQzlCLElBQUksQ0FBQyxpQkFBaUIsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNyQyxJQUFJLENBQUMsaUJBQWlCLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDckMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUM5QixJQUFJLENBQUMsV0FBVyxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQy9CLElBQUksQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDNUIsSUFBSSxDQUFDLFVBQVUsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUM5QixJQUFJLENBQUMsT0FBTyxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQzNCLElBQUksQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDNUIsSUFBSSxDQUFDLGFBQWEsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNqQyxJQUFJLENBQUMsZUFBZSxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQ25DLElBQUksQ0FBQyxRQUFRLENBQUMsV0FBVyxFQUFFLENBQUM7UUFFNUIsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLHVCQUF1QixDQUFDLENBQUMsQ0FBQztZQUMvQixJQUFJLENBQUMsdUJBQXVCLENBQUMsV0FBVyxFQUFFLENBQUM7U0FDOUM7UUFFRCxFQUFFLENBQUEsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxDQUFDO1lBQ3ZCLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxXQUFXLEVBQUUsQ0FBQztTQUN2QztRQUVELElBQUksQ0FBQyxjQUFjLENBQUMsUUFBUSxFQUFFLENBQUM7UUFDL0IsSUFBSSxDQUFDLGNBQWMsQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUVsQyxJQUFJLENBQUMsR0FBRyxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUNsQzs7Z0JBcGZKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLFdBQVc7aUJBQ3hCOzs7O2dCQVZRLGNBQUs7Z0JBUEwsd0JBQWlCOzs7NEJBcUJyQixZQUFLOzZCQUNMLFlBQUs7O2tCQXRCVjs7QUFrQmEsMEJBQU8iLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFuZ2VEZXRlY3RvclJlZiwgRWxlbWVudFJlZiwgT25Jbml0LCBEaXJlY3RpdmUsIElucHV0LCBPbkRlc3Ryb3kgfSBmcm9tIFwiQGFuZ3VsYXIvY29yZVwiO1xuaW1wb3J0IHsgSVBsYXlhYmxlLCBJTWVkaWFTdWJzY3JpcHRpb25zIH0gZnJvbSBcIi4vaS1wbGF5YWJsZVwiO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gXCJyeGpzL09ic2VydmFibGVcIjtcbmltcG9ydCB7IFRpbWVyT2JzZXJ2YWJsZSB9IGZyb20gXCJyeGpzL29ic2VydmFibGUvVGltZXJPYnNlcnZhYmxlXCI7XG5pbXBvcnQgeyBTdWJzY3JpcHRpb24gfSBmcm9tIFwicnhqcy9TdWJzY3JpcHRpb25cIjtcbmltcG9ydCB7IE9ic2VydmVyIH0gZnJvbSBcInJ4anMvT2JzZXJ2ZXJcIjtcbmltcG9ydCB7IFZnU3RhdGVzIH0gZnJvbSAnLi4vc3RhdGVzL3ZnLXN0YXRlcyc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBWZ0V2ZW50cyB9IGZyb20gJy4uL2V2ZW50cy92Zy1ldmVudHMnO1xuaW1wb3J0IHsgU3ViamVjdCB9IGZyb20gJ3J4anMvU3ViamVjdCc7XG5pbXBvcnQgeyBJTWVkaWFFbGVtZW50IH0gZnJvbSAnLi9pLW1lZGlhLWVsZW1lbnQnO1xuXG5pbXBvcnQgJ3J4anMvYWRkL29ic2VydmFibGUvZnJvbUV2ZW50JztcbmltcG9ydCAncnhqcy9hZGQvb2JzZXJ2YWJsZS9jb21iaW5lTGF0ZXN0JztcblxuQERpcmVjdGl2ZSh7XG4gICAgc2VsZWN0b3I6ICdbdmdNZWRpYV0nXG59KVxuZXhwb3J0IGNsYXNzIFZnTWVkaWEgaW1wbGVtZW50cyBPbkluaXQsIE9uRGVzdHJveSwgSVBsYXlhYmxlIHtcbiAgICBlbGVtOiBhbnk7XG5cbiAgICBASW5wdXQoKSB2Z01lZGlhOiBJTWVkaWFFbGVtZW50O1xuICAgIEBJbnB1dCgpIHZnTWFzdGVyOiBib29sZWFuO1xuXG4gICAgc3RhdGU6IHN0cmluZyA9IFZnU3RhdGVzLlZHX1BBVVNFRDtcblxuICAgIHRpbWU6IGFueSA9IHsgY3VycmVudDogMCwgdG90YWw6IDAsIGxlZnQ6IDAgfTtcbiAgICBidWZmZXI6IGFueSA9IHsgZW5kOiAwIH07XG4gICAgdHJhY2s6IGFueTtcbiAgICBzdWJzY3JpcHRpb25zOiBJTWVkaWFTdWJzY3JpcHRpb25zIHwgYW55O1xuXG4gICAgY2FuUGxheTogYm9vbGVhbiA9IGZhbHNlO1xuICAgIGNhblBsYXlUaHJvdWdoOiBib29sZWFuID0gZmFsc2U7XG4gICAgaXNNZXRhZGF0YUxvYWRlZDogYm9vbGVhbiA9IGZhbHNlO1xuICAgIGlzV2FpdGluZzogYm9vbGVhbiA9IGZhbHNlO1xuICAgIGlzQ29tcGxldGVkOiBib29sZWFuID0gZmFsc2U7XG4gICAgaXNMaXZlOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBpc0J1ZmZlckRldGVjdGVkOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBjaGVja0ludGVydmFsOiBudW1iZXIgPSAyMDA7XG4gICAgY3VycmVudFBsYXlQb3M6IG51bWJlciA9IDA7XG4gICAgbGFzdFBsYXlQb3M6IG51bWJlciA9IDA7XG5cbiAgICBjaGVja0J1ZmZlclN1YnNjcmlwdGlvbjogYW55O1xuICAgIHN5bmNTdWJzY3JpcHRpb246IFN1YnNjcmlwdGlvbjtcbiAgICBjYW5QbGF5QWxsU3Vic2NyaXB0aW9uOiBhbnk7XG4gICAgcGxheUF0ZmVyU3luYzogYm9vbGVhbiA9IGZhbHNlO1xuXG4gICAgbXV0YXRpb25PYnM6IFN1YnNjcmlwdGlvbjtcbiAgICBjYW5QbGF5T2JzOiBTdWJzY3JpcHRpb247XG4gICAgY2FuUGxheVRocm91Z2hPYnM6IFN1YnNjcmlwdGlvbjtcbiAgICBsb2FkZWRNZXRhZGF0YU9iczogU3Vic2NyaXB0aW9uO1xuICAgIHdhaXRpbmdPYnM6IFN1YnNjcmlwdGlvbjtcbiAgICBwcm9ncmVzc09iczogU3Vic2NyaXB0aW9uO1xuICAgIGVuZGVkT2JzOiBTdWJzY3JpcHRpb247XG4gICAgcGxheWluZ09iczogU3Vic2NyaXB0aW9uO1xuICAgIHBsYXlPYnM6IFN1YnNjcmlwdGlvbjtcbiAgICBwYXVzZU9iczogU3Vic2NyaXB0aW9uO1xuICAgIHRpbWVVcGRhdGVPYnM6IFN1YnNjcmlwdGlvbjtcbiAgICB2b2x1bWVDaGFuZ2VPYnM6IFN1YnNjcmlwdGlvbjtcbiAgICBlcnJvck9iczogU3Vic2NyaXB0aW9uO1xuXG4gICAgYnVmZmVyRGV0ZWN0ZWQ6IFN1YmplY3Q8Ym9vbGVhbj4gPSBuZXcgU3ViamVjdCgpO1xuXG4gICAgcGxheVByb21pc2U6IFByb21pc2U8YW55PjtcblxuICAgIGNvbnN0cnVjdG9yKHByaXZhdGUgYXBpOiBWZ0FQSSwgcHJpdmF0ZSByZWY6IENoYW5nZURldGVjdG9yUmVmKSB7XG5cbiAgICB9XG5cbiAgICBuZ09uSW5pdCgpIHtcbiAgICAgICAgaWYgKHRoaXMudmdNZWRpYS5ub2RlTmFtZSkge1xuICAgICAgICAgICAgLy8gSXQncyBhIG5hdGl2ZSBlbGVtZW50XG4gICAgICAgICAgICB0aGlzLmVsZW0gPSB0aGlzLnZnTWVkaWE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAvLyBJdCdzIGFuIEFuZ3VsYXIgQ2xhc3NcbiAgICAgICAgICAgIHRoaXMuZWxlbSA9IHRoaXMudmdNZWRpYS5lbGVtO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSnVzdCBpbiBjYXNlIHdlJ3JlIGNyZWF0aW5nIHRoaXMgdmdNZWRpYSBkeW5hbWljYWxseSByZWdpc3RlciBhZ2FpbiBpbnRvIEFQSVxuICAgICAgICB0aGlzLmFwaS5yZWdpc3Rlck1lZGlhKHRoaXMpO1xuXG4gICAgICAgIHRoaXMuc3Vic2NyaXB0aW9ucyA9IHtcbiAgICAgICAgICAgIC8vIE5hdGl2ZSBldmVudHNcbiAgICAgICAgICAgIGFib3J0OiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfQUJPUlQpLFxuICAgICAgICAgICAgY2FuUGxheTogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX0NBTl9QTEFZKSxcbiAgICAgICAgICAgIGNhblBsYXlUaHJvdWdoOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfQ0FOX1BMQVlfVEhST1VHSCksXG4gICAgICAgICAgICBkdXJhdGlvbkNoYW5nZTogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX0RVUkFUSU9OX0NIQU5HRSksXG4gICAgICAgICAgICBlbXB0aWVkOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfRU1QVElFRCksXG4gICAgICAgICAgICBlbmNyeXB0ZWQ6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19FTkNSWVBURUQpLFxuICAgICAgICAgICAgZW5kZWQ6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19FTkRFRCksXG4gICAgICAgICAgICBlcnJvcjogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX0VSUk9SKSxcbiAgICAgICAgICAgIGxvYWRlZERhdGE6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19MT0FERURfREFUQSksXG4gICAgICAgICAgICBsb2FkZWRNZXRhZGF0YTogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX0xPQURFRF9NRVRBREFUQSksXG4gICAgICAgICAgICBsb2FkU3RhcnQ6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19MT0FEX1NUQVJUKSxcbiAgICAgICAgICAgIHBhdXNlOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfUEFVU0UpLFxuICAgICAgICAgICAgcGxheTogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX1BMQVkpLFxuICAgICAgICAgICAgcGxheWluZzogT2JzZXJ2YWJsZS5mcm9tRXZlbnQoPGFueT50aGlzLmVsZW0sIFZnRXZlbnRzLlZHX1BMQVlJTkcpLFxuICAgICAgICAgICAgcHJvZ3Jlc3M6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19QUk9HUkVTUyksXG4gICAgICAgICAgICByYXRlQ2hhbmdlOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfUkFURV9DSEFOR0UpLFxuICAgICAgICAgICAgc2Vla2VkOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PnRoaXMuZWxlbSwgVmdFdmVudHMuVkdfU0VFS0VEKSxcbiAgICAgICAgICAgIHNlZWtpbmc6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19TRUVLSU5HKSxcbiAgICAgICAgICAgIHN0YWxsZWQ6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19TVEFMTEVEKSxcbiAgICAgICAgICAgIHN1c3BlbmQ6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19TVVNQRU5EKSxcbiAgICAgICAgICAgIHRpbWVVcGRhdGU6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19USU1FX1VQREFURSksXG4gICAgICAgICAgICB2b2x1bWVDaGFuZ2U6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19WT0xVTUVfQ0hBTkdFKSxcbiAgICAgICAgICAgIHdhaXRpbmc6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+dGhpcy5lbGVtLCBWZ0V2ZW50cy5WR19XQUlUSU5HKSxcblxuICAgICAgICAgICAgLy8gQWR2ZXJ0aXNlbWVudCBvbmx5IGV2ZW50c1xuICAgICAgICAgICAgc3RhcnRBZHM6IE9ic2VydmFibGUuZnJvbUV2ZW50KDxhbnk+d2luZG93LCBWZ0V2ZW50cy5WR19TVEFSVF9BRFMpLFxuICAgICAgICAgICAgZW5kQWRzOiBPYnNlcnZhYmxlLmZyb21FdmVudCg8YW55PndpbmRvdywgVmdFdmVudHMuVkdfRU5EX0FEUyksXG5cbiAgICAgICAgICAgIC8vIFNlZSBjaGFuZ2VzIG9uIDxzb3VyY2U+IGNoaWxkIGVsZW1lbnRzIHRvIHJlbG9hZCB0aGUgdmlkZW8gZmlsZVxuICAgICAgICAgICAgbXV0YXRpb246IE9ic2VydmFibGUuY3JlYXRlKFxuICAgICAgICAgICAgICAgIChvYnNlcnZlcjogYW55KSA9PiB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IGRvbU9icyA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKChtdXRhdGlvbnMpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9ic2VydmVyLm5leHQobXV0YXRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgZG9tT2JzLm9ic2VydmUoPGFueT50aGlzLmVsZW0sIHsgY2hpbGRMaXN0OiB0cnVlLCBhdHRyaWJ1dGVzOiB0cnVlIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb21PYnMuZGlzY29ubmVjdCgpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICksXG5cbiAgICAgICAgICAgIC8vIEN1c3RvbSBidWZmZXJpbmcgZGV0ZWN0aW9uXG4gICAgICAgICAgICBidWZmZXJEZXRlY3RlZDogdGhpcy5idWZmZXJEZXRlY3RlZFxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMubXV0YXRpb25PYnMgPSB0aGlzLnN1YnNjcmlwdGlvbnMubXV0YXRpb24uc3Vic2NyaWJlKHRoaXMub25NdXRhdGlvbi5iaW5kKHRoaXMpKTtcbiAgICAgICAgdGhpcy5jYW5QbGF5T2JzID0gdGhpcy5zdWJzY3JpcHRpb25zLmNhblBsYXkuc3Vic2NyaWJlKHRoaXMub25DYW5QbGF5LmJpbmQodGhpcykpO1xuICAgICAgICB0aGlzLmNhblBsYXlUaHJvdWdoT2JzID0gdGhpcy5zdWJzY3JpcHRpb25zLmNhblBsYXlUaHJvdWdoLnN1YnNjcmliZSh0aGlzLm9uQ2FuUGxheVRocm91Z2guYmluZCh0aGlzKSk7XG4gICAgICAgIHRoaXMubG9hZGVkTWV0YWRhdGFPYnMgPSB0aGlzLnN1YnNjcmlwdGlvbnMubG9hZGVkTWV0YWRhdGEuc3Vic2NyaWJlKHRoaXMub25Mb2FkTWV0YWRhdGEuYmluZCh0aGlzKSk7XG4gICAgICAgIHRoaXMud2FpdGluZ09icyA9IHRoaXMuc3Vic2NyaXB0aW9ucy53YWl0aW5nLnN1YnNjcmliZSh0aGlzLm9uV2FpdC5iaW5kKHRoaXMpKTtcbiAgICAgICAgdGhpcy5wcm9ncmVzc09icyA9IHRoaXMuc3Vic2NyaXB0aW9ucy5wcm9ncmVzcy5zdWJzY3JpYmUodGhpcy5vblByb2dyZXNzLmJpbmQodGhpcykpO1xuICAgICAgICB0aGlzLmVuZGVkT2JzID0gdGhpcy5zdWJzY3JpcHRpb25zLmVuZGVkLnN1YnNjcmliZSh0aGlzLm9uQ29tcGxldGUuYmluZCh0aGlzKSk7XG4gICAgICAgIHRoaXMucGxheWluZ09icyA9IHRoaXMuc3Vic2NyaXB0aW9ucy5wbGF5aW5nLnN1YnNjcmliZSh0aGlzLm9uU3RhcnRQbGF5aW5nLmJpbmQodGhpcykpO1xuICAgICAgICB0aGlzLnBsYXlPYnMgPSB0aGlzLnN1YnNjcmlwdGlvbnMucGxheS5zdWJzY3JpYmUodGhpcy5vblBsYXkuYmluZCh0aGlzKSk7XG4gICAgICAgIHRoaXMucGF1c2VPYnMgPSB0aGlzLnN1YnNjcmlwdGlvbnMucGF1c2Uuc3Vic2NyaWJlKHRoaXMub25QYXVzZS5iaW5kKHRoaXMpKTtcbiAgICAgICAgdGhpcy50aW1lVXBkYXRlT2JzID0gdGhpcy5zdWJzY3JpcHRpb25zLnRpbWVVcGRhdGUuc3Vic2NyaWJlKHRoaXMub25UaW1lVXBkYXRlLmJpbmQodGhpcykpO1xuICAgICAgICB0aGlzLnZvbHVtZUNoYW5nZU9icyA9IHRoaXMuc3Vic2NyaXB0aW9ucy52b2x1bWVDaGFuZ2Uuc3Vic2NyaWJlKHRoaXMub25Wb2x1bWVDaGFuZ2UuYmluZCh0aGlzKSk7XG4gICAgICAgIHRoaXMuZXJyb3JPYnMgPSB0aGlzLnN1YnNjcmlwdGlvbnMuZXJyb3Iuc3Vic2NyaWJlKHRoaXMub25FcnJvci5iaW5kKHRoaXMpKTtcblxuICAgICAgICBpZiAodGhpcy52Z01hc3Rlcikge1xuICAgICAgICAgICAgdGhpcy5hcGkucGxheWVyUmVhZHlFdmVudC5zdWJzY3JpYmUoXG4gICAgICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnByZXBhcmVTeW5jKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHByZXBhcmVTeW5jKCkge1xuICAgICAgICBsZXQgY2FuUGxheUFsbDogQXJyYXk8T2JzZXJ2YWJsZTxhbnk+PiA9IFtdO1xuXG4gICAgICAgIGZvciAobGV0IG1lZGlhIGluIHRoaXMuYXBpLm1lZGlhcykge1xuICAgICAgICAgICAgaWYgKHRoaXMuYXBpLm1lZGlhc1sgbWVkaWEgXSkge1xuICAgICAgICAgICAgICAgIGNhblBsYXlBbGwucHVzaCh0aGlzLmFwaS5tZWRpYXNbIG1lZGlhIF0uc3Vic2NyaXB0aW9ucy5jYW5QbGF5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY2FuUGxheUFsbFN1YnNjcmlwdGlvbiA9IE9ic2VydmFibGUuY29tYmluZUxhdGVzdChjYW5QbGF5QWxsLFxuICAgICAgICAgICAgKC4uLnBhcmFtcykgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBhbGxSZWFkeTogYm9vbGVhbiA9IHBhcmFtcy5zb21lKGV2ZW50ID0+IGV2ZW50LnRhcmdldC5yZWFkeVN0YXRlID09PSA0KTtcblxuICAgICAgICAgICAgICAgIGlmIChhbGxSZWFkeSAmJiAhdGhpcy5zeW5jU3Vic2NyaXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhcnRTeW5jKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3luY1N1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKS5zdWJzY3JpYmUoKTtcbiAgICB9XG5cbiAgICBzdGFydFN5bmMoKSB7XG4gICAgICAgIHRoaXMuc3luY1N1YnNjcmlwdGlvbiA9IFRpbWVyT2JzZXJ2YWJsZS5jcmVhdGUoMCwgMTAwMCkuc3Vic2NyaWJlKFxuICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IG1lZGlhIGluIHRoaXMuYXBpLm1lZGlhcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5hcGkubWVkaWFzWyBtZWRpYSBdICE9PSB0aGlzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGlmZjogbnVtYmVyID0gdGhpcy5hcGkubWVkaWFzWyBtZWRpYSBdLmN1cnJlbnRUaW1lIC0gdGhpcy5jdXJyZW50VGltZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRpZmYgPCAtMC4zIHx8IGRpZmYgPiAwLjMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsYXlBdGZlclN5bmMgPSAodGhpcy5zdGF0ZSA9PT0gVmdTdGF0ZXMuVkdfUExBWUlORyk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBhdXNlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hcGkubWVkaWFzWyBtZWRpYSBdLnBhdXNlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hcGkubWVkaWFzWyBtZWRpYSBdLmN1cnJlbnRUaW1lID0gdGhpcy5jdXJyZW50VGltZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnBsYXlBdGZlclN5bmMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYXBpLm1lZGlhc1sgbWVkaWEgXS5wbGF5KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGxheUF0ZmVyU3luYyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBvbk11dGF0aW9uKG11dGF0aW9uczogQXJyYXk8TXV0YXRpb25SZWNvcmQ+KSB7XG4gICAgICAgIC8vIERldGVjdCBjaGFuZ2VzIG9ubHkgZm9yIHNvdXJjZSBlbGVtZW50cyBvciBzcmMgYXR0cmlidXRlXG4gICAgICAgIGZvciAobGV0IGk9MCwgbD1tdXRhdGlvbnMubGVuZ3RoOyBpPGw7IGkrKykge1xuICAgICAgICAgICAgbGV0IG11dDogTXV0YXRpb25SZWNvcmQgPSBtdXRhdGlvbnNbaV07XG5cbiAgICAgICAgICAgIGlmIChtdXQudHlwZSA9PT0gJ2F0dHJpYnV0ZXMnICYmIG11dC5hdHRyaWJ1dGVOYW1lID09PSAnc3JjJykge1xuICAgICAgICAgICAgICAgIC8vIE9ubHkgbG9hZCBzcmMgZmlsZSBpZiBpdCdzIG5vdCBhIGJsb2IgKGZvciBEQVNIIC8gSExTIHNvdXJjZXMpXG4gICAgICAgICAgICAgICAgaWYgKG11dC50YXJnZXRbJ3NyYyddICYmIG11dC50YXJnZXRbJ3NyYyddLmxlbmd0aCA+IDAgJiYgbXV0LnRhcmdldFsnc3JjJ10uaW5kZXhPZignYmxvYjonKSA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2FkTWVkaWEoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChtdXQudHlwZSA9PT0gJ2NoaWxkTGlzdCcgJiYgbXV0LnJlbW92ZWROb2Rlcy5sZW5ndGggJiYgbXV0LnJlbW92ZWROb2Rlc1swXS5ub2RlTmFtZS50b0xvd2VyQ2FzZSgpID09PSAnc291cmNlJykge1xuICAgICAgICAgICAgICAgIHRoaXMubG9hZE1lZGlhKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBsb2FkTWVkaWEoKSB7XG4gICAgICAgIHRoaXMudmdNZWRpYS5wYXVzZSgpO1xuICAgICAgICB0aGlzLnZnTWVkaWEuY3VycmVudFRpbWUgPSAwO1xuXG4gICAgICAgIC8vIFN0YXJ0IGJ1ZmZlcmluZyB1bnRpbCB3ZSBjYW4gcGxheSB0aGUgbWVkaWEgZmlsZVxuICAgICAgICB0aGlzLnN0b3BCdWZmZXJDaGVjaygpO1xuICAgICAgICB0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQgPSB0cnVlO1xuICAgICAgICB0aGlzLmJ1ZmZlckRldGVjdGVkLm5leHQodGhpcy5pc0J1ZmZlckRldGVjdGVkKTtcblxuICAgICAgICAvLyBUT0RPOiBUaGlzIGlzIHVnbHksIHdlIHNob3VsZCBmaW5kIHNvbWV0aGluZyBjbGVhbmVyLiBGb3Igc29tZSByZWFzb24gYSBUaW1lck9ic2VydmFibGUgZG9lc24ndCB3b3Jrcy5cbiAgICAgICAgc2V0VGltZW91dCgoKSA9PiB0aGlzLnZnTWVkaWEubG9hZCgpLCAxMCk7XG4gICAgfVxuXG4gICAgcGxheSgpIHtcbiAgICAgICAgLy8gc2hvcnQtY2lyY3VpdCBpZiBhbHJlYWR5IHBsYXlpbmdcbiAgICAgICAgaWYgKHRoaXMucGxheVByb21pc2UgfHwgKHRoaXMuc3RhdGUgIT09IFZnU3RhdGVzLlZHX1BBVVNFRCAmJiB0aGlzLnN0YXRlICE9PSBWZ1N0YXRlcy5WR19FTkRFRCkpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMucGxheVByb21pc2UgPSB0aGlzLnZnTWVkaWEucGxheSgpO1xuXG4gICAgICAgIC8vIGJyb3dzZXIgaGFzIGFzeW5jIHBsYXkgcHJvbWlzZVxuICAgICAgICBpZiAodGhpcy5wbGF5UHJvbWlzZSAmJiB0aGlzLnBsYXlQcm9taXNlLnRoZW4gJiYgdGhpcy5wbGF5UHJvbWlzZS5jYXRjaCkge1xuICAgICAgICAgICAgdGhpcy5wbGF5UHJvbWlzZVxuICAgICAgICAgICAgICAgIC50aGVuKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbGF5UHJvbWlzZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuY2F0Y2goKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBkZWxpYmVyYXRlbHkgZW1wdHkgZm9yIHRoZSBzYWtlIG9mIGVhdGluZyBjb25zb2xlIG5vaXNlXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5wbGF5UHJvbWlzZTtcbiAgICB9XG5cbiAgICBwYXVzZSgpIHtcbiAgICAgICAgLy8gYnJvd3NlciBoYXMgYXN5bmMgcGxheSBwcm9taXNlXG4gICAgICAgIGlmICh0aGlzLnBsYXlQcm9taXNlKSB7XG4gICAgICAgICAgICB0aGlzLnBsYXlQcm9taXNlXG4gICAgICAgICAgICAgICAgLnRoZW4oKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZnTWVkaWEucGF1c2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMudmdNZWRpYS5wYXVzZSgpO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0IGlkKCkge1xuICAgICAgICAvLyBXZSBzaG91bGQgcmV0dXJuIHVuZGVmaW5lZCBpZiB2Z01lZGlhIHN0aWxsIGRvZXNuJ3QgZXhpc3RcbiAgICAgICAgbGV0IHJlc3VsdCA9IHVuZGVmaW5lZDtcblxuICAgICAgICBpZiAodGhpcy52Z01lZGlhKSB7XG4gICAgICAgICAgICByZXN1bHQgPSB0aGlzLnZnTWVkaWEuaWQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIGdldCBkdXJhdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmdNZWRpYS5kdXJhdGlvbjtcbiAgICB9XG5cbiAgICBzZXQgY3VycmVudFRpbWUoc2Vjb25kcykge1xuICAgICAgICB0aGlzLnZnTWVkaWEuY3VycmVudFRpbWUgPSBzZWNvbmRzO1xuICAgICAgICAvLyB0aGlzLmVsZW0uZGlzcGF0Y2hFdmVudChuZXcgQ3VzdG9tRXZlbnQoVmdFdmVudHMuVkdfU0VFSykpO1xuICAgIH1cblxuICAgIGdldCBjdXJyZW50VGltZSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMudmdNZWRpYS5jdXJyZW50VGltZTtcbiAgICB9XG5cbiAgICBzZXQgdm9sdW1lKHZvbHVtZSkge1xuICAgICAgICB0aGlzLnZnTWVkaWEudm9sdW1lID0gdm9sdW1lO1xuICAgIH1cblxuICAgIGdldCB2b2x1bWUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZnTWVkaWEudm9sdW1lO1xuICAgIH1cblxuICAgIHNldCBwbGF5YmFja1JhdGUocmF0ZSkge1xuICAgICAgICB0aGlzLnZnTWVkaWEucGxheWJhY2tSYXRlID0gcmF0ZTtcbiAgICB9XG5cbiAgICBnZXQgcGxheWJhY2tSYXRlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy52Z01lZGlhLnBsYXliYWNrUmF0ZTtcbiAgICB9XG5cbiAgICBnZXQgYnVmZmVyZWQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZnTWVkaWEuYnVmZmVyZWQ7XG4gICAgfVxuXG4gICAgZ2V0IHRleHRUcmFja3MoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnZnTWVkaWEudGV4dFRyYWNrcztcbiAgICB9XG5cbiAgICBvbkNhblBsYXkoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQgPSBmYWxzZTtcbiAgICAgICAgdGhpcy5idWZmZXJEZXRlY3RlZC5uZXh0KHRoaXMuaXNCdWZmZXJEZXRlY3RlZCk7XG4gICAgICAgIHRoaXMuY2FuUGxheSA9IHRydWU7XG4gICAgICAgIHRoaXMucmVmLmRldGVjdENoYW5nZXMoKTtcbiAgICB9XG5cbiAgICBvbkNhblBsYXlUaHJvdWdoKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgdGhpcy5pc0J1ZmZlckRldGVjdGVkID0gZmFsc2U7XG4gICAgICAgIHRoaXMuYnVmZmVyRGV0ZWN0ZWQubmV4dCh0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQpO1xuICAgICAgICB0aGlzLmNhblBsYXlUaHJvdWdoID0gdHJ1ZTtcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uTG9hZE1ldGFkYXRhKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgdGhpcy5pc01ldGFkYXRhTG9hZGVkID0gdHJ1ZTtcblxuICAgICAgICB0aGlzLnRpbWUgPSB7XG4gICAgICAgICAgICBjdXJyZW50OiAwLFxuICAgICAgICAgICAgbGVmdDogMCxcbiAgICAgICAgICAgIHRvdGFsOiB0aGlzLmR1cmF0aW9uICogMTAwMFxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMuc3RhdGUgPSBWZ1N0YXRlcy5WR19QQVVTRUQ7XG5cbiAgICAgICAgLy8gTGl2ZSBzdHJlYW1pbmcgY2hlY2tcbiAgICAgICAgbGV0IHQ6bnVtYmVyID0gTWF0aC5yb3VuZCh0aGlzLnRpbWUudG90YWwpO1xuICAgICAgICB0aGlzLmlzTGl2ZSA9ICh0ID09PSBJbmZpbml0eSk7XG4gICAgICAgIHRoaXMucmVmLmRldGVjdENoYW5nZXMoKTtcbiAgICB9XG5cbiAgICBvbldhaXQoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLmlzV2FpdGluZyA9IHRydWU7XG4gICAgICAgIHRoaXMucmVmLmRldGVjdENoYW5nZXMoKTtcbiAgICB9XG5cbiAgICBvbkNvbXBsZXRlKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgdGhpcy5pc0NvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgIHRoaXMuc3RhdGUgPSBWZ1N0YXRlcy5WR19FTkRFRDtcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uU3RhcnRQbGF5aW5nKGV2ZW50OiBhbnkpIHtcbiAgICAgICAgdGhpcy5zdGF0ZSA9IFZnU3RhdGVzLlZHX1BMQVlJTkc7XG4gICAgICAgIHRoaXMucmVmLmRldGVjdENoYW5nZXMoKTtcbiAgICB9XG5cbiAgICBvblBsYXkoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLnN0YXRlID0gVmdTdGF0ZXMuVkdfUExBWUlORztcblxuICAgICAgICBpZiAodGhpcy52Z01hc3Rlcikge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnN5bmNTdWJzY3JpcHRpb24gfHwgdGhpcy5zeW5jU3Vic2NyaXB0aW9uLmNsb3NlZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RhcnRTeW5jKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnN0YXJ0QnVmZmVyQ2hlY2soKTtcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uUGF1c2UoZXZlbnQ6IGFueSkge1xuICAgICAgICB0aGlzLnN0YXRlID0gVmdTdGF0ZXMuVkdfUEFVU0VEO1xuXG4gICAgICAgIGlmICh0aGlzLnZnTWFzdGVyKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMucGxheUF0ZmVyU3luYykge1xuICAgICAgICAgICAgICAgIHRoaXMuc3luY1N1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5zdG9wQnVmZmVyQ2hlY2soKTtcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uVGltZVVwZGF0ZShldmVudDogYW55KSB7XG4gICAgICAgIGxldCBlbmQgPSB0aGlzLmJ1ZmZlcmVkLmxlbmd0aCAtIDE7XG5cbiAgICAgICAgdGhpcy50aW1lID0ge1xuICAgICAgICAgICAgY3VycmVudDogdGhpcy5jdXJyZW50VGltZSAqIDEwMDAsXG4gICAgICAgICAgICB0b3RhbDogdGhpcy50aW1lLnRvdGFsLFxuICAgICAgICAgICAgbGVmdDogKHRoaXMuZHVyYXRpb24gLSB0aGlzLmN1cnJlbnRUaW1lKSAqIDEwMDBcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoZW5kID49IDApIHtcbiAgICAgICAgICAgIHRoaXMuYnVmZmVyID0geyBlbmQ6IHRoaXMuYnVmZmVyZWQuZW5kKGVuZCkgKiAxMDAwIH07XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uUHJvZ3Jlc3MoZXZlbnQ6IGFueSkge1xuICAgICAgICBsZXQgZW5kID0gdGhpcy5idWZmZXJlZC5sZW5ndGggLSAxO1xuXG4gICAgICAgIGlmIChlbmQgPj0gMCkge1xuICAgICAgICAgICAgdGhpcy5idWZmZXIgPSB7IGVuZDogdGhpcy5idWZmZXJlZC5lbmQoZW5kKSAqIDEwMDAgfTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnJlZi5kZXRlY3RDaGFuZ2VzKCk7XG4gICAgfVxuXG4gICAgb25Wb2x1bWVDaGFuZ2UoZXZlbnQ6IGFueSkge1xuICAgICAgICAvLyBUT0RPOiBTYXZlIHRvIGxvY2Fsc3RvcmFnZSB0aGUgY3VycmVudCB2b2x1bWVcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIG9uRXJyb3IoZXZlbnQ6IGFueSkge1xuICAgICAgICAvLyBUT0RPOiBIYW5kbGUgZXJyb3IgbWVzc2FnZXNcbiAgICAgICAgdGhpcy5yZWYuZGV0ZWN0Q2hhbmdlcygpO1xuICAgIH1cblxuICAgIC8vIGh0dHA6Ly9zdGFja292ZXJmbG93LmNvbS9hLzIzODI4MjQxLzc3OTUyOVxuICAgIGJ1ZmZlckNoZWNrKCkge1xuICAgICAgICBjb25zdCBvZmZzZXQgPSAxIC8gdGhpcy5jaGVja0ludGVydmFsO1xuICAgICAgICB0aGlzLmN1cnJlbnRQbGF5UG9zID0gdGhpcy5jdXJyZW50VGltZTtcblxuICAgICAgICBpZiAoIXRoaXMuaXNCdWZmZXJEZXRlY3RlZCAmJiB0aGlzLmN1cnJlbnRQbGF5UG9zIDwgKHRoaXMubGFzdFBsYXlQb3MgKyBvZmZzZXQpKSB7XG4gICAgICAgICAgICB0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQgPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuaXNCdWZmZXJEZXRlY3RlZCAmJiB0aGlzLmN1cnJlbnRQbGF5UG9zID4gKHRoaXMubGFzdFBsYXlQb3MgKyBvZmZzZXQpKSB7XG4gICAgICAgICAgICB0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFByZXZlbnQgY2FsbHMgdG8gYnVmZmVyQ2hlY2sgYWZ0ZXIgbmdPbkRlc3Ryb3kgaGF2ZSBiZWVuIGNhbGxlZFxuICAgICAgICBpZiAoIXRoaXMuYnVmZmVyRGV0ZWN0ZWQuY2xvc2VkKSB7XG4gICAgICAgICAgICB0aGlzLmJ1ZmZlckRldGVjdGVkLm5leHQodGhpcy5pc0J1ZmZlckRldGVjdGVkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubGFzdFBsYXlQb3MgPSB0aGlzLmN1cnJlbnRQbGF5UG9zO1xuICAgIH1cblxuICAgIHN0YXJ0QnVmZmVyQ2hlY2soKSB7XG4gICAgICAgIHRoaXMuY2hlY2tCdWZmZXJTdWJzY3JpcHRpb24gPSBUaW1lck9ic2VydmFibGUuY3JlYXRlKDAsIHRoaXMuY2hlY2tJbnRlcnZhbCkuc3Vic2NyaWJlKFxuICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuYnVmZmVyQ2hlY2soKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBzdG9wQnVmZmVyQ2hlY2soKSB7XG4gICAgICAgIGlmICh0aGlzLmNoZWNrQnVmZmVyU3Vic2NyaXB0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLmNoZWNrQnVmZmVyU3Vic2NyaXB0aW9uLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmlzQnVmZmVyRGV0ZWN0ZWQgPSBmYWxzZTtcblxuICAgICAgICB0aGlzLmJ1ZmZlckRldGVjdGVkLm5leHQodGhpcy5pc0J1ZmZlckRldGVjdGVkKTtcbiAgICB9XG5cbiAgICBzZWVrVGltZSh2YWx1ZTpudW1iZXIsIGJ5UGVyY2VudDpib29sZWFuID0gZmFsc2UpIHtcbiAgICAgICAgbGV0IHNlY29uZDpudW1iZXI7XG4gICAgICAgIGxldCBkdXJhdGlvbjpudW1iZXIgPSB0aGlzLmR1cmF0aW9uO1xuXG4gICAgICAgIGlmIChieVBlcmNlbnQpIHtcbiAgICAgICAgICAgIHNlY29uZCA9IHZhbHVlICogZHVyYXRpb24gLyAxMDA7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzZWNvbmQgPSB2YWx1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY3VycmVudFRpbWUgPSBzZWNvbmQ7XG4gICAgfVxuXG4gICAgYWRkVGV4dFRyYWNrKHR5cGU6c3RyaW5nLCBsYWJlbD86c3RyaW5nLCBsYW5ndWFnZT86c3RyaW5nLCBtb2RlPzonZGlzYWJsZWQnIHwgJ2hpZGRlbicgfCAnc2hvd2luZycpOiBUZXh0VHJhY2sge1xuICAgICAgICBjb25zdCBuZXdUcmFjazpUZXh0VHJhY2sgPSB0aGlzLnZnTWVkaWEuYWRkVGV4dFRyYWNrKHR5cGUsIGxhYmVsLCBsYW5ndWFnZSk7XG5cbiAgICAgICAgaWYgKG1vZGUpIHtcbiAgICAgICAgICAgIG5ld1RyYWNrLm1vZGUgPSBtb2RlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBuZXdUcmFjaztcbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy52Z01lZGlhLnNyYyA9ICcnO1xuICAgICAgICB0aGlzLm11dGF0aW9uT2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMuY2FuUGxheU9icy51bnN1YnNjcmliZSgpO1xuICAgICAgICB0aGlzLmNhblBsYXlUaHJvdWdoT2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMubG9hZGVkTWV0YWRhdGFPYnMudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgdGhpcy53YWl0aW5nT2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMucHJvZ3Jlc3NPYnMudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgdGhpcy5lbmRlZE9icy51bnN1YnNjcmliZSgpO1xuICAgICAgICB0aGlzLnBsYXlpbmdPYnMudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgdGhpcy5wbGF5T2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMucGF1c2VPYnMudW5zdWJzY3JpYmUoKTtcbiAgICAgICAgdGhpcy50aW1lVXBkYXRlT2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMudm9sdW1lQ2hhbmdlT2JzLnVuc3Vic2NyaWJlKCk7XG4gICAgICAgIHRoaXMuZXJyb3JPYnMudW5zdWJzY3JpYmUoKTtcblxuICAgICAgICBpZiAodGhpcy5jaGVja0J1ZmZlclN1YnNjcmlwdGlvbikge1xuICAgICAgICAgICAgdGhpcy5jaGVja0J1ZmZlclN1YnNjcmlwdGlvbi51bnN1YnNjcmliZSgpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYodGhpcy5zeW5jU3Vic2NyaXB0aW9uKSB7XG4gICAgICAgICAgICB0aGlzLnN5bmNTdWJzY3JpcHRpb24udW5zdWJzY3JpYmUoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuYnVmZmVyRGV0ZWN0ZWQuY29tcGxldGUoKTtcbiAgICAgICAgdGhpcy5idWZmZXJEZXRlY3RlZC51bnN1YnNjcmliZSgpO1xuXG4gICAgICAgIHRoaXMuYXBpLnVucmVnaXN0ZXJNZWRpYSh0aGlzKTtcbiAgICB9XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../services/vg-api\");\nvar vg_fullscreen_api_1 = require(\"../services/vg-fullscreen-api\");\nvar vg_utils_1 = require(\"../services/vg-utils\");\nvar vg_media_1 = require(\"../vg-media/vg-media\");\nvar vg_controls_hidden_1 = require(\"../services/vg-controls-hidden\");\nvar VgPlayer = (function () {\n function VgPlayer(ref, api, fsAPI, controlsHidden) {\n this.api = api;\n this.fsAPI = fsAPI;\n this.controlsHidden = controlsHidden;\n this.isFullscreen = false;\n this.isNativeFullscreen = false;\n this.areControlsHidden = false;\n this.onPlayerReady = new core_1.EventEmitter();\n this.onMediaReady = new core_1.EventEmitter();\n this.subscriptions = [];\n this.elem = ref.nativeElement;\n this.api.registerElement(this.elem);\n }\n VgPlayer.prototype.ngAfterContentInit = function () {\n var _this = this;\n this.medias.toArray().forEach(function (media) {\n _this.api.registerMedia(media);\n });\n this.fsAPI.init(this.elem, this.medias);\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this)));\n this.api.onPlayerReady(this.fsAPI);\n this.onPlayerReady.next(this.api);\n };\n VgPlayer.prototype.onChangeFullscreen = function (fsState) {\n if (!this.fsAPI.nativeFullscreen) {\n this.isFullscreen = fsState;\n this.zIndex = fsState ? vg_utils_1.VgUtils.getZIndex().toString() : 'auto';\n }\n else {\n this.isNativeFullscreen = fsState;\n }\n };\n VgPlayer.prototype.onHideControls = function (hidden) {\n this.areControlsHidden = hidden;\n };\n VgPlayer.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgPlayer.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-player',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<ng-content></ng-content>\",\n styles: [\"\\n vg-player {\\n font-family: 'videogular';\\n position: relative;\\n display: flex;\\n width: 100%;\\n height: 100%;\\n overflow: hidden;\\n background-color: black;\\n }\\n\\n vg-player.fullscreen {\\n position: fixed;\\n left: 0;\\n top: 0;\\n }\\n\\n vg-player.native-fullscreen.controls-hidden {\\n cursor: none;\\n }\\n \"],\n providers: [vg_api_1.VgAPI, vg_fullscreen_api_1.VgFullscreenAPI, vg_controls_hidden_1.VgControlsHidden]\n },] },\n ];\n /** @nocollapse */\n VgPlayer.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n { type: vg_fullscreen_api_1.VgFullscreenAPI, },\n { type: vg_controls_hidden_1.VgControlsHidden, },\n ]; };\n VgPlayer.propDecorators = {\n \"isFullscreen\": [{ type: core_1.HostBinding, args: ['class.fullscreen',] },],\n \"isNativeFullscreen\": [{ type: core_1.HostBinding, args: ['class.native-fullscreen',] },],\n \"areControlsHidden\": [{ type: core_1.HostBinding, args: ['class.controls-hidden',] },],\n \"zIndex\": [{ type: core_1.HostBinding, args: ['style.z-index',] },],\n \"onPlayerReady\": [{ type: core_1.Output },],\n \"onMediaReady\": [{ type: core_1.Output },],\n \"medias\": [{ type: core_1.ContentChildren, args: [vg_media_1.VgMedia,] },],\n };\n return VgPlayer;\n}());\nexports.VgPlayer = VgPlayer;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctcGxheWVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctcGxheWVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBU3VCO0FBQ3ZCLDZDQUEyQztBQUMzQyxtRUFBZ0U7QUFDaEUsaURBQStDO0FBQy9DLGlEQUErQztBQUUvQyxxRUFBa0U7O0lBZ0Q5RCxrQkFBWSxHQUFlLEVBQVMsR0FBVSxFQUFTLEtBQXNCLEVBQVUsY0FBZ0M7UUFBbkYsUUFBRyxHQUFILEdBQUcsQ0FBTztRQUFTLFVBQUssR0FBTCxLQUFLLENBQWlCO1FBQVUsbUJBQWMsR0FBZCxjQUFjLENBQWtCOzRCQWhCOUQsS0FBSztrQ0FDUSxLQUFLO2lDQUNSLEtBQUs7NkJBSXJDLElBQUksbUJBQVksRUFBRTs0QkFHbkIsSUFBSSxtQkFBWSxFQUFFOzZCQUtwQixFQUFFO1FBRzlCLElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQztRQUU5QixJQUFJLENBQUMsR0FBRyxDQUFDLGVBQWUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDdkM7SUFFRCxxQ0FBa0IsR0FBbEI7UUFBQSxpQkFZQztRQVhHLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLFVBQUMsS0FBSztZQUNoQyxLQUFJLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxLQUFLLENBQUMsQ0FBQztTQUNqQyxDQUFDLENBQUM7UUFFSCxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUV4QyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUNyRyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRWhHLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNuQyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7S0FDckM7SUFFRCxxQ0FBa0IsR0FBbEIsVUFBbUIsT0FBZ0I7UUFDL0IsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztZQUMvQixJQUFJLENBQUMsWUFBWSxHQUFHLE9BQU8sQ0FBQztZQUM1QixJQUFJLENBQUMsTUFBTSxHQUFHLE9BQU8sR0FBRyxrQkFBTyxDQUFDLFNBQVMsRUFBRSxDQUFDLFFBQVEsRUFBRSxHQUFHLE1BQU0sQ0FBQztTQUNuRTtRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osSUFBSSxDQUFDLGtCQUFrQixHQUFHLE9BQU8sQ0FBQztTQUNyQztLQUNKO0lBRUQsaUNBQWMsR0FBZCxVQUFlLE1BQWU7UUFDMUIsSUFBSSxDQUFDLGlCQUFpQixHQUFHLE1BQU0sQ0FBQztLQUNuQztJQUVELDhCQUFXLEdBQVg7UUFDSSxJQUFJLENBQUMsYUFBYSxDQUFDLE9BQU8sQ0FBQyxVQUFBLENBQUMsSUFBSSxPQUFBLENBQUMsQ0FBQyxXQUFXLEVBQUUsRUFBZixDQUFlLENBQUMsQ0FBQztLQUNwRDs7Z0JBakZKLGdCQUFTLFNBQUM7b0JBQ1AsUUFBUSxFQUFFLFdBQVc7b0JBQ3JCLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUsMkJBQTJCO29CQUNyQyxNQUFNLEVBQUUsQ0FBRSw0ZEFvQlQsQ0FBRTtvQkFDSCxTQUFTLEVBQUUsQ0FBRSxjQUFLLEVBQUUsbUNBQWUsRUFBRSxxQ0FBZ0IsQ0FBRTtpQkFDMUQ7Ozs7Z0JBdkNHLGlCQUFVO2dCQU1MLGNBQUs7Z0JBQ0wsbUNBQWU7Z0JBSWYscUNBQWdCOzs7aUNBZ0NwQixrQkFBVyxTQUFDLGtCQUFrQjt1Q0FDOUIsa0JBQVcsU0FBQyx5QkFBeUI7c0NBQ3JDLGtCQUFXLFNBQUMsdUJBQXVCOzJCQUNuQyxrQkFBVyxTQUFDLGVBQWU7a0NBRTNCLGFBQU07aUNBR04sYUFBTTsyQkFHTixzQkFBZSxTQUFDLGtCQUFPOzttQkExRDVCOztBQTRDYSw0QkFBUSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gICAgT3V0cHV0LFxuICAgIENvbXBvbmVudCxcbiAgICBFdmVudEVtaXR0ZXIsXG4gICAgRWxlbWVudFJlZixcbiAgICBIb3N0QmluZGluZyxcbiAgICBRdWVyeUxpc3QsXG4gICAgQWZ0ZXJDb250ZW50SW5pdCxcbiAgICBDb250ZW50Q2hpbGRyZW4sIFZpZXdFbmNhcHN1bGF0aW9uLCBPbkRlc3Ryb3lcbn0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBWZ0FQSSB9IGZyb20gJy4uL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBWZ0Z1bGxzY3JlZW5BUEkgfSBmcm9tICcuLi9zZXJ2aWNlcy92Zy1mdWxsc2NyZWVuLWFwaSc7XG5pbXBvcnQgeyBWZ1V0aWxzIH0gZnJvbSAnLi4vc2VydmljZXMvdmctdXRpbHMnO1xuaW1wb3J0IHsgVmdNZWRpYSB9IGZyb20gJy4uL3ZnLW1lZGlhL3ZnLW1lZGlhJztcbmltcG9ydCB7IFN1YnNjcmlwdGlvbiB9IGZyb20gJ3J4anMvU3Vic2NyaXB0aW9uJztcbmltcG9ydCB7IFZnQ29udHJvbHNIaWRkZW4gfSBmcm9tICcuLi9zZXJ2aWNlcy92Zy1jb250cm9scy1oaWRkZW4nO1xuXG5AQ29tcG9uZW50KHtcbiAgICBzZWxlY3RvcjogJ3ZnLXBsYXllcicsXG4gICAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgICB0ZW1wbGF0ZTogYDxuZy1jb250ZW50PjwvbmctY29udGVudD5gLFxuICAgIHN0eWxlczogWyBgXG4gICAgICAgIHZnLXBsYXllciB7XG4gICAgICAgICAgICBmb250LWZhbWlseTogJ3ZpZGVvZ3VsYXInO1xuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IGJsYWNrO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctcGxheWVyLmZ1bGxzY3JlZW4ge1xuICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO1xuICAgICAgICAgICAgbGVmdDogMDtcbiAgICAgICAgICAgIHRvcDogMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLXBsYXllci5uYXRpdmUtZnVsbHNjcmVlbi5jb250cm9scy1oaWRkZW4ge1xuICAgICAgICAgICAgY3Vyc29yOiBub25lO1xuICAgICAgICB9XG4gICAgYCBdLFxuICAgIHByb3ZpZGVyczogWyBWZ0FQSSwgVmdGdWxsc2NyZWVuQVBJLCBWZ0NvbnRyb2xzSGlkZGVuIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdQbGF5ZXIgaW1wbGVtZW50cyBBZnRlckNvbnRlbnRJbml0LCBPbkRlc3Ryb3kge1xuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuXG4gICAgQEhvc3RCaW5kaW5nKCdjbGFzcy5mdWxsc2NyZWVuJykgaXNGdWxsc2NyZWVuOiBib29sZWFuID0gZmFsc2U7XG4gICAgQEhvc3RCaW5kaW5nKCdjbGFzcy5uYXRpdmUtZnVsbHNjcmVlbicpIGlzTmF0aXZlRnVsbHNjcmVlbjogYm9vbGVhbiA9IGZhbHNlO1xuICAgIEBIb3N0QmluZGluZygnY2xhc3MuY29udHJvbHMtaGlkZGVuJykgYXJlQ29udHJvbHNIaWRkZW46IGJvb2xlYW4gPSBmYWxzZTtcbiAgICBASG9zdEJpbmRpbmcoJ3N0eWxlLnotaW5kZXgnKSB6SW5kZXg6IHN0cmluZztcblxuICAgIEBPdXRwdXQoKVxuICAgIG9uUGxheWVyUmVhZHk6IEV2ZW50RW1pdHRlcjxhbnk+ID0gbmV3IEV2ZW50RW1pdHRlcigpO1xuXG4gICAgQE91dHB1dCgpXG4gICAgb25NZWRpYVJlYWR5OiBFdmVudEVtaXR0ZXI8YW55PiA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcblxuICAgIEBDb250ZW50Q2hpbGRyZW4oVmdNZWRpYSlcbiAgICBtZWRpYXM6IFF1ZXJ5TGlzdDxWZ01lZGlhPjtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBhcGk6IFZnQVBJLCBwdWJsaWMgZnNBUEk6IFZnRnVsbHNjcmVlbkFQSSwgcHJpdmF0ZSBjb250cm9sc0hpZGRlbjogVmdDb250cm9sc0hpZGRlbikge1xuICAgICAgICB0aGlzLmVsZW0gPSByZWYubmF0aXZlRWxlbWVudDtcblxuICAgICAgICB0aGlzLmFwaS5yZWdpc3RlckVsZW1lbnQodGhpcy5lbGVtKTtcbiAgICB9XG5cbiAgICBuZ0FmdGVyQ29udGVudEluaXQoKSB7XG4gICAgICAgIHRoaXMubWVkaWFzLnRvQXJyYXkoKS5mb3JFYWNoKChtZWRpYSkgPT4ge1xuICAgICAgICAgICAgdGhpcy5hcGkucmVnaXN0ZXJNZWRpYShtZWRpYSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuZnNBUEkuaW5pdCh0aGlzLmVsZW0sIHRoaXMubWVkaWFzKTtcblxuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLmZzQVBJLm9uQ2hhbmdlRnVsbHNjcmVlbi5zdWJzY3JpYmUodGhpcy5vbkNoYW5nZUZ1bGxzY3JlZW4uYmluZCh0aGlzKSkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLmNvbnRyb2xzSGlkZGVuLmlzSGlkZGVuLnN1YnNjcmliZSh0aGlzLm9uSGlkZUNvbnRyb2xzLmJpbmQodGhpcykpKTtcblxuICAgICAgICB0aGlzLmFwaS5vblBsYXllclJlYWR5KHRoaXMuZnNBUEkpO1xuICAgICAgICB0aGlzLm9uUGxheWVyUmVhZHkubmV4dCh0aGlzLmFwaSk7XG4gICAgfVxuXG4gICAgb25DaGFuZ2VGdWxsc2NyZWVuKGZzU3RhdGU6IGJvb2xlYW4pIHtcbiAgICAgICAgaWYgKCF0aGlzLmZzQVBJLm5hdGl2ZUZ1bGxzY3JlZW4pIHtcbiAgICAgICAgICAgIHRoaXMuaXNGdWxsc2NyZWVuID0gZnNTdGF0ZTtcbiAgICAgICAgICAgIHRoaXMuekluZGV4ID0gZnNTdGF0ZSA/IFZnVXRpbHMuZ2V0WkluZGV4KCkudG9TdHJpbmcoKSA6ICdhdXRvJztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuaXNOYXRpdmVGdWxsc2NyZWVuID0gZnNTdGF0ZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uSGlkZUNvbnRyb2xzKGhpZGRlbjogYm9vbGVhbikge1xuICAgICAgICB0aGlzLmFyZUNvbnRyb2xzSGlkZGVuID0gaGlkZGVuO1xuICAgIH1cblxuICAgIG5nT25EZXN0cm95KCkge1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMuZm9yRWFjaChzID0+IHMudW5zdWJzY3JpYmUoKSk7XG4gICAgfVxufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar common_1 = require(\"@angular/common\");\nvar vg_overlay_play_1 = require(\"./vg-overlay-play\");\nvar VgOverlayPlayModule = (function () {\n function VgOverlayPlayModule() {\n }\n VgOverlayPlayModule.decorators = [\n { type: core_1.NgModule, args: [{\n imports: [common_1.CommonModule],\n declarations: [\n vg_overlay_play_1.VgOverlayPlay\n ],\n exports: [\n vg_overlay_play_1.VgOverlayPlay\n ]\n },] },\n ];\n return VgOverlayPlayModule;\n}());\nexports.VgOverlayPlayModule = VgOverlayPlayModule;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmxheS1wbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsib3ZlcmxheS1wbGF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQThDO0FBQzlDLDBDQUErQztBQUUvQyxxREFBZ0Q7Ozs7O2dCQUUvQyxlQUFRLFNBQUM7b0JBQ04sT0FBTyxFQUFFLENBQUUscUJBQVksQ0FBRTtvQkFDekIsWUFBWSxFQUFFO3dCQUNWLCtCQUFhO3FCQUNoQjtvQkFDRCxPQUFPLEVBQUU7d0JBQ0wsK0JBQWE7cUJBQ2hCO2lCQUNKOzs4QkFiRDs7QUFjYSxrREFBbUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9ICAgICAgZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xuXG5pbXBvcnQge1ZnT3ZlcmxheVBsYXl9IGZyb20gJy4vdmctb3ZlcmxheS1wbGF5JztcblxuQE5nTW9kdWxlKHtcbiAgICBpbXBvcnRzOiBbIENvbW1vbk1vZHVsZSBdLFxuICAgIGRlY2xhcmF0aW9uczogW1xuICAgICAgICBWZ092ZXJsYXlQbGF5XG4gICAgXSxcbiAgICBleHBvcnRzOiBbXG4gICAgICAgIFZnT3ZlcmxheVBsYXlcbiAgICBdXG59KVxuZXhwb3J0IGNsYXNzIFZnT3ZlcmxheVBsYXlNb2R1bGUge31cbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@angular/core\");\nvar vg_api_1 = require(\"../core/services/vg-api\");\nvar vg_states_1 = require(\"../core/states/vg-states\");\nvar vg_fullscreen_api_1 = require(\"../core/services/vg-fullscreen-api\");\nvar vg_controls_hidden_1 = require(\"../core/services/vg-controls-hidden\");\nvar VgOverlayPlay = (function () {\n function VgOverlayPlay(ref, API, fsAPI, controlsHidden) {\n this.API = API;\n this.fsAPI = fsAPI;\n this.controlsHidden = controlsHidden;\n this.isNativeFullscreen = false;\n this.areControlsHidden = false;\n this.subscriptions = [];\n this.isBuffering = false;\n this.elem = ref.nativeElement;\n }\n VgOverlayPlay.prototype.ngOnInit = function () {\n var _this = this;\n if (this.API.isPlayerReady) {\n this.onPlayerReady();\n }\n else {\n this.subscriptions.push(this.API.playerReadyEvent.subscribe(function () { return _this.onPlayerReady(); }));\n }\n };\n VgOverlayPlay.prototype.onPlayerReady = function () {\n var _this = this;\n this.target = this.API.getMediaById(this.vgFor);\n this.subscriptions.push(this.fsAPI.onChangeFullscreen.subscribe(this.onChangeFullscreen.bind(this)));\n this.subscriptions.push(this.controlsHidden.isHidden.subscribe(this.onHideControls.bind(this)));\n this.subscriptions.push(this.target.subscriptions.bufferDetected.subscribe(function (isBuffering) { return _this.onUpdateBuffer(isBuffering); }));\n };\n VgOverlayPlay.prototype.onUpdateBuffer = function (isBuffering) {\n this.isBuffering = isBuffering;\n };\n VgOverlayPlay.prototype.onChangeFullscreen = function (fsState) {\n if (this.fsAPI.nativeFullscreen) {\n this.isNativeFullscreen = fsState;\n }\n };\n VgOverlayPlay.prototype.onHideControls = function (hidden) {\n this.areControlsHidden = hidden;\n };\n VgOverlayPlay.prototype.onClick = function () {\n var state = this.getState();\n switch (state) {\n case vg_states_1.VgStates.VG_PLAYING:\n this.target.pause();\n break;\n case vg_states_1.VgStates.VG_PAUSED:\n case vg_states_1.VgStates.VG_ENDED:\n this.target.play();\n break;\n }\n };\n VgOverlayPlay.prototype.getState = function () {\n var state = vg_states_1.VgStates.VG_PAUSED;\n if (this.target) {\n if (this.target.state instanceof Array) {\n for (var i = 0, l = this.target.state.length; i < l; i++) {\n if (this.target.state[i] === vg_states_1.VgStates.VG_PLAYING) {\n state = vg_states_1.VgStates.VG_PLAYING;\n break;\n }\n }\n }\n else {\n state = this.target.state;\n }\n }\n return state;\n };\n VgOverlayPlay.prototype.ngOnDestroy = function () {\n this.subscriptions.forEach(function (s) { return s.unsubscribe(); });\n };\n VgOverlayPlay.decorators = [\n { type: core_1.Component, args: [{\n selector: 'vg-overlay-play',\n encapsulation: core_1.ViewEncapsulation.None,\n template: \"<div class=\\\"vg-overlay-play\\\"\\n [class.native-fullscreen]=\\\"isNativeFullscreen\\\"\\n [class.controls-hidden]=\\\"areControlsHidden\\\">\\n <div class=\\\"overlay-play-container\\\"\\n [class.vg-icon-play_arrow]=\\\"getState() !== 'playing'\\\">\\n </div>\\n </div>\",\n styles: [\"\\n vg-overlay-play {\\n z-index: 200;\\n }\\n\\n vg-overlay-play.is-buffering {\\n display: none;\\n }\\n\\n vg-overlay-play .vg-overlay-play {\\n transition: all 0.5s;\\n cursor: pointer;\\n position: absolute;\\n display: block;\\n color: white;\\n width: 100%;\\n height: 100%;\\n font-size: 80px;\\n filter: alpha(opacity=60);\\n opacity: 0.6;\\n }\\n\\n vg-overlay-play .vg-overlay-play.native-fullscreen.controls-hidden {\\n cursor: none;\\n }\\n\\n vg-overlay-play .vg-overlay-play .overlay-play-container.vg-icon-play_arrow {\\n pointer-events: none;\\n width: 100%;\\n height: 100%;\\n position: absolute;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n font-size: 80px;\\n }\\n\\n vg-overlay-play .vg-overlay-play:hover {\\n filter: alpha(opacity=100);\\n opacity: 1;\\n }\\n\\n vg-overlay-play .vg-overlay-play:hover .overlay-play-container.vg-icon-play_arrow:before {\\n transform: scale(1.2);\\n }\\n \"]\n },] },\n ];\n /** @nocollapse */\n VgOverlayPlay.ctorParameters = function () { return [\n { type: core_1.ElementRef, },\n { type: vg_api_1.VgAPI, },\n { type: vg_fullscreen_api_1.VgFullscreenAPI, },\n { type: vg_controls_hidden_1.VgControlsHidden, },\n ]; };\n VgOverlayPlay.propDecorators = {\n \"vgFor\": [{ type: core_1.Input },],\n \"isBuffering\": [{ type: core_1.HostBinding, args: ['class.is-buffering',] },],\n \"onClick\": [{ type: core_1.HostListener, args: ['click',] },],\n };\n return VgOverlayPlay;\n}());\nexports.VgOverlayPlay = VgOverlayPlay;\n\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmctb3ZlcmxheS1wbGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidmctb3ZlcmxheS1wbGF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBR3VCO0FBQ3ZCLGtEQUFnRDtBQUNoRCxzREFBb0Q7QUFFcEQsd0VBQXFFO0FBQ3JFLDBFQUF1RTs7SUF1RW5FLHVCQUFZLEdBQWUsRUFBUyxHQUFVLEVBQVMsS0FBc0IsRUFBVSxjQUFnQztRQUFuRixRQUFHLEdBQUgsR0FBRyxDQUFPO1FBQVMsVUFBSyxHQUFMLEtBQUssQ0FBaUI7UUFBVSxtQkFBYyxHQUFkLGNBQWMsQ0FBa0I7a0NBUHpGLEtBQUs7aUNBQ04sS0FBSzs2QkFFRixFQUFFOzJCQUV3QixLQUFLO1FBRzNELElBQUksQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQztLQUNqQztJQUVELGdDQUFRLEdBQVI7UUFBQSxpQkFPQztRQU5HLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsYUFBYSxFQUFFLENBQUM7U0FDeEI7UUFDRCxJQUFJLENBQUMsQ0FBQztZQUNGLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsZ0JBQWdCLENBQUMsU0FBUyxDQUFDLGNBQU0sT0FBQSxLQUFJLENBQUMsYUFBYSxFQUFFLEVBQXBCLENBQW9CLENBQUMsQ0FBQyxDQUFDO1NBQzVGO0tBQ0o7SUFFRCxxQ0FBYSxHQUFiO1FBQUEsaUJBU0M7UUFSRyxJQUFJLENBQUMsTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNoRCxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsa0JBQWtCLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztRQUNyRyxJQUFJLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsY0FBYyxDQUFDLFFBQVEsQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLGNBQWMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2hHLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUNuQixJQUFJLENBQUMsTUFBTSxDQUFDLGFBQWEsQ0FBQyxjQUFjLENBQUMsU0FBUyxDQUM5QyxVQUFBLFdBQVcsSUFBSSxPQUFBLEtBQUksQ0FBQyxjQUFjLENBQUMsV0FBVyxDQUFDLEVBQWhDLENBQWdDLENBQ2xELENBQ0osQ0FBQztLQUNMO0lBRUQsc0NBQWMsR0FBZCxVQUFlLFdBQVc7UUFDdEIsSUFBSSxDQUFDLFdBQVcsR0FBRyxXQUFXLENBQUM7S0FDbEM7SUFFRCwwQ0FBa0IsR0FBbEIsVUFBbUIsT0FBZ0I7UUFDL0IsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFDLENBQUM7WUFDOUIsSUFBSSxDQUFDLGtCQUFrQixHQUFHLE9BQU8sQ0FBQztTQUNyQztLQUNKO0lBRUQsc0NBQWMsR0FBZCxVQUFlLE1BQWU7UUFDMUIsSUFBSSxDQUFDLGlCQUFpQixHQUFHLE1BQU0sQ0FBQztLQUNuQztJQUdELCtCQUFPO1FBQ0gsSUFBSSxLQUFLLEdBQUcsSUFBSSxDQUFDLFFBQVEsRUFBRSxDQUFDO1FBRTVCLE1BQU0sQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUM7WUFDWixLQUFLLG9CQUFRLENBQUMsVUFBVTtnQkFDcEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUUsQ0FBQztnQkFDcEIsS0FBSyxDQUFDO1lBRVYsS0FBSyxvQkFBUSxDQUFDLFNBQVMsQ0FBQztZQUN4QixLQUFLLG9CQUFRLENBQUMsUUFBUTtnQkFDbEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsQ0FBQztnQkFDbkIsS0FBSyxDQUFDO1NBQ2I7O0lBR0wsZ0NBQVEsR0FBUjtRQUNJLElBQUksS0FBSyxHQUFHLG9CQUFRLENBQUMsU0FBUyxDQUFDO1FBRS9CLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO1lBQ2QsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLFlBQVksS0FBSyxDQUFDLENBQUMsQ0FBQztnQkFDckMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEVBQUUsRUFBRSxDQUFDO29CQUN2RCxFQUFFLENBQUMsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBRSxDQUFDLENBQUUsS0FBSyxvQkFBUSxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7d0JBQ2pELEtBQUssR0FBRyxvQkFBUSxDQUFDLFVBQVUsQ0FBQzt3QkFDNUIsS0FBSyxDQUFDO3FCQUNUO2lCQUNKO2FBQ0o7WUFDRCxJQUFJLENBQUMsQ0FBQztnQkFDRixLQUFLLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUM7YUFDN0I7U0FDSjtRQUVELE1BQU0sQ0FBQyxLQUFLLENBQUM7S0FDaEI7SUFFRCxtQ0FBVyxHQUFYO1FBQ0ksSUFBSSxDQUFDLGFBQWEsQ0FBQyxPQUFPLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSxDQUFDLENBQUMsV0FBVyxFQUFFLEVBQWYsQ0FBZSxDQUFDLENBQUM7S0FDcEQ7O2dCQWpKSixnQkFBUyxTQUFDO29CQUNQLFFBQVEsRUFBRSxpQkFBaUI7b0JBQzNCLGFBQWEsRUFBRSx3QkFBaUIsQ0FBQyxJQUFJO29CQUNyQyxRQUFRLEVBQUUsd1dBTVE7b0JBQ2xCLE1BQU0sRUFBRSxDQUFFLDh1Q0E2Q1QsQ0FBRTtpQkFDTjs7OztnQkFqRTZCLGlCQUFVO2dCQUcvQixjQUFLO2dCQUdMLG1DQUFlO2dCQUNmLHFDQUFnQjs7OzBCQTREcEIsWUFBSztnQ0FTTCxrQkFBVyxTQUFDLG9CQUFvQjs0QkF3Q2hDLG1CQUFZLFNBQUMsT0FBTzs7d0JBckh6Qjs7QUFtRWEsc0NBQWEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xuICAgIENvbXBvbmVudCwgT25Jbml0LCBJbnB1dCwgRWxlbWVudFJlZiwgSG9zdExpc3RlbmVyLCBWaWV3RW5jYXBzdWxhdGlvbiwgT25EZXN0cm95LFxuICAgIEhvc3RCaW5kaW5nXG59IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgVmdBUEkgfSBmcm9tICcuLi9jb3JlL3NlcnZpY2VzL3ZnLWFwaSc7XG5pbXBvcnQgeyBWZ1N0YXRlcyB9IGZyb20gJy4uL2NvcmUvc3RhdGVzL3ZnLXN0YXRlcyc7XG5pbXBvcnQgeyBTdWJzY3JpcHRpb24gfSBmcm9tICdyeGpzL1N1YnNjcmlwdGlvbic7XG5pbXBvcnQgeyBWZ0Z1bGxzY3JlZW5BUEkgfSBmcm9tICcuLi9jb3JlL3NlcnZpY2VzL3ZnLWZ1bGxzY3JlZW4tYXBpJztcbmltcG9ydCB7IFZnQ29udHJvbHNIaWRkZW4gfSBmcm9tICcuLi9jb3JlL3NlcnZpY2VzL3ZnLWNvbnRyb2xzLWhpZGRlbic7XG5cbkBDb21wb25lbnQoe1xuICAgIHNlbGVjdG9yOiAndmctb3ZlcmxheS1wbGF5JyxcbiAgICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgIHRlbXBsYXRlOiBgPGRpdiBjbGFzcz1cInZnLW92ZXJsYXktcGxheVwiXG4gICAgICAgICAgICAgICAgICAgIFtjbGFzcy5uYXRpdmUtZnVsbHNjcmVlbl09XCJpc05hdGl2ZUZ1bGxzY3JlZW5cIlxuICAgICAgICAgICAgICAgICAgICBbY2xhc3MuY29udHJvbHMtaGlkZGVuXT1cImFyZUNvbnRyb2xzSGlkZGVuXCI+XG4gICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cIm92ZXJsYXktcGxheS1jb250YWluZXJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgW2NsYXNzLnZnLWljb24tcGxheV9hcnJvd109XCJnZXRTdGF0ZSgpICE9PSAncGxheWluZydcIj5cbiAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgIDwvZGl2PmAsXG4gICAgc3R5bGVzOiBbIGBcbiAgICAgICAgdmctb3ZlcmxheS1wbGF5IHtcbiAgICAgICAgICAgIHotaW5kZXg6IDIwMDtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLW92ZXJsYXktcGxheS5pcy1idWZmZXJpbmcge1xuICAgICAgICAgICAgZGlzcGxheTogbm9uZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZnLW92ZXJsYXktcGxheSAudmctb3ZlcmxheS1wbGF5IHtcbiAgICAgICAgICAgIHRyYW5zaXRpb246IGFsbCAwLjVzO1xuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgICBjb2xvcjogd2hpdGU7XG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICAgIGhlaWdodDogMTAwJTtcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogODBweDtcbiAgICAgICAgICAgIGZpbHRlcjogYWxwaGEob3BhY2l0eT02MCk7XG4gICAgICAgICAgICBvcGFjaXR5OiAwLjY7XG4gICAgICAgIH1cblxuICAgICAgICB2Zy1vdmVybGF5LXBsYXkgLnZnLW92ZXJsYXktcGxheS5uYXRpdmUtZnVsbHNjcmVlbi5jb250cm9scy1oaWRkZW4ge1xuICAgICAgICAgICAgY3Vyc29yOiBub25lO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctb3ZlcmxheS1wbGF5IC52Zy1vdmVybGF5LXBsYXkgLm92ZXJsYXktcGxheS1jb250YWluZXIudmctaWNvbi1wbGF5X2Fycm93IHtcbiAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lO1xuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgICBoZWlnaHQ6IDEwMCU7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICAgICAgICAgIGp1c3RpZnktY29udGVudDogY2VudGVyO1xuICAgICAgICAgICAgZm9udC1zaXplOiA4MHB4O1xuICAgICAgICB9XG5cbiAgICAgICAgdmctb3ZlcmxheS1wbGF5IC52Zy1vdmVybGF5LXBsYXk6aG92ZXIge1xuICAgICAgICAgICAgZmlsdGVyOiBhbHBoYShvcGFjaXR5PTEwMCk7XG4gICAgICAgICAgICBvcGFjaXR5OiAxO1xuICAgICAgICB9XG5cbiAgICAgICAgdmctb3ZlcmxheS1wbGF5IC52Zy1vdmVybGF5LXBsYXk6aG92ZXIgLm92ZXJsYXktcGxheS1jb250YWluZXIudmctaWNvbi1wbGF5X2Fycm93OmJlZm9yZSB7XG4gICAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDEuMik7XG4gICAgICAgIH1cbiAgICBgIF1cbn0pXG5leHBvcnQgY2xhc3MgVmdPdmVybGF5UGxheSBpbXBsZW1lbnRzIE9uSW5pdCwgT25EZXN0cm95IHtcbiAgICBASW5wdXQoKSB2Z0Zvcjogc3RyaW5nO1xuICAgIGVsZW06IEhUTUxFbGVtZW50O1xuICAgIHRhcmdldDogYW55O1xuXG4gICAgaXNOYXRpdmVGdWxsc2NyZWVuOiBib29sZWFuID0gZmFsc2U7XG4gICAgYXJlQ29udHJvbHNIaWRkZW46IGJvb2xlYW4gPSBmYWxzZTtcblxuICAgIHN1YnNjcmlwdGlvbnM6IFN1YnNjcmlwdGlvbltdID0gW107XG5cbiAgICBASG9zdEJpbmRpbmcoJ2NsYXNzLmlzLWJ1ZmZlcmluZycpIGlzQnVmZmVyaW5nOiBib29sZWFuID0gZmFsc2U7XG5cbiAgICBjb25zdHJ1Y3RvcihyZWY6IEVsZW1lbnRSZWYsIHB1YmxpYyBBUEk6IFZnQVBJLCBwdWJsaWMgZnNBUEk6IFZnRnVsbHNjcmVlbkFQSSwgcHJpdmF0ZSBjb250cm9sc0hpZGRlbjogVmdDb250cm9sc0hpZGRlbikge1xuICAgICAgICB0aGlzLmVsZW0gPSByZWYubmF0aXZlRWxlbWVudDtcbiAgICB9XG5cbiAgICBuZ09uSW5pdCgpIHtcbiAgICAgICAgaWYgKHRoaXMuQVBJLmlzUGxheWVyUmVhZHkpIHtcbiAgICAgICAgICAgIHRoaXMub25QbGF5ZXJSZWFkeSgpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2godGhpcy5BUEkucGxheWVyUmVhZHlFdmVudC5zdWJzY3JpYmUoKCkgPT4gdGhpcy5vblBsYXllclJlYWR5KCkpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUGxheWVyUmVhZHkoKSB7XG4gICAgICAgIHRoaXMudGFyZ2V0ID0gdGhpcy5BUEkuZ2V0TWVkaWFCeUlkKHRoaXMudmdGb3IpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLmZzQVBJLm9uQ2hhbmdlRnVsbHNjcmVlbi5zdWJzY3JpYmUodGhpcy5vbkNoYW5nZUZ1bGxzY3JlZW4uYmluZCh0aGlzKSkpO1xuICAgICAgICB0aGlzLnN1YnNjcmlwdGlvbnMucHVzaCh0aGlzLmNvbnRyb2xzSGlkZGVuLmlzSGlkZGVuLnN1YnNjcmliZSh0aGlzLm9uSGlkZUNvbnRyb2xzLmJpbmQodGhpcykpKTtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLnB1c2goXG4gICAgICAgICAgICB0aGlzLnRhcmdldC5zdWJzY3JpcHRpb25zLmJ1ZmZlckRldGVjdGVkLnN1YnNjcmliZShcbiAgICAgICAgICAgICAgICBpc0J1ZmZlcmluZyA9PiB0aGlzLm9uVXBkYXRlQnVmZmVyKGlzQnVmZmVyaW5nKVxuICAgICAgICAgICAgKVxuICAgICAgICApO1xuICAgIH1cblxuICAgIG9uVXBkYXRlQnVmZmVyKGlzQnVmZmVyaW5nKSB7XG4gICAgICAgIHRoaXMuaXNCdWZmZXJpbmcgPSBpc0J1ZmZlcmluZztcbiAgICB9XG5cbiAgICBvbkNoYW5nZUZ1bGxzY3JlZW4oZnNTdGF0ZTogYm9vbGVhbikge1xuICAgICAgICBpZiAodGhpcy5mc0FQSS5uYXRpdmVGdWxsc2NyZWVuKSB7XG4gICAgICAgICAgICB0aGlzLmlzTmF0aXZlRnVsbHNjcmVlbiA9IGZzU3RhdGU7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBvbkhpZGVDb250cm9scyhoaWRkZW46IGJvb2xlYW4pIHtcbiAgICAgICAgdGhpcy5hcmVDb250cm9sc0hpZGRlbiA9IGhpZGRlbjtcbiAgICB9XG5cbiAgICBASG9zdExpc3RlbmVyKCdjbGljaycpXG4gICAgb25DbGljaygpIHtcbiAgICAgICAgbGV0IHN0YXRlID0gdGhpcy5nZXRTdGF0ZSgpO1xuXG4gICAgICAgIHN3aXRjaCAoc3RhdGUpIHtcbiAgICAgICAgICAgIGNhc2UgVmdTdGF0ZXMuVkdfUExBWUlORzpcbiAgICAgICAgICAgICAgICB0aGlzLnRhcmdldC5wYXVzZSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFZnU3RhdGVzLlZHX1BBVVNFRDpcbiAgICAgICAgICAgIGNhc2UgVmdTdGF0ZXMuVkdfRU5ERUQ6XG4gICAgICAgICAgICAgICAgdGhpcy50YXJnZXQucGxheSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0U3RhdGUoKSB7XG4gICAgICAgIGxldCBzdGF0ZSA9IFZnU3RhdGVzLlZHX1BBVVNFRDtcblxuICAgICAgICBpZiAodGhpcy50YXJnZXQpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhcmdldC5zdGF0ZSBpbnN0YW5jZW9mIEFycmF5KSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDAsIGwgPSB0aGlzLnRhcmdldC5zdGF0ZS5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudGFyZ2V0LnN0YXRlWyBpIF0gPT09IFZnU3RhdGVzLlZHX1BMQVlJTkcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlID0gVmdTdGF0ZXMuVkdfUExBWUlORztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc3RhdGUgPSB0aGlzLnRhcmdldC5zdGF0ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICB9XG5cbiAgICBuZ09uRGVzdHJveSgpIHtcbiAgICAgICAgdGhpcy5zdWJzY3JpcHRpb25zLmZvckVhY2gocyA9PiBzLnVuc3Vic2NyaWJlKCkpO1xuICAgIH1cbn1cbiJdfQ==","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n"],"sourceRoot":""}